View Single Post
  #1 (permalink)  
Old 04-04-2010, 08:20 PM
vampirefo's Avatar
vampirefo
N00b
Offline
 
Join Date: Mar 2010
Posts: 28
Reputation: 55
vampirefo is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Batch removing apps

I wrote a small shell script to mass backup and remove apps, based off of this list Posted by Calkulin.

amazonmp3_1.4+4_standard_signed.apk
Bejeweled.apk
Brightness.apk (Does not affect auto brightness)
Brightness.odex
FileViewer.apk
FileViewer.odex
im.apk
KeyBoardSlideUpCounter.apk
KeyBoardSlideUpCounter.odex
LatinIME.apk (Default SIP)
LatinIME.odex
MoxierMail-2.1.36.1.apk
nascar09_prod.apk
nfl_prod.apk
SDSA.apk (Device Self Service)
SetupWizard.apk
shutdown.apk (Low battery shutdown)
shutdown.odex
SN21_Samsung_Q-1187-signed.apk (Sprint Naviation)
Sprint_App_Updater.apk
SprintTV.apk
SprintTVWidget.apk
Term.apk
Term.odex
VSuiteApp.apk
Weather.apk
xms-android-1.0.42-prod.apk (Photo & Video Places)

First create a directory on your sdcard call it sprint you can do this via plunging phone to pc and mounting it.

The below code one just copies and past in their text editor, then save as sab to sdcard, with no extension. I call it sab short for "Sprint App Backup"

Code:
#!/bin/sh
# This Backs up your apps.

cat /system/app/amazonmp3_1.4+4_standard_signed.apk > /sdcard/sprint/amazonmp3_1.4+4_standard_signed.apk
cat /system/app/Bejeweled.apk > /sdcard/sprint/Bejeweled.apk
cat /system/app/Brightness.apk > /sdcard/sprint/Brightness.apk
cat /system/app/Brightness.odex > /sdcard/sprint/Brightness.odex
cat /system/app/FileViewer.apk > /sdcard/sprint/FileViewer.apk
cat /system/app/FileViewer.odex > /sdcard/sprint/FileViewer.odex
cat /system/app/im.apk > /sdcard/sprint/im.apk
cat /system/app/KeyBoardSlideUpCounter.apk > /sdcard/sprint/KeyBoardSlideUpCounter.apk
cat /system/app/KeyBoardSlideUpCounter.odex > /sdcard/sprint/KeyBoardSlideUpCounter.odex
cat /system/app/LatinIME.apk > /sdcard/sprint/LatinIME.apk
cat /system/app/LatinIME.odex > /sdcard/sprint/LatinIME.odex
cat /system/app/Moxierm ail-2.1.36.1.apk > /sdcard/sprint/Moxierm ail-2.1.36.1.apk
cat /system/app/nascar09_prod.apk > /sdcard/sprint/nascar09_prod.apk
cat /system/app/nfl_prod.apk > /sdcard/sprint/nfl_prod.apk
cat /system/app/SDSA.apk > /sdcard/sprint/SDSA.apk
cat /system/app/SetupWizard.apk > /sdcard/sprint/SetupWizard.apk
cat /system/app/shutdown.apk > /sdcard/sprint/shutdown.apk
cat /system/app/shutdown.odex > /sdcard/sprint/shutdown.odex
cat /system/app/SN21_Samsung_Q-1187-signed.apk > /sdcard/sprint/SN21_Samsung_Q-1187-signed.apk
cat /system/app/Sprint_App_Updater.apk > /sdcard/sprint/sprint/_App_Updater.apk
cat /system/app/SprintTV.apk > /sdcard/sprint/SprintTV.apk
cat /system/app/SprintTVWidget.apk > /sdcard/sprint/SprintTVWidget.apk
cat /system/app/Term.apk > /sdcard/sprint/Term.apk
cat /system/app/Term.odex > /sdcard/sprint/Term.odex
cat /system/app/VSuiteApp.apk > /sdcard/sprint/VSuiteApp.apk
cat /system/app/Weather.apk > /sdcard/sprint/Weather.apk
cat /system/app/xms-android-1.0.42-prod.apk > /sdcard/sprint/xms-android-1.0.42-prod.apk

#This removes your apps.

rm /system/app/amazonmp3_1.4+4_standard_signed.apk
rm /system/app/Bejeweled.apk
rm /system/app/Brightness.apk
rm /system/app/Brightness.odex
rm /system/app/FileViewer.apk
rm /system/app/FileViewer.odex
rm /system/app/im.apk
rm /system/app/KeyBoardSlideUpCounter.apk
rm /system/app/KeyBoardSlideUpCounter.odex
rm /system/app/LatinIME.apk
rm /system/app/LatinIME.odex
rm /system/app/Moxierm ail-2.1.36.1.apk
rm /system/app/nascar09_prod.apk
rm /system/app/nfl_prod.apk
rm /system/app/SDSA.apk
rm /system/app/SetupWizard.apk
rm /system/app/shutdown.apk
rm /system/app/shutdown.odex
rm /system/app/SN21_Samsung_Q-1187-signed.apk
rm /system/app/Sprint_App_Updater.apk
rm /system/app/SprintTV.apk
rm /system/app/SprintTVWidget.apk
rm /system/app/Term.apk
rm /system/app/Term.odex
rm /system/app/VSuiteApp.apk
rm /system/app/Weather.apk
rm /system/app/xms-android-1.0.42-prod.apk
Now one needs to open a terminal, I use BTE "Better Terminal Emulator"

Code:
su
remount rw
cp /sdcard/sprint/sab /bin/
chmod 001 /bin/sab
/bin/sab
remount ro
exit
exit
If there is apps in the list you don't want to backup or rm just put an # in front of the command example.
#rm /system/app/amazonmp3_1.4+4_standard_signed.apk
#cat /system/app/xms-android-1.0.42-prod.apk > /sdcard/sprint/xms-android-1.0.42-prod.apk

This tells the script to ignore that line of code.

know problems.
1. If a file doesn't exist meaning most likely already removed, a fake file will be created in the sprint directory, it will be empty of course just has the name of the file already removed.

Example one has already removed Bejeweled.apk, yet they don't put a # in front of the command cat /system/app/Bejeweled.apk > /sdcard/sprint/Bejeweled.apk.
when they look in /sdcard/sprint/ they will see a fake file called Bejeweled.apk

So any time one removes an app before running the script again # in front the cat and rm command lines for that app.

2. Script is deleted on reboot from /bin/ the script still remains on sdcard, so one can edit it on the sdcard and then simply run the terminal commands again.

su
remount rw
cp /sdcard/sprint/sab /bin/
chmod 001 /bin/sab
/bin/sab
remount ro
exit
exit

Last edited by vampirefo; 04-12-2010 at 08:38 PM.
Reply With Quote
This post has been thanked 4 times.