aapt

Repackage APK file to contain custom assets - what build tool to use?

a 夏天 提交于 2019-12-28 02:53:48
问题 Update : This is an old post, and references below to broken aapt versions will be out of date. Based on previous feedback, I am storing custom text fields in the assets directory of my app. I will write the app, using default user details in an asset file, and the client would like to rebuild the app for each user, including that user's details in the asset file. (I am aware this is method has some serious shortcomings, but the client is still keen to do it in this way - see Embed login

Compile androidManifest.xml from Java (aapt)

强颜欢笑 提交于 2019-12-25 02:22:27
问题 How can I use aapt from Java to compile the file androidManifest.xml to axml? 回答1: I couldn´t do it.. but the best solution is apktool.jar with processbuilder java method to execute commands from this jar, like windows command prompt to compile and decompile your apk. Sadly the apktool consumes a lot of RAM, you need a good server 来源: https://stackoverflow.com/questions/49599747/compile-androidmanifest-xml-from-java-aapt

Windows Batch / ADB - Check if installed .apk matches .apk from a directory

Deadly 提交于 2019-12-24 09:40:03
问题 I am using an FOR command and AAPT command to get a package name from a number of APKs in a directory. I am using a separate FOR command and ADB command to list all of the 3rd party installed applications from the device. I am unsure how to cross reference these to get the output I would like. I am trying to see if any of the contents of of the AAPT command appears in the the output of the ADB command. If the 2 variables match, do nothing. Otherwise, if the AAPT does not match any of the ADB

How to add -0 option to aapt in Eclipse?

妖精的绣舞 提交于 2019-12-24 09:27:08
问题 I now this question has pop-ed up a lot but I couldn't find a real solution. The aapt takes too much time compressing images and that is waste of time for large projects. It will take ages if you change something in the *.xml file. Any solution to add the -0 optimization option to the Eclipse build? Thanks a lot. 回答1: There is no way to pass parameters to aapt from eclipse (at least I'm not aware about it). But there is another solution to your problem, you can use new feature introduced in

how to print a specified parameter when using aapt dump

蓝咒 提交于 2019-12-24 08:03:00
问题 I saw here that the command aapt dump badging foo.apk prints all the details of the specified package. Is it possible to print any one property, say sdkversion? Something like aapt dump badging -sdkversion foo.apk P.S I'm using command prompt in windows. EDIT I am trying to store the package name in a variable. As of now, I have this code @echo off for /f "delims=" %%a in ('aapt dump badging foo.apk') do ( REM each line of the output ) I am able to retrieve each line of the output. Now I have

aapt dump badging fails “dump failed because assets could not be loaded”

偶尔善良 提交于 2019-12-23 21:01:19
问题 When I run the aapt dump badging on my apk I get the below error W/asset (17217): Asset path Users/username/Downloads/appname.apk is neither a directory nor file (type=1). ERROR: dump failed because assets could not be loaded I couldn't find why it happens. I'm using iMac. 回答1: I have faced this problem in my case it was missing of the (.)dot in following terminal command ./aapt dump badging /Users/username/Documents/Android/Release/PROD/appname.apk Hope this helps 回答2: I come this issue with

Google APIs throw no-crunch error for android

不打扰是莪最后的温柔 提交于 2019-12-23 13:13:43
问题 I just installed android 2.1 SDK in eclipse and created a project targeted for Google API:7. Eclipse shows an error on the project icon, and the debug window shows this error ERROR: Unknown command 'crunch' Android Asset Packaging Tool After quite a lot of googling, I still have no idea how to fix this error. I have already tried cleaning up the project. 回答1: I think the problem has a generic cause ==> Partial ADT Update Check your repositories again and then this link 回答2: This happened to

Google Play Android .apk Upload “Failed to run aapt dump badging”

淺唱寂寞╮ 提交于 2019-12-23 08:58:37
问题 It has been almost a year since I last uploaded an App to the Google Play Developer Console (it is a Cordova App that I have signed and zip aligned); follow the same process I have used successfully in the past I am now getting the following error: Upload failed Your APK cannot be analyzed using 'aapt dump badging'. Error output: Failed to run aapt dump badging: ERROR: dump failed because assets could not be loaded What's happening here? 回答1: This was a total noob mistake : Part of the

Error:android-apt-compiler: Cannot run program “sdk_path/build-tools/21.1.2/aapt”: java.io.IOException: error=13, Permission denied

好久不见. 提交于 2019-12-23 03:06:40
问题 I'm using Intellij IDEA 14.1.2 , java version " 1.6.0_45 " and OS Ubuntu 14.04 32bit , Showing this error during execution. Error:android-apt-compiler: Cannot run program "sdk_path/build-tools/21.1.2/aapt": java.io.IOException: error=13, Permission denied May I know you how can I solve this error? 回答1: right click on 'aapt' file , properties -> permissions and check 'Allow executing file as program'. then close the window. in my case,after giving permission for 'aapt' file, i had to give the

Aapt is not working correctly - cannot generate R IDs on fresh project

对着背影说爱祢 提交于 2019-12-22 08:25:48
问题 I am running headless Ubuntu Server, with Jenkins, for Android builds, mostly for testing, several physical devices are connected all the time. Week ago it started to behave wierd, it was impossible to have sucesful build on this machine. At first I thought it might be something with code, then pom.xml files. Maven projects are throwing the same error (132): [INFO] Illegal instruction (core dumped) [ERROR] Error when generating sources. ... Caused by: com.jayway.maven.plugins.android