I was wondering if anyone thought about integrating a theme switcher with modified firmwares. I wonder if its possible without having to reboot to install a different skin.
possible!!
i wud thnk its possible bcuz its the same concept as the jf updater!! it wud just bring up a list of themes to choose from and u pic 1 thn it just does the auto reboot and the name change!! in theory it makes since but im not tht good of a dev. so i cud b wrong!! just gotta wait n c i guess!!
acejoker25000 said:
i wud thnk its possible bcuz its the same concept as the jf updater!! it wud just bring up a list of themes to choose from and u pic 1 thn it just does the auto reboot and the name change!! in theory it makes since but im not tht good of a dev. so i cud b wrong!! just gotta wait n c i guess!!
Click to expand...
Click to collapse
Ouch...my head. Your keyboard seems to be missing some letters.
For the OP, you would need to reboot to apply the update.zip, I don't believe it can be applied without the phone rebooting, even if an application was to do the "switching" for you.
it would be like winterboard in the iphone/ipod touch restart every time you change themes. But i dont mind if an app could do the hole process for me
why not?!?
why is it not possible without a reboot?
as far as i know the themes are only images overwriting the original images...
now only some one has to try it ^^
i found the "framework-res.apk" on my phone (ADP1) in /system/framework
now just cp "NEW-Themed-framework-res.apk" to /system/framework
and restart the home app...
or the app that uses these images .. i dont know when there are loaded ... if they are loaded already on boot we need a reboot!
is anyone brave enough to just force cp the theme file
shouldn't do any harm its linux so what ....
lad
ps probably i will -.-
sounds great in theory, and i like the last post about it being linux so who cares, we can always fix it. but personally i would prefer an app similar to the JFupdater app. the main problem with that is that someone (not me) would have to make sure that the server the app reads from always has the most updated themes, and with our devs posting 10 new themes a day and only getting more since RandumAccess has posted 10 himself in the last two days it would get to be quite a headache. i like both ideas, the app seems like the better one, but please let up know if you get the force cp to work, it might get us on our way
ok
dont try it !!!!!
i did it thru the terminal app and after copying i pressed the home button to see i f anything happend...
well yes ... it rebooted ... and it stuck at booting ...
fixing my phone now ....
JUST DONT TRY IT! ....
Doesent it work like openHome and Bettercut ?
just relink the icons with an app?
I liked a themes icons here but hated what they did with the bars so I just copied the /system/app/ apks to mine and it worked without a reboot. I guess you could just make a program that copies apks around but I'm thinking having themes stored in /data/themes and symlinking the apks would work better. What do you guys think?
DeadBody79 said:
Doesent it work like openHome and Bettercut ?
just relink the icons with an app?
Click to expand...
Click to collapse
i thought so...too
thats why i tried to overwrite them ... but it seems that ii's more complex...
but mabye if we place symlink / hardlinks into the theme package..
and link to a location with the new image (so we can change this image)
something like /data/framework/framework-res.apk/res/drawable
ok i played a little with symlinks and hardlinks
what we need are symlinks with an absolute path
we can copy (with cp -d ) these into the package...
i'll try that ...but it may take a while since i never singed a package...
lad
What if you used scripts to rewrite the data and auto save apply the theme then forclose or cause a light reset? I'm assuming the system would have to be completely rebooted for the textures to take effect!?
ok
i have a problem with signing ...(i am runing linux!)
i did everything according to http://developer.android.com/guide/publishing/app-signing.html
signing on the computer works and even the verification says "jar verified" on every apk that is in my package..
just when i want to update on my dream it says :
verifying update package...
E: No signature (58 files)
E: Verification failed
....
how can i find these unsigned files...?
edit:
ohh and you have to compress the zip via : zip -yr newZip.zip dir
to keep the symlinks
lad
The auto sign programs wont work on linux because that makes it much easier to sign the .apk files and the update.zip. I used to do it manually and it takes way more time than using the sign.bat.
ok
signing problem solved ...
i tried to sign with my private key and not with the "public-update.zip-key"
so i managed to update with the symlink .... and it didn't boot
i checked everything again ... the symlink is now a text file (no wonder android didn't like that....)
... but why?
first i thought that th proses of unzip is destroying the symlink ... but on my com the symlink are always kept
then i noticed when signing a new zip is made and that broke the symlink ....
for signing the update.zip and framework.apk i'm using :
java -jar signapk.jar publickey.x509.pem privatekey.pk8 <themeDir>update.zip <themeDir>newUpdate.zip
(well sort of...)
i will now try to "hack" the signing into my own zip
or does anyone know how to sign it without destroying the symlink?
lad
-.-.....
what i did ...
i copied the symlink into the drawable folder of framework...
i made a zip of framework ... i signed that zip
then i unziped it to copy the symlink again (this time into the just unziped folder)
then i touched (with touch) the symlink and made the timestamp the same as the signed zip
then i ziped that folder .... (it is now signed and has the symlink)
now i only needed to zip and sign the whole update.zip ....
(i unpacked both to see if the symlink was still there... it was!)
i copyed it on he android ... and updated succesful
...but then it didn't boot ..... -.-
now what...?
any ideas?
lad
ps i will try to symlink the whole framework-res.apk .....
edit: pps use at own risk
script for Resigning(use it as a nautilus script):
Code:
#!/bin/bash
#
#use as nautilus script
##########################################
#change to the dir where u have the "signapk.jar", "testkey.x509.pem" and t"estkey.pk8"
##########################################
androidModDir=/home/lad/projekt/android/AndroidMod
java -jar $androidModDir/signapk.jar $androidModDir/testkey.x509.pem $androidModDir/testkey.pk8 "$*" "$*".signed
exit 0
script for Verifying"dirty" (use it as a nautilus script):
Code:
#!/bin/bash
#
#use as nautilus script
export i=`jarsigner -verify "$*"`
zenity --info --title "JarVerifier" --text "Well the outcome is:\n $i"
exit 0
I understand every bit of what you're trying to do. As of right now its obvious that a complete reboot to install the update.zip may be needed to install each skin, but I wonder if you can just do a reboot without an update to rewrite over the previous files then the new files would load a different skin. It shouldn't be so hard since the G1 is like any other cpu or OS platform right!? Keep trying you're getting close to it "Lad!" I'm sure there are more people out there in the world that are willing to give you a helping hand in the process of making this all work out. =)
Idea
What if you just created something that asks which theme you want to use. It then opens something like a file manager with a theme directory list
/themes
-->/theme1
-->/theme2
-->/etc
you choose the theme you want. It asks if you want to backup your current update.zip and then copies the update.zip from the theme folder selected to /sdcard and then reboots and applies the update.
Is that possible. Or even if it just reboots and then you press the power + home key when it restarts and then !!! you have applied the new theme. This would allow you to add/remove themes as you see fit.
OK, here you go
Here is a script for gscript to automate theme switching!
http://forum.xda-developers.com/showthread.php?t=486486
Code:
echo "boot-recovery
--update_package=SDCARD:themes/aero/update.zip" > /cache/recovery/command
reboot recovery
I have all my themes located in /sdcard/themes and a folder with the name. So all you have to do is write scripts for each theme and just place a shortcut on the desktop. With bettercut you could make the icon very representative of the theme.
beagz said:
Here is a script for gscript to automate theme switching!
http://forum.xda-developers.com/showthread.php?t=486486
Code:
echo "boot-recovery
--update_package=SDCARD:themes/aero/update.zip" > /cache/recovery/command
reboot recovery
I have all my themes located in /sdcard/themes and a folder with the name. So all you have to do is write scripts for each theme and just place a shortcut on the desktop. With bettercut you could make the icon very representative of the theme.
Click to expand...
Click to collapse
Here is the original post to this thread.
flip0406 said:
I was wondering if anyone thought about integrating a theme switcher with modified firmwares. I wonder if its possible without having to reboot to install a different skin.
Click to expand...
Click to collapse
I guess we'll have to keep searching and testing things until we can get it all together...........
well, I thought this would help until someone can find a way without doing a reboot.
Until then, this was the easiest method I could find.
Related
To create themes, or to edit themes to your liking, you will need a working knowledge of android, adb, how to resign apk's, knowledge of your own O/S.
Before you start be aware that you will may end up wiping your phone once, if not more. So lets go over the things that you will need.
You will need JF's RC30, RC8, or ADP1 V1.3, depending on what version you intend to create for.
Here is the link to these: http://forum.xda-developers.com/showthread.php?t=466174
You will also want to get the dev bootloader installed on your phone and to HIGHLY suggest everyone trying your theme to install it as well.
Link to dev bootloader: http://forum.xda-developers.com/showthread.php?t=455860
You will also need to resign all the apks located in /system/app and framework-res.apk located in /system/framework. When you push all of these to your phone.
JesusFreke was kind enough to build a custom signing tool for me that would allow me to right click on an apk and resign it from there. I am posting it here for others to use as well. Note that this is a courtesy of JF, so thank him for it. I cannot stress how much time this has saved me and will save you.
Here is the link: Http://www.FightForthePits.com/testsign(2).zip
Before using this you need to know how to set this up:
I will assume that you have the sdk downloaded and extracted somewhere(if not, do that now), extract both files to the tools directory of your sdk.
Now you will need to add the tools dir of your sdk to the environment variable CLASSPATH.(This is for XP, Vista coming soon)
To do this, right click on My Computer click properties, then choose the tab that says advanced. Click the button that says environmental variables. Go to system variables find the one that says CLASSPATH, double click it, go to the end of variable value. There should be a semicolon ; at the end. type in the path to the testsign.jar located in the tools directory of your SDK, for example the path to my testsign.jar was c:\sdk\android-sdk-windows-1.0_r1\tools\testsign.jar If CLASSPATH is not in your system variables then create it. Secondly, Find the system variable called PATH and add to the end of it, the full path to your sdk directory. For example, mine was c:\sdk\android-sdk-windows-1.0_r2\tools
Now right click the reg file that you extracted and choose to install it, or merge.
Now, right click an apk, do you see an option that says ResignApk? That's how you will resign your .apks and .zips.
If you find the right click menu not working for some reason you can type the following in cmd to sign your files: java testsign whateverfiletosign
Now through doing this you have done two things, first off you have made the resigning process extremely easy, secondly you will not have to cd to the tools dir of the sdk to use adb or any other tool in the sdk.
You will also need a version of linux installed or running vmware with linux, if you want to create, or edit, an update script, which will install the theme onto the users phone.
You will need to be specific in addressing what version your theme is for, RC8, RC30, or ADP1. Make sure every file gets signed. Make sure you test the update.zip before you release it.
Every .apk contains the images relating to itself. However, every apk has the ability to use the images in framework-res.apk. The images for every apk is located inside of itself. To find these images open up the apk, you can rename it to .zip or open it with an archiver of your choice, winrar, winace, etc. Then after opening the apk open the folder called res and inside of that there are folders that are named Drawable, drawable-land, drawable-port, etc. This is where the images are stored.
Ther are some things you cannot edit unless you rebuild the entire apk from source, which we will not go into here.(another tutorial, another time) Just know that at this time you SHOULD NOT edit, or even open images with the extension .9.png. If you do you will have problems...Trust me. These are special images called ninepatch images and android resizes these images to fit wherever android, or any other apk, needs it to. if you do open them or edit them they will no longer render correctly when resized. I believe that in order to edit these you must do so and then put them into the source and rebuild the entire apk.
Before getting started you must also realize that you cannot simply resign one or two apk's and stick them in your phone and expect them to work. You must resign every apk inside of /system/app and framework-res.apk and put them on your phone at the same time.
To simplify this process for you though, I have provided an empty update.zip which you can place all of your resigned apps into and use to update your phone to your custom theme. You can also download someonelses theme and use there files, since they are resigned already. It may also be easier to see what files do what and go where since they have already been edited and are easy to point out.
Now, your ready to start changing things up.
You will now need to open the apk, which you can do by adding .zip after .apk, effectively changing it to a zip. Note that if you are using windows you will need to unhide known file extension types. you can also use your favorite archiver such as winrar, winzip, etc.
See here to unhide known file extension types for Xp: http://www.mediacollege.com/microsoft/windows/extension-change.html
See here to unhide file extension types for Vista: http://maximumpcguides.com/windows-vista/how-to-change-a-file-extension/
After opening the apk go to res and copy the folders that have drawable in their name. Go to your desktop, or wherever, create a new folder called Images, or whatever. Open the folder, paste the drawable folders in there. Now you can see what the files look like without opening them. Btw, you may also want to add -frame, or -launcher, to the end of the folders you cope over to keep them separated from others.
Finally, you've edited the images put them all in the apk renamed it back to an apk and resigned it. Now it's time to push it to your phone and see the changes you've made.
Important! : Whenever pushing files to the phone NEVER do it while the phone is running. Do this in recovery mode! If you do this while the phone is running normally you will begin to lose space in /system.
So, boot into recovery plug your phone in and open a cmd prompt. From the cmd prompt type adb shell mount /system then type the following: adb push c:\whereveryourfileis\whateveryourpushing.apk /system/app (system/framework if your pushing framework-res.apk)
Now reboot your phone. If it doesn't boot, try doing a wipe, if that doesn't work reinstall an update and try again. There are alot of things people can do wrong, I can't explain them all here. If you get real stuck, you can ask for help here or contact me on Gtalk [email protected].
So now your theme is done and your ready to make an update.zip for others to install your theme.
I have created a template for you to make your own update.zip. Just download, add the system apps to app, and framework to framework. Zip it up, SIGN IT, TEST IT YOURSELF, and then distribute it!
Empty update.zip template: Http://www.FightForthePits.com/Androidstuff/update_empty.zip
If anyone has any questions please try asking for help in this thread before emailing me for help Usually I will respond to questions in this forum.
I hope this Tutorial has been helpful. I will add on to it as needed.
Stericson
Links of interest:
Downloading SDK: http://code.google.com/android/intro/installing.html
Using ADB: http://code.google.com/android/reference/adb.html
Working with ninepatch should be straightforward if you use the draw9patch tool included in the SDK. Documentation on usage here:
http://code.google.com/android/reference/draw9patch.html
JF could also save theme users a wipe by resigning /system/app/* and /system/framework/framework-res.apk in his builds with the test keys. Nice tutorial, btw.
However it doesn't. I have used that to no avail. I believe you need to edit the images, put them in the source then rebuild the apks from the source.
As for JF's update, it does not currently wipe your phone after install. So, for him to do this he would have to have his update do a wipe. So technically, they would still have to do this initial wipe.
Stericson
Stericson said:
However it doesn't. I have used that to no avail. I believe you need to edit the images, put them in the source then rebuild the apks from the source.
Click to expand...
Click to collapse
Good point. I thought you could simply drop a similarly dimensioned PNG in but apparently there is some metadata that only the android tool can create.
As for JF's update, it does not currently wipe your phone after install. So, for him to do this he would have to have his update do a wipe. So technically, they would still have to do this initial wipe.
Click to expand...
Click to collapse
True, but a user who is upgrading to a JF update after having put in customized (and test-key signed) system apps will have to wipe again anyway =) Anyone using custom themes will have to wipe every time a JF update (or any update) comes out. However if JF resigns, custom theme users would not have to wipe and stock theme users only have to wipe once. (Nevermind the fact I think everyone should wipe when updating...)
thx stericson this will help big time how long before I can get resigned rc30 last night when you said all the apk. need to be resigned I was like this is going to be a long night but I see jf hooked you up save some big time with his resigning tool
jashsu said:
Good point. I thought you could simply drop a similarly dimensioned PNG in but apparently there is some metadata that only the android tool can create.
True, but a user who is upgrading to a JF update after having put in customized (and test-key signed) system apps will have to wipe again anyway =) Anyone using custom themes will have to wipe every time a JF update (or any update) comes out. However if JF resigns, custom theme users would not have to wipe and stock theme users only have to wipe once. (Nevermind the fact I think everyone should wipe when updating...)
Click to expand...
Click to collapse
Ah, good point
The resigned apps will be released maybye sometime tonight...I had them done but ran into a script problem on adp1 and I have yet to try the rc30 and rc8 ones yet. so I won't release those until I've tested them. If you want to be a Guinea pig however, just let me know
Stericson
Stericson said:
Ah, good point
The resigned apps will be released maybye sometime tonight...I had them done but ran into a script problem on adp1 and I have yet to try the rc30 and rc8 ones yet. so I won't release those until I've tested them. If you want to be a Guinea pig however, just let me know
Stericson
Click to expand...
Click to collapse
The resigned apps have been released, each update file will resign all of apps in /system/app and framework-res.apk. However, these updates make no changes to them whatsoever...Meaning your phone will look just like a brand new phone without any modifications.
rc30 works thx Stericson made it easy for use
Issues with using the update.zip above
Hi all,
I just wanted to point out that after I applied the update.zip above and rebooted applications kept force closing randomly and constantly even through the initial setup (where you have to click the green android to start).
Prior to this, I had JF's RC30 1.3, and the engineering bootloader V2 no sigcheck.
First I did just a alt+s then a alt-w and alt+s. And still nothing.
I'm new to all this so I'm not even sure where to begin troubleshooting. Should I be using the HardSPL?
Thanks in advance and I appologize if this isn't the right place for this post.
Update:
After reflashing with JF's 1.3 RC30 and the problem persisted I noticed that there was a new release 1.31 and this has fixed the problem. I hope this helps anyone else who runs into the same problem.
I still don't know what went wrong though, can anyone shed some light on this? thanks.
Truly there's no telling, sounds like J'f's update fixed it. Can I ask what version you tested?
I would also like to announce that now, thanks to JF, again, you do not have to wipe your phone completely to apply the resigned app updates. However, you will have to re-enter your google info and your call history and other minor things will be gone, but all of your apps will be retained.
Stericson
Alright, I am a little confused........
So I downloaded testsign.zip and extracted it to the tools folder. Then I went into environmental variables and added CLASSPATH with the value D:\Android\tools\testsign.jar and now I am not sure what to do next. Can someone give me some clarification. And btw I am on XP but I can get on linux at home if I need it, but I am a total noob to all this stuff so be gentle.
I'm using http://www.fightforthepits.com/Androidstuff/update_Rc30.zip and have been encountering issues when the phone boots up. As soon as the initial phone setup comes up I get process force close errors, I extracted launcher.apk, edited the files I wanted, repacked it, signed it and then resigned the update.zip. Any ideas what I'm doing wrong? I'm already running JF's RC30 1.31
Did you repack it in linux? Did you resign Launcher.apk? Also, that update file was never meant to be used as a template for an update since it kind of wipes your phone. You should be using update_empy, to push your own theme.
If you want to do only one file at a time, flash that update(update_rc30) then adb push your file into system/app. There are lots of things that you can mess up, most of them are hard to catch too. At any rate, everyone who has made a theme can tell you it's not just a straight forward process, expect errors. I've had more than I count I know....
Trial and error is your best teacher
Stericson
Stericson said:
Did you repack it in linux? Did you resign Launcher.apk? Also, that update file was never meant to be used as a template for an update since it kind of wipes your phone. You should be using update_empy, to push your own theme.
If you want to do only one file at a time, flash that update(update_rc30) then adb push your file into system/app. There are lots of things that you can mess up, most of them are hard to catch too. At any rate, everyone who has made a theme can tell you it's not just a straight forward process, expect errors. I've had more than I count I know....
Trial and error is your best teacher
Stericson
Click to expand...
Click to collapse
Must .apk's be signed if they're pushed over ADB? I'm not running Linux, I'm repacking/signing in windows.
I also had the issue with force close when installing the resigned update from the first post, apps that shouldn't even run on start up were force closing.
Also the IM application was gone, had to do a wipe and go back to jf 1.31 to correct it
I will take another look at the update I provided...
Stericson
did you ever figure out how to change the text on the status bar from black to white?
to do that you have to rebuiuld the entire apk from source and edit an xml document
Stericson
has anyone tried making the icons bigger? I noticed they are 48x48 if we go bigger will that affect anything? Also has anyone been able to remove the text below the icons on the home screen? Oh and where is the tab located that has been made invisible?
*edit
well I tried making the icons bigger and it doesn't really do anything, they don't show up bigger on the screen. Might have something to do with the text underneath, not sure.
Kyeld said:
Must .apk's be signed if they're pushed over ADB? I'm not running Linux, I'm repacking/signing in windows.
Click to expand...
Click to collapse
yes they must be signed.
If I want to customize a ROM that I have in update.zip format, do I just manually modify the contects of the update.zip and change the update-script and build.prop files or should I be doing this another way through an IDE or something?
If so, can someone please link me to where I might get some relevent info?
Thanks.
dsixda's kitchen will let you pretty much cook and modify any ROM.
I wouldn't use the root function on there, but if you look at the No Idea Blog link on the first page of that thread it tells you how to add root permissions if your ROM doesn't already have them (it's really easy).
Also, if you're on Windows and don't like the fact that you can't use the kitchen to its full potential, you can download a copy of Ubuntu Linux and VirtualBox (both free) and run Ubuntu as a virtual machine within Windows. Alternatively you can try WUBI as pointed out by kendong2 here
Using the kitchen will ensure that your customised ROM is signed - Amon RA requires signed update.zips, I think there was something called Clockwork Recovery which doesn't need the package to be signed.
TheAshMan said:
dsixda's kitchen will let you pretty much cook and modify any ROM.
I wouldn't use the root function on there, but if you look at the No Idea Blog link on the first page of that thread it tells you how to add root permissions if your ROM doesn't already have them (it's really easy).
Also, if you're on Windows and don't like the fact that you can't use the kitchen to its full potential, you can download a copy of Ubuntu Linux and VirtualBox (both free) and run Ubuntu as a virtual machine within Windows. Alternatively you can try WUBI as pointed out by kendong2 here
Using the kitchen will ensure that your customised ROM is signed - Amon RA requires signed update.zips, I think there was something called Clockwork Recovery which doesn't need the package to be signed.
Click to expand...
Click to collapse
Thanks, I'v already managed to add root myself a few times to various ROMs so i don't think that'll be an issue.
Does the ROM need to be re-signed on each modification? Which is why I wouldnt be able to edit it manually?
Thanks again.
EDIT: I have no problem running linux, infact I have Ubuntu on my laptop and will install Fedora 12 on my desktop now.
alias_neo said:
Thanks, I'v already managed to add root myself a few times to various ROMs so i don't think that'll be an issue.
Does the ROM need to be re-signed on each modification? Which is why I wouldnt be able to edit it manually?
Thanks again.
EDIT: It would seem I need to be running a linux OS to do this properly, is that correct? If so, I better start setting up something on a spare harddrive in my PC or get my laptop out.
Click to expand...
Click to collapse
yes resign after every update. just unpack, modify, repack and resign. not that complicated if you get yourself some handy scripts (write them or use dsixdas kitchen).
kendong2 said:
yes resign after every update. just unpack, modify, repack and resign. not that complicated if you get yourself some handy scripts (write them or use dsixdas kitchen).
Click to expand...
Click to collapse
So for my working folder I extract (for example) lox's clean ROM update.zip?
alias_neo said:
Thanks, I'v already managed to add root myself a few times to various ROMs so i don't think that'll be an issue.
Does the ROM need to be re-signed on each modification? Which is why I wouldnt be able to edit it manually?
Thanks again.
EDIT: It would seem I need to be running a linux OS to do this properly, is that correct? If so, I better start setting up something on a spare harddrive in my PC or get my laptop out.
Click to expand...
Click to collapse
As far as I know yeah (unless you're using that other recovery image I mentioned). It's pretty easy with the kitchen - press 9 and it cooks the ROM. Takes about 2-3 minutes for each bake - its flashing the ROM that takes ages.
You could sign manually, I'm sure I found a tutorial on how to do that when I was modifying some apps.
It works fine on OSX too. If you read the first post, he does say some things won't work on Windows. Like I said, you could use VirtualBox or WUBU which will save you the hassle of extra hardrives, partitions, dual-booting and all that.
Q
Ok, got the kitchen open under linux now, first question is this, the ROM i'm using doesn't have a system.img, it has a folder "system" so it naturally won't let me continue in the kitchen without it, how do I solve this problem?
Thanks.
To customise an existing ROM, extracts all its contents.
In the kitchen make a folder starting with "WORKING_" the underscore can be followed by any name of your choice e.g. WORKING_ALIASNEOROM
Inside that folder paste the boot.img, system, META-INF and data (if its there) folders from the ROM you extracted.
Inside the META-INF folder delete the 3 files - just leave the com folder.
After that you should be good to go with the ROM.
TheAshMan said:
To customise an existing ROM, extracts all its contents.
In the kitchen make a folder starting with "WORKING_" the underscore can be followed by any name of your choice e.g. WORKING_ALIASNEOROM
Inside that folder paste the boot.img, system, META-INF and data (if its there) folders from the ROM you extracted.
Inside the META-INF folder delete the 3 files - just leave the com folder.
After that you should be good to go with the ROM.
Click to expand...
Click to collapse
Thanks a lot, really appreciate the help.
One more question, hopefully the final one, when i remove apps or add them to the relevent folder, are permissions and linking taken care of automatically where necessary?
alias_neo said:
Thanks a lot, really appreciate the help.
One more question, hopefully the final one, when i remove apps or add them to the relevent folder, are permissions and linking taken care of automatically where necessary?
Click to expand...
Click to collapse
No problem, I was in your shoes a couple of weeks ago! Yeah, you just copy the apks - worked for me so far.
Most ROMs come with a data/app folder, but incase yours doesn't just create it next to the system, boot.img etc and then in the update-script add:
Code:
delete DATA:app
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
before the format CACHE command.
TheAshMan said:
No problem, I was in your shoes a couple of weeks ago! Yeah, you just copy the apks - worked for me so far.
Most ROMs come with a data/app folder, but incase yours doesn't just create it next to the system, boot.img etc and then in the update-script add:
Code:
delete DATA:app
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
before the format CACHE command.
Click to expand...
Click to collapse
and make that
Code:
set_perm 1000 1000 0771 0771 DATA:app
for eclair roms...
TheAshMan said:
No problem, I was in your shoes a couple of weeks ago! Yeah, you just copy the apks - worked for me so far.
Most ROMs come with a data/app folder, but incase yours doesn't just create it next to the system, boot.img etc and then in the update-script add:
Code:
delete DATA:app
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
before the format CACHE command.
Click to expand...
Click to collapse
Where can I find the syntax for this file? I like to understand the commands so I can use them properly, i get that set_perm is setting permissions and 0771 are the permissions being set, but what are the "1000 1000"?
Google wasn't my friend this time and I couldn't find a syntax.
Have a look in here, I've not got enough Linux experience to tell you how those permissions work. I update that file by comparing ones from other ROMs and slowly got the hang of it.
Cool
TheAshMan said:
Have a look in here, I've not got enough Linux experience to tell you how those permissions work. I update that file by comparing ones from other ROMs and slowly got the hang of it.
Click to expand...
Click to collapse
Exactly what I was looking for, thanks.
Just failed two flashes because of:
1) because i conned the kitchen into setting up the working folder (by putting a fake system.img) it didn't delete the symlinks so i had to do it manualy (after trying to flash then figuring out why it failed) and
2) it couldnt chmod "su" because it didn't exist, strange since i was working based on an existing ROM and didn't delete the "su" binary.
Question: How and where do I change the build name that shows up on the device to my own name?
EDIT: 3rd flash was successful but on boot it hangs at the HERO screen, logcat just says "waiting for device". Ideas?
TheAshMan said:
No problem, I was in your shoes a couple of weeks ago! Yeah, you just copy the apks - worked for me so far.
Most ROMs come with a data/app folder, but incase yours doesn't just create it next to the system, boot.img etc and then in the update-script add:
Code:
delete DATA:app
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
before the format CACHE command.
Click to expand...
Click to collapse
This is useful info, thanks. I might add this as an option to the kitchen in the future.
alias_neo said:
Exactly what I was looking for, thanks.
Just failed two flashes because of:
1) because i conned the kitchen into setting up the working folder (by putting a fake system.img) it didn't delete the symlinks so i had to do it manualy (after trying to flash then figuring out why it failed) and
2) it couldnt chmod "su" because it didn't exist, strange since i was working based on an existing ROM and didn't delete the "su" binary.
Click to expand...
Click to collapse
Someone's custom ROM may have it someplace else. My kitchen was mainly designed for new cooks making their own ROMs from the stock ROMs.
Question: How and where do I change the build name that shows up on the device to my own name?
Click to expand...
Click to collapse
I think it's in the build.prop. Just compare the field values with what you see on your phone right now for the build name.
dsixda said:
Someone's custom ROM may have it someplace else. My kitchen was mainly designed for new cooks making their own ROMs from the stock ROMs.
Click to expand...
Click to collapse
That's what I don't get, the update-script isn't edited by the kitchen right? But the chmod command in the update-script was from the same ROM, so surely it's "su" binary should be in the same place the update-script looks for it, or am i missing something?
I think it's in the build.prop. Just compare the field values with what you see on your phone right now for the build name.
Click to expand...
Click to collapse
Thanks, I'v given it a go, will see what happens if/when i get a successful flash.
As for your adding that info from Ash to your kitch, I think it would be useful because I forgot the last line (setting permissions) and it just caused my ROM to hang on boot, reflashing now and hoping adding it was the fix. Will update this post once complete.
UPDATE: Still hangs on boot even with that line added. Where do I go from here in debugging since I can't get logcat?
alias_neo said:
Exactly what I was looking for, thanks.
Just failed two flashes because of:
1) because i conned the kitchen into setting up the working folder (by putting a fake system.img) it didn't delete the symlinks so i had to do it manualy (after trying to flash then figuring out why it failed) and
2) it couldnt chmod "su" because it didn't exist, strange since i was working based on an existing ROM and didn't delete the "su" binary.
Question: How and where do I change the build name that shows up on the device to my own name?
EDIT: 3rd flash was successful but on boot it hangs at the HERO screen, logcat just says "waiting for device". Ideas?
Click to expand...
Click to collapse
If you used my instructions about the WORKING folder earlier, then you don't need to use option #1 in the kitchen to setup working folder - that's only if you're working with stock images. The result of that command is a WORKING folder - which you already have by extracting the files and making that folder manually.
dsixda said:
This is useful info, thanks. I might add this as an option to the kitchen in the future.
Click to expand...
Click to collapse
Happy to help! You know you've done a great job with that kitchen, and got me started with ROMs,
dsixda said:
Someone's custom ROM may have it someplace else. My kitchen was mainly designed for new cooks making their own ROMs from the stock ROMs.
Click to expand...
Click to collapse
Yup, I built my 1.5 ROM using a stock ROM, but a 2.1 based on BeHero.
kendong2 said:
and make that
Code:
set_perm 1000 1000 0771 0771 DATA:app
for eclair roms...
Click to expand...
Click to collapse
sorry i was misled about that. it is
Code:
set_perm 1000 1000 0771 DATA:app
for eclair aswell. i am confused about this myself somewhat, have you checked the android documentation?
kendong2 said:
sorry i was misled about that. it is
Code:
set_perm 1000 1000 0771 DATA:app
for eclair aswell. i am confused about this myself somewhat, have you checked the android documentation?
Click to expand...
Click to collapse
You only need the permission twice if its for the recursive set, because the first is the directory and the second is it's contents.... or so I believe.
Hi im working on creating some boot animations. Ive got the files ready, but i cant figure out how to put them into a flashable .zip.
I flashed this file thunderbolt boot animation and it worked so i figured if i just replaced my animation and audio it would work but i get an error saying "e:update script not found" or something along those lines.
Id like to know if there is an easy way to create a "template" were i just copy my animation into a folder and zip it, or if there is a program that will package it for me including the script/etc.
Any input or guide on how to make these boot animations flashable .zip's would be great, thanks.
Eat it iPhone said:
Hi im working on creating some boot animations. Ive got the files ready, but i cant figure out how to put them into a flashable .zip.
I flashed this file thunderbolt boot animation and it worked so i figured if i just replaced my animation and audio it would work but i get an error saying "e:update script not found" or something along those lines.
Id like to know if there is an easy way to create a "template" were i just copy my animation into a folder and zip it, or if there is a program that will package it for me including the script/etc.
Any input or guide on how to make these boot animations flashable .zip's would be great, thanks.
Click to expand...
Click to collapse
Thats weird it didn't work. Should. Maybe it wasn't re-packaged correctly.
Try the one attached.
CCallahan said:
Thats weird it didn't work. Should. Maybe it wasn't re-packaged correctly.
Try the one attached.
Click to expand...
Click to collapse
Thanks ill try it out, just dont have the time right now.
If you cant figure it out i'll give you a guide tomorrow when i'm off my iPad .
did you rezip it correctly?
I ran into this trouble, I forget what it is, but you have to zip the files a certain way or they will not work. I don't remember the settings anymore, but just creating a regular zip file won't work.
There is a good guide to making your own update script on xda somewhere. Just search the entire site. If i'm just flashing something simple like a theme or boot animation sometimes I just use someone else's flashable zip and replace the necessary files. I can't remember off the top of my head, but iirc there are two folders you want to keep from someone else's zip. Meta-inf which is basically the signature files and something else which contains the script. If you dissect someone's zip it should be obvious what the other folder you want to keep is. You will find the update script in one of the sub folders, and if you want you can open it with a text editor and get an idea of how the script works.
If you need more info I can help you more when I get to my computer.
Sent from my PC36100 using XDA App
dkdude36 said:
If you cant figure it out i'll give you a guide tomorrow when i'm off my iPad .
Click to expand...
Click to collapse
Id appreciate a guide either way, id rather learn to do it myself than use someone else's. No rush as i cant really approach this til the weekend.
Eat it iPhone said:
Id appreciate a guide either way, id rather learn to do it myself than use someone else's. No rush as i cant really approach this til the weekend.
Click to expand...
Click to collapse
ok, here it goes.
first, figure out where you want to push your file. i'd reccomend pushing manually in recovery to make sure the file itself works. then, using a tool like 7zip (pc) or betterzip (mac) create a file structure that matches the one on the phone. for example, if you wanted a boot animation to be put in system/customize/resource, make a folder system, customize in that, resource in that, and the bootanimation.zip inside that. now you have the main part. next, make a folder in the root of the zip called META-INF (caps counts) inside that, com, inside that, google, and inside that, android. thats /META-INF/com/google/android/. inside android, you need to place in an update-script. i'd reccomend taking one from another zip and just editing it becasue i still have not figured out a way to make that type of file (unix exec) from scratch. open it up in a .txt editor like notepad++ (pc) or coda (mac) and write your script. here is the baisic script for copying the directory system on the zip to system on the phone (like flashing a boot animation).
copy_dir PACKAGE:system SYSTEM:
CAPS COUNT AND MAKE SURE YOU HAVE AN ENTER AT THE END. IF YOU DO NOT HAVE AN ENTER AT THE END (TO MAKE IT TWO LINES INSTEAD OF ONE, LIKE ISSUEING A COMMAND) THEN IT WILL NOT WORK AT ALL ( E:SYNTAX ERROR IN UPDATE-SCRIPT IS THE ERROR YOU WILL GET)
so put this file into the folder android, and zip it. make sure it is in store only, compatibility mode, if you have such options. then, use an auto signer (or just say zip is not signed and make sure to put sig verification off) to sign the zip. flash, and watch your work magically appear.
the update-script i showed is written in amend. i have no idea how to write in edify bcuz it is much more complicated with the binary and stuff. so dont flash with cwm 3.0+.
good luck. ask if you have any questions.
hello will this methed work on like adding some personal apps you want to be on your rom?
'K, so'm new 2 android hacking, but I'd like 2 make a framework-res.apk that includes StarBurst's MotoBlur x-itions here, SAShady's CRT Off animation here, & Gingerbread's Overscroll & MotoBlur Orient8ion animations when they become available. How would I go about merging the MotoBlur x-itions w/ the CRT Off animation, as they're both framework-res.apk files? Also, where mite I extract Gingerbread's Overscroll & MotoBlur Orient8ion files, is it from a stock Gingerbread framework-res.apk & MotoBlur (possibly Photon 4G) framework-res.apk? &, how would I know which files 2 extract? Are there any particular s/w tools that I need?
Thnx.
That's going to be a bit of work. I just went through the learning process of decompiling, modifying, and recompiling .apks myself. I don't have the most efficient method down yet, but I can get you started.
First up, are you using an odexed or deodexed ROM?
Thnx 4 the help.
Sycobob said:
...I just went through the learning process of decompiling, modifying, and recompiling .apks...
Click to expand...
Click to collapse
I'd really dig a link(s) to these resources. &, I'd b usin' the Stock ROM, which I'd imagine is odex'd.
EDIT: Man do I feel foolish. I just typed out way more than I needed to, thinking framework-res.apk was odexed. *sigh*. Oh well, I guess I just started the tutorial I was thinking about posting.
This won't be too hard:
Pull your stock framework-res.apk from /system/framework/.
Gather the other modded .apks
Decompile each of the .apks (luckily framework-res.apk doesn't rely on other stuff, so decompiling is easier)
Drag the modified file(s) from one of the decompiled, modded .apks to the stock one overwriting the old file(s)
Repeat for each mod
Recompile the new uber-modded .apk
Push it back onto your phone
Decompiling
You're going to need Apk Manager for decompiling and recompiling.
Place the .apks you want to decompile in the 'to be modded' folder of Apk manager
Run the script in the Apk Manager folder
Enter 22 to 'Set Current Project'
Pick the .apk you want to decompile
Enter 9 to decompile (no dependencies)
Repeat 3-5 for each .apk
Recompiling
(In Apk Manager) Enter 22 to 'Set Current Project'
Enter 11 to compile
Enter y (this is a system app)
Enter y (I haven't been able to get it to work when I answer no here)
Follow the prompt and delete the files you've modified from the 'keep' folder
Go back to the command prompt and press a key to continue
As for actually finding the changes, you're on your own here. I guess you can look for files with different sizes/modified dates or try to search the forums to see if people mention what they had to change for the mod. If two mods change the same file, you're going to have to open the file and make both sets of changes then toss it into the .apk.
Pro tip: if you have Eclipse set up with the Android SDK, you can go to Window > Preferences > XML > XML Files > Editor and check "Split multiple attributes each on a new line" so that when you hit Ctrl+Shift+F while looking at the messy decompiled .xmls it will instantly format it into a more easily read form. <--This is why I love Eclipse
If you don't know how to push the file back into place, it's a bit of a pain without a modded boot.img that allows you to use 'adb remount'. Copy the .apk somewhere on your phone. From command prompt (with phone plugged in):
Code:
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /wherever/your/file/is/framework-res.apk /system/framework-res.apk
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
reboot
Unless you have CWM and know how to write/reuse an update.zip.
Thnx, Sycobob. I'm just afraid that there'll be an overlap in overwritten files. But'll c.
Sycobob said:
...and updating the archive...ext3
Click to expand...
Click to collapse
&, what d'ya mean by upd8ing the archive, is it signing? Also, I'd thought all of the E4GT partitions were ext4. Didn't even activ8 my E4GT, 'cause'm still tryin' 2 get my TP2 repaired, so I can flip it. Maybe u can help me w/ another Q - I've been lookin' all ovr 4 info on android OS, &'ve been able 2 find what each partition is, using adb cmds, but cannot find, 4 the life of me!, a glossary of sorts on all of androids system files, a la "framework-res.apk is..." I really wanna get n2 android hacking/modding w/o havin' 2 use an app 2 make any & every change that I'd wanna make 2 the OS. Comin' from WiMo, I was very familiar w/ the registry, exploring & hacking it, but there's no real equivalent n android. Also, do go here & vote 4 my Brushed Aluminum Barely There Case with Kickstand suggestion. We're already n 9th place. Thnx again 4 ur help.
System packages don't get signed. By updating, I mean dragging the file into the WinRAR archive which automatically replaces the existing file in the archive, therefor updating it.
All the partitions are ext4. This is where my newbishness shows, I have no idea why I have to use ext3. /dev/block/mmcblk1p21 isn't the correct path either, but it works. In one of ptfdmedics posts he uses the same options. If I use the 'correct' mount -o rw,remount -t ext4 /dev/block/mmcblk0p9 /system it doesn't work. *shrug*
Also, I just realized something I missed in my first post. If you modify an .xml the resources.arsc in the .apk needs to be regenerated. This is done when you decompile and recompile the package. I'll be editing my previous post to reflect this.
As far as a glossary, I have no idea where to find one. I would mind having access to something like that though. If you find something, please post it.
EDIT: don't worry too much about overlap. I'd imagine it'll be easy to find the changes you need to make, then you can just copy+paste the relevant lines. Pro tip: if you have Eclipse set up with the Android SDK, somewhere in Window > Preferences > XML > XML Files > Editor > Check "Split multiple attributes each on a new line" and when you hit Ctrl+Shift+F while looking at the messy decompiled .xmls it will instantly format it into a more easily read form. Adding this to previous post.
Thnx, 4 all of ur help. I've got a lotta wrk ahead of me 2 experiment w/ this stuff. Now, just gotta find the time.
I think every body should have the source to information so they can better understand what they are messing with... why waste time waiting and begging for food when you can learn to cook for yourself?! ... so here is my tutorial on breaking down CyanogenMod9 on the Acer A100( although most of this should be a general guideline to most roms) ***** I am not responsible for you breaking your stuff nor responsible what you do with this information... you have been warned! u can soft brick your tab in a heartbeat***
okay so there are countless tutorials on how to build a ROM from source... just google it.. but some ppl obviously don't have the need to spend the hours compiling because there is already a build for the ROM that they like... but on the other hand they want to add some mods and tweaks to the zip before flashing to tweak the tab to how they want it... after all it is your device and your the one that uses it most so why wouldn't you want personalized tweaks... and theres only one way to learn.. trial and error! haha but hopefully this guide will help you grasp some basic to advanced Android tweaks and mods ... again this tutorial is written for CM9 for the acer a100 but the "general" idea is about the same on the basic stuff... this tutorial is written by me from many sources too many to name but thanks for all the tutorials or I wouldn't know a lot of what I know about Android... This guide is for Ubuntu 12.04... but I would assume 10.04+ it would be compatible but don't quote me on that as I don't know so its your fault if you f* something up!!!!
First off you have your cm9.zip... its simply a zipped archive.. dur... sometimes a signed zip.. now you can simply open nautilus file explorer and go to your .zip and extract it with archive manager.. I suggest when the dialog comes up as where to extract the files that you click make a new folder and name it extractedCM9 and let it extract... okay not so hard quite yet 'eh?.. hang in there it gets a lot better ... you should now have a folder named extractedCM9 with some files in it... copy the extractedCM9 folder and paste it into the same directory that your copying from... rename the folder tweaked then cut and past that folder into extractedCM9... next open the extracted CM9... you should see the following: META-INF(a directory), system(a directory), and boot.img( this holds your initrd which is your "ramdisk", your zImage which is your kernal, and on extracting you'll also find a boot.cfg... we will get to extracting the boot image latter.. stick with the easier things to get us going!... now create another directory called stock .. you should now have the following... META-INF/(a directory), system/(a directory), stock/(a directory), tweaked(a directory), and boot.img.. okay a little more copying and pasting.. all this will be used later so if following this tutorial all the way throu you should do as instructed lol... CUT META-INF/, system/, and boot.img and paste it into stock.. you should be left with the two directories tweaked/ and stock/ both having extracted CM9 in them go into your tweaked/ directory and lets begin.... so some of the things you can tweak just from a simple extraction of the zip are as follows...
You can edit your /system directory and make tweaks as needed before ever installing the rom! .. just some of the things held in /system is the boot animation and it can be found at /system/media/bootanimation.zip its also a simple zip composed of images to be ran concurrent to appear as a single animation.. the resolution for the a100 boot animation is 1024x600 and a simple google search for either a100 custom boot animations or basically any low-def 1024x600 boot animation should work simply delete the existing bootanimation and copy the new one in its place.. remember NO MATTER WHAT THE DOWNLOAD FILE NAME is you MUST rename it to be bootanimation.zip or it wont work( I say should because I obviously have not tried every boot animation and I know there is a limit to the size for the acer animation so sticking with <6mb bootanimations should be just fine).. now if you decide to go further and extract the cm9 boot animation you will find part0( a directory), part1( a directory) and desc.txt.. the part0 and part1 directories hold the images that are to be ran and desc.txt simply states the resolution and then below that it list the directories that are included in the zip... part01 will be ran before part02.. for the novice I recommend just sticking to finding cool bootanimations already zipped for our resolution that some has posted for download so you can simply copy and past!...
also in system/media/ you will find a directory named audio.. dive into that and you find where the default sounds(aka ringtones, notifacations) that are stored for your fresh rom go back up a directory to system/media/ again and you'll see the video.. those are just some mp4's stored for the ROM.... that about it for editing in media.. lets recap.. you can basically edit/ change your boot animation and the default ringtones and notification sounds in /system/media... lets move back up to /system..
from /system you see another directory user/ ... lets go in there for a second.. what do we find.. MORE directories of course lol.. what else would we find... keychars( a directory) and keylayout( a directory) contain your configuration files for the input keys.. you can find things for the way game controllers and keyboards input are handled and what codes on keypresses.. now for our device if you proceed into keylayout/ (system/usr/keylayout/) you will see a file called gpio-keys.kl right clicking on that file and selecting open with and choosing gedit will bring up the file and you will see someything like
key 136 SEARCH WAKE_DROPPED
key 139 MENU WAKE
key 102 HOME
... and so on.....
these are what your hardware buttons do.. basically to explain whats going on is the key ### is the hardwired part... the SEARCH or MENU or what ever action you see is simply that.. an action to be called... and the WAKE_DROPPED and WAKE... well to be honest I'm not for sure what those do lol I assume having WAKE associated with a key would wake the device when pressed.. not for sure on that one thou haven't tried it.. but a quick google search and you can find list of commands that you can choose from.. one of them is being the command to call the camera.. so in essence you could bind any of your hardware keys to the camera function and it would open the camera... my little tweak to this file is to completely disable the HARDWARE HOME KEY... the only key on the front of our devices.. now I have seen some tutorials no disabling it by changing the...
key 102 HOME
... to ...
key 102 UKNOWN
... my problem with that is it does seem to disable the key.. sorta.. and what I mean by that is when you are in certain apps it will trigger the select/ hover action like if you were using a keyboard... so to completely disable it where it will call NO action simply DELETE that line! change ..
key 102 HOME
... to ...
... lol just delete that line out of the file and save it... voila! no more hitting it on mistake while playing a game or browser or w.e it is your doing *** note that this will not disable the light on the button.. it will still flash for notifications and the like...
alright once you have that saved you can exit out of gedit and go back to nautilus showing your extracted cm9 files go up your directory tree until your back in tweaked/ looking at META-INF/, system/, boot.img ... highlight all three of those... right click again and hit compress.. name the file myCM9tweak.zip or w/e you want to call it... make sure .zip is selected in the drop down menu of type of format to compress and compress... once its done you have an unsigned tweaked CM9.zip that if you didn't make any mistakes will boot.. and even if you made mistakes it could possibly boot and you will find your errors as you use it.. now if you just stuck with the simple tweaks I should you above you should be pretty safe and not worry to much about the device not booting.. if it doesn't boot a stock .zip then go back to your tweaked/ folder and try and find out what you did wrong and compress again about try it out! ... okay my fingures are tired of typing so I'm done with the tutorial for tonight.. well I might add more tonight but don't hold me to it... but this tutorial is in NO WAY finished... we are just beginning.. I haven't even showed you how to unpack-edit- and repack your boot.img to swap out kernals and from there extracting your initrd( aka "ramdisk") so you cant edit things at the very core of the ROM... don't be mad if you made the stock/ and tweaked/ directories and are wondering what the hell i had you make two directories of the same crap... just remember this tutorial is at its very begin if you plan on unpacking boot.img's with me then you need to just follow along... for what I have showed you tonight you can do this from windows of course and using notepad instead of gedit... for the advanced stuff sorry your going to need Ubuntu! ...
MORE TO COME...
--more simple system tweaks and mods--
--unpacking-modifying- and repacking boot.img's--
--extracting initrd's( aka "ramdisk") to make edits to the core of your rom and of course repacking them--
I hope someone finds some kind of useful information out of this.. tonight was pretty basic stuff but theres a lot more coming... including but not limited to a whole bunch of command prompt!
*~ENJOY~*
(please excuse any typo's.. I don't think theres any where it count's ..)
This is the guide I wish I had read the day I rooted, you rock man!
sent from your future.