Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[TRICK] Compile with apktool on ubuntu linux without getting errors

$
0
0
This "trick" is for people on ubuntu linux that are trying to use apktool, and getting some errors.
if you can correctly decompile but when trying to compile you get this error

Code:

W: Could not find sources
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/APKTOOL2420487276909255487.tmp, -x, -I, /home/chris/apktool/framework/1.apk, -S, /home/chris/Desktop/xres/res, -M, /home/chris/Desktop/xres/AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
        at brut.androlib.Androlib.buildResources(Androlib.java:248)
        at brut.androlib.Androlib.build(Androlib.java:171)
        at brut.androlib.Androlib.build(Androlib.java:154)
        at brut.apktool.Main.cmdBuild(Main.java:182)
        at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2420487276909255487.tmp, -x, -I, /home/chris/apktool/framework/1.apk, -S, /home/chris/Desktop/xres/res, -M, /home/chris/Desktop/xres/AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:87)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
        ... 6 more
Caused by: java.io.IOException: Cannot ru..
BLABLABLA

You just have to type in the terminal
Code:

sudo apt-get install ia32-libs
in fact, this problem is related to aapt not being correclty installed.
to check if apktool is not working because of this, you can type in the terminal: aapt
if you are missing ia32-libs you'll get something like: bash: /usr/local/bin/aapt No such file or directory
otherwise you'll get a bunch of stuff related to aapt options.

my os is ubuntu 12.04 x64.

If you are looking for a complete guide, i recommend to refer to this
http://forum.xda-developers.com/show....php?t=1814441

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>