yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] timmytim:
Anytime I delete the resources.asrc from the \keep\ folder after editing the styles.xml I get boot loops. Am I doing this right? Isn't that the correct process to change system font colors?

I'm curious as to why the framework-res.apk\res\values and some other folders disappear after compiling the framework.

During the script it places the files in to the \keep\ folder. How am I supposed to delete that xml that I edited when it's gone from the recompiled framework?

I was under the impression that I am supposed to delete any edited files (including xml?) and also delete the resources.arsc file if I edited xml's.

If I run the script on a stock framework and don't change anything it's fine.
[G1 Android Development] timmytim:
Its in the OP right above the Youtube video. Its a little spinning Yellow button that says Windows.
[G1 Android Development] dreamsforgotten:
Themissing values are in the resources.arsc that's why you can't find them. You have to delete the other xmls that arent in values such as drawables.
[G1 Android Development] timmytim:
I honestly dont know what that means, excuse my ignorance.

I am just trying to change the system font colors in the stock framework. I do not understand why this is so hard for me.

Dude, I will pay you if you can figure out what is going on with this (or mak the changes to my framework for me :D )
[G1 Android Development] dreamsforgotten:
This is open source, I wouldn't take your money what phone are you on and link me to a stock rom on that phone I'll see what I can do. Some people noted after an update on win7 .net framework their apk manager never acted right again. Not saying that's your prob just saying the possibilities are endless. Matter of fact middlepiller@gmail you know the rest dot com send me links and a description of what font colors what color code you want etc. be very specific. Btw the last post I gave you I tried to explain this. You noted in keep your values folder was gone. That is because it was compressed into resources.arsc that is why you delete that file in keep. One thing you are missing is your projects folder is your framework decompiled. Your keep folder is your original files compiled. Apk manager re compiles only the changed files into the original files to cut down on errors rather than recompile every single file again leaving room for errors. The keep folder are all original so what it sees missing in there it adds back in from the projects folder and doesn't touch the rest
[G1 Android Development] Devildog8791:
@ dreamsforgotten: I tried to click on the link in your signature and it says the thread is not valid. Can you put a new link in there?
[G1 Android Development] dreamsforgotten:
Epic themes and apps section stickied at the top they merged my threads I need to fix the signature sorry
[G1 Android Development] Devildog8791:
Decompiling Issues

I am trying to decompile the Dropbox app to invert it. When I do the decompile, I get the following error:

Could Not Find C:\Users\Tim\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedcom.dropbox.android-1.apk

Could Not Find C:\Users\Tim\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedcom.dropbox.android-1.apk

I: Baksmaling...

I: Loading resource table...

I: Decoding resources...

I: Loading resource table from file: G:\apktool\framework\1.apk

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

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

at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)

at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)

at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)

at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)

at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknown Source)

at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(Unknown Source)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(Unknown Source)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unknown Source)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)

at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown Source)

at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)

at brut.androlib.res.AndrolibResources.decode(Unknown Source)

at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)

at brut.androlib.ApkDecoder.decode(Unknown Source)

at brut.apktool.Main.cmdDecode(Unknown Source)

at brut.apktool.Main.main(Unknown Source)​

I am using APK Manager 5.0 with Windows 7 Home Premium-64 Bit. I used the "Update Tools" option (24) to go to version 1.3.1 and also to get the latest version. I get the same error with either version.

I searched Google and found this issue. In Comment 1, there is talk of a fix at this site. I don't know how to implement that fix though.

I also heard talk of the latest .NET update messing with APK Manager. I don't know if this is true, but I have started having more problems decompiling lately than I have ever had. Can someone look at this error and kind of shed some light on it for me? Do I need to update the framework files that APK Tool references to get the resources. If so, can someone direct me to how that is done in Windows? I seen the methods on the Google site for APK Tool, but I think that is for people using Linux.
[G1 Android Development] Devildog8791:
Thanks. I'm off to check it out.
[G1 Android Development] dreamsforgotten:
Cool after work I'm updating link, there are about five guides one under the other
[G1 Android Development] Devildog8791:
Nice write-up. Some of the material in there is stuff that I already knew, but there are some things that explain the processes in more detail than I have seen. Thanks
[G1 Android Development] representingcochran:
okay, having an issue here.

