writing update-script file - Hero CDMA Android Development

I would like to copy additional files into the /data/app/ folder with an update.zip file. My script will successfully add to /system/app/ folder but not /data/app/. I've seen code to delete and then add a whole new /data/app/ folder but I would like to keep whatever is in there already, just add and remove specific files in it. This is what I've been using but it fails. Can this be done?
Code:
show_progress 0.200000 0
delete DATA:app/com.facebook.katana.apk
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app

diordnahero said:
I would like to copy additional files into the /data/app/ folder with an update.zip file. My script will successfully add to /system/app/ folder but not /data/app/. I've seen code to delete and then add a whole new /data/app/ folder but I would like to keep whatever is in there already, just add and remove specific files in it. This is what I've been using but it fails. Can this be done?
Code:
show_progress 0.200000 0
delete DATA:app/com.facebook.katana.apk
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
Click to expand...
Click to collapse
While not necessarily my forte, do you happen to be running apps2sd? My guess is that the partition on the SD card hasn't mounted yet, and thus, the file(s) can't be accessed to delete.

yes I am.
Though my update script works to write and delete to /system/.. folders just fine. The update-script files I have looked at delete the whole folder first and then create/copy the new one, then correct permissions. I can't find anything specific to delete/adding individual files though.

diordnahero said:
yes I am.
Though my update script works to write and delete to /system/.. folders just fine. The update-script files I have looked at delete the whole folder first and then create/copy the new one, then correct permissions. I can't find anything specific to delete/adding individual files though.
Click to expand...
Click to collapse
The system folder is not part of apps2sd, so that would make sense.
I'm still thinking this is your issue. I'm wondering if there is a way to mount via an update script?

JsChiSurf said:
The system folder is not part of apps2sd, so that would make sense.
I'm still thinking this is your issue. I'm wondering if there is a way to mount via an update script?
Click to expand...
Click to collapse
I dont think mounting via an update script is possible but you could write a script to do it kinda like Cyanogen's backup script that mounts the sdcard when in recovery to do a backup of google ****s.

zippy-man said:
I dont think mounting via an update script is possible but you could write a script to do it kinda like Cyanogen's backup script that mounts the sdcard when in recovery to do a backup of google ****s.
Click to expand...
Click to collapse
I saw this syntax referenced in another thread, that you can use in an update script:
run_program PACKAGE:script.sh
I'm assuming this is what Cyanogen is doing?
That's pretty cool. So, moral of the story, you can create a little shell script that runs during the update process that will mount the necessary partition, and move / add / delete files as necessary.
Actually makes it nicer, as you can write your entire update as a shell script rather than using the standard update script lingo, which may be less familiar...

JsChiSurf said:
I saw this syntax referenced in another thread, that you can use in an update script:
run_program PACKAGE:script.sh
I'm assuming this is what Cyanogen is doing?
That's pretty cool. So, moral of the story, you can create a little shell script that runs during the update process that will mount the necessary partition, and move / add / delete files as necessary.
Actually makes it nicer, as you can write your entire update as a shell script rather than using the standard update script lingo, which may be less familiar...
Click to expand...
Click to collapse
yup, I've done that before. Very handy. that'll get the job done

I dont think mounting via an update script is possible but you could write a script to do it kinda like Cyanogen's backup script that mounts the sdcar
Click to expand...
Click to collapse
I saw this syntax referenced in another thread, that you can use in an update script:
run_program PACKAGE:script.sh
I'm assuming this is what Cyanogen is doing?
That's pretty cool. So, moral of the story, you can create a little shell script that runs during the update process that will mount the necessary partition, and move / add / delete files as necessary.
Actually makes it nicer, as you can write your entire update as a shell script rather than using the standard update script lingo, which may be less familiar...
Click to expand...
Click to collapse
Yep. You just create whatever script you want and add that to the update script and it will run it. I have used it for many things but have not used a script to mount the sd card.
If you get a hold of the script that cm wrote you could pull out the party that mounts the sd card and use that to write to data if it its located on the sd card.
-------------------------------------
Sent from my HTC Hero

Awsome! Great stuff.
I found this but have not tried it yet as there hasn't been need to update anything lately.

Related

How to create update script

