applytheme - Tool for universal themes. - G1 Themes and Wallpapers

I'm working on a tool I'm calling "applytheme". Basically you create a theme.zip, stick it in an archive with the included applytheme binary and update-script, sign it, and it will update the files on any of the Dream firmwares with the ones you've provided.
There are some limitations currently:
It can't yet determine space required before-hand, so you may run out of space in the middle. If you do, you can just restore the original theme with the restoration update.zip.
It can't add files - only replace existing ones.
The original files are stored in /data/original_theme.zip, which will eat your /data space, but only the replaced files are stored.
This version is a test release and may or may not have bugs. Be sure to back up your phone before trying it.
Please consult the example for figuring out what to put in the theme.zip, but it's basically full-path-to-filename-you-want-to-update/full-path-to-file-you-want-to-replace
So if you wanted to replace "assets/images/android_320x480.png" (the boot screen) in "/system/framework/framework-res.apk", you would have a file in your theme.zip called "system/framework/framework-res.apk/assets/images/android_320x480.png".
Case matters - please use the correct case (which is usually all lowercase).
Example theme (replaces boot animation only, with a cupcakedroid):
applytheme-200902090018-example.zip
Restoration update.zip (restores from /data/original_theme.zip then deletes original_theme.zip):
theme_restore-200902090018.zip
Source code (for developers or other curious people):
applytheme-200902090018.tar.gz
EDIT: 200902082117 fixes a couple of stupid bugs in 200902081755 :/
EDIT: 200902082316 removed extraneous/incorrect free space check; noticed that the update script stuff is significantly more stupid than I'd thought - update scripts should work now.
EDIT: 200902090018 close files so space can be reclaimed during patching
Reporting problems
If one of the applytheme updates fails, while still in the recovery mode please do the following:
Press ALT+X to get to the console
Press <enter> to get to the prompt
Type cp /cache/recovery/log /sdcard/recovery.txt
Type df >> /sdcard/recovery.txt
Type reboot to reboot.
Send the recovery.txt from the SD card to zinx <AT> users.sourceforge.net with the subject "applytheme error log"
If I don't have the log (or at least the error message from the log), I can't know why it's failing, and can't do anything to fix it.

I am looking at your post but don't see the benefits of doing it like this. you would still need to do this every time you add a theme or just a image and you still need to sign it or am I just not seeing the benefits of using it

kron2 said:
I am looking at your post but don't see the benefits of doing it like this. you would still need to do this every time you add a theme or just a image and you still need to sign it or am I just not seeing the benefits of using it
Click to expand...
Click to collapse
Current themes replace the whole system.
If you change as single file in /system/app/Browser.apk (say, an icon), you have to replace the whole file.
You don't have to do that with applytheme, so you can replace the icon no matter what firmware is being run.

This would be great themes wont need to be converted any more.

manup456 said:
This would be great themes wont need to be converted any more.
Click to expand...
Click to collapse
Indeed, for example:
More Vintage Less War via applytheme (theme by manup456 )
EDIT: Oh, I should note I tested this one with RC33. Didn't bother to time the progress meter though, so just wait until it tells you to reboot with home+back.

This looks like an amazing tool! I'm surprised more people haven't checked this out.
Let me get a few things straight before I give it a shot.
Let's say I was updating some basic images in the framework-res.apk. All I need to do is:
~Download your applytheme-example.zip
~Open up the theme.zip (remove current folders inside)
~Create the folders system\framework\framework-res.apk\res\drawable\
~Add the icons I've changed, with the exact original names
~rename applytheme-example.zip to update.zip
~load onto SD card and load onto phone as usual
~success?
I don't quite understand the backup system...
When you load the update onto the phone, it backs up the images you're replacing and puts them into a \data\original_theme.zip?
Then, if for some reason you want to revert to the original theme, you simply run the theme.restore.zip on the phone and it grabs all the \data\original_theme.zip images and places them in their original location?
Also, if the theme you're installing is a few megs, then the \data\original_theme.zip will get rather large, no? Will this cause any issues?
Thanks!

The steps are a bit more like this:
Download applytheme-example.zip
create system/framework/framework-res.apk/res/drawable/
add the files you've changed
create a theme.zip with the files above - MAKE SURE IT HAS THE PATH, STARTING WITH system/
replace the theme/theme.zip in applytheme-example.zip with your new theme.zip
sign the applytheme-example.zip with the replaced theme/theme.zip
put it on the SD card as /sdcard/update.zip and update as normal
success! (unless there was a problem during patching, then it may be partially applied and you can use theme_restore.zip to fix it)
MOONSSPOON said:
When you load the update onto the phone, it backs up the images you're replacing and puts them into a \data\original_theme.zip?
Then, if for some reason you want to revert to the original theme, you simply run the theme.restore.zip on the phone and it grabs all the \data\original_theme.zip images and places them in their original location?
Click to expand...
Click to collapse
Yep.
MOONSSPOON said:
Also, if the theme you're installing is a few megs, then the \data\original_theme.zip will get rather large, no? Will this cause any issues?
Click to expand...
Click to collapse
It can get large, yes, but keep in mind that it's only the original files that have changed that get put in it. Most themes right now are much larger .zips than they actually are, because they include much more than what was changed. If it gets too large to fit, the update will just fail part-way, and you can restore using the theme_restore.zip.
You can also delete it if you don't want to restore.
If you have any better ideas for any of this, I'm definitely open to suggestion - It's not anywhere near finalized yet

Great work. Definitely a step in the right direction for generalizing themes and allowing them to work with any build without modification.
Some thoughts for the next steps... Perhaps do a once-over of the files in theme.zip and compare their sizes with the existing files? This would just about double the time it takes to install, but should catch any out-of-space issues before any replacements had been made. Alternatively, perhaps there's a way to detect failures and automatically revert and display an error?

MasterBunnyFu said:
Great work. Definitely a step in the right direction for generalizing themes and allowing them to work with any build without modification.
Some thoughts for the next steps... Perhaps do a once-over of the files in theme.zip and compare their sizes with the existing files? This would just about double the time it takes to install, but should catch any out-of-space issues before any replacements had been made. Alternatively, perhaps there's a way to detect failures and automatically revert and display an error?
Click to expand...
Click to collapse
Automatic reversion can be done.
The update stuff is too stupid to let me display an error (Seriously. There's no way to display a message to the user. All I get is the unchangeable 'Failed on line 3'.) - an error is kept in /cache/recovery/log though.
Checking the file sizes would indeed take twice as long - everything is compressed, so I'd basically be creating every file touched, but discarding the output, then creating it all again. It already takes quite some time, and it should normally have enough space free, so I would prefer to go the automatic reversion route if people don't want to have to use the theme_restore.zip after a partial update.

So I tried throwing in your more vintage theme, but I get the error failed on line 4.
I feel like a leecher posting this message, but explain to me how it's done.

APrinceAmongMen said:
So I tried throwing in your more vintage theme, but I get the error failed on line 4.
I feel like a leecher posting this message, but explain to me how it's done.
Click to expand...
Click to collapse
Should just be putting in it; can you post the /cache/recovery/log from after it fails? May need to copy it somewhere before rebooting.
I expect it's due to lack of space, but it was ok here :x

In an effort to make it a bit easier initially, I've written "toapplytheme". It takes a theme update, the update it was based on, and outputs an applytheme compatible theme.zip - You still have to put in in theme/theme.zip in the applytheme update zip and re-sign it, though.
If you use something other than the update it was based on, you're going to end up with a lot of extra and/or missing files, so don't do it.
Ex:
Code:
toat MyExcellentTheme.zip JFv1.41_RC33_light2.zip theme.zip
toat-200902091613.zip

Worked for me
I have an ADP1 w/the latest JFv1.43h, I extracted Rusty Metal (from the RC33 version, using you tool). Put it there on the example, signed it all and voila...
The only thing I noticed is that the background did not get changed, but that is a minimal issue (and easily fixed).
Great job Zinx, I don't understand why all theme designers don't use this tool.
A matter of time I hope?

DanOtero said:
I have an ADP1 w/the latest JFv1.43h, I extracted Rusty Metal (from the RC33 version, using you tool). Put it there on the example, signed it all and voila...
The only thing I noticed is that the background did not get changed, but that is a minimal issue (and easily fixed).
Click to expand...
Click to collapse
I just applied Rusty Metal to my G1 using the standard way (not this tool) and the background doesn't install with it anyways, so it's not a problem with this tool, but the theme itself simply doesn't include it.

Related

RC33 and theme issues [Theme Developers] update!

Just thought I'd share what I've run across so far. After updating to rc33 the market would not work, I have since done a wipe, tried installing a complete them I converted to rc33 and it gets stuck on the second boot screen, so I decided to play with some files and see what could be causing it. I removed the framework-res.apk and replaced it with the stock one. Now I'm getting to the android logo screen, so something may have changed with framework and I am using the template to create this theme. I noticed I was still getting txt messages even though I was on the android logo screen, I've seen this before when I removed Launcher.apk and didn't replace it. So I replaced my launcher with stock and it boots up my theme, sorta.
I have a list of icons that do not take the new icons i've created.
Amazon
Camera
myFaves
Market
Pictures
Settings
Superuser
Terminal
Voice Dialer
Voice Search
Youtube
Everything else is working just fine and copied over. What kinds of problems has anyone else run into? I'm done for the night, gonna work on it some more tomorrow
**Update
including a link to a modified jf rc33 file that frees up system space by removing media files
http://www.mediafire.com/file/zy4myo...C33_light2.zip
I can't get past the Android screen. Is there a way to go back to RC30?
I updated to RC33 and had Buuf installed before the update. Installed the RC33 first then the radio, no issues. It even kept my Buuf wallpaper.
I just installed the light version of Buuf that the creator released a bit ago and had no issues updating that. Maybe he can shed some light
SVTRacer said:
I can't get past the Android screen. Is there a way to go back to RC30?
Click to expand...
Click to collapse
did you make a back up with Nandroid? You can also put RC30 update on your SD card and boot into recovery console and update back from there.
Not sure how the new Radio is going to work with RC30 though
any theme creators wanna chime in?
I am not a creator but I have some input I guess. It is very puzzling.
I edited Stericson's stock theme template, changed app icons (removed some apps) resigned each APK, modified the framework-res.apk (did not touch any xml files, and tried to only modify images I thought were changed to create Blue Star 5 - my basis for theming). I zipped it up, signed the zip. And updated my phone.
It took a while to get past the android logo (which by the way did not change color as I expected with the new framework files), but eventually booted up for me. No problem. My case may be special, because before I applied my update I removed some stock APK's and all the stock ringtones, ensuring I had room to spare on my /system partition. I removed amazon, email, and IM - the APK's and ODEX's. My update zip that I used initially to apply my theme contained :
All APK's except those listed above - resigned all that I modified.
And JUST the framework-res.apk
I have since modified some more files in the framework and created another update.zip that just included that file - it applied just fine.
However, no one else has been able to install this theme on their phone (that I know of), and I can't figure out why. Maybe it is the space that I had free?
I am at work right now but when I get home I am going to start from scratch. last night I was using stericson rc33 and was installing the hole drawable folders to the apk.did not think there are new images in some of the apk.that is what you get when you try to get a theme out fast and I am going to look to make sure the images are still the same name .there is some new apk. in rc33 and not just voicesearch.apk and tmoimplugin.apk and like i said at work so i don't have the names rc30 has one apk. not in rc33
yeah tmoimplugin.apk is where all the emoticons for Im are stored.
I just tried editing the clock in launcher and applying it but it didn't work. Maybe it does have somehthing to do with system being too full, that could explain why only some icons are changing.
I installed a theme and now I'm stuck on the Android screen.
I have RC 33 and I tried wiping data and still won't work.
Help Please
Anyone know how to get rid of the theme and wipe everything back to RC 33?
I don't have access to my sd card so I can't reinstall RC 33.
Can anyone help me?
please don't spam the boards, this thread is about figuring out what issues are keeping us from installing themes. If you don't have access to another computer you can't reflash the jfrc33 update
daveid said:
I am not a creator but I have some input I guess. It is very puzzling.
I edited Stericson's stock theme template, changed app icons (removed some apps) resigned each APK, modified the framework-res.apk (did not touch any xml files, and tried to only modify images I thought were changed to create Blue Star 5 - my basis for theming). I zipped it up, signed the zip. And updated my phone.
It took a while to get past the android logo (which by the way did not change color as I expected with the new framework files), but eventually booted up for me. No problem. My case may be special, because before I applied my update I removed some stock APK's and all the stock ringtones, ensuring I had room to spare on my /system partition. I removed amazon, email, and IM - the APK's and ODEX's. My update zip that I used initially to apply my theme contained :
All APK's except those listed above - resigned all that I modified.
And JUST the framework-res.apk
I have since modified some more files in the framework and created another update.zip that just included that file - it applied just fine.
However, no one else has been able to install this theme on their phone (that I know of), and I can't figure out why. Maybe it is the space that I had free?
Click to expand...
Click to collapse
I think you are on to something with this, I removed the amazon app then reflashed one of my update files and now my custom my faves icon showed up. Of course i got forceclose on a few things and my phone wouldn't find service. I wonder how we see how much free space is in system
I am not spamming.
Obviously I installed a theme which caused my phone to screw up.
Don't worry I'll try and figure it out myself, thanks for your help.
Possible solution to RC33 theme crisis!
Ok I'm not entirely sure how or why this works, but with any luck a sharper mind will! Whenever i replaced the application icons or frame images the phone hangs at boot and i'm forced to unplug and restore via nandroid. However if i copy the image file, edit it with gimp and then put it back (resigning both the apk and the zip, it updates perfectly. At present i have modified about half of my icons and got a new splash screen. I just thought i'd share this success and hope someone can work out whats different about the new icons etc.
three posts in 10 minutes is spamming. starting a new thread would have been better
I am not sure what changed but i tried copying the PNGs i changed in framework-res from FadetoBlue and it won't go past the first screen. But i did try editting a bunch of files from RC33 and it works fine. So i think most the themes will need to be rebuilt from RC33.
Just my 2cents. hope i am wrong though.
jdwme said:
I think you are on to something with this, I removed the amazon app then reflashed one of my update files and now my custom my faves icon showed up. Of course i got forceclose on a few things and my phone wouldn't find service. I wonder how we see how much free space is in system
Click to expand...
Click to collapse
From terminal emulator or ADB run "df".
Try removing some stock APKs from your update file, and see where that gets you. Of course, remove them from your phone.
Safe ones are (if you don't use them) com.amazon.mp3, email, IM. You can remove the apks and odex's if you don't use those programs. That's what I did and my theme flashed fine on my phone, but not on others (who probably have those files installed) also I removed the stock ringtones, you can just pull the whole /system/media folder and push it back after testing.
damnitpud said:
I am not sure what changed but i tried copying the PNGs i changed in framework-res from FadetoBlue and it won't go past the first screen. But i did try editting a bunch of files from RC33 and it works fine. So i think most the themes will need to be rebuilt from RC33.
Just my 2cents. hope i am wrong though.
Click to expand...
Click to collapse
I just copied pngs as well, and it did work for me. I think Stericsson hit it on the head when he mentioned free space in my other thread. Definitely an avenue to explore.
yeah this is a free space issue, with the stock rc33 update I only have 352k avail in system, I just made a file with only app icons being changed, by rebuilding from scratch and now system has 0 available and not all my icons flashed over, infact it even removed myfaves.

[HELP] Modifying mount point of EMMC.

What I need...
Someone to repackage a boot.img for me. Specifically, I need a boot.img unpacked, replace the file "/init.inc.rc" with my version, and repack it. (I'm stuck on all Windows, and cygwin is not an option.)
Purpose/Goal
Fix the annoying fact that /emmc is not accessible to almost all market apps, without resorting to using the modified media scanner from CyanogenMod or anything else drastic.
Do not change fstab. /mnt/emmc and /mnt/sdcard will not change.
NOTE: I am not trying to create a symlink on the FAT32 of the SD card.
My idea
Modify /init.inc.rc to change the EMMC settings. (Changes made, need someone with tools. See above.)
Modify /system/etc/vold.fstab to relocate EMMC mount point.
Directory structure
/sdcard (unchanged)
/sdcard/emmc (new location of emmc)
/emmc (Retarget the symbolic link to new location.)
/mnt/emmc (Change to symlink for compatibility, just in case.)
What I want to know...
This arrangement makes /emmc redundant. Can it be safely removed?
When you connect to a PC, how/what does Android map to USB drives? (I assume it is the mount blocks, not the symlinks.)
What odd behaviors may occur? (e.g. will "Settings->SD & phone storage" freak out?)
Maybe, just maybe: How to bottle this into a flashable .zip? (I'll worry about that later.)
If anyone has any pull with the ROM devs (i.e. Koush, rmk40, et al.), I really want to hear from them.
+1. I'd love to make emmc usable in Winamp
Bzzzt... Sorry.
ARGH!
The internal storage is VFAT also. No symlinks allowed.
Blast you, HTC!
What??
I hate doing this, but editing the original post doesn't bump the thread.
I did not want to create a new thread, but what I need has completely changed.
So. BUMP.
Why HTC, WHY?!
Would there be a way to format emmc to NOT be VFAT?
Progress!!!!
I'm close to getting a boot.img ready to test out on my phone.
I spent yesterday hacking away. I've made a Windows tool for handling boot images. I'm about 80% done with the required features. I have all the unpacking finished. I've repacked the ramdisk. I can generate the SHA hash to sign the image. It's just a matter to gluing the last stages together.
ppd0526 said:
Why HTC, WHY?!
Would there be a way to format emmc to NOT be VFAT?
Click to expand...
Click to collapse
I'm sure it could be done, but this is way more work/hassle that I want to deal with. Major obstacle here is that ALL data on emmc is wiped, and I'm not willing to that.
Assuming there are no hidden "features," my approach should be invisible to the Android layer (i.e. will not break any HTC software). HOWEVER... I'm pretty much Senseless, so I'm not too concerned (for my own use) about HTC's apps.
My biggest concern is that the media scanner will generate duplicates of all files found on emmc. But a/the big motivator for this work is to use Winamp, so I don't really give a whoop.
This was tried by koush when we couldn't get cm6 to scan emmc. It didn't work.
Sent from my ADR6300 using XDA App
distINCtINC said:
This was tried by koush when we couldn't get cm6 to scan emmc. It didn't work.
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
What didn't work? Or how did it not work?
I'm not sure. I wasn't involved in the effort. Koush would be the person to talk to but island how to get a hold of him. I just think the OS rejected mounting a physical drive within a physical drive. But don't let that discourage you. It might be still be possible.
Sent from my ADR6300 using XDA App
Any progress on this? I really would love to have /emmc accessible as /sdcard.
Why HTC decided to make /data/data so small and put the rest of the space as /emmc is still a mystery to me. This is my only gripe with this phone.
Progress update
I made my first attempt on Friday, which resulted in a boot loop. So, obviously, I'm missing something important. (Battery pull and recover boot fixed the problem.)
I couldn't work on it this weekend. But I'm going to start digging into it some today.
More info:
It didn't get past the slash screen. Since I'm flashing a boot image, this is obviously where the problem is located. I just don't have any error logging to read over. Since I'm cooking on Windows, I'm wondering if my file permissions and ownership are messed up.
Also, while running my update, I observed that the boot image flashing did not seem to take long at all. So, I'm concerned that I didn't even get a complete flash.
weareallkosh said:
I made my first attempt on Friday, which resulted in a boot loop. So, obviously, I'm missing something important. (Battery pull and recover boot fixed the problem.)
I couldn't work on it this weekend. But I'm going to start digging into it some today.
More info:
It didn't get past the slash screen. Since I'm flashing a boot image, this is obviously where the problem is located. I just don't have any error logging to read over. Since I'm cooking on Windows, I'm wondering if my file permissions and ownership are messed up.
Also, while running my update, I observed that the boot image flashing did not seem to take long at all. So, I'm concerned that I didn't even get a complete flash.
Click to expand...
Click to collapse
That doesn't bode well so far.
just some info
i'm not sure if this will help any of you, but i read before that it said koush tried to get the emmc mounting.. etc... and it didn't work. but - i'm running cm 6.1 stable and winamp can and does read my music found on the internal memory. so it seems to work for me. however - i cannot take picture and have them stored on the internal memory. anyway, good luck.
OK.... I got the ramdisk sorted out. The boot loop is gone. But it doesn't progress past the splash1. sigh.
I need to see the kernel messages, and typically ADB is not available.
drwndphish said:
just some info
i'm not sure if this will help any of you, but i read before that it said koush tried to get the emmc mounting.. etc... and it didn't work. but - i'm running cm 6.1 stable and winamp can and does read my music found on the internal memory. so it seems to work for me. however - i cannot take picture and have them stored on the internal memory. anyway, good luck.
Click to expand...
Click to collapse
CM6 uses a modified media scanner (Android layer) that uses '/mnt' as its base directory, instead of '/mnt/sdcard.' And, as you say, it has its own problems.
I am trying to modify the underlying file system to make hopefully all software work (e.g. HTC stock, Winamp and other media players, 90% of the apps I've played with).
It "works!"
Alright... I have all the tools made, and bugs squashed. So, I can correctly mod a boot image. (Tip: The boot process has a zero warning or error tolerance.)
It fully booted. BUT... A permanent notification "Preparing phone storage.../Checking for errors." did not go away. All emmc directories were absent.
So, I've found a problem. Google didn't return any useful information... Especially annoying is the face that I don't even get a link to the Android source to even get a hint where this notification comes from.
AHA! Fixed that problem. Now, emmc is visible on the sdcard.
NEXT problem (this one I expected):
Media scanner picked up 2 copies of my pictures (I have them on emmc). So, my thought is to start removing links (and references) to emmc in its new location until things clear up.
weareallkosh said:
Alright... I have all the tools made, and bugs squashed. So, I can correctly mod a boot image. (Tip: The boot process has a zero warning or error tolerance.)
It fully booted. BUT... A permanent notification "Preparing phone storage.../Checking for errors." did not go away. All emmc directories were absent.
So, I've found a problem. Google didn't return any useful information... Especially annoying is the face that I don't even get a link to the Android source to even get a hint where this notification comes from.
AHA! Fixed that problem. Now, emmc is visible on the sdcard.
NEXT problem (this one I expected):
Media scanner picked up 2 copies of my pictures (I have them on emmc). So, my thought is to start removing links (and references) to emmc in its new location until things clear up.
Click to expand...
Click to collapse
The double items in media scanner seems like a small issue compared to what it fixes.
More problems created than fixed. (And WHY this is a mess to begin with.)
Postmortem thus far...
Touching ANY code related to where emmc appears will cause Setting to FC if you view the SD & phone storage usage.
Makes media visible to "other" applications, but shows duplicates in HTC's music and gallery apps.
I didn't look too closely at it, but I question that the camera was playing nice with the new config.
ppd0526 said:
The double items in media scanner seems like a small issue compared to what it fixes.
Click to expand...
Click to collapse
SO... I took some time to understand the double items, and why EMMC is such a problem to begin with.
HTC did not modify the media scanner/provider to support EMMC. They modified their APPS. Do a dump of HTC's music and gallery apps. You'll find a LOT of extra code, and a lot of added symbols/strings for handling the phone storage.
In other words, they didn't create a "public" solution. They just made their own private patch, and brushed it under the rug. (How dare we not use THEIR apps???)
Media Scanner/Provider:
I looked at Koush's code changes. I don't understand his changes. I'm not sure how/why it "works." I don't know why it reportedly breaks the HTC apps. I am also not sure that their is a way to mod it to actually fix the issue... Google's code was not written to be extensible. But, I think it may be the way to go in the long run.
What other phones have EMMC? Do they have a fix?
My tools...
There is a lot of code duplication, no GUI, or options. It ain't exactly pretty, but it works.
I'm posting this here for future reference by others wishing to work with boot.img.
Note: This specifically targets 1 file on the ramdisk (init.inc.rc), but with some changes this could do almost anything you would want.
License... Oh. GPL. If you make changes, please send me a patch.
REQUIRES: AutoHotkey (Hey.... it's all I had available, but the code should be easy for anyone to follow and port to another language.)
Runs on Windows (XP). Does not require cygwin. Native GZIP included.

IHO Poo Remover rev5 - 20110824

Should work for all Optimus V GB ROMs (aosp & IHO variants)
steps to modify:
extract
edit remove.sh script*
zip
sign
*works best in a unix editor. Notepad++ & Windows notepad sometimes screw with shell scripting handles new line something-or-other. In Windows I've used another free app Jedit for editing it and it seems to not give me 'installation aborted' msgs when installing the zip.
IHO Poo Remover rev5 (link updated)
comments on Email.apk: personally, I use it because it not only connects to Exchange servers but Hotmail email/contacts/calendar syncing can be set up directly in account settings with it there. instructions
Pls extract the zip & look at the remove.sh to see what I'm removing because I have my opinions. You can comment out & zip it back up to your tastes. If you have a variant you've made go ahead & post a link to it. Nice to compare what we each prefer.
In regards to ringtones & notifications I remove all but a basic ringtone. You can either add your own into the script- just drop them in the ringtones & notification subfolders or put additional ringtones on your sdcard in a folder made and named 'ringtones'.
Other notes is it removes a bunch of languages & adds a smaller English language.
I left in CMStats because I want Cyanogenmod to know we use it.
Don't know what Pacman.apk is so I have it commented out. May remove it if I figure out what it is.
Source on safe to remove apks and their purpose on Cyanogenmod wiki
rev5-
removed the sqlite tweaks as they didn't really do much on the IHO ROM
added removal of bootsound since it's an annoying idea
That SQLlite binary patch looks interesting. Looked at the source page, and they only have the /system/lib/libsqlite.so included, while your .zip includes /system/bin/sqlite3 too. I don't see a /bin/sqlite3 currently on my phone, what is the 2nd bin for?
jawz101 said:
Don't know what Pacman.apk is so I have it commented out. May remove it if I figure out what it is.
Click to expand...
Click to collapse
Pacman is run one time only. When you first sign into the market. It offers to download all the google apps at once. i.e. Maps, Facebook, Voice, Youtube, etc. I find it useful; since I use most of what pacman offers up. Hope that helps. I'll defiantly have to try poo remover. Love that name BTW.
I guess I left that part out, Whyzor. I'm pretty sure it's useless on its own but among these tweaks is a command that will vacuum the sqlite databases contained on the phone. I guess those that use those scripts would benefit from it most. I may take that piece out since I don't think it's being added completely (maybe not chmoding) because I end up having to run the chmod by hand sometimes. I could be wrong though and it may work.
Anyways, to actually use the sqlite3 you'd need a script like this one from FranciscoFranco, adjusted by mmarz . there's a portion of this script that vacuums the phone's databases. real-world benefits? It's likely negligible at best but I just threw it in there.
If you are ever interested I'd follow anything FranciscoFranco & Ungaze do- they're Optimus One tinkerers but they're obsessed with performance. Really anything they do is applicable to Android in general. Franco's Optimus One ROM is insane (xda) (github source)
I just replaced the /system/lib/libsqlite.so from the source thread you posted, set permission to be same as the other binaries, rebooted. Ran RL Benchmark and got the same, around 93 seconds overall score (using 245-600 ondemand CPU, IHO CM7.1. Are you getting the same performance?
UPDATE: If I overlock to 806 Mhz, was able to drop the overall time to 71 seconds, went back to original libsqlite.so and at the same clock speed, takes about 81 seconds. The performance gain is negligable given the corruption risk (and according to Blarf in the IHO thread, properly written apps won't see much of a benefit anyway).
yeah I'll probably take that out. It gave a noticeable improvement when I ran aosp. May also be that I'm not applying it correctly with this zip.
on aosp the RL Benchmark went from around 80 seconds down to maybe 45 seconds for comparison.
Probably best just have this as purely a bloat remover. Regardless, having it in there isn't messing anything up so this is still safe to use.
First off I love the poo remover. However, every time i edit the script, zip the package back up again, and sign it and then try to apply it the installation keeps getting aborted with CWM.
I have followed the instructions for windows, including using Jedit, and i have even tried with my macbook using a terminal session with pico.
i do sign the zip files also.
should i not include the stock folder META-INF in the altered script?
any help is greatly appreciated
that's usually what gets me is the editor I use to edit it with. I'd assume a macbook would be fine for editing it.
I usually remove these 3 files from the meta-inf folder before resigning as they get regenerated with that signing program (cert.rsa, cert.sf, manifest.mf). I don't know if that would affect anything but I've just been doing that out of habit.
Fortunately we understand what we're trying to do and really the only thing that's hanging it up is whatever the hiccup is.
It came down to making one change at a time until I got install aborted errors to stop
thanks much i will give it a shot
may want to try just unzipping it and rezipping it to see if that works.
Make sure you're zipping up the contents of the iho zip and not the actual folder.
Try it with & w/o signing it. If it works w/o signing it I'd leave that step out just so you can concentrate on editing the remove.sh script.
Possibly use a command line editor if your mac can do that (never used a mac)
issue is with unix line endings vs. windows/mac line endings
just found something if you're using Notepad++ try going to edit- EOL Conversion & switch it to Unix
i will look for another terminal editor and try that too.
i was originally using pico in the terminal.
when i was doing the editing of the remove.sh, i wanted to install the default ringtones and notifications.
do you think the restore that runs at the end of the removal is conflicting with it? I will give everything a shot today and let you know later what happens.
I'd just take those remove lines and audio folder out, put them in that audio folder, or just have a ringtone folder on your SD card
The restore is just adding stuff back
got it working
it was my stupid mistake of zipping the IHO folder and not the contents of the folder
so when i was signing it it created the META-INF folder and a IHO folder
Everything flashed and worked great
thanks again
I was interested in looking at this, but it no longer exists on mediafire. Any chance you can put it back up?
-John
Yeah.I will put it up tomorrow. It's also good to pm on old threads like this
I've been lazy... updated the post with a new link to the file. Sorry... been really slacking lately :/
It's the same poo remover revision5 from before. again, read the stuff at the top if you want to make changes.
I've honestly not been using my script for a long time but it's nice to have around.

Live Wallpapers

Hey all,
Live Wallpapers have been pulled from XDAndroid builds for a while. They do slow the device down, but they are eye candy... and I know everyone loves a little eye candy now and then.
So follow these steps if you want to give Live Wallpapers a whirl. I've included two (Starfield and the Matrix) but there are many, many more you can download once they are enabled... No guarantees any of them work, and again - This will slow down your phone, you've been warned!
Onto the directions:
Two methods - on the phone directly, or thru adb. Either way, you need to grab the .zip file (attached) and extract the files to your SD card. In reality you only need LiveWallpapersPicker.apk to enable the feature, but if you don't have any Live Wallpapers in mind, grab the other two APK's and put them on your SD as well.
First method - adb
Press enter after each entry...
Code:
adb shell
Code:
su
Code:
mount -o,remount rw /system
Code:
mv /sdcard/LiveWallpapersPicker.apk /system/app
Repeat the last step for livewallpaper.starfield.apk and livewallpaper.matrix.apk if you wish. Obviously the commands are assuming the APK's are at the root of your SD card - change the path if you placed the APK's in a different location.
Finally,
Code:
mount -o,remount ro /system
Second method - on the phone.
You need Terminal Emulator or ConnectBot. Connect to a local (root) shell.
I was going to make a separate section for this, but in reality it's the same steps as above - minus the adb shell part. Again, if you place the APK's at the root of the SD card - no folders - the above directions verbatim will work on the phone itself. Enjoy!
Feel free to use this thread to share your experiences and favorite Live Wallpapers - especially if you find one that works better than others, etc.
PS - In case you're unsure, once you've done this (no need to reboot) you should be able to long press on the desktop and go to "Wallpapers". You should now have a new option, "Live wallpapers".
Figured I would add my experience to kick things off.
mgross029 inspired me to try Live Wallpapers again, because of Go Weather. Pretty cool weather app, with a nifty Live Wallpaper for sure!
arrrghhh said:
Figured I would add my experience to kick things off.
mgross029 inspired me to try Live Wallpapers again, because of Go Weather. Pretty cool weather app, with a nifty Live Wallpaper for sure!
Click to expand...
Click to collapse
Combine this with tweaks from arrrghhh's speed improvement thread and WOW! My TP2 is running better than it ever did in WM!
Your results may very!
Iv tried making this work, (see http://forum.xda-developers.com/showthread.php?t=1256011) but i cant seem to get it to work at all.
Im using a RHOD300 (tilt 2)
i downloaded the
Attached Files
LiveWallpapers.zip - [Click for QR Code] (347.8 KB, 45 views)
extracted them to my desktop, then placed them into the root of my SD card, then I ran haret and booted into android, then without going into terminal emulator i decided to see if i had a livewallpapers option just for kicks, and there was! but it kept force closing. then i loaded up terminal emulator and followed the steps (noted that im doing the "on phone" method) and sure enough there was indeed a new "live wallpapers" selector. however, whenever i try to use a live wallpaper, it force closes. (i even tried using livewallpapers i downloaded from the market, but that didnt work either) after rebooting to see if that was the problem, the same instance occured.
Thinking of a workaround, i saw that they were .apk files, so i this time placed them into the android app folder (where all the other .apk files are) and hoped that would work. and it didnt. So im at a loss as to what im doing wrong.
Also, by on phone method i assume that meaning downloading from your pc to your phone. not going to this page and downloading it to your phone
Any help would be much appreciated!
Edit: i dont think this would make much of a difference, but im using GO launcher ex from the market.
A cool username said:
Iv tried making this work, (see http://forum.xda-developers.com/showthread.php?t=1256011) but i cant seem to get it to work at all.
Click to expand...
Click to collapse
Well if you can select Live Wallpapers, you've done the steps correctly. If it's just FC'ing, I guess try a new data.img. Rename the old one to data.bak so you can easily revert to it.
This is experimental, and really a complete waste of time and resources - on the phone as well as your own . But I figured I would put it out there because so many were asking how...
arrrghhh said:
Well if you can select Live Wallpapers, you've done the steps correctly. If it's just FC'ing, I guess try a new data.img. Rename the old one to data.bak so you can easily revert to it.
This is experimental, and really a complete waste of time and resources - on the phone as well as your own . But I figured I would put it out there because so many were asking how...
Click to expand...
Click to collapse
I was actually just trying that, and i'll be damned, it works! now all i have to do is try it with my other data.img
Edit" cant help but notice the added mv /sdcard/LiveWallpapersPicker.apk /system/app
i think that was my problem trying it with my other data.img now
A cool username said:
Edit" cant help but notice the added mv /sdcard/LiveWallpapersPicker.apk /system/app
i think that was my problem trying it with my other data.img now
Click to expand...
Click to collapse
Heh, yea... I realized that wasn't in there and probably could trip people up. I didn't think that was your issue, since you could actually pick LiveWallpapers.
arrrghhh said:
Heh, yea... I realized that wasn't in there and probably could trip people up. I didn't think that was your issue, since you could actually pick LiveWallpapers.
Click to expand...
Click to collapse
I think the only reason why i could was because i put it in android apps with the other .apk files one time and then deleted it. After i did that the phone seemed to remember it was there after i deleted it and continued to have a livewallpaper option even after i deleted it. so thats why it wont work on the other data.img.

[Q] Specific "bugs" when modifying ICS-based ROM ZIPs

Hi, I've always liked to modify ROM ZIPs by just opening them, and then deleting the stuff I had no interest in (say, for example, DownloadProviderUi.apk), and doing that has always worked just fine after installing it (talking about Eclair and Froyo).
However, since the release of GB/ICS based ROMs, if I go as far as to modify just one file - even simply replacing the bootanimation.zip contained within the ROM ZIP, after it has been installed and rebooted, there's no lockscreen (deactivating and activating it again does nothing) and the HOME button doesn't work - it acknowledges that it's being pressed, but it simply doesn't do anything at all (return and recent do) - trying to change its default behaviour has no effect at all. As far as I'm aware, the problem spans across multiple (all I have tested) GB/ICS ROMs and a few different and completely unrelated (different brand) Android devices.
Also, installing those same ZIPs without making any modifications keeps any issues from ever happening.
I'm aware that they can be removed using ADB after it has been installed, using Root Explorer to mount /system as RW and deleting them manually, using Titanium Backup to freeze or remove, etc...
I'm mostly interested in having some light shed on the above issue. -Why- do those ROMs always fail if the ZIP file is modified in any way? Is there no way around it?
Thanks for taking the time to read
EDIT: Just in case, I've already tried searching for information regarding these problems, and other than unanswered to and very scarce comments, I've been unable to find anything revealing in any way - I'd appreciate if someone could point me in the right direction if there's something I've missed.
Are you signing your apks before trying to install them?
The APKs..? I'm guessing you meant the ZIP - if so, no. I could give that a try later and see how it goes...
No, I meant apks, but only because I've had an experience nearly exactly like the one you're describing and it was from trying to package the rom with an unsigned apk.
Ah. Well, I guess if I tried adding an APK it'd happen as well - my issue is I want to edit the updater-script (extract, edit with notepad++, throw it back in...) and/or remove APKs (for example, I have no interest in /system/app/DownloadProviderUi.apk). Like, fire up winrar or 7zip (tried with both), browse to the file, delete, then copy it over the to device and install the ROM - the bug always shows up.
Uncompressing the entire ROM, modifying away and then creating a new ZIP makes no difference, either...
EDIT: No dice - I've taken Hashcode's latest ROM, just for reference:
Untouched ZIP works flawlessly.
Modified unsigned ZIP doesn't have a lockscreen and the Home button doesn't respond when pressed (though it acknowledges being pressed).
Modified signed ZIP does exactly the same as the unsigned one.

Categories

Resources