I'm working with a fascinate framework-res.apk file and it decompiles fine. I'm editing one word in a values/string.xml file and then recompiling it. Every time I do this though, it creates extra folders in the apk file. The .apk I'm working with only has the drawable v4 folders but its creating the drawable folders which is adding about 2 megs to the apk. Any reason this can be happening?
[G1 Android Development] dreamsforgotten:
Thank you there are plenty of guides on how to do something but hardly any on why you do it or even how to properly install the tools you need in the first place. I felt it was going to get total noobs on a level playing field to get comfortable modding their devices.
[G1 Android Development] Devildog8791:
I agree. I just wish I could get my issue worked out. I tried using straight apktool 1.3.1 to try and decompile Dropbox, but I'm still getting the same error.

Is there a standard framework that I should be using that might be more recent? I used the framework-res.apk and com.htc.resources.apk from the official Froyo release for the Incredible.

Edit: Well, I finally got my issue resolved. While looking in the APKTool thread, I came across this post and downloaded the file. I applied it like he said and presto, problem solved.

Edit #2: I spoke too soon. The apk decompiled fine, but when I made my xml edits and tried to recompile, I got the following error:

I: Checking whether sources has changed...

I: Smaling...

I: Checking whether resources has changed...

I: Building resources...

C:\Users\Tim\apk_manager_4.9\other\..\projects\Inverted-Dropbox-1.1.apk\AndroidManifest.xml:6: error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android'

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Tim\AppData\Local\Temp\APKTOOL8245627387191434615.tmp, -I, G:\apktool\framework\1.apk, -S, C:\Users\Tim\apk_manager_4.9\other\..\projects\Inverted-Dropbox-1.1.apk\res, -M, C:\Users\Tim\apk_manager_4.9\other\..\projects\Inverted-Dropbox-1.1.apk\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)

at brut.androlib.Androlib.buildResourcesFull(Unknown Source)

at brut.androlib.Androlib.buildResources(Unknown Source)

at brut.androlib.Androlib.build(Unknown Source)

at brut.androlib.Androlib.build(Unknown Source)

at brut.apktool.Main.cmdBuild(Unknown Source)

at brut.apktool.Main.main(Unknown Source)

Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Tim\AppData\Local\Temp\APKTOOL8245627387191434615.tmp, -I, G:\apktool\framework\1.apk, -S, C:\Users\Tim\apk_manager_4.9\other\..\projects\Inverted-Dropbox-1.1.apk\res, -M, C:\Users\Tim\apk_manager_4.9\other\..\projects\Inverted-Dropbox-1.1.apk\AndroidManifest.xml]

at brut.util.OS.exec(Unknown Source)

... 7 more​

I'm done for the night because I am seeing double. If anyone can help me figure this out, I would appreciate it. Thanks in advance.
[G1 Android Development] dreamsforgotten:
Didn't want to quote all that. Tbh, I've never seen that before do I'm clueless sorry but you can try to pm brut.all

And ask I'm running 4.9 on win xp that I don't allow to microsoft update. I run ubuntu 10 primarily a ubuntu 64 for dev work and xp for apk manager and netflix.
[G1 Android Development] dreamsforgotten:
Sound lazy but does it boot? If it compiled with no error just try booting on the Epic we don't have v4 folders just drawable and drawable-hdpi but id at least attempt to boot it. Also check a fascinate theme to see if they are creating additional folders on re compile. Good luck the fascinate needs some love.
[G1 Android Development] Devildog8791:
I'm hoping that DaneshM90 pops in here soon to see if he can help. If not, I'll PM him and Brut.all and see if they can help me out.
[G1 Android Development] timmytim:
With the generous help and guidance of you guys and a guy over in the Samsung Captivate Themes Forum I have finally figured out my issue!!!

As it turns out, the version of apktool that comes with APK Manager 4.9 does not like Windows 7. I was able to get a different version from 10tonhammr in the Captivate Forums and that solved my recompiling issues.

