My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
ReportingIssues  
Info on how to report and issue
Featured
Updated Jun 13, 2010 by Brut.alll

I get plenty of issue reports not related to apktool at all. People use my tool, but they don't know, how to edit XMLs, install or sign apks, etc. It's funny to me that they go for hard way of reengineering if they don't even know, how to work with app sources...

So... if you get some errors from apktool when decoding or building apk, then most probably this is a bug of apktool and you should report it. But if you have succeeded at decoding and building, but app doesn't work on your device, then I suggest you doing some tests:

  • don't do anything with original apk file, just install it using the same way as for apk built by apktool. If you will fail, then it can't be related to apktool, because you didn't even use it. Typical scenario: installing framework-res.apk by "adb push" command, which will certainly give you a lot of FCs.
  • unzip apk, remove META-INF dir, zip it back, sign and install. This will remove original signatures, but rest of the app will be intact. If you will fail at this point, you could be sure, that your problems are related to signing, not apktool.
  • rebuild apk without doing any changes to it ("apktool d" & "apktool b"). If apktool will succeed, but apk won't work, then it's probably apktool bug and you should report it.
  • if an app was working earlier, but after doing some changes to it it doesn't, this may be a bug of apktool, but more likely it's your fault.

Interesting thing is that I don't remember even one real situation, when apktool has rebuilt apk without errors, but app didn't work on a device. But I got a lot of such reports, each of them was invalid so far.

Comment by danesh...@gmail.com, Jul 22, 2010

And if its a system app, make sure to copy the meta-inf folder from the original apk into ur modified apk.

Comment by middlepi...@gmail.com, Aug 16, 2010

I'm using APKTOOL 1.3.1 attempting to edit the framework-res file for many purposes. Animations, themeing, network name. I get thrown pages of errors just trying the tool. Below is a brief of what covers about 2 scroll pages in terminal I typed apktool d framework-res.apk then apktool b framework-res no editing at all just decompile and recompile. In using Ubuntu 10.0

/home/dreamsforgotten/AMS/framework-res/res/values/public.xml:2677: error: Public symbol drawable/zz_stat_sys_signal_flightmode declared here is not defined. /home/dreamsforgotten/AMS/framework-res/res/values/public.xml:2678: error: Public symbol drawable/zz_stat_sys_signal_null declared here is not defined. /home/dreamsforgotten/AMS/framework-res/res/values/public.xml:2679: error: Public symbol drawable/zz_stat_sys_tty_mode declared here is not defined.

Comment by reekotu...@gmail.com, Aug 22, 2010
Version: APKTOOL 1.3.1
OS:      Vista
APK:     Google Voice 0.4

While attempting to decode the apk I receive this error:

I: Baksmaling...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: 
File already exists: com.google.android.apps.googlevoice\smali\com\
google\android\apps\googlevoice\MasfLogStopwatch.java
at brut.androlib.Androlib.decodeSourcesSmali(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.androlib.AndrolibException: 
File already exists: com.google.android.apps.googlevoice\smali\com\google\android\apps \googlevoice\MasfLogStopwatch.java
at brut.androlib.src.SmaliDecoder.decodeClassDefItem( Unknown Source)
at brut.androlib.src.SmaliDecoder.decode(Unknown Source)
at brut.androlib.src.SmaliDecoder.decode(Unknown Source)
... 4 more

The file is in its own directory. I don't know why it says the file already exist. 
Unless brut.all creates this file and google wised up and put the file in the .apk 
already to screw up the brut.all process.
Comment by wf1...@gmail.com, Jan 4, 2011

resourse file android:id="@id/xxx" is error,that is android:id="@+id/xxx"

Comment by tre...@greenromproject.com, May 14, 2011

I simply tried to decompile and build apk without making any changes and this is what I get: I: Copying assets and libs... treken@linuxmint ~ $ apktool b Launcher2 I: Checking whether sources has changed... I: Smaling... I: Checking whether resources has changed... I: Building resources... Exception in thread "main" brut.androlib.AndrolibException?: brut.common.BrutException?: could not exec command: [aapt, p, -F, /tmp/APKTOOL7569633204993908504.tmp, -I, /home/treken/apktool/framework/1.apk, -S, /home/treken/Launcher2/res, -M, /home/treken/Launcher2/AndroidManifest?.xml]

at brut.androlib.res.AndrolibResources?.aaptPackage(Unknown Source) at brut.androlib.Androlib.buildResourcesFull(Unknown Source) at brut.androlib.Androlib.buildResources(Unknown Source) at brut.androlib.Androlib.build(Unknown Source) at brut.androlib.Androlib.build(Unknown Source) at brut.apktool.Main.cmdBuild(Unknown Source) at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException?: could not exec command: [aapt, p, -F, /tmp/APKTOOL7569633204993908504.tmp, -I, /home/treken/apktool/framework/1.apk, -S, /home/treken/Launcher2/res, -M, /home/treken/Launcher2/AndroidManifest?.xml]
at brut.util.OS.exec(Unknown Source) ... 7 more
Caused by: java.io.IOException: Cannot run program "aapt": java.io.IOException: error=13, Permission denied
at java.lang.ProcessBuilder?.start(ProcessBuilder?.java:460) at java.lang.Runtime.exec(Runtime.java:593) at java.lang.Runtime.exec(Runtime.java:466) ... 8 more
Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.<init>(UNIXProcess.java:148) at java.lang.ProcessImpl?.start(ProcessImpl?.java:65) at java.lang.ProcessBuilder?.start(ProcessBuilder?.java:453) ... 10 more
treken@linuxmint ~ $

Comment by xcl...@gmail.com, Jun 15, 2011

I get the following error when I try to recompile my app's unchanged apk file:

I: Checking whether sources has changed... I: Smaling... Exception in thread "main" java.lang.NullPointerException?

at org.jf.util.PathUtil?.getRelativeFile(PathUtil?.java:44) at org.jf.smali.smaliFlexLexer.getSourceName(smaliFlexLexer.java:2569) at org.jf.smali.smaliFlexLexer.getErrorHeader(smaliFlexLexer.java:2661) at org.jf.smali.smaliFlexLexer.nextToken(smaliFlexLexer.java:2530) at org.antlr.runtime.CommonTokenStream?.fillBuffer(CommonTokenStream?.java
:119)
at org.antlr.runtime.CommonTokenStream?.LT(CommonTokenStream?.java:238) at org.jf.smali.smaliParser.smali_file(smaliParser.java:430) at brut.androlib.mod.SmaliMod?.assembleSmaliFile(SmaliMod?.java:71) at brut.androlib.src.DexFileBuilder?.addSmaliFile(DexFileBuilder?.java:43)

at brut.androlib.src.DexFileBuilder?.addSmaliFile(DexFileBuilder?.java:33)
at brut.androlib.src.SmaliBuilder?.buildFile(SmaliBuilder?.java:64) at brut.androlib.src.SmaliBuilder?.build(SmaliBuilder?.java:48) at brut.androlib.src.SmaliBuilder?.build(SmaliBuilder?.java:35) at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222) at brut.androlib.Androlib.buildSources(Androlib.java:179) at brut.androlib.Androlib.build(Androlib.java:170) at brut.androlib.Androlib.build(Androlib.java:154) at brut.apktool.Main.cmdBuild(Main.java:174) at brut.apktool.Main.main(Main.java:59)

