yashsingh1/xdaforums huggingface dataset:
[Android Themes] ZilverZurfarn:
I might want to replace original Launcher.apk with Irrenhaus' Launcher.apk (just an example) in my theme. Can I extract everything from from Irrenhaus' apk (assets folder, res folder, AndroidManifest.xml, classes.dex, resources.arsc), put them all in the theme zip and original Launcher.apk will be Irrenhaus' Advanced Launcher when I apply the theme? Or are we restricted to basically modifying the GUI of existing apps with this method?

/Mats
[Android Themes] Stericson:
You can try :)
[Android Themes] Stericson:
2nd and fourth video is done. Last video I will add to the thread tomorrow morning, follow my twitter and youtube will tweet it when its done....

Stericson
[Android Themes] phantom574:
Works beautifully. So so so damn cool
[Android Themes] ZilverZurfarn:
Had to do

chmod 0755 /system/sd/theming/zip

too - If not, Applying subtheme failed.

Also, trying to replace code in an apk wasn't a good idea. Tried it with Launcher, and I ended up with no Launcher at all (even if the phone seemed to work in every other respect)

/Mats
[Android Themes] Stericson:
All the videos are up guys.
[Android Themes] ZilverZurfarn:
:eek:And I who use to flatter my self that I'm good at RTFM. Spotted the mm.sh part, but missed the zip part. I'll blame it on my old eyes.:rolleyes: Or a sneaky edit... ;)

/Mats
[Android Themes] k4str0:
I want to personally thank Stericson, he has played a large role in the ideas and coding of this project. He also needed to decipher some of the functions in the script that are outright crazy :D

On another note, we've tossed around ideas about turning MM into an APK, so I thought I would start a googlecode page where we can have some people assist with the coding aspects of the project. Stay tuned and/or PM if you are interested.
[Android Themes] Stericson:
Sneaky edit ;) thats why I changed the post :)

Stericson
[Android Themes] Stericson:
AH! Kastro have we gotten enough money for your straight jacket yet? Surely we know you need it after writing out some of those crazy functions.

:)
[Android Themes] prash:
Anyone want to try out a SystemForce3 themed Stericson Lockscreen (aka very first indepedent skin made for the lockscreen :D )

You MUST have Stericson Lockscreen installed. (.9999 update.zip version here)

Follow the instructions in first post and use metamorph to install this:

http://www.injun.org/themes/Prash-SystemForce3-Stericson-Lockscreen.zip

Just testing the new method for now, if all goes well I'll start using this method for everything.
[Android Themes] ZilverZurfarn:
Yes, I'd consider replacing full apks and even adding new a vital part of this.

I see a problem otherwise, where individual users might have replaced this apk or that, while your theme is created for the original apk and all h*ll breaks loose. Depending on apk, it's vital that the apk you update this way, is really the apk (and version) you're targeting.

/Mats
[Android Themes] phantom574:
OMG!!!!!!

Thank you so much for making this. i just made the theme i've always wanted without flashing a zip. :D i just used prash's zip and edited the pics myself. Great Work!!!!!!
[Android Themes] ZilverZurfarn:
Another nice feature would be for the script to create a backup of all files it replaces, creating a theme file (bakup-theme.zip?) that you can apply to undo what the theme you just installed did.

/Mats
[Android Themes] bkmo:
This looks to be a great idea, BUT now that everyone is optipng/zipaligning the .apk's this is going to defeat the zipaligning. Once you touch an apk, or even re-sign it, then you need to zipalign it again. Maybe zipalign can be compiled to be run on the phone. I don't know. I figured I would toss this out there though.
[Android Themes] Stericson:
We are already on it :)
[Android Themes] rikupw:
Perhaps we can find a suitable replacement for zipalign, if you have any suggestions, please, let us know :-) also, I am currently engaged with coolboh3000 with a zipalign script compatible with linux and windows, :-D
[Android Themes] bkmo:
I have my own home-rolled script that extracts an update zip and then runs optipng, colorchange.jar, and zipalign on it before rezipping and resigning it. In order to do apps on the phone I would imagine you would have to adb pull them, zipalign them, then push them back. What is needed is a natively compiled zipalign. Maybe there is source for it somewhere, or from one of the AOSP guys.
[Android Themes] Stericson:
small update....lil easier to use.