Here is a link to that apktool if you are interested:

http://dl.dropbox.com/u/672699/apktool.jar

One issue that I am having and cannot seem to resolve is black on black text in sub menus. For example if I go to Settings => Display => Unlock Screen the text is black on black and I cannot read anything.

Does anyone know off-hand which xml file changes that text? All of the other fonts are ok. It's just the sub menus.

Thank you so much everyone for your help with this!!!
[G1 Android Development] Daneshm90:
Here's the latest apktool as requested....i compiled from source.

Just remove .zip extension...shud b apktool.jar :)
[G1 Android Development] Devildog8791:
Do you think this will help with the issue I was having above?

Also, is this newer than the update in version 5.0?
[G1 Android Development] 1982Strand:
Problem solved.
[G1 Android Development] klquicksall:
Man im having the hardest time getting this to work on ubuntu. On windows its a breeze. Great tool.
[G1 Android Development] dreamsforgotten:
Your not alone following all the steps on linux yields 50% success rate. And theres almost no way to do system apps propper
[G1 Android Development] klquicksall:
Its fine for now. I dual boot windows 7 and ubuntu. I was trying to make ubuntu my android everything machine. The tool works so well with windows im not complaining.
[G1 Android Development] kirbnite:
To decompile SystemUI.apk, you need to install the framework-res.apk. Easiest way to do it would be rename framework-res.apk to 1.apk then replace G:\apktool\framework\1.apk with your framework you renamed.

You could instead, from a command prompt navigate to a directory that has apktool.jar and you framework-res.apk (just copy apktool.jar from the "other" folder in apkmanager).

Then from the command prompt type "Java -jar apktool.jar if framework-res.apk"

Now decompile and recompile.
[G1 Android Development] nedooo:
I cant recompile Music Player Galaxy S, is there anythig special about this APK?
[G1 Android Development] kirbnite:
Post contents of appktool.yml from root of this project.
[G1 Android Development] golmar88:
Ok, I know it's something stupid I'm over looking. I have had this running perfect on my home comp for awhile but I am doing something wrong on the setup at work. I get the error "adb was not found. you will not be able to manipulate the files on your phone." I can push/pull fine from adb so it has to be how i set up apk manager. any help is much appreciated.

If I just want to push the apk with adb, which file do I push after I have edited it?

Sorry for my noobness!
[G1 Android Development] dreamsforgotten:
Is adb in your path? Can you adb from c:\ or do you have to do it from within platform-tools? The file you edit should get named from file.apk to unsignedfile.apk. if its a system app don't sign it eventhought its named unsigned, if you chose yes for is this a system file. Rename that usignedfile.apk to file.apk then push that.
[G1 Android Development] golmar88:
*edit* OK, if i go into the script and edit it and add the line "cd c:\adb" right before "adb version" it runs the script just fine. BUT then when I try to push something it fails and in the log I get "adb is not a valid internal or external command???

Do I have my path set up wrong or something?
[G1 Android Development] dreamsforgotten:
Yes your path is incorrect. If apk android sdk is at c:\ then your path is c:\android-sdk-windows\platform-tools\;
[G1 Android Development] tommytomatoe:
In order to place android sdk tools in your path you need to go to my computer, environment variables, and edit your path there. Just add the path of your android sdk directly to the end of the current path. For example, if yours is c:\android-sdk, then you need to add that to your path which just means windows will be able run those commands from any directory via cmd prompt. Kind of like all the basic commands. Just like You can use "del", "dir", "cp", et cetera, you will now be able to use adb and other tools from any directory.

edit:
[G1 Android Development] golmar88:
Thanks for the help guys. I finally got it. I knew it was something stupid I was doing (usually is). Ya'll were right it had to do with the path. Thanks again.
[G1 Android Development] kirbnite:
You made a bad edit of statur_bar.xml

Make sure your not using regular note pad. Download notepad ++

1 little mistake will leave you with a long list of errors. Just read where the errors begin and it lets you know where you have an issue.
[G1 Android Development] affmalg:
The thing is that i haven't modified anything, just done a decomplie and a compile.

