How to Install/Remove System Apps on Android [MUST HAVE ROOT] - G1 General

########## IMPORTANT UPDATE ##########
There is an APP available that makes this much simpler
* No Console Commands Needed
* You still MUST HAVE ROOT
* It must be installed on internal memory to work correctly
* Be sure you know what a system app does before you remove it.
* If you remove a vital app you could mess up your system completely.
The APP is Called: "System APP Remover"
Here's a Link to Download it: http://www.megaupload.com/?d=ZFC2C1R7
Mirror Download Link: http://www.mediafire.com/?h3n3ftbwilshcvn
######################################
Here are the console commands for installing/removing system apps in android console emulator, very easy ; )
You must have ROOT and console emulator, I found this very helpful, so I hope it helps others as well...
_____________________________________________________________________________________
Install App to System:
Place APK file in the root folder on your sd card.
Open terminal and enter these commands:
# su
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cat /sdcard/filename.apk > /system/app/filename.apk
# mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
# reboot
_____________________________________________________________________________________
Remove App from System (Be careful what you remove):
# mount -o remount,rw /system
# rm /system/app/Filename.apk
[Optional, to make read-only again]
# mount -o remount,r /system
[When Finished]
# reboot
_____________________________________________________________________________________
****KEY****
"#" means root command will follow
[Notes are in these brackets and aren't commands]
- ENJOY
ALSO...
**** I'm new to Android APP creation, but if anyone can automate this script to make a simple One-Click GUI APP that would be awesome, all I ask is that you put my name in the co-dev/"Thanks to" list for the app, just so I can say I helped ;-) ****
- CuriousAndroid

I am trying to reinstall some files I uninstalled. I went to the following link on this site and found some apps that people said could be removed - http://forum.xda-developers.com/showthread.php?t=773142
however, my Act1 video player now quits whenever I receive an incoming text, so I need to reinstall some programs and see which one is causing the problem
I downloaded an app called Android Terminal Emulator by Jack Palevich. I tried a "reboot" command (without the #) but it said reboot operation not permitted. Is this the Emulator I need to reinstall files? Am I doing something wrong?
--------------
EDITED:
ok nevermind, i realized the "su" command gives superuser access needed for the reboot....going to try to install files now

yeah, to use any root commands "su" must be used first otherwise the shell will think your just some generic user with limited privileges and nothing will work.
It's very important to identify any apps you plan on removing before you attempt it to make sure it isn't needed by another process.
You got lucky, some apps once removed can cause the whole rom to fail, so be careful!
- CuriousAndroid

well i think i messed something up...is there a way to recover back to stock after using the sdx stock app remover? i removed the video player but tried reinstalling it...when i uninstalled it from sdx, i noticed my other video player (Act1) would quit whenever i'd get an incoming text
i have all the .apks backed up, but after attempting to reinstall the stock video player, it hangs in MyFiles...then i reset back to factory (no Act1), and it can't play my videos, i get the error "No applications can perform this action"
Is there a way to recovery back to stock with all applications installed and in tact? i have all the .apks, but this video player won't work, after following your instructions above
thanks

It will work. Check the following:
* All shell commands are CASE-sensitive, so if the app is called Vending.apk you can't type vending.apk
* for the command to work you must have the apk on the root of your SDcard, not in sub-directories.
* if you have a copy of the rom you installed you can unzip it on your PC and find the system app folder, which you can use to cross-refference with the system/app folder on your phone to see if your missing something else.
in terminal you can list system apps like this:
# su
# cd /system/app/
# ls | more
[that will allow you hit space bar to navigate through app list if it's longer than a page,press ESC when done to go back to prompt]
* If all else fails you can backup your settings to your sd card and re-install your rom (as a last resort)
-Good Luck

curiousandroid said:
Install App to System:
Place APK file in the root folder on your sd card.
Open terminal and enter these commands:
# su
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cat /sdcard/filename.apk > /system/app/filename.apk
# mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
# reboot
_____________________________________________________________________________________
Remove App from System (Be careful what you remove):
# mount -o remount,rw /system
# rm /system/app/Filename.apk
[Optional, to make read-only again]
# mount -o remount,r /system
[When Finished]
# reboot
_____________________________________________________________________________________
****KEY****
"#" means root command will follow
[Notes are in these brackets and aren't commands]
- ENJOY
ALSO...
**** I'm new to Android APP creation, but if anyone can automate this script to make a simple One-Click GUI APP that would be awesome, all I ask is that you put my name in the co-dev/"Thanks to" list for the app, just so I can say I helped ;-) ****
- CuriousAndroid
Click to expand...
Click to collapse
When I am doing the first part here of installing app to system I dont just simply do that first I can already have an app ready to go that I want to move to sd card right? I am just making sure I didnt have to do that simply first before I even start moving the apps. This site has be great and thanks for everybody help. Wish I would have known have this site way back when.

What is "yaffs2" standing for? I type "yaffs" instead of "yaffs2". What has this done to my system? Do I have to expect any "side-effects"?
When I call # ls | more to list the directories content, the apk is listed but it is not installed yet. Is there anything else i have to do?

yaffs is nand flash filesystem
yaffs2 is more elaborate updated version
yaff2 has greater support
so if your device isnt supported by yaffs1, it may not work.
it's best to follow the commands as they're written.
apps still appear as apks in system/apps folder after installation.

Haha thats funny!! I downloaded this app.. put it on my sdcard.. installed it and when i tried to open it it said " Shame on you for trying to pirate a 1.00 app "

If you have Applanet just go there and look for Systemapp Remover - it's a bit older version but seems to do the job.

By mistake my contacts.apk is removed. Above trick also not worked. my phone is LG GT540. Pl suggest any other way.

rajhan9412 said:
By mistake my contacts.apk is removed. Above trick also not worked. my phone is LG GT540. Pl suggest any other way.
Click to expand...
Click to collapse
Grab the contacts.apk from the rom you're running and push it back in. Btw titanium backup removes system/apps without terminal commands while allowing to to make a backup first in case u want. it back or for little hickups such as this.
Sent from transparent xda app by theimpaler747

I did everything right, and the apps that I removed disappeared from the app drawer. But, after I reboot my phone, they show up again.
What can I do?

In terminal type
ls system/app
Hit enter and see if said apps are in the list
Sent from my HTC Sensation 4G using XDA App

i got a better method.
app is called app quarantine
it need root and is totally free
it can quaratine every app including rom apps and system apps
really that thing awesome. no manuall backup needed anymore and as long you dont brick the os you can easy try and error - but of course still be carefull and login and activate com.brain.logic.provider lol

Hi there i use root explorer and that is the easiest way i think to remove system apps on android phones [root required] you can download root explorer from the market or get it from 4shared just search for root explorer.apk install it and navigate to /system/apps/ and the app you wish to delete long press the app and delete make sure you mount as read/write instead of read only.
Hope this helps 
@0mpranav

actually its not and actually you didnt read my post
i advertise this little peace of freeware because it really made my day (im not related in anyway to the developer)
the quarantine removes it but store it automatically in another directory
just multiselect and press one button DONE
no need to single delete something because you always should backup first
for example turns out on samsungs device EMAIl application is also related to exchange sync - huh i was happy to restore it
really take a look -
btw i hate the root explorer - for some taksts might be usefull but fileexpert is way better in that and its free as the quaratine app is too

bofh999 said:
actually its not and actually you didnt read my post
i advertise this little peace of freeware because it really made my day (im not related in anyway to the developer)
the quarantine removes it but store it automatically in another directory
just multiselect and press one button DONE
no need to single delete something because you always should backup first
for example turns out on samsungs device EMAIl application is also related to exchange sync - huh i was happy to restore it
really take a look -
btw i hate the root explorer - for some taksts might be usefull but fileexpert is way better in that and its free as the quaratine app is too
Click to expand...
Click to collapse
You were right mate got problems in upgrading my nexus one coz i deleted the .odex system apps directly without any backup but upgraded to 2.3.6 with some trial and error method but lost root access any help would be appriciated 
@0mpranav

Installing system app
Hi, i have the same problem. I tried Root Explorer, and the Shell Commands method (with Cat command), the files i copy are in there, with all the permissions and everything, but when i reboot, none of them are installed, and my "contacts" app is still broken. Can anyone help please?

Nevermind, found the problem. I needed the exact files for my Atrix 4G with the same android version.

Related

Can't delete Apps (A2SD)

Hi,
Ive got a problem. Yesterday i did the update from Dude 1.1 to 1.2, first without wiping, but then the G1 reboot when i want to download an app.
So i wiped it and it works fine. INternal Memory is 355MB free.
Today i wanna delete the APP SMS/MMS because i use chompSMS, but the G1 says that it cant delete. ("Uninstall not successful" "SMS/MMS could not be uninstalled")
So what could i do?
Thanx for ya help
if im not wrong in saying this, the stock sms mms program needs to be on the phone. chomp doesnt get your messages
it gets them from the stock messaging app.
Not sure what you're trying to uninstall (haven't heard of an app called SMS/MMS). However, if you're trying to remove the application "Messaging", you can't. Just disable notifications in the Messaging program and use chomp as the default.
Its the same with this Amazon Mp3 app, i cant uninstall it, what do i wrong? Or how can i get this app off my phone( dude 1.2 full)
You can't uninstall those programs..
G1StefanG1 said:
Its the same with this Amazon Mp3 app, i cant uninstall it, what do i wrong? Or how can i get this app off my phone( dude 1.2 full)
Click to expand...
Click to collapse
If you are using a G1 build, its in /system/app. Remount the system partition and delete it from that directory.
Yeah great, thanx for ya help.
But now I now i'll gonna be beaten for that question, but can you explain me what you mean with 'remount the system partition"?
I've looked it up with ASTRO Filemanager and its really in /system/app, but i cant delete it from there, if i want to it says again "error deleting file".
Just searched a bit around and found the remount command that i know from a2sd, so i think i have to go to Terminal at G1,
#su
#mount -o rw,remount /dev/block/mtdblock3 /system
#rm com.amazon.mp3 /system/app
Is this right? So then i'm gonna eating my shoes But i think it isnt so i ask you before i delete complete G1
Or is it enough to remount with that command above and then go with ASTRO FIlemanager to that directory and delete it?
G1StefanG1 said:
Yeah great, thanx for ya help.
But now I now i'll gonna be beaten for that question, but can you explain me what you mean with 'remount the system partition"?
I've looked it up with ASTRO Filemanager and its really in /system/app, but i cant delete it from there, if i want to it says again "error deleting file".
Just searched a bit around and found the remount command that i know from a2sd, so i think i have to go to Terminal at G1,
#su
#mount -o rw,remount /dev/block/mtdblock3 /system
#rm com.amazon.mp3 /system/app
Is this right? So then i'm gonna eating my shoes But i think it isnt so i ask you before i delete complete G1
Or is it enough to remount with that command above and then go with ASTRO FIlemanager to that directory and delete it?
Click to expand...
Click to collapse
Yes, you remount it that way (or with DroidSans) and rm the Amazon file. I would still recommend against deleting the messaging one though.
I tried it this way, but it says error "Read only file".
I think i just let it on the phone and try to ignore that app.
G1StefanG1 said:
I tried it this way, but it says error "Read only file".
I think i just let it on the phone and try to ignore that app.
Click to expand...
Click to collapse
use this code to remove amazon
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
rm -r /system/app/com.amazon.mp3
that will remove amazon but removing messaging will make your system EXTREMELY unstable and most likely unusable
The problem was that i don't add the Fileending ".apk"
Thanx for ya help, tubaking182. It worked with your Command with adding .apk
Got the next problem, now i want to delete the Messenger App 'IM' but even if i do the same with 'amazon mp3' it says rm: cannot remove '/system/app/com.android.im.apk': No such file or directory
So what i am doing wrong, i tried it with "rm -r /system/app/com.android.im.apk"
"rm -r /system/app/com.android.im"
And many more but i get ever the same output -> No such file...
That means theres no such file...doesn't exist.
IT might be named IM.apk
Mh you're right!
I dont know how it tells me 'com.android.im' in ASTRO Filebrowser, and why i could delete it with IM.apk
With AmazonMP3 i have also to write: com.amazon.mp3.apk
Doesn't matter, THANK YOU for the fast help
amazon
spend a couple bucks and get root explorer, it is well worth it, and then its very easy to delete anything after that.
Wait wait let me get this right ... with root explorer i could avoid the whole going to terminal and typing all that code and just simply delete the apk from root explorer program and thats it >?
Can it really be that easy ... tell me thats the case
Also when you use the terminal code or the root explorer method ( if it can be done like that) when you go to applications in the phone menu to view list of apps you still see the amazon mp3 app in the system .. how do i remove that also
Chosen_on184 said:
Wait wait let me get this right ... with root explorer i could avoid the whole going to terminal and typing all that code and just simply delete the apk from root explorer program and thats it >?
Can it really be that easy ... tell me thats the case
Also when you use the terminal code or the root explorer method ( if it can be done like that) when you go to applications in the phone menu to view list of apps you still see the amazon mp3 app in the system .. how do i remove that also
Click to expand...
Click to collapse
I'm testing right now..

How to UNINSTALL unwanted stock/preinstalled apps from G1

How to remove unwanted stock/preinstalled apps
This is not a question. This is howto
I DID search through the forum and found nothing but
Q: how to remove/uninstall preinstalled apps ?
A: no way !!!
WHAT ??? WRONG ANSWER !!!
Here is how:
First of all I’ll describe my rooted, of course, phone configuration, so if you are on the same boat you can do same trick 99% if not you’ll know where to go
- CyanogenMod 4.1.2.1 (this is latest experimental as of sept-05-09) –works very stable for me
- 4GB SD card partitioned: FAT32, ext3 (512mb), linux_swap (32mb)
(great guide how to part your sd here: http://androidcommunity.com/forums/f56/compcache-userinit-22465/index4.html#post232988 (page 4)
- CompCache with Backing Swap (here: http://androidcommunity.com/forums/f56/compcache-userinit-22465/index4.html#post232988 (page 1)
Requirements:
1) G1 rooted phone
2) Explorer with ability to explore /system folders – I use Astro (market)
3) PC/MAC
4) SDK installed on it (http://developer.android.com/sdk/download.html?v=android-sdk-windows-1.5_r3.zip)
Steps:
1) first and very important: full backup of your system.
- DO NANDROID (it’s preinstalled in Cyano, search forum for “nandroid” if you don’t have it)
- DO ext3.tar (if you use ext3)
- Make full SD copy to your PC
As described here: (yes, same tread, thanks to bdb4269) http://androidcommunity.com/forums/f56/compcache-userinit-22465/index4.html (page 4)
Now we are safe..well, almost
2) find full name for the application you want to uninstall, say for Amazon MP3 it will be com.amazon.mp3.apk
I did it like this
- open Astro explorer
- go to the very top (/)
- search “amazon”
- when search done, write down full app name
- long press trackball – chose – open containing folder – remember the path (ie /system/app)
3) Assume SDK and USB drivers are installed ( http://developer.android.com/guide/developing/device.html )
And phone is connected to pc/mac
= below guide is from http://oneclickandroid.blogspot.com/ with my comments =
- Start emulator (don’t think it is necessary, but lets follow – emulator located in SDK folder\tools\emulator.exe in my case C:\SDK_15\tools\
CMD window pops up for a second and disappeared
- open CMD prompt (in Windows: Start > run > print: cmd , hit OK/enter)
- execute "adb shell" in on terminal from SDK_ROOT/tool folder
(if you did not register SDK folder in windows variables you need to cd to this folder first:
print: cd c:\sdk_15\tools hit enter
print: adb shell hit enter, you’ll see new prompt appeared: #
- print: mount -o remount,rw /dev/block/mtdblock3 /system
This will mount your system folder with read/write permission
- go to system/apps folder of your phone
(print: cd /system/apps hit enter)
*** guide says “/system/apps” but in my case it is “/system/app” ??? (remember I asked you to write down full path and name from Astro ? check your path first ***
- print: rm yourunwantedapplication.apk
i.e. rm com.amazon.mp3.apk hit enter
now, check installed apps in your phone (no reload req.) – is amazon disappeared ?
I wish to try this with app for that has a replacement from the market, like
Dialer – aTakePhone or Music – Meridian etc
Hope someone brave will do it before I do
Deleting may be unsafe if other preinstalled apps or process have links to uninstalled app
What happens in this case? wish someone knows the answer.
I dont think this trick will speedup your phone if you've moved your apps to ext2/3/4 already I just dont want to see useless apps in my phone/pc
Please reply here if you have experience of deleting preinstalled apps
sorry, english is my second languague
Good luck !
Hahahaha... all that trouble just to install a few unnecessary apps off of a ROOTED phone?! If you had searched, you'd have seen the numerous posts where we've posted instructions on uninstalling apps through Terminal. Literally 4 lines of code at most! Note that you can do this with any app you don't want. I have xROM, and one of the first things I do whenever I clean install to the latest version is replace ringtones and remove apps, including HTC Mail, Email, Amazon mp3, and Android Music. It takes me about 2 minutes to remove these apps.
Example for removing Amazon MP3:
su
mount -o rw,remount /system
rm -r /system/app/com.amazon-mp3.apk
mount -o rw,remount /data
rm -r /data/data/com.amazon.mp3
exit
exit
uansari1 said:
mount -o rw,remount /data
Click to expand...
Click to collapse
/data is never mounted read-only.
zelipukin said:
...
- Start emulator (don’t think it is necessary, but lets follow – emulator located in SDK folder\tools\emulator.exe in my case C:\SDK_15\tools\
CMD window pops up for a second and disappeared
...
Click to expand...
Click to collapse
That's not how you start the emulator, in the window that disappears is a message telling you to start with the proper parameters, which you'd see if starting from a command line. If the emulator actually was running, then all your adb commands would then fail because it wouldn't know what device you wanted to address, you'd have to use "adb -d" to tell it to use the real device rather than the emulator.
jashsu said:
/data is never mounted read-only.
Click to expand...
Click to collapse
Thanks for the info.. guess I've been doing an extra step, but this means I can do I through terminal even faster.
Easy way to remove unwanted preinstalled apps
Use Root Explorer to browse to /data/app_s and find the applications you don't want. Delete the APK and ODEX files and you are done.
Always remember to make a backup of your phone, before you start deleting.
ewaldtx said:
Use Root Explorer to browse to /data/app_s and find the applications you don't want. Delete the APK and ODEX files and you are done.
Always remember to make a backup of your phone, before you start deleting.
Click to expand...
Click to collapse
The app_s folder is only used for Hero ROMs because there isn't enough space in /system, so it's placed in /system/sd (the mount point of the ext partition) if you have an ext partition for A2SD.
For regular google source builds just go to /system/app.
there is an app called rootexplorer it has a button to remove syatem apps. real easy to use. http://www.cyrket.com/package/com.sp...e.rootexplorer
saprano614 said:
there is an app called rootexplorer it has a button to remove syatem apps. real easy to use. http://www.cyrket.com/package/com.sp...e.rootexplorer
Click to expand...
Click to collapse
and it works great
Sorry to kind of hijack this but cyrket.com always shows as a blank page.
anyone know why or how to fix that?
i think simply deleting the apk files and data folder will keep an entry in some kind of registry in android. if i just delete the apk files and data folder and run fix_permissions, it shows the same number of processes.
SUFBS
is a rooted file browser and it is, by far, the easiest way of uninstalling any stock apps.
Click one button to make the system folder re-writable (same thing with data folder, just a button), navigate to the apps directory and just delete. or you can search for the app and just delete it from the search window. Voila!
Ssantos6981 said:
is a rooted file browser and it is, by far, the easiest way of uninstalling any stock apps.
Click one button to make the system folder re-writable (same thing with data folder, just a button), navigate to the apps directory and just delete. or you can search for the app and just delete it from the search window. Voila!
Click to expand...
Click to collapse
are you talking about rootexplorer or what? elaborate a little..
i just bought and downloaded/installed rootexplorer simply to delete stock apps. upon opening it ask me to allow it. i say yes and it says my phone isn't rooted.
weird.. i just upgraded from cyanogen v4.1.999( or something around that) to the newest 4.2whatever. so how if my phone not rooted?!
blackinches said:
are you talking about rootexplorer or what? elaborate a little..
i just bought and downloaded/installed rootexplorer simply to delete stock apps. upon opening it ask me to allow it. i say yes and it says my phone isn't rooted.
weird.. i just upgraded from cyanogen v4.1.999( or something around that) to the newest 4.2whatever. so how if my phone not rooted?!
Click to expand...
Click to collapse
try it again lol. it should work
make sure your not on the stock adp recovery
Root explorer!!!
Hi,
i'm trying ro remove stock apps for quite a few days, and i'm getting desperate!
I have everything... titatium, terminal, root explorer, etc etc
with terminal I also receive "directory not empty", but with root explorer I can delete the apk's from /system/app ... I confirm after that they are not there, bus as soon as I reboot the phone they come back.
what can I do ?
I have HTC desire with stock android, rooted .. and also a couple of programs I instaled I don't really knwo what they do.. like rom manager, clockword recovery, etc
plz help!
Sleeepy2 said:
Sorry to kind of hijack this but cyrket.com always shows as a blank page.
anyone know why or how to fix that?
Click to expand...
Click to collapse
It is because the full url path is not correct. Hover cursor over link and look at lower left corner to view the url path...it has those .... in it and will not work. We need the full exact url path.
just use titanum backup,rt click on application it will show (remove),be sure u didn't updated any stock app e.g gmail update
Regarding using Root Explorer on stock G Tab updated to 1.2-4349...
Trying to remove some of the apps preloaded and using Root Explorer get a statement - my phone not rooted.
I want to get the apps off. What to do now? Thanks http://media.xda-developers.com/images/smilies/smile.gif
Thanks for this clear procedure !

[Q] remove app from rooted g2 (not disable)

Hi,
Now that i've rooted my tmobile G2, i'd like to remove completely some of the apps that i disabled previously (like amazon or photobucket)
I've done some research and found this out
su
mount -o rw,remount /data (or /system)
rm -f /system/app/<apkname>.apk //Replace the blue text, <apkname>, with the name of the APK you want to remove.
pm uninstall <package name> //Replace the blue text, <package name>, with the name of the APK you want to remove.
however, when i run the mount command, i get
Usage: mount [-r] [-w] [-o options] [-t type] device directory
if i try to remove the app directly without running the command
package:/system/app/PbAndroid.apk=com.photobucket.android
i get
rm -f PbAndroid.apk
rm failed for -f, Read-only file system
how do i do this now?
thanks
try
mount -o remount,rw /dev/block/mmcblk0p25 /system
Best app is root explorer from the market... it deleted anything from the phone.
Sent from my HTC Glacier using XDA App
OR HERE'S THE FREE *AND* EASY WAY: download the free version of titanium backup, go to the middle tab, find your app, tap on it, then tap the uninstall button. App uninstalled!
Obviously this requires perma root.
Sent from my T-Mobile G2 running Cyanogenmod.
umm is it supposed to reboot my phone into recovery everytime i remove a stock app?
dietotherhythm said:
umm is it supposed to reboot my phone into recovery everytime i remove a stock app?
Click to expand...
Click to collapse
You're using the force uninstall in titanium backup. This was only necessary for nand locked devices, you can use the normal uninstall function now. Just tap, don't long press -- it'll give you a list of options.
so finally i have a chance to test this.
Thanks all for responding.
I tried the easier way with titanium backup.
I did the mistake of doing the long press and it rebooted.
But after that i just tried the "uninstalled" and it worked like a charm.
Thanks a lot.
Used titanium backup to delete all that crap. =)
Posted on my T-mobile G(spot)2 xD
Please check out my amazing blog- http://elgamerlife.blogspot.com/
i ended buying root explorer ( lcd density mod) my question is...
should i do a backup with titanium and then delete bloatware with root explorer?
I want to use R.E as it did cost me $
-FuRBz- said:
i ended buying root explorer ( lcd density mod) my question is...
should i do a backup with titanium and then delete bloatware with root explorer?
I want to use R.E as it did cost me $
Click to expand...
Click to collapse
If you have any doubt in your mind about whether you want to remove proprietary system app or not then yes, back them up with TB.

[TIPS][SCRIPTS][ROOT]egingell's scripts. Updated 11/22/13 11:30 MST

I will be using this thread to post my scripts and link them to other threads as needed. For this thread, I am assuming you know what you're doing. You don't need mad hacking skills and you don't need to be an expert (I'm sure as hell not), but knowing your way around the file system and basic shell scripting are helpful.
Some background: I am using the stock ROM and kernel (SGS2 - GB27, SGS4 - MDC), so all of my tips revolve around using stock and all of my scripts (even the flashable ones) will work without flashing from recovery (just extract the script from the ZIP and execute it while the phone is in phone-mode - you know... powered on ).
You are welcome to use my scripts in your apps. I only ask that you give me some credit.
I am not responsible for bricking your phone. I have only tested my scripts on my personal Samsung Galaxy S2 and S4 from Sprint. You are welcome to try on your phone, but I offer no warranties or guarantees as to whether they will work or not. Back up your ****!
All of this requires root!
Below is a list of the scripts I have written for y'alls. Enjoy.
Custom df: Shows where irregular mounts ("mount -o bind") are mounted. [ Forum post | Download ]
Currently doesn't work on my SGS4.
Easily move Phonesky.apk and GoogleServicesFramework.apk to /system or /preload for Multi DPI Play Store. [ Forum post | Download ]
Untested on my SGS4, but there's no reason to think that it won't work.
Use your SGS2's internal SD card for Link2SD instead of making a second partition on your external SD card (although, depending on the setup, you may still need to make a tiny partition on your external SD card) and your external SD card as your internal SD card [ Forum post ]
Untested on my SGS4. I have no need for it.
Clean up Link2SD: Delete files associated with Link2SD when uninstalling it. It does not revert the links Link2SD makes. It only deletes the mount scripts. [ Forum post | Download ]
If you use the debuggerd script to enable init.d, running this script will cause you to lose init.d.
Untested on my SGS4, but there's no reason to think that it won't work.
Delete Samsung's bloatware from the Sprint SGS2. [ Forum post | Download ]
Untested on my SGS4, but there's no reason to think that it won't work; however, it was written specifically for the SGS2's bloatware. See thread S4 System Apps Safe To Remove for a list of SGS4 bloatware apps.
Google Home Launcher (from Kit Kat).
Works on Jelly Bean.
Below are some other tweaks.
You can use custom boot animations with the stock ROM. All you need to do is swipe a "/system/bin/bootanimation" binary file from another ROM (such as @rujelus22's Blu Kuban FL24 (ICS) or Blu Kuban GB27 (JB 4.1.2)), paste it into "/system/bin", and make it executable.
For JB 4.2.2, make sure the user and group are root and shell respectively. This doesn't seem to be a problem with JB 4.1.2 and below. It's also possible that my initial testing involved a boot animation that didn't work on my SGS4, so if it works with root as both user and group, then roll with it. :good:
Also for JB 4.2.2, use the file from a JB 4.2.2 ROM, such as The Blu Kuban S4.
You can enable init.d scripts very easily by renaming "/system/bin/debuggerd" to "/system/bin/debuggerd.bin", replace it with the following, and make both files executable. If "/system/bin/debugger.bin" already exists, then edit "/system/xbin/busybox run-parts /system/etc/init.d" into "/system/bin/debuggerd".
As with the above, make sure the user and group are root and shell.
Code:
[color=green]#!/system/bin/sh[/color]
LOG=/data/debuggerd.log
echo "$(date)" > $LOG
echo "init.d" >> $LOG
/system/xbin/busybox run-parts /system/etc/init.d 1>>$LOG 2>>$LOG
echo "$(date) finished" >> $LOG
echo debuggerd.bin launched >> $LOG
exec /system/bin/debuggerd.bin
Below are some tips.
Most of the things you can do with a custom kernel, you can do with the stock kernel, it just requires more work and more risk.
If you replace an odexed system app with a deodexed system app, make sure you delete the app's ODEX file (it's the same file name except with the extension .odex).
Conversely: if you replace a deodexed system app with an odexed system app, you better have the ODEX file to go with it.
You can clear the dalvik-cache without a custom kernel by deleting the contents of "/data/dalvik-cache". You can even delete an individual app's dalvik-cache by finding the file "/data/dalvik-cache/[email protected]@[email protected]" or "/data/dalvik-cache/[email protected]@[email protected]" and delete it.
You can manually uninstall a system app's update by finding the file "/data/app/.apk" and delete it.
You can manually delete all user data by deleting the contents of "/data/data". You can even delete an individual app's data by finding the folder "/data/data/" and delete it.
Making scripts and binaries executable:
They must be on an EXT formatted filesystem (e.g. /data, /system, /preload).
They must be at least readable and executable by the user 'shell' (755 (read/execute for all, write only for user - "u=rwx,a=rx" if your busybox supports that method) is what I usually use).
Code:
chown root:shell ""
chmod 755 ""
chmod u=rwx,a=rx "" # busybox must support symbolic modes
Changing file permissions requires read/write access to the filesystem on which the file resides:
Code:
mount -o remount,rw /system # make the /system partition read/write
mount -o remount,ro /system # make the /system partition read only
The stock kernel is considered "production" whether or not it's rooted; therefore, you cannot use ADB to push or pull files directly to or from protected partitions, nor run ADB as root, nor use ADB's remount command, so you have to use unprotected partitions as a sort of buffer. You can, however, access the ADB shell and issue the "su" command wherein you can use "cp" to copy files to or from protected partitions prior to using ADB to push or pull the desired file. However, there is an app aptly named [root] adbd Insecure by @Chainfire that patches the ADB daemon to get around this limitation.
Example:
Code:
c:/android-sdk> adb shell
[email protected]:/ $ su
[email protected]:/ # cp /system/bin/debuggerd /sdcard/debuggerd
[COLOR="green"]-- open a new command prompt window --[/COLOR]
c:\android-sdk> adb pull /sdcard/debuggerd debuggerd
c:\android-sdk> adb push debuggerd /sdcard/debuggerd
[COLOR="green"]-- switch to the first command prompt window --[/color]
[email protected]:/ # mount -o remount,rw /system
[email protected]:/ # cp /sdcard/debuggerd /system/bin/debuggerd
[email protected]:/ # chown root:shell /system/bin/debuggerd
[email protected]:/ # chmod 755 /system/bin/debuggerd
[email protected]:/ # mount -o remount,ro /system
Some noteworthy files and folders:
/proc/self/mountinfo: If you can read it, it tells you where your partitions and folder binds are mounted.
/proc/partitions: Shows all of your SD card's partitions, how many blocks each has, and their vold numbers (eg "179 1 30578964 mmcnlk0p1").
/dev/block/platform/dw_mmc/by-name: This folder contains symlinks to your internal eMMC's partitions indexed by what they are for (eg UMS for your internal SD card - "realpath /dev/block/platform/dw_mmc/by-name/UMS" will print out the device path (ie "/dev/block/mmcblk0p11")).
/dev/block/platform/dw_mmc/by-num: This folder is like the previous except that they are indexed by partition number (eg "p11").
/proc/version: Shows what version of Linux is currently being used.
/data/system/batterystats.bin: Delete this when your battery is fully charged and still plugged in to recalibrate it.
Footnotes:
For "/data/app", "/data/data", and "/data/dalvik-cache" files you need to know the package name. There are various apps that will tell you, including Link2SD (mentioned above), Titanium Backup, and the web URL of the app in the Play Store (ex: https://play.google.com/store/apps/details?id=com.devname.appname).
More:
Random boot sound using your notification sounds
Make ADB work for all users - Jelly Bean 4.2.2 (Updated 07/15/13 00:35 MST)
Stock ROM - SGS4 - init.d
No-data restore tips
SGS4 Bloatware Remover
Make apps run faster and increase battery life
Random boot sound using your notification sounds
The attached ZIP contains a script that can be run pre or post boot. It just needs to be executable.
Preboot requires init.d. See the OP for enabling it if you are on a stock rooted ROM and requires the file to be readable and executable ("chmod 755" works fine).
Postboot requires an app such as Scripter (ROM Toolbox) or Script Manager to execute the script at boot.
Requires the variable $RANDOM. You can make sure it's available from the command line ("echo $RANDOM").
Use this script at your own risk. I provide no warranties or guarantees.
What does this script do?
Check for carrier boot up sounds (sub folders in the "/system/media/audio/ui" folder) and moves them to "/system/media/audio/notifications" renaming them as needed.
Create symlinks in the above folders to "/system/media/audio/ui/PowerOn.ogg".
Check if "/system/media/audio/notifications/PowerOn.ogg" is present and copy it to "/system/media/audio/ui/PowerOn.ogg" it's not.
Count the number of files in "/system/media/audio/notifications".
Grab a random number between 1 and the number of files found inclusive (math notation: "[1, numFiles]").
Go through "/system/media/audio/notifications" and copy the file at index random to "/system/media/audio/ui/PowerOn.ogg".
Notes:
The stock file is included. If you want a different sound in its place, you can either comment out that line in the script and delete the "/system/media/audio/notifications/<subfolder>_PowerOn.ogg" files from "/system/media/audio/notifications" or just replace "/system/media/audio/notifications/PowerOn.ogg" with some other sound file and still delete the "/system/media/audio/notifications/<subfolder>_PowerOn.ogg" files from "/system/media/audio/notifications".
If you want more sounds, just copy them to "/system/media/audio/notifications" (OGG files only).
The script does not check for valid files and blindly renames the destination file to "PowerOn.ogg".
It does not look in "/sdcard/media/audio/notifications" or anywhere else for audio files.
I do not recommend using alarms or ringtones files as they are usually looped which can cause the media scanner to get stuck and overheat your phone or tablet - those files may continue to play even if you can't hear them.
If you can't hear a sound on boot, it is likely that the file is either invalid or has no audio (ex: my /system/media/audio/ui/BST/PowerOn.ogg has no audio).
It was tested and works on a Samsung Galaxy S2 (stock JB 4.1.2) and a Samsung Galaxy S4 (stock JB 4.2.2) both from Sprint and using stock kernels.
There's no obvious reason it won't work on other phones and tablets with other ROMs from other carriers.
Nice work E.
cerj said:
Nice work E.
Click to expand...
Click to collapse
:good:
Make ADB work for all users - Jelly Bean 4.2.2 (Updated 07/15/13 00:35 MST)
With Android 4.2.2, ADB now requires RSA keys. This poses a problem when attempting to connect to the device's ADB server from the device itself and the device won't ask for authorization unless it's connected via USB. Well, there's hope, yet.
For the following, I'm assuming you used my method for adding init.d support to your device.
Use these scripts at your own risk. I provide no warranties or guarantees.
Add the following script to /system/bin/debuggerd. If you use an alternate method, please note that it must be executed by the debugger daemon. You must do this first or you'll have to manually restart the debugger daemon after editing this file and executing the run-once script (next step), so edit this file first and save it.
Code:
if [ ! -e "/.android" ]; then
busybox mount -o rw,remount /
mkdir /.android
mount -o bind /data/.android /.android
busybox mount -o ro,remount /
fi
Then run this script once from the device (not over ADB on your PC).
Code:
[COLOR="Green"]#!/system/bin/sh[/COLOR]
HOME=/data
adb kill-server
adb start-server
stop adbd
cat /data/.android/adbkey.pub >> /data/misc/adb/adb_keys
echo "" >> /data/misc/adb/adb_keys # Add a blank line at the end of the file
start adbd
HOME=/
adb kill-server
stop debuggerd
start debuggerd
Notes:
You can also find the abdkey.pub file on your Windows' PC here, C:\Users\<user name>\.android\adbkey.pub. Copy it to your device by whatever means necessary, then append it to /data/misc/adb/adb_keys and you won't need to initially use the USB to allow the PC connection. Not really necessary unless your PC has no USB or you've broken your USB cable.
This may have inadvertently corrected the mounting issue introduced in Jelly Bean 4.2.2.
You can also allow other Android 4.2.2 devices, but it requires ADB version 1.0.31 and for you to manually append the contents of /data/.android/adbkey.pub from device A (the one you want to use to ADB on) to /data/misc/adb/adb_keys on device B (the target device).
Don't delete /data/.android
This won't fix apps. Just allow you to use ADB to connect to your device from itself.
Tested on my SGS4. No reason it won't work on other devices.
If you already have a /data/.android directory, you may not need to do this. On my SGS4, HOME defaults to "/" which the ADB daemon can't write to, so it can't make the RSA key.
The run-once script temporarily changes HOME to "/data", a writable directory, so the ADB daemon can write the RSA key then it append it to the allowed clients file then restarts the debugger daemon thus binding /data/.android to the /.android directory allowing all Linux users ADB access to the device.
Reassigning HOME to a new value on one user only changes its value for that user which is why I'm binding /data/.android to /.android.
Code:
# Example
[email protected]:/ $ echo $HOME
/
[email protected]:/ $ HOME=/data
[email protected]:/ $ echo $HOME
/data
[email protected]:/ $ su 1000
[email protected]:/ $ echo $HOME
/
Alternatively (much easier):
Make the .android folder in /data (mkdir /data/.android).
Add the script, the first code block in this post, to your debuggerd file or an init.d script.
Restart the debugger (stop debuggerd; start debuggerd) or reboot the phone.
Restart ADB (stop adbd; start adbd).
Copy the newly created public key to the allowed clients (cat /data/.android/adbkey.pub >> /data/misc/adb/adb_keys; echo "" >> /data/misc/adb/adb_keys).
Restart the ADB server (adb kill-server; adb start-server).
SGS4 Bloatware Remover
I have written a live-script to delete all of the SGS4 bloatware except GoogleContactsSycAdapter and SecLauncher3. If you want to delete those, remove the "#" from that line in the script. If you want to exclude an app, add a "#" to that line and put the app name in quotes (ie AppName / becomes "#AppName" / (including the forward slash) or just remove that line. If you remove the last item (YouTube in this case), remove the forward slash from the previous line.
Use this scripts at your own risk. I provide no warranties or guarantees.
What this script does:
Move the app's APK and ODEX to /sdcard/SystemAppsBackup.
Delete its dalvik-cache.
Reboot the phone. If it doesn't reboot, you'll have to do this yourself.
What this script does not do:
Delete the app's data. Because the script doesn't know the package name.
Delete its Play Store update (located in /data/app). Because the script doesn't know the package name.
Mount the SD card if it's not mounted. If you want backups, make sure the SD card is mounted.
Care if you delete a system app you wanted to keep. Most apps that you would want to keep may be available in the Play Store.
Restore apps.
Notes:
Apps will crash left and right when you execute this script in running mode. Don't fret, this is normal.
This is a live-script which means you have to manually execute the script either with a terminal emulator, a script executor like Scripter, or ADB.
This is not flashable.
If executing via ADB in Recovery mode, you may need to mount the SD card to /storage/sdcard0 manually or settle for no backups.
If you restore an app from /sdcard/SystemAppsBackup, make sure you get the ODEX file if present and set the permissions for both to 644.
This list is based off the list in the thread, S4 System Apps Safe To Remove.
Here You Go Guys, I took me about 30 mins, but I have successfully added all the app in the Op to a flashable Zip.
The Zip is base of TrulyClean v1.6 script code, I just deleted his ;delete/system/...apk and replaced it with all the ones from the OP
bigtobitobs said:
Here You Go Guys, I took me about 30 mins, but I have successfully added all the app in the Op to a flashable Zip.
The Zip is base of TrulyClean v1.6 script code, I just deleted his ;delete/system/...apk and replaced it with all the ones from the OP
Click to expand...
Click to collapse
Looks like you're deleting bloatware, perhaps you should post that in the right thread... or at least a more appropriate thread.
Sent from my SGS4.
egingell said:
Looks like you're deleting bloatware, perhaps you should post that in the right thread... or at least a more appropriate thread.
Sent from my SGS4.
Click to expand...
Click to collapse
LOL OMG I am so sorry, I had multiple tabs open and put this in the wrong forum. Please Delete
bigtobitobs said:
LOL OMG I am so sorry, I had multiple tabs open and put this in the wrong forum. Please Delete
Click to expand...
Click to collapse
Would that I could.
Sent from my SGS4.
Make apps run faster and increase battery life using Xposed App Settings.
Did you install GravityBox on your SGS4 then uninstall it and now you can't hear your games or music?
I think it has to do with GravityBox's "Volume Steps" option not undoing when GB is uninstalled. This is how I fixed it (forum post).
Stock ROM - SGS4 - init.d
I recently found out that my debuggerd hack to enable init.d support on my stock SGS4 wasn't working. So, I did this and now it works.
Make a file named "install-recovery.sh" and drop it into /system/etc. Whatever script you put in here will execute at boot up so long as the user/permissions are correct.
Code:
chown shell:shell "/system/etc/install-recovery.sh"
chmod 755 "/system/etc/install-recovery.sh"
chmod u=rwx,a=rx "/system/etc/install-recovery.sh" # busybox must support symbolic modes
Use this script at your own risk. I provide no warranties or guarantees.
My "/system/etc/install-recovery.sh" script:
Code:
[COLOR="Green"]#!/system/bin/sh[/COLOR]
LOG="/data/install-recovery.log";
echo "Executing install-recovery.sh" > $LOG;
echo "" >> $LOG;
echo "$(date) install-recovery hack..." > $LOG
echo "" >> $LOG
echo "init.d" >> $LOG
[COLOR="green"]# I can't get run-parts to work for some reason, but this will run every *.sh script in /system/etc/init.d as root.[/COLOR]
for N in /system/etc/init.d/*.sh; do
su -c "$N" 1>>$LOG 2>>$LOG
done;
Notes:
Mount binding (in JB 4.2.2+) seems to work. E.g. mount -o bind /folder1 /folder2
$(date) does not provide the correct date (mine said: "Wed Apr 15 13:24:13 MST 1970").
The Package Manager is not available. (There may be other unavailabilities, but I don't intend to test it thoroughly.)
Somethings I discovered recently while doing a no-data system restore for the second time in the same night and some tips relating to system restores:
* When doing a no-data restore, disabled/frozen system apps remain disabled.
* Apps that can't be disabled even with Titanium Backup will not remain disabled after a reboot and will sometimes crash/FC repeatedly until uninstalled.
* If an app won't open or FCs, try converting it to a system app and back to user app or vice versa.
* Don't integrate system app updates into the ROM. In the event that you have to do a no-data restore, those updates will be retained.
* Don't convert user apps to system apps for the same reason.
* Disregard the previous two tips if disk space is a problem. It's just more time consuming (redownloading updates, reintegrating, and reinstalling) after a restore.
* Save all modified system files, such as /system/bin/debuggerd, /system/build.prop, /system/etc/install-recovery.sh, and if your ROM uses /system/etc/unit.d, any modified or extra files there. If you use them, you'll need them after a restore.
* For a smoother post no-data restore, use Titanium Backup's labels so you can batch-uninstall those pesky system apps you don't want.
SGS2 - JB 4.1.2 GB27
SGS4 - JB 4.2.2 MF9
any command for updater script to make directory in root of android ??
HassanMirza01 said:
any command for updater script to make directory in root of android ??
Click to expand...
Click to collapse
Creating directories in / and all the files contained therein must be redone on every boot. That said, you just need to make root writable and make the directory.
mount -o remount,rw /
mkdir /whatever
mount -o remount,ro /
Note: Every time you wish to create, modify, or delete files you'll have to make root writable.
Sent from my LG-H811 using Tapatalk
egingell said:
Creating directories in / and all the files contained therein must be redone on every boot. That said, you just need to make root writable and make the directory.
mount -o remount,rw /
mkdir /whatever
mount -o remount,ro /
Note: Every time you wish to create, modify, or delete files you'll have to make root writable.
Sent from my LG-H811 using Tapatalk
Click to expand...
Click to collapse
Actually.... I wanna add some files within folder in root of android root... So i need to use above three commands nd then after making directory, i should extract files to that folder ??
HassanMirza01 said:
Actually.... I wanna add some files within folder in root of android root... So i need to use above three commands nd then after making directory, i should extract files to that folder ??
Click to expand...
Click to collapse
Yes.
Sent from my LG-H811 using Tapatalk
:good:

[Q] How do I delete system apks?

I can't figure out how to delete some of the system apks off my rooted Nook Simpletouch. Running 1.2.1, and Nootered it. Tried to ADB uninistall Phone.apk, but it just reports failure. I could use some help.
/system is usually read-only.
To make changes in its content you need to remount it read/write:
Code:
stop
mount -o rw,remount /dev/block/mmcblk0p5 /system
The stop is to be on the safe side, it stops the android subsystem.
After you are done making changes it's best to:
Code:
reboot
Renate NST said:
/system is usually read-only.
To make changes in its content you need to remount it read/write:
Code:
stop
mount -o rw,remount /dev/block/mmcblk0p5 /system
The stop is to be on the safe side, it stops the android subsystem.
After you are done making changes it's best to:
Code:
reboot
Click to expand...
Click to collapse
Just rename them. add ",bak:" to the end or similar. This will disable them, and if you notice instabilities because of getting rid of them you can just remove the appended extension. If everything runs well, you can then delete them with no worries.
I've renamed some of the recommended ones and have an error that comes up. "A problem has occurred, contact support". I need to figure out what is causing that to happen. its annoying but doesn't seem to be an actual problem.
What does "mmcblk0p5" represent?
mmcblk = multimedia card block device, 0 = first device, p5 = fifth partition
Thanks Renate, but It's not working. In order to rename or delete an apk off my Nook simpletouch, would someone please give me step instructions? I feel I'm missing something.
Code:
stop
mount -o rw,remount /dev/block/mmcblk0p5 /system
cd /system/app
mv BoringApp.apk BoringApp.bak
mv TediousApp.apk TediousApp.bak
reboot
And don't tell me that you have no boring or tedious apps!
The advice here is correct, better to rename sysapp extensions (.bak or .ap_) than delete as some might be needed by future apps/sys hacks/kernels. For those who can't adb by cable or keep it up wifi-wise, this is the easiest way even easier than root explorer:
https://play.google.com/store/apps/details?id=com.ghisler.android.TotalCommander
for sys or user app removal if you have to and can't use adb or even total commander, but then you shouldn't if not knowing sys file structures (I use Pro version, for removing many apps i just tested in a batch, sorted reminder):
https://play.google.com/store/apps/details?id=com.jumobile.manager.systemapp
I renamed talk telephone music audio etc apks on nst but Gallery is the only one I removed on all android devices & nst as it's just nasty which has never been missed by later hacks and quickpic is much better anyway:
https://play.google.com/store/apps/details?id=com.alensw.PicFolder
I created another directory under /system called archive. I move apps I don't what to use and fonts I change into /system/archive then I can just move them back if I have issues.
This still isn't working. My commands keep getting rejected. It isnt allowing stop to work. Also, I tried "adb cd /system/apps" and when that didn't work, I tried
"adb shell"
"#cd /system/apps"
No dice.
EDIT: Got it. needed to call it shell instead of adb. I also accidentally wrote "apps" instead of "app".

Resources