Stericson
[Android Themes] rikupw:
well, the question I was asking, was if anyone knew of an easily found binary on linux that can do something fairly similar, but after reading the AOSP repo, I realized that zipalign was designed specifically for .apk's. so... :-/ next question would be how to compile it for android, Kastro may have more say about this than I, as I haven't enough experience with source code.
[Android Themes] k4str0:
I have played with cross compiling zipalign a bit and haven't figured it out, yet. We knew when we created Metamorph that it would change the zip's alignment, however, there is a Windows Script and an Ubuntu variant of a script out there (or will be soon released by rikupw) to perform the alignment/optimization of all apks on the phone. Only problem is that you need to be connected to a PC/laptop to perform the alignment for now.

Please keep the ideas coming though, we do notice them and appreciate feedback from the community.
[Android Themes] bkmo:
I just ran it, and it ran much faster than I expected. The only issue I encountered is that I had 4 missing shortcut icons on 2 of my homescreens. The programs were still in the app-drawer and all I needed to do was pull them back onto the homescreen again. Thanks for this, it really comes in handy.
[Android Themes] rikupw:
as a matter of fact, that's normal ;) that has to do with the package manager, not the script :-P glad it helped!
[Android Themes] k4str0:
You should release it in another thread for troubleshooting or whatever and so it can easily be found :)
[Android Themes] gReg0r:
oh my god, this is f**king awesome!!!!

please excuse my language, but its like a miracle to me ... i'm a total noob concerning development and programming languages but i've been able to modify and custom a theme by myself with your script -.- ... wait, did i mention? AWESOME!!!! :D
[Android Themes] Gilliland12:
Having some trouble with this.

As far as I know I'm doing it right. I copied the two files (mm.sh and zip) into /system/bin and chmod them to 0755.

I downloaded Prash's SystemForce3 Lockscreen from his thread on that. Put it (and the other files that I downloaded from this thread) into AndroidThemes on my sdcard.

I run the program and this is what I get (I cut out a small portion in the middle, it's represented by ....).
[Android Themes] k4str0:
Can you run the following command (as root from Terminal Emulator)? "busybox df -h"?

I suspect the problem is that your /system is full and putting the mm.sh in that directory with the zip binary filled up the space. An alternative at this point is to move the files (mm.sh & zip) from /system/bin to /system/sd/ (if you have Apps2SD) or move them to /data/local/bin where there is more space. You may have to change directories to the location you moved the script to first before executing it again.
[Android Themes] Gilliland12:
That's the results before I moved the mm.sh and zip file.

I moved them over to /system/sd and chmodded them. Things looked good for a second, but then I got that last bit of the error again.
[Android Themes] k4str0:
Run "ls -lh /system/framework/framework-res.apk" and can you give us another "busybox df -h" after moving the files to /system/sd? Just trying to figure out how big your framework is and what your space currently looks like.

I guess I should have stayed on Hard SPL so I could have the smaller system and do the testing there. Lucky for us, Stericson has a cliq so he could revert his G1 to hardSPL for script debugging :)
[Android Themes] Gilliland12:
[FONT=&quot]Ran the framework-res.apk and received this as feedback (don't know if you need it or not)[/FONT]

[FONT=&quot]Results of busybox df -h (a lot more stuff than last time, last time I did it in recovery, this time in terminal eumlator).[/FONT]

Also forgot to mention that I am using HardSPL on this phone. My normal phone has dangerSPL, but I swapped with my wife today to do some maintenance on her phone (the one I'm reporting this data from).

PS Sorry for the formatting issues on the feedback from the phone, but the posting system here does not like tabs.
[Android Themes] bmfc187:
I tried this and got "Permission Denied" when typing ./zipall.sh so i tried sh zipall.sh and got

"User Error:
Please configure the path to your android-sdk tools directory:
use: ./zipall.sh -p /full/path/to/sdk/tools

this IS for use ON THE DEVICE, right? It said ON YOUR PHONE...i did this in terminal emulator...appreciate your help, thanks...

-BMFC
[Android Themes] k4str0:
No, rikupw's zipall.sh script is for Ubuntu linux only. Not for the phone, (at least yet). Sorry for the confusion.
[Android Themes] k4str0:
Thanks for the information. One of the dev's will need to have HardSPL so we can try to replicate the problem. I'm really leaning towards the fact that I only see about 550KB free on your /system partition. Haykuro's Danger / Death SPL will certainly work since you would have more free space on system.

On an interesting little note, you moved the zip binary and the script from /system/bin to /system/sd (and together they are about 700KB), yet there is only 550KB free... I'm a bit lost here.
[Android Themes] bmfc187:
Np, thanks for clarifying...still gonna check it out on my laptop, thanks!

-BMFC
[Android Themes] Stericson:
You dont have enough room in your system partition. You need to try and free some space for this to work. Try cleaning out some stuff in /system/app

Stericson
[Android Themes] Gilliland12:
Some more information for you guys.

Silly me I failed to properly delete "zip" from /system/bin when I gave you those last values for busybox df -h. So there is an extra 804kb there.

I toyed with having mm.sh and zip in /system/sd and got the following error

So I edited the mm.sh file to point to /system/sd/zip instead of /system/bin/zip and for the most part it worked fine.

But I got this error at then end when running it (this is when mm.sh and zip are in /system/sd)

Still having some trouble with space I guess. Though since mm.sh and zip are in /system/sd (which is on my ext3) I'd imagine there should be more than enough room. As per the warning label on the mm.sh file, I didn't try to read too much of it for fear of my head exploding, so I don't know if there is anything else that would need editing to point mm.sh to extract everything to /system/sd (where there is plenty of space) in order to do the update.

Looks like I'm eventually going to need to put the dangerSPL on this phone, but if this is a bug with the script that can be worked out, then it really should be. Not everyone is going to want to have the dangerSPL unless they absolutely have too.
[Android Themes] Gilliland12:
I tried cleaning out all the .apk's that I don't use, but I still ran into the same error.
[Android Themes] rikupw:
can you do a "busybox df -h" and check that you don't? something mihgt be screwed up with your install. you may have to fastboot erase system. :-/ and start from scratch
[Android Themes] rikupw:
the script isn't for "ubuntu linux" only ;) you'd probably run into basic errors though if everythings not instlaled. but the basic part of the app is "adb" and "zipalign"
[Android Themes] vamopyros_wrath:
I am currently on KingxKilks 1.9 Hero rom, followed all steps, and typed mm.sh in adb prompt, and got the message

ERROR:PEBKAC! You need to be root! Try again :)

what is this? and i tried it with a few other roms, same problem :( .

I know my phone is obviously rooted too...
[Android Themes] Stericson:
:) Thats our PEBKAC error..... you need to be root to run this.... so type "su" (without quotes) in your terminal before running the script.

Stericson
[Android Themes] vamopyros_wrath:
Even through adb, cause i did that through recovery terminal on the phone with the same error, lol i know about superuser thanks for the quick reply ( and this new theming idea, was waiting for a while for this.)
[Android Themes] Stericson:
The only way that error is thrown is if the uid doesnt equal 1000(root). I am using the same script and using terminal it will throw that error if I dont su before using the script. Need to make sure you have a "#" and not a "$".

Let me know what happenes and possibly provide me with screenshots if it persists :)

Stericson
[Android Themes] vamopyros_wrath:
Ok, so I have tried this in terminal emulator, better terminal, recovery console, and adb shell

su

i get...

#

i type

mm.sh -i

i get

<The metamorph logo here>

~irc.freenode.com#cyangenmod

/system/bin/mm.sh renamed from metamorph.sh; version: 0.1g

By Kastro and Stericson; Special Thanks to: rikupw and prash

ERROR: PEBKAC! You need to be root! try again :)

even if i try

su

rwsystem

then

mm.sh -i

i get the same, and its keeping me from getting kings new update, lol which i want, and i donno, think this error is kinda weird to get cause its def. rooted rofl.
[Android Themes] k4str0:
Thank's for your testing. If you do this from Terminal Emulator or the Recovery console it should work. When you use adb, your ID is "0" and the script is currently only checking for 1000. We'll get this fixed in the next release. ;)

*EDIT* I take that back. When I terminal, my id is 0. Looking into it now. I'm running 4.2.1
[Android Themes] Stericson:
Ohhh you found a bug for us :) Good job!

We will have it taken care of in no time....

Thanks,

Stericson
[Android Themes] vamopyros_wrath:
awesome! thanks dude this is gonna be great, the possibilities will eventually be endless...maybe even a gui someday like the whole summerboard thing on iphones lol.
[Android Themes] Stericson:
Thats the idea....
[Android Themes] jairomeo:
I have everything set up, everything works, but once I apply, after I reboot (since I have the framework done also) I get Force Close on a lot of apps, like Google Talk, Gmail, Market etc. I even ran fix_permissions and it still happened. Anyone else run into FC's?

