yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Gunthermic:
Touchwiz

I am trying to figure if there is a solution. When decompiling Touchwiz apk's. (framework/tw-framework are loaded) and using 1.4.8 through 1.5.1 apktool. when decompiling apk'. the drawables.xml is being filled with apktool_dummy for 80% of what is suppose to be var for images.

Is there a fix? or solution to this?

is this cuased because apktool.jar doesn't know how to interpet drawables.xml from Touchwiz?
[Android Software Development] iBotPeaches:
I've fixed the .r.9.png problem: https://github.com/iBotPeaches/Apktool/commit/7fe733bf43461ba81bba5b81b0eb9531dc485ba7

I don't have a single HTC device though to test if it'll work out, it was just a bad renaming part of apktool.
[Android Software Development] nick1313:
I saw that in your code about fixing it, how did you fix it if you don't mind me asking.

The way I've been able to get around the .r.9's is when decompiling I do this.

apktool d -r blahblah.apk

Then I just build it like normal. It leaves all the .r.9's in place and doesn't mess them up. However doing it this way, you don't get to edit any of the values folders but if you aren't messing with xml in there it's not a big deal. If I have to edit xml's then I just build the apk and use 7zip to copy the original back into the modded and then rename it by taking out the .r's so it matches the public xml. Hope that makes sense.

So your fix allows you to decompile normally? If so that's great, I have an HTC Evo LTE if you would like me to test. If not...I'll just wait for 1.5.2 ;)
[Android Software Development] adonix:
I'm facing errors with com.htc.resources.apk using apktool 1.5.1. I even compiled the 1.5.2 but same errors.

Lots of people are saying that there errors aren't a problem, however, this is not the case here. It seems that the app isn't extracting correctly xhdpi png files.

I have decompiled then recompiled without any changes SystemUI_F1.apk but after comparing extracted APK file, some xhdpi files have incorrect sizes.

Furthermore, i tried the same with a modded SystemUI_F2.apk file and it was worst since lots of png images were corrupt and some of them were missing from the new built apk.

I have uploaded these files for you to check.

https://dl.dropbox.com/u/106007099/Files.7z

Thanks
[Android Software Development] Ronald Rosanes:
need a help here...

i'm editing an app(not a system app) ,.i able to decompile it without any error ,. and i just edit the images and then recompile it without errors..

but when i install it ,. it says "App cannot be installed!"

i also noticed that when i recompile it the result apk is much small than the original apk file,.about 50-70 bytes ,.

,.and i tested it too without editing images or any codes ,.just decompile it and recompile but the app still smaller bytes than the original apk file

what should i do here,.it didn't prompted me any error :( HELP!

Thanks
[Android Software Development] Lozone:
Re: [UTIL][Dec 28 2012] Apktool v1.5.1 - a tool for reverse engineering apk files

Did you sign the apk?

Sent from my One S using DroiDevs Premium Plus 2
[Android Software Development] Ronald Rosanes:
not yet,.can you tell me how to do that?
[Android Software Development] 3rdstring:
ZipSigner 2
[Android Software Development] djmatt604:
Re: [UTIL][Dec 28 2012] Apktool v1.5.1 - a tool for reverse engineering apk files

SignAPK works well too

Sent from my Infamous Tab.
[Android Software Development] iBotPeaches:
After you decompile it. Can you post the apktool.yml here? The package should of been auto re-named, but it seems in your case it didn't. So the apktool.yml will share why this problem occurred.

As for the personalization. I have no clue. I would need logcat, or more details. I need stack traces (posted on pastebin), please :)
[Android Software Development] ohlin5:
Sure thing will post apktool.yml when I get back later tonight. Noob question here though -how do I go about getting the stacks? Thanks again!

EDIT: Here is a what the apktool.yml file contains:

version: 1.5.1

apkFileName: swiftkey3.apk

isFrameworkApk: false

usesFramework:

ids:

- 1

sdkInfo:

minSdkVersion: '7'

targetSdkVersion: '15'

packageInfo:

cur_package: android

orig_package: com.touchtype.swiftkey

I'm assuming you figured it out, but when I go to compile it does say "Checking whether sources has changed; Checking whether resources has changed; & Building resources", but after that all the errors pop up.

