yashsingh1/xdaforums huggingface dataset:
[Android Themes] ezkilla:
nice work

i got the script to run but there is no android themes folder on sd, tried making one but doesnt seem to read when i type mm.sh in terminal. any suggestions?
[Android Themes] ezkilla:
never mind

i figured it out, it worked when i typed mm.sh -i, really nice work
[Android Themes] Shatterv2:
Telling me im not root when i am. :(

i did the chmod thing
[Android Themes] Noel3903:
I was getting the same thing on any King_hero rom. Just flashed SenseHero v1.1.1 : Ccyrowski....and it all works as said up intill....i make a theme selection, then asks if i want to Proceed. And i get

ERROR: The Theme control file says that we are looking for a dir framework-res within /sdcard/AndroidThemes/Batteries but it could not be found! Invalid theme

But the dir is definitely there? so im baffled? =( I want this to work so bad lol.. i have like 30 different themed rosies,Batteries ect and this is sooo much better than repacking rosie.apk and framework-res.apk every time an update comes out =)
[Android Themes] Stericson:
Send me the theme zip your trying to use please. Stericson.g1@gmail.com
[Android Themes] sebchin:
frankensteinisher

You guy's should be known as frankenstein-isher. With your stuff evrybody will be able to take a part of a roms and push it "on the fly" on his androstein-self-recompose theme.

That's frightening.

Well i know this post isn't of any help flame me then but my thanks are there.

Mm works well even if i don't have push my test far enough. In deed just try the animation change by prash and it's clean.
[Android Themes] jcarrz1:
yea. I was just curious if you wanted me to design a mockup of the app with images/etc. or just forget about it and wait till someone even has a gui framework. I'd probably be better off making a theme... is that described in the vids??
[Android Themes] jairomeo:
activity_title_bar.9 is the file that changed, so if someone takes images from a theme prior to 1.6 this must be excluded or you will get FC's
[Android Themes] jabbawalkee:
Okay Stericson..

I've tried installing the BlurAnimation (for use with MetaMorph of course) on a number of Hero ROM's, and I've gotten the PEBKAC error on every one. I followed the directions to a tee -- first pushing mm.sh and zip to system/bin and then setting permission to 755. I created the AndroidThemes folder in my sd card and placed BlurAnimations.zip in that folder. Following, in adb, I ran "adb shell mm.sh -i" and I get the **** about "PEBKAC! You need to be root!" I've also tried this in Better Terminal (with doing "su" before the commands) yet still get the same issues.

I've tried this on the following Hero ROMs: Kingklick's 2.1 and 2.2, Hero_Over's ROM, and cc's SenseHero
[Android Themes] Stericson:
I will release an update to correct this PEBKAC Error, sorry guys for the trouble....

jairomeo: Awesome! I will be checking this out! Thanks, if its just one image we may be able to do a check for this.. :)

Stericson
[Android Themes] Noel3903:
Tried king's and others also but SenseHero v1.1.1 : Ccyrowski does work, well to a point.But atleast you dont get that root error, which makes me think it is the roms.

Edit: looks like Stericson has something in the works =).
[Android Themes] mio_fr:
Hello,

I'm trying since saturday to understand this great script but I have a problem :(.

I watched all the videos but I have an average English... :o

I use a ROM Donut 1.6 (AOSP Donut sapphire 32B by luo)

All the first part is OK (cd system/bin ; chmod 0755 mm.sh; chmod 0755 /system/bin/zip)

For testing, I take the Prash-theme.

#

When I run the script, I get always the following error:

The "-n" option does not seem to be recognized by the command "cat" in busybox.

Do you think is this specifically a problem with the ROM I use ?

Have you any idea ?

Congratulations to all of your work :cool:

mio
[Android Themes] rikupw:
it seems, mio_fr to be an issue with your busybox in that rom. thanks for the pointer. we'll look into a possible workaround soon! :-D keep the testing coming, guys!
[Android Themes] mio_fr:
Thank you for your response, I continue testing with "set -x".
[Android Themes] Stericson:
send me the logs from your test? Stericson.g1@gmail.com
[Android Themes] Stericson:
Ok, so theres a new version uploaded, same link. This should fix the root error...this should fix the error stating that a dir cant be found.

Also, you MUST have busybox v1.14.* busybox v1.15.* wont work as cat -n has been removed....

I added an error in to notify the user of this....

