yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Vihru:
i have problem with apktool, i decompile some apk, then i try compile it back to apk.. it gives me error. it dont work with some apks and i dont know why? can someone help? thanks. Look that content, there is error text.

F:\apk>apktool d calendar.apk calendar

I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

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

I: Loaded.

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Done.

I: Copying assets and libs...

F:\apk>apktool b calendar calendar_new.apk

I: Checking whether sources has changed...

I: Smaling...

I: Checking whether resources has changed...

I: Building resources...

F:\apk\calendar\res\xml\widget.xml:2: error: No resource identifier found for at

tribute 'widgetCategory' in package 'android'

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

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

sdk-version, 11, --target-sdk-version, 17, -F, C:\Users\Vihru\AppData\Local\Temp

\APKTOOL3981908095600368547.tmp, -0, arsc, -I, C:\Users\Vihru\apktool\framework\

1.apk, -S, F:\apk\calendar\res, -M, F:\apk\calendar\AndroidManifest.xml]

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

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

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

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

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

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

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

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

\Users\Vihru\AppData\Local\Temp\APKTOOL3981908095600368547.tmp, -0, arsc, -I, C:

\Users\Vihru\apktool\framework\1.apk, -S, F:\apk\calendar\res, -M, F:\apk\calend

ar\AndroidManifest.xml]

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

a:357)

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

... 5 more

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

k-version, 11, --target-sdk-version, 17, -F, C:\Users\Vihru\AppData\Local\Temp\A

PKTOOL3981908095600368547.tmp, -0, arsc, -I, C:\Users\Vihru\apktool\framework\1.

apk, -S, F:\apk\calendar\res, -M, F:\apk\calendar\AndroidManifest.xml]

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

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

a:355)

... 6 more
[Android Software Development] plegdroid:
are you using the.newest aapt & apktool from the OP?

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] Whipon:
I need assistance, please

Greetings:

I'm having an issue with APKTOOL. I've tried everything but It allways outputs the same error log.

I'm triying to compile World At Arms 1.0.8. I just modified a *.so file to cheat the game a bit.

I have Windows 8 Pro X64.

I've installed:

Android SDK

Android Platform Tools by its Installer

JAVA JRE

JAVA SDK

Modified my path variable to include all android sdk directories.

Added the JAVA_HOME variable to environment variables.

Installed all the framework apks, the 3 of them are from the same rom.

Here's the log results:

http://pastebin.com/nS3T0gvh

I've browsed this topic, and tried some of the suggestions, but couldn't find a solution to this issue. I really don't know what else I can do to fix it. If I overlooked something, I apologize, the topic is huge.

I'll really appreciate any help.

Thanks in advance.

Whipon.
[Android Software Development] zelendel:
The errors are saying there is something wrong with the pngs in a few folders. What also could be an issue is that alot of developers are making their apks break if they are decompiled. To prevent just what you are trying to do.
[Android Software Development] Bejda:
Hi,sorry to get back on this but i just don't know who i should start bothering with that now (..so i start here lol,sorry again).

I could make an apktool1.5.3 snapshot and it's ok now with Slim rom's framework but others rom using TRDS feature keeps giving multiple resources errors.

I guess i have to talk about this on concerned rom's topics of course but would like to point more directly to related part...

Is this:

the reason why error still occurs on others roms?Should they do the same on their sources or something?

Sorry i'm pretty noob and don't understand the whole story :)
[Android Software Development] boncaunhaquynhanh:
i try to decompile and recompile (not change everything) Phonesky.apk (Google Play) 4.0.25 lastest. But got error, who can help me :cowboy:

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 8, --target-sdk-version, 14, -F, C:\Users\\AppData\Local\Tem
p\APKTOOL2095748971035764179.tmp, -0, arsc, -I, C:\Users\\apktool\framewo
rk\1.apk, -S, C:\Users\\Desktop\Complain\a\res, -M, C:\Users\\Desk
top\Com\a\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 8, --target-sdk-version, 14, -F, C:\
Users\\AppData\Local\Temp\APKTOOL2095748971035764179.tmp, -0, arsc, -I, C
:\Users\\apktool\framework\1.apk, -S, C:\Users\\Desktop\Com\a
\res, -M, C:\Users\\Desktop\Com\a\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 8, --target-sdk-version, 14, -F, C:\Users\\AppData\Local\Temp\
APKTOOL2095748971035764179.tmp, -0, arsc, -I, C:\Users\\apktool\framework
\1.apk, -S, C:\Users\\Desktop\Complain\a\res, -M, C:\Users\\Deskto
p\Complain\a\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
[Android Software Development] iBotPeaches:
I see the problem now, which is weird because this is the same problem I get on some other APKs. The good thing about this though, is we can get the original source of that apk. I was wondering if someone could send me a ZIP file of the source of SLIM rom framework-res (not the apk). If not, I'll just try and find some free time to pull down its source and build the ROM.
[Android Software Development] ghoster76:
Hope APKTool keeping up to date> ApkTool 1.5.3 Snapshot couldn't help me decompile new frameworks :fingers-crossed:
[Android Software Development] jakTomas:
i'm having this error on 4.2.2 roms , but not all :/

