desword / android-apktool

Automatically exported from code.google.com/p/android-apktool
Other
1 stars 0 forks source link

Dropbox APK file cannot be disassembled and reassembled unchanged #594

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download dropbox application and then pull from device (cannot attach here, 
it exceeds 10MB). Package name is com.dropbox.android

2. Disassemble application with apktool

3. Attempt to reassemble application (without making any changes) using apktool

What is the expected output?
I expect it to compile without issue.

What do you see instead?
Error about the AndroidManifest key

What version of the product are you using? Latest apktool
On what operating system? Linux CentOS 64bit

Please provide any additional information below.

This is the error I get:

/root/src/ease/android/lib/wrapping/dev/normal/AndroidManifest.xml:33: error: 
No resource identifier found for attribute 'requiredAccountType' in package 
'android'
Exception in thread "main" brut.androlib.AndrolibException: 
brut.androlib.AndrolibException: brut.common.BrutException: could not exec 
command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 18, -F, 
/tmp/APKTOOL3774298477857351130.tmp, -0, arsc, -I, 
/root/apktool/framework/1.apk, -S, 
/root/src/ease/android/lib/wrapping/dev/normal/res, -M, 
/root/src/ease/android/lib/wrapping/dev/normal/AndroidManifest.xml]
    at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
    at brut.androlib.Androlib.buildResources(Androlib.java:283)
    at brut.androlib.Androlib.build(Androlib.java:206)
    at brut.androlib.Androlib.build(Androlib.java:176)
    at brut.apktool.Main.cmdBuild(Main.java:228)
    at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could 
not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 18, 
-F, /tmp/APKTOOL3774298477857351130.tmp, -0, arsc, -I, 
/root/apktool/framework/1.apk, -S, 
/root/src/ease/android/lib/wrapping/dev/normal/res, -M, 
/root/src/ease/android/lib/wrapping/dev/normal/AndroidManifest.xml]
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
    at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
    ... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, 
--min-sdk-version, 14, --target-sdk-version, 18, -F, 
/tmp/APKTOOL3774298477857351130.tmp, -0, arsc, -I, 
/root/apktool/framework/1.apk, -S, 
/root/src/ease/android/lib/wrapping/dev/normal/res, -M, 
/root/src/ease/android/lib/wrapping/dev/normal/AndroidManifest.xml]
    at brut.util.OS.exec(OS.java:89)
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
    ... 6 more

When I manually modify AndroidManifest.xml after decompilation to remove the 
XML attribute requiredAccountType, and then rebuild, it works fine. I don't 
know what the repercussion of removing this attribute is, however. Ideally the 
app shouldn't need to be modified at all.

Original issue reported on code.google.com by jsei...@apperian.com on 21 Jan 2014 at 8:18

GoogleCodeExporter commented 9 years ago
FrameworkFiles

http://pastebin.com/2jgKhVMy

Newer frameworks contain information about new manifest attributes. The newest 
on in 2.x source contains this. You may install this framework 
(https://github.com/iBotPeaches/Apktool/commit/9a31c135ac532bd96eab3afadef71714e
d978acf) via apktool if android-framework.jar, on oldest versions and it might 
work.

Original comment by connor.tumbleson on 22 Jan 2014 at 12:27