Stericson
[Android Themes] mio_fr:
Many Thanks. I'll try this week with an older version of busybox.
[Android Themes] m0zes:
You might be able to use awk to replicate the cat -n functionality.

cat $FILE | busybox awk '{ print NR" "$0 }'

or the exact same output as cat -n

busybox awk '{print " "NR" "$0 }' < $FILE
[Android Themes] Noel3903:
Fix all my problems Works Great GUYS!
[Android Themes] Noel3903:
can someone upload busybox 1.14 for me plz =)

Edit: someone sent it to me thx
[Android Themes] Stericson:
Great work Mozes, I was actually going to look at using awk but didnt have it all planned out, I think you have saved me some time :)

Thanks,

Stericson
[Android Themes] Stericson:
Uploaded a new metamorph script, same link on first page, should be compatible with other busybox versions now....

I just need to solve that .9 image problem next then that *should* solve all of the reported problems.

Thanks moze for the tip on AWK. Very nice resolution :)

Stericson
[Android Themes] mio_fr:
Thanks Stericson, Thanks m0zes :)

The script works very well now.

1) I applied only the alarmclock Prash theme ; nice result :)

2) I applied all the theme ; OK after wipe

3) I applied a simple adapt Enoch theme ; OK

You must be at the root directory before start "mm.sh"

Again, thank you!
[Android Themes] xidominicanoix:
finally got around to using it ... got a whole bunch of errors (something to do with CRC something.. sorry i closed the window like an idiot before i copied the output) but somehow it still copied over all the files ;) ... thanks for the hard work guys :D

EDIT: don't know what happened but seems like every one of my apps is FC now lol .. gunna wipe dalvik cache or revert to my nandroid backup :p

EDIT: seems neither of those worked .. thankfully i had a switchrom backup stored and restoring that finally fixed my problem ... just to make sure i did everything correctly: i downloaded the Metamorph zip file and in there were 2 files, mm.sh and zip .. i pushed them to /system/bin and chmod to 0755 .. then i downloaded to Lockscreen zip and changed some of the files and rezipped and moved to /sdcard/AndroidThemes/ ... then ran mm.sh -i ... chose option 2 and then chose the lockscreen pack .. then i ran into some errors there :\ ... so my question is was i supposed to put a zip file in AndroidThemes or a folder with all the subfolders in it?
[Android Themes] Stericson:
Coul you tell us the errors you had?

We need a bit more information. Also, have you watched the videos I uploaded?
[Android Themes] Stericson:
I have never seen an error like this, dont even know what it means offhand, I will have to research this....

Stericson
[Android Themes] prash:
A CRC error usually means the downloaded file doesn't match the original expected..CRC is basically a checksum windows uses. I'm assuming either something on the theme maker's end is corrupted (think harddrive) or the sdcard is. I've never seen crc errors in regards to metamorph before though.

JDuverge: try running the same exact commands with the file on your /androidthemes/ folder on your sdcard and doing the commands through terminal (as opposed to ADB)
[Android Themes] b1u3m3th:
Help Please

Ok so I don't want to sound like an idiot but I am just starting using adb and skl. Anyways I don't understand how to put the metamorph.zip file into the /system/bin folder can someone please explain this to me I would really appreciate it. Thanks
[Android Themes] xidominicanoix:
hmm really hoping nothings wrong with the sdcard .. just got it a little while back ... will try again thru terminal tomorrow and see if it works then :D thanks

EDIT: went ahead and did it through the phone terminal .. same exact CRC errors :\ ... rebooting now and pretty sure FC galore lol

EDIT: yup got all the same FCs .... really weird stuff ... my sdcard is working fine so i dont think it's that but i could be wrong ... btw stuck the locksreen files inside framework-res.apk and flashed it in a regular update.zip and it worked perfect so the files were all good
[Android Themes] xidominicanoix:
extract the files from the zip and then do

adb push mm.sh /system/bin/
adb push zip /system/bin
[Android Themes] b1u3m3th:
Thank you very much for the help!!
[Android Themes] xidominicanoix:
np glad to :D
[Android Themes] b1u3m3th:
Help Please

I just updated my phone to the CM ROM 4.2.4 then I flashed the updated version of white notifications and downloaded the new version of the colts theme when I went to apply it I got this error:

[: (1)/Colts-theme-full: unknown operand

unzip: can't open sdcard/AndroidThemes/Colts-theme-full, sdcard/AndroidThemes/Co

lts-theme-full.zip, sdcard/AndroidThemes/Colts-theme-full.ZIP

grep: (1).thm: No such file or directory

ERROR: Could not find the theme control file in the theme. Invalid theme.

Can someone tell me if I did something wrong or is there something wrong with the theme I was trying to apply. This is the first time I've gotten an error of MetaMorph that I couldn't figure out on my own.
[Android Themes] jairomeo:
I replied in my thread, from the looks, I assume that you copied the new MetaMorph file I posted and it was renamed. The zip file and .thm file inside the zip must match, so if you rename my .zip file, the MetaMorph will not work anymore. Remove the old Colts-theme-full and Colts-theme-full.zip from /sdcard/AndroidThemes and make sure the new copy is named Colts-theme-full.zip
[Android Themes] soulife:
How this thread could rest for three days is beyond me. i just recently started playing with this and is pretty friggen AWSOME. i can make a single theme, different animation packs, icon packs, etc, to work on all my builds. Its pretty sweet, so i just wanted to jump in and say great job to everyone that had their hands on putting this together.

I have a question that im gonna try to answer through trial and error as soon as i hit submit, but how would i go about turning my time and date white in the notification bar with this? Could i just put the classes.dex the metamorph file and aim it at services.jar?...

nandroid here i come...
[Android Themes] rikupw:
a few have said this works :-)

m0zes himself just asked and proved that question, and according to Stericson it works great! :-) (m0zes tested this with framework.jar classes.dex file, wanted to change some coloring in the notification bar)

just to be safe, anything you do in apps is one thing, but if you work from framework, I would recommend just for stability issues regarding the thm.thm file, make sure to place /system/framework at the end of the thm.thm file! :-) keep up the great rom-in! haha get it? ramen? ok not so funny. :-/
[Android Themes] m0zes:
Yeah, I just tested changing the services.jar file.

Here is my thm file:

rom_name: cm
rom_ver: 4.2.4
AlarmClock.apk	1.0.0.1	/system/app/
Calculator.apk	1.0.0.1	/system/app/
Calendar.apk	1.0.0.1	/system/app/
Contacts.apk	1.0.0.1	/system/app/
Launcher.apk	1.0.0.1	/system/app/
Mms.apk	1.0.0.1	/system/app/
Phone.apk	1.0.0.1	/system/app/
Settings.apk	1.0.0.1	/system/app/
Vending.apk	1.0.0.1	/system/app/
framework-res.apk	1.0.0.1	/system/framework/
services.jar	1.0.0.1	/system/framework/

In the zipfile itself, here is my folder listing, notice the services.jar folder:

AlarmClock
Calculator
Calendar
Contacts
TestTheme.thm
Launcher
Mms
Phone
Settings
Vending
framework-res
services.jar

The thing you might worry about there, as you would with other theming methods, is that the user may end up pushing an older/newer/screwed-up version of the services.jar file. You would then need one for every rom version you were going to support, along various modifications (like sterlock).
[Android Themes] soulife:
i updated only services.jar in my test run and it worked like a charm. ill adjust my thm to have framework patches run last. Thanks a million. This tool is coming built into my next release along with some contributions, theres not nearly enough theme packs for this yet.

I know pushing service.jar confines the pack to that specific build, but so does the fact some packs will be built for cupcake, donut, etc. so some filenames will change along the way; along with the fact that different roms will have different versions of apks. Theme developers will have to keep universability (is that a word) in mind.

I cant stress enough how cool this tool is. Some changes like widgets for example can be changed on the fly without reboot, users can create themes directly from their phone without a computer, and updates are a tenth of their current size. The possibilities really are endless, lol. Keep up the great work guys, and keep the updates coming. Cant wait to see a gui frontend for this. I see cyanogen seems to have a zipalign built for arm, im gonna play around and see if it can be ran against the modified apks after theme application.. we'll see.
[Android Themes] Stericson:
I am working on building a gui for this. I don't have much yet but progress is coming.... Soon im gonna put it on Google code to really light it up development on it.

I do have the apk made and it now allows you to pick a theme (using andexplorer for now), checks for su and the zip files in four different directorys, and also processes commands to the shell and reads from the shell as well.

Tonight I'm going to work on the gui a bit, then I'm gonna try to have something functional going....

It is coming...Metamorph

Stericson
[Android Themes] roadrunnerx7:
so hows it going with the gui?

