yashsingh1/xdaforums huggingface dataset:
[Android Software Development] iBotPeaches:
I know where you live. I added you on Facebook. v1.4.9 (or labeled v1.4.8 b3) is still in testing. I'm not rushing this release.
[Android Software Development] varun.chitre15:
I have a suggestion

Can you add percentage for decomiling and compiling of apks and also be more informative while decompiling and compiling

Something more detailed rather than Loading resources table...etc?

Adding percentage will help tools like VTS to define a progress bar while decompiling and compiling :)
[Android Software Development] avirale123:
I can not thank friend 5 days looking for ways to edit the files atus garcias systemUI and I could make 1000 THANKS

saludos desde COLOMBIA :good:
[Android Software Development] ypypy:
How can I help?
[Android Software Development] PacerguyDon:
Thanks!
[Android Software Development] iBotPeaches:
Map out the struct and format of these HTC r.9.patch images. Be able to decompile & re-create them. Look at Res9patchStreamDecoder for a guide, except making like Res9RepeatingpatchStreamDecoder, so we can begin to correctly decompile com.htc.resources.apk
[Android Software Development] ypypy:
but it is not HTC. this is Samsung SPH-L710 Galaxy SIII
[Android Software Development] fisha21:
Was me that mentioned the r.9.pngs. Thanks for the reply, wasn't sure you'd seen my post. Would be happy to help but I'm afraid what you said means nothing to me :( Off to do some reading though...
[Android Software Development] jeff432:
Hey, the ROM I made won't use the SystemUI.apk in my zip file... Instead, there's no wallpaper or notification bar, know how to fix?
[Android Software Development] CosmicDan:
Use the original AndroidManifest.xml and META-INF folder.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] :
Hi guys :)

First of all, I'm not a developer or something like that.. but I thought "That's not looking too complicated", so I gave it a try...

I tried to change the smileys in SwiftKey 3. So I googled a bit and found out, that I have to decompile the .apk, edit the /res/layout/keyboard_layout_standard_smileys.xml file. This worked pretty good.. I've clearly seen the "old" smileys and replaced it by my custom ones (:P --> :P and so on...). Then I tried to recompile and failed in all my tries..

If anyone could provide me a quick guide on how to go on, I'd be more than just thankful! :)

- experience7
[Android Software Development] CosmicDan:
I can't see any errors.
[Android Software Development] iBotPeaches:
From HTC.

We're gonna have to do this the hard way, since there is no AOSP source for these r.9.png images or anything to go on. Its unfortunate that HTC Dev doesn't understand the scope and project that Apktool is. Decompiling just has such a negative connotation to it :/
[Android Software Development] reosm:
miui 2.11.2 browser.apk decompile/recompile error ?
[Android Software Development] iBotPeaches:
ibotpeaches@raganok:~/build/wip/rom_wip_aries/apks$ apktool d -t aries Browser.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/apktool/framework/1-aries.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: /home/ibotpeaches/apktool/framework/6-aries.apk
I: Loaded.
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
ibotpeaches@raganok:~/build/wip/rom_wip_aries/apks$ apktool b Browser
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
ibotpeaches@raganok:~/build/wip/rom_wip_aries/apks$

No issue. Stop posting in this thread unless you have logs and proof.
[Android Software Development] reosm:
DECOMPİLE

[*] _INPUT_APK\Browser.apk

decompiling _INPUT_APK\Browser.apk...

I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: C:\Users\Recep\apktool\framework\1.apk

I: Loaded.

I: Decoding file-resources...

I: Loading resource table from file: C:\Users\Recep\apktool\framework\6.apk

I: Loaded.

S: Could not decode file, replacing by FALSE value: xml/advanced_preferences.xml

