Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errore rebuilding framework-ext-res #1194

Closed
realtebo opened this issue Mar 16, 2016 · 3 comments
Closed

Errore rebuilding framework-ext-res #1194

realtebo opened this issue Mar 16, 2016 · 3 comments

Comments

@realtebo
Copy link

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_5531583752897228871.tmp, p, --forced-package-id, 16, --rename-manifest-package, com.miui.rom, --version-code, 1010000, --version-name, 1.1.0.0, -F, /tmp/APKTOOL5294665086643668699.tmp, -x, -0, arsc, -0, arsc, -I, /root/apktool/framework/1.apk, -I, /root/apktool/framework/16.apk, -S, /home/realtebo/apk/framework-ext-res/res, -M, /home/realtebo/apk/framework-ext-res/AndroidManifest.xml]
    at brut.androlib.Androlib.buildResourcesFull(Androlib.java:433)
    at brut.androlib.Androlib.buildResources(Androlib.java:371)
    at brut.androlib.Androlib.build(Androlib.java:281)
    at brut.androlib.Androlib.build(Androlib.java:254)
    at brut.apktool.Main.cmdBuild(Main.java:224)
    at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_5531583752897228871.tmp, p, --forced-package-id, 16, --rename-manifest-package, com.miui.rom, --version-code, 1010000, --version-name, 1.1.0.0, -F, /tmp/APKTOOL5294665086643668699.tmp, -x, -0, arsc, -0, arsc, -I, /root/apktool/framework/1.apk, -I, /root/apktool/framework/16.apk, -S, /home/realtebo/apk/framework-ext-res/res, -M, /home/realtebo/apk/framework-ext-res/AndroidManifest.xml]
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:433)
    at brut.androlib.Androlib.buildResourcesFull(Androlib.java:419)
    ... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_5531583752897228871.tmp, p, --forced-package-id, 16, --rename-manifest-package, com.miui.rom, --version-code, 1010000, --version-name, 1.1.0.0, -F, /tmp/APKTOOL5294665086643668699.tmp, -x, -0, arsc, -0, arsc, -I, /root/apktool/framework/1.apk, -I, /root/apktool/framework/16.apk, -S, /home/realtebo/apk/framework-ext-res/res, -M, /home/realtebo/apk/framework-ext-res/AndroidManifest.xml]
    at brut.util.OS.exec(OS.java:95)
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:427)
    ... 6 more

I'm using latest DEV of apktool.jar, build from github source.

ì'm not able to understand what's the source of this problem...

My sequence of work is this:

cd ~/apk
sudo rm * -rf 
cp ~/Scaricati/cancro/system/framework/framework-ext-res/framework-ext-res.apk .
cp ~/Scaricati/cancro/system/framework/framework-res.apk .
sudo apktool if framework-res.apk 
sudo apktool if framework-ext-res.apk
sudo apktool d framework-res.apk 
sudo apktool d framework-ext-res.apk 
sudo rm framework-res.apk 
sudo rm framework-ext-res.apk 
sudo apktool b framework-res 
sudo apktool b framework-ext-res 

I've this errors in the last step, with framework-ext-res.

What am I doing wrong?

NOTE: i've not deodexed this apks
NOTE 2: these file came from an Android 6.0.1 ROM

@iBotPeaches
Copy link
Owner

If you have no actual error (just aapt crashing), then this is usually a problem outside of Apktool's control. You can try build with -v for verbose mode and see if aapt list the crash.

Or you can upload both frameworks and let me take a peek.

@realtebo
Copy link
Author

I don't know what aapt is. Sorry.

I'm using your tool as listed above. Fully in manual mode. just to learn, for now. I'm doing experimenting starting from en/cn dev rom of xiaomi Mi 4 with Android 6.0.1.

I'm attaching the 2 files I'm trying to decompile and rebuild. Note that actually I've NOT modified the file before rebuilding.

I attach another file, miui.apk, because I thinks it's needed .
I've tried to install even this before build framework-res and framework-ext-res but no success, same error. Probably it's something of stupid of it's realted this tool , aapt that I didn't know.

Thanks a lot for helping me.

Three_apk_for_github.tar.gz

@iBotPeaches
Copy link
Owner

➜  Bug1194 for file in *.apk; do apktool if $file -t 1194; done;
I: Decoding Shared Library (miui), pkgId: 16
I: Framework installed to: /home/ibotpeaches/apktool/framework/17-1194.apk
I: Framework installed to: /home/ibotpeaches/apktool/framework/1-1194.apk
I: Decoding Shared Library (androidhwext), pkgId: 15
I: Framework installed to: /home/ibotpeaches/apktool/framework/16-1194.apk
➜  Bug1194 apktool d framework-res.apk -t 1194
I: Using Apktool 2.1.0-5c7702-SNAPSHOT on framework-res.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  Bug1194 apktool d framework-ext-res.apk -t 1194
I: Using Apktool 2.1.0-5c7702-SNAPSHOT on framework-ext-res.apk
I: Loading resource table...
I: Decoding Shared Library (miui), pkgId: 16
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/apktool/framework/1-1194.apk
I: Loading resource table from file: /home/ibotpeaches/apktool/framework/16-1194.apk
I: Decoding Shared Library (androidhwext), pkgId: 15
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  Bug1194 apktool b framework-res
I: Using Apktool 2.1.0-5c7702-SNAPSHOT
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'allow_button' has no default translation.
W: warning: string 'deny_button' has no default translation.
W: warning: string 'other_permissions' has no default translation.
W: warning: string 'permdesc_authenticateAccounts' has no default translation.
W: warning: string 'permdesc_clearAppCache' has no default translation.
W: warning: string 'permdesc_manageAccounts' has no default translation.
W: warning: string 'permdesc_manageAppTokens' has no default translation.
W: warning: string 'permdesc_setProcessLimit' has no default translation.
W: warning: string 'permdesc_shutdown' has no default translation.
W: warning: string 'permdesc_signalPersistentProcesses' has no default translation.
W: warning: string 'permgroupdesc_accounts' has no default translation.
W: warning: string 'permgrouplab_accounts' has no default translation.
W: warning: string 'permission_remember_choice' has no default translation.
W: warning: string 'permission_title' has no default translation.
W: warning: string 'permlab_authenticateAccounts' has no default translation.
W: warning: string 'permlab_bindPackageVerifier' has no default translation.
W: warning: string 'permlab_manageAccounts' has no default translation.
W: warning: string 'permlab_performCdmaProvisioning' has no default translation.
W: warning: string 'permlab_runSetActivityWatcher' has no default translation.
W: warning: string 'permlab_setProcessLimit' has no default translation.
W: warning: string 'permlab_useCredentials' has no default translation.
I: Building apk file...
I: Copying unknown files/dir...
➜  Bug1194 apktool b framework-ext-res

Didn't have any errors until framework-ext-res, which since this is MIUI is a duplicate of #806

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants