yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Epic.:
Any Reason?

Any reason that I'm getting this? All I did was copy pngs NOT .9.png from a theme and pasted it into this apk with the same name!

C:\Users\xxxxx\Desktop\Android\Modding\apktool>apktool b com.htc.resources
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
(skipping index file 'C:\Users\xxxxx\Desktop\Android\Modding\apktool\com.htc.resources\res\drawable-hdpi\Thumbs.db')
(skipping index file 'C:\Users\xxxxx\Desktop\Android\Modding\apktool\com.htc.resources\res\drawable-land-hdpi\Thumbs.db')
(skipping index file 'C:\Users\xxxxx\Desktop\Android\Modding\apktool\com.htc.resources\res\drawable-nodpi\Thumbs.db')
res\drawable-hdpi\common_photo_frame_quick_contact.png:0: error: Resource entry common_photo_frame_quick_contact is already defined.
res\drawable-hdpi\common_photo_frame_quick_contact.9.png:0: Originally defined here.
res\drawable-hdpi\lockscreen_number_keyin_rest.png:0: error: Resource entry lockscreen_number_keyin_rest is already defined.
res\drawable-hdpi\lockscreen_number_keyin_rest.9.png:0: Originally defined here.
res\drawable-hdpi\simlock_ok_rest.png:0: error: Resource entry simlock_ok_rest is already defined.
res\drawable-hdpi\simlock_ok_rest.9.png:0: Originally defined here.
res\drawable-hdpi\zzzz_common_music_progress_button.png:0: error: Resource entry zzzz_common_music_progress_button is already defined.
res\drawable-hdpi\zzzz_common_music_progress_button.9.png:0: Originally defined here.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Sh
\Local\Temp\APKTOOL6325394529671431520.tmp, -x, -I, C:\Users\Shashank\apktool\framework\1.apk, -S, C:\Users\xxxxxx\Desktop\Android\Mod
om.htc.resources\res, -M, C:\Users\Shashank\Desktop\Android\Modding\apktool\com.htc.resources\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, C:\Users\Shashank\AppData\Local\Temp\APKTOOL6325394529671431
I, C:\Users\Shashank\apktool\framework\1.apk, -S, C:\Users\xxxxxxxx\Desktop\Android\Modding\apktool\com.htc.resources\res, -M, C:\Users\
op\Android\Modding\apktool\com.htc.resources\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:249)
... 6 more
[Android Software Development] Dunc001:
There are errors with the four .9 pngs listed in your error log. When you open the drawable folder you will find standard and .9 pngs with the same names (apktool creates a regular png when there is a patch error on a .9) - you need to delete the regular pngs, and repair the bad patches on the faulty .9 pngs then try compiling again.
[Android Software Development] fisha21:
Didn't even realise we could recompile com.htc.resources now...seems I've missed a lit! Is this using v1.4.9?
[Android Software Development] sambastrakan:
old bug

Hello,

Just in case, an old bug is still there, see attached image...

Any way to solve that ? Thanks !
[Android Software Development] djdarkknight96:
Those are bad strings. I had to find and change manually. But mine was Gmail delete dialog.

DarkJelly Gnex on JellyBean sent this using the app
[Android Software Development] iBotPeaches:
The unknown folder is for files/folders that aapt doesn't know about. They are automatically copied back to original position on rebuild. They are just stored in the /unknown folder so apktool knows where to find them.

As for the original folder. We take the MANIFEST files on decode, but to automatically include them in the prebuilt apk you have to use -c.
[Android Software Development] DualJoe:
Ok, -c copies the original files. But unknown files are still missing. It doesn't copy it back.

My commandline is:

apktool.jar b -v %1 -o %1.apk

Log:

Dez 05, 2013 2:56:11 AM brut.androlib.Androlib build
Information: Using Apktool 2.0.0-Beta8 on framework.jar.out
Dez 05, 2013 2:56:11 AM brut.androlib.Androlib buildSourcesSmali
Information: Checking whether sources has changed...
Dez 05, 2013 2:56:11 AM brut.androlib.Androlib buildSourcesSmali
Information: Smaling...
Dez 05, 2013 2:56:58 AM brut.androlib.Androlib buildResources
Warnung: Could not find resources
Dez 05, 2013 2:56:58 AM brut.androlib.Androlib buildApk
Information: Building apk file...
Processing raw dir 'D:\Android\Decompiler\apktool\framework.jar.out\build\apk'
Found 1 asset file in D:\Android\Decompiler\apktool\framework.jar.out\build\apk
Configurations:
(default)

Files:
classes.dex
Src: () D:\Android\Decompiler\apktool\framework.jar.out\build\apk\classes.dex

Resource Dirs:
Creating 'D:\Android\Decompiler\apktool\framework.jar.out\dist\framework.jar'
Writing all files...
'classes.dex' (compressed 58%)
Generated 1 file
Included 0 files from jar/zip files.
Checking for deleted files
Done!
Dez 05, 2013 2:57:01 AM brut.androlib.res.AndrolibResources aaptPackage
Information: command ran:
Dez 05, 2013 2:57:01 AM brut.androlib.res.AndrolibResources aaptPackage
Information: [C:\Temp\brut_util_Jar_8596998165304218132.tmp, p, -v, -F, D:\Android\Decompiler\apktool\framework.jar.out\dist\framework.jar, -0, arsc, D:\Android\Decompiler\apktool\framework.jar.out\build\apk]
[Android Software Development] nerotix:
Using CM11, installed the framework. Decompiling works fine but even without changing anything and I recompile framework-res, I get this error:

http://pastebin.com/7vREsWba

Anyone has an idea?

Thanks.

Here also a screenie: http://i42.tinypic.com/vwpxg4.jpg
[Android Software Development] nerotix:
[MENTION=3924617]iBotPeaches[/MENTION] I fixed the error mentioned, but it's not perfect, hopefully you can shed some light on this matter. The error I was getting says:

"invalid resource directory name: E:\ApkChanger\out\framework-res\res/values-mcc310-mnc-1

invalid resource directory name: E:\ApkChanger\out\framework-res\res/values-mcc450-mnc-1"

After some digging I found a 'solution'. For some reason it wont compile if the i keep the folder named "values-mcc310-mnc-1" and "values-mcc450-mnc-1". When I remove the last dash of both those folder, so it looks like "values-mcc310-mnc1" and "values-mcc450-mnc1", so removing the last dash. It does compile without any errors. But when doing so, there are some minor graphic glitches, for example, when u press the volume keys and the volume bar shows up, it has strange colors. I'm 100% sure it is because I change those names of those folders. In short: Do you know a solution around this matter? So I wont have these graphic glitches that come with changes the folders names.

Thanks and any help is appreciated.
[Android Software Development] iBotPeaches:
I believe I fixed this about 2 weeks ago. https://github.com/iBotPeaches/Apktool/commit/4b180bd13ced7d6eea014820c5b2485cc1b79fd0

I just haven't had the time to warrant a new binary yet, as I'm trying to knock out more things.
[Android Software Development] nerotix:
Ah I see. I don't wanna ask for ETA's.. but is the release any close or?:)
[Android Software Development] brainmaster:
Maybe, compile a new Beta build? It would be great.
[Android Software Development] nerotix:
I'd love to, tho, never done it before.. would I compile it just like a rom or? Else I could use a ROM guide for compiling.
[Android Software Development] kuano:
Here you go.

https://code.google.com/p/android-apktool/wiki/BuildApktool
[Android Software Development] nerotix:
[MENTION=3924617]iBotPeaches[/MENTION] I managed to build the apktool.jar which is fully named "apktool-cli-2.0.0-Beta8.jar" but it's only 11kb? That can't be correct right? Since the old apktool.jar is like 2.5Mb. Any input?

---------- Post added at 09:25 PM ---------- Previous post was at 09:18 PM ----------

NVM I managed to build it correctly now I think, 1 is like 12 mb but there's also a 'small' jar which is 8.something.

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

[MENTION=3924617]iBotPeaches[/MENTION] I just succesfully build the apktool beta 8. It built 2 files, one called "apktool-cli-2.0.0-Beta8" and one called "apktool-cli-2.0.0-Beta8-small" Does it matter which one I use? Both seemed to work, just curious what the difference is. Also, with the Beta 8 apktool, I was able to compile my framework-res.apk without the errors I mentioned a few posts earlier. Thanks for your work on the project.
[Android Software Development] brainmaster:
Would you be so kind to share it - since I have the same problem as you with my framework?
[Android Software Development] nerotix:
Check your PM.. I'm not sure if [MENTION=3924617]iBotPeaches[/MENTION] would want me to share it here, publicly.