More information in my post above

I use notepad++ which is very nice.
[G1 Android Development] dreamsforgotten:
Did you use a stock framework as a base, or a modded rom
[G1 Android Development] kirbnite:
I would redownload 4.9 and try that with out moddifying aapt.exe or apktool.jar
[G1 Android Development] affmalg:
I used the stock framework-res.apk from the my roms zip.

Have tried this already, but didn't help. The error occurred both on 4.9, 5.0, with apk tool 1.3.1 and 1.3.2 :mad:

Just now i am trying a new tool: Auto Apk Tool
[G1 Android Development] jimbush3:
I've tried searching all around but can't seem to find anything that addresses my issue. I'm using apk manager 4.9 to edit the values/colors.xml in framework-res.apk. Here's my story:

decompile fine, no problems at all, folder full of draw9's and readable xml

edit values\colors.xml

compile as a system app and copy over original files to keep folder

the values folder does not show when extracted, only when decompiled, so it is hidden in the keep folder I guess

finish recompiling to unsignedframework-res.apk, which I then decompile immediately to find that the colors.xml has its original values

So my question is, how do I get the edited xml file recompiled into the apk?
[G1 Android Development] klquicksall:
Did you delete .arsc in keep folder before you finished compiling?

Sent from my EVIL XDA APP ;)
[G1 Android Development] dreamsforgotten:
+1 sounds like your not deleting the original out the keep folder and overwriting it when it recompiled
[G1 Android Development] jimbush3:
I deleted the .arsc in one of my earlier builds and ended up with a bootloop. After that I assumed that it meant the .arsc in the same folder as the xml file - not the one out in the keep folder (still learning). I'm trying it again, but do I need to sign the framework-res.apk before installing it, or do you not sign system apks? It can be tough to find the info out there.
[G1 Android Development] klquicksall:
Dont sign system apk. Rename it to original name.

Sent from my EVIL XDA APP ;)
[G1 Android Development] jimbush3:
Alright, so I:

Took a working framework-res.apk

Decompiled it

Recompiled it - deleting .arsc midway through the process

Extracted the unsignedframework-res.apk and then Stored it as framework-res.apk with winrar, no compression

pushed to phone

boot loop

I didn't make any changes to the apk other than deleting the .arsc file from the keep folder.
[G1 Android Development] klquicksall:
You dont need to push it. Drop it in a zip and flash. Are you using 2.2 or 2.3

Sent from my EVIL XDA APP ;)
[G1 Android Development] jimbush3:
I am on a Motorola Atrix 4G with 2.2, I push frameworks to the phone pretty regularly without any issues so I don't think pushing it is whats causing the bootloop. Is apk manager supposed to replace the .arsc when it compiles? The framework that I get out of it doesn't have an .arcs file included.
[G1 Android Development] klquicksall:
Did you edit xml or samli?

Sent from my EVIL XDA APP ;)
[G1 Android Development] jimbush3:
I have been working on xml, but for this run I just decompiled, recompiled and removed the .arsc during the compilation process. I was trying to test if apk manager replaced the .arsc or if the .arsc wasn't needed. Since I installed the framework without an .arsc file and it boot looped, I'm assuming that it needs to be there.
[G1 Android Development] klquicksall:
Did you completely delete any files?

Sent from my EVIL XDA APP ;)
[G1 Android Development] jimbush3:
Only the resources.arsc file. Could I place a copy of the original in the compiled framework-res.apk? All the files will be the same, just edited xmls.

**Edit: ok, so I placed the original resources.arsc in the compiled framework-res.apk and pushed it, its up and running. I'm going to try it again with some actual edited xmls this time around and see if it holds up.
[G1 Android Development] klquicksall:
No its created when the app is compiled. Start over with freash framework. The only thing i can think of is your not decompiling with the right depend option 10