C:\Users\abed>apktool d Phone.apk ./1

I: Baksmaling...

I: Loading resource table...

Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f02005c drawable/grayBg, config=[DEFAULT]

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

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

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

at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:170)

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

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

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

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

at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)

at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)

at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)

at brut.androlib.Androlib.getResTable(Androlib.java:50)

at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)

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

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

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

HELP PLZ
[Android Software Development] steal25:
IBot not sure if your aware of these new folders, I found reference to them in Settings.apk for Sense5, im pretty sure these are the folders in com.htc.resources.apk that result in ERR. Maybe you can add support for these folders?

"values-xxhdpi-sfont"

"values-xxhdpi-lfont"

"values-xxhdpi-xlfont"

"values-xxhdpi-xxlfont"
[Android Software Development] iamareebjamal:
Hi guys

This problem is out of my reach and I think it's related to corrupted .9.png files

I tried Apk Multitool too but no luck, should I let apktool use its framework to decompile it instead of using the framework-res.apk of this ROM(I am currently doing it[apktool if framework-res.apk])

But, How can I fix it?

Thanks in advance

~/Desktop > java -jar apktool.jar d SystemUI.apk SystemUI
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/d/apktool/framework/1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
at sun.awt.image.ByteInterleavedRaster.setDataElements(Unknown Source)
at java.awt.image.BufferedImage.setRGB(Unknown Source)
at brut.androlib.res.decoder.Res9patchStreamDecoder.drawVLine(Res9patchStreamDecoder.java:99)
at brut.androlib.res.decoder.Res9patchStreamDecoder.decode(Res9patchStreamDecoder.java:58)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:107)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:73)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:238)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
[Android Software Development] RomWiz:
I have no idea what i'm doing wrong here but my setup wizard is crashing when i compiled it, so i tried putting originall files in /app/build/apk/ and the compile but it did not help, any help please?
[Android Software Development] iamareebjamal:
You signed it?
[Android Software Development] djmatt604:
Agreed. Make sure you have the right signature files in your apk. If needed you can just grab them from the original apk and inject them into the modded package with 7zip or a similar tool.

Sent from my Infamous Jelliness.
[Android Software Development] djdarkknight96:
Get a log? Also make sure it has the META-INF folder from the original apk or sign it with apk manager.
[Android Software Development] RomWiz:
Since it is a system app i wont sign it because you will break it, and i have put the meta-inf folder in the apk.
[Android Software Development] iamareebjamal:
I know, you shouldn't sign a system file

But you must retain original signature

And after intensive smali and xml editing, I have seen devs requiring to sign system apps too

Eg:1. Statusbar greper

2. http://xdaforums.com/showthread.php?t=2206938

---------- Post added at 02:13 AM ---------- Previous post was at 02:08 AM ----------

Does anybody knows solution of this?
[Android Software Development] kufikugel:
so sorry...I am late again lol.....to much work at the moment :(

Can you say me on which rom that happened? I did not tried all only the bigger ones...and there it was fine. Of course on the one which released with the new pushed up qualifier.

As I saw someone already pushed a frameworks for you....can I help? As I said till now I did not had issues.....maybe I decompile the wrong apk's hehe

thanks and cheers and keep up the good work,

Lars
[Android Software Development] iBotPeaches:
Someone posted an APK, but it was the APK. I need like the source prior to the built apk. I'm pretty busy with school and work right now, so no hurry. I haven't pushed an update to Apktool in like 10 days been behind in stuff.
[Android Software Development] Bejda:
Many thanks for your attention Kufikugel :)

Too much work and what a work on android side! What you're doing with Slim is just amazing.

Well that's exactly what i wanted to know but as i said didn't knew who to start bothering with this.

Was on Helly Bean i9000 rom from DerTeufel (wich is declined for many other devices).

So it seems indeed that i have to give all infos i can to DerTeufel specifically the new qualifier part? (maybe he knew about it and pushed it meanwhile btw,dunno..maybe i'll test again with next Helly rom before asking)

Another apps gave me multiple resources error at decompiling but it was LiquidRom toggleable (SlimTeam copyright ;) ) Mms.apk with Slim framework installed.It's just that i wanted to know more about this Mms.apk cause i noticed that ,on Helly Bean, switch to dark wasn't applied to Slim gapps (Toggleables Aroma installer ones) but was well applied to that Mms.apk ..well that's another story,i just wanted to understand why,experiment and all.
[Android Software Development] ghoster76:
Sounds bad
[Android Software Development] sean.trinidade:
Guys, sorry for the noob question, but have tried searching the thread and haven't seen any answers. Have been trying to use this to make modifications to SystemUI.apk on Sense 5, but am getting loads of errors when I decompile/recompile the apk. I've installed the framework and resources file etc. but it always give loads of errors.

