PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   Samsung Moment (http://forum.ppcgeeks.com/forumdisplay.php?f=127)
-   -   Batch removing apps (http://forum.ppcgeeks.com/showthread.php?t=116988)

vampirefo 04-04-2010 08:20 PM

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

Carla 04-04-2010 08:47 PM

Re: Batch removing apps
 
Very cool! I bet Rain and Elephant will add this to their stickied threads :)

elephant007 04-04-2010 09:05 PM

Re: Batch removing apps
 
Tag, I'm it
I'll post a link on my sticky to this to spiffy info

I was working on a script to remove apps, failed to figure out how to gain permissions that's why I came up with the method i did, editing your backup

vampirefo 04-12-2010 11:20 PM

Re: Batch removing apps
 
2.1 I only removed the apps I don't use, One can add apps to the script if they like. more work is required for 2.1 "more typing required sorry" BTE free isn't available for 2.1 so use ConnectBot or another terminal.

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

Code:

#!/system/bin/sh
# This Backs up your apps.

cat /system/app/AmazonMp3.apk > /sdcard/sprint_2.1/AmazonMp3.apk
cat /system/app/BejeweledDemo.apk > /sdcard/sprint_2.1/BejeweledDemo.apk
cat /system/app/FileViewer.apk > /sdcard/sprint_2.1/FileViewer.apk
cat /system/app/FileViewer.odex > /sdcard/sprint_2.1/FileViewer.odex
cat /system/app/im.apk > /sdcard/sprint_2.1/im.apk
cat /system/app/MoxierMail.apk > /sdcard/sprint_2.1/MoxierMail.apk
cat /system/app/nascar09-prod-release.apk > /sdcard/sprint_2.1/nascar09-prod-release.apk
cat /system/app/nfl-prod-release.apk > /sdcard/sprint_2.1/nfl-prod-release.apk
cat /system/app/SprintTV_MR2_Samsung_Moment_GM_Final_1.0.4.29-112596.apk > /sdcard/sprint_2.1/SprintTV_MR2_Samsung_Moment_GM_Final_1.0.4.29-112596.apk
cat /system/app/SprintTVWidget.apk > /sdcard/sprint_2.1/SprintTVWidget.apk
cat /system/app/Term.apk > /sdcard/sprint_2.1/Term.apk
cat /system/app/Term.odex > /sdcard/sprint_2.1/Term.odex
cat /system/app/Weather2-16.apk > /sdcard/sprint_2.1/Weather2-16.apk

#This removes your apps.

rm /system/app/AmazonMp3.apk
rm /system/app/BejeweledDemo.apk
rm /system/app/FileViewer.apk
rm /system/app/FileViewer.odex
rm /system/app/im.apk
rm /system/app/MoxierMail.apk
rm /system/app/nascar09-prod-release.apk
rm /system/app/nfl-prod-release.apk
rm /system/app/SprintTV_MR2_Samsung_Moment_GM_Final_1.0.4.29-112596.apk
rm /system/app/SprintTVWidget.apk
rm /system/app/Term.apk
rm /system/app/Term.odex
rm /system/app/Weather2-16.apk

su
mount -t rfs -o remount,rw /dev/stl5 /system
cat /sdcard/sprint_2.1/sab > /system/bin/sab
chmod 4755 /system/bin/sab
/system/bin/sab
mount -t rfs -o remount,ro /dev/stl5 /system
exit
exit

Same know issues as 1.5, also don't run the app twice, unless you # the already backup up or removed apps.

If one runs the script twice without # out the line of code that backed up the app the app will be deleted from back up and lost.

What does that mean, lets say one backs up AmazonMp3.apk, if this same line of code is allowed to run again cat /system/app/AmazonMp3.apk > /sdcard/sprint_2.1/AmazonMp3.apk this will delete AmazonMp3.apk and replace it with a fake file, unless of course AmazonMp3.apk wasn't remove from system in that case AmazonMp3.apk will just replace AmazonMp3.apk.

vampirefo 04-13-2010 09:33 PM

Re: Batch removing apps
 
If you enable remount http://forum.ppcgeeks.com/showthread.php?t=117999
you can then type this
su
remount rw
cat /sdcard/sprint_2.1/sab > /system/bin/sab
chmod 4755 /system/bin/sab
/system/bin/sab
remount ro
exit
exit

instead of this.

su
mount -t rfs -o remount,rw /dev/stl5 /system
cat /sdcard/sprint_2.1/sab > /system/bin/sab
chmod 4755 /system/bin/sab
/system/bin/sab
mount -t rfs -o remount,ro /dev/stl5 /system
exit
exit

just saves a little typing.


All times are GMT -4. The time now is 05:10 PM.

Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0