My app was made in App Inventor, which requires me to modify the android_manifest.xml before I can submit it into the market. Unfortunately, I don't have any option to do it before the app gets compiled in the first place, so I used apktool to decompile it, mod the xml and recompile it in order to submit it to the market. I get the same error regardless if I made changes to the xml or left it untouched.

Comment by ben...@gmail.com, Jun 29, 2011

I get no errors from apktool, but on my Droid 2 I get "Application not installed" even without changing a thing in "Digital Speedometer"

Comment by MailKont...@gmail.com, Sep 28, 2011

Tried to reverse Google Maps: I: Baksmaling... I: Loading resource table... Exception in thread "main" brut.androlib.AndrolibException?: Multiple resources: spec=0x7f090033 dimen/da_destination_act ivity_btn_size, config=-v13

at brut.androlib.res.data.ResConfig?.addResource(ResConfig?.java:65) at brut.androlib.res.data.ResConfig?.addResource(ResConfig?.java:58) at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196) at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165) at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130) at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105) at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82) at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48) at brut.androlib.res.AndrolibResources?.getResPackagesFromApk(AndrolibResources?.java:315) at brut.androlib.res.AndrolibResources?.loadMainPkg(AndrolibResources?.java:50) at brut.androlib.res.AndrolibResources?.getResTable(AndrolibResources?.java:43) at brut.androlib.Androlib.getResTable(Androlib.java:44) at brut.androlib.ApkDecoder?.getResTable(ApkDecoder?.java:148) at brut.androlib.ApkDecoder?.decode(ApkDecoder?.java:98) at brut.apktool.Main.cmdDecode(Main.java:120) at brut.apktool.Main.main(Main.java:57)

Maybe it is just some kind of protection?

Comment by b3c2e...@gmail.com, Nov 18, 2011

I use apktool 1.4.1 to decode this apk file and failed. (http://softfile.3g.qq.com:8080/msoft/179/1104/41730/qqbrowser2.7(android)_build0175.apk)

the error desp is:

I: Baksmaling... I: Loading resource table... I: Loaded. I: Loading resource table from file: C:\Documents and Settings\me\apktoo l\framework\1.apk I: Loaded. I: Decoding file-resources... I: Decoding values/ XMLs... Exception in thread "main" java.lang.StringIndexOutOfBoundsException?: String ind ex out of range: 29

at java.lang.String.charAt(Unknown Source) at brut.androlib.res.xml.ResXmlEncoders?.findNonPositionalSubstitutions(R
esXmlEncoders.java:165)
at brut.androlib.res.xml.ResXmlEncoders?.hasMultipleNonPositionalSubstitu
tions(ResXmlEncoders?.java:138)
at brut.androlib.res.data.value.ResStringValue?.serializeExtraXmlAttrs(Re
sStringValue.java:63)
at brut.androlib.res.data.value.ResScalarValue?.serializeToResValuesXml(R
esScalarValue.java:65)
at brut.androlib.res.AndrolibResources?.generateValuesFile(AndrolibResour?
ces.java:264)
at brut.androlib.res.AndrolibResources?.decode(AndrolibResources?.java:137
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93) at brut.androlib.ApkDecoder?.decode(ApkDecoder?.java:98) at brut.apktool.Main.cmdDecode(Main.java:120) at brut.apktool.Main.main(Main.java:57)

Comment by s...@google.com, Apr 4, 2012

If you get a "Application not installed" error you can use "ZipSigner? 2" on your phone to sign your app. This should fix the problem.


Sign in to add a comment
Powered by Google Project Hosting