Edit: If people need the beta 8 of apktool, feel free to PM me.
[Android Software Development] nerotix:
[MENTION=2569965]du bist krank[/MENTION]

U PM'd me about the apktool. However you have turned off to receive PM's. Or you're not allowed to receive PM's. So I'll have to do it this way.

I dont mind giving you my beta 8 apktool. However, translations errors are fine, they always give them on 4.4. Or even on 4.3 I believe. U can ignore the translation warnings, the compiling went succesful.

If u still want the beta 8 apktool, lemme know.
[Android Software Development] Warrior1975:
Hello. I am having an issue recompiling. I did a test to make sure I could, but it failed. I successfully decompiled the apk, immediately afterwards, I recompiled, however it gave me the following error message:

Sorry...pastebin, I hope I did this right:

http://pastebin.com/gk89usXe

I am not sure what I did wrong...I am not good at this, just learning. If I had to venture a guess, I'd say I didn't set something up correctly. SDK? I was decompiling SwiftKey, Note 3, stock (slightly modified), deodexed, Tmobile variant.
[Android Software Development] brainmaster:
I got my version from [MENTION=3826624]nerotix[/MENTION], but someone here in the APK MultiTool Thread have also posted a fresh compiled Beta8.
[Android Software Development] kongaz2:
I got this error when installing SemcGenericUxpRes.apk from Xperia Z 4.3 ?

E:\Apktool>apktool if SemcGenericUxpRes.apk
Exception in thread "main" brut.androlib.AndrolibException: Multiple types: <emp
ty>
at brut.androlib.res.data.ResPackage.addType(ResPackage.java:172)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:131)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
9)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource
s.java:687)
at brut.androlib.Androlib.installFramework(Androlib.java:640)
at brut.apktool.Main.cmdInstallFramework(Main.java:252)
at brut.apktool.Main.main(Main.java:91)
[Android Software Development] Mobzter:
it seems like its telling you to install framework first by looks of things.. you could perhaps try use that 'if' command for the framework-res.apk first? best of luck mate
[Android Software Development] Shamestick:
I have been trying to set up apktool1.5.2 on my mac (running osx 10.9). I have both the 1.5.2 tar.bz2 and the macosx specific tar.bz2. I have tried the following commands from another guide but to no avail, any help would be appreciated.
[Android Software Development] asdfasdfvful:
I myself have also fallen prey to many issues. I'm trying to follow team blackout's guide in modding apks, but the compiling always fails. So far, only their posted dropbox test apk works. When I install my framework, I get this issue (pastebin). I've tried decompiling (which works) and compiling many apps, like fb, messenger, snapchat etc without success. Can anyone tell me if I did anything wrong?

Here's a pastebin of what happens when I do it with ask.fm (which is a small app). Is this the framework's fault, the app's fault, or the program's fault?

Edit: I'm also sure that I have the latest java and .net framework if it makes a difference
[Android Software Development] molver:
I couldn't add SlimROM‘s framework-res, anyone knows how to solve it ?

apktool if framework-res.apk

Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:

spec=0x01080220 drawable/default_wallpaper, config=-sw600dp-nodpi

at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)

at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)

at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:199)

at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:168

)

at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:134)

at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10

9)

at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)

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

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)

at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource

s.java:686)

at brut.androlib.Androlib.installFramework(Androlib.java:640)

at brut.apktool.Main.cmdInstallFramework(Main.java:249)

at brut.apktool.Main.main(Main.java:91)
[Android Software Development] Dirk64:
Slim has it's own Apktool, see here

https://github.com/SlimRoms/apktool

Sent from Google N5...
[Android Software Development] LoLaTiOn:
i have exactly this error with lasted framework-res of slimkat only and the git of apktoolslim is dead since 7 months and no working for android 4.4.x

For KK4.4, apktool 2.0.0b8 can be used for any framework-res.apk but TRDS 3 unknow for all 4.4 rom

realy need help !!!
[Android Software Development] molver:
already tried this,still not working,
[Android Software Development] ag4751:
Guys, don't know if the will help you but it does work on 4.3 should work for 4.4 although there are decompiling errors on SystemUI, Contacts etc, frameworks seem to work fine, if you want to give it a try, download the zip and place the files enclosed into your APK folder on your PC, copy your current ones to another location first in case you need to put them back.

Files in the zip are

aapt.exe - 23-Nov-13 version

apktool.bat - 23-Dec-12 version