I know that HTC files are slightly different, but I can see that people have released mods for it, so I presume that there must be a way how.

Any help would be gratefully recieved! Thanks.
[Android Software Development] plegdroid:
could you post the errors, so someone may help you . :)

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] sean.trinidade:
Thanks. I've included the output from the command window.

All I did was change the hex code for the status_bar_background (in public.xml) to make it black instead of grey!
[Android Software Development] ghoster76:
I don't have HTC Device but I think you should change this in the colors.xml and styles.xml not public.xml
[Android Software Development] sean.trinidade:
Neither of those contain references to the actual status_bar_background, which is why I changed public.xml.

However, I guess that still doesn't explain the errors I'm getting? I guess no matter which xml file I change, it'll complile with issues?
[Android Software Development] zelendel:
Sense based roms are controlled by the HTC frameworks apk. What you are looking for is in the system UI drawables folder and the drawables folder in the frameworks files. For HTC devices it is ref in like 6 places that all need to be changed

Wayne Tech S-III
[Android Software Development] sean.trinidade:
So are you saying that I need to modify both framework.apk and systemui.apk? sorry again for the noob question, but figured it was about time I learnt to do some of the simple things myslef! :)
[Android Software Development] plegdroid:
have a look at the above mentioned XML at line number 2. its stating the value 0 is not usable . it may require a value like 0.0? have a look for similar line's and to what format they present themselves in. and use the same type .

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] HackitZ:
thanks, it's working if i dont change that.

funny thing is the code is from android 4.1 it's also a sony, just a different version.

thanks for the time you took to reply.
[Android Software Development] brijmathew:
Please help

Hey all,

I've got JRE 7, windows 8 x64 and aapt, apktool, signapk etc from ibots github.

I installed the frameworks framework-res.apk, framework-miui-res.apk.

I've been trying to learn how to decompile and recompile miuisystemui.apk which is based on Samsung s3 JB 4.1.1 ( 3.4.19 ).

The decompilation works flawlessly. Recompiling doesn't show any errors but when I flash the apk...my status bar disappears...even if I didn't modify any binary file. i even tried signing the apk by signapk.jar (testkey.pk8)

I also tried injecting the resources.arsc (to retain original sign) file from the modded to the original but keep running into the same problem.

Much appreciated if someone can help me out :)
[Android Software Development] asrock37:
if ever do not touch anything from the original aside from these files and folders: 1. res 2. resources.arsc 3. classes.dex the rest should be from the original
[Android Software Development] plegdroid:
as above, move the modded, dex,arsc and res from your build folder(gets made after recompiling ), and replace within the original apk with 7-zip or the like. you wouldn't need to sign a system apk.

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] brijmathew:
Hey guys,

Did exactly what you said..still same problem. No status bar and a frequent SystemUI.apk force close popup :(
[Android Software Development] plegdroid:
could try taking the newmiuisystem.apk, rename it to miuisystem.apk ,and see if that out of the box works.

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] brijmathew:
Tried that too...no luck...

The size of the modded apk (~1.6mb) is way smaller than the original apk (~2.1mb). Could that be the problem?
[Android Software Development] pinky059:
Signature checks disabled in services.jar?
[Android Software Development] brijmathew:
Oh I missed that...will give it a shot and let you know...thanks mate..
[Android Software Development] ghoster76:
Any new about the multi resources apktool?
[Android Software Development] iBotPeaches:
What is that?
[Android Software Development] Bejda:
According to what kufikugel said he even took from his time to test installing framework of others rom using TRDS Slim feature and it was ok until they pushed new qualifier so wait for your Dev to do the same and try.

I already relayed the whole discussion to DerTeufel. He said he'll do it but tend to forget,a little polite reminder post on your SGH-I897 Helly Bean thread could be useful ;)
[Android Software Development] kufikugel:
hehe so same situation for us.....I will look that you get it from me next days

thanks :) we try to do our best.

about HellyBean....yes Dominik (derTeufel) already talked with me about.....and yes he forgot to push the new qualifier :p so that is the reason. Liquid already merged it....but not sure if they already published it in a new build. So more or less you need to wait that the dev's push it.

https://github.com/LiquidSmooth/and...mmit/04a6898376e4e1318dd6cda67a42edf86357238c (6 days ago)

and yes DerTeufel....remind him again :p all other as I see already updated. (carbon, rootbox etc)

