yashsingh1/xdaforums huggingface dataset:
[Desire HD Android Development] kifac:
ahahah i wish! iv never been there :/ Its either i was never of age (well now i am) because family would always go for the casinos and such :/

I should plan a trip down there sometime lol.

Toronto is where its at though.
[Desire HD Android Development] Taimur Akmal:
I just gave you a thanks. Not just a thanks but a THANKS to comlete your 2000 thank meter! :D
[Desire HD Android Development] agat63:
Thanks but I really prefer to earn them and not just get them....;)
[Desire HD Android Development] freeza:
Can someone upload the file from the OP? It is no longer available.
[Desire HD Android Development] agat63:
Try updated tool from this thread:

http://xdaforums.com/showthread.php?t=1577025
[Desire HD Android Development] Cuppeerr:
aw freeza couldn't find a file;)
[Desire HD Android Development] AllAboutAndroids:
Hey folks, I just started off editing APKs and so far I can easily decompile whichever one I want. I go in and edit all images found in the Drawable folders BUT this is where my issue comes into play. I cannot recompile the APK. It gives a very famous error "INVALID RESOURCE DIRECTORY" however, the only ting I changed was the images. I saved them in the exact same format and left the naming the same. Anyone know a fix for this?

NOTE: I have already set the IF with my ROM's Framework-res and I have used APKTOOL 1.4.3 as well as the modded 1.4.2. Also weirdly enough, I decompiled Launcher2.apk and then without editing, I ran the Build so Compiling and it gave the same "Invalid Resource Directory" issue...so any help would be appreciated :D

EDIT: Here are 2 screenshots: https://docs.google.com/folder/d/0B-NvHMKK7IuARXRHR2t5a0x0dlE/edit

Thanks!
[Desire HD Android Development] hunti:
the apktool link is dead
[Desire HD Android Development] agat63:
Did you install framework using option 1 in menu?

---------- Post added at 10:47 AM ---------- Previous post was at 10:45 AM ----------

Try this tool.

http://d-h.st/vjr

This is autoapktool created by xavierjohn22 and modified by me for ICS apps, dex and jar's.

You can read more about tool in this thread:

http://xdaforums.com/showthread.php?t=1577025
[Desire HD Android Development] sniperkill:
Does anyone on xda have a copy of this AutoXdaTool 2.0.0? OP, can you post another working link?
[Desire HD Android Development] agat63:
AutoXDAtool or xdaAutotool?

Did you check this thread:

http://xdaforums.com/showthread.php?t=1053227
[Desire HD Android Development] sniperkill:
Thanks, but I cant get none of those tools to work with decompiling a ICS Sense 4.0 Settings.apk. I need the AutoXdaTool 2.0.0, the one the OP posted. Someone's gotta have a copy of version 2.0.0 somewhere. As I'm sure you know, the OP posted a link to the tool I need which is now a dead link :-(

Edit: Heres the Settings apk I'm trying to decompile attached. It's from a Sense 4.0 Rom HTC Evo 3D. I'm trying to upload the framework-res.apk atm.
[Desire HD Android Development] agat63:
Have you tried my modified 2.0.4a.

http://xdaforums.com/showthread.php?t=1577025

I did add options for ICS apps (decompile and recompile and it has been tested on few phones).

Also added baksmali/smali for dex and jar files.

If you haven't try it give it a shot.

Make sure you download 4a. It has aapt.exe for API15 (ICS).
[Desire HD Android Development] sniperkill:
Yeah, I've tried that also. I even ran the "apktool if framework-res.apk" command. I dont know what im doing wrong here. I'll upload the errer and the Settings.apk, and my framework-res.apk if perhaps you'd wanna look into it more. Hold on a sec.

Edit: Here's the error I'm getting

C:\APK>apktool d Settings.apk

I: Baksmaling...

Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78

0a 30 33 36 00

at org.jf.dexlib.DexFile.<init>(DexFile.java:377)

at org.jf.dexlib.DexFile.<init>(DexFile.java:274)

at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:48)

at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)

at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)

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

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

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

C:\APK>

C:\APK>apktool d Settings.apk

I: Baksmaling...

Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78

0a 30 33 36 00

at org.jf.dexlib.DexFile.<init>(DexFile.java:377)

at org.jf.dexlib.DexFile.<init>(DexFile.java:274)

at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:48)

at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)

at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)

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

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

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

C:\APK>
[Desire HD Android Development] agat63:
I've got that error with old apktool when trying to decompile deodexed app.

It had a problem with classes.dex