I: Decoding values*/* XMLs...

I: Done.

RECOMPİLE

[*] Browser

recompiling Browser...

I: Smaling...

I: Building resources...

C:\Users\Recep\Desktop\APKTool\_INPUT_APK\Browser\res\values\xmls.xml:3: error: Resource entry advanced_preferences is already defined.

res\xml\advanced_preferences.xml:0: Originally defined here.

C:\Users\Recep\Desktop\APKTool\_INPUT_APK\Browser\res\xml\advanced_preferences.xml:1: error: Error parsing XML: no element found

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Recep\AppData\Local\Temp\APKTOOL2453207820765080478.tmp, -I, C:\Users\Recep\apktool\framework\1.apk, -I, C:\Users\Recep\apktool\framework\6.apk, -S, C:\Users\Recep\Desktop\APKTool\_INPUT_APK\Browser\res, -M, C:\Users\Recep\Desktop\APKTool\_INPUT_APK\Browser\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:251)

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

at brut.androlib.Androlib.buildResources(Androlib.java:269)

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

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

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

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

Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Recep\AppData\Local\Temp\APKTOOL2453207820765080478.tmp, -I, C:\Users\Recep\apktool\framework\1.apk, -I, C:\Users\Recep\apktool\framework\6.apk, -S, C:\Users\Recep\Desktop\APKTool\_INPUT_APK\Browser\res, -M, C:\Users\Recep\Desktop\APKTool\_INPUT_APK\Browser\AndroidManifest.xml]

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

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:249)

... 6 more
[Android Software Development] Jelmertjuhh:
I have decompiled the new Android 4.2 camera app and edited som resources, but it will not compile after that.

Also if I don't edit anything and I try to compile it comes with the same error.

Here is the output:

I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
C:\apktool\GalleryGoogle\res\values\styles.xml:165:
error: Error retrieving parent for item: No resource found that matches the give
n name 'TextAppearance'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-ver
sion, 16, -F, C:\Users\AppData\Local\Temp\APKTOOL1109270237170794723.tm
p, -I, C:\Users\apktool\framework\1.apk, -S, C:\apktool\GalleryGoogle\res, -M, C:\apktool\
GalleryGoogle\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:255)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 10, --target-sdk-version, 16, -F, C:\Users\AppData\Local\Tem
p\APKTOOL1109270237170794723.tmp, -I, C:\Users\apktool\framework\1
.apk, -S, C:\apktool\GalleryGoogle\res, -M, C:\apktool\GalleryGoogle\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)
... 6 more

Does this have something to do with the SDK version 16?
[Android Software Development] Articudos:
I think you should wait...;)
[Android Software Development] CosmicDan:
Replace advanced_preferences.xml with previous one before re compile.

As iBot said, 4.2 wont work until it hits AOSP and he has time to release new APKTool.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Jelmertjuhh:
Oops, my fault :)

Thanks.
[Android Software Development] iBotPeaches:
Re-download MIUI. That was bug in first release. We hotfixed about 4 hours later.
[Android Software Development] da-pharoah:
OK so idk if this was posted I didn't search as this app(not your app, the gallery2.apk app) has been driving me nuts! And I just want it resolved. Ok so first question, if im on a sgs3 cm10 ROM do I still need a stock TW framework-res APK? Or will the one that came with my custom ROM work? Also when I get a chance IMA post the log that my decompile and recompile produce, but really I guess I could ask that with all the research I have done when I enter my command to recompile I send the apk to a built folder. But that folder is never created and my apk isn't either. Only thing that gets built is the classes.dex in the build folder in my working folders app. So basically there is the aosp sgs3 camera mod. It features a 5 shot burst mode. I don't like that many pictures right out of the gate. I changed the values of burst mode in the arrays.XML and the strings associated with the values in strings.XML. then I recompile and Nada but the classes.dex. I have attempted to replace the new "modded" classes.dex in the ready to mod gallery2.apk.. but it doesn't work. It still shows 5 as minimum versus my input values of 3,5,10,20. I don't know if I have listed much info to be clear, but any help would be appreciated. And again I'm on 4.1.2 cm10 sgs3. Thanks in advance.

.:Sent from the Hellfire Galaxy of S & 3:.
[Android Software Development] :
Decompiling SwiftKey 3

Would be great if anyone who bought SwiftKey 3 could try it too.. because I'm totally unsure how to do it =/ I even tried this:

1) Downloaded apktool.jar and aapt.exe from OP.

2) Put them into %windir%.

3) Run command prompt (as admin) and switch to the right directory.

4) Decompile with this command:

apktool d "com.touchtype.swiftkey-1.apk" "decompiled"

This step works fine.. the files appear without throwing out any errors in the command prompt.

5) I DIDN'T DO ANY CHANGES HERE. Whether in smali files nor in xml files. Just testing if I can recompile the apk again.

6) Recompile with this command:

apktool b "decompiled" "newapp.apk"

--> Throws out a bunch of errors (if interested in error log, screenshots, just tell me :)). I also tried to edit the resource files like in this thread: http://xdaforums.com/showthread.php?t=1943057

I used Notepad++, Search, Replace, Replace in files:

Find what: ttp://schemas.android.com/apk/res/com.touchtype

Replace with: ttp://schemas.android.com/apk/res/com.touchtype.swiftkey

Filters: *.*

Directory: [...]\decompiled\res

It tells me that it has replaced "ttp://schemas.android.com/apk/res/com.touchtype" 107 times.

But it doesn't work. Neither with replacing nor without.

If someone's interested in the error code, just tell me. But I'm pretty sure that the same error will also appear for you.

Thanks in advance for any hints, tips, tricks,

- experience7 :)
[Android Software Development] ---blacksoul---:
Please help me
[Android Software Development] da-pharoah:
Do u have the right aapt file? And do u have it in your working folder? Also just by chance have u updated your android SDK lately? Also r u running terminal as admin?

.:Sent from the Hellfire Galaxy of S & 3:.
[Android Software Development] Irish Enigma:
Hey guys, I'm having some serious issues with apktool, particularlly the 'build' function.

I'm on Ubuntu 12.04.01 LTS with my path set in the "~/.pam_enviorment" file and I'm up to date with aapt

PS I think its a problem with ubuntu but I'm not sure.
[Android Software Development] mattmanwrx:
Error is, "no such file or directory" when trying to access aapt... make sure it is in the directly that you're working from, and double check it is in your path (or equivalent on Ubuntu)..
[Android Software Development] ilie321:
help please

Pls help me with this problem: in apktool when I am trying to get resources to translate menus in baidu input

i get this error:

I have tried a lot of apktool versions and also framework apk even from roms that says baidu works but no succes

I do something wrong?

Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResFileValue cannot be cast to brut.androlib.res.data.value.ResScalarValue

at brut.androlib.res.decoder.ARSCDecoder.readComplexE ntry(ARSCDecoder.java:210)

at brut.androlib.res.decoder.ARSCDecoder.readEntry(AR SCDecoder.java:178)

at brut.androlib.res.decoder.ARSCDecoder.readConfig(A RSCDecoder.java:166)

at brut.androlib.res.decoder.ARSCDecoder.readType(ARS CDecoder.java:131)

at brut.androlib.res.decoder.ARSCDecoder.readPackage( ARSCDecoder.java:106)

at brut.androlib.res.decoder.ARSCDecoder.readTable(AR SCDecoder.java:83)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCD ecoder.java:49)

at brut.androlib.res.AndrolibResources.getResPackages FromApk(AndrolibResources.java:390)

at brut.androlib.res.AndrolibResources.loadMainPkg(An drolibResources.java:56)

at brut.androlib.res.AndrolibResources.getResTable(An drolibResources.java:48)

at brut.androlib.Androlib.getResTable(Androlib.java:4 8)

at brut.androlib.ApkDecoder.getResTable(ApkDecoder.ja va:166)

at brut.androlib.ApkDecoder.decode(ApkDecoder.java:99 )

at brut.apktool.Main.cmdDecode(Main.java:131)

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

Thank you
[Android Software Development] Pneuma1985:
Ibot ? any change we are gonna see a fix for the 5.0 soon? I notice it doesnt work with com.htc.resources.apk for sense 4.1 it decompiles and compiles with no errors but has a bunch of force closes that occur im not exactly sure why but its definitely apktool related... Its dropping xml assets and smali or at least it seems the logcat error shows an error when it tries to call for the menus.
[Android Software Development] iBotPeaches:
5.0 what?

Android 4.2? http://xdaforums.com/showpost.php?p=33592596&postcount=780
[Android Software Development] Deadly:
Lol... ummm.. sorry.. I think he meant 1.5.0.. problems with sense 4.1..

Sent from the MUST have app!
[Android Software Development] ilie321:
iBotPeaches can you help me with the above message? thank you
[Android Software Development] iBotPeaches:
I'd need the APK to do any real debugging. I fixed one of those errors a couple days ago, but it was a real hacky fix and not something I wish to replicate.

Something in ResSpec is mis-identifying some of these resources which is causing the cast to fail because you obviously can't cast a ResFileValue to a ScalarValue.
[Android Software Development] mrcasmir:
Who can help me with this problem. I can't recompile framework-res.apk from stock jb rom. I get this error

C:\APKTool\1.5.0>apktool b framework-res

W: Could not find sources

I: Checking whether resources has changed...

I: Building resources...

C:\APKTool\1.5.0\framework-res\res\values\plurals.xml:79: error: Multiple substi

tutions specified in non-positional format; did you mean to add the formatted="f

alse" attribute?

C:\APKTool\1.5.0\framework-res\res\values\plurals.xml:79: error: Found tag </ite

m> where </plurals> is expected

C:\APKTool\1.5.0\framework-res\res\values-en-rGB\plurals.xml:79: error: Multiple

substitutions specified in non-positional format; did you mean to add the forma

tted="false" attribute?

C:\APKTool\1.5.0\framework-res\res\values-en-rGB\plurals.xml:79: error: Found ta

g </item> where </plurals> is expected

C:\APKTool\1.5.0\framework-res\res\values-es\plurals.xml:79: error: Multiple sub

stitutions specified in non-positional format; did you mean to add the formatted

="false" attribute?

C:\APKTool\1.5.0\framework-res\res\values-es\plurals.xml:79: error: Found tag </

item> where </plurals> is expected

C:\APKTool\1.5.0\framework-res\res\values-pt\plurals.xml:79: error: Multiple sub

stitutions specified in non-positional format; did you mean to add the formatted

="false" attribute?

C:\APKTool\1.5.0\framework-res\res\values-pt\plurals.xml:79: error: Found tag </

item> where </plurals> is expected

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce

ption: could not exec command: [aapt, p, -F, C:\Users\Cas\AppData\Local\Temp\APK

TOOL7580616635118195201.tmp, -x, -S, C:\APKTool\1.5.0\framework-res\res, -M, C:\

APKTool\1.5.0\framework-res\AndroidManifest.xml]

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

a: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, C:\U

sers\Cas\AppData\Local\Temp\APKTOOL7580616635118195201.tmp, -x, -S, C:\APKTool\1

.5.0\framework-res\res, -M, C:\APKTool\1.5.0\framework-res\AndroidManifest.xml]

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

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

a:191)

... 6 more

and help will be appreciated
[Android Software Development] ilie321:
thank you for reply

the app is this one

https://play.google.com/store/apps/details?id=com.baidu.input&hl=en
[Android Software Development] Diarrhea Slushie:
does anyone know why i my browser menu doesnt work after i successfully decompile and compile com.htc.resources without errors? i dont get it! can some please help, im on sense 4.1
[Android Software Development] mekanismen:
Some system apps don't like being messed with.
[Android Software Development] Jarmezrocks:
I am not familiar with the latest HTC stuff but does your ROM use rosie? If so then the apk needs to be decompiled with dependencies. That means you need to use the rosie (or equivelent) to deompile against AS WELL as the framework-res.apk. That will install a second apk in to .apktool in your home directory. If successful you should have 1.pk and 2.apk there. Try also decompiling with a -s

That *may* help?

What were you using to recompile your apk? Were you using just the apktool and wrapper batch file? Or were you using an apkmanager of some description? If so check the error logs. A lot of the apkmanagers will still clear any errors off screen before you get to see them, however they are still printed into the log file. So go back and check the log file and ensure that there were no errors, not just what didn't appear on screen. Meaning just because the apk compiled, does not mean it did it without errors.

Also check the contents of the apk file next to the original.

Lastly please tell us what you were editing. If it was XML did you update resources.asc upon recompiling?

James

---------- Post added at 05:27 PM ---------- Previous post was at 05:21 PM ----------

It is looking for resources with tags. Go to the apktool help (most cases just type apktool) and there is a section on tags.

Also you may need to be a little bit more specific as to what type of JB stock ROM? If it is a Touchwiz ROM then it is looking of the tags within the twframework-res.apk. See my previous post to another user for reference.

Ensure that you are not only decompiling against the framework-res.apk but the dependent apk for your stock ROM. Rosie for HTC and Touchwiz for Samsung etc. That is why you are getting the errors that you are getting, cause it is trying to reference something it cannot find.

Send me a PM if you are having issues.

Lastly if it is just themeing that you are doing to the framework have you considered alternative methods for flashing themes via recovery using other tools like vrtheme or morph?

Note: This is not to take anything away from Apktool, the above mentioned are merely additions that may assist people theming. Horses for courses as they say;)
[Android Software Development] bgcngm:
Have you tried to edit Phone\res\values-de\strings.xml (for example) to find out what is the problem? Apktool is warning about an error on line 173.

So, if you edit that file and go to the referred line you will find the following:

<string name="throttle_time_frame_subtext">"%1$d [COLOR="Red"][B]%[/B][/COLOR] des Zyklus sind verstrichen.
Der nächste Zeitraum beginnt in %2$d Tagen (%3$s)."</string>

By comparison with the same string on Phone\res\values\strings.xml, you will see:

<string name="throttle_time_frame_subtext">"%1$d[COLOR="red"][B]٪[/B][/COLOR] of cycle elapsed
Next period starts in %2$d days (%3$s)"</string>

Percentage character is different and that is causing the problem. Edit line 173 so that it becomes like this:

<string name="throttle_time_frame_subtext">"%1$d [COLOR="red"][B]٪[/B][/COLOR] des Zyklus sind verstrichen.
Der nächste Zeitraum beginnt in %2$d Tagen (%3$s)."</string>

Now do the same for the other locales. ;)
[Android Software Development] jonah1234:
The link for linux is not a dl? What do I do?
[Android Software Development] ts_firehawk:
Right click -> save link as (or something like that)
[Android Software Development] ilie321:
any news ? thanks
[Android Software Development] iBotPeaches:
You gave me the link to an APK on the Market. Sorry, I don't have time to chase after it and download it, pull it from phone and then work on it. You have to meet me half way :)

4.2 is at AOSP now. Working on some updates.
[Android Software Development] fisha21:
Interestingly, I get the exact same errors trying to recompile Phone.apk from an HTC 4.1 ROM....didn't realise they both used the same phone apk.

Did try fixing the referenced xmls, but will have to take a closer look at those % symbols..
[Android Software Development] tenasama:
May I ask how to decompile apk with out debug info in smali files?

(like .line XXX)

I've used option codes like -b or --no-debug-info but it shows wrong options…

Thanks~

PS:I'm using apktool v1.5.0~
[Android Software Development] M4gicM@:
This is most likely because you are on a 64bit machine. Try uname - a to verify. aapt is a 32bit binary so you will need to get the approprite i386 libs to run.

type this

sudo apt-get update
sudo apt-get install ia32-libs

this will fix the errors where you get the result

bash: /aapt: No such file or directory
[Android Software Development] iBotPeaches:
I was wondering if anyone had experience with Proguard. Trying to get it to work with Gradle but no luck. Apktool is like 9MB now, due to my extra /libs when I only use like 2MB of those libraries so I don't need them all merged into the final jar, but can't figure how out to make this work correctly.

Unless people want a 9MB Apktool v1.5.1 lol
[Android Software Development] CosmicDan:
Doesn't bother me :P We only download once.
[Android Software Development] iBotPeaches:
Here is pre-release of Apktool v1.5.1

If you don't know how to use this, then don't. Simple as that.

https://github.com/downloads/iBotPeaches/Apktool/apktool-cli-1.5.1-SNAPSHOT.jar

v1.5.1 Pre-Release 1

Updated smali/baksmali to v1.4.0

Fixed reference-array problem (BurgerZ)

Fixed bad spacing issue on Mac OS X

Removed maven in favor of gradle

Removed Maven REPOs that were used if local projects didn’t exist.

Merged brut.j.dir,brut.j.common,brut.j.util & brut.apktool.smali (Fork of JesusFreke’s smali) into one repo.

Fix –verbose mode to actually work

Added SDK API 17 framework

Don’t decompile public.xml (have aapt regenerate it based on resources). - REMOVED

Added -o / –original flag to retain system APK signature and inject contents into APK - DELAYED
[Android Software Development] CosmicDan:
Nice work, cheers!

I hope this stays removed, from what i understand it would break smali code that directly references the resource ID's (at least I would get crashes when deleting public.xml, but I've never needed to since I found ways to keep it).
[Android Software Development] ilie321:
re

done
[Android Software Development] ilie321:
thanks i tested this on win xp sp3 x86 same error
[Android Software Development] ingbrzy:
XP is still live..? Damn...

~Tapatalk~