cheers

Lars
[Android Software Development] lichti1901:
cheers? Are you serious? Where is my money dude?

Gesendet von meinem Nexus 4 mit Tapatalk 2
[Android Software Development] Bejda:
Hi all,

I'm facing an issue that seems general and i didn't found any clue anywhere about it until now.

The thing is any modification made on Settings.apk gives FC on Settings>Security>SMS message limit (if you re-inject resources.arsc into your modded Settings.apk it's ok but,well,it breaks the mod).

As for me the device is SGSI9000 running cm10.1or AOKP based rom (happens on both) but i've seen reports about it here and there at least on Galaxy Nexus and Galaxy S 2 (I9100 & SGH-I777) threads running same based rom's.

When compiling it gives missing translations warnings such as this:

https://dl.dropboxusercontent.com/u/25071013/SettingsBuildLog.txt

But usually that's just warnings so probably not related.

I have a log of the force close (maybe too partial though,sorry):

https://dl.dropboxusercontent.com/u/25071013/SettingsFc.txt

Any hint would help,thanks for reading.
[Android Software Development] ghoster76:
Any update? I supposed that we could duel this thing but...
[Android Software Development] Bejda:
Any update from where?

You have to build apktool 1.5.3 yourself to handle framework using TRDS feature but it still won't work with Helly Bean until DerTeufel push some changes into his sources ;)

Sent you PM.
[Android Software Development] ghoster76:
Thanks for sending me the apktool 1.5.3 but I had built it long time ago, anyway I have to wait and wait. I wonder why they put multi resources into their rom, it's bull****, useless :banghead:
[Android Software Development] sandy7:
having an error while recompiling framework-res.apk

edit the apktool.yml with '2-3-4-5' id's
[Android Software Development] iBotPeaches:
Reading the actual error makes this pretty obvious. It couldn't find the frameworks. You must if|install them. Here they are (the dummy frameworks required for framework-miui-res)

http://miui.connortumbleson.com/other/apktool/frameworks/
[Android Software Development] sandy7:
ya i got the same ans in miui forum...added dummy fw...and it recompiled perfectly..

thank u
[Android Software Development] xxhorseriderxxx:
I'm trying to recompile the SystemUI.apk from the Tmobile Galaxy S4 and am getting an error. Decompile runs flawlessly. I'm using the latest 1.5.2 apktool. I made sure that I installed the framework-res.apk as well; still the same error.

https://dl.dropboxusercontent.com/u/31200835/framework-res.apk

https://dl.dropboxusercontent.com/u/31200835/SystemUI.apk

https://dl.dropboxusercontent.com/u/31200835/twframework-res.apk
[Android Software Development] jakTomas:
any new news about apktool 1.5.3 ??
[Android Software Development] iBotPeaches:
1.5.3 is being merged into 2.0 which will hopefully see a release in 1.5 months. Only 3 bugs left and a lot of testing / documentation to write.
[Android Software Development] jakTomas:
good luck :)

u r doing all of us a huge favor :) thx :)
[Android Software Development] sandy7:
Well what error u get...

I actually know less about Samsung fw....it also has a tw-framework if iam not wrong..I think u need to install that also
[Android Software Development] Spannaa:
Yes, both frameworks need to be installed.
[Android Software Development] sandy7:
u have the latest aapt? if not try updating it
[Android Software Development] xxhorseriderxxx:
I have the latest aapt from the OP installed in my platform-tools folder with my path variable set to that folder. I was hoping that by uploading my two files that someöne would try it and confirm if it's a problem with my system or not. Can you try out decompiling and recompiling the systemUI.apk?
[Android Software Development] sandy7:
pm me the files ill try
[Android Software Development] texture:
Hi, i have a problem with apktool 1.5.2 and one frameworks file.

I have an Oppo Find 5,if i decompile,modify and recompile framework-res.apk all works better.

If i decompile oppo-framework-res.apk and recompile without changes,the new apk don't work. If i decompile again the new apk i have a lot of error.

This is the log file: see attached txt file

And these are the original apk: http://d-h.st/02a

I don't understand why if i recompile oppo-framework-res.apk without changes i don't receive errors from apktool (on the phone file don't work),and if decompile recompiled apk i find lot of errore and decompiling aborting.

Anyone have an idea where is my problem?

Thanks
[Android Software Development] Jamison904:
Same here. Working on Offical M919UVUAMDL (T-mobile S4 4.2.2 firmware.) Tried to even do them manually with smali.jar but whole different errors. For time and sanity sake I deleted my old setup and download new and Chown -R then sudo chmod +x them, moved to usr/local/bin. Decompiled and tried to compile... no go. Funny thing is some apks like SecSettings.apk works but SystemUI.apk does not. Ideas?

http://pastebin.com/rr16GuJM