yashsingh1/xdaforums huggingface dataset:
[Android Software Development] adulfo:
Try to use apktool 1.4.10, most of the errors except the first oneS is due to the ID's. Based on my experience if you delete some entries on the public.xml and add another entries, be sure to list the ID# (hex identifier) of those deleted lines because those numbers can save you when those errors occur, especially if the hex identifier of the DELETED entries are LESS than the new one or left lines after deletion... Just replace the identifier of the lines which the error occurs with the identifier of the deleted lines.

---------- Post added at 09:43 PM ---------- Previous post was at 09:38 PM ----------

I have a question, is this valid "@*android:style/Widget.Button", if not try to remove the asterisk before the android, just @android... Sorry if my idea is wrong..
[Android Software Development] Nucleotide:
When I decompiled Mms.apk I noticed that about 50% (of not more) of all @android styles or otherwise had the * (asterisk) in between @ and android. I'm assuming they are not meant to be there but there was no way I was going through and removing them all.

I've had no luck at all decompiling apk's. If I get one issue fixed, another arises. All I wanted to do was theme Mms.apk but it has become more trouble then it's worth. :crying:
[Android Software Development] varun.chitre15:
Yes I too have same issue

But with SystemUI.apk but surprisingly it compiles with no errors but surely a bug with Apktool
[Android Software Development] zelendel:
If you read back in the thread this has been talked about. They had to be put in to prevent crashing.

I am using the current version and other then my gmail issue I have used it to do my entire theme. (Check sign) with no issues. Even using it in an unusual way lol and no problems.

Sent from Arkham
[Android Software Development] zelendel:
Look for the PNG file it refers to. The .9 is broken. Just remake the .9 image and you will be fine. This happens when people don't edit the .9 properly

Sent from Arkham
[Android Software Development] varun.chitre15:
res\layout\compose_message_activity.xml.bak:0: error: Resource entry compose_mes
sage_activity is already defined.

Also from above error you seem to use WinMerge, it creates backup file after you are done with comparison

Just delete the compose_message_activity.xml.bak file in res\layout\ folder
[Android Software Development] gcrutchr:
For weeks now I have been trying to figure out why I cannot recompile SystemUI.apk for my ASUS TF700T.

Well, I finally figured out what the problem was.

If I delete public.xml, it compiles but will not work on my tablet.

I figured it had something to do with the values in public.xml

At the end of the file public.xml is the following:

<public type="style" name="StatusBarPanelSettingsPanelSeparator" id="0x7f0e0013" />

<public type="menu" name="notification_popup_menu" id="0x7f100000" />

<public type="menu" name="recent_popup_menu" id="0x7f100001" />

</resources>

Notice how it is not in sequence going from "style" to "menu".

I changed the file to go in sequence as follows:

<public type="style" name="StatusBarPanelSettingsPanelSeparator" id="0x7f0e0013" />

<public type="menu" name="notification_popup_menu" id="0x7f0f0000" />

<public type="menu" name="recent_popup_menu" id="0x7f0f0001" />

</resources>

It now compiles and it works fine. Am still testing to make sure everything working, but I finally got my battery % working.

Hope this helps in resolving some of the compile issues people have been having.
[Android Software Development] bgcngm:
I guess you meant:

That's interesting. I think I have stumbled upon an .apk that had that problem.
[Android Software Development] gcrutchr:
Actually, it was the order of the IDs not the TYPE that was the problem.

If you notice, 0xf70f0000 is missing. It skips that id and goes to 0x7f710000.
[Android Software Development] TheGreatSega:
help with apktool

i decompiled systemui.apk and recompiled to check whether it was working without changing anything..

i get this error

C:\android\android-sdk-windows\platform-tools\SystemUI\res\values\arrays.xml:27:
error: Found tag reference-array where item is expected
C:\android\android-sdk-windows\platform-tools\SystemUI\res\values\public.xml:887
: error: Public symbol array/shutdown_reboot_actions declared here is not define
d.
C:\android\android-sdk-windows\platform-tools\SystemUI\res\values\public.xml:886
: error: Public symbol array/shutdown_reboot_options declared here is not define
d.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 15, --target-sdk-ver
sion, 15, -F, C:\Users\Jai\AppData\Local\Temp\APKTOOL1086830509452980609.tmp, -I
, C:\Users\Jai\apktool\framework\1.apk, -S, C:\android\android-sdk-windows\platf
orm-tools\SystemUI\res, -M, C:\android\android-sdk-windows\platform-tools\System
UI\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, 15, --target-sdk-version, 15, -F, C:\Users\Jai\AppData\Local\Temp\APK
TOOL1086830509452980609.tmp, -I, C:\Users\Jai\apktool\framework\1.apk, -S, C:\an
droid\android-sdk-windows\platform-tools\SystemUI\res, -M, C:\android\android-sd
k-windows\platform-tools\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)
... 6 more

why??
[Android Software Development] varun.chitre15:
I too reported this issue few days ago

I hope its under fixation.
[Android Software Development] adulfo:
I also encountered those errors with 1.5.0 but MANAGED TO SOLVED IT USING 1.4.10.. I hope the same would be for you...
[Android Software Development] zhanjia:
Hope its okay to post here..

This the codes when i decompile, everything went smoothly

http://s7.postimage.org/f7ulnkz3v/draco.png

These are the codes after modifying and recompiling.. it seems to show error..

http://s7.postimage.org/3mp0tm30b/drco2.png

Is there any wrong?

Thanks !
[Android Software Development] v1r0x:
I think you have to copy aapt into the apktool-folder or add aapt to your %PATH%-variable

Sent from my awesome Desire Z with MIUI JB using the xda-developers app
[Android Software Development] CosmicDan:
You're using an old version of aapt. Get faapt.exe from the first post, rename it to aapt.exe, and move it to same folder as apktool. If you have Android SDK installed, also put it there (backup the old one, call it aapt.old or something). Basically, search your PC for any aapt.exe and replace them all with iBot's newest faapt.exe
[Android Software Development] zhanjia:
I found out i was using 1.4.1

So i have to use 1.5 and change the aapt right ?

EDIT. no use :( log shows errors on xml files that i didnt edited..

Thanks !
[Android Software Development] miniAndroidian:
Hello everybody

I got a problem with decompiling the HTCdialer.apk taken from a Sense 3.5 ROM.

I'm usin' APKtool 1.4.1 and I always decompile it with the com.htc.ressources.apk but it shows errors.

Should i upgrade or is it a general bug and if then how should i decompile Sense files?

Regards & thanks
[Android Software Development] zhanjia:
I've replaced apktool 1.4.1 with 1.5, used the latest aapt.exe , IFed the correct framwork-res.apk.. installed the correct sdk(replaced the aapt inside it with aapt from OP) and had JRE.. everything is complete

Success in decompiling.. but fails at recompiling no matter which apk i used....
[Android Software Development] bp328i:
I have never come across this issue before.

I am decompiling, making edits (well one edit) then recompiling the framework-res.apk from the Sprint Galaxy S III TW Jelly Bean leak LJ7.

I have updated to the latest Android SDK and all files in the OP. I'm apktool if framework-res.apk and apktool if twframework-res.apk

The apk decompiles and recompiles without error but for some reason the resources.arsc goes from 7949 732 to a packed size of 2108 865 and when I flash the new framework-res.apk the phone will not boot.

I also tried using Root Explorer to replace the apk in the system/framework folder and when I do that the icon changes from the normal framework-res.apk icon to something else.

I don't know where to look because I get no errors....
[Android Software Development] adulfo:
Just use 1.4.10... Just try
[Android Software Development] iBotPeaches:
Throwing out my --original function for future release. It's having serious problems. Will try and proguard the program and release v1.5.1 soon.
[Android Software Development] devize:
I get the same errors that you've got. I can decompile successfully but I can't recompile even without modifications. I don't have the Android SDK installed but it isn't necessary, right? I've got JDK installed, and installed my framework-res.apk from my device successfully but I can't recompile.

Edit: Got it to compile using the latest apktool1.5.0, but it won't install.

Edit2: Seems ZipSigner 2 from the marketplace signed it properly and now it works great. Thanks for the great work.
[Android Software Development] iBotPeaches:
Any directory error means that aapt is out of date, just fyi.
[Android Software Development] bestson:
ok, will glad to try if it was done... was furious with error during compile hololauncher without any changes on decompile files... thanks ibotP :thumbup:
[Android Software Development] MarkAndroid:
Good morning.

I was trying to use apktool to install a second version of skydrive but I did not succeed.

Can you tell me how to simply change the name APK to install it without uninstalling the previous version of the same application?

example app account1 and app account2
[Android Software Development] lasic.2000:
Delete this post - "problem" solved
[Android Software Development] anaraxia:
Can anyone help with this error please
[Android Software Development] bgcngm:
That is not an error. Those are just warnings (so that you know that some strings don't have the localized translation), but the .apk is being built anyway. ;)
[Android Software Development] anaraxia:
Ok thats great news to start with.

Hope to get the following questions answered too.

1. The apk builds but is significantly smaller in size.

2. The apk does not work. EG. SystemUI fails and no status bar showing

Cheers in advance
[Android Software Development] bgcngm:
That has already been answered before many times. The newly built .apk is not signed and resources.arsc is compressed. It should be added into the original .apk using store compression method. Go a few pages back and you'll find more information.
[Android Software Development] CosmicDan:
Using original signatures is important, but I've never had any issues with arsc compression. Just an FYI, even though it's not recommended. But the AndroidManifest.xml and raw resources (like ogg, dict, etc) need to be stored yes.
[Android Software Development] m4570d0n:
Can anyone tell me how the aapt in the OP is different from, say, the aapt that is created when I build CM10 or AOKP-jb for my device? Also, has this aapt been modified so that theme chooser themes can be compiled with the 0x0a package scope rather than 0x7f in order to resolve issues with compiling the themes and getting the "Sorry, this theme is missing assets for your device's screen size" error message when trying to apply the theme? If not, does anyone know how one might go about doing that?
[Android Software Development] iBotPeaches:
There are resource identifiers for MIUI added so resource directories like tiny font can be rebuilt without error. That is the only change as I lay those changes into updated source of aapt and rebuild. Can't see how aapt would cause those problems. That would be apktool if anything.

There is also faapt which is chainfire's fast aapt also mixed with above changes.

Don't know what your asking. Never used theme manager for cm.
[Android Software Development] ---blacksoul---:
Hello everyone I have a problem regarding apktool (I'm going crazy trying to fix it), groped in the quest to rebuild settings.apk me error why? where I'm wrong and how to solve?

Thanks for answer

Copyright (c) 2009 Microsoft Corporation. Tutti i diritti riservati.

C:\Users\Utente>cd desktop

C:\Users\Utente\Desktop>cd ApkMultiTools-APK-Multi-Tool-012bda1

C:\Users\Utente\Desktop\ApkMultiTools-APK-Multi-Tool-012bda1>cd place-apk-here-f

or-modding

C:\Users\Utente\Desktop\ApkMultiTools-APK-Multi-Tool-012bda1\place-apk-here-for-

modding> apktool if settings.apk

I: Framework installed to: C:\Users\Utente\apktool\framework\127.apk

C:\Users\Utente\Desktop\ApkMultiTools-APK-Multi-Tool-012bda1\place-apk-here-for-

modding>apktool d settings.apk

I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

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

I: Loaded.

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Done.

I: Copying assets and libs...

C:\Users\Utente\Desktop\ApkMultiTools-APK-Multi-Tool-012bda1\place-apk-here-for-

modding>apktool b settings almostdone.apk

I: Checking whether sources has changed...

I: Smaling...

I: Checking whether resources has changed...

I: Building resources...

invalid resource directory name: C:\Users\Utente\Desktop\ApkMultiTools-APK-Multi

-Tool-012bda1\place-apk-here-for-modding\settings\res/xml-zh-TW

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, 10, -F, C:\Users\Utente\AppData\Local\Temp\APKTOOL5036147650408492589.tmp,

-I, C:\Users\Utente\apktool\framework\1.apk, -S, C:\Users\Utente\Desktop\ApkMul

tiTools-APK-Multi-Tool-012bda1\place-apk-here-for-modding\settings\res, -M, C:\U

sers\Utente\Desktop\ApkMultiTools-APK-Multi-Tool-012bda1\place-apk-here-for-modd

ing\settings\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, 10, -F, C:\Users\Utente\AppData\Local\Temp\

APKTOOL5036147650408492589.tmp, -I, C:\Users\Utente\apktool\framework\1.apk, -S,

C:\Users\Utente\Desktop\ApkMultiTools-APK-Multi-Tool-012bda1\place-apk-here-for

-modding\settings\res, -M, C:\Users\Utente\Desktop\ApkMultiTools-APK-Multi-Tool-

012bda1\place-apk-here-for-modding\settings\AndroidManifest.xml]

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

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

a:253)

... 6 more

C:\Users\Utente\Desktop\ApkMultiTools-APK-Multi-Tool-012bda1\place-apk-here-for-

modding>
[Android Software Development] fisha21:
Couldn't find this mentioned in the thread yet, but sorry if it's already been discussed.

HTC have come up with a new type of 9patch, the repeatable 9patch or r.9.png, which allows for textures on resizable pngs. Since they haven't released the tools they use for these, they can't be edited. The current apktool automatically removes the r. from the filename. The problem with this is there are some issues editing the new Sense 4+ skins, doesn't seem to work unless the r.9's are present. Is it possible to get apktool to keep the r. in the filename? I realise this still won't allow us to edit the images properly, but would make editing the skins easier.

I can provide any of the apks if needed
[Android Software Development] PacerguyDon:
Has anyone had any luck compiling any of the 4. 2 apps?

I've been using the apktool 1.50 with great results, but the 4.2 stuff won't build. Even with no edits still won't build.

Thanks ibotpeaches for keeping the apktool up to date.
[Android Software Development] iBotPeaches:
Well posting no log and no apk is pretty hard to fix.
[Android Software Development] zelendel:
I'm betting without the proper 4.2 framework files they won't build.

Sent from Arkham
[Android Software Development] CosmicDan:
From what I know that wouldn't be the issue, the values for colors and fonts and such would just remain as raw values instead of decoded to friendly values. Maybe, not sure.

APKTool probably needs to be updated, and everyone needs to learn to be a lot more patient with Connor's great work. They are leaked apps and nobody knows if they are even final, so settle down on the dodgy hacking. I'm excited too to try and add arrow keys to the new keyboard but we need to be patient.
[Android Software Development] m4570d0n:
The error I'm referring to is the source for the t-mobile theme engine:

https://github.com/tmobile/themes-p...r/src/com/tmobile/themes/provider/Themes.java

[COLOR=#999988][FONT=Consolas][I]/**[/I][/FONT][/COLOR]
[COLOR=#999988][I] * Flag indicating whether this theme has been compiled with assets for[/I][/COLOR]
[COLOR=#999988][I] * the current host system's display density.[/I][/COLOR]
[COLOR=#999988][I] * <p>[/I][/COLOR]
[COLOR=#999988][I] * Because the platform build system by default excludes assets for[/I][/COLOR]
[COLOR=#999988][I] * densities other than the platform target a lot of themes being[/I][/COLOR]
[COLOR=#999988][I] * produced and published in the market lack mdpi assets and would[/I][/COLOR]
[COLOR=#999988][I] * simply crash on mdpi handsets. This flag was introduced to provide a[/I][/COLOR]
[COLOR=#999988][I] * meaningful error message when the user attempts to apply such a[/I][/COLOR]
[COLOR=#999988][I] * theme.[/I][/COLOR]
[COLOR=#999988][I] */[/I][/COLOR]
[B]public[/B] [B]static[/B] [B]final[/B] String HAS_HOST_DENSITY [B]=[/B] [COLOR=#DD1144]"has_host_density"[/COLOR][B];[/B]

[COLOR=#999988][I]/**[/I][/COLOR]
[COLOR=#999988][I] * [B]Flag indicating whether this theme has bene compiled with the[/B][/I][/COLOR][B]
[COLOR=#999988][I] * expected 0x0a package scope with the special modified aapt provided[/I][/COLOR]
[COLOR=#999988][I] * in the current build system.[/I][/COLOR][/B]
[COLOR=#999988][I] * <p>[/I][/COLOR]
[COLOR=#999988][I] * If themes are compiled using the standard SDK they will have the 0x7f[/I][/COLOR]
[COLOR=#999988][I] * package scope and will create conflicts with regular app packages[/I][/COLOR]
[COLOR=#999988][I] * (ultimately causing crashes after the theme is applied).[/I][/COLOR]
[COLOR=#999988][I] */[/I][/COLOR]
[B]public[/B] [B]static[/B] [B]final[/B] String HAS_THEME_PACKAGE_SCOPE [B]=[/B] [COLOR=#DD1144]"has_theme_package_scope"[/COLOR][B];[/B]
[COLOR=#333333][FONT=Consolas][B]}[/B][/FONT][/COLOR]
[Android Software Development] iBotPeaches:
v1.5. 1 will be out once 4.2 hits aosp.
[Android Software Development] :
Thanks a lot man.

I used an outdated version (1.4.3) for some time.

Around a week ago picked up version 1.4.7.

Unfortunately today I wanted to recompile framework-res.apk from latest MIUI rom but there were errors.

Same with latest CM9 ROM (error in plurals xml line 79).

Picked up version 1.4.8 and it works again :)
[Android Software Development] HumanXv2:
Im using 1.4.7 and Im getting the same errors I always get. I started out using 1.4.3 I think, on JB systemui and framework to make a few small changes and it worked fine. Then it started acting crazy no matter what. I get a ton of error about invalid resource directory for a bunch of files I didnt even touch like framework-res\res/values-w360dp. It usually decompiles without a hitch but will not build them
[Android Software Development] djdarkknight96:
I've found decompile with the new apktool and then I use apk multitool

to build works perfect. I've themed the entire jellybean Rom doing that. Only the phone.apk has issues.

DarkJelly Gnex on JellyBean sent this using the app
[Android Software Development] iBotPeaches:
Would you mind sending me that framework-res (For the directory error). It has to be an HTC built APK, because I swear there system is different than any other.
[Android Software Development] :
Sorry to bother again.

Apktool 1.4.8 worked but it broke framework-res.apk somehow.

What I mean is: it rebuilds it without errors but it gives a non booting rom...

Just letting you know, because now I cant fix some things ...
[Android Software Development] iBotPeaches:
Yeah stick with v1.4.7. I have to test releases more before I push them (even though it was a BETA). I got excited that I made a new version and posted it too early with not enough testing.
[Android Software Development] HumanXv2:
Yeah when Im woke up. no Its a galaxy nexus

https://www.dropbox.com/sh/c682s6zhk3inhbb/y_4cYdW98h
[Android Software Development] HumanXv2:
Does this behave different on Linux? Sometimes when I'm messing with it windows seems to hold onto stuff. When I give and try to delete the decompiled folders windows won't let me. I've using Ubuntu most of the day and may give it a try.
[Android Software Development] iBotPeaches:
Windows naturally holds on to some files when the process doesn't end. Its a strange thing. Nothing that I know how to fix :(
[Android Software Development] papayayoghurt:
Where can I get.1.4.8

Sent from my ICS-powered arc S. From Austria! You don't know Austria? Google!

PS: Thank or PM me if you like the Rubiks Cube! :-)
[Android Software Development] chrisch1974:
My Carinthian friend...have a look in iBotPeaches signature (or here the direct link). But it has some errors as it is in a beta state.

iBotPeaches thanks for the hard work you did on the apktool. My own attempts wasn't very successfully to fix it.
[Android Software Development] iBotPeaches:
Its already Friday, so thanks for the submissions of random files. I will take the time over the weekend and work out some fixes. Mainly want to squash this directory error and the plurals error.
[Android Software Development] Pneuma1985:
Ibot any news on the fixes? J/w if we are gonna see a new 1.4.8 beta 2? or perhaps a 1.4.9? Oh yeah sorry I meant 3 I got 2 but i had the same white gap problems with it and the framework for sense still doesnt work properly right out of the box still needs to be edited to get compiled...
[Android Software Development] iBotPeaches:
I forgot who all has v1.4.8 Beta 2, but I'm almost done on v1.4.8 b3, but I think I'm gonna name it v1.4.9.
[Android Software Development] magemastrix:
Hello iBotPeaches,

I am taking framework-miui-res.apk from atrix port, decompiling, then recompiling again without changing anything and then my phone freezes if I flash this new rom(logcat http://pastebin.com/WPAmprDL )

Is this an expected behavior?

Explaining, I am doing this to add my language to the rom, but even without adding nothing I can't boot the phone, so first I am trying to be able just to recompile, then I will add the language files.
[Android Software Development] Ticklefish:
Are you just flashing the recompiled files? Or do you change the resources.arsc first?
[Android Software Development] magemastrix:
I do not change anything, it's a simple test, unzip the rom, decompile framework-miui-res.apk, recompile again, zip and flash and give me that error.

Always installing framework-res and framework-miui-res before the procedure, installed too 2.apk,3.apk,4.apk,5.apk from patchrom.

EDIT: using apktool 1.4.7

If I decompile(the framework-miui-res that I compiled) again, framework-miui-res/res/values/public.xml has all values changed to 0x02 range eg:

<public type="array" name="android_config_longPressVibePattern" id="0x02060008" />

EDIT2: Adding the framwork numbers to apktool.yml then when I decompile again the hex range is again 0x06, but still fails to boot.
[Android Software Development] pele78:
Where can I get 1.5.0 CWM APKTOOL ?

Thanks