I dont know how to create update script till now i used to edit some ones update script so i need a tutorial on making update script...
Update script? if you are asking for what I think you are you need to learn bash scripting. If not, you should clarify what you want when asking a question.
I think perhaps he means themes? If so, use the search key
Darkrift said:
Update script? if you are asking for what I think you are you need to learn bash scripting. If not, you should clarify what you want when asking a question.
Click to expand...
Click to collapse
If you're thinking what I'm thinking that you are thinking about what he is thinking..
the update-script file in an update.zip isn't a bash script . It sorta looks like one, but it actually contains commands that are interpreted by the recovery program.
sangeet.003 said:
I dont know how to create update script till now i used to edit some ones update script so i need a tutorial on making update script...
Click to expand...
Click to collapse
Assuming you mean update-script in an update.zip update, you will need to either look at existing update-script files for an example of the syntax, or look at the source of the recovery program in the android source
Thanks JesusFreke U got my point...
Bump
I too would like info on this. I'm wondering if its at all possible to alter the update script to install 3rd party apps into /data/app and /data/app-private. I've tried placing 3rd party apps into one of the Dude's roms(i think, can.'t remember exactly which rom it was), but I didn't install my 3rd party app. Yes, I did resign the update.
So if someone could help me with this, i would be really grateful. I'd like to make one script to load just /data and another to be included with my usual update.zip's.
I really enjoy the fact that my phone is so customizable, but those 3rd party apps make my custom themes sooooo ugly. i don't mind taking the time to pull apps and theme them, but reinstalling them is a pain. I know there is a windows utility for reinstalling apps, but I'd rather just flash /data.... is this even possible?
Anywho, if any of you "smart" guys around here could help me with this, I would be such a happy droid.
jonnybueno said:
I too would like info on this. I'm wondering if its at all possible to alter the update script to install 3rd party apps into /data/app and /data/app-private. I've tried placing 3rd party apps into one of the Dude's roms(i think, can.'t remember exactly which rom it was), but I didn't install my 3rd party app. Yes, I did resign the update.
So if someone could help me with this, i would be really grateful. I'd like to make one script to load just /data and another to be included with my usual update.zip's.
I really enjoy the fact that my phone is so customizable, but those 3rd party apps make my custom themes sooooo ugly. i don't mind taking the time to pull apps and theme them, but reinstalling them is a pain. I know there is a windows utility for reinstalling apps, but I'd rather just flash /data.... is this even possible?
Anywho, if any of you "smart" guys around here could help me with this, I would be such a happy droid.
Click to expand...
Click to collapse
update-script can put things into data, yes. Just create a data folder in your zip file and include the relevant lines in the script:
copy_dir PACKAGE:system SYSTEM:
copy_dir PACKAGE:data DATA:
Thank you! you sir, are a kind person. I will try this tonight and report my findings afterward!
bringing this thread back from the dead. I need help, if somebody could point to how to use set_permission and why all the symlinking toolbox and busybox (i understand busybox is not part of the regular android package) to other tools already in bin. Also, maybe pointers of what the tools in bin do and if i could remove them after including busybox since they're already in busybox anyway
how about removing a file?
would it be 'remove system:app:mms.apk'
would that work?
gwydionwaters said:
how about removing a file?
would it be 'remove system:app:mms.apk'
would that work?
Click to expand...
Click to collapse
Nope but I think
"delete SYSTEM:app/Mms.apk"
update-script
gwydionwaters said:
how about removing a file?
would it be 'remove system:app:mms.apk'
would that work?
Click to expand...
Click to collapse
what he said:
delete SYSTEM:app/Mms.apk
delete SYSTEM:app/Mms.odex
if you're really interested just grab any ROM available on xda and started learning the commands .. it's really rather simplistic
right on, thanks guys. i'll download some other roms as well and have a look through.
Maybe someone can halp me with correct command for sript. I need to copy one file (for example photo.ipg) into ext (root) partition whilst flshing update.zip. Files is in update.zip/photo.jpg. I have try put it into system/sd, but after flash files wont copy.
im trying remove certain apps from /data/app then install other apps on the /system/app
but im having trouble in removing apps from /data/app
mount("MTD", "data", "/data");
delete("/data/app/someapp.apk"); ?? not sure about deleting apps, i think this is wrong.
unmount("/data");
Is that the even the correct way to mount it? because that works with the /system
Any help would be greatly appreciated.
Ubuntu only
Wrong section btw, just have to say it. I am on Ubuntu 10.04 LTS and I just use terminal:
Code:
gedit update-script
Once you do that your newly created file will pop up, the put what ever you want in it and save it. The file will be in your home folder. this is what mine looks like:
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
Then create these folders, each one inside of the other:
Code:
META-INF
root of update zip >
Code:
com
>
Code:
google
>
Code:
android
Then place your update-script in the android folder, and also create the system or data folder in root of update.zip
If it's not compressed into a zip file already than you will need to select all the folders, right click and select compress, then compress as zip. After compressing into zip you will need to sign it. I'm not going to get into signing and all that because there is tons of info on xda for signing roms
in other thread and if someone still looking:
update-script syntax - A guide for ROM devs, modders, and themers
Code:
http://forum.xda-developers.com/showthread.php?t=641223
Thanks to TylTru for the gift
hey!, I have a problem when I try to flash the update.zip (AOSP compiled for HTC Desire), I get the following error:
E: Can't chown/mod /system/keyspa.sh
(No such file or directory)
E:Failure at line 14:
set_perm 0 0 06755 SYSTEM:keyspa.sh
Installation aborted
anybody knows the reason?
Thanks in advance..
jm0077 said:
hey!, I have a problem when I try to flash the update.zip (AOSP compiled for HTC Desire), I get the following error:
E: Can't chown/mod /system/keyspa.sh
(No such file or directory)
E:Failure at line 14:
set_perm 0 0 06755 SYSTEM:keyspa.sh
Installation aborted
anybody knows the reason?
Thanks in advance..
Click to expand...
Click to collapse
does /system/keyspa.sh exist?

