OK, I've been working on my rom and for the most part its actually going really well - I've got it working fast, gsync is working, blah blah
I've run into a permission problem though, and I need to edit HTCDialer.apk's AndroidManifest.xml file to include a new permission line. Sadly, I haven't figured out how to do this on my own (I've been android devving for about 2 weeks now... maybe 3, i forgot haha).
How do I decode those androidmanifest.xml files?
Secondly - I've also tried making other changes to .apk files and using autosign.bat to resign them, but half the time my changed apk's never work. The apps just don't work or appear in my app list, and logcat says something about apk uid signatures not matching, so I ran "fix apk uids" from recovery but that didn't help either. i don't think my apk changes are being signed properly.
Is apktool what you're after?
YES! OMG thank you. I had thought they were just .dex'd xml files so I tried baksmali but I kept getting top level errors. apktool worked perfect for me, got apst whatever baksmali error I had and did it just fine. You're awesome, thanks!
Aeltrius said:
YES! OMG thank you. I had thought they were just .dex'd xml files so I tried baksmali but I kept getting top level errors. apktool worked perfect for me, got apst whatever baksmali error I had and did it just fine. You're awesome, thanks!
Click to expand...
Click to collapse
could please help me?
i would like to decode a exisisting apk to edit the androidmanifest.xml just a little bit to my personal need. somehow the apk tool just leads to an error everytime. when i just unpack the apk and edit the xml-file its of course crypted.
could you give me a explanation of how to just edit the androidmanifest.xml of an exisiting apk and package the apk again?
apktool d name.apk out
(now edit the androidmanifest.apk in out directory)
apktool b out
now you have to SIGN the out.apk that is in /out/dist directory
Hi all,
I'd like to modify some .xml files in the Gingerbread Theme that are in the resources.arsc file. I'm using Apk Manager 4.9 and I'm unable to compile twframework-res and framework-res: a lot of errors appears and resources.arsc isn't rebuild. It seems that it's a problem of dependencies. What file(s) I need ? Is there a way ?
I have a lot of errors like this :
"......\public.xml:172: error: Public symbol drawable/ic_menu_account_list declared here is not defined."
I tried with all the 38 themes and it's the same thing.
Note: When i use apk manager with an app it works and resources.arsc is rebuild.
Thanks in advance
clarkkov said:
You should discuss this with the app developer, this is obviously app specific issue - and who is most likely to know this app the best(?). I think that framework.apk(s) depend on more .apk(s) inside the OS, i.e. they are not independent like the 3rd party apps.
Click to expand...
Click to collapse
Yes. It's strange because when I use apk manager with a stock framework apk (JPM for example) there are no errors and resources.arsc is rebuild. So there is no dependencies with the OS...
And all the modded themes are uncompilable ...
thx !
I found the reason :
The framework-res.apk contains corrupted .9.png's images files ...
And every theme posted around there were modified with the sames .9.png's corrupted files ! Someone forgot to use the tools to mod this king of files or forgot to compile them ...
So, to solve this and to be able to compile all the framework-res.apk you have to get back the non corrupted .9.png's files from stock ROM.
I think the same problem is also present in twframework-res.apk; I will see later.
cheers.
Hey everyone! I've created a guide for themers that shows step-by-step how to decompile and recompile the GingerBlur framework-res.apk. With GingerBlur 4, decompilation and recompilation can be done without any errors. This should make it significantly easier to theme my ROM.
http://briefmobile.com/how-to-theme-gingerblur
If you're unclear on how to do something, you should ask me below and I'll write more to the guide. In the future I'd like to add these to the guide:
Step-by-step "How To" create a theme like GingerBlur
How to edit .9.pngs properly
How to create flashable .zip's
How to change text/menu colors
Make sure to throw your suggestions below!
You sure do alot for someone with limited time..... Thanks
Sent from my MB860 using Tapatalk
Gvndeb60 said:
You sure do alot for someone with limited time..... Thanks
Sent from my MB860 using Tapatalk
Click to expand...
Click to collapse
I love phones. And I love the people on the Atrix forums.
geez, man. could you do me a favor and let me know what phone you go to next. thanks for the guide too.
chaosjh said:
geez, man. could you do me a favor and let me know what phone you go to next. thanks for the guide too.
Click to expand...
Click to collapse
Not sure quite yet. We'll have to see what AT&T comes up with.
kennethpenn said:
Make sure to throw your suggestions below!
Click to expand...
Click to collapse
Any idea why the BlurDialer never decompiles correctly? Will there be a fix for that?
gera4ever94 said:
Any idea why the BlurDialer never decompiles correctly? Will there be a fix for that?
Click to expand...
Click to collapse
I'm not quite sure why Moto failed at creating the BlurDialer.apk. Don't expect a fix on Froyo. Maybe it'll be fixed on 2.3 Gingerbread.
Ok, so I'm not to familiar with themeing, but I figure replacing a few .png files in the drawable-hdpi folder can't be to hard... But every time I try re-compiling the framework-res.apk, I get multiple errors all having to do with the public.xml file, which I didn't touch.
I de-compile the apk just fine, replace the .png files with different ones (same names), and then get the error upon re-compiling. And then nothing appears in the build folder at all. Any thoughts??? Any help would be much appreciated. Thanks.
**Edit**
When I run the cmd to compile the framework-res folder, I get:
W: Could not find sources
I: Building Resources...
Swiftks said:
Ok, so I'm not to familiar with themeing, but I figure replacing a few .png files in the drawable-hdpi folder can't be to hard... But every time I try re-compiling the framework-res.apk, I get multiple errors all having to do with the public.xml file, which I didn't touch.
I de-compile the apk just fine, replace the .png files with different ones (same names), and then get the error upon re-compiling. And then nothing appears in the build folder at all. Any thoughts??? Any help would be much appreciated. Thanks.
**Edit**
When I run the cmd to compile the framework-res folder, I get:
W: Could not find sources
I: Building Resources...
Click to expand...
Click to collapse
Could you read out some of the errors?
Most .png files can be replaced within WinRAR or 7zip without decompiling the framework. Only ".9.png" files need decompilation and recompilation.
when decompiling i get this:
apktool d -f framework-res.apk
Code:
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
W: Cant find 9patch chunk in file: "drawable-hdpi/statusbar_background.9.png". R
enaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/title_bar_portrait.9.png". Ren
aming it to *.png.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
that means it doesnt decompile correct the .9.png files?
when compiling, with minor changers in .9.png files i get these errors:
Code:
C:\FIXblur\framework-res\res\values\public.xml:3604: error: Public symbol drawab
le/sym_keyboard_space declared here is not defined.
....
le/tab_selected_bar_left_v4 declared here is not defined.
C:\FIXblur\framework-res\res\values\public.xml:3614: error: Public symbol drawab
le/tab_selected_bar_right declared here is not defined.
.....
.....
C:\FIXblur\framework-res\res\values\public.xml:3657: error: Public symbol drawab
le/zz_vzw_stat_sys_roaming_cdma_custom3 declared here is not defined.
btw the java jre i have is
Windows x64 16.09 MB jre-6u25-windows-x64.exe
(on my x64 win7)
Paschalis said:
when decompiling i get this:
apktool d -f framework-res.apk
Code:
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
W: Cant find 9patch chunk in file: "drawable-hdpi/statusbar_background.9.png". R
enaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/title_bar_portrait.9.png". Ren
aming it to *.png.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
that means it doesnt decompile correct the .9.png files?
when compiling, with minor changers in .9.png files i get these errors:
Code:
C:\FIXblur\framework-res\res\values\public.xml:3604: error: Public symbol drawab
le/sym_keyboard_space declared here is not defined.
....
le/tab_selected_bar_left_v4 declared here is not defined.
C:\FIXblur\framework-res\res\values\public.xml:3614: error: Public symbol drawab
le/tab_selected_bar_right declared here is not defined.
.....
.....
C:\FIXblur\framework-res\res\values\public.xml:3657: error: Public symbol drawab
le/zz_vzw_stat_sys_roaming_cdma_custom3 declared here is not defined.
btw the java jre i have is
Windows x64 16.09 MB jre-6u25-windows-x64.exe
(on my x64 win7)
Click to expand...
Click to collapse
Make sure you're decompiling GingerBlur 4. Only GB4 has my new-and-improved framework-res.
If you have the android sdk installed, it's version of aapt might be causing conflicts depending on the version of apktool being used. Since apktool just grabs the first one it finds in it's path, keep an eye on that. For linux, there is no way to set the path for apktool, the code just calls aapt, to be found wherever on the system visible from within java, no shell PATH changes have any affect. I have a custom version I did up to force the location of aapt via command line option.
If you are using .9.png files, make sure they are .9.png files and not just regular files with that extension. Apktool is like Santa Claus, it can tell when you are being naughty or nice.
All the small xml files like strings.xml are jumbled together in resources.arsc, all the identifiers in your statusbar.xml etc are decoded and reassigned when apktool recompiles them. So keep a copy of your mods outside of the apk as backup, you might not be able to extract them exactly as you modified them. If you reference new drawables, make sure those files exist somewhere in the apk folder before compiling as well.
Cheers!
Ok, so I've never themed Android before, but I'd be interested in playing around with the option, there are a few questions I have though.
1) Do you have a downloadable framework-res.apk or do I need to just pull it via adb (I know how to do this, I was just wondering)?
2) If I push the new framework-res.apk what is the risk of getting the boot loop of death that tends to happen if you incorrectly theme a ROM?
3) If I were to be caught in a BLOD would that mean that I would need to restore via an sbf and start all over again or could I still access Tenfars CWM somehow during the boot process and restore to the last Nandroid backup?
4) Should the device be wiped before testing a theme, or is it OK to just push the new framework-res.apk over the existing without wiping?
I'm sure I will have more questions in the future. I just got apktools running on my Mac, but don't have much time at the moment to fiddle around with it. I'm a newbie when it comes to this stuff, but I do know enough to feel comfortable working with these files.
I want to thank you in advance, theming Android devices is something I've wanted to learn how to do since I started using Android and I look forward to dabbling with it. I also look forward to the information in the guides you list as wanting to write in the future. You are awesome kennethpenn.
I don't know who invented this .9.png file thing, but it's the stupidest thing I've ever encountered... so frustrating... ggrrr
lostinbeta said:
1) Do you have a downloadable framework-res.apk or do I need to just pull it via adb (I know how to do this, I was just wondering)?
Click to expand...
Click to collapse
You can grab it from the GingerBlur CWM update zip. It is inside /system/framework.
lostinbeta said:
2) If I push the new framework-res.apk what is the risk of getting the boot loop of death that tends to happen if you incorrectly theme a ROM?
3) If I were to be caught in a BLOD would that mean that I would need to restore via an sbf and start all over again or could I still access Tenfars CWM somehow during the boot process and restore to the last Nandroid backup?
Click to expand...
Click to collapse
If you keep a copy of GBlur on your sd then you can usually use CWM to recover from a BLOD. You may have to: disconnect from all power - pull the battery - with battery out plug into AC - CWM will start and you can reflash the working GBlur zip
lostinbeta said:
4) Should the device be wiped before testing a theme, or is it OK to just push the new framework-res.apk over the existing without wiping?
Click to expand...
Click to collapse
Since a theme is basically image modifications there is no reason to wipe. To go fresh after applying a theme flash the DeOdexed CWM zip.
Thank you for the info nottach, all seems pretty easy (I had already pulled the framework-res.apk from my phone, but I have the GB4 zip on my computer in case I need more copies).
There doesn't happen to be some sort of emulator for this is there? lol. I highly doubt there is, but it seems rather daunting to change a file, push the framework-res.apk then have to restart to see if the change was successful. All part of the game though, can't always expect things you aren't really supposed to be doing in the first place to be easy.
lostinbeta said:
Thank you for the info nottach, all seems pretty easy (I had already pulled the framework-res.apk from my phone, but I have the GB4 zip on my computer in case I need more copies).
There doesn't happen to be some sort of emulator for this is there? lol. I highly doubt there is, but it seems rather daunting to change a file, push the framework-res.apk then have to restart to see if the change was successful. All part of the game though, can't always expect things you aren't really supposed to be doing in the first place to be easy.
Click to expand...
Click to collapse
No problem, the more themes the better.
I dont think there is an emulator, but there is an app that supposedly restarts the framework-res.apk. Ive never used it so I can't say if it works. Basically I'll make a ton of notes about changes that need to be made then ill carefully do one at a time. I always keep the latest few working versions of my themes on my sd while creating in case something goes wrong.
Heres the app i was talking about incase youre brave.
http://forum.xda-developers.com/showthread.php?t=1028541
Ok, moment of truth... de-compiled & re-compiled framework-res.apk, changing multiple 9.pngs as well as normal .pngs... no errors on de-compile or re-compile... flashing now... Come on, no boot loop, no boot loop...
**Edit**
Success... thank God... think I got it down now... just takes some trial & error when beginning.
So for anyone interested, here is a little tidbit that is pretty useful on how the whole .9.png (Or 9 Patch images) work in android.
http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch
It helps understanding how to edit them.
It reminds me of the Scale9 method in actionscript (sorry, I used to be a web developer and actionscripter so I try and relate new code and methods to what I already know to understand them better).
So i googled how to theme Gingerblur and got the link you posted. I then became a member of this site for some clarification on the instructions and upon searching, i found this post which is pretty sweet. Anyways, back to the question.
I understand all the commands, seem pretty simple, except for step 2. Is this the actual theme file you're referring to? If so are there any restrictions to what theme I can use, or do only certain ones work with this rom?
Thanks in advance!
I've looked around dozens of threads, but nothing has helped me fix my problem.
I have a Droid Incredible and there is a Quick Settings mod for the dropdown notification bar. My goal is to remove the Hotspot option from that list. When I try decompiling SystemUI.apk with Apktool OR Apkmultitool, I think it works fine. Apktool said there were errors decompiling two images, but I think i fixed those. I have tried installing framework-res.apk and com.htc.resources.apk to decomile it. After making the needed changes and going to compile it, it just spits out errors. No matter what I try I always get an error. What an I doing wrong? What do I need to do to get it to compile without errors?
TeeRom said:
I've looked around dozens of threads, but nothing has helped me fix my problem.
I have a Droid Incredible and there is a Quick Settings mod for the dropdown notification bar. My goal is to remove the Hotspot option from that list. When I try decompiling SystemUI.apk with Apktool OR Apkmultitool, I think it works fine. Apktool said there were errors decompiling two images, but I think i fixed those. I have tried installing framework-res.apk and com.htc.resources.apk to decomile it. After making the needed changes and going to compile it, it just spits out errors. No matter what I try I always get an error. What an I doing wrong? What do I need to do to get it to compile without errors?
Click to expand...
Click to collapse
Might need a bit more info.
What os you running? What commands you running? Have you installed your framework with a tag?
Sent from my Galaxy Nexus using Tapatalk
Evostance said:
Might need a bit more info.
What os you running? What commands you running? Have you installed your framework with a tag?
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
2.3.4 my own version of stock. In APKtool I was running d and b with SystemUI. Don't know if I installed it with a tag.
pull your framework-res.apk
You can then install a tag by installing it as:
apktool if framework-res.apk droid
Decompile it like you have done, but with the tag:
apktool d -f -t droid SystemUI.apk
Made your changes and then recompile it:
apktool b <Path/To/Decompiled/APK>
I'm doing a theme for DSC and I'm having some trouble recompiling the framework. I'm using AutoAPKTool, and most of the tutorials I've seen recommend starting off with a stock, not modded framework, to prevent errors when recompiling. DSC uses a modded framework, and I'm not sure a 407 stock framework would work with DSC.
So can anyone tell me what should I do to properly recompile the framework? If I attempt to recompile it just after decompiling, without performing any other modifications, the log says something about some strings not having a default translation, if I remember correctly.
Strings not having default translations isnt a critical issue, it'll still work if that's the only error it's giving.
It's ok, simply ignore that, as I used translation fron Nexus S ROM (mostly) and it's not a perfect match
I use apktool 1.4.2 for decompile and apktool 1.4.3 to recompile, make sure you have latest aapt from android sdk.
If you want edit the value and xml use notepad++ but do not copy paste as I always have issue when recompile it, just edit manually use compare plugin.
Sent from my PC36100 using Tapatalk 2
Thanks guys. Apparently there were other problems as well, but they all went away when I deleted everything and reinstalled the latest version of autoapktool. Now it finally outputs the recompiled framework.