PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Android > Android Samsung Devices > Legacy Samsung Android Devices > Samsung Moment
Register Community Search

Notices


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-04-2010, 08:20 PM
vampirefo's Avatar
N00b
Offline
Pocket PC: moment
Carrier: sprint
 
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.
  #2 (permalink)  
Old 04-04-2010, 08:47 PM
Carla's Avatar
Knowledge Is True Opinion
Offline
Pocket PC: iPhone 4S
Carrier: Vzw
 
Join Date: Apr 2009
Posts: 4,319
Reputation: 7590
Carla is a trusted member of the communityCarla is a trusted member of the communityCarla is a trusted member of the communityCarla is a trusted member of the communityCarla is a trusted member of the communityCarla is a trusted member of the communityCarla is a trusted member of the communityCarla is a trusted member of the communityCarla is a trusted member of the communityCarla is a trusted member of the communityCarla is a trusted member of the community
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Send a message via MSN to Carla
Re: Batch removing apps

Very cool! I bet Rain and Elephant will add this to their stickied threads
__________________
De Gustibus Non Est Disputandum
I LOVE MY COP
Reply With Quote
This post has been thanked 1 times.
  #3 (permalink)  
Old 04-04-2010, 09:05 PM
elephant007's Avatar
domo arigato mr roboto
Offline
Pocket PC: Samsung Moment
Carrier: Sprint since Feb 11, 2002
 
Join Date: Jan 2007
Posts: 1,248
Reputation: 3584
elephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIP
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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
Reply With Quote
This post has been thanked 1 times.
  #4 (permalink)  
Old 04-12-2010, 11:20 PM
vampirefo's Avatar
N00b
Offline
Pocket PC: moment
Carrier: sprint
Threadstarter
 
Join Date: Mar 2010
Posts: 28
Reputation: 55
vampirefo is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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.

Last edited by vampirefo; 04-12-2010 at 11:26 PM.
Reply With Quote
This post has been thanked 1 times.
  #5 (permalink)  
Old 04-13-2010, 09:33 PM
vampirefo's Avatar
N00b
Offline
Pocket PC: moment
Carrier: sprint
Threadstarter
 
Join Date: Mar 2010
Posts: 28
Reputation: 55
vampirefo is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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.
Reply With Quote
Reply

  PPCGeeks > Android > Android Samsung Devices > Legacy Samsung Android Devices > Samsung Moment


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 02:17 PM.


Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com