What's more strange is, I can flash cyan's updates (which has no google apps) and it works fine after :confused:

Update - I took out the framework from the update and everything worked fine. I'm going to double check all the files in the framework to make sure nothing is messed up.
[Android Themes] jcarrz1:
hey stericson, i've loved your work in the past. this looks amazing (if i understand it correctly).

It would help if you included a goal statement/intro on the first post... but I think i was able to glean that this is a method for making themes that work with everything?
[Android Themes] Stericson:
We are aware of this issue, it seems to occur with some previously themed apks for some reason, one such example is Google chrome, we are looking into it.
[Android Themes] Stericson:
Well, not always...this will open the doors for use to have an actual app with a gui that will allow us to flash updates of all kinds. Updates as small as one image. The good thing about this process is that it doesnt disturb any other images in the targeted apk.

This will allow for battery icon packs

status bar icon packs

lockscreen packs

etc

Id love to see people start making small packs such as these...

Stericson
[Android Themes] jcarrz1:
oh like winterboard on the iphone. it just clicked, this is an amazing project. you're just building the framework that these packages would modify? i think i'm getting this.

If you need help w this in any way, let me know. i'd be glad to help
[Android Themes] Stericson:
Right you got it, actually that gave me the inspiration to pursue this again, lucky I knew a great dev to help me. Kastro. :) Couldnt have done it without him and riku.
[Android Themes] jairomeo:
Ok thanks. Thank you for all the crazy ish you guys pull off. I'll keep an eye on progress so I can roll this out to all my themes :-)

Edit: Just tested adding the assets into it and that flashed fine. So only when I add the res it does it.
[Android Themes] gReg0r:
as i've stated before, i've got only very little programing and theming experiance ... just messing with some ****. and so far it all worked out, somehow ^^

i just tried customizing the Music.apk widget. took the pngs out of the themeXY/musik.apk and put them in a theme-update.zip in the /music/res/draw/drawable-finger. the updating process seems to finish nicely

but when i add the widget i'm getting an error while loading the widget ... what did i miss?

Edit: wierd, when i push the original content of the Music.apk via mm.sh the problem persists. is the 'adding: res/...' the problem?! but actually i think i've got this before and it worked ... :/
[Android Themes] ZilverZurfarn:
Don't know if this is already possible, but:

If you try to theme an apk that doesn't exist on the phone, does the script halt?

What I'm aiming at, is to create an update script that "themes" market apps that the user may (or may not) have installed, making the total experience of a theme better. If it doesn't halt, but just continues with next APK, this should work. I guess you'd need 2 versions - one for apps2sd users and one for those who don't use apps2sd

/Mats
[Android Themes] Stericson:
Yes it will halt if the apk doesnt exist, maybe we could change that?

We took a break from working on this in the past week, because we put so much into it so quickly the first week, I will start dev on this again tonight and explore some of the issue reported.

Thanks for all the testing guys.

Stericson
[Android Themes] Stericson:
Hi guys, I need some help. I tried to reproduce the framework crash problem, specifically speaking about all of the FC's. I tried to do this by flashing gchrome 4.1.10.1 andd then flashing prashes theme over it. However this didnt cause a crash, it worked perfectly.

So here is what I need,

I need someones framework-res.apk before the theme change,

I need the theme your applying,

I need the framework-res.apk after you themed it,

I would also love a print out of the terminal or cmd prompt history when applying the update,

And I need some logs of the FC's your getting.

Please help me out with figuring this one out :)

I need as much as possible to get this resolved. :)

Stericson
[Android Themes] jairomeo:
After I do a few things, I'll do one as a Test, first I'll flash it with an update.zip to show everything is good, then restore the default framework-res, and i'll get a logcat of everything. I'll try it tonight, I'm only on 45 min of sleep cuz of being out for the launch this morning.

Update: I narrowed down my issue to a .9.png file. I replaced all the png's but left the .9's out and it ran perfectly. So my failure may be due do a bad .9, I will go thru them and check each one and see if one is bad.
[Android Themes] jairomeo:
Elaboration for Stericson

Easier to elaborate here than twitter :)