Also, I'll wait for an answer as to what you see here before I worry about the stack traces, because I'm wondering if somehow me changing the AndroidManifest to get it to compile screwed something up. Thanks!
[Android Software Development] wcoast:
Any happy on how to fix this guys

C:\apktools>cmd
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\apktools>java -jar apktool.jar if framework-res.apk
I: Framework installed to: C:\Users\Windows\apktool\framework\1.apk

C:\apktools>java -jar apktool.jar d SystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Windows\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
S: Could not decode file, replacing by FALSE value: drawable-xhdpi/stat_sys_wifi
_in.png
S: Could not decode file, replacing by FALSE value: drawable-xhdpi/stat_sys_wifi
_inout.png
S: Could not decode file, replacing by FALSE value: drawable-xhdpi/stat_sys_wifi
_out.png
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...

C:\apktools>
[Android Software Development] adulfo:
I f you can recompile it properly then no problem. I think the 3 errors there are .9.png images which are not properly decoded.. If that is not .9.png then you can replace those with simply a .png files.
[Android Software Development] Ronald Rosanes:
THANK YOU VERY MUCH! :victory:
[Android Software Development] Gunthermic:
Any answers or solutions to this problem?
[Android Software Development] raziel23x:
rename this to apktool.jar

I compiled it without proguard with ibots latest github and with proguard

as the progruard version is more then half the size of the none progruard versions so see if that helps
[Android Software Development] nick1313:
Re: [UTIL][Dec 28 2012] Apktool v1.5.1 - a tool for reverse engineering apk files

It looks like it built it, no? Just delete all the folders with the errors, they are just language folders.
[Android Software Development] c_shekhar:
Great Thread.....
[Android Software Development] ÜBER™:
It did build, but it didn't work.. at least from what my buddy told me. He wanted me to theme it for him and i sent it back to him compiled and it didnt work. :confused: ill try deleting the languauge files.. and see what happens thanks.
[Android Software Development] iBotPeaches:
Re: [UTIL][Dec 28 2012] Apktool v1.5.1 - a tool for reverse engineering apk files

That won't change anything. No offense, but that response was completely wrong. Those are value elements that are present in some values-xx folder but not in the main folder (values) which is why you get the non default translation warning. Which means the only thing deletion will get you is a smaller apk with only English since it seems the extra translations warnings are in every other language.
[Android Software Development] iBotPeaches:
Re: [UTIL][Dec 28 2012] Apktool v1.5.1 - a tool for reverse engineering apk files

If the current package is android, but it must be renamed to com.touchtype. Then SwiftKey must have a modified aapt, because we check the manifest and see if it matches the ResPackage. Or it could have 2 packages within the apk, which I've only seen present in some old school froyo days aosp apks and some htc ones. The current protocol is to ignore the 2nd package which could be possible.

I have SwiftKey just haven't bothered to decompile it. I'll look at it some time next week.
[Android Software Development] ohlin5:
Ok thanks for the response! I'll wait and see what you figure out from your swiftkey decompile. As I said before I'm very new to this, but really want to learn, so the clearer you can explain things the better :)

Anyways, I've been messing around with it in the meantime and here's some more information I have figured out: If I rename every instance of "http://schemas.android.com/apk/res/com.touchtype" to "http://schemas.android.com/apk/res/com.touchtype.swiftkey" in every .xml file in the "res" folder, the app compiles and installs fine. This also fixes the personalization issues I was experiencing, however, after the initial install the settings menu can no longer be accessed --- the main page will open when SwiftKey is chosen from the app drawer, but clicking on most of the choices will cause the app to FC. I'll eagerly await any info, and thanks again!
[Android Software Development] nick1313:
Re: [UTIL][Dec 28 2012] Apktool v1.5.1 - a tool for reverse engineering apk files

Did you sign the apk before sending it to him?

No offense taken at all, appreciate the explanation and clarification. However I've solved many of those goofy errors by deleting the langs from the apk and had no ill effect on the rom. That I have seen, anyway. I might have to delete a couple lines from public xml but it usually works. Ill have to pay close attention to see if I have any problems later.

Is there a way to fix those errors or just don't worry bout it since it built?
[Android Software Development] masterk123:
Vodafone Thuis TV

Guys,

I'm going CRAZY