apktool.jar - 2.0.0b8.jar version
[Android Software Development] Bejda:
Indeed it's probably related to TRDS 3.0.
[Android Software Development] silverbios:
any idea?:confused::(
[Android Software Development] iBotPeaches:
There is already a bug report for that here: http://code.google.com/p/android-apktool/issues/detail?id=578 , but no I haven't looked into yet. Once we fix this Google app bug, then regular bug fixing will come. Either way, PR's are always welcome.

EDIT: This bug has been fixed.
[Android Software Development] Shaftamle:
REALLY????

Like the one from this issue?
[Android Software Development] TeamBlackOut:
This worked perfect on Spotify, one glitch. I couldn't change the FB string in the manifest. Changing it causes a crash when logging in with FB. Left it stock, I did change 3 other strings and it worked perfect. Just an FYI. Thanks a ton for this

This is

Dafoxs from TBO

TBO on Facebook

Team Black Out
[Android Software Development] iBotPeaches:
Yes. I'll be tweaking Apktool today to try and make the changes automated and will hopefully get to close that bug report.

The only thing I see is a weird folder name consisting of underscores and dots. Why not rename it to just VENOM and try that.

Glad it worked out. We are still trying to understand the pattern. I think the FB one didn't work, because it might be trying to callback to a FB SDK / App which wouldn't have the same package ID as the rest. (just a thought).
[Android Software Development] Dunc001:
Yeah, wondered that myself but even using ViperONE420 or even just Venom I still get that error. I have all of the framework apks and jars from the ROM in a single folder named 'framework' on my desktop and ViperONE_4.2.0 was the tag I was using in VTS to identify the frameworks once installed. The apktool destination folder is C:\Users\Duncan & Michaela\apktool\framework which it has been for several years and I've never had a problem in the past installing frameworks.
[Android Software Development] TeamBlackOut:
It seems to be the "provider" strings. Just did Google currents and it needed the actual address in manifest, not the [MENTION=936943]string[/MENTION]/ stuff. Works perfect now. Time to black it out...

TBO on Facebook

Team Black Out
[Android Software Development] djdarkknight96:
I knew ibotpeaches wouldn't let us down... thanks again my friend!

DJ
[Android Software Development] TeamBlackOut:
Just did Gmail 4.7.2 black and clear. Not sure if it was in 4.7.1. There is 2 strings in the permissions. The end ones are linked to text strings. The actual string ends with a period. I just removed the entire string entry. These are the ones that are at the very end of lines 2 thru 6 in the manifest. Works perfect now

TBO on Facebook

Team Black Out
[Android Software Development] DeNitE:
Anyone know how I can create a bat file to batch compile all my themes?

I tried this and it doesn't work... it compiles the first theme... and then stops...

cd/

cd apktool

apktool b acidblue

apktool b acidgreen

Suggestions?
[Android Software Development] Ticklefish:
Are you using Windows?
[Android Software Development] DeNitE:
Yes... I use apktool from the Dos prompt now...
[Android Software Development] Phone_Guru:
Not clear. Could you please post the first few lines of the androidmanifest that you used?
[Android Software Development] TeamBlackOut:
This is the working one

TBO on Facebook

Team Black Out
[Android Software Development] L_S:
Any news about bug in install framework-res.apk of roms kitkat with dark ui option? I tried install framework-res.apk of cyanfox and slimkat and in both has error :( From cyanogenmod 11 install, decompile, recompile normally.

PS:If necessary just say that I copy and paste the error log here
[Android Software Development] iBotPeaches:
Those ROMs have an additional qualifier not in AOSP. Lars forked Apktool and added the changes. Its a bit out of date compared to now, but it should work nonetheless (i hope :p) https://github.com/SlimRoms/apktool

Note: This apktool is ONLY for those who are using "inverted" roms like quoted.
[Android Software Development] L_S:
Because I installed the framework-res.apk, decompiled, edited and recompiled the systemui.apk of this jb rom: http://xdaforums.com/showthread.php?t=2444666 with TRDS using apktool 1.5.2 native from apkmultitool.

So I thought u did support native roms like cyanfox, carbon, slimroms, etc and an update was necessary for the full operation with new kk, Sorry anything ;)
[Android Software Development] zelendel:
This one doesn't work with slimroms new 's set up. No longer are they using inverted folders but are using holo dark and holo light folders in prep for their new theme engine.

Bat cave One
[Android Software Development] iBotPeaches:
Thanks, guess it won't work then. Someone can find the commit where these additional qualifiers are made and patch apktool and aapt and you'll be good to go.

(this is why it's not in mainline apktool, changes too often with not a good solid location to follow news, these changes probably don't retain BC)
[Android Software Development] Akalsemann:
del
[Android Software Development] vmancini3:
Don't you mean "rm"...? :p:D lol
[Android Software Development] Phone_Guru:
I tried using the manifest from your modded version but still an error? Which version of APKTool did you use? Did you include the original manifest in the recompiled apk or the new one. I only want to flash the resources but maybe this makes a difference.

Thanks
[Android Software Development] TeamBlackOut:
I started from scratch, keep it all together like a normal app. Built it as a data app. Nothing out of the ordinary. Not sure why you are flashing resources. I've decompiled it and compiled it a zillion times with no issues after the manifest fixes. There is at least a dozen edits done to the manifest. What dies your log say?

TBO on Facebook

Team Black Out
[Android Software Development] MaD_Mike_Nsk:
Is this tool support 4.4.2 KitKat?
[Android Software Development] L_S:
Yes, but some roms (i think all with dark ui option like slimkat, cyanfox) get error when install framework-res.apk. I tried with cm11 and omnirom and works perfect.
[Android Software Development] zelendel:
Don't count on omni for long. They are adding slims theme toggle.

Bat cave One
[Android Software Development] m4570d0n:
This is the commit for frameworks_base for TDRS 3.0 in SlimRoms, PAC-man, etc.

fb: TRDS 3.0 and new theme engine preparation (1/4)

Assuming one added that patch to build a new appt, what changes would one need to make to Apktool? I assume it would require modifying ResConfigFlags.java and ARSCDecoder.java, but I'm not sure if there is more to it than that.

For reference, this was the commit for TRDS 2.0 in Slim's version of Apktool for jb 4.3, which was a significant departure from the TRDS 1.0 change that was included in your Apktool source awhile back (which has since been removed).

Apktool: TRDS 2.0
[Android Software Development] iBotPeaches:
The /tmp directory where aapt is placed for execution could not be executed. Maybe I should allow users to pick where temporary files go for situations like this (via an advance parameter of course).

Can't run aapt. If you can't type "aapt" at command line, and have the usage output pop-up. Then Apktool 1.5.2 or less won't work.

2.x requires Java7.
[Android Software Development] claytonjn:
Thanks for the fast response!

I was thinking the same thing regarding the /tmp directory because in PC I have the OS installed on a PCIe SSD but my user files are on a separate HDD. I thought that might be causing some permission errors but I tried running from the C:\ drive to no avail. That's why I tried doing it in the linux virtual box because I was hoping it would remedy the permission error.

running the aapt command gives me

bash /usr/local/bin/aapt: Permission denied

If I run sudo aapt then I get the output of all the usage. Unfortunately I don't have a ton of experience with linux so I don't know the best way to remedy the permission conflict.

D'oh. I forgot how long it's been since I was building PA. I'll update to Java 7 and see what happens.

EDIT: Installed Java 7, now I'm getting the same error with 2.0.0 as I got with 1.5.2
[Android Software Development] Phone_Guru:
Can someone build the latest version of Apktool for me including the change from a day ago?

IBotPeaches, is this the fix for the Google apps?
[Android Software Development] iBotPeaches:
The problem with Google Apps is two different bugs. Incorrectly using --rename-manifest-package and public resources. The first, being incorrectly using --rename-manifest-package has been fixed. However, the other bug causes just as many problems, so your applications still won't work. Unless you follow the explanation I had a few pages back.

Right now, we are investigating a few things. Our "public.xml" file in which we use to maintain constant resource ids is forcing those ids to be public. Once public, it appears in Android 4.3+, references to public resources (pkg id 0x01) are not allowed in AndroidManifest.xml. So our change to keep constant resource ids, is also causing the problems.

What we need is a "private.xml", retain resource ids + have control of pkg id. We are working on a few paths of attack, hopefully without needing to modify AAPT directly.
[Android Software Development] starbucks2010:
I'm trying to decompile SecPhone.apk from ROM FoxHound v3.6 (JB 4.3 ML6) using apktool v1.5.2 and I'm getting many

S: Could not decode file, replacing by FALSE value: drawable-mcc450-mnc5-sw359dp

-xxhdpi/call_hd_voice_call_icon_dim.png

Is there a way to fix these errors?

Thank you.