[Guide] Hacks and mods: Three tutorials for modifying your x10 OS aesthetically - XPERIA X10 Themes and Apps

Updated: July 24/2010 Go to the X10 Theme repo for a listing of uploaded themes.
Thanks to everyone that is helping out and contributing. I also apologize if I rip anything off. If I do please post it and I will definitely correct it.
The usual disclaimer goes with this... Use at your own risk and backup your system before making any changes. You know what to do if you run into problems
I think this is important...
Links for various stuff:
framework-res.apk
/system/app/ folder
startup show (boot animation)
Mms.apk
Phonebook.apk
apps2sd-work in progress?
http://forum.xda-developers.com/showthread.php?p=7037044#post7037044
Many visual aspects of the os and system apps can be changed and surprisingly easily. By default when opening an apk you should look around the res-drawable folders for the pngs to edit. If you have noticed, there are some png's that look like xxx.9.png. To modify these files easily, remove the 9 from the filename and open with your preferred editor. When you are done editing the files save them, open the command prompt and type draw9patch. This should open a window with an arrow in it. Drag your file there and I'm pretty sure it goes into the same folder. That's it.
If you are using a mac use betterzip and take a look here.
You can also use root explorer (I havent tried this myself)
Step 1:
Connect phone to pc, enable usb debugging and open adb. Type:
adb pull /system/framework/framework-res.apk framework-res.apk
That will pull your framework-res.apk to whatever folder is displaying in your command line.
Step 2:
Find the framework-res.apk on your hard drive, right click and open with 7zip.
Step 3:
Use png's here or create your own and dump into the appropriate folder within framework-res.apk.
Step 4:
When you are done editing the files open up adb and type the following command:
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb push framework-res.apk /sdcard/framework-res.apk
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
That will put the new framework-res.apk on your phone. It should automatically reboot (if not reboot it) and your changes should be applied!
When running the script above you can replace framework-res.apk with whatever you want. For example, Timescape.apk
Remember, it is CASE sensitive I made this problem many times)
If you would like to pull an entire folder put a slash at the end of the last word. For example, adb pull /system/etc /etc"/" (no " in actual script )
Courtesy of corruptfate is the steps to modify the startupshow (post #207)
step 1: open adb shell
step 2: type "adb shell"
step 3: type "su"
step 4: type "mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system"
step 5: type "mkdir system/etc/semc/startupshow"
step 6: exit and redo step 1 - 4
step 7: type "mkdir system/etc/semc/startupshow/default"
step 8: exit and open command prompt again, this time type "ddms"
step 9: look for the default folder in system > etc > semc > startupshow > default
step 10: push the images into that folder
Possible reasons your phone won't boot after modifications:
images anren't stored properly, right format, right size etc.
unpacked apk improperly, use 7zip, it doesn't mess anything up
you signed the package before pushing it- unless you know what you're doing follow the directions to a tee and you should be fine
pushed the package to the wrong directory, /system/framework-res.apk XX, /system/framework/framework-res.apk
I'm sure many other reasons, these were the only ones I encountered
How to get past boot screen:
Use backup framework-res.apk and push that one to your phone. Remember to place that one where the modified one is.
To see if adb sees your phone type adb devices, if a serial number pops up try pushing your original, if not...
Flash your phone again from scratch . Sorry, I don't know any better way yet.
Please post your themes and download themes from the X10 theme repo

The basics:
http://forum.xda-developers.com/showthread.php?t=502010
http://developer.android.com/index.html
http://developer.android.com/guide/developing/device.html
Some Links:
Notification background color
Status bar clock color
Notification font color
Notification bar shortcuts
Edit 9.png's
Install mobile defense as system app through terminal (I haven't tried this yet)
Resigning apps
http://forum.xda-developers.com/showthread.php?t=549109
http://androidforums.com/developer-101/8665-how-signing-roms.html This is the one I have been using. I just noticed its for roms
http://code.google.com/p/android-apktool/ Figured it out but no need for it as of yet
How to modify notification background colors
Some of the files; not sure which is the top band displaying carrier(semc_avctivity_title.9.png??):
statusbar_background.png
status_bar_background.png
status_bar_close_on.9.png
status_bar_header_background.9.png
status_bar_item_background_normal.9.png
They should be in res/drawable-240dpi. Once you find them open them and modify as you wish. Once completed save your changes.
Getting FLAC working, I was wrong, mixed up file folders. Apparently meridian pioneer works. Havent gotten a chance to test for sure yet. I am now trying to manually add flac support to mediascape

Second tutorial: Busting open apks so you can edit xml's!!
So has anyone tried opening up an xml file on their phone to edit only to find incoherent coding. Well I have. So I have stumbled upon a tool called apktool. The tool somehow breaks down the apk into readable xml files. I haven't gotten so far as to test out an edited xml because I wanted to post this so I don't forget how to do it.
1. follow instructions on installing apktool. Unzip the files into your android-sdk-windows/tools folder
2. Put a copy of your framework-res.apk into the same tools folder
3. from command type: java -jar apktool.jar if framework-res.apk
4. Put whatever apk you want to edit into tools folder and type this: java -jar apktool.jar d xxx.apk
5. Look in your tools folder and voila there will be a folder named with whatever apk you worked with.
Third tutorial: Use smali/baksmali to edit services.jar and services.odex
1. follow instructions on downloading and installing smali/baksmali
2. pull these files from your phone and place them into the same folder as smali (should be android-sdk-windows\tools):
code.odex
ext.odex
framework.odex
android.policy.odex
There may be other ones needed that Im missing so if you find this out please let me know
3. place the odex you want to modify into the same folder (android-sdk-windows\tools)
4. from the command line type java -jar baksmali-1.2.3.jar -x services.odex
your pc will work a little bit and when its finished will just show your directory again.
5. minimize that screen and go into the folder you put everything in there should be an out folder. Open it up and all the files to edit will be there!
I haven't recompiled yet but when I do Ill finish this tutorial.
COMMON PROBLEMS:
These are some problems I ran into because I am a noob. I figure it may help a couple people out
1.unable to access apktool.jar/baksmali-1.2.3.jar
Im pretty sure you are in the wrong directory
from the command line type: cd C:\whatever\directory\leadsto\android-sdk-windows\tools\the.jarfileyouaretryingtoaccess
2....

Modification requests:
Custom boot screens-- find your startupshow folder=== SOLVED
custom response to invalid password
Ad hoc support
Disable slide lock
App drawer categorization=== THERE'S AN APP
map hardkeys

cool, gonna try and change the battery indicators

I was able to replace framework-res while the phone was running, but now the phone wont boot.. good thing I made a backup of the original one

xxsashixx said:
I was able to replace framework-res while the phone was running, but now the phone wont boot.. good thing I made a backup of the original one
Click to expand...
Click to collapse
Thats where I'm stuck too. Did you resign the package after modifying it? Im going to try that in a bit.
Does anyone know of a good n00b guide to emulating our phone in eclipse?
@microkiwi can you post how it went?

I did make some new icons in PS, but unfortunately I wasn't able to boot the phone after pushing my new files to it
I also tried to sign it with the autosign (testsign.java) application but no luck...

mikrokiwi said:
I did make some new icons in PS, but unfortunately I wasn't able to boot the phone after pushing my new files to it
I also tried to sign it with the autosign (testsign.java) application but no luck...
Click to expand...
Click to collapse
Cool thanks, hey have you seen an app called metamorph? I just noticed it right now but it seems like stericson automated and simplified the process. Heres a link
http://forum.xda-developers.com/showthread.php?t=591329

Have you tried that app yet?

Yes, I have made a metamorph theme now and everything seems fine, the theme shows up and I can apply it and everything.
But after reboot the phone is still using the old icons

Any other metamorph themes that we can install?
I think for 1.6 only

gavriel18 said:
http://code.google.com/p/android-apktool/ Looks cool I just wish I knew how to use it
Click to expand...
Click to collapse
Apktool is just for everything else but signing ;-)

mikrokiwi said:
Yes, I have made a metamorph theme now and everything seems fine, the theme shows up and I can apply it and everything.
But after reboot the phone is still using the old icons
Click to expand...
Click to collapse
Could you please upload the theme, I'd like to learn how theming works. In the AndroidThemes thread I found only themes for custom roms. THX !

mikrokiwi said:
Yes, I have made a metamorph theme now and everything seems fine, the theme shows up and I can apply it and everything.
But after reboot the phone is still using the old icons
Click to expand...
Click to collapse
Could you please post the .png files from the framework pull? I would like to change the colors and then try to replace them with files in a theme that I found that might work with our phone. The only issue is the resolution of the theme that I had in mind. If this works then we can all make custom themes for our X10 using that theme as a template. Not sure if it will work, but I would like to try.

pietropizzi said:
Could you please upload the theme, I'd like to learn how theming works. In the AndroidThemes thread I found only themes for custom roms. THX !
Click to expand...
Click to collapse
Unfortunately it does not work at the moment, but when I get it to work I will upload it for everyone to use
troyjamz said:
Could you please post the .png files from the framework pull? I would like to change the colors and then try to replace them with files in a theme that I found that might work with our phone. The only issue is the resolution of the theme that I had in mind. If this works then we can all make custom themes for our X10 using that theme as a template. Not sure if it will work, but I would like to try.
Click to expand...
Click to collapse
http://www.mediafire.com/file/kkmhmnyhgyw/framework-res.apk open it with 7zip

Thx man!
mikrokiwi said:
Unfortunately it does not work at the moment, but when I get it to work I will upload it for everyone to use
http://www.mediafire.com/file/kkmhmnyhgyw/framework-res.apk open it with 7zip
Click to expand...
Click to collapse
Tack så mycket!

@microkiwi Thanks for the upload, do you mind if I post that link in the first post?
@brut.all Does it work the same way as autosign? I followed the instructions properly on installing it but when I try to open it a command line pops up for a second (too fast for me to read) and then closes. Am I missing something?
Also do you know if framework-res.apk needs special signing? I'm just trying to figure out why the phone gets stuck at boot after pushing the modified apk.
@pietropizzi I have made one as well it doesn't work but I'll upload it right away. Check out the metamorph thread for some tutorials on theming. It is surprisingly easy.

On another note has anyone gotten to move their apps to the sdcard? I've tried but with no luck..
heres a post I made about it:
http://forum.xda-developers.com/showthread.php?p=7037044#post7037044

Cool ,I'm going to try it tonight. Mind if I add it to the list at the top?
BTW did anyone know mediascape supports wav audio Swwweeeeeetttt

Related

How to: Transparent Notification/Window Shade in Froyo -

Transparency MOD:
If you want to have a transparent notification window (the window shade), you can follow these steps:
Required:
- a working adb connection (you will need a PC because of the executable below)
- a transparent status_bar_background.png (if you do not have your own, the one i used is attached)
- xUltimate-TP.exe (attached)
- a file archiver (i used WinRAR)
Note: This should work on any Android phone running Froyo.
Firstly, you need to copy services.jar and framework-res.apk from the Android Phone to your PC
1.) Reboot into Recovery (fake-flash, Unrevoked, or adb recovery, they will all work)
2.) adb shell
mount /system
adb pull /system/framework/services.jar c:\
adb pull /system/framework/framework-res.apk c:\
3.) Optional: Copy the framework-res.apk and services.jar files to a separate directory.
4.) Copy xUltimate-TP.exe to the same directory the files mentioned above are located in.
Run xUltimate-TP.exe and wait for it to say it is finnished (it takes about 2 minutes to complete)
5.) Open framework-res.apk in WinRAR and go -> res -> drawable-hdpi-v4
Copy your status_bar_background.png into this folder inside WinRAR by dragging it over the window.
Close WinRAR
6.) Copy the patched services.jar and framework-res.apk to c:\
7.) adb shell
rm /system/framework/services.jar
rm /system/framework/framework-res.apk
**CTRL+C (to exit back to the windows shell)
adb push c:\services.jar /system/framework/services.jar
adb push c:\framework-res.apk /system/framework/framework-res.apk
adb reboot
And that's it.
I have attached my patched services.jar and framework-res.apk
If you are running Defrost 2.0+, using them may work for you (I am using DeFrost 2.4).
Major props to:
http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate.html
as it is his executable that patches the transparency.
Josh.
fllash said:
Hi there,
I apologize if this seems to be the incorrect sub forum to post in, however the thread i made in Themes has no responses after a week or so.
On to my question.
I have flashed many froyo roms for the desire, but they all have one thing in common - they do not have a transparent window shade/notification thingo.
I dismantled a few themes with transparent windowshades, copied them across to my framework-res.apk file and pushed it back to system/framework, but nothing changes. Well, a couple of the png's i have overwrote in the framework-res file caused the window shade to change colour (for example in the theme where the windowshade had a dark transparent background, the background turned black).
Is there a limitation somewhere preventing desire users of froyo to change transparency?
Or is there another file that needs to be edited?
Thanks for readin'
Josh.
Click to expand...
Click to collapse
I've asked the same thing and no one has replied, I assume you mean the notification drawer?
Changing the png file alone doesn't add transparency, it only does on the notification bar, there must be an xml file in framework-res.apk which handles transparency for it, but I'm so inexperienced in xml I haven't tried looking and there's so many xml files it would take days to convert each one to "readable" xml and find which line of code among thousands controls it
I haven't tested it, didn't have the chance, but you can check here
http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate.html
Look for xUltimate Froyo Transparency Fix
Yeah, i mean the notification draw - that you drag downwards.
Thanks for the link, im checking it out right now.
phunkycow said:
I haven't tested it, didn't have the chance, but you can check here
http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate.html
Look for xUltimate Froyo Transparency Fix
Click to expand...
Click to collapse
I tried patching the service.jar with it but it doesn't seem to work.. anyone else have tried too?
sckc23 said:
I tried patching the service.jar with it but it doesn't seem to work.. anyone else have tried too?
Click to expand...
Click to collapse
Did you make sure the background image of the "notification drawer" is transparent? Or applied it using the stock framework-res?
phunkycow,
You are a Genius,
It worked like a charm!
For anyone who is interested, the steps i followed were:
1.) Reboot into Recovery
2.) adb shell
mount /system
adb pull /system/framework/services.jar c:\
3.) Download the Transparency patch (I've attached it if that makes it easier)
4.) Copy the services.jar from c:\ to a folder (i used the desktop), and make sure that the Transparency fix executable (xUltimate-TP.exe) is in the same folder.
5.) Run xUltimate-TP.exe and wait for it to say it is finnished (it takes about 2 minutes to complete)
6.) Copy the patched services.jar (it overwrote the one in the folder) to c:\
7.) adb shell
rm /system/framework/services.jar
**CTRL+C (to exit back to the windows shell)
adb push c:\services.jar /system/framework/services.jar
adb reboot
And that's it.
I have also attached my patched services.jar, and framework-res.apk with a transparent status_bar_background.png.
If you are running Defrost 2.0+, using them may work for you (I am using DeFrost 2.4).
Now, you MAY NOT notice any transparency straight off the bat because your theme may not have a transparent status_bar_background.png.
If you find that it isnt transparent, i have attached a transparent status_bar_background.png
You need to add this to your framework-res.apk.
Major props to:
http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate.html
as it is his executable that patches the transparency.
Josh.
Glad I've helped, even a little. I was lucky enough to bump to that thread accidentally after looking for ways to deodex! You may want to edit the original post with the steps to apply transparency, and maybe edit the title as well? I'm sure other people might be interested as well
phunkycow said:
Did you make sure the background image of the "notification drawer" is transparent? Or applied it using the stock framework-res?
Click to expand...
Click to collapse
I did. I took the background image from Amer v4 (which is transparent) and flashed both the patched service.jar and new image to the phone. The notification panal ended up solid black.
Anyway will definitely try it again to see if i have any luck this time=)
Can someone post a screenshot? I could have sworn I have tried all this already to no avail.
edit: also, I thought that the services.jar patcher mentioned above was for the notification bar. Does this only make the notification bar transparent, or the actual background of the shade (where not covered by notifications)
This method did not work for me, however this one did
http://forum.xda-developers.com/showpost.php?p=7739623&postcount=53
Glacier with Gr8gorillas desire HD port 2.2

[Q] I want to make a theme...

But I don't exactly know how to get there.
I'm runing Wolfbreak's CM ROM V055, afraid to go to V06 because it might break my kernel install(still getting info on just what to do)
What I'm wanting is:
The status/pulldown bars(all icons except Wifi, and I want to keep Cyanogen 6's default slidey bar[the thing that ends up at the bottom]), and the animations from the theme used in SEMPITERNAL's Eternity 2 Build 0003a ROM. That will have to be ported to FroYo, I'm afraid(unless my theory at the bottom of this post will work).
I want the menu from LUCID-X10 by SicNside, with the black BG and white elements, but the png forthat i guess I'll have to negative a white hdpi one.
That's about it, the rest i want from arc theme which is default on my current ROM, including tickboxes, those arrows inside circles, the menu icons, etc.
My theory to sort of make this is to get the two involved APK's(default in CM and default in Eternity) onto my computer, and make them ZIP's. Then i can extract the drawable-hdpi folders from each and paste what I want from Eternity into Arc. Then I can replace the drawable-hdpi folder in the Arc framework file, and zip it at store.
That's where I stop knowing what I'm doing. Searching has not found me a guide on just how to make a framework-res.apk, nor even really making a theme altogether. All i can find is about xml files, resources, never anything about actually making the apk correctly.
Help, please?
I am stuck at the same point as you, I have no idea where to go from here :S
Anyone? I'm sure the two of us aren't the only ones...
Here's a zip of what I want. All I did was:
Took the framework-res.apk from the ETERNITY Rom and from the CM ROM, and pasted the png's i wanted from Eternity into drawable-hdpi-v4 in CM framework. Now, can someone make this work, please?
Its quite easy.
Just select the images you want to change.
Then open the framework-res.apk of your ROM with winrar or 7zip your choice.
Without extracting the files drag and drop the files to the winrar window in the right place. If you want to change images in drawable-hdpi migrate to res/drawable-hdpi and drag and drop images there.
Now close the archive and type this:
Code:
adb push <path to modified framework> /sdcard/framework-res.apk
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
Make sure you take a backup with xrecovery before doing this. If you do something wrong you may end up in a bootloop. In that case just restore from backup and try again!
realunited123 said:
Its quite easy.
Just select the images you want to change.
Then open the framework-res.apk of your ROM with winrar or 7zip your choice.
Without extracting the files drag and drop the files to the winrar window in the right place. If you want to change images in drawable-hdpi migrate to res/drawable-hdpi and drag and drop images there.
Now close the archive and type this:
Code:
adb push <path to modified framework> /sdcard/framework-res.apk
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
Make sure you take a backup with xrecovery before doing this. If you do something wrong you may end up in a bootloop. In that case just restore from backup and try again!
Click to expand...
Click to collapse
Grr, sorry but right now all my failure is just making that less clear. Type that where? Drag the files to the winrar/7zip window? Isn't that where i dont want them?
Ive followed all the different sets of instructions including yours on this forum as closely as i can make sense of them and always end up with a stream of FC's and reboot loops.
EDIT: does it only work on the stock kernel? I'm running Trip's kernel. I just pulled the framework apk then pushed that same apk back and it's still doing it.
EDIT 2: ok no stock kernel and its still doing it WHY THE HELL IS IT DOING THIS?!?!? I FLASHED THE SAME DAMN STOCK FRAMEWORK!
ok if i got the modded framework apk to my sdcard and used root explorer to paste it in, should that work? This laptop might be what's causing it
I have posted few tips here n there when ever people ask about it.
Check this for overall requirements
For your requirement, skip the optimization part out and just do image swap.
Like realunited123 said, dont extract, just open from 7zip, I use Win RAR and drag and drop the new image to the correct folder.
You need to remember few things here, check images name matches against old to new. Other important thing is resolution. you might get in to trouble if you take mpdi and put it to hdpi.
after updating the framwork I made a small template for you guys to play with.
Download attaches zip file open and go to
Framewrok-SJ.zip\system\framework folder and drag and drop the modified framework-res.apk
Dont try to install the attached file. its only a template for you guys to start working on....
After drag and drop you will see zip file size increased.
Simply copy to SD card and install via Xrecovery
You can try any framework to install like this without adb stuff
Remember to make a backup... because you will definitely screwup... we all have...... LOL
Realorasz said:
ok if i got the modded framework apk to my sdcard and used root explorer to paste it in, should that work? This laptop might be what's causing it
Click to expand...
Click to collapse
Well my friend if you have already did this. it will be your first screwup
Dont use root explorer or titanium for this work. Read this post I mention yesterday.......
Shiwantha said:
I have posted few tips here n there when ever people ask about it.
Check this for overall requirements
For your requirement, skip the optimization part out and just do image swap.
Like realunited123 said, dont extract, just open from 7zip, I use Win RAR and drag and drop the new image to the correct folder.
You need to remember few things here, check images name matches against old to new. Other impotent thing is resolution. you might get in to trouble if you take mpdi and put it to hdpi.
after updating the framwork I made a small template for you guys to play with.
Download attaches zip file open and go to
Framewrok-SJ.zip\system\framework folder and drag and drop the modified framework-res.apk
Dont try to install the attached file. its only a template for you guys to start working on....
After drag and drop you will see zip file size increased.
Simply copy to SD card and install via Xrecovery
You can try any framework to install like this without adb stuff
Remember to make a backup... because you will definitely screwup... we all have...... LOL
Well my friend if you have already did this. it will be your first screwup
Dont use root explorer or titanium for this work. Read this post I mention yesterday.......
Click to expand...
Click to collapse
Well i did try swapping mine with the framework apk in the froshed zip. I'll try it with yours though.
Shiwantha said:
I have posted few tips here n there when ever people ask about it.
Check this for overall requirements
For your requirement, skip the optimization part out and just do image swap.
Like realunited123 said, dont extract, just open from 7zip, I use Win RAR and drag and drop the new image to the correct folder.
You need to remember few things here, check images name matches against old to new. Other impotent thing is resolution. you might get in to trouble if you take mpdi and put it to hdpi.
after updating the framwork I made a small template for you guys to play with.
Download attaches zip file open and go to
Framewrok-SJ.zip\system\framework folder and drag and drop the modified framework-res.apk
Dont try to install the attached file. its only a template for you guys to start working on....
After drag and drop you will see zip file size increased.
Simply copy to SD card and install via Xrecovery
You can try any framework to install like this without adb stuff
Remember to make a backup... because you will definitely screwup... we all have...... LOL
Well my friend if you have already did this. it will be your first screwup
Dont use root explorer or titanium for this work. Read this post I mention yesterday.......
Click to expand...
Click to collapse
Is it just me is are you a savior!! Thanks, it's working now!!!!
Hey, by the way, can you teach me how i can make an xrec zip of a dialer mod I made? I want to post it on the CM 6 thread so people can like actualy install it but the only way i currently have for that is adb(which works on apps, but not themes...)
And one more thing, Is any sort of file transfer possible with ADB, or will i have to stick with WiFi File Explorer?
Realorasz said:
Is it just me is are you a savior!! Thanks, it's working now!!!!
Hey, by the way, can you teach me how i can make an xrec zip of a dialer mod I made? I want to post it on the CM 6 thread so people can like actualy install it but the only way i currently have for that is adb(which works on apps, but not themes...)
And one more thing, Is any sort of file transfer possible with ADB, or will i have to stick with WiFi File Explorer?
Click to expand...
Click to collapse
Thats good news.. one less problem to deal with....
create a folder call app on your pc and drag it to system folder in the zip file.
So you should have framework and app folders inside of it.
then copy Phone.apk & Contacts.apk and try to install via xrecovery.
there is a chance you might not be able to install as my initial signing of Zip file dosent included app folder and so MANIFEST.MF & CERT.SF dont have reference. on the other hand during installation Xrecovery dont check
key signature.
I didnt test this way so try, no harm will come to your phone.
Dont know about wifi explorer much. Im testing with adb generally. only final version im publishing in xrec.
Can you teach me how to make that meta inf stuff?
Sent from my X10a using XDA Premium App
Realorasz said:
Can you teach me how to make that meta inf stuff?
Sent from my X10a using XDA Premium App
Click to expand...
Click to collapse
You cannot, after putting stuff, need to sign by app sign tool or there are alternative called APK manager... search its on XDA i think........
I'm not getting it. The update script ange all that forxrecovery...?
Sent from my X10a using XDA Premium App
Realorasz said:
Can you teach me how to make that meta inf stuff?
Sent from my X10a using XDA Premium App
Click to expand...
Click to collapse
In META-INF create \com\google\android folders for update-script file.
Make update-script a text file containing the following
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
Be sure to add an extra blank line after "show_progress 0.1 10"
Compress META-INF and system folders to a zip, then move to your sd and sign with signAPKtic which is a free app in the market. Use "test keys" to sign. (signAPKtic is easiest to me,or you can use 1 of the methods Shiwantha suggested to sign)
I would also suggest zipaligning your apks before adding them to optimize your phone's performance when accessing them. Search zipalign on XDA and you'll find what you need...
*Edit- Also, X10 Mod Tool is great for pushing/pulling apks via adb without all the typing. I use it a LOT when testing different pieces of themes.
AyDee said:
In META-INF create \com\google\android folders for update-script file.
Make update-script a text file containing the following
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
Be sure to add an extra blank line after "show_progress 0.1 10"
Compress META-INF and system folders to a zip, then move to your sd and sign with signAPKtic which is a free app in the market. Use "test keys" to sign. (signAPKtic is easiest to me,or you can use 1 of the methods Shiwantha suggested to sign)
I would also suggest zipaligning your apks before adding them to optimize your phone's performance when accessing them. Search zipalign on XDA and you'll find what you need...
*Edit- Also, X10 Mod Tool is great for pushing/pulling apks via adb without all the typing. I use it a LOT when testing different pieces of themes.
Click to expand...
Click to collapse
I think adb mask controller can do it in the zipalign tab> zipalign /system/app button.
And what format does the text file need to be in?
Signapktic is either telling me the zip doesnt exist or gives me an unzp error... and I supposed to me signing the apk's or the zip?
EDIT: I think I got it. Zip signer instead of signapktic. Let's see what my phone does.
Ok it looks like it worked.
Make sure there are no spaces in the zip's name. Looks like you got it!
Sent from my X10a using XDA App
AyDee said:
Make sure there are no spaces in the zip's name. Looks like you got it!
Sent from my X10a using XDA App
Click to expand...
Click to collapse
So does that mean it worked for you?
EDIT: Oh, I'm stupid, I didn't even post it. Can you test it please?
It looks like it's signed already. Are you asking me to test the app or signature?
Sent from my X10a using XDA App

[HOWTO] Theming your framework / apps for newbies ;)

It's not much, but I thought everyone should be able to theme their Framework
Requirements: WinZip(or any other zipping program), Android SDK, testsign, some graphics editor...
NOTE: This will work with theme apk's as well !!!
So what you need to start with is your framework files:
framework-res.apk, com.htc.resources.apk ... both are located in SYSTEM:framework/
These files are just renamed zip files, so rename them back to .zip and extract them (you can also edit them inside WINRAR or something, but it is more comfortable if you extract them)
In these, images are usually saved in res/drawable-mdpi or such, but you have to think here, allways modify all files from one resource
Now locate the images you want to edit but I only know how to edit .png files (.9.png files are for a different howto, probably not by me as I've never really mastered it)
Pick those you want to edit, and edit them (I'm not gonna tell you how here, I usually use photoshop to do that )
Once you have edited those images, it is recomended to optimize those png's (Firstly to make them smaller, but more importantly, most of the times the png's from Windows graphics editor didn't work for me...)
To optimize png's you can use:
OptiPNG: DOWNLOAD This one is drag'n'drop batch conversion capable...
Pngcrush: DOWNLOAD Command line utility, but it has more settings
...or something else, but I find these two the best
Once you have these optimized, copy and re-write them to folders you took them from to edit...
Now you need to zip these back, for framework files I was told it is usual to zip them as "store", but correct me someone if I'm wrong.
After you have zipped those, they will have to be re-signed. To do this, use testsign from code.google.com
Then run this in cmd line (or create a .bat file as I did, it's much easier):
Code:
java -classpath testsign.jar testsign [COLOR="DarkRed"]file.zip[/COLOR] [COLOR="DarkRed"]file-signed.zip[/COLOR]
Now that you have signed it, it is recomended to zipalign it:
(zipalign.exe is located in /tools in your SDK)
Run this in cmd line:
Code:
zipalign 4 [COLOR="DarkRed"]infile.zip[/COLOR] [COLOR="DarkRed"]outfile.zip[/COLOR]
(4 is alignment in bytes)
Now that you have aligned the .zip, rename it to the original name and then you just need to push it back to your phone:
Code:
adb shell mount /system
adb push [COLOR="DarkRed"]com.htc.resources.apk[/COLOR] /system/framework/[COLOR="DarkRed"]com.htc.resources.apk[/COLOR]
or
adb push [COLOR="DarkRed"]framework-res.apk[/COLOR] /system/framework/[COLOR="DarkRed"]framework-res.apk[/COLOR]
And you're done
I hope this helps someone! Enjoy!
note: This way you should be able to modify any apk I think
Very good.
Good initiative, thank you.
Lets hope that others will follow your example and contribute in this community,we need it.
Sent from my HTC Desire S using XDA Premium App
One question... can i change the framework if i'm s-on? And if yes how? flash it through recovery or how?
LE: Thx for the info. I found out how to edit themes... i will create a cool one to upload here. I could edit the framework.....but i am s-on so no use for that.
Unfortunately, when you're unrooted, you can't push files to your system...
But this will work for those Theme apk's too... so grab a theme you like and you can edit it as easily as you would your framework It has a limited potential, but it's something for you S-ON users
Hmm, I skipped the push part and copied the file back over the one in the phone. Now my phone is stuck in a continuous loop on the "quietly brilliant" screen.
Any help? Where do I get a stock rom to flash?
rogbese said:
Hmm, I skipped the push part and copied the file back over the one in the phone. Now my phone is stuck in a continuous loop on the "quietly brilliant" screen.
Any help? Where do I get a stock rom to flash?
Click to expand...
Click to collapse
Just enter recovery & factory reset,wipe, then wipe dev cache, then reflash your rom that you were using before the bootloop.
You can even swap icons in the framework of your rom then just flash (if you try to swap framework.apks or dialer.apks using a file manager you will delete or swap the file but this will cause loads or errors & force closes & then result in your bootloop!) Then just swap via a computer within the zip file then just flash in recovery as normal & if done right you wont get bootloops

<<<GUIDE>>>theming 9.png's

Okay, is a pretty simple process to be honest, but time consuming, if you find a short-cut as you learn, please share. So, do you have:
adb installed,
winrar or similar application,
apktool installed,
and a photo editing program installed?
if your answer to all of these is yes, than follow these steps.
1.get your framework.apk
2.your com.resources.apk
put them in your apktool/framework folder, should be in your USER name folder, look for it,
Once there paste the .apk's in that folder, rename your framework.apk to 1,
and rename your com.resources.apk to 2
next create a folder in your desktop and name it MODS (this is what i use so this is what we will call it ) place all the .apk's which you are going to theme in there.
for this tutorial we are going to call it the rosie.apk
first thing is de-compiling the .apk, this will reveal the 9.png's to you
ok, open up command prompt and type:
cd desktop\MODS
press enter, next type:
apktool d rosie .apk
after this you should have a new folder in your MODS folder called rosie,
once in that folder go to the location of the 9.png's you are trying to theme,
open them in your photo editing program and you should now see some black lines along the edges of the 9.png images don't touch them (you can but i don't really have the knowledge to do it myself, so don't touch them )
if your photo editor has a selection tool go ahead and select everything but the first pixel where the black lines are located,
now erase whats inside your selection and theme away as long as you don't touch that first pixel, so to be safe use the selection tool!
after you are done theming it, save the image to replace the old one,
okay, remember that time consuming part..... well you must do this to each individual image as far as i know anyhow , so ONCE again if you find/know shortcuts please share and pass the knowledge along......
after you are done with the .apk, type this in command prompt:
apktool b rosie rosie-new.apk
this will compile your newly themed apk, along with your new 9.png's
REMEMBER, I'M USING rosie.apk AS AN EXAMPLE, SO INSTEAD OF rosie IT SHOUD BE THE NAME OF THE .apk YOU ARE BUILDING AT THAT TIME
that's it!
add the .apk to your theme, just remember to remove the -new part from the name, flash and enjoy
This Tutorial was made possible mainly 2 individuals:
tommytomatoe
mpitcher225
this guys where and are TREMENDOUS help to me!
Hope this helps!

How to guide decompiling/compiling systemUI.apk

If you are not having problems compiling SystemUI.apk with no problems then this is not for you
WARNING:
You should not attempt to do this on a device that does not have a recovery, because if something goes wrong you may have to reinstall your rom (not very likely though). You should probably back up SystemUI.apk You should also have some experience modding and some experience using Apktool and Linux.
INTRO:
If your having problems modding SystemUI.apk on JB then this thread is just for you. I recently found out how to mod the Jelly Bean SystemUI. Jelly Bean has made it very difficult to mod. Yes it is still easy to replace images, but if you want to do some major changes to the UI such as a 100 percent battery mod or changing the status bar color then you will need to know exactly how to do it. For example, if you get the UI decompiled without errors and you recompile it without errors YOUR RECOMPILED SystemUI.apk WILL NOT WORK and your status bar will disappear etc... There is a special way to get everything working and I will show you how.
STEP 1:
LINUX>>
Before we start I recommend that you have File Roller: one of the most popular archive managers for Linux (Ubuntu comes with it). If your distribution uses a Debian package manager (most popular ones do) then all you have to do is go into the terminal and type:
Code:
sudo apt-get install file-roller
Now you will have File Roller. You also will need java installed. Check if you have java by typing:
Code:
java
in the terminal. If you dont have java and your using a Debian package manager then type:
Code:
sudo apt-get install openjdk-6-jre
or download from the java website and install it.
WINDOWS>>
Before we start, you will need 7zip and java. Just search and you will find the programs to install
STEP 2:
Now we will install APKTOOL. You may already have it installed BUT your version will probably not work. I have ran around the internet for a modified apktool that wont give you errors (If you follow my directions). I came across a great thread. check it out and download all the tools their (dont forget aapt) http://forum.xda-developers.com/show....php?t=1755243. If you are in Linux rename the jar file to apktool.jar and move the the jar plus aapt to /usr/local/bin. You will need root. If you are in Windows rename the jar to apktool.jar and move it and aapt to your WINDOWS directory. You also need zipalign http://powerpoint45.webs.com/android/zipalign(I think this one is only for linux so if ur on windows either test this one or get zipalign from android sdk)move it to your WINDOWS dir/bin dir. You need one more thing. It is from the apktool websitehttp://code.google.com/p/android-apktool/. According to your os download either apktool-install-linux-r04-brut1.tar.bz2 or apktool-install-windows-r04-brut1.tar.bz2. Extract the contents. You only need one file from the archive. In linux move apktool (not apktool.jar) to /usr/local/bin. In Windows move apktool.bat to your WINDOWS directory. Dont jump ahead and say "Now that I got apktool set up, I know what to do", because it gets a lot more difficult than you are used to using apktool.
STEP 3:
Now that you have apktool set up, you need to know how to mod SystemUI.apk. Get SystemUI.apk from /system/app within your device onto the computer. Now make a backup of SystemUI.apk on your computer because we will NEED it later. So you need two SystemUI.apk files on your computer. You could name one “backup” if you'd like. So now now we need to decompile the apk. Go into the terminal/cmd and cd/chdir into the directory you have SystemUI.apk. Now type
Code:
apktool if SystemUI.apk
It will then install frameworkneeded.Then type:
Code:
apktool d SystemUI.apk
It will decompile the apk. It will take a bit of time for it to fully decompile. The decompiled code will be in a folder in your current directory called SystemUI. If It had errors decompiling, (IT WILL FOR MOST NEXTUS 7 ROMS) you will need to install framework manually. Download framework here:http://db.tt/Rpc6zskQ and place the two APK files into apktool framework folder (replace the old framework files). In Linux it is located at /home/yourusername/apktool/framework and in windows it is something like C:\\Documents And Settings\yourusername\apktool\framework. After that delete the SystemUI folder that was made by the bad decompiling proccess and repeat the decompile command.
STEP 4:
This is the part where you start modding. You can make many customizations to the UI this way as you probably know. I will just show you how to make a 100 percent battery mod. You need to go into the decompile folder (SystemUI) using a file manager, Then from SystemUI, go delete res/drawable/stat_sys_battery.xml and replace it with http://powerpoint45.webs.com/android...ys_battery.xml (to download that file right click on link and click something like "save link as"). Now you need to move to a new directory: /res. In that folder you need to look through all the directories that start with the word drawable. For example drawable-mdpi. There is one directory that your device uses for images but you may not know which one. Your device might be MDPI but use drawable-sw600dp from the UI instead of drawable-mdpi. So if you dont know or you want to be safe then search through the drawable folders and if their are any battery icons then remember you will need to add 100 battery icons to each one of the folders with battery icons. The battery icons are the ones named something like stat_sys_battery_0.png. So if you need to add 100 icons they need to be named in numerical order from stat_sys_battery_0.png to stat_sys_battery_100.png. Dont worry though, you wont need to rename 100 icons. Their ar many battery mods online that you can get them from, but I have some images you can download: http://powerpoint45.webs.com/android...RY_BLUE.tar.gz. Download it, extract it and copy all the images into all the drawable folders that contain battery icons. Now your ready for compiling; The step that is different than how we have always done it before Jelly Bean existed. keep in mind that some images can not be changed or edited at all durring this step because it will result with many errors durring compiling. You would have to add images to the archive after its compiled
STEP 5:
Like I said at the end of step 4, this step will be different than you have seen before. This is also the step where you will be using File Roller/7zip. To build the apk make sure you are in the terminal in the directory where SystemUI exists and type:
Code:
apktool b SystemUI almostdone.apk
almostdone.apk is the output file. Once it is done building you need to open the backup apk you made at the beginning with File Roller /7zip. Also open almostdone.apk with File Roller/7zip. From inside the backup.apk drag meta-inf folder & androidmanifest.xml to allmostdone.apk. Now all you need to do is zipalign the apk. Lets say your backup apk is named backup.apk. Go into the terminal at the directory you are working
in and type
Code:
zipalign -v 4 allmostdone.apk done.apk
This will optimize the apk. The output is done.apk.
STEP6:
Now you install the apk. Their are many meathods of installing the apk, here are a couple. Transfer done.apk to your device and rename it to SystemUI.apk. Now use a root browser or terminal app to replace the other SystemUI.apk on your system at /system/app. And make sure you give it the same permissions as all the other apk's in the system/app directory. Then reboot. Or you could make a flashable zip to install it.

Categories

Resources