Menu option 14 from my tool is taking classes.dex out of app, decompiles it and than putting it back for future compile.

Haven't seen bad magic error on any of odexed apps.

I don't know what to say.

Edit: I'm on E4GT and don't have an HTC and/or framework files for it. I can't recompile an HTC app without framework.

Right now I'm on linux and trying some stuff. But if you give me both framework apps I can give it a shot tomorrow.
[Desire HD Android Development] sniperkill:
Okay, it wouldn't let me add this attachment to my other post so I had to start another one. Here's my framework-res.apk from the rom im using if it helps me out at all, lol.. Thank you for your time buddy..
[Desire HD Android Development] sniperkill:
Ahhh, I see. So it's cuz of my rom being deodexed? I'll give it another try real quick. I'll post back my findings. So if I give you my com.htc.resources in addition to the other files I uploaded, you'll look into it for me? Here's my Dropbox link to my com.htc.resources.apk. It was too big for xda to let me upload it here.

https://dl.dropbox.com/u/15304400/com.htc.resources.rar

Edit: Here's the error I'm getting using your tool

PLEASE CHOOSE TASK: 14

Drag APK here from _INPUT_APK folder: C:\AutoAPKTool2.0.4\_INPUT_APK\Settings.ap

k

decompiling "_INPUT_APK\Settings.apk"...

Press any key to continue . . .

1 file(s) copied.

1 file(s) copied.

1 file(s) copied.

rebuilding "_INPUT_APK\Settings.apk"...

The system cannot find the file specified.

1 file(s) copied.
[Desire HD Android Development] agat63:
For samsung we use framework-res.apk and twframework-res.apk

For HTC I believe it should be framework-res.apk and something with rosie.

Edit: Just for heck of it try to move classes.dex out from app using 7z (or any other program) and decompile app with option 6 of tool menu without classes.dex.
[Desire HD Android Development] memnoc:
For sense (2,3,3.5,3.6) is framework-res and com.htc.resources

Inviato dal mio Sensation Z710e con Tapatalk 2
[Desire HD Android Development] agat63:
Thanks for input.

Never had HTC device.
[Desire HD Android Development] memnoc:
No problem buddy, and lucky you I would say, sense 4 has FOUR resources files in system/framework! Really annoying OS indeed

Inviato dal mio Sensation Z710e con Tapatalk 2
[Desire HD Android Development] agat63:
LOL.

My old phone was POS samsung moment.

I've got Evo3D at the launch day and couldn't leave with it. Took it back in 2 weeks and went to my old moment while waiting for GSII to come.

Couldn't be happier with my phone. Running strong and easy to work with.

Now I'm looking into GSIII.

I guess I can call myself a die hard Sammy fan.:o
[Desire HD Android Development] sniperkill:
Yes, for HTC Sense it's framework-res.apk and com.htc.resources. If you need anything else just ask. I posted both of those files for you a few posts back. I'm gonna get some sleep so I'll check back here tomorrow to see if you made any progress. I appreciate you looking into this for me homie. Thanks much!!:good:
[Desire HD Android Development] agat63:
I'm about to leave for fishing trip and will be back home tomorrow evening.

So I don't think I can look into it till 5-6 pm PDT.

If you made progress before that let me know.

If I don't hear from you I'll give it a shot.

Cheers.
[Desire HD Android Development] sniperkill:
Sounds like a plan. Good luck tomorrow. I'm on EST on the East Coast, so I'll check back tomorrow night. Thanks again. Or if i make it, i'll let you know.
[Desire HD Android Development] memnoc:
On August I'll buy Nexus 7 hihih I wish a pure aosp experience cause I've always own HTC phones :) anyway let me know if I can help in some way and meanwhile have a good weekend guys ;)

Inviato dal mio Sensation Z710e con Tapatalk 2
[Desire HD Android Development] sniperkill:
I'm not sure if your still available to lend a hand, but I'm still having problems trying to get this Settings.apk decompiled. If you could help me out, pm me please. If not, no biggie.
[Desire HD Android Development] The Scientist95:
Is it possible to crack protected APKs? Because I can't decompile one APK which I think is protected. :(
[Desire HD Android Development] agat63:
I don't think this is legit question.

Forum rules do not allow warez.
[Desire HD Android Development] The Scientist95:
Oh sorry. May I pm you?
[Desire HD Android Development] agat63:
I'm not to good with compiling/decompiling.

I'm not sure I can help you. There are guys out there that are far more skilled than I am.
[Desire HD Android Development] moonfire711:
Hi fellas,

I'm new to trying to decompile apks. Here's the error I get and can't figure out when trying to decompile the SystemUI.apk from my tmobile galaxy s3.

[*] C:\androidsdk\AutoAPKTool2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI.apk
decompiling C:\androidsdk\AutoAPKTool2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI.apk...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f0201c1 drawable/status_bar_background, config=-v13
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:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)

If anyone has any idea what I'm doing wrong, it would be greatly appreciated as I've spent a better half of the day reading through this entire thread and can't find where I am going wrong. Thanks a ton.

I did:

remove classes.dex

load my framework-res.apk

load my twframework-res.apk

tried to decompile SystemUI.apk

fail :crying:
[Desire HD Android Development] agat63:
Try this tool if you haven't yet:

http://xdaforums.com/showthread.php?t=1577025

It has been made/modified for GS2 ICS OS and you don't have to remove classes.dex from app.

Read thru OP and if you have questions ask.
[Desire HD Android Development] WhiteReign:
My problem is thi

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

W: Could not decode attr value, using undecoded value instead: ns=android, name=measureWithLargestChild, value=0xffffffff"

Any ideas it decompiles from what I see but why did I get errors?
[Desire HD Android Development] myfishbear:
links down in the op
[Desire HD Android Development] memnoc:
Check my VTS tutorial out;)

SmartDroid Daemon V 1.2
[Desire HD Android Development] child.prodigy.99:
can some one send me the download link cuz the thats up doesnt work
[Desire HD Android Development] agat63:
Link is at the bottom of the page and it's working.

Just tried it.
[Desire HD Android Development] GigilinE:
who can give me link? in home page link not working :(
[Desire HD Android Development] soleil10:
It is my first visit. I found the link is here: http://xdaforums.com/showthread.php?t=1053227

Check with someone else. Hope can help.

I followed until here and lost...

-----------9) Once recompiling finished, open the decompiled folder, go to "dist" folder, and here you got your edited apk

Where is the decompiled folder?
[Desire HD Android Development] fire_kid2003:
C:\apktool>apktool d DeskClock.apk mod

I: Baksmaling...

Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78

0a 30 33 36 00

at org.jf.dexlib.DexFile.<init>(DexFile.java:377)

at org.jf.dexlib.DexFile.<init>(DexFile.java:274)

at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)

at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)

at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)

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

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

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

PS: (No java error reading experience Have i (Yoda)
[Desire HD Android Development] JU57FL1P:
I have ICS galaxy tab 8.9 modified framework-res.apk, but it won't recompile! with option 7 it just starts and then goes back to selection screen without making an .apk file. with "make an ICS .apk" option it makes a 1kb .apk... any ideas?
[Desire HD Android Development] herobrine_second:
The link to the Auto APKTool is broken. Can someone fix that or provide me to the link to get that version? Thanks.
[Desire HD Android Development] zomer331:
Just search in android development forum

http://xdaforums.com/showthread.php?t=1310151 ;)
[Desire HD Android Development] memnoc:
More specific please...Android version, Sense or not, make sure U follow the guide...saying "never had problem decompiling apk" doesn't mean anything, unless u come here and show us that the SAME apk can be decompiled in another way...also, is clearly stated in the op that U MUST use ApkManager 1.4.1 and no others, what are 4.9/5.0?!

Inviato dal mio HTC Desire HD with Beats Audio usando Tapatalk
[Desire HD Android Development] agat63:
Phone E4GT (Samsung galaxy S II).

Android version 4.0.3

Was using apktool 1.4.1 as stated in OP.

Apkmanager is a tool I used to mod apps for all previous versions of android.

2.1, 2.2, 2.3, 2.3.2, 2.3.4, 2.3.5, 2.3.6.

That tool failed in 4.0.3.

I was getting same error message. So I start looking aroung for newer tool and found this thread.

Downloaded and installed per OP (followed instruction to the "T").

Got error again. Something is not working with those apps and I don't know what.

This is a link to thread started by me with transparent dialer.

http://xdaforums.com/showthread.php?t=1488339

I wanted to make one for ICS as well but so fare wasn't able to decompile neither Contacts. apk nor Phone.apk.
[Desire HD Android Development] memnoc:
did u installed resources files? also additional (if samsung have it)?
[Desire HD Android Development] JusticeAA:
Great Guide!

You may want to add a step about adding the framework-res.apk for the newbies that don't have their's already installed.
[Desire HD Android Development] agat63:
resource files are framework-res.apk and twframework-res.apk.

Both files are in place.

As I stated above I have successfully decompiled and modified those apk for froyo build and GB build. So this is not my first attempt to do this.

However in ICS I wasn't able to decompile those apps and I'm looking for some advise or guidance from people more knowledgeable and experienced than I am.
[Desire HD Android Development] firefds:
Samsung changed some Hex value in the compiled dex code.

It has nothing to do with resources apks or anthing.

If you want to decompile those apks you have to do the follwing:

Using 7zip extract the classes.dex file from the apk and save it somewhere.\

Delete the classes.dex file from the apk.

Now you can decompile the apk using this tutorial.

If you want to decompile the classes.dex to edit the smali code, download baksmali 1.3.2 and smali 1.3.2 and use them to decompile and recompile the classes.dex.

After you recompiled the edited smali code, just drag back in the new classes.dex file you made.

this won't be fixed until Brut will make a new Apktool, or someone inserted the new baksmali/smali code into apktool
[Desire HD Android Development] agat63:
Thanks buddy!!!

Worked like a charm.

File decompiled without any errors and/or problems.

Will work on it and hope it will compile back as well.

I have been trying to decompile it for quite some time now and you told me what it the secret to do this for ICS apps.

Thanks again.
[Desire HD Android Development] memnoc:
i was sure;) this bump in the op, thanks dude
[Desire HD Android Development] MpApQ:
I was looking for tutorial like this. Thanks
[Desire HD Android Development] Swiftks:
Great guide... However, I am running into the same wall that I always to when I try and re-compile the ICS Systemui.apk from my Asus Transformer Prime. I get a aapt.exe crash, followed by the following error:

C:\Users\Troy\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI
recompiling C:\Users\Troy\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI...
I: Smaling...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Troy\AppData\Local\Temp\APKTOOL2330637792693006158.tmp, -I, C:\Users\Troy\apktool\framework\1.apk, -S, C:\Users\Troy\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res, -M, C:\Users\Troy\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java: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:\Users\Troy\AppData\Local\Temp\APKTOOL2330637792693006158.tmp, -I, C:\Users\Troy\apktool\framework\1.apk, -S, C:\Users\Troy\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res, -M, C:\Users\Troy\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more

I made no changes to the systemui, I simply decompiled it (which worked fine) and then recompiled it.

Yes, I did apktool install the framework from the same system, before hand.

I have gotten this error everytime on the systemui, no matter which guide or apktool version I use. The framework-res works without a hitch, but the damn systemui is a ***** that has no mercy! :eek:

Thank you for any help you can throw my way. Me and a few others on the Prime thread are trying to get a % battery mod done for the Prime, but we need to be able to recompile the SystemUI.apk first.

- Thanks
[Desire HD Android Development] agat63:
Have similar problem with ICS Phone.apk for Samsung Galaxy S2 (Sprints E4GT).

Successfully decompiled framework-res.apk and Contacts.apk following OP guide and help from others here.

However wasn't able to decompile Phone.apk yet. Always getting error message:

[*] C:\Android\AutoAPKTool2.0.0\_INPUT_APK\Phone.apk

decompiling C:\Android\AutoAPKTool2.0.0\_INPUT_APK\Phone.apk...

I: Loading resource table...

W: Skipping "android" package group

I: Loaded.

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

I: Loaded.

I: Decoding file-resources...

I: Loading resource table from file: C:\Users\Tigran\apktool\framework\2.apk

I: Loaded.

W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x0205009a

I: Decoding values*/* XMLs...

I: Done.

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x0205009a

at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)

at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:59)

at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46)

at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:43)

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

at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:315)

at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:46)

at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)

at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:100)

at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:86)

at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:132)

at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)

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

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

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

Any help and/or advice is greatly appreciated.
[Desire HD Android Development] magnus48:
apktool 1.4.1 inside your .rar really is apktool.1.4.3

i don't see any change, this is not new

it crashes on miui

although great tutorial ; )
[Desire HD Android Development] agat63:
Did you check out this:

http://www.miui-au.com/add-ons/apktool/

Thread is for HTC Desire as well.
[Desire HD Android Development] memnoc:
It's .1.4.1

Inviato dal mio HTC Desire HD with Beats Audio usando Tapatalk
[Desire HD Android Development] magnus48:
Or I've downloaded a bad rar package or...

The one named apktool_1.4.1orig.jar is 1.4.1

The named apktool_1.4.1.jar is 1.4.3 check it at http://code.google.com/p/android-apktool/
[Desire HD Android Development] memnoc:
ohh yes i got you now, it's my fault i left you my personal copy, just rename it