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
Related
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?
Thank You firstly to rogro82 for your excellent app, so usefull!!
I dont know about you, but with all the Hero ROM's being posted these days, its become a pain to continually restore my shortcuts to the desktop each time.. I find that Backup for Root users only saves Cupcake/Launcher shortcuts, but not Hero... This goes for ChompSMS also..
I have created 4 simple GScript scripts (Using root) to Save and Restore Hero Home, and ChompSMS Settings when required.
This is what you need to do:
1) Download or have GScript or Gscript Lite installed on your phone
2) Create a folder on your SDCard called GScriptSaves. Your folder structure should now be /SDCard/GScriptSaves
3) Download and rename my 4 scripts to remove the .txt extension, e.g. from Save Hero Home.sh.txt -> Save Hero Home.sh. And place them in the /sdcard/gscripts folder
4) Load the 4 scripts into your gscript/Lite application and save..
Now once you have your desktop as you like it, run "Save Hero Home" from GScript...
Your Desktop should now be saved in the folder called /SDCard/GScriptSaves/com.htc.launcher
Now anytime you install a new Hero Rom, run step 4) and then simply run "Restore Hero Home" from GScript. Then all you need to do is Kill the Home app (TouchFLO/Rosie), I use Taskiller for this.. Open Taskiller, and find the TouchFLO process, then hit the TouchFLO app to kill it.. then press home... Then wait patiently whilst Rosie loads!!
This has worked for me on Casper, Elite Hero and JAC 1.72r2 ROM's.. Haven't tried it on other ROM's.
The same method can be used for the Save Chomp.sh file too... But here you are saving any customisations you make with Chomp (I can not verify as yet if this will save Notify tones and messages also as I haven't tried out a new rom yet!)
The save/restore sh files could also be combined into one file. i.e to create a Save ALL and Restore ALL sh files...
Thanks, but is all that does is save the desktop shortcuts
thanks, great script for flash adicts
shaolinx said:
Thanks, but is all that does is save the desktop shortcuts
Click to expand...
Click to collapse
The RestoreHome.sh will restore your shortcuts on a new Hero ROM, you use it like you would the Backup root program when ever you try out a new rom..
You can test it by deleting a couple of shortcuts then restoring it.. Remember to Kill TouchFlo though and press home..
Its a very simple script, but the same principle could be used to back/restore phone settings, Chomp SMS preferences, Ringtones, etc.. You just add similar entries for the other settings stored within /data/data
dipeshb said:
The RestoreHome.sh will restore your shortcuts on a new Hero ROM, you use it like you would the Backup root program when ever you try out a new rom..
You can test it by deleting a couple of shortcuts then restoring it.. Remember to Kill TouchFlo though and press home..
Its a very simple script, but the same principle could be used to back/restore phone settings, Chomp SMS preferences, Ringtones, etc.. You just add similar entries for the other settings stored within /data/data
Click to expand...
Click to collapse
Where the script save shortcut backup?
fridlack said:
Where the script save shortcut backup?
Click to expand...
Click to collapse
Change StoreHome.sh.txt to StoreHome.sh - This is the save shortcuts script!
SWEET!
Thanks for your work
life saver, thanks
in case anyone's following it step by step (like me) there's no gscripts folder on the SD card
Also, the .sh files don't show up when adding a new scrips it just says ""select a file (.sh from sd card)"
the files are named correctly
EDIT: never mind, after opening the software it created a "gscript" folder (no "s")
Im on JACHero 1.5r2 and get an error, I followed everything to a T
I have HeroHome on the root of my sd
Removed the .txt from both scripts
Placed scripts in gscript
See attachement
Nice, thanks a lot.
Works for all your scenes, too.
Lakers3408 said:
Im on JACHero 1.5r2 and get an error, I followed everything to a T
I have HeroHome on the root of my sd
Removed the .txt from both scripts
Placed scripts in gscript
See attachement
Click to expand...
Click to collapse
on elite hero same here
Lakers3408 said:
Im on JACHero 1.5r2 and get an error, I followed everything to a T
I have HeroHome on the root of my sd
Removed the .txt from both scripts
Placed scripts in gscript
See attachement
Click to expand...
Click to collapse
My bad.. you will need to manually create the com.htc.launcher folder under the HeroHome directory. i.e your folder structure should be :
/sdcard/HeroHome/com.htc.launcher
Nice Idee Can you make more of such Scripts?
Rey-619 said:
Nice Idee Can you make more of such Scripts?
Click to expand...
Click to collapse
Yes.. This is just a basic start that can bee easily added to.. .. I hope to add backups/restores for all settings, Chomp SMS, wallpaper, lock screens etc... Also I would like to auto create the necessary folders rather than having to manually create them. My scripting skills for linux are very limited compared to the other devs here, but no harm in studying up!
modify this:
cp -r /data/data/com.htc.launcher/* sdcard/HeroHome/com.htc.launcher
to
mkdir /sdcard/HeroHome
cp -r /data/data/com.htc.launcher /sdcard/HeroHome
and it'll create folders automatically
blackgin said:
modify this:
cp -r /data/data/com.htc.launcher/* sdcard/HeroHome/com.htc.launcher
to
mkdir /sdcard/HeroHome
cp -r /data/data/com.htc.launcher /sdcard/HeroHome
and it'll create folders automatically
Click to expand...
Click to collapse
Appreciated! Will modify the first post..
looks better ore not?
Code:
echo "Creating backup folder plz wait..."
mkdir /sdcard/HeroHome
echo "Done"
echo "Copy files"
cp -r /data/data/com.htc.launcher sdcard/HeroHome
echo "Done"
Code:
echo "Restore files :) plz wait..."
cp -r sdcard/HeroHome/com.htc.launcher/* /data/data/com.htc.launcher
echo "Done"
Rey-619 said:
Nice Idee Can you make more of such Scripts?
Click to expand...
Click to collapse
you will find some more backup scripts in this thread
I thought it worked, all the widgets and icons showed up then...
BAM!
TouchFLO force close over and over and over and over again
Time to wipe ext
Lakers3408 said:
I thought it worked, all the widgets and icons showed up then...
BAM!
TouchFLO force close over and over and over and over again
Time to wipe ext
Click to expand...
Click to collapse
Hmmmm, sorry to hear that dude.. this has not happened to me, and I'm using the latest rom by JAC. All that comes to mind is that you had widgets on your desktop that a particular version of hero does not support, I.e. the framework is not present. E.g. some hero roms will not support the MT pdf viewer.
This is a rude, crude way of backing up your desktop, but has worked so far from me.. any devs out there who can clean this issue up would be appreciated..
I'm sorry to say I have no idea but I'm now determined to learn how and I think I'll start with a linux partition.
Anyone care to join me?
I think the Avabox that avaluanchemods posted up included the files to pull out the files from the .img, after that wouldn't it be just like modifying another ROM (with a lot more to mod, of course, to gain root, etc.)?
danaff37 said:
I think the Avabox that avaluanchemods posted up included the files to pull out the files from the .img, after that wouldn't it be just like modifying another ROM (with a lot more to mod, of course, to gain root, etc.)?
Click to expand...
Click to collapse
nope, this ruu is different
doesn't work like that.
well, once you have the images you can use yaffs, for the system image, but getting the images from the ruu...
regaw_leinad said:
nope, this ruu is different
doesn't work like that.
well, once you have the images you can use yaffs, for the system image, but getting the images from the ruu...
Click to expand...
Click to collapse
Hahaha yeah, getting the images from the ruu is a blast!
u guys want the new sprint ruu turned into a flashable update.zip? isn't that what damages 2.06 basically is? if not i'll do it for you.
I think it's really more that they wanna learn how. Anyone down to throw out some pointers?? I'd be interested to learn too
I was actually just looking into pulling the files from the ruu myself.
extract the exe file. unyaffs the system.img. make an update-script in META-INF/com/google/android/. zip the boot.img META-INF/ folder, and system/ folder and sign it. nothing more to it. lol
zenulator said:
u guys want the new sprint ruu turned into a flashable update.zip? isn't that what damages 2.06 basically is? if not i'll do it for you.
Click to expand...
Click to collapse
well, well howdy stranger! zen you were a great dev on the vogue/android...we need you here my man!
fixxxer2008 said:
well, well howdy stranger! zen you were a great dev on the vogue/android...we need you here my man!
Click to expand...
Click to collapse
this communtiy is a little crazy for my taste. but darchstar answered the question.
http://code.google.com/p/zen-droid/downloads/list
this is a link to the files i use. you must have linux installed to use them as well as pearl which should be installed on most distros. you'll prob have to chmod them executable if you download them.
any questions post them and i'll try to help. i'm glad to see people trying to learn.
regaw_leinad said:
nope, this ruu is different
doesn't work like that.
well, once you have the images you can use yaffs, for the system image, but getting the images from the ruu...
Click to expand...
Click to collapse
thats all you need for a rom. is the /system. just place that in a folder along with the boot.img. andddd archive and sign. you have a rom now.
and if you want to know a secret. lol
if you are in windows, all .exe's are archived as zips. change .exe to .rar/zip and then you can unzip and have everything. very simple.
o and you need an update script which you can create, or take someones from a rom and edit it to fit the RUU. and as always give credit where needed
Avalaunchmods said:
thats all you need for a rom. is the /system. just place that in a folder along with the boot.img. andddd archive and sign. you have a rom now.
and if you want to know a secret. lol
if you are in windows, all .exe's are archived as zips. change .exe to .rar/zip and then you can unzip and have everything. very simple.
o and you need an update script which you can create, or take someones from a rom and edit it to fit the RUU. and as always give credit where needed
Click to expand...
Click to collapse
interesting. so in theory this could be done as easily on windows, no linux partitions?
mountaindont said:
interesting. so in theory this could be done as easily on windows, no linux partitions?
Click to expand...
Click to collapse
i hate linux. lol so yes
Not all exe's work like that. Like this one for example....
not even 7zip can get into it.
danaff37 said:
Not all exe's work like that. Like this one for example....
not even 7zip can get into it.
Click to expand...
Click to collapse
uniextract, google it. you are correct some are a certain type that cant be extracted but 99% of RUU's can.
Ok here is a basic run through for extracting the RUU and making an update.zip
1. Run the RUU in windows or through wine. You don't have to run it completely with your phone plugged in. The install shield will extract the files to a tmp folder. Search through your tmp folders until you find it. Inside should be a rom.zip. Unzip it. Inside it should be system.img data.img boot.img etc...
2.
a: Switch to linux. Use unyaffs to extract the system.img. I usually make a directory called system in the same directory as the system image and cd to it. then issue.
unyaffs ../system.img
this will extract it into the system directory that your in. make your changes. add apps/busybox/su etc..
b: You can also use unyaffs for windows from here: http://code.google.com/p/unyaffs/downloads/list it should do the same thing but I've never used it.
3. If you want apps pre-installed to /data then make a data directory with a apps directory in it and put your extra apps there like wireless tether etc... so now you have a directory with
/system
/data
boot.img
4. Use an update script from another rom as a base and modify it to symlink busybox, set the correct permissions, copy data write boot.img, clear cache etc... read through some other update scripts to get the idea of whats going on it's simple text based stuff. The update script is inside the directory
META-INF/com/google/android.
Once done move the META-INF directory to your working directory. so you should now have
/system
/data
/META-INF
boot.img
Zip up the above directorys/files into something like myrom.zip
5. Sign the zip. You'll need java and a testsign.jar and the android sdk. I've never done it without the sdk. Create a directory called sign inside the tools directory of the android sdk. Move testsign.jar and your myrom.zip to the sign directory. Execute the following command while in the sign directory
java -classpath testsign.jar testsign myrom.zip myrom-signed.zip
6. Copy myrom-signed.zip to the root of your sdcard. reboot recovery. nandroid backup. wipe/factory reset. flash update zip.
Good luck.
zenulator said:
Ok here goes a basic run through for extracting the ruu and making an update.zip
1. Run the ruu in windows or through wine. It will be extracted to a tmp folder. Search through the tmp folders until you find it. Inside should be a rom.zip. Unzip it. Inside it should be system.img data.img boot.img etc...
2. Switch to linux. Use unyaffs to extract the system.img. I usually make a directory called system in the same directory as the system image and cd to it. then issue.
unyaffs ../system.img
this will extract it into the system directory that your in. make your changes. add apps/busybox/su etc..
3. if you want apps pre-installed to /data then make a data directory with a apps directory in it and put your extra apps there like wireless tether etc... so now you have a directory with
/system
/data
boot.img
4. use a update script from another rom as a base and modify it to symlink busybox, set the correct permissions, copy data write boot.img, clear cache etc... read through some other update scripts to get the idea of whats going on it's simple text based stuff. the update script is inside the directory META-INF/com/google/android. once done move it to your working directory. so you should now have
/system
/data
/META-INF
boot.img
Zip up the above directorys/files into something like myrom.zip
5 sign the zip. you need java and a testsign.jar and the android sdk. i've never done it without the sdk. create a directory called sign inside the tools directory of the android sdk. move testsign.jar and your myrom.zip to the sign directory. execute the following command while in the sign directory
java -classpath testsign.jar testsign myrom.zip myrom-signed.zip
6. copy myrom-signed.zip to the root of your sdcard. reboot recovery. nandroid backup. wipe/factory reset. flash update zip.
Good luck.
Click to expand...
Click to collapse
uhh...i think ill leave that one too the pros
zenulator said:
Ok here goes a basic run through for extracting the ruu and making an update.zip
Click to expand...
Click to collapse
Interesting. Sounds easy enough, I'll definitely have a go. Thanks for the tutorial.
pseudoremora said:
Interesting. Sounds easy enough, I'll definitely have a go. Thanks for the tutorial.
Click to expand...
Click to collapse
+5, HOLY CRAP guys, I havent checked the forum in a few hours.
Thank you all so much for the insight.
I'll be back in a week!!
nebenezer said:
+5, HOLY CRAP guys, I havent checked the forum in a few hours.
Thank you all so much for the insight.
I'll be back in a week!!
Click to expand...
Click to collapse
There's an easy fix for your problem... Install the XDA Android App. Seriously, my soul belongs to Android now... and XDA has become my home, I HAVE to know what's going on at all times... it's like a drug, lol.
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.
Hi,
I have a few apps and would like to add into custom rom. I read and google but no help.
Using winrar and open custom rom, i create a folder /data/app and place all apk in "app" folder. non of the apps in that folder installed. Do i need to do more then just add the apk?
I read here http://forum.xda-developers.com/showthread.php?t=1198035 and no use. maybe OP not don't with the guide yet.
thx
cat2115 said:
Hi,
I have a few apps and would like to add into custom rom. I read and google but no help.
Using winrar and open custom rom, i create a folder /data/app and place all apk in "app" folder. non of the apps in that folder installed. Do i need to do more then just add the apk?
I read here http://forum.xda-developers.com/showthread.php?t=1198035 and no use. maybe OP not don't with the guide yet.
thx
Click to expand...
Click to collapse
Reread that thread. The answer is in there.
Hint: ROM flash packages never put anything in /data
you can preinstall apps to /data/app but it takes update script modding. if you havent figured it out it is a lot easier to add them as system apps in /system/app
@Dani897: I try adding apk to /system/app or /data/app but none are working. When I add apk to /system/app; after the rom flashed and reboot, Samsung kept on flashing forever.
cat2115 said:
@Dani897: I try adding apk to /system/app or /data/app but none are working. When I add apk to /system/app; after the rom flashed and reboot, Samsung kept on flashing forever.
Click to expand...
Click to collapse
check your permissions!
the data/app way need adition work in the update script. im not gonna get into that.
Dani897 said:
check your permissions!
the data/app way need adition work in the update script. im not gonna get into that.
Click to expand...
Click to collapse
Thanks. How do i check permission? in CWM? In cwm (red) v2.5.1.3 -->Install zip from sdcard --> toggle signature verification-->disable'
In advance, all i see is fix permissions.
cat2115 said:
Thanks. How do i check permission? in CWM? In cwm (red) v2.5.1.3 -->Install zip from sdcard --> toggle signature verification-->disable'
In advance, all i see is fix permissions.
Click to expand...
Click to collapse
no in a terminal emulator or in linux. they get screwy sometimes if you do editing in windows. i cant even seem to get ownership of one of my flash drives on my linux machine after i formatted it with windows.
if you are on a mac you can do it by clicking and choosing "get info" from the context menu apparently but i dont own a mac so i dont know.
i never used it but check out cygwin and do some googling on permissions in terminal/console. it might be best if you are not ready to install a new os. but you can also install ubuntu with the wubi installer inside windows of use a vm with osx or the linux distro of your choice pretty easily. please dont ask for support questions on doing those things.
you can find permissions of files in a directory with ls -l
you can change them with chmod an ususally one of the numbers below but there are others, google is your friend
666 is rw-rw-rw
644 is rw-r--r-
777 is rwxrwxrwx
755 is rwxr-xr-x
644 or 755 are the most likely that they should be.