i just don't understand the F*ing APK from vodafone NL..

Decompressing and recompressing gives this error:

C:\>apktool b ThuisTV
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
C:\\ThuisTV\res\values\styles.xml:40: error: Error retrieving parent for item: No resource found that matches the given name 'ThuisTV.Gids'.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 13, --target-sdk-version, 1
3, --max-sdk-version, 13, -F, C:\Users\Theun\AppData\Local\Temp\APKTOOL1241652872994521538.tmp, -I, C:\Users\Theun\apktool\framework\1.apk, -S, C:\\ThuisTV\res, -M, C:\\ThuisTV\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:357)
at brut.androlib.Androlib.buildResources(Androlib.java:282)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:218)
at brut.apktool.Main.main(Main.java:74)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 13, --target-sdk-version, 13, --max-sdk-version, 13, -F, C:\Users\Theun\AppD
ata\Local\Temp\APKTOOL1241652872994521538.tmp, -I, C:\Users\Theun\apktool\framework\1.apk, -S, C:\\ThuisTV\res, -M, C:\\ThuisTV\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:349)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:335)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 13, --target-sdk-version, 13, --max-sdk-version, 13, -F, C:\Users\Theun\AppData\Local\Temp\APKTOOL12416528729
94521538.tmp, -I, C:\Users\Theun\apktool\framework\1.apk, -S, C:\\ThuisTV\res, -M, C:\\ThuisTV\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:347)
... 6 more

Anybody wants to help me out here?

APK: http://www.2shared.com/file/J06x3pz9/ThuisTV.html

Styles: http://www.2shared.com/document/sYPjLR14/styles.html
[Android Software Development] iBotPeaches:
Re: [UTIL][Dec 28 2012] Apktool v1.5.1 - a tool for reverse engineering apk files

Post your styles.xml or the apk. You probably just need a blank main style before it as the parent doesn't have it. I need more research to fix this problem as styles is such a robust and very powerful part of an apk.
[Android Software Development] masterk123:
Here ya go (the above post)

---------- Post added at 04:50 PM ---------- Previous post was at 04:34 PM ----------

by the way, the whole reason why i'm doing this is that the app checks resolution.

it needs 1280x800, and allmost all latest samsungs (like note2) have 800x1280.(the app thinks).

So if anyone knows how to disable that check, that would be nice too!:D
[Android Software Development] mattmanwrx:
Re: [UTIL][Dec 28 2012] Apktool v1.5.1 - a tool for reverse engineering apk files

W stands for warnings, if you see at the end, the frameworks was installed properly...
[Android Software Development] bgcngm:
In this particular case (com.htc.resources.apk) it installs properly but all the .apks that rely on that framework will be broken after re-compile. It's a known issue.
[Android Software Development] jakTomas:
i decompiled my phone.apk and it worked well ,, now i want to compile it ( apktool b <name of the folder > ) and i get this error
[Android Software Development] RomWiz:
Sv: [UTIL][Dec 28 2012] Apktool v1.5.1 - a tool for reverse engineering apk files

Write

apktool b phone phone.apk

Or Apktool b phone c:/path/phone.apk

Regards
[Android Software Development] RomWiz:
Sv: [UTIL][Dec 28 2012] Apktool v1.5.1 - a tool for reverse engineering apk files

Remove. ./phone

Regards
[Android Software Development] jakTomas:
why remove it ,, its the folder i want my decompiled apk to be in
[Android Software Development] bgcngm:
Because the syntax is incorrect. If you are using Windows it should be .\Phone, however if you remove it, the .apk will still be decompiled into that folder because Phone is the filename.
[Android Software Development] jisharka:
Why error when decompiling JB 4.1.2 apks?

I was trying to decompile mu SystemUI.apk, secphone.apk but many error message coming... not compatible with 4.1.2?
[Android Software Development] iBotPeaches:
See bolded point.
[Android Software Development] jisharka:
Please find the log..

C:\Android\apktool>apktool b systemui systemui.apk

W: Could not find sources

I: Checking whether resources has changed...

I: Building resources...

invalid resource directory name: C:\Android\apktool\ad\res/drawable-sw360dp-xhdp

i

invalid resource directory name: C:\Android\apktool\ad\res/drawable-sw600dp