Since I have a ton of themes (all the NFL, plus like 40 NCAA that I havent put out since no one requests them, some NHL, NBA and MLB, which i'll post soon) I have everything organized by team then exactly how you'd see it inside the ROMs. I only have the images, I finally put the files inside the framework-res.apk and flashed and got the same FC's as i did using MetaMorph. I made sure I didn't have any xml's in my folder and tried again and got the same thing.

So next I looked at everything there (took a while since there's over 600 files, and I was on 45 min of sleep in over 48 hours, but OMG the launch was so worth it!) I saw a few .9's that were different from Android 1.5. So I did an update zip replacing all the .png's but not .9.png and it worked great. Flashed back to stock, and tried the same with MetaMorph and it worked great. I am going to go through all the .9's and see which one(s) is/are the cause.

This does mean a theme from a donut build cannot be simply put into a 1.6 or higher build. But knowing which file(s) to exclude from this will help great. there are only a few I have in question. I will update when I find which one.
[Android Themes] Stericson:
Excellent, yes we knew every build wouldnt be compatible, which is why Kastro, in all his wisdom, created the theme control file.

Very interesting stuff, maybe I'll add a new line in the theme control file to check for the android version the theme is meant for.

Think this would resolve it?

Stericson
[Android Themes] k4str0:
:p Never thought the 9 patches would be the cause of this but I'm glad someone found the issue. This is good to know because we can add it to a faq or wiki of some sort and also code for it in the next release. ;)
[Android Themes] jairomeo:
It would. But also, just not placing whatever the file is would take care of it too

I'll post the file once I find which one it is. I'm at work, but I'll work it more tonight and find the problem file, I think I know which one it is.
[Android Themes] Stericson:
Well without knowing the versioning of the phone we are on it would be difficult to determine whether or not that image needs to go....

Maybe if it is limited down to one specific problematic image then we can give the use the option of flashing it and warn them of what may happen if they do flash it.

Stericson
[Android Themes] jairomeo:
Agreed, for the true purpose of this. I was thinking of it from the side of people trying to take old themes and use this to port it themselves, they would have to know what to exclude. But for theme devs, yeah having the ROM version helps.

Question regarding that though. A huge benefit (thats I see) to MetaMorph is for all of Cyan's 4.2xxx and probably higher, the same MetaMorph theme would still work (minus if it includes xml's). so maybe have it check say 4.2 but disregard the rest of the version for the check?

Another question since I know you are looking into adding version control to the code. The 1.6 ROM's (excluding Hero) should be all be the same for the stock apps for drawables, so a MetaMorph theme for 4.2.x should work for the other 1.6 ROMs, would you have it so it can check for multiple OS versions, given that the themer put them in?

One more thing: I want to thank you guys again for this. I think this will be great for the future of themeing. For end user, and themer.
[Android Themes] m0zes:
Created a separate thread for this. Dark Power Widget Theme
[Android Themes] smackiesfunkies:
this is awesome!

reminds me sort of winterboard for the iphone

cant wait for this to take off

one thing i miss about my iphone was the theme packs and such
[Android Themes] jcarrz1:
congrats on mod stericson!!

I would love to make a mockup of a gui for this, though I don't have any java/sdk experience at all. I am just posting this to ask if your goal is to have a themed apk that would be injected into any rom, or if you would rather just stick with the android stock gui and not have any theme (kinda like winterboard, just a list with checkboxes)?
[Android Themes] setspeed:
For fear of being flamed I openly admit my "noob" status at the outset...:)

Can someone explain to me how to get the contents of the MetaMorph zip into my system/bin folder?

I have tried drag/drop cut/paste with Droid Explorer, although I admit I don't know how to use it properly. It doesn't seem to work.

Can someone give me the commands to move the two files mm.sh & zip from my sdcard to system/bin?

Thanks!
[Android Themes] jabbawalkee:
I keep getting the PEBKAC error as well and YES I wrote "su" before typing the command (mm.sh -i). I tried it in both adb and Better Terminal. I am on Kingklick's v2.2 and I also tried it on Hero_Over's ROM...but no luck (PEBKAC error both times). Thanks Stericson -- this looks awesome...we needed the iPhone's WinterBoard equivalent on Android no doubt.
[Android Themes] kez1337:
Easy open terminal emulator and punch in

Su

Mount -o remount,rw -t /dev/block/mtdblock/ /system

Cp /sdcard/mm.sh /system/bin/

Cp /sdcard/zip system/bin/

That worked for me anyways
[Android Themes] Stericson:
Thanks :)

And im not quite following you can you explain more?