and android devs are the best!!

oh and i think i know why this thread went dor 3 days without posting.. i think its probably because it might be in the wrong section? people dont usually expect stuff this awesome to be in the themes section. i saw this thread yesterday, and today came back to check it out and i had to go digging like crazy to find it(not really just had to press page 2 lol)

would it be bettter in the development section?
[Android Themes] jairomeo:
I'm just waiting for metamorph to become part of Android 2.5 Apple Pie lol

I do love how easy MetaMorph is that once I finish up somethings and update the NFL, I'll be releasing NBA themes via MetaMorph
[Android Themes] soulife:
i say it was clever to place it here. not only cause its theme relevant, but its nice hiding spot

looks tasty
[Android Themes] soulife:
I hate coming into a thread throwing suggestions at the author, expecially for a product in its alpha stage. I've been building a bunch of morphs and modding my build and after every update you have to reapply the morphs (obviously). But I was thinking it'd be pretty handy to have a 3rd option to apply every morph within a givin folder in AndroidThemes. This way the end user can build their theme as they see fit, put the morphs in their custom folder, and apply all after a update or new build. Just a thought..

Edit)

I got a nose bleed looking through the script, but I think I saw something that says this is being planned already
[Android Themes] soulife:
wtf

Okay, first error. lol. what the h*ll did i do....

I seem to get this when using option 1 (apply full theme).

Here is my *.thm (up to the affected code)

rom_name: Soulife-ADP

rom_ver: 1.x

AlarmClock.apk	1.0.0.1	/system/app/
android-log-collector-1.0.1.apk	1.0.0.1	/system/app/
Browser.apk	1.0.0.1	/system/app/
Calculator.apk	1.0.0.1	/system/app/
Calendar.apk	1.0.0.1	/system/app/
Camera.apk	1.0.0.1	/system/app/
Contacts.apk	1.0.0.1	/system/app/
Gmail.apk	1.0.0.1	/system/app/
[COLOR="Red"]Mail.apk	1.0.0.1	/system/app/[/COLOR]
<--cut-->

This is my path structure for the mail apk in the morph file...

/mail/res/drawable/app_email.png

And here is the output, all is well untill it gets to mail.apk. it goes on and on, and on.....

[: mail: unknown operand
Applying subtheme: Mail.apk
cd: bad substitution
zip warning: ignoring special file: ./dev/mtd/mtd6ro
zip warning: ignoring special file: ./dev/mtd/mtd6
zip warning: ignoring special file: ./dev/mtd/mtd5ro

Something i did? Because i don't see it and its driving me mad. I just wanna build some themes.
[Android Themes] bkmo:
Have you tried "capitalizing" the letter "M" in the directory Mail in the path to the .png? Weird that zip looks at the /dev/mtd directory.

Edit: nevermind, I looked at the theme and they all are lower case, and the .thm looks fine too. What if you change the .thm and put Mail.apk last. Or remove Mail.apk to troubleshoot.
[Android Themes] prash:
THIS. Capitalization matters a LOT. Found out the hard way.
[Android Themes] bkmo:
Yes...very true. i use a script to extract all the drawables from a theme, and it creates the directory structure with the same capitalization of the .apk's. I always do the Metamorphs like this too.
[Android Themes] soulife:
blind

I don't see it

edit)

Ok, so I removed mail from the setup and let it run again. It did the same thing when it got to alarm clock. After the reboot (the error locks the phone up or forces reboot) I noticed alarm clock had its icon changed anyway. I then removed alarm from the setup and tried again and it did it on another. HOWEVER, during my trials i noticed the script is looping back around and attempting to do the same apk and thats when it throws the error. Im honestly not sure if its a bug, or something i did to trigger the adverse effect. but if anyone looks at the zip and the screenshot theyll see i followed suit with whats expected for a working theme. i just donno.

edit2)

If i use option 2, and go directly to the apk thats throwing the error, it applies with no problems. I think the problem is in one of the functions in option 1. maybe i should read back through the posts, maybe this has been reported already. Or im just really blind.

Edit3)