Compcache userinit.sh tutorial for Cyanogen 367

Here is a simple tutorial to get compcache ramswap running on the new Cyanogen 3.6.7 rom. Thanks to Cyanogen we now have a functioning swap that is fast and will not cause SSD wear.
Please make sure you have adb installed and functioning before you continue, as this tutorial will utilize adb to push the required files to the phone. Also your sd card should have a 500megish ext(2,3,4) partition as the second partition for this to work.
Download the userinit.sh.txt file attached here then:
Rename it to userinit.sh
create a directory c:\userinit
copy userinit.sh to c:\userinit
open CMD prompt
adb push c:\userinit\userinit.sh /system/sd
adb shell chmod 755 /system/sd/userinit.sh (not sure if needed being safe)
adb shell reboot
( This completes the compcache setup )
++++++++++++++++++++++++++++++++++++++++++++
To see if it is working enter: cat /proc/ramzswap in the terminal console app on the phone. You should have a XX% GoodCompress listed if it is working properly.
Hope this helps a bit. Please correct me if I made mistakes.
edit: re-uploaded the script with swappiness set to 60. You can re-push the new one the same way.
edit: removed media info from post and userinit.sh to simplify things.
edit: the following may help for those unable to get adb working. Make sure you place userinit.sh on the root of your sd (fat32 partition)
in terminal emulator:
su
mount -o remount,rw /dev/block/mtdblock3 /system
cp /sdcard/userinit.sh /system/sd
chmod 755 /system/sd/userinit.sh
thanks...very helpful tuttorial
Just did the audio push and it moved all 3 folders
Does this mean we no longer need the linux swap partition?
DOHCtor said:
Does this mean we no longer need the linux swap partition?
Click to expand...
Click to collapse
It is no longer needed. Compcache should work better, but time will tell I guess.
bkmo said:
It is no longer needed. Compcache should work better, but time will tell I guess.
Click to expand...
Click to collapse
I'll just leave my linux swap partition there for now then.
I notice when I run #free it shows total swap size around 24mb. With the linux swap, I get 32mb.
P_Dub_S said:
Just did the audio push and it moved all 3 folders
Click to expand...
Click to collapse
so you are saying on your sd card you now have:
/system/sd/media with subfolders of ringtones, alarms, notifications, ui ?
thanks for the tutorial
thanks for the tutorial. one questions remains. how do we disable the sd-swap?
Thank you so much for this. Seems to be working perfectly on 3.6.7.1. Cheers!
DOHCtor said:
I'll just leave my linux swap partition there for now then.
I notice when I run #free it shows total swap size around 24mb. With the linux swap, I get 32mb.
Click to expand...
Click to collapse
Good, it is working fine then. I believe that the 24mb is pre-compiled by Cyanogen and is not user configurable right now.
endolin said:
thanks for the tutorial. one questions remains. how do we disable the sd-swap?
Click to expand...
Click to collapse
if you used the attached userinit.sh then it is not enabled. The partition is now unused. You now will not be wearing down your sd with swap.
I just looked into your userinit.sh file. There's a line in there that seems to remove the media files from the phone memory. Why would you do that?
DOHCtor said:
I just looked into your userinit.sh file. There's a line in there that seems to remove the media files from the phone memory. Why would you do that?
Click to expand...
Click to collapse
I didn't write the initial script so I can only speculate that it is clearing the directory that the os is looking in before linking it to the sd. I really have not pondered on it. It has been working fine on my phone ever since I implemented it though.
bkmo said:
so you are saying on your sd card you now have:
/system/sd/media with subfolders of ringtones, alarms, notifications, ui ?
Click to expand...
Click to collapse
I just checked and no they didn't get created but the cmd prompt showed all the files being pushed?
In cyans images, the media dir is empty. Its being deleted so it can then be symlinked to the one in the sd dir.
DOHCtor said:
I just looked into your userinit.sh file. There's a line in there that seems to remove the media files from the phone memory. Why would you do that?
Click to expand...
Click to collapse
P_Dub_S said:
I just checked and no they didn't get created but the cmd prompt showed all the files being pushed?
Click to expand...
Click to collapse
Hmm can't debug it now, but will try to get adb running on a windowz box tomorrow. Just don't remove the media files from the fat32 partition until it is proven the files are copied to the sd properly. goodnight all
dwang said:
In cyans images, the media dir is empty. Its being deleted so it can then be symlinked to the one in the sd dir.
Click to expand...
Click to collapse
I know, but doesn't the phone auto search for it in those folders? I use ringdroid and it creates a fold hierarchy just like that already. Is it really neccessary to add the symlinks?
Yes but all those music files show up in the music app which is annoying.
This method gets rid of that problem.
Its not strictly neccessary but I wrote it for that reason
DOHCtor said:
I know, but doesn't the phone auto search for it in those folders? I use ringdroid and it creates a fold hierarchy just like that already. Is it really neccessary to add the symlinks?
Click to expand...
Click to collapse
dwang said:
Yes but all those music files show up in the music app which is annoying.
This method gets rid of that problem.
Its not strictly neccessary but I wrote it for that reason
Click to expand...
Click to collapse
Actually, it doesn't if you put it in the media folder and within the media fold you have other sub folders (ringtone, notification etc.), which ringdroid already creates for you. Like I said, I don't understand the reason to do a symlink for them.
dwang said:
Yes but all those music files show up in the music app which is annoying.
This method gets rid of that problem.
Its not strictly neccessary but I wrote it for that reason
Click to expand...
Click to collapse
Hey, I almost forgot that you wrote it initially. I shared it here because I think it is a much cleaner way of putting the audio on sd. I now dont have to see all this junk in my music library. Great job on the script BTW

Bulk APK Install via Recovery

OK. I have searched the forums for a couple of days and have gotten off to a pretty good start but have hit a roadblock. What I want to do, and from some of the posts I have found, I'm not the only one, is have the ability to take my APKs, stick them in a .zip file and flash them to my phone after a wipe. I know there are other methods of getting APKs on my phone in bulk and I use them so please don't respond with the ten other ways of doing it. Although helpful, it would be off topic. I very specifically want to do this via flashing.
The roadblock mentioned above is the update-script. I have the directory structure down: /data/apps/*.apk and /META-INF/com/google/android/update-script. I use Stericson's signing tool (http://forum.xda-developers.com/showthread.php?t=473580) to sign the .zip. I seem to be having a problem with the update-script. What needs to be in here. I have no problem writing code but have no idea what this is. There is also this post (http://forum.xda-developers.com/showthread.php?t=477646) that sort of got started but never really got finished. I think this would be a huge help to a lot of people other than myself and I'd be glad to write up a HOW-TO once I learn it myself. Best I can get is this last post but it's not the best starting point and doesn't really explain much.
Download an update of a Cyanogen Mod rom and take a look at his update-script as he is already doing what you wan to do (copying apk to /data).
I will look at his update script later but I am pretty sure that I already have. It's hard to know what the relevant parts are because he is doing much more than what I want to do.
This is the update-script
delete DATA:app
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
Must have data folder on the main zip file.
DBeCe said:
This is the update-script
delete DATA:app
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
Must have data folder on the main zip file.
Click to expand...
Click to collapse
This seems to be exactly what I need. One question: what does the "delete" line do? I do not want to delete the data/app dir. There are times when I will also want to add application via this process.
DBeCe said:
This is the update-script
delete DATA:app
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
Must have data folder on the main zip file.
Click to expand...
Click to collapse
OK. I checked the update script I tried yesterday and this is exactly what it had. It did not work. I do not necessarily need a script (it would be nice though). What I really need is someone who knows the scripting used in this file so I can learn to do it myself.
Hi AndroidAppCritic,
This is a very old post, but did you find out what you're looking for? I have the same prob!
Thanks
Dan.
danalive said:
Hi AndroidAppCritic,
This is a very old post, but did you find out what you're looking for? I have the same prob!
Thanks
Dan.
Click to expand...
Click to collapse
I only found this by accident. Wow. This is old. I think I did end up figuring it out but it's completely unnecessary now that Titanium Backup exists. It is, simply put, the most important app I've ever used on Android. It does this but a whole lot better.

Script to remove apks easily when a new ROM is out

I hate having to remove apps everytime I flash a new ROM. So here is what I've done and I'm sure others too.
1) Open notepad in Windows.
2) Add these lines in it:
adb remount
adb shell rm system/app/*Stock*
adb shell rm system/app/IM.apk
adb shell rm system/app/*Facebook*
adb shell rm system/app/Flickr.apk
adb shell rm system/app/Mail.apk
adb shell rm system/app/htcmailwidgets.apk
adb shell rm system/app/Sprint_Navigation.apk
adb shell rm system/app/Sprint_NFL.apk
adb shell rm system/app/Sprint_Nscar.apk
adb shell rm system/app/HTCNew.apk
3) Save it as RemoveAPK.bat on desktop.
4) Double click this file to run it. (This will only work if SDK tools directory is in system path)
If SDK tools is not in your system path, you can place this script in the SDK tools folder and double click in there.
so now anytime a new ROM comes out, connect your phone, and double click. They'll be removed in literally a blink of an eye.
I'd attach this to the thread, but *.bat files are not allowed as attachments.
another suggestion that's awesome too (thanks to daryelv):
daryelv said:
Why not just create your own update.zip to do all the actions after flashing the ROM zip? Here's an example of mine...
Code:
show_progress 0.1 0
delete_recursive DATA:dalvik-cache/
delete_recursive DATA:boot-cache/
delete SYSTEM:app/com.android.launcher2.apk
delete SYSTEM:app/LiveWallpapers.apk
delete SYSTEM:app/LiveWallpapersPicker.apk
delete SYSTEM:app/VisualizationWallpapers.apk
delete SYSTEM:app/HtcLockScreen.apk
delete SYSTEM:app/HtcLockScreen.odex
delete SYSTEM:app/DeskClock.apk
delete SYSTEM:app/DeskClock.odex
delete SYSTEM:app/com.htc.StockWidget.apk
delete SYSTEM:app/Stock.apk
delete SYSTEM:app/Sprint_Navigation.apk
delete SYSTEM:app/HtcFootprintsWidget.apk
delete SYSTEM:app/HtcFootprints.apk
delete SYSTEM:app/LatinIME.apk
delete SYSTEM:app/GSD.apk
delete SYSTEM:app/FieldTest.apk
delete SYSTEM:app/amazonmp3.apk
delete SYSTEM:customize/resource/BigBen.jpg
delete SYSTEM:customize/resource/Colosseum.jpg
delete SYSTEM:customize/resource/EiffelTower.jpg
delete SYSTEM:customize/resource/StatueOfLiberty.jpg
delete SYSTEM:customize/resource/htc_wallpaper_01_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_02_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_03_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_04_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_05_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_06_lockscreen.jpg
delete_recursive SYSTEM:media/audio/
delete_recursive SYSTEM:media/bootscreen/
delete SYSTEM:media/bootanimation.zip
copy_dir PACKAGE:system SYSTEM:
show_progress 0.2 10
Just find an existing update package (any of them) and modify the update script to your liking and also put files in /system/ that you want in your ROM. (You could also put files into /data/app/ to load your programs, but I use A2SD which needs to be mounted first).
This also inserts my favorite Boot animation and favorite HTC keyboard into the ROM. My media files I keep in the /sdcard/ directory, so I just delete them from the ROM as well.
The benefits of doing this is that I can leave this on the root of my sdcard and just flash this ZIP after flashing a ROM.
-Daryel
Click to expand...
Click to collapse
Good idea! I never thought of using a bat...I just had a text file I copy and past the commands I use alot...this will save me some time!
great idea. me personally I use the autosign.bat and just unzip the rom remove all the stuff I dont want, add all my tweeks and customizations in and then resign it before I flash it but that becuase I have stuff I add in so thats the easiest way for me to do it. plus then all my stuff is there right at boot.
wtphoto said:
great idea. me personally I use the autosign.bat and just unzip the rom remove all the stuff I dont want, add all my tweeks and customizations in and then resign it before I flash it but that becuase I have stuff I add in so thats the easiest way for me to do it. plus then all my stuff is there right at boot.
Click to expand...
Click to collapse
Yeah. but then you have to unzip. That's too many clicks for me lol. I like the signing part though. You know what you can do. You can probably modify a script to do all that for you.
for instance not worry about modifying a zip, but after it's installed, just run a script that would remove apks, add your themes and apks that you'd want. So you dont have to unzip and re-sign. Unless you end up re-releasing your ROMs to others.
Bat and Cmd files are AMAZING things. Everyone touts VBScript like its a god send, but good ole Bat never fails me.
wtphoto said:
great idea. me personally I use the autosign.bat and just unzip the rom remove all the stuff I dont want, add all my tweeks and customizations in and then resign it before I flash it but that becuase I have stuff I add in so thats the easiest way for me to do it. plus then all my stuff is there right at boot.
Click to expand...
Click to collapse
jackal424 said:
Yeah. but then you have to unzip. That's too many clicks for me lol. I like the signing part though. You know what you can do. You can probably modify a script to do all that for you.
for instance not worry about modifying a zip, but after it's installed, just run a script that would remove apks, add your themes and apks that you'd want. So you dont have to unzip and re-sign. Unless you end up re-releasing your ROMs to others.
Click to expand...
Click to collapse
you could write a batch with a menu system to give various options.
I used to write those all the time until I switched to VB and added graphics.
What does the "HTCNew.apk" contain?
jackal424 said:
Yeah. but then you have to unzip. That's too many clicks for me lol. I like the signing part though. You know what you can do. You can probably modify a script to do all that for you.
for instance not worry about modifying a zip, but after it's installed, just run a script that would remove apks, add your themes and apks that you'd want. So you dont have to unzip and re-sign. Unless you end up re-releasing your ROMs to others.
Click to expand...
Click to collapse
I dont plan on releasing any roms anytime soon since everything I do is theme stuff but by doing that way makes it a lot easier if I fubar something bad with a new mod becuase then I just reflash with the base that I know is good. that and I do it so much it only takes me a bout 1.5 minutes to unzip remove the stuff I dont and drag everything in then resign.
wtphoto said:
I dont plan on releasing any roms anytime soon since everything I do is theme stuff but by doing that way makes it a lot easier if I fubar something bad with a new mod becuase then I just reflash with the base that I know is good. that and I do it so much it only takes me a bout 1.5 minutes to unzip remove the stuff I dont and drag everything in then resign.
Click to expand...
Click to collapse
makes sense...
Hmm. I'm with wtphoto on this one, but I can certainly think of other applications for this. I've never messed with this kinda stuff before. Quick couple of questions:
1. If sdk is in my system path, does that mean I wouldn't need to move stuff to the tools folder to resign it, push it etc?
If so:
2. How do I do this black magic?
I know, I know my inner n00b is showing again
tejasrichard said:
Hmm. I'm with wtphoto on this one, but I can certainly think of other applications for this. I've never messed with this kinda stuff before. Quick couple of questions:
1. If sdk is in my system path, does that mean I wouldn't need to move stuff to the tools folder to resign it, push it etc?
If so:
2. How do I do this black magic?
I know, I know my inner n00b is showing again
Click to expand...
Click to collapse
if sdk tools directory is in your system path, that means any app in that directory can be called from anywhere in your computer, including push.
The directions are in the first post for auto remove script if you need.
Or you can purchase Root Manager for a dollar and remove the apps that way..
@jackal424:
Good to know! Now I just need to figure out how to put sdk in the system path. I'll Google it later.
Why not just create your own update.zip to do all the actions after flashing the ROM zip? Here's an example of mine...
Code:
show_progress 0.1 0
delete_recursive DATA:dalvik-cache/
delete_recursive DATA:boot-cache/
delete SYSTEM:app/com.android.launcher2.apk
delete SYSTEM:app/LiveWallpapers.apk
delete SYSTEM:app/LiveWallpapersPicker.apk
delete SYSTEM:app/VisualizationWallpapers.apk
delete SYSTEM:app/HtcLockScreen.apk
delete SYSTEM:app/HtcLockScreen.odex
delete SYSTEM:app/DeskClock.apk
delete SYSTEM:app/DeskClock.odex
delete SYSTEM:app/com.htc.StockWidget.apk
delete SYSTEM:app/Stock.apk
delete SYSTEM:app/Sprint_Navigation.apk
delete SYSTEM:app/HtcFootprintsWidget.apk
delete SYSTEM:app/HtcFootprints.apk
delete SYSTEM:app/LatinIME.apk
delete SYSTEM:app/GSD.apk
delete SYSTEM:app/FieldTest.apk
delete SYSTEM:app/amazonmp3.apk
delete SYSTEM:customize/resource/BigBen.jpg
delete SYSTEM:customize/resource/Colosseum.jpg
delete SYSTEM:customize/resource/EiffelTower.jpg
delete SYSTEM:customize/resource/StatueOfLiberty.jpg
delete SYSTEM:customize/resource/htc_wallpaper_01_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_02_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_03_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_04_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_05_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_06_lockscreen.jpg
delete_recursive SYSTEM:media/audio/
delete_recursive SYSTEM:media/bootscreen/
delete SYSTEM:media/bootanimation.zip
copy_dir PACKAGE:system SYSTEM:
show_progress 0.2 10
Just find an existing update package (any of them) and modify the update script to your liking and also put files in /system/ that you want in your ROM. (You could also put files into /data/app/ to load your programs, but I use A2SD which needs to be mounted first).
This also inserts my favorite Boot animation and favorite HTC keyboard into the ROM. My media files I keep in the /sdcard/ directory, so I just delete them from the ROM as well.
The benefits of doing this is that I can leave this on the root of my sdcard and just flash this ZIP after flashing a ROM.
-Daryel
daryelv said:
Why not just create your own update.zip to do all the actions after flashing the ROM zip?
Click to expand...
Click to collapse
Both methods are great (Update.zip is method I use). Not to mention, with this method, you don't have to be on a computer to do it. Just write the update file once, always leave it on your SD Card and run whenever you want... that's convenient to me.
Plus both files can be distributed to someone whose not tech savvy to wipe what they don't want... thank god!
4SidedDie said:
Or you can purchase Root Manager for a dollar and remove the apps that way..
Click to expand...
Click to collapse
Not saying Root Manager isn't a good purchase, but a .bat file will remove all the apps I want gone faster than any other method I've found. Just double-click and they're all gone!
4SidedDie said:
Or you can purchase Root Manager for a dollar and remove the apps that way..
Click to expand...
Click to collapse
Well... personally, there's no need to pay for something if you're capable of doing it yourself (Not saying you aren't) -- especially when this method is more streamlined and a lot more efficient.
daryelv said:
Why not just create your own update.zip to do all the actions after flashing the ROM zip? Here's an example of mine...
Code:
show_progress 0.1 0
delete_recursive DATA:dalvik-cache/
delete_recursive DATA:boot-cache/
delete SYSTEM:app/com.android.launcher2.apk
delete SYSTEM:app/LiveWallpapers.apk
delete SYSTEM:app/LiveWallpapersPicker.apk
delete SYSTEM:app/VisualizationWallpapers.apk
delete SYSTEM:app/HtcLockScreen.apk
delete SYSTEM:app/HtcLockScreen.odex
delete SYSTEM:app/DeskClock.apk
delete SYSTEM:app/DeskClock.odex
delete SYSTEM:app/com.htc.StockWidget.apk
delete SYSTEM:app/Stock.apk
delete SYSTEM:app/Sprint_Navigation.apk
delete SYSTEM:app/HtcFootprintsWidget.apk
delete SYSTEM:app/HtcFootprints.apk
delete SYSTEM:app/LatinIME.apk
delete SYSTEM:app/GSD.apk
delete SYSTEM:app/FieldTest.apk
delete SYSTEM:app/amazonmp3.apk
delete SYSTEM:customize/resource/BigBen.jpg
delete SYSTEM:customize/resource/Colosseum.jpg
delete SYSTEM:customize/resource/EiffelTower.jpg
delete SYSTEM:customize/resource/StatueOfLiberty.jpg
delete SYSTEM:customize/resource/htc_wallpaper_01_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_02_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_03_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_04_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_05_lockscreen.jpg
delete SYSTEM:customize/resource/htc_wallpaper_06_lockscreen.jpg
delete_recursive SYSTEM:media/audio/
delete_recursive SYSTEM:media/bootscreen/
delete SYSTEM:media/bootanimation.zip
copy_dir PACKAGE:system SYSTEM:
show_progress 0.2 10
Just find an existing update package (any of them) and modify the update script to your liking and also put files in /system/ that you want in your ROM. (You could also put files into /data/app/ to load your programs, but I use A2SD which needs to be mounted first).
This also inserts my favorite Boot animation and favorite HTC keyboard into the ROM. My media files I keep in the /sdcard/ directory, so I just delete them from the ROM as well.
The benefits of doing this is that I can leave this on the root of my sdcard and just flash this ZIP after flashing a ROM.
-Daryel
Click to expand...
Click to collapse
uhhh....that's nice...i'm going to give this a shot....it is more convinient then double clicking....it stays on the phone too.... no need to connect phone to comp..
jackal424 said:
uhhh....that's nice...i'm going to give this a shot....it is more convinient then double clicking....it stays on the phone too.... no need to connect phone to comp..
Click to expand...
Click to collapse
Agreed. That is nice.
Nice thread....
Nice thread....
//forum.xda-developers.com/showthread.php?t=581635

[Q] Update.zip to restore apps?

hey guys i just wanted to ask something. Its possible to install apps via update.zip immediately after flashing ROM rite? I searched XDA and found this: http://forum.xda-developers.com/showthread.php?t=917922
but im not sure how to do it and anyway the meaupload link for that download is down. Btw since all my app data together is more than the data partition of the phone (>200mb), is it possible to make the apps link to my second partition of sd card via update.zip script or something? Hope u guys can help me!!
Does anyone know how to do this? if possible i think it would save a lot of time as when reinstalling via titanium backup. this way would be more hassle-free if possible.
So no one knows how to do this? ok then nvr mind i guess it must be too hard or something....
Why not just use an ext partition and app2ext?
Creating an update.zip is possible, but it's not very convenient. Esp keeping it up-to-date.
Mioze7Ae said:
Why not just use an ext partition and app2ext?
Creating an update.zip is possible, but it's not very convenient. Esp keeping it up-to-date.
Click to expand...
Click to collapse
srry if im asking a really dumb qn but does that mean that if u install apps to ur ext2 via link2sd, u dont have to install them again on new ROM?
App2ext is different from link2sd (but they both use ext partition.
In link2sd you usually create /sd-ext/link2sd folder, reboot and then use the Link2SD app to manually move apps to /sd-ext/link2sd. This is good if you want to mix apps on SD and internal.
In app2ext (which I'm suggesting) you instead create /sd-ext/app folder on sdcard and reboot. All your installed apps will be moved there from internal memory and new apps will be installed there automatically. They will still be there after you factory reset or install a new ROM. (To preserve application data you need something else such as titanium backup)
Ohhhhh. Thx a lot!! Ok I just wanna try a bit of programming that's why I asked how to make update.zip. haha. Anyway Thx!!
Sent from my XT720 using XDA App
androidlover123 said:
Ohhhhh. Thx a lot!! Ok I just wanna try a bit of programming that's why I asked how to make update.zip. haha. Anyway Thx!!
Click to expand...
Click to collapse
You can learn by studying the gapps package used by CM or any other update.zip. The "magic" is inside the META-INF folder. META-INF/com/google/android/updater-script has the installer commands that do things like mount /system and extract files, set permissions etc. The final step is to sign the update. OpenRecovery allows unsigned updates, but you should sign anyway even using testkeys--it forces a sha1 verification of the zip files to detect corruption before the update is applied.
Mioze7Ae said:
You can learn by studying the gapps package used by CM or any other update.zip. The "magic" is inside the META-INF folder. META-INF/com/google/android/updater-script has the installer commands that do things like mount /system and extract files, set permissions etc. The final step is to sign the update. OpenRecovery allows unsigned updates, but you should sign anyway even using testkeys--it forces a sha1 verification of the zip files to detect corruption before the update is applied.
Click to expand...
Click to collapse
oooh i can kinda understand the code in the updater-script. for eg: ui_print to print to screen, package_extract_dir to extract files to the directory in whatever folder u state. but what is the update-binary file?
The update-binary is the program that reads and executes updater-script.
Mioze7Ae said:
The update-binary is the program that reads and executes updater-script.
Click to expand...
Click to collapse
Is that something you must write yourself or something? Or just copy from other update.zips?
I just copy it. It's probably in the AOSP source somewhere but I've never looked.

Categories

Resources