invalid resource directory name: C:\Android\apktool\ad\res/drawable-sw600dp-xhdp

i

invalid resource directory name: C:\Android\apktool\ad\res/drawable-sw720dp-xhdp

i

invalid resource directory name: C:\Android\apktool\ad\res/drawable-sw800dp-xhdp

i

invalid resource directory name: C:\Android\apktool\ad\res/layout-sw600dp

invalid resource directory name: C:\Android\apktool\ad\res/layout-sw720dp

invalid resource directory name: C:\Android\apktool\ad\res/layout-sw800dp

invalid resource directory name: C:\Android\apktool\ad\res/values-sw360dp

invalid resource directory name: C:\Android\apktool\ad\res/values-sw360dp-xhdpi

invalid resource directory name: C:\Android\apktool\ad\res/values-sw600dp

invalid resource directory name: C:\Android\apktool\ad\res/values-sw600dp-land

invalid resource directory name: C:\Android\apktool\ad\res/values-sw600dp-port

invalid resource directory name: C:\Android\apktool\ad\res/values-sw720dp

invalid resource directory name: C:\Android\apktool\ad\res/values-sw720dp-port

invalid resource directory name: C:\Android\apktool\ad\res/values-sw800dp

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl

ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-

sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\EGHYSFRH\AppData\Local\T

emp\APKTOOL267894828036863279.tmp, -I, C:\Users\EGHYSFRH\apktool\framework\1.apk

, -S, C:\Android\apktool\ad\res, -M, C:\Android\apktool\ad\AndroidManifest.xml]

at brut.androlib.Androlib.buildResourcesFull(Androlib .java:357)

at brut.androlib.Androlib.buildResources(Androlib.jav a:282)

at brut.androlib.Androlib.build(Androlib.java:205)

at brut.androlib.Androlib.build(Androlib.java:176)

at brut.apktool.Main.cmdBuild(Main.java:218)

at brut.apktool.Main.main(Main.java:74)

Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not

exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:

\Users\EGHYSFRH\AppData\Local\Temp\APKTOOL26789482 8036863279.tmp, -I, C:\Users\E

GHYSFRH\apktool\framework\1.apk, -S, C:\Android\apktool\ad\res, -M, C:\Android\a

pktool\ad\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.jav

a:349)

at brut.androlib.Androlib.buildResourcesFull(Androlib .java:335)

... 5 more

Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd

k-version, 16, --target-sdk-version, 16, -F, C:\Users\EGHYSFRH\AppData\Local\Tem

p\APKTOOL267894828036863279.tmp, -I, C:\Users\EGHYSFRH\apktool\framework\1.apk,

-S, C:\Android\apktool\ad\res, -M, C:\Android\apktool\ad\AndroidManifest.xml]

at brut.util.OS.exec(OS.java:89)

at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.jav

a:347)

... 6 more
[Android Software Development] jakTomas:
same problem with .\phone and without it
[Android Software Development] RomWiz:
Sv: [UTIL][Dec 28 2012] Apktool v1.5.1 - a tool for reverse engineering apk files

You have the required framework files installed?

If there is 2 apk files in framework folder take them. And also SystemUI.apk

Regards
[Android Software Development] purian23:
Hello IBotPeaches, I am on 1.4.9 an am getting the following error during a systemui decompile. I am also unablet to compile as well. Do you mind taking a look to see what's going on. I am on Windows 7 if that helps. Thank you!!!

http://dl.dropbox.com/u/7626205/APK-Multi-Tool.log
[Android Software Development] furniel:
Install framework-res.apk from your rom (java -jar apktool.jar if framework-res.apk). Thats not apktool bug.
[Android Software Development] raziel23x:
O

