im getting tired of having to pull apks every time i flash a new rom. i found a thread that said that you can add a few lines to the update script to remove the apks prior to boot. how do you do that? when i added the lines in the thread i got a wrong digest meta-inf/comgoogle/android/update-script verification failed instillation aborted
i think my issue is i unpacked my signed zip modded the updatescript and rezipped it.
anyone have a better way to remove those apk, not one by one!
please if you could detailed instructions
recognize_atm said:
anyone have a better way to remove those apk, not one by one!
Click to expand...
Click to collapse
Why would you need to modify the ROM? You *do* realize that if you were going to go to the trouble of modifying the ROM to add removing things via the update script, you could just remove what you wanted removed in the first place?
No, of course you don't.
please if you could detailed instructions
Click to expand...
Click to collapse
Gods, that's what adb and a batch file (or a shell script, if you think you should be using Linux) are for.
you can create a .bat file to run and remove all the apks you dont want. here is mine
RemoveApp.bat said:
cd C:\android-sdk-windows\tools
adb remount
adb shell rm system/app/Facebook.apk
adb shell rm system/app/Gallery3DMT.apk
adb shell rm system/app/GenieWidget.apk
adb shell rm system/app/HtcFacebook.apk
adb shell rm system/app/HtcTwitter.apk
adb shell rm system/app/SocialNetworkProvider.apk
adb shell rm system/app/Sprint_TVWidget.apk
adb shell rm system/app/Sprint_TV.apk
adb shell rm system/app/Sprint_Nscar.apk
adb shell rm system/app/Sprint_NFL.apk
adb shell rm system/app/Stock.apk
adb shell rm system/app/com.htc.TwitterWidget.apk
adb shell rm system/app/Flickr.apk
adb shell rm system/app/FriendStream.apk
adb shell rm system/app/com.htc.FriendStreamWidget.apk
Click to expand...
Click to collapse
posguy99 said:
Why would you need to modify the ROM? You *do* realize that if you were going to go to the trouble of modifying the ROM to add removing things via the update script, you could just remove what you wanted removed in the first place?
No, of course you don't.
God, that's what adb and a batch file (or a shell script, if you think you should be using Linux) are for.
Click to expand...
Click to collapse
your username suits you well... minus the 99.
don't be mean like that man.
I figured it out thanxs
Yea its best to make a seperate update.zip with an edited script that you can flash any time with any rom. So if you flash a new rom, you can then flash the update.zip. Mine would remove a bunch of apps and install a theme and a bootscreen after installing a new rom.
I also see that you got it, but yea you have to resign the zip after you change something in it.
And to the posguy.. If you are NO where near a computer, you can always run the .zip file with the edited script. Comes in handy if you download a rom from your phone, like a rom from DamageControls Updater or just on the web.
Yes i know you can do a terminal, but thats just long and dumb. Make a update script.
Jus10o said:
Make a update script.
Click to expand...
Click to collapse
Yes, that's a good idea. Of course, that's not what the OP thought he should do, he thought he should modify the script in the original ZIP file.
Jus10o said:
And to the posguy.. If you are NO where near a computer, you can always run the .zip file with the edited script. Yes i know you can do a terminal, but thats just long and dumb. Make a update script.
Click to expand...
Click to collapse
my point! thats why i wanted to edit the script. i know how to do it with the terminal/ .bat file. but i cant figure out how to get the zip to work
recognize_atm said:
my point! thats why i wanted to edit the script. i know how to do it with the terminal/ .bat file. but i cant figure out how to get the zip to work
Click to expand...
Click to collapse
Here is a update zip that removes some apps already.. Its my old one.
If you edit any of the lines then you must re-sign the .zip.
If you cant figure it out, or just want someone to sign it really quick. Post your .zip here and I will sign it for you so it will be flashable.
View attachment update.zip
hey thanks... i normailly sign zips using the old fresh kitchen but it doesnt seem to sign roms and im guessing zips that have meta-inf already in them cant get signed thru kitchen. i think i might be wrong, but ho do you sign your zips?
recognize_atm said:
hey thanks... i normailly sign zips using the old fresh kitchen but it doesnt seem to sign roms and im guessing zips that have meta-inf already in them cant get signed thru kitchen. i think i might be wrong, but ho do you sign your zips?
Click to expand...
Click to collapse
http://androidforums.com/developer-101/8665-how-signing-roms.html
Related
I was wondering if its possible to replace the default applications?
Specifically, I'd like to replace the built-in "Alarm clock" app with Koush's excellent "Klaxon" app.
Anybody know how to do this? Can it be done with ADB push/pull?
I'm running JF's rooted RC30, 1.2, with the engineering booloader.
cheers, and happy new year!
-- michael
adb remount
adb shell rm /system/app/AlarmClock.apk
adb shell rm /system/app/AlarmClock.odex
adb push Klaxon.apk /system/app
That's one way to do it. Klaxon will then survive hard resets.
The recommended way to do it is to extract the system directory to your computer. Change the files around in the same manner as above, and use "mkyaffs2image -f directory image" to create a new image. Then use fastboot to flash that image. That's a bit more complicated though.
Koush said:
adb remount
adb shell rm /system/app/AlarmClock.apk
adb shell rm /system/app/AlarmClock.odex
adb push Klaxon.apk /system/app
That's one way to do it. Klaxon will then survive hard resets.
The recommended way to do it is to extract the system directory to your computer. Change the files around in the same manner as above, and use "mkyaffs2image -f directory image" to create a new image. Then use fastboot to flash that image. That's a bit more complicated though.
Click to expand...
Click to collapse
koush, thats a good idea! i want to try that. hey question, did you get the wireless in cupcake to work?
korndub said:
koush, thats a good idea! i want to try that. hey question, did you get the wireless in cupcake to work?
Click to expand...
Click to collapse
Nah, I didn't play around with it for that long.
Koush said:
Nah, I didn't play around with it for that long.
Click to expand...
Click to collapse
me either. too bad that its not complete. would be nice to have the native keyboard...
Koush said:
adb remount
adb shell rm /system/app/AlarmClock.apk
adb shell rm /system/app/AlarmClock.odex
adb push Klaxon.apk /system/app
That's one way to do it. Klaxon will then survive hard resets.
The recommended way to do it is to extract the system directory to your computer. Change the files around in the same manner as above, and use "mkyaffs2image -f directory image" to create a new image. Then use fastboot to flash that image. That's a bit more complicated though.
Click to expand...
Click to collapse
Would it be possible to do this all through cygwin, or would I need a full linux VM?
s0niqu3 said:
Would it be possible to do this all through cygwin, or would I need a full linux VM?
Click to expand...
Click to collapse
Those commands would work in Windows or Linux.
Koush said:
Those commands would work in Windows or Linux.
Click to expand...
Click to collapse
Hi,
I know the adb commands will work, I apologize for not being more specific, I was wondering if it would be possible to extract the system image, and build a new one without a linux vm.
s0niqu3 said:
Hi,
I know the adb commands will work, I apologize for not being more specific, I was wondering if it would be possible to extract the system image, and build a new one without a linux vm.
Click to expand...
Click to collapse
Yes, the mkyaffs2image tool is available as a Windows binary. I've seen it floating around this forum somewhere. Or you can ask JesusFreke to build you the executable; he has Cygwin set up properly.
Ok, time for another question that's semi-related.
Can anyone think of any reason why removing the "email" program can't be removed?
I only use the gmail app, and can't foresee needing the regular email app as gmail can check any other accounts I ever setup.
I tried push some app to system/app and I find that all app add to system/app will be alway active (as running app or service)
s0niqu3 said:
Ok, time for another question that's semi-related.
Can anyone think of any reason why removing the "email" program can't be removed?
I only use the gmail app, and can't foresee needing the regular email app as gmail can check any other accounts I ever setup.
Click to expand...
Click to collapse
I second the question. I'd like to remove the stock Email and replace it with K-9.
danguyf said:
I second the question. I'd like to remove the stock Email and replace it with K-9.
Click to expand...
Click to collapse
So far I have removed:
Alarm Clock
Voice Dialer
Email
IM
Talk
com.amazon.mp3
Sound Recorder
Camera
The stock Browser with the auto-rotating one
Stay away from sync/service packages (Im*, calendar, gmail, gtalkservices, etc) as you will find yourself with some interesting errors and malfunctioning apps. Leave MyFaves be as well (documented elsewhere in the forum); if you want it gone, install ADP1.
I was just wondering if I could put Koushik's klaxon alarm clock app over the alarmclock app built into the phone?
If I could, would a simple adb push do the job?
<-- Linux Noob.
why not just use both? You can delete the alarm clock app as far as I know... just adb pull it for backup first.
It's a bit more reasonable to have one.
So I am going to adb pull the original alarm clock and push the better one. Hopefully it would work.
adb pull the original and then just delete it off the phone (adb shell rm /system/app/alarmclock.apk
then just use klaxon instead
Lets say I put klaxon in place of the standard alarm clock in the system/app folder & he releases an update, would downloading the update cause me to have to instances of klaxon on my phone? Or would the update overwrite the system/app version?
I assume 2 instances but if you just install his like normal you wouldn't have that problem.
neoobs said:
I assume 2 instances but if you just install his like normal you wouldn't have that problem.
Click to expand...
Click to collapse
Thats what I figured. I was just thinking if i put his in system/app, I wouldnt have to reinstall it if i have to do a wipe. And if its in there, it wouldnt take space from the rest of my apps correct?
negative to both questions
just because it is in system/app doesn't mean it will be there after a wipe... and it takes the same memory.
neoobs said:
negative to both questions
just because it is in system/app doesn't mean it will be there after a wipe... and it takes the same memory.
Click to expand...
Click to collapse
/system is not cleared if you do a data only wipe. However, if you do a update.zip or DREAIMG.nbh, you will lose your /system directory.
Koush said:
/system is not cleared if you do a data only wipe. However, if you do a update.zip or DREAIMG.nbh, you will lose your /system directory.
Click to expand...
Click to collapse
So if I do a factory reset, klaxon will survive the wipe?
Beast84 said:
So if I do a factory reset, klaxon will survive the wipe?
Click to expand...
Click to collapse
Correct, a factory reset does not wipe the /system partition.
Koush said:
Correct, a factory reset does not wipe the /system partition.
Click to expand...
Click to collapse
Sweet that was the main part I was looking at. I don't wanna have to reinstall it if I ever have to reset. Next question, what would the commands be to yank the original & put klaxon in its place?
adb shell rm /system/app/AlarmClock.apk
adb shell rm /system/app/AlarmClock.odex
adb push klaxon.apk /system/app/klaxon.apk
neoobs said:
adb shell rm /system/app/alarmclock.apk
adb push klaxon.apk /system/app/klaxon.apk
Click to expand...
Click to collapse
does the odex file have to be removed as well?
doesn't need to be but I guess since it isn't being used you can adb shell rm /system/app/AlarmClock.odex as well
neoobs said:
adb shell rm /system/app/alarmclock.apk
adb push klaxon.apk /system/app/klaxon.apk
Click to expand...
Click to collapse
For me alarmclock had to be AlarmClock.apk for it to work
Caps make a difference?
oops sorry yes it is case sensitive and since I didn't have my phone readily available I miss quoted... changing it now
If Koush updates Klaxon, would it still be updateable on the System partition?
neoobs said:
adb shell rm /system/app/AlarmClock.apk
adb shell rm /system/app/AlarmClock.odex
adb push klaxon.apk /system/app/klaxon.apk
Click to expand...
Click to collapse
This is done through the computer right? Does the Klaxon.apk have to be in the tools folder of the SDK? And speaking of case sensitive, would it be Klaxon.apk?
Off topic, just out of curiosity, what is an odex file? What are they used for?
yes on the computer, and klaxon would just be the name of the apk... I am not sure what it is named for you I just used it as an example.
You will also need the sdk to do this. There are instructions with the sdk that tell you about the adb
And it should but I am not sure. all new stuff but I assume it would update where the file is since that is where the system sees it.
A quick guide for how to odex any rooted Desire Rom's /system/app/
The attached scripts should ignore any existing odex'd apk's
Depending on your base Rom you should gain ~20-50MB free internal space
***** DO A NANDROID BACKUP BEFORE DOING ANY OF THIS *****
Requirements:
Rooted de-odexd Rom (Partial or Full)
Working ADB on Win/Lin/Mac
SD Card in Desire with ~200MB Free space.
Guide:
Extract the attached zip to your desktop
Open CMD Window/Terminal and CD to Desktop
While your phone is booted normally
Push the odex folder to /data
Code:
adb push odex /data/odex
Run odex.sh
Code:
adb shell chmod 755 /data/odex/odex.sh
adb shell /data/odex/odex.sh
This will copy all none odexd apk's to /sdcard/app and odex them, your phone will reboot to recovery once done.
In your custom recovery select
Code:
partitions menu
> mount /system
> mount /data
> mount /sdcard
Once all partitions are mounted, in your CMD Window/Terminal
Code:
adb shell /data/odex/appupdate.sh
adb shell rm -r /data/odex
This will clear out all none odex's APK's and move the odexd ones from SD back to /system/app/
For good measure clear you dalvik-cache and reboot.
Thanks to Paul OBrien for the base script's.
thanks for posting... will try this later this weekend and follow up with my results!
exelent job ,just on time
for free up my memory
Thanks for this, excellent post. I'll be using this once the ROMs settle down a bit, annoying as f**k changing every day
This is great ! Thanks Just used it on my Hero
Can you add a framework odexer too ?
Thank you for this.
Sent from my HTC Desire using XDA App
Nice guide, i'll try this afternoon...thanks soo much
Man I've asked 2-3 developers & I PM'd a few people, but none replied regarding odexing.
You work is highly appreciated, thank you.
robocik said:
This is great ! Thanks Just used it on my Hero
Can you add a framework odexer too ?
Click to expand...
Click to collapse
Odexing the framework after it's been flashed has caused a few FC's for me, so I have left it out.
what does actually do for the phone/app?
it saves space on data partition.
Tip for windows:
Use 0777 instead of +x
adb-windows shell chmod 0777 /data/odex/odex.sh
It said "bad mode" to me..
Klutsh said:
Odexing the framework after it's been flashed has caused a few FC's for me, so I have left it out.
Click to expand...
Click to collapse
Ok, thanks again, great tool
What about a script for odexing before flashing!?
nerdo said:
What about a script for odexing before flashing!?
Click to expand...
Click to collapse
+1, odexing then adding the odexed apps to the update.zip will be much better.
I'm looking to see if this would be possible.
If it is I know it will only be on Linux/Mac
It would help if the cooks didn't insist on de-ODEXing the ROMs. The official release was ODEX'd.
marinierb said:
It would help if the cooks didn't insist on de-ODEXing the ROMs. The official release was ODEX'd.
Click to expand...
Click to collapse
They do it to allow easy themes and patches to be easily applied to apk's, that way not breaking the odex.
I agree though that an odex rom is faster and also gives more space on the internal memory.
Hi!
I am doing it from windows and getting the following error while running the odex.sh
zip error: Nothing to do! (./ApplicationsProvider.apk)
Unable to open './ApplicationsProvider.apk' as zip archive
failed on './ApplicationsProvider.apk.new' - No such file or directory
Unable to create './AppSharing.odex': File exists
zip warning: name not matched: classes.dex
My phone is still connected to the laptop so the SD is not available.
@lept0n
You answered your own question.
You need to have the SD card mount in the phone for this to work as it moves all the apk's that need odexing to SD as we don't have write access to /system when the phone is booted to android.
Hi I was wondering if it were possible to run adb on my infinity so I can hook my phone up to it.
I'm getting real tired of firing my old laptop to use adb for my phone.
shaggydiamond said:
Hi I was wondering if it were possible to run adb on my infinity so I can hook my phone up to it.
I'm getting real tired of firing my old laptop to use adb for my phone.
Click to expand...
Click to collapse
I found this a while ago, but never tried it:
http://forum.xda-developers.com/showthread.php?t=2033722
_that said:
I found this a while ago, but never tried it:
http://forum.xda-developers.com/showthread.php?t=2033722
Click to expand...
Click to collapse
Thanks, but this won't work for me, it's a flashable zip and I don't want to unlock my bootloader(yet)
shaggydiamond said:
Thanks, but this won't work for me, it's a flashable zip and I don't want to unlock my bootloader(yet)
Click to expand...
Click to collapse
Shouldn't need to flash anything. Just download the zip file, extract the contents, copy the `kadb' file to /system/bin (or /system/xbin), and finally set permissions (chmod 0755 /system/bin/kadb). To use, just open a terminal emulator and run the binary.
Haven't tried it myself, but it looks like what you're looking for.
becomingx said:
Shouldn't need to flash anything. Just download the zip file, extract the contents, copy the `kadb' file to /system/bin (or /system/xbin), and finally set permissions (chmod 0755 /system/bin/kadb). To use, just open a terminal emulator and run the binary.
Haven't tried it myself, but it looks like what you're looking for.
Click to expand...
Click to collapse
Oh i might have misread it then. i'll give it a go this weekend
Anybody know how to change the destination folder when installing the modified apk?
wileout said:
Anybody know how to change the destination folder when installing the modified apk?
Click to expand...
Click to collapse
What do you mean exactly?
Are you installing using a flashable zip or the application?
A flashable zip is the easiest way so you can edit the installer script to place it in whatever directory you wish.
I never use the apk tools themselves for installing.
You can also boot to recovery and mount system.
Then from terminal, EX:
Code:
adb push MyCoolMod.apk /system/app
Let me know if that helps, or if you need more info, or are deadset on using that app to install and we can go from there.
santod040 said:
What do you mean exactly?
Are you installing using a flashable zip or the application?
A flashable zip is the easiest way so you can edit the installer script to place it in whatever directory you wish.
I never use the apk tools themselves for installing.
You can also boot to recovery and mount system.
Then from terminal, EX:
Code:
adb push MyCoolMod.apk /system/app
Let me know if that helps, or if you need more info, or are deadset on using that app to install and we can go from there.
Click to expand...
Click to collapse
I was trying to use the tool to push iy becaude i cant get adb to push it at all...but the tool keeps trying to push it to data/app or something like that and i need it to go to system/priv-app
ok tried adb pushing it again and no go even doing it with your command. any ideas?
wileout said:
ok tried adb pushing it again and no go even doing it with your command. any ideas?
Click to expand...
Click to collapse
My bad, forgot a slash, try it again.
Code:
adb push MyCoolMod.apk /system/priv-app/
santod040 said:
My bad, forgot a slash, try it again.
Code:
adb push MyCoolMod.apk /system/priv-app/
Click to expand...
Click to collapse
I did that man it just restarts adb like i put in a bad command or it says cannot stat blah blah blah file or directory not found
Ive had tigerstown tryin to help me out too and he has no idea whats going on
well got adb to push it but I lost my clock widget all together lol
wileout said:
well got adb to push it but I lost my clock widget all together lol
Click to expand...
Click to collapse
Using stock data cable? Had that be a problem on other devices when pushing files.
Sent from my HTC6525LVW using Tapatalk
wileout said:
well got adb to push it but I lost my clock widget all together lol
Click to expand...
Click to collapse
You need to do:
adb remount /system rw
adb push test.apk /system/priv-app
jsaxon2 said:
You need to do:
adb remount /system rw
adb push test.apk /system/priv-app
Click to expand...
Click to collapse
Do i replace test with the name of the file?
wileout said:
Do i replace test with the name of the file?
Click to expand...
Click to collapse
Yes sir.
You also need to have the file in your adb directory and start the command prompt from there.
There are other ways to do it, but this should work for you.
jsaxon2 said:
Yes sir.
You also need to have the file in your adb directory and start the command prompt from there.
There are other ways to do it, but this should work for you.
Click to expand...
Click to collapse
I got the widget back by going into the priv-app folder and clicking it and installing it but now it force closes so im assuming its something on my end with how it was signed and stuff
wileout said:
I got the widget back by going into the priv-app folder and clicking it and installing it but now it force closes so im assuming its something on my end with how it was signed and stuff
Click to expand...
Click to collapse
After you push to the /system/priv-app folder, did you reboot? That should have installed it for you. Might also be a permissions problem. Make sure the permissions on your file are the same as the permissions on the rest of the files in that folder.
jsaxon2 said:
After you push to the /system/priv-app folder, did you reboot? That should have installed it for you. Might also be a permissions problem. Make sure the permissions on your file are the same as the permissions on the rest of the files in that folder.
Click to expand...
Click to collapse
Ok ill try that...thanks for your help ill report back
jsaxon2 said:
After you push to the /system/priv-app folder, did you reboot? That should have installed it for you. Might also be a permissions problem. Make sure the permissions on your file are the same as the permissions on the rest of the files in that folder.
Click to expand...
Click to collapse
Tried that and im still getting force closes so its something on my end im assuming