I'm just trying a bit of theming myself, found plenty of guides on the topic however I have found one slight problem. No matter how I try to install my modded system apps, it always fails to install or doesn't change the original app at all.
I use APKmodder to do the editing if that affects anything, however the same issues arrise when using NinjaMorph on my NS.
I have tried multiple methods of getting the apps onto my device. Using adb push, creating a custom update.zip (which is all set out properly), NinjaMorph and even just the regular apk install, all of them either don't update the apps or are pushed to /system/apps but are not in the app launcher.
Any ideas? I have searched for hours about this and I haven't found anything to help me. Finally, if it helps I have tried with Launcher2.apk and Camera.apk.
Sent from my Nexus S using XDA App
Any ideas at all? I've never had much luck with Modding apps full stop. Could it be my copy of APKmodder?
Sent from my Nexus S using XDA App
is your rom deodexed?
I imagine so, running CM7 and I can't find any odex files in /system. I also read somewhere else that CM6 was deodexed so I figured it would be the same.
What difference would it make if it wasn't deodexed? Would you need to remove the odex or something?
Sent from my Nexus S
Jonathon Grigg said:
I imagine so, running CM7 and I can't find any odex files in /system. I also read somewhere else that CM6 was deodexed so I figured it would be the same.
What difference would it make if it wasn't deodexed? Would you need to remove the odex or something?
Sent from my Nexus S
Click to expand...
Click to collapse
CM7 is deoxed. It's probably because you're changing the apk, don't understand why you're playing with it but whatever.
No idea, my recommendation is to not mod it.
I am not familiar with the tools you're using, but I've heard that people have had trouble with them in the past.
The best tool for theming is Apkmanager 4.9 used along with Apktool 1.3.1.
However, if you're simply swapping some images, just do so in WinRAR or 7zip. No deed to decompile, resign anything. Just put your system apps in a Flashable zip in this order: Zip/system/framework/framework-res.apk and Zip/system/app/<your system apps> and drag and drop your images in the right locations.
Also, your zip must have a META-INF folder with the proper update script.
You can use any one of my themes as a template.
Hope this doesn't sound too convoluted.
Cheers.
Thanks for that, some changes are image based but there are also some XML based changes which I require, would the 7zip method work there?
And sorry if I'm being vague, but Im not near my computer now, but how would you use two tools in conjunction? Because I have used apktool before but not the other.
Thanks very much though! I am finally getting somewhere
Edit: thanks for the template offer, I will have a look and see what's different to my tests. Just one final question, is there any difference between an update-script and updater-script?
Double EDIT: For future reference if anyone finds this, there is a difference between update-script and updater-scripts. From Android 1.5 onwards, Google moved to updater-script's, leaving update-script's behind. Make sure you remember this!
Sent from my Nexus S
Jonathon Grigg said:
Thanks for that, some changes are image based but there are also some XML based changes which I require, would the 7zip method work there?
And sorry if I'm being vague, but Im not near my computer now, but how would you use two tools in conjunction? Because I have used apktool before but not the other.
Thanks very much though! I am finally getting somewhere
Edit: thanks for the template offer, I will have a look and see what's different to my tests. Just one final question, is there any difference between an update-script and updater-script?
Sent from my Nexus S
Click to expand...
Click to collapse
For xml changes you have to decompile/recompile the apk. Apkmanager is a GUI for apktool so you don't have to learn/remember the java commands.
If you download Apkmanager, it comes with Apktool 1.3.2, be sure to replace it with 1.3.1. It's way more stable and reliable.
Not sure about the difference between updater and update, maybe one has Amend scripts and one doesn't.
I am not a developer so can't say for sure , but the one person to ask would be ogdobber.
He literally knows everything about everything .
sonnysekhon said:
For xml changes you have to decompile/recompile the apk. Apkmanager is a GUI for apktool so you don't have to learn/remember the java commands.
If you download Apkmanager, it comes with Apktool 1.3.2, be sure to replace it with 1.3.1. It's way more stable and reliable.
Not sure about the difference between updater and update, maybe one has Amend scripts and one doesn't.
I am not a developer so can't say for sure , but the one person to ask would be ogdobber.
He literally knows everything about everything .
Click to expand...
Click to collapse
Ok thankyou very much for the help once again. I have finished school for the week so I should have time to test these methods out now.
If I need any further help I might drop ogdobber a note then.
Thanks for all your help!
Sent from my Nexus S
Related
what is a good xml editor
Eclipse
Sent from my HERO200 using XDA App
aaronpoweruser said:
Eclipse
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
im on the site witch one
Eclipse, Notepad++ or gedit
Use apk manager to decompile the apk then notepad++ to edit the XML then recompile the apk.
For editing just use notepad++ if you want an ide to manage a project and also do xml edit go the eclipse route... preferably Myeclipse.
Papa Smurf151 said:
Use apk manager to decompile the apk then notepad++ to edit the XML then recompile the apk.
Click to expand...
Click to collapse
Would this be a way to use an evo's 4g icons in place of my 3g ones? I thought it would be fun to try...
I assume I can't simply unzip framework-res.apk, paste them in and zip it back up and actually expect it to work...
Sent from my HTC Hero with Froyo...
Vandelay007 said:
Would this be a way to use an evo's 4g icons in place of my 3g ones? I thought it would be fun to try...
I assume I can't simply unzip framework-res.apk, paste them in and zip it back up and actually expect it to work...
Sent from my HTC Hero with Froyo...
Click to expand...
Click to collapse
I personally don't use apk manager for PNG edits. Never had good luck getting the apk to recompile correctly. I mainly use it to edit XML files, do Smali edits, do resources.arsc(which when decompiled is converted to values folder in the Res folder), and android manifest edits.
Eclipse is to much to confusing for a lot of people to use. I personally can't stand it. Well except to recompile .9 files.
But who am I to tell someone what to use. I've only edited a bunch of XML files and resources.arsc file and Smali edits....etc and put stuff out on the market. So I really have no idea what should be used. Lol
Simply replacing the PNG files should give u the result ur looking for. No need to decompile the apk to do that. Just make sure u change the PNG file name to the file u want to use as a replacement
Papa Smurf151 said:
I personally don't use apk manager for PNG edits. Never had good luck getting the apk to recompile correctly. I mainly use it to edit XML files, do Smali edits, do resources.arsc(which when decompiled is converted to values folder in the Res folder), and android manifest edits.
Eclipse is to much to confusing for a lot of people to use. I personally can't stand it. Well except to recompile .9 files.
But who am I to tell someone what to use. I've only edited a bunch of XML files and resources.arsc file and Smali edits....etc and put stuff out on the market. So I really have no idea what should be used. Lol
Simply replacing the PNG files should give u the result ur looking for. No need to decompile the apk to do that. Just make sure u change the PNG file name to the file u want to use as a replacement
Click to expand...
Click to collapse
I agree with you totally on Eclipse... I use it on a daily bases and sometimes its easier to just use notepad++ for smaller things.. even tho I love Eclipse.
Smali is annoying to look at and I can't stand the decompiled code... I'd love to contribute to Cyanogens or Darch Repo but I don't have the setup to do it at the moment, I have a nice box but the family would be pissed if I tried to convert them to Linux and I deplore dual boot.
So I'm happy for now with f-ing around in GIMP and doing some stuff I dont get to do in my professional life.
ASimmons said:
I agree with you totally on Eclipse... I use it on a daily bases and sometimes its easier to just use notepad++ for smaller things.. even tho I love Eclipse.
Smali is annoying to look at and I can't stand the decompiled code... I'd love to contribute to Cyanogens or Darch Repo but I don't have the setup to do it at the moment, I have a nice box but the family would be pissed if I tried to convert them to Linux and I deplore dual boot.
So I'm happy for now with f-ing around in GIMP and doing some stuff I dont get to do in my professional life.
Click to expand...
Click to collapse
Agreed. Eclipse is a pita. That's why I love apk manager. I can almost do everything with that as I can with eclipse without all the excess steps eclipse runs u through.
I have dual boot on my laptop and it works great. I mainly stay on windows but use Linux every once in a blue moon.
I also use Photoshop rather than gimp. Gimp has always seemed very not user friendly.
I hate Smali code but I'm learning how to edit it and create my own as it is the root of the apks and there r just somethings that have to be played around with in there.
The one thing I have learned is that everything is so much easier when decompiled.
I tried to edit bianary XML. I'd almost rather take a bullet in the head. LOL
Papa Smurf151 said:
Agreed. Eclipse is a pita. That's why I love apk manager. I can almost do everything with that as I can with eclipse without all the excess steps eclipse runs u through.
I have dual boot on my laptop and it works great. I mainly stay on windows but use Linux every once in a blue moon.
I also use Photoshop rather than gimp. Gimp has always seemed very not user friendly.
I hate Smali code but I'm learning how to edit it and create my own as it is the root of the apks and there r just somethings that have to be played around with in there.
The one thing I have learned is that everything is so much easier when decompiled.
I tried to edit bianary XML. I'd almost rather take a bullet in the head. LOL
Click to expand...
Click to collapse
No blasphemy against Eclipse And I love Gimp its a little flaky on Windows but its free. What APK manager are you using?
ASimmons said:
No blasphemy against Eclipse And I love Gimp its a little flaky on Windows but its free. What APK manager are you using?
Click to expand...
Click to collapse
Its a program call apk manager. U can find it on xda for free. Or u can download my everything android zip in the dev section. I put it in there. It let's u decompile Apks. Recompile apks. Sign apks optimize apks and zip align apks. All in one program. Its great.
I use apk manager 4. Something that has a script in it. Thought maybe you were using something else. Thanks for the info.
Sent from my HERO200 using XDA App
ASimmons said:
I use apk manager 4. Something that has a script in it. Thought maybe you were using something else. Thanks for the info.
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
Yeah same program I'm using. 4.8 is the newest version. I swear by it
If anyone can help, please take this zip and make it compatible for the Hero. right now it's for the Droid running Cm6. http://www.multiupload.com/BHME414DUC
Thanks
abu_noah said:
If anyone can help, please take this zip and make it compatible for the Hero. right now it's for the Droid running Cm6. http://www.multiupload.com/BHME414DUC
Thanks
Click to expand...
Click to collapse
Its not something you do in a few minutes.
He's been working on it for a bit, think he needs help with the finishing touches
Sent from my HERO200 using XDA App
MrSpradlen said:
He's been working on it for a bit, think he needs help with the finishing touches
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
I have been working on this for a bit, but this is just the Full on flashable zip, made for the Droid. I got three kids and not alot of time to resize every image to mdpi. plus this is coming from the a droid theme, so I'm not sure what to do with the drawable-nodpi images and other if any nopi images. anyway, i'm just asking for help, not for "I can't help you" or "Alot of work" answers. I know it's alot of work as i have driving myself crazy on how to do it. Thanks.
I tried using the theme porter to save time but it will not recognize 9.pngs and I'm pretty sure that's why it's not porting.
abu_noah said:
I tried using the theme porter to save time but it will not recognize 9.pngs and I'm pretty sure that's why it's not porting.
Click to expand...
Click to collapse
What errors are you getting, what issues are you having? sorry to be so coarse.
ASimmons said:
What errors are you getting, what issues are you having? sorry to be so coarse.
Click to expand...
Click to collapse
I have converted the hdpi to mdpi now I think. before I used the theme porter, but it kept saying system file cannot be specified. well i got the pngs converted and the folders renamed, but I don't have a hero to test it on. I use my wife's when she's here. Don't know if this will work or not.
I also need to know if the images in the framework-res are the only thing I need to change, and then I can flash that same package that was meant for the droid or if I need to transfer those over to the Hero's framework-res?
abu_noah said:
I have converted the hdpi to mdpi now I think. before I used the theme porter, but it kept saying system file cannot be specified. well i got the pngs converted and the folders renamed, but I don't have a hero to test it on. I use my wife's when she's here. Don't know if this will work or not.
Click to expand...
Click to collapse
I almost positive you cant just rename folders like drawable-hdpi to draw-mdpi as theres more in the apk that specifies that the apk is built for an hdpi phone.
This is how I do it (short version cause I'm working out kinks). basically just copy over the pngs from the hdpi folders to the mdpi folders. Basically the difference in size from hdpi to mdpi is about 66% the size of an hdpi png so in the process of copying them I also shrink them. 9 patch pngs are a alot harder to get right and I currently working through some ways to port those now, but for a basic port you can just leave them as is. If you wanted to fix the 9 patch you basically have to decompile the apk and then use the 9patchDrawable tool in the android sdk and gimp to shrink them and then redraw the patch borders.
Your problem is most likely trying to rename the file folder. The port should only bring over the pngs and maybe ( i never do) some minor xml tweaks and put those in the rom your porting to you can't use anything from the ported rom except the pngs unless you want a buncha headaches.
http://forum.xda-developers.com/showthread.php?t=737526
Heres a script that ports your themes from firmware to firmware, rom to rom.
How it works:
- Looks through app/framework folder for apks that exist in new/old rom
- Then extracts pngs from those apks
- Then deletes mismatching pngs
- Repacks old themes pngs into new rom
- Done
Click to expand...
Click to collapse
Easy cheesy multi rom theme ports
Here we go! This is gonna be fun this weekend.
xtremekilla09 said:
Here we go! This is gonna be fun this weekend.
Click to expand...
Click to collapse
lol... +1
Now I can port my themes for the whole world to share. Thanks for the find...and thanks for sharing.
sent using a phone.
Now what would really be nice would be if someone designed an .apk that did this on the phone(while adding the originals to a "theme-revert.zip" and the new theme to "theme.zip"). Then you just make one theme and post the link to the .apk.
The closest i ever found was zipthemer but it didnt work every time and thats no good.
If only someone could port the open source t-mobile theme choser to samsuck.
So this is it until someone who knows how to code jumps on that idea lol. Still glad it exists and that i bumped into it. And even more so that two of main people i had hoped would make use of it appear to be willing to do just that.
whiteguypl said:
And even more so that two of main people i had hoped would make use of it appear to be willing to do just that.
Click to expand...
Click to collapse
You bet. If this works, there are so many things that can be done, oh man. It will rain themes, well at least for FireFly to start with.
Again, thanks for pointing this out.
xtremekilla09 said:
You bet. If this works, there are so many things that can be done, oh man. It will rain themes, well at least for FireFly to start with.
Again, thanks for pointing this out.
Click to expand...
Click to collapse
From the limited testing ive done it seems to be working 100%. The only real potential problem im seeing (and the script might have a way to handel it) is porting a theme that uses drawable-hdpi to an apk that has both an hdpi AND hdpi-v4 folder in it. I would hope its defaulting hdpi to hdpi-v4. Lol... But i dont know.
Edit: and even that hope is based on the possible incorrect assumption that andriod will allways pull from the v4 folder given the choice? Anyone care to enlighten me?
whiteguypl said:
From the limited testing ive done it seems to be working 100%. The only real potential problem im seeing (and the script might have a way to handel it) is porting a theme that uses drawable-hdpi to an apk that has both an hdpi AND hdpi-v4 folder in it. I would hope its defaulting hdpi to hdpi-v4. Lol... But i dont know.
Edit: and even that hope is based on the possible incorrect assumption that andriod will allways pull from the v4 folder given the choice? Anyone care to enlighten me?
Click to expand...
Click to collapse
I think it does. Isn't the non-v4 there for compatibility reasons with older os versions? I saw something like that a little while ago, in a theming guide
Herp derp Captivate XDA app.
Well after a lot of testing i can safely say that it does not know how to handle hdpi vs hdpi-v4. And since our rom maintainers have decided to mix and match at will without smoothing anything out this script will not work a large majority of the time, depending on what rom you are on.
Quickish fix is to go into the apk before using the script and renaming all the drawable folders to match both the "themed" and "to be themed" apks. Then after the processes you can go in and rename them back to there original names.
............. Im also assuming that if you kept the folder name changes the xml wouldnt know where to look for the images???? I know little to nothing about how android handels that, if someone would like to chime in please do.
Well I most definitely be playing with it this weekend. Thanks again for the info.
sent using a phone.
whiteguypl said:
Well after a lot of testing i can safely say that it does not know how to handle hdpi vs hdpi-v4. And since our rom maintainers have decided to mix and match at will without smoothing anything out this script will not work a large majority of the time, depending on what rom you are on.
Quickish fix is to go into the apk before using the script and renaming all the drawable folders to match both the "themed" and "to be themed" apks. Then after the processes you can go in and rename them back to there original names.
............. Im also assuming that if you kept the folder name changes the xml wouldnt know where to look for the images???? I know little to nothing about how android handels that, if someone would like to chime in please do.
Click to expand...
Click to collapse
Maybe it could be tweaked.
Like after line 55(like roms) (and line 130 pre to post)
Code:
if EXIST "%~dp0old\%dcrt%\%%~nF\res\drawable-hdpi-v4" (rename "%~dp0old\%dcrt%\%%~nF\res\drawable-hdpi-v4" drawable-mdpi)
if EXIST "%~dp0old\%dcrt%\%%~nF\res\drawable-en-hdpi-v4" (rename "%~dp0old\%dcrt%\%%~nF\res\drawable-en-hdpi-v4" drawable-en-mdpi)
Line 240 seems to be for eclair. Most roms here are froyo.
It is possible. Daneshm90 knows his stuff and keeps it fairly simple. If you come up with something he would probably add it.
I will see what I can come up with.
Edit: Extracted file to C:\Theme-Porter_beta_3.
I added the above lines to to the script at lline 57 and 58.
Added files per directions. No errors. Changed files are dated 3/17. Untouched files still old date.
I may reflash soon to test it. Will follow up.
IamSonoma said:
Maybe it could be tweaked.
Like after line 55(like roms) (and line 130 pre to post)
Code:
if EXIST "%~dp0old\%dcrt%\%%~nF\res\drawable-hdpi-v4" (rename "%~dp0old\%dcrt%\%%~nF\res\drawable-hdpi-v4" drawable-mdpi)
if EXIST "%~dp0old\%dcrt%\%%~nF\res\drawable-en-hdpi-v4" (rename "%~dp0old\%dcrt%\%%~nF\res\drawable-en-hdpi-v4" drawable-en-mdpi)
Line 240 seems to be for eclair. Most roms here are froyo.
It is possible. Daneshm90 knows his stuff and keeps it fairly simple. If you come up with something he would probably add it.
I will see what I can come up with.
Edit: Extracted file to C:\Theme-Porter_beta_3.
I added the above lines to to the script at lline 57 and 58.
Added files per directions. No errors. Changed files are dated 3/17. Untouched files still old date.
I may reflash soon to test it. Will follow up.
Click to expand...
Click to collapse
Looks like that would take it one step closer. The main problem would still exist with those changes. It wont take images from a drawable-hdpi folder and migrate them to a drawable-hdpi-v4 folder. I posted in the op and asked if there might be a way for him to add an option to force the images into the other directory. I would assume it would be similar to part of what the script does to handle hdpi to mdpi conversions.
I decompiled my systemUI apk and made changes on it (Fergie's mods). Now I don't understand how to get it on my phone.
It's fully recompiled. But apparently I have to sign it. There's so many different things people do:
-zipalign
-optimizing apks
and more stuff I can't even remember. What do I have to do to get this mod onto my phone? If anyone can please tell me how to do this I will be very grateful.
Also, I used apktool, not apkmanager if that matters.
(As you can see, I'm fairly new at this. I just added the mods by following Fergie's guides, don't understand 95% of what I did).
onasri15 said:
I decompiled my systemUI apk and made changes on it (Fergie's mods). Now I don't understand how to get it on my phone.
It's fully recompiled. But apparently I have to sign it. There's so many different things people do:
-zipalign
-optimizing apks
and more stuff I can't even remember. What do I have to do to get this mod onto my phone? If anyone can please tell me how to do this I will be very grateful.
Also, I used apktool, not apkmanager if that matters.
(As you can see, I'm fairly new at this. I just added the mods by following Fergie's guides, don't understand 95% of what I did).
Click to expand...
Click to collapse
Signing is the one thing that prevents me from making things to share with all of you. So I just become greedy and use it all for myself hahaha
You should also say which OS you're running. I run Ubuntu, hence the reason I Google "Android xda Ubuntu Sign apk" or in my case: the latter but "rom" replaces apk. I couldnt explain how SEO works, because I can't sign using Ubuntu!!!!!!!!!! Ahhhhhhhrrrrrggggg!!!!ยก!!
Sent from my Nexus S 4G using XDA App. Developer of brickROM, and OP of XDA Thread of The Year 2011.
I'm using w7. This is unbelievably annoying right now. I can't figure it out.
onasri15 said:
I'm using w7. This is unbelievably annoying right now. I can't figure it out.
Click to expand...
Click to collapse
I know you need to use the sdk.
Sent from my Nexus S 4G using XDA App. Developer of brickROM, and OP of XDA Thread of The Year 2011.
onasri15 said:
I'm using w7. This is unbelievably annoying right now. I can't figure it out.
Click to expand...
Click to collapse
Hi... I am a Windows 7 user as well. I use ApkTool, but mostly APK Manager.
When I need to sign an APK, this is how I do it.
I open the original APK with 7zip and copy out the resources.arsc file and META-INF folder.
I then take the APK that APK Manager spit out - unsignedwhatever.apk and I open that and replace the existing resources.arsc and META-INF folder with those from the original APK that I copied out.
I then rename unsignedwhatever.apk to whatever.apk, place it in a flashable zip and flash it. Works every time... unless I've screwed something else up
Good luck!
THS Build 6.5 is now out, and I wasn't sure if the accurate battery for build6.0/6.1 was going to work since the SystemUI.apks have different file sizes.
Therefore, I decided to make one from scratch.
I just took gunnermike's mod and applied it to THS 6.5's SystemUI.apk. so all the credit goes to him
This is mostly for myself, but I decided to share it since others might find it useful too.
Enjoy!
Flashed it, works great. Thanks!
Would you explain how you did this please? I'm sure there's a lot of us who are interested.
AuroEdge said:
Would you explain how you did this please? I'm sure there's a lot of us who are interested.
Click to expand...
Click to collapse
Sure.. I'll list the general steps, but obviously it's too much to explain every detail, so you must know a bit about how to use ADB, Android SDK, etc..
1. Pull /system/framework/framework-res.apk & /system/app/SystemUI.apk from your phone or extract from the THS6.5 .zip
2. Use APKTool to decompile framework-res.apk (apktool if framework-res.apk)
3. Use APKManager to decompile SystemUI.apk
4. Replace the stat_sys_battery.xml & stat_sys_battery_charge.xml in /res/drawable/ with the "accurate" versions (You can do that by reusing previous versions or get it via UT Kitchen)
5. Replace/add the battery pngs files in /res/drawable-hdpi
6. Compile using APKManager as system apk
7. Create flashable .zip file for use with CWM. You can do this by reusing an existing version and just opening the .zip and replacing some files..
Well.. hope that gives you an idea.. You can find everything online right here in XDA Developers forums or via Google.. That's how I learned too..
Many thanks dude; just what the Doktor ordered!
This may not be the appropriate place to ask, but could somebody compile a stock battery that is flashable? The Mesmerize versions of THS come with a accurate battery mod preinstalled, but I'd much rather have the stock battery.
nograsswillgrow said:
This may not be the appropriate place to ask, but could somebody compile a stock battery that is flashable? The Mesmerize versions of THS come with a accurate battery mod preinstalled, but I'd much rather have the stock battery.
Click to expand...
Click to collapse
I can make one for you when I have time Monday..
Don't have the necessary tools here at home
neozen21 said:
I can make one for you when I have time Monday..
Don't have the necessary tools here at home
Click to expand...
Click to collapse
That would be awesome, thank you!
Edit: actually you don't have to worry about it if you don't want, someone over at Rootzwiki put one up last night. Thank you anyway!
nograsswillgrow said:
That would be awesome, thank you!
Edit: actually you don't have to worry about it if you don't want, someone over at Rootzwiki put one up last night. Thank you anyway!
Click to expand...
Click to collapse
Lol.. I started already (but haven't finished).. I see now why you don't like the accurate battery.. it's an Android!
I see that post on Rootzwiki, it should have what you are looking for..