yashsingh1/xdaforums huggingface dataset:
[Desire HD Android Development] pauley:
So I followed steps to decompile AT&T HTC Vivid ICS 4.03 framework-res.apk and this is what came up in the note box. Is it important? Or did it work correctly? Thanks for your input and this sweet tool!

This is the file I'm trying to decompile: http://www.mediafire.com/?hnn7cbuuakrx9je

[*] "C:\Program Files (x86)\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\framework-res.apk"
decompiling "C:\Program Files (x86)\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\framework-res.apk"...
I: Loading resource table...
W: Config flags size > 36. Exceeding bytes: 0x1000000.
W: Invalid config flags detected. Dropping resources: dimen-hdpi-ERR0
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected. Dropping resources: dimen-hdpi-ERR1
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected. Dropping resources: dimen-hdpi-ERR2
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected. Dropping resources: dimen-hdpi-ERR3
W: Config flags size > 36. Exceeding bytes: 0x1000000.
W: Invalid config flags detected. Dropping resources: dimen-zh-rCN-hdpi-ERR4
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected. Dropping resources: dimen-zh-rCN-hdpi-ERR5
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected. Dropping resources: dimen-zh-rCN-hdpi-ERR6
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected. Dropping resources: dimen-zh-rCN-hdpi-ERR7
W: Config flags size > 36. Exceeding bytes: 0x1000000.
W: Invalid config flags detected. Dropping resources: dimen-zh-rTW-hdpi-ERR8
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected. Dropping resources: dimen-zh-rTW-hdpi-ERR9
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected. Dropping resources: dimen-zh-rTW-hdpi-ERR10
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected. Dropping resources: dimen-zh-rTW-hdpi-ERR11
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
[Desire HD Android Development] Mefistozisimo:
Very good information.Thanks!
[Desire HD Android Development] TarHeelTrigger:
great work

had trouble at first but now im good. way faster decompile then the original apktool. well done
[Desire HD Android Development] memnoc:
follow the installation steps and make sure your machine is fully updated as stated in the op, also check all of your paths out
[Desire HD Android Development] UrInsan3:
Very useful, thanks!
[Desire HD Android Development] agat63:
Since it did decompile with errors you can't recompile it.

If you check your newly created folder SystemUI you will see there is no apktool.yml file.

In correctly decompiled app folder that file is present and it's an apktool file that helps to put app together when you recompile it.

You should try to figure out why it's can't decompile correctly.

I guess you took the calsses.dex file out of apk before decompiling?

And about your note about decompiling app direct from zip.

What do you mean?
[Desire HD Android Development] K Dotty:
I left the classes.Dex file in the apk. I meant I took the files straight from the rom zip so they haven't been modified in any way. I'm just a bit puzzled because I get the same error with all the other system apks. I'm running 64bit windows 7 but I don't think that should be a problem :confused:

Beamed from my AOKP'd up Desirable HD
[Desire HD Android Development] agat63:
I'm running 64 bin windows 7 machine as well.

Samsung has changed something in hex headers and when you leave classes.dex file in apk it won't decompile.

Try following.

Copy your apk file into _input_apk folder. Open it with 7z and copy classe.dex file somewhere safe. After that delete classes.dex from apk, close 7z and try to decompile again.

That's how I did it and it worked for me. I should also mention that I was using deodexed apk's.

Good Luck.
[Desire HD Android Development] agat63:
try to recompile and see if it's working.

Don't change anything yet. Just recompile.
[Desire HD Android Development] Youngunn2008:
After updating to latest apktool from sdk I can de / recompile finally. As long as I don't mess with 9patch pngs... that won't let me recompile as of yet.
[Desire HD Android Development] agat63:
If you mess with .9.png's you need to run them thru drwa9patch first.

If you don't restore all patches it will give you an error message.
[Desire HD Android Development] Youngunn2008:
Ya I ran it through draw9patch... just didn't work though.
[Desire HD Android Development] agat63:
Did a lot of modding latley. Didn't have any problems recompiling after that.
[Desire HD Android Development] Youngunn2008:
I'm having trouble with the drawer pull down in 9patch. I have watched tutorials and messed with it long enough, I need help.

Here's what it looks like, any ideas about what I'm doin wrong?
[Desire HD Android Development] agat63:
What you need help with?

Except for button at the bottom (ellipse instead of circle) it looks like it's OK.
[Desire HD Android Development] Youngunn2008:
Ya I edited the stock circle to be yellow in Photoshop then open it with draw9patch and set my patches and save, open sysui apk with 7zip and drop it in. I'm probably just not setting the patch areas correctly. Any ideas?
[Desire HD Android Development] agat63:
That's the only thing I can think of.

Try to edit patch areas. What did you use to compile that 9.png?

Did you do it with apktool or xUltimate?
[Desire HD Android Development] Youngunn2008:
Im not compiling that's my problem ...
[Desire HD Android Development] agat63:
After editing 9.png's patches you have to compile it.

You can't just drop it into folder. It won't work.

Here are links to draw9patch compilers. I don't know what machine you using so I'm giving you links for x86 and 64bit compilers.

http://www.xeudoxus.com/android/xUltimate-d9pc-x64.zip

http://www.xeudoxus.com/android/xUltimate-d9pc-x86.zip

It's very easy to use. Create a folder and name it whatever you want.

Unzip downloaded file into that folder.

Just place you 9.png's after you edit them in one of the start folders example1 or 2 and

Run the exe file.

It will give you compliled 9.png in output folder. Don't remember the name thou.

Let me know how it goes.
[Desire HD Android Development] Youngunn2008:
GOT IT!!!! ;)

thnx so much for the help.

---------- Post added at 12:19 AM ---------- Previous post was at 12:15 AM ----------

now, im having problems with changing the status bar clock color... after changing the color in res/hdpi/values/styles.xml, and recompiling i just get the black screen and no status bar... any more help for me?

:D
[Desire HD Android Development] agat63:
Status bar text colors are not in framework res.apk Or at least they weren't there in previous builds. There are too much changes in ICS and I'm still learing as well.

In previous builds you would modify and work with framework-res.apk and services.jar. Never tried it in ICS so I'm not sure how it works here.

But if you wan't I can type up a tutorial how it has been done in previous builds.
[Desire HD Android Development] Youngunn2008:
ive googled and people say its supposed to be in the systemui.apk, and thats the path i quoted up there...

at this line:

<style name="TextAppearance.StatusBar.Clock" parent="@*android:style/TextAppearance.StatusBar.Icon">

<!-- Note: must be dp to fit in status bar -->

<item name="android:textSize">16dp</item>

<item name="android:textStyle">normal</item>

<item name="android:textColor">@android:color/holo_blue_light</item>

</style>

<style name="TextAppearance.StatusBar.Date" parent="@*android:style/TextAppearance.StatusBar.Icon">

<item name="android:textSize">16sp</item>

<item name="android:textStyle">normal</item>

<item name="android:textColor">@android:color/holo_blue_light</item>

</style>

i changed it all ok, but it still just isn't working right.

if you'd like to tutorial me up thats cool:cool:
[Desire HD Android Development] Pfaffinator:
I have not had any issues decompiling or recompiling. The only time I would get an recompile error is when I would corrupt a .9png, then would have to make correction then it will recompile without errors.
[Desire HD Android Development] agat63:
My tutorial is outdated. We didn't have SystemUI.apk in old days.

I'll type it up but now I don't think it will work.

Here we go. If they still in services.jar

You'll need to change that in your services.jar file. You'll need to use colorchanger.jar here: http://dl.dropbox.com/u/8246655/colorchange_signing.zip, this also has apk signing tools in there too.

1. extract all of these files to c:\

2. put the framework-res.apk and services.jar files in a folder called framework, then zip it up. The directory tree should look like this: framework.zip > framework > framework-res.apk, services.jar

3. open command prompt

4. type

java -Xmx512M -jar cc.jar

This will give you a rundown on all the things you can do with this program and how to use it.

example: java -Xmx512M -jar cc. jar framework.zip ticker=FFFFFFFF (white ticker)

or java -Xmx512M -jar cc.jar framework.zip clock=FF000000 Black clock.

First 2 letters/digits are transparency and last 6 are color hex code.

4. change colors using the hexadecimal code. Here's a good website for color codes. http://www.december.com/html/spec/color.html If you look at the examples you should be able to figure out how to code it correctly.

Let me know if you need any help.
[Desire HD Android Development] Pfaffinator:
I am far from a pro but I don't see any hex values in the XML but it looks like @android.color/holo-blue light is coming from another XML. I'm digging around hopefully have a better answer
[Desire HD Android Development] agat63:
Colors might be defined in /res/values/colors.xml or in framework-res /res/values/colors.xml if they are global colors.
[Desire HD Android Development] Youngunn2008:
i found this from a guide on google and its what i was going off of...

Change color of statusbar clock and date

-decompile SystemUI.apk and navigate to res>values>styles.xml

-for clock, search for "

TextAppearance.StatusBar.Clock"

and date search for "

TextAppearance.StatusBar.Date"

-under each, find the line starting with "

android:textColor" and change the hex value to whatever you want

--example, "ffffffff" would be white

-save and recompile

EDIT

you are corect is in the framework res/values/colors.xml
[Desire HD Android Development] agat63:
Well as I said.

My tutorial is outdated.

ICS is completely different.

We have a lot to learn. Back to school.:)
[Desire HD Android Development] Youngunn2008:
i am gonna try to just put my yellow in the hex to be defined for the holo blue light string... and leave the sysui res the same and see if it calls that color.

---------- Post added at 01:33 AM ---------- Previous post was at 01:18 AM ----------

is it a problem that my rom im on isn't deodexed? could that be a problem?:confused:
[Desire HD Android Development] agat63:
To best of my knowledge you can do all this themeing and moding to deodexed roms only.

If your rom is not deodexed your app has 2 parts.

xyz.apk and xyz.odex.

Some if the information is in odex file. When rom is deodexed the that odex file is modifed and placed inside the app as classes.dex file.

It makes app little bigger and phone little slower but IMHO it's all worth it.

I have came across of threads that stating that modding of odexed roms and apps is possible but never really read into it.

I'm always using deodexed roms.

Google it and may be you can find a tutorial how to mod odexed roms and apps.
[Desire HD Android Development] Youngunn2008:
ok i have the classes dex file so i am deodexed. just didn't know.

thanks

btw making that mod to the holo blue light value put me in boot loop... gonna keep trying stuff. it can't be this hard to change color.
[Desire HD Android Development] agat63:
Shouldn't be. Usually it's a small stuff we missing and making our lives harder.;)

Patience is a virtue. You will get there and then you will teach us how to.

Good luck.
[Desire HD Android Development] Pfaffinator:
Wrong thread
[Desire HD Android Development] Youngunn2008:
Great stuff pfaff
[Desire HD Android Development] memnoc:
@ptaff thx for this, but this is not a theming guide BUT I guess it would be useful for beginner, so I'll put in the op;)

Inviato dal mio HTC Sensation XE with Beats Audio usando Tapatalk
[Desire HD Android Development] Pfaffinator:
Sorry bout that player, :o
[Desire HD Android Development] memnoc:
Why mate??;) no.sorry it was useful, feel free to post that again;)

Inviato dal mio HTC Sensation XE with Beats Audio usando Tapatalk
[Desire HD Android Development] kage00:
Just a question, how do I recompile the samsung apks once I've decompiled? do I recompile without the classes.dex files in the folder and then put the .dex file back in after it has recompiled with 7zip, or do I put the .dex file in the folder and set it to recompile all together?

Thanks
[Desire HD Android Development] agat63:
I recompile app without classes.dex file and once app is ready manually move the dex into app. So far never had a problem.
[Desire HD Android Development] kage00:
cool, thanks for the quick reply

then do I have to resign them once I've put the dex file back in? even if its a system file

or is it only market apps that need to be signed?

thanks
[Desire HD Android Development] agat63:
Honestly I never had a luck signing apk's and I found a workaround for that.

After app is recompiled usually I take modifed files and/or folders and move them into original app. This way I don't have to sign app. If I edit something in /res/falues/ than I'll move into original app resources.arcs file as well (all values are there after recompiling).

Works every time.
[Desire HD Android Development] kage00:
thanks,

nice work around!

I can't seem to recompile my apks now... :(

it was working this afternoon, and now it's not. I even tried to decompile and then recompile without any changes and for some reason it still wont work, I've tried with autoapktool 2.0.0, and apktool 1.4.1 they are both not working for me... I dont know what I've done wrong
[Desire HD Android Development] agat63:
To make sure it's not app itself try to grab a stock app from stock unmodified rom and do decompile/recompile without any changes.

I test this way every app before I do any change to it.

Sometimes modded app will decompile without any error messages but when you try to recompile it it throws dozens of errors at you.

Never was able to figure out why but it is what it is.
[Desire HD Android Development] kage00:
Thanks mate, you've been a great help :)
[Desire HD Android Development] mulletcutter:
,trying to recompile framework-res.apk. keeps erroring out saying sources not available. I have sdk 3.0, 4.0 and 4.0.3. Am I missing anything....I have all the correct javas...
[Desire HD Android Development] agat63:
Did you run option 1 in apktool menu "if framework" first?
[Desire HD Android Development] Pfaffinator:
I have errors compiling framework Res with autoapk, all others will compile fine. I use apk manager for framework Res. Haven't had any issues, but at the same time apk manager will not compile anything else but framework res. So I go back and forth.
[Desire HD Android Development] agat63:
If those apps have been modded in rom you're referring to that might be a problem.

Sometimes even when moded/edited app is working fine you can't decompile/recompile it.

I don't know the rom so I can't say with certainty. But if it's a modded app you should try to edit a stock app.

That's the best way anyhow. If you will get same or similar errors for stock app that would mean something is wrong with your settings. If stock app compiles fine than your problem is in modded app.
[Desire HD Android Development] mulletcutter:
yep and still get "could not find sources... im trying it with ARHD 6.5.1 for sensation.
[Desire HD Android Development] agat63:
I'm at work right now and don't have my lappy with tools with me.

Upload files you trying to decompile/recompile and I'll give it a shot tonight.

Make sure framework-res.apk is included in links.
[Desire HD Android Development] pauley:
I wasn't successfully able to decompile/recompile stock framework-res.apk from HTC Vivid 4.03, but I was able to decompile/recompile the one from UOT Kitchen after I did a battery icon mod.

I'd try that if you guys still have problems :) You may not actually have to even mod anything, just upload the required files, then download UOT's zip, then decompile/recompile using the tool in this thread.
[Desire HD Android Development] mulletcutter:
ok here is the apk. I was trying to do this. This is the only file i am modding.

http://www.mediafire.com/?cdae4y7iohwqo5z
[Desire HD Android Development] agat63:
I can't decompile/recompile an apk wihtout framework.

I have E4GT so I don't have any files for HTC.

I would need the framework-res.apk and if there is something like htc framework (because we have a twframework-res.apk along with framework-res.apk) I'll need it to be able to decompile a system app.
[Desire HD Android Development] mulletcutter:
It is framework-Res.apk
[Desire HD Android Development] agat63:
OK.

I'll try tonight.

May be I can figure something out.
[Desire HD Android Development] mulletcutter:
OK cool..lmk
[Desire HD Android Development] agat63:
Hey buddy.

I did decompile and recompile you framework-res.apk with no problems or hick ups.

I'm using apktool posted in OP and it worked just file.

First I did copy framework-res.apk into _INPUT_APK folder.

Than I run autoapktoolmain.bat

Choose option 1 - if framework.

Framework-res.apk has been installed into apktool.

Than option 6 hit enter and drug framework-res.apk into command prompt window.

Hit enter.

Apk decompiled. Once it was done I choose 9 and hit enter.

Dragged newly created framework-res.apk into command prompt window and hit enter again.

Apk did recompile without error messages.

That's it.

Give it try again.
[Desire HD Android Development] cwhitney24:
I was having issues as well recompiling framework. I was trying to use option 7 not 9. When I get home tonight ill try the way you mentioned above. Thanks for all your hard work.

I got your 10 char right here

Rocking bacon...ics style
[Desire HD Android Development] mulletcutter:
did u modify any files b4 recompiling?
[Desire HD Android Development] agat63:
No I didn't.

I was just checking if and where is the problems with app not recompiling.

Now, if you can recompile it without any modifications you should be able to recompile it with modifications if those mods are correct.

E.G if you add a icon to your drawable folder there should be a description and hex number attached to it in /res/values/public.xml etc.

All 9.png's should have correct patches.

So if anything donew wrong it will trow errors with somewhat explanations what is wrong.
[Desire HD Android Development] mulletcutter:
I know about half of what u said..haha but I'll keep trying
[Desire HD Android Development] agat63:
Hey man.

If you have any questions just fire away.

There is a lot of new stuff in ICS but I did my fair share of theming for Eclair, Froyo and GB.

I'll help where ever I can.
[Desire HD Android Development] mulletcutter:
Just trying to do this mod, here, but when i recompile bunch of errors. I really dont know what they mean, and since that is for a nexus S, and i have a sensation, some stuff would be different.
[Desire HD Android Development] agat63:
Sounds pretty simple.

Did you find all those lines in specified files?

If yes and it still gives you errors can you pastebin error log so I can take a look.

May be I'll come up with something.
[Desire HD Android Development] cwhitney24:
Still can't seem to get this to recompile. I have tried several times without making edits. Mind trying to see if its just me?

http://db.tt/ltT2XESO

I got your 10 char right here

Rocking bacon...ics style
[Desire HD Android Development] mulletcutter:
Yes I found same lines, I'll send u the log when I get home.
[Desire HD Android Development] agat63:
Is this original framework-res.apk from stock deodexed rom or you took it from themed custom rom?

It looks like this app has been modified.

It trows lot of errors but all those errors are for one line only.

Line 79 in /res/values/plurals.xml and all other plurals for different languages.
[Desire HD Android Development] cwhitney24:
Its not really themed...but it is modded. It is a version/spin off of lords ics build

I got your 10 char right here

Rocking bacon...ics style
[Desire HD Android Development] agat63:
That's why you can't recompile it.

You gotta know exacly what has been modded to try to fix it.

Usually I take stock app do my modifications and drag my modded png's and/or xml files into modded app I wanna use.

This way I can insure it will recompile and if not I can localize the problem.

With few hundred files in each app if you don't know what to look for it's very hard to find it.
[Desire HD Android Development] cwhitney24:
Ahh..gotcha. thanks man

I got your 10 char right here

Rocking bacon...ics style
[Desire HD Android Development] mulletcutter:
first time im using pastebin, so here it is.
[Desire HD Android Development] agat63:
Same error at line 79.

I guess this framework is modded as well.

You should try to mod original/stock app.

I don't know what changes have beed done to the app hard say what causes that error in line 79.
[Desire HD Android Development] mulletcutter:
ya its modded sense 3.6, i just tried to change autobright settings, just changed numbers, and it still wouldnt recompile. would apktool be able to recompile?
[Desire HD Android Development] agat63:
I don't think so.

I would suggest you grab the stock app.

Do your changes and recompile it.

Than just drag the edited xml/png files into desired modified framework-res.apk and push it to your phone.

That's the way I do it because it's very hard to figure out what other dev broke in that file.
[Desire HD Android Development] mulletcutter:
How would I know the difference?
[Desire HD Android Development] agat63:
What difference?

If you mean if app is stock you should download a unmodified, unthemed, deodexed rom or sometimes those are called Deodexed theme templates.

If you can find one for you phone in forum just download and keep it for future mods and themes.

I honestly don't know any other way around.
[Desire HD Android Development] Youngunn2008:
OK got it guys!

Basically, decompile sysui with apktool. Change holo_blue_light to desired hex code in res/values/styles.xml and recompile. Now take the original unmolested sysui apk and open the archive with 7zip. Now in apktool go to systemui/build and grab the resources file and replace the one in the unmolested sysui apk. Close the archive and push, fix permission etc. Works.
[Desire HD Android Development] mulletcutter:
just tried to recompile stock sense 4 framework-res.apk. and got the same errors as before. what the crap