After a wipe, flash, reboot option 2 don't work on the problem apk. I want to say maybe its a problem with the mail.apk itself, but after playing some more I noticed it will work through the apks saying each is successful and then you'll see an apk that was already themed come up with an error. I'm gonna download every metamorph I can find to figure out the problem. I'm gonna start over, maybe there's a invalid character (windows /n or something). I'm gonna sit through the videos again too. If I get this working ill be more than happy to write a how-to to assist with the loooong videos.
[Android Themes] noizeuk:
Can you direct me to this script please. Would be incredibly helpful for anyone looking to edit or even start up theming.
[Android Themes] prash:
Are you replacing just the image files or are you doing all the files? Try removing non image files from the /mail folder on the metamorph theme zip and see if that helps.
[Android Themes] soulife:
It only replaces icons, nothing non image related. The morph is attached.
[Android Themes] djengizz:
I think the problem might be that you include both Gmail and Mail and Gmail also contains the word 'mail'.

I've tried using your icon pack and added some debug statements to the script to echo the variables used.

I've noticed that when it tries to cd into the directory that's extracted from your zip on the sd card it gives the bad substitution message. You get the same message if you try to cd into a directory using a wildcard resulting in more than a unique result.

I've changed the script to echo the following variables when applying a single theme (apply_single_theme()):

remount_system rw
echo "Applying subtheme: ${MM_TAPPNAME}"
echo "${MM_TGTDIR}"
echo "${MM_STD}"
cd ${MM_TGTDIR}/${MM_STD}
echo "${MM_ZIP}"
echo "${MM_TLOCATIO}"
echo "${MM_TAPPNAME}"
${MM_ZIP} -r ${MM_TLOCATIO}${MM_TAPPNAME} ./*
cd ${MM_SRCDIR}
echo "Subtheme application complete."
echo
echo

The output when applying the Mail subtheme is this:

[: Mail: unknown operand
Applying subtheme: Mail.apk
sdcard/AndroidThemes/Soulife-Icons-Blueonic
Gmail
Mail
cd: bad substitution
/system/bin/zip
/system/app/
Mail.apk
Scanning files ............................[1] Killed ${MM_ZIP} -r ${M...
Subtheme application complete.

Notice that the variable ${MM_STD} resolves to

Gmail

Mail

where this should be a unique result (Mail).

I think if you rename your apk it should work.

If this is causing it than what really needs to be changed is the variable extraction in the script to give a unique result. But I haven't looked into that yet.

edit: the rest of the icons all got applied without errors including AlarmClock so i don't know what's going on there...

edit2: i think you can fix this by changing 'egrep -i' in the creation of the subtheme variables to be case sensitive and modifying your morph zip to contain capitalized directories. That would give a unique result for 'Gmail' en 'Mail'.
[Android Themes] soulife:
thank you

Very sweet, thank you. I'll have to rename the apk and let stericson fix the script. I don't want to change the script for my build because then I wont be able to make universal morphs that work with everyone else build. But now we have a workaround and a genuine solution. Many thanks.
[Android Themes] djengizz:
Agreed, i don't like changing the script neither.

I was thinking, even if this gets changed, wouldn't we still have a problem with apk's like Calendar-CalendarProvider, Settings-SettingsProvider, etc?
[Android Themes] djengizz:
A few observations after playing with the script and creating some morphs:

- Sometimes i get FC's after applying a morph. Running fix_permissions fixes this, can't the script do this for the altered apk's?

- I'm getting FC's after changing the Settings.apk and trying to do anything with settings (it also dissapeared from the launcher). Running fix_permissions doesn't help. I only changed the power widget 9 patch image and it works when i flash it. For some reason i can't get it to work using Metamorph. The error:

E/AndroidRuntime( 450): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.SETTINGS flg=0x10200000 }

This is the morph i used: http://www.mediafire.com/?qwmyhcrh41t

- Option 1 (full theme) often gave me an endless amount of zip warnings (like soulife described), taking out all the empty lines in the theme file seems to fix this. My guess is it's parsing the empty line as a subtheme.

- +1 for zipaligning the apk's that are altered.
[Android Themes] Stericson:
Sorry guys I have been away.... I read over all the posts and I want to ask yall to email me,

Stericson.g1@gmail.com

I have an actual app coming out soon for metamorph that I think will be greatly improved upon. For one, we dont really use regex in the app (thank God)

So alot of these errors may be resolved with the app.

Email me please and yall will get to be part of the beta testing group.

Also... not sure I can get the fix permissions to work with the app, but we will see.

Zipalign will be included in the app, it will zipalign any app thats modified.

Stericson
[Android Themes] jairomeo:
Can't wait for the app :)