kuter007 / android-apktool

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

Problem compiling MIUI v6 System-APKs #697

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Decompile an APK from latest MIUI v6 for Xiaomi Mi2s aries.
2. keep it unchanged or change something (doesnt care)
3. Recompile ( ERROR )!

What is the expected output? What do you see instead?

I expect the compilation to work, but I get following error:

Exception in thread "main" brut.androlib.AndrolibException: 
brut.androlib.AndrolibException: brut.common.BrutException: could not exec 
command: [/tmp/brut_util_Jar_5372673428512891488.tmp, p, --forced-package-id, 
127, --min-sdk-version, 16, --target-sdk-version, 19, --version-code, 500090, 
--version-name, MIUI_V6_小米内置版_20141027_b2, -F, 
/tmp/APKTOOL5113948002093632877.tmp, -0, arsc, -I, 
/root/apktool/framework/1.apk, -I, /root/apktool/framework/8.apk, -S, 
/mnt/hgfs/R/test/Email/res, -M, /mnt/hgfs/R/test/Email/AndroidManifest.xml]
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:449)
        at brut.androlib.Androlib.buildResources(Androlib.java:383)
        at brut.androlib.Androlib.build(Androlib.java:286)
        at brut.androlib.Androlib.build(Androlib.java:258)
        at brut.apktool.Main.cmdBuild(Main.java:240)
        at brut.apktool.Main.main(Main.java:89)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could 
not exec command: [/tmp/brut_util_Jar_5372673428512891488.tmp, p, 
--forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 19, 
--version-code, 500090, --version-name, MIUI_V6_小米内置版_20141027_b2, 
-F, /tmp/APKTOOL5113948002093632877.tmp, -0, arsc, -I, 
/root/apktool/framework/1.apk, -I, /root/apktool/framework/8.apk, -S, 
/mnt/hgfs/R/test/Email/res, -M, /mnt/hgfs/R/test/Email/AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:487)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:434)
        ... 5 more
Caused by: brut.common.BrutException: could not exec command: 
[/tmp/brut_util_Jar_5372673428512891488.tmp, p, --forced-package-id, 127, 
--min-sdk-version, 16, --target-sdk-version, 19, --version-code, 500090, 
--version-name, MIUI_V6_小米内置版_20141027_b2, -F, 
/tmp/APKTOOL5113948002093632877.tmp, -0, arsc, -I, 
/root/apktool/framework/1.apk, -I, /root/apktool/framework/8.apk, -S, 
/mnt/hgfs/R/test/Email/res, -M, /mnt/hgfs/R/test/Email/AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:89)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:481)
        ... 6 more

Erroc occurs on most System APKs of MIUI v6 for Mi2, but not on all!

What version of the product are you using? On what operating system?
Im using latest apktool.jar, built it myself using git clone yesterday !

Tested on:
Ubuntu 14.04 x64 java version "1.7.0_65"
Ubuntu 14.04 x32 java version "1.7.0_65"
Windows 8.1 x64

Please provide any additional information below.

Original issue reported on code.google.com by subbersh...@googlemail.com on 6 Nov 2014 at 9:57

GoogleCodeExporter commented 9 years ago
Please upload a bundle of MIUI frameworks and associated apks. I can't verify / 
test what I don't have :)

Original comment by connor.tumbleson on 6 Nov 2014 at 10:31

GoogleCodeExporter commented 9 years ago
I install following as framework:
miui.apk
MiuiFramework.apk
framework-res.apk
framework-ext-res.apk

Original comment by subbersh...@googlemail.com on 7 Nov 2014 at 7:37

Attachments:

GoogleCodeExporter commented 9 years ago
AMAPNetworkLocation recompiling works !!!
AntiSpam.apk recompiling throws the ERROR
Email.apk recompiling throws the ERROR

Original comment by subbersh...@googlemail.com on 7 Nov 2014 at 7:38

Attachments:

GoogleCodeExporter commented 9 years ago
I think I got another hint, it seems that all APK to a specific filesize (~ 350 
kb) work!
Bigger APKs get the compilation error ...

My java command is java -jar /usr/local/bin/apktool.jar b -f APKFILE

Original comment by subbersh...@googlemail.com on 7 Nov 2014 at 8:00

GoogleCodeExporter commented 9 years ago
Do you have an idea what could cause the problem ?

Original comment by subbersh...@googlemail.com on 12 Nov 2014 at 1:26