I had him do that before having him come here
[Android Software Development] KangKilla:
English... please?
[Android Software Development] furniel:
That`s strange. It would be interesting look on this systemui & framework-res.
[Android Software Development] raziel23x:
Yes before I had him install the frameworks SMS systemui he was getting a totally different set of errors
[Android Software Development] reosm:
phone.apk

contacts.apk

recompile error

windows aapt.exe download ?
[Android Software Development] raziel23x:
aapt.exe ours apart of the Android SDK.
[Android Software Development] iBotPeaches:
That is definitely fixed in v1.4.9. Which I'm releasing in about 1 hour.
[Android Software Development] iBotPeaches:
v1.4.9 (Released July 28 – 2012) Codename: russia

Fix for plurals.xml (Thanks @miuirussia)

Added xxhdpi

Added uimodes for MIUI built roms

Fixed problems resulting with bad ‘ and what not

As for the SystemUI error reported a few posts ago. This is still unfixed. I am still working on fixing it. Enjoy the release.

For users on Linux. I have an aapt file that should fix lots of directory errors. Xiaomi (Makers of MIUI) provided us with this aapt file, so there currently isn't any windows aapt.

aapt: http://miui.connortumbleson.com/other/apktool/aapt/aapt
[Android Software Development] raziel23x:
does this release fix all the extra white spaces in the xml files
[Android Software Development] iBotPeaches:
Yes. Even though I think that only affected the manifest.
[Android Software Development] raziel23x:
No it affected all xml files as I had to manually delete all white spaces from 30 xml fours from my test case apk i created for the purpose of stress testing your apktool
[Android Software Development] xdevilium:
Now these are the errors i get :(

xdevilium@xdevilium-Calistoga-ICH7M-Chipset:~/apktool$ java -jar apktool.jar b framework-res
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/APKTOOL4370782711491997978.tmp, -x, -S, /home/xdevilium/apktool/framework-res/res, -M, /home/xdevilium/apktool/framework-res/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:251)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:325)
at brut.androlib.Androlib.buildResources(Androlib.java:270)
at brut.androlib.Androlib.build(Androlib.java:193)
at brut.androlib.Androlib.build(Androlib.java:175)
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/APKTOOL4370782711491997978.tmp, -x, -S, /home/xdevilium/apktool/framework-res/res, -M, /home/xdevilium/apktool/framework-res/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:249)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at java.lang.Runtime.exec(Runtime.java:615)
at java.lang.Runtime.exec(Runtime.java:483)
at brut.util.OS.exec(OS.java:78)
... 7 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
... 10 more
[Android Software Development] iBotPeaches:
Please read the error before posting it here. That error clearly says aapt cannot be run. That is not caused by apktool.

chmod a+x aapt

These errors tell you the problem and how to fix it -_-

Sent from my SGS3 AT&T Variant
[Android Software Development] xdevilium:
Sorry, I'm just learning linux and all :p

Edit: Still the same errors... When i run ./aapt i can execute it just fine...?

Edit2: Problem solved :D Just needed to add the path :D
[Android Software Development] reosm:
Do you have the corrected version windows aapt.exe ?
[Android Software Development] iBotPeaches:
No, as I didn't create the modified aapt I have no way to modify it for Windows support. As of now there is only a Linux updated aapt.
[Android Software Development] reosm:
thanks
[Android Software Development] jakTomas:
i'm using it to edit xml in phone.apk for galaxy nexus GSM ,, so i dont need any framework
[Android Software Development] iBotPeaches:
Your folder structure is messed up. You have some backslashes and forward slashes. Fix that.
[Android Software Development] plegdroid:
Re: [UTIL][Dec 28 2012] Apktool v1.5.1 - a tool for reverse engineering apk files

evening,have a read of posts 1279/1280 .

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] marhensa:
okay will try..

EDIT: IT WORKS... :D :D :D

it should be mentioned as common bug at page one though, just suggestion.. :)

thank you.. ;)

sorry for not further read it before posting..

i feel bad... :(
[Android Software Development] DSA:
Hi ibot

just wanted to say thank for the latest version - it does everything i ask of it perfectly (modding s3 apks/framework, 4.1.2 & 4.2.1) and only goes wrong when i do something wrong in the file editing

Great work, hope to see more in the future
[Android Software Development] iBotPeaches:
A new version has been released!

v1.5.2 (Released February 2 - 2013) Codename: Bug Fixes

Download http://code.google.com/p/android-apktool/downloads/detail?name=apktool1.5.2.tar.bz2

Details of Release: https://plus.google.com/u/0/112346535434889804882/posts/AuK3cNvKawD

Plans for v1.5.3

Redo non-postional functions relating to detecting non-postional vs postional strings.

SmaliDebugging
[Android Software Development] 1982Strand:
Quick question, are you editing something in the aapt or are you linking to the latest untouched official one?