Bulk APK Install via Recovery - G1 Android Development

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.

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?

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

Default launcher, and app removal...

Just a few quick questions that I had trouble finding answers to.
1. Easy way to set the default launcher to launcher.apk, even if rosie is removed it still shows up after flashing rom?...
2. When I unzip a rom, remove apk's, resign, and flash, many of the apk's I had removed still show up. Rosie, sprint nfl, default music, htc contacts, etc. Anyone know why this is? Tried with several different roms and wiped excessively. Still seem to be several app's I cannot remove without adb'ing after flash...
Thanks in advance
Make sure you Wipe Data/Factory Reset from the Recovery image before flashing
mrinehart93 said:
Make sure you Wipe Data/Factory Reset from the Recovery image before flashing
Click to expand...
Click to collapse
Turdburglar said:
Tried with several different roms and wiped excessively. Still seem to be several app's I cannot remove without adb'ing after flash...
Click to expand...
Click to collapse
10charsssssssssssssssss
Aah sorry I missed that. It could be that the apps you're attempting to remove that are being left-over are in /system/app... because wiping Data doesn't remove them from there.
mrinehart93 said:
Aah sorry I missed that. It could be that the apps you're attempting to remove that are being left-over are in /system/app... because wiping Data doesn't remove them from there.
Click to expand...
Click to collapse
Thanks, strange, shouldn't it format system/app on flash? Anyone tell me how I might accomplish that?
Actually now that I think about it, even if I adb rm, and flash a rom with the apk's removed, they still show up.
Wow... I have no idea then Nevermind, scratch that! DO you have an ext partition or Apps2SD installed? That would be the culprit!!!!!
mrinehart93 said:
Wow... I have no idea then Nevermind, scratch that! DO you have an ext partition or Apps2SD installed? That would be the culprit!!!!!
Click to expand...
Click to collapse
nope, weird right? think I got sprint nfl out by default finally. Still got Rosie, music, people...
default im won't go away either, or weather.
Screw it, i'll just make a .bat, what a pain...
Well I think I found my problem, not sure how to fix it tho if anyone can lead me in the right direction. I've been using fresh pre-kitchen to sign zips. Seems no matter what I put in the update-script before I sign it with pre-kitchen this is all I have in there afterword...
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
So obviously it's not formatting system. or doing anything but copying "system". I can also try to edit/replace the update-script after I sign the zip but that gives me a "E:/Wrong Digest .../update-script E:Verification failed" error when I attempt to flash.
All I'm trying to do is add a data folder to damagecontrol2.07.2, remove some apps, rosie, add a new taskbar, and lockscreen.
Is there any better easy way to do this, update-script is killing me.....
Suppose I could try to sign it manually, but I'm a noob and lazy I guess, easy and quick is good. Anyone else having this sort of problem with pre-kitchen?
I already got damagecontrol running on my phone with all the things I want using a .bat, just trying to figure out how to put it all in a rom I can flash and be done with it in the future.... Thanks for any help.
I find the easiest way to sign update.zip's is to find the script somewhere around here (I have no idea... I found it like 4 months ago) that adds "Sign Zip" to your right-click context menu. If you do that, then all you have to do is pull the META-INF folder from the ROM you're basing it off of, put that next to System and boot.img in the same directory, highlight them all, zip them, and then right click and sign the zip. That's how I do stuff, and it works perfectly every time.
mrinehart93 said:
I find the easiest way to sign update.zip's is to find the script somewhere around here (I have no idea... I found it like 4 months ago) that adds "Sign Zip" to your right-click context menu. If you do that, then all you have to do is pull the META-INF folder from the ROM you're basing it off of, put that next to System and boot.img in the same directory, highlight them all, zip them, and then right click and sign the zip. That's how I do stuff, and it works perfectly every time.
Click to expand...
Click to collapse
thanks, I'll take a look around for it.
No problem. If it helps, I'm pretty sure I found the script on a Droid forum. I'd help you look for it, but I have homework to do that involves Shakespearian soliloguy's... and Shakespeare is not one of my forte's.
Found one for linux here...
http://forum.xda-developers.com/showthread.php?t=538020
to bad I'm on windows at the moment, might be about time to go back to ubuntu anyway.
Anyone got one for windows for sh..s and giggles?
ahhh well I've been using winzip to zip the files, seems others have been having problems also, supposedly 7-zip works better? I'll post results in case anyone else has similar issues.
Nice! found the windows script for right click also incase anyone wants it.
http://forum.xda-developers.com/showthread.php?p=6232592
Yep problem was winzip. works like a charm when zipped with 7zip... tried zips from both winzip and 7zip with pre-kitchen and the script, update-script in the winzip'd files is always bare. odd. Thanks for pointing me to the script mrinehart, doesn't get easier than that.
No problem! Glad you were able to find it and get everything working

writing update-script file

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.

Now that root is getting closer, PLEASE BACK UP!!

If you want to delete an app, change a file or whatever when you get root, please be smart about it. Think before you delete something. Have a plan B (a failback plan). If you don't know how you will fix whatever you're about to potentially break, DON'T DO IT.
Try to learn ADB. I know it's not for everyone, but it may pull you out of the fire later. Think before you do anything.
No matter what Android device it is, someone always has a post saying "Help! I deleted <insert app here> and I need it back!" Here are some tips:
Don't freeze or delete an app using Titanium Backup without knowing if it will crash your phone or not
If you're using ADB, rename a file instead of deleting it if you're not sure if it will crash your phone or not
Your /system folder is like the base operating system folder (think C:\Windows); before you change something BACK IT UP!
Code:
adb pull /system <destination_folder>
Since we only have temp root for now, if you're disabling packages, back up the packages.xml file
Code:
adb pull /data/system/packages.xml <destination_folder>
Learn from others' mistakes; if someone bricks their phone, read the thread and figure out how NOT to screw yourself and your phone
Heard of measure twice, cut once? Read three times, execute once. Listen to the Devs. Be nice to them. Don't piss them off. They do this on their own time.
Please be smart about whatever you do to your phone. We can't be dumb smart phone users. If you don't know something, ask in the appropriate section or thread. If you know something, don't tease others for not knowing. The occasional flame is funny and all, but at some point someone has to learn whatever they don't know - someone is going to have to step up and help them.
Thanks dawg...
I think and SD backup and Nandroid recovery backup on root will be good enough? <not condascending...just asking from your adb opinion?>
ROM_Guest said:
Thanks dawg...
I think and SD backup and Nandroid recovery backup on root will be good enough? <not condascending...just asking from your adb opinion?>
Click to expand...
Click to collapse
I think of that as another layer. We're not there with the Sensation yet, but I always think it's a good idea to use any and all methods best suited for what you're doing.
For example, if you're flashing a theme someone customized which could change multiple apk and jar files, a Nandroid backup is best.
When someone goes to remove an apk or freeze an app, they usually don't think to take a Nandroid backup (because deleting or freezing takes only a second - Nandroid backups take longer).
1) we don't have that functionality yet and 2) it's very common for someone to try to freeze a critical app which can cause a boot loop, which can easily be fixed by adb (if a Nandroid is not available).
i tried:
adb pull / backup/
it started building a file list and then started the copy. after a time (dont know excatly when because i let it run beside) it stoped working at:
pull: /sys/devices/platform/msm_adc/batt_id -> backup/sys/devices/platform/msm_adc/batt_id
nothing more happend. now i got 4883 files, a total of 3.1 GB, backup directory. but it seems not all files are in. when i browse through the phone dir i see much more files in the dirs.
is there any other way of getting a complete backup? when i rerun the command will it skip the files it allready dumped to disk? any other command?
thx!!!
daSn00p said:
i tried:
adb pull / backup/
it started building a file list and then started the copy. after a time (dont know excatly when because i let it run beside) it stoped working at:
pull: /sys/devices/platform/msm_adc/batt_id -> backup/sys/devices/platform/msm_adc/batt_id
nothing more happend. now i got 4883 files, a total of 3.1 GB, backup directory. but it seems not all files are in. when i browse through the phone dir i see much more files in the dirs.
is there any other way of getting a complete backup? when i rerun the command will it skip the files it allready dumped to disk? any other command?
thx!!!
Click to expand...
Click to collapse
All you really need is /system and /data if you want a complete backup. I know you see other files+folders, but those are mounted by the OS and kernel... or whatever. Someone with more Linux experience can explain better than I can. But if you want a complete backup, just get /system and /data.
The /system folder is like getting the base OS. The /data is all your user/personal data.
dumping /system worked fine: 1366 files pulled. 0 files skipped.
when trying to dump /data it freezes again and allways again at:
pull: /data/d/smem_log/dump_cont -> ../backup2/data/d/smem_log/dump_cont
so i dumped every dir in data manually only /data/d is missing now. but there are so many dirs in it, i dont want to dump every dir on its own
any idea?
daSn00p said:
dumping /system worked fine: 1366 files pulled. 0 files skipped.
when trying to dump /data it freezes again and allways again at:
pull: /data/d/smem_log/dump_cont -> ../backup2/data/d/smem_log/dump_cont
so i dumped every dir in data manually only /data/d is missing now. but there are so many dirs in it, i dont want to dump every dir on its own
any idea?
Click to expand...
Click to collapse
That should be good enough for now. No one else is doing this manually, so until we get an official root this is all you can do to backup. Once we get permanent root, titanium backup will do most of this for us.
I would only make backups of anything you change or delete at this point, but that's just me.
Sent from my HTC Sensation 4G using XDA App

Categories

Resources