Sent from my EVIL XDA APP ;)
[G1 Android Development] jimbush3:
I decompile with 9 - Decompile apk, what dependencies would the system/framework/framework-res.apk have?
[G1 Android Development] klquicksall:
im not a atrix expert but, I would think com.resources. Im pretty good with htc products. If you edit any samli code delete the .dex file also. try to just decompile it with 10 when recompiling delete arsc. Only delete arsc if you edited xml and .dex for samli. let me know.
[G1 Android Development] klquicksall:
in most cases system apks need dependencies to decompile.
[G1 Android Development] jimbush3:
There are only two other apks in the atrix system/framework folder. I tried decompiling it with both blur-res.apk and moto-res.apk, it recompiled both times but always recompiled without a resources.arsc file. I'm done trying for tonight, need some sleep.
[G1 Android Development] klquicksall:
It doesn't have to be in the framework folder. It can also be a jar file. Again these are htc terms. Hopefully an moto expert will be on tomorrow.

Sent from my EVIL XDA APP ;)
[G1 Android Development] dreamsforgotten:
I've never known a framework-res.apk needing a dependency but not entirely sure about that. I decompile using 9 select yes for system app, yes to keep original files, delete resources.arsc in the keep folder, then recompile. If there was a needed dependency shouldn't he have gotten errors during the decompile from the start? that's how I usually tell which system apks need one but I'm talking from samsung experience. Also try to pm another themer from you phone to see how they were able to do it.
[G1 Android Development] jimbush3:
I've been thinking that too - thanks for the help guys, I didn't know that the file manipulations could be device specific. I'm gonna contact some atrix themers and find out what they're doing. I definitely feel like I know more today than I did yesterday.
[G1 Android Development] lxxl:
huh i have alywas same stuff

Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]

i just make

9 Decompile apk

mod AndroidManifest.xml and mod the AndroidManifest.xml

<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="8" />

to

<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="11" />

11 Compile apk

12 Sign apk

13 Install apk

all times in log when i try to sign i have:

java version "1.6.0_24"

Java(TM) SE Runtime Environment (build 1.6.0_24-b07)

Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)

Could Not Find C:\rew\place-apk-here-for-signing\../place-apk-here-for-signing/signed.apk
[G1 Android Development] jimbush3:
SOLVED

and of course it was entirely my fault. I thought that the framework was decompiling correctly because the project folder contained all of the right stuff. But once I went back and checked the log.txt file, I found that there were pngs referenced in the public.xml that were not included in the framework, as well as some draw-9s that were not properly put together. I replaced and repaired all pngs in the original framework, ran it through apk manager, deleted resources.arsc during the recompile, and once finished resources.arsc had been recompiled by apk manager. Thanks to everyone who helped me out with this and let this be a lesson to all learning developers to check the damn logs.
[G1 Android Development] klquicksall:
Glad you got it.

Sent from my EVIL XDA APP ;)
[G1 Android Development] Duce HD2:
Hey guys, I've been trying for 2 days now to figure this out. Everything is installed correctly so far, so my question is: where do I stick the framework-res.apk and tw-res-framework.apk at? Are both even needed?

So far I've put everything in the "place here for modding" folder, is that correct? Are they supposed to be in different folders?

When I try and decompile it starts then I get an error about missing proper framework, please install....I'm lost....

Can someone give me a brief tutorial on where everything should go? Along with procedures?

Sorry for all the questions, but this is my first time trying to mod xml etc...

thanks!
[G1 Android Development] jimbush3:
The apk needs to go in the Modding folder. Put it there, delete the log.txt, recompile with 9, and then copy the contents of the log.txt and paste them here. It'll be much easier to tell what's going wrong from that.
[G1 Android Development] kirbnite:
Ok if I understand your question, you are trying to decompile framework-res.apk. tw-res-framework is your dependant so that would need to get installed as 1.apk

From a command prompt with apktool.jar and the tw-res-framework.apk

Type the following:

java -jar apktool.jar if tw-res-framework.apk

I do not have the same device that you do, so double check the spelling of tw-res-framework.apk
[G1 Android Development] dreamsforgotten:
Tw framework is touch wiz and not a dependent of framework res. I've done countless Epic frameworks there is no dependant you should place framework-res.apk into place here for modding, and then choose it with option 22 then decompile with 9.