[Q]Deleting preinstalled apps - General Questions and Answers

I am trying to get rid of lots of bloatware that I don't want in my new unlocked Motorola Atrix hd phone. I have rooted the phone and got terminal emulator and su working. When I read around on the internet, there are posts describing to remount the /system/app for read/write, delete the apk and odex files and the remount again for read only.
My understanding is that root should be able to "rm" those files in "su" mode if you can see them. So why do we have to remount them before deleting and after? What does it do? What happens if I simply "rm" the apk and odex files in /system/app without remounting before or after, I mean if I am able to "rm"?
Thank you.

I believe the logic is that for security reasons the system/app partition is mounted in read-only mode by default. With root privileges, you can mount it as read/write and make changes such as removing apk files. When you're done editing, you should remount the /system/app partition as read-only, restoring it to its default state. If you don't, any process could theoretically make changes to the files in that partition which could damage your OS or apps.

So we remount the partition because we cannot delete them otherwise. That means if we are able to delete them without remounting, it is OK to do so. Correct?

I believe so. But just to be sure, I would strongly advice to make a nandroid backup before you delete any files.

skipperx said:
I am trying to get rid of lots of bloatware that I don't want in my new unlocked Motorola Atrix hd phone. I have rooted the phone and got terminal emulator and su working. When I read around on the internet, there are posts describing to remount the /system/app for read/write, delete the apk and odex files and the remount again for read only.
My understanding is that root should be able to "rm" those files in "su" mode if you can see them. So why do we have to remount them before deleting and after? What does it do? What happens if I simply "rm" the apk and odex files in /system/app without remounting before or after, I mean if I am able to "rm"?
Thank you.
Click to expand...
Click to collapse
Just use this app free from the Play Store: https://play.google.com/store/apps/details?id=com.jumobile.manager.systemapp
No messing around with Terminal and any commands.

I found out. I could not delete even as su and got a msg that it was read only. That's why we need to remount.

Or you can use Titanium Backup. TB has option to backup system app&data and then remove.
It's safer...

You can also freeze apps with TB. If something goes wrong, you can unfreeze it or do factory reset.

Related

The proper way to remove a system applications

Dears,
I'm using the last Cyanogen and I would remove some applications that stay in /system/app. I know that I can do this just with:
- rm /system/app/NAME.apk
- rm -r /data/data/NAME
but in this way the application data remains in /data/system/packages.xml: I don't want to manually change this file. Is there a more clean and automatic way to do that?
For the applications in /data/app, I can use 'adb uninstall NAME' but it seems that is not appliable to the ones in /system/app. Even after a 'adb remount'.
Any suggestions?
Just delete them.
anyone knows?
i wanna get rid of the default IM.. and amazon mp3
I repeat myself: Just delete them.
It isn't dangerous or "unclean".
Just be a little aware that some apps might seem superfluous, but actually do things other than the part you see. For example, you can't delete the stock Mms.apk and use ChompSMS as your sole SMS application - the stock app also contains the framework for the device to receive SMSes at all. I would rename files rather than deleting them, i.e.
mv thingyouwanttodelete.apk thingyouwanttodelete.old
rather than
rm thingyouwanttodelete.apk
because you can always then put it back afterwards if you find something doesn't work afterwards.
I think Cyanogen latest rom has the system app's folder as read only. So you would need to remount the drive as Rewriteable to make any changes to the files.
njakobs said:
I think Cyanogen latest rom has the system app's folder as read only. So you would need to remount the drive as Rewriteable to make any changes to the files.
Click to expand...
Click to collapse
what are the steps to remount as rw?
chmod +rw?
farbird said:
what are the steps to remount as rw?
chmod +rw?
Click to expand...
Click to collapse
-bash-3.2$ ./adb remount
remount succeeded
adb remount - remounts the /system partition on the device read-write
adb root - restarts adb with root permissions
You can delete stuff in the update.zip then just resign it. I wouldnt delete any com.**** stuff or htc.**** except widgets(on hero) always copy the update zip before you start editing so you can always add what is needed
Start asking your questions in the right sub-forum (Q&A) (Theme) or even in (General), or i will be forced to ban you for 3 days or till you learn.
Thanks
Thread Trashed!!

Question about adding stock apps back

I have read and still don't understand how to add back apps like Sprint TV. I have them all saved on my computer I just do not know the commands to get them back into the phone. Do the apps I want to ad back need to be in a certain dir on my computer first. If someone could explain or either point me to a thread that explains this I would really appriciate it.
Seems I found an easy way to add sprints, htc's apps back into the phone once removed. I saved all of them on my computer and used HTC Sync to install the app back. I removed Nscar as a test using root manager, rebooted and it was gone, then opened up HTC synch and added it back. Not sure how to get the odex files back in but it works with apk files.
AFter testing it om HTCfootprints it would not install this. Installed Nscar with no problems.
I am also trying to figure out how to add sprint tv back onto my Hero. I see that people are saying to use adb push, but I can't seem to get it to work. I just rooted with the new fresh rom and everything is great, I just want to add back sprint tv. Any help would be appreciated, thanks
Im a total noob, but I got it the apps back on this way:
Go to the directory where the ADK Tools directory is. Then the following commands:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
chmod 777 /system
chmod 777 /system/app
exit
exit
Then I copied the .apk files that I wanted to push to the tools directory
I am in.
Then did this:
adb push Sprint_TV.apk /system/app
I found it is case sensitive, so make sure you type the filename exactly.
I rebooted my phone and the apps (such as Sprint TV) were back.
I hope this helps, like I said, I spent an hour trying to figure it out, but this worked for me.
I would not recommend doing a chmod 777 on your system or app directory. Not that anything bad will necessarily happen, but it's generally not a good idea to mess with system file permissions when you don't have to.
Your procedure would work fine without those commands at all, in fact. You don't even need to enter the shell; just adb remount and then adb push.
those instructions worked perfectly. Thanks a ton.
I tried this with HtcFootprints. I removed the widget as well. When I added all 4 back in I can see the widget for footprints, but the footprint icon does not show up in the apps section.
Another thing of intrest. When I added Nscar back using HTC Sync, it now shows up as a third party app. It is no longer a system app and I can uninstall it like a market app.
Ok scratch that I did the Footprints again and the Icon is now there Thanks a Ton
I was able to push HtcTwitter.apk and .odex. i cannot get the widget to show up in the add HTC widgets menu. Any ideas?
Well, after trying my hand at update/rom modding with some success... I'm willing to take a shot at making update.zip files to easily flash individual stock apps back onto your phone. That's if there's any interest.
obelisk79 said:
Well, after trying my hand at update/rom modding with some success... I'm willing to take a shot at making update.zip files to easily flash individual stock apps back onto your phone. That's if there's any interest.
Click to expand...
Click to collapse
That would be great and very helpful to many
Easy Peasy App Install
I just copied the files to my SD card. I then browsed to the SD card folder using Linda File Manager and "clicked" the file. It asked me if I wanted to use Linda File Manager or Package Installer. I selected Package Installer and it proceeded to installed the package for me. Not need to get into the console or use any commands.
VOILA!

[Q] 30 fps

sorry for this post but i dont have the required 10 posts to post in the devolpment thread already on this subject.
I tried the 30fps fix by copying the 4 .so files over but i am still getting 15fps. I am running the latest S7 rom. I dont know what i am doing wrong. I paste them into system/lib and it says that the action was complete. i try to take a vid before and after a reboot and they are still just 15fps. any suggestions.
I've noticed that the multi select function on root explorer and maybe other file managers doesn't work if you are over writing files, might not work for any copy/paste function. I would rename the old files *.so.bak then copy the new ones one by one. after that reboot and see if the changes stuck. if not make sure you are actually rooted. could have a bad su binary causing havoc or something. if you have root ant it is working then to make 100% sure you are mounted rw go into a terminal emulator or adb shell and type
su
(phone should ask for super user permissions or give a toast or notification that su was granted)
mount -o remount,rw /dev/block/stl9 /system
if you don't get any error about illegal operations or permission denied then you should be able to copy the files with 99% certainty. of you have any trouble be sure to include details.
Thanks for the response. I do have full root access. I double checked. I also keep getting a su binarry update warning from Superuser. I update it but everytime i restart the phone it tells me i have to update again. My next mission is to figure out why it keeps reverting back.
I did what you said and replaced the files one at a time. and renamed the originals instead of putting copyies in another location and trying to overwrite the orginals. thank you for your help. I am now recording at 30fps after a reboot.
update to the newwest entropy DD kernel. the older kernels rooted the phone but the trouble with that is if you update the binary the kernel overwrites it on next boot. this is on way the binary can get corrupted.
Renaming the original to .bak also allows you to compare the permissions of the posted file to the original permissions. In some cases, I noticed made a different.

Cannot delete files or folders within /data/data/

Setup: CROMI 3.4.7 with Data2SD
I am having issues deleting folders and files within the /data/data/ portion of my file structure. I have tried with both th File Manager HD and ES File Explorer but I keep getting messages saying that I am unable to delete those folders and files.
The reason I am trying to delete this is because I was unable to install certain apps, and continually got an error message during installation that said:
Unknown error code during application install: "-24"
From searching forums, I found that the issue is that previous installations (I guess I forgot to do a factory reset before reflashing a ROM) left certain system folders and files for certain applications, which prevented a fresh installation from taking place. Other users have resolved this issue by deleting the relevant files in the /data/data/ section of their tablet.
I have circumvented the issue by renaming those folders (which for some reason works), but still cannot delete those renamed folders. I've tried messing with the permissions, but still no luck.
Any ideas?
Possibly an ownership problem?
Boot into recovery, plug in the USB cable, go into adb shell. Make sure that /data is mounted. Then do something like:
cd /data/data
chown -R media_rw.media_rw *
Might wanna backup first...
danger-rat said:
cd /data/data
chown -R media_rw.media_rw *
Click to expand...
Click to collapse
Don't do that if you want any apps to work afterwards.
Eeeeek, good catch!
I was thinking data/media.
You could do this just for the specific folders you want to delete, but not all...

[Q] Does Android have a "hosts" file?

I was wondering if Android has a file similar to a windows hosts - a file that manually maps IP addresses to domain names.
Thanks.
Yes. It's in /system/etc/hosts. -- You'll need to be rooted, and remount /system as read/write to be able to modifiy it.
Magamo said:
Yes. It's in /system/etc/hosts. -- You'll need to be rooted, and remount /system as read/write to be able to modifiy it.
Click to expand...
Click to collapse
I'm actually following the instructions here:
http://www.howtogeek.com/140576/how-to-edit-the-hosts-file-on-android-and-block-web-sites/
And it says "failed to copy to /system/etc/hosts: Read-only file system".
Any thoughts?
That howto foolishly leaves out two crucial steps.
adb root
adb remount
Before you try pushing the file back to the phone. As I said, this requires your phone to be rooted, and /system to be remounted as read/write.
Sent from my SGH-T699 using Tapatalk
It worked, but do I need to undo the changes? (ie, unmount, unroot before I disconnect the phone).
You shouldn't need to, however, remounting /system as readonly is not a bad idea, it would prevent malicious apps, unless designed in just such a way from writing there. Worse comes to worse, if you can't figure out how to remount it as ro, you can reboot the phone, and that will do so.

Categories

Resources