ADB questions / mounting system as RW

duck on quack

Member
Joined
Sep 28, 2010
Messages
42
Reaction score
0
Hi.

I have a newly-rooted Droid 2, and I had intended to remove those annoying pre-installed apps that love to run in the background for no reason. I understand that doing this is not initially possible even post-root because /system is read-only. I have been googling and attempting to change this for hours with no success.

In ADB, I enter the following command: "mount -o remount,rw -t ext3 /dev/block/mmcblk1p21 /system". I have tried changing the command slightly and still get no result. For example, inputting "rm com.amazon.mp3 /system/app" after the attempted mount just returns "rm failed for com.amazon.mp3, Read-only file system".

Is the command itself wrong or am I using ADB incorrectly? Is USB debugging always required in order to input these commands with success? For whatever reason I cannot get the USB debugging to remain activated while in PC Mode, only Charge Mode. I couldn't even get SU privileges within ADB from Charge Mode initially; I had to switch to PC Mode in order to see the SU notification on my phone. Now I'm unsure which mode to leave it in.

I'm new to all of this stuff, so sorry if these questions are basic. My phone has been rooted for hours and I haven't managed to remove a single app... let alone do anything else.

Thanks.
 

pool_shark

Senior Member
Joined
Mar 28, 2010
Messages
1,401
Reaction score
14
Location
Ohio
If you have the commands on your device, just run it from the command line.

That's what I do.
I have a shell script that mounts and umounts the FS.
 
OP
D

duck on quack

Member
Joined
Sep 28, 2010
Messages
42
Reaction score
0
Just to clarify, do you mean try entering the mount command into something like Terminal Emulator on the phone itself? I've also discovered the existence of a free app called "Mount /system (rw)" which supposedly does just that, but it doesn't have many downloads and I'm not sure it could return /system to RO.
 

pool_shark

Senior Member
Joined
Mar 28, 2010
Messages
1,401
Reaction score
14
Location
Ohio
Yes, you can run it from the terminal emulator.
If I'm not mistaken, if you change the FS to rw, as soon as you kill the terminal emulator, the FS goes back to ro.
 
OP
D

duck on quack

Member
Joined
Sep 28, 2010
Messages
42
Reaction score
0
Well... tried that. Still nothing. Entered the mount command exactly as I mentioned in my first post, then tried removing Amazon MP3 again all through Terminal Emulator. Got the same error about how the file system is read only.

I can only assume that I'm typing the mount command incorrectly. I also tried "mount -o remount,rw /dev/block/mmcblk1p21 /system". Nothing. When I try just "mount -o remount,rw /system", both ADB and Terminal Emulator return a "Usage" message as though I am formatting the command incorrectly.

What am I doing wrong?
 

MNDuke

New Member
Joined
Sep 16, 2010
Messages
25
Reaction score
0
I went the Root Explorer route and just renamed all the bloat that I didn't want to .bak
 

pool_shark

Senior Member
Joined
Mar 28, 2010
Messages
1,401
Reaction score
14
Location
Ohio
Well... tried that. Still nothing. Entered the mount command exactly as I mentioned in my first post, then tried removing Amazon MP3 again all through Terminal Emulator. Got the same error about how the file system is read only.

I can only assume that I'm typing the mount command incorrectly. I also tried "mount -o remount,rw /dev/block/mmcblk1p21 /system". Nothing. When I try just "mount -o remount,rw /system", both ADB and Terminal Emulator return a "Usage" message as though I am formatting the command incorrectly.

What am I doing wrong?

Do you have the files on your SDcard?
That is the correct command and syntax.
 

Redflea

Silver Member
Joined
Nov 18, 2009
Messages
1,954
Reaction score
3
You're typing:

"mount -o remount,rw -t ext3 /dev/block/mmcblk1p21 /system"

I use:

"mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system"

Did you try that? I thought the read/write (rw) needed to be in front of the remount command.
 
OP
D

duck on quack

Member
Joined
Sep 28, 2010
Messages
42
Reaction score
0
Do you have the files on your SDcard?
That is the correct command and syntax.
Do I have which files on my SD card? I'm only interested in removing bloatware from the system folder.

You're typing:

"mount -o remount,rw -t ext3 /dev/block/mmcblk1p21 /system"

I use:

"mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system"

Did you try that? I thought the read/write (rw) needed to be in front of the remount command.
Tried that just now. Nothing. What is the command prompt supposed to return after you input the correct command? In adb shell it just spits back whatever I typed and Terminal Emulator says nothing.

If I type just "mount" and verify the directory from the huge list that appears, it shows up as "/dev/block/mmcblk1p21 /system ext3 rw,relatime,data=ordered 0 0"

Doesn't that "rw" after /system ext3 indicate that the directory is already rewriteable? If so, why can't I rm anything?
 

pool_shark

Senior Member
Joined
Mar 28, 2010
Messages
1,401
Reaction score
14
Location
Ohio
The command line won't give any feedback if the command is successful.

Make sure you're at the # when you enter the command.
Afterward to check it,
# cd /system
# touch test

If the # returns then it worked, if not it will give an error.
 
OP
D

duck on quack

Member
Joined
Sep 28, 2010
Messages
42
Reaction score
0
I went the Root Explorer route and just renamed all the bloat that I didn't want to .bak

Thank you SO MUCH for mentioning that app. Completely worth the $4.

Root Explorer immediately asked for SU privileges, which I granted. You can browse any directory and mount/remount right from the app. As I suspected, according to Root Explorer, /system was already RW. I went right to /system/app and deleted all the crap that I never wanted that always runs in the background. Amazon MP3, Blockbuster, CityID, etc: GONE. The only app that is alluding me is the Kindle app, as I can't find it in the list anywhere. I'll also have to find a more comprehensive list in regards to what is safe or not safe to remove.

And out of curiosity, what is the purpose of changing .apk to .bak? I understand that I should have probably backed up the .apks before deleting in case I changed my mind, but I never want to see them again anyway and they are available on the Market.

This app is a godsend. Seriously.
 
OP
D

duck on quack

Member
Joined
Sep 28, 2010
Messages
42
Reaction score
0
The command line won't give any feedback if the command is successful.

Make sure you're at the # when you enter the command.
Afterward to check it,
# cd /system
# touch test

If the # returns then it worked, if not it will give an error.

Tried that and I get "touch: not found". That's the same kind of error I get when I try to do anything via ADB. For example, if I want to backup QuickOffice before removing through Root Explorer, I would type "adb pull /system/app/QuickOffice.apk", correct? Doing this just returns "adb: not found". Why is that?

I really can't seem to do a damn thing through ADB/terminal even though I know /system is RW. Root Explorer verifies it and I just removed several apps with no problem.
 

pool_shark

Senior Member
Joined
Mar 28, 2010
Messages
1,401
Reaction score
14
Location
Ohio
The command line won't give any feedback if the command is successful.

Make sure you're at the # when you enter the command.
Afterward to check it,
# cd /system
# touch test

If the # returns then it worked, if not it will give an error.

Tried that and I get "touch: not found". That's the same kind of error I get when I try to do anything via ADB. For example, if I want to backup QuickOffice before removing through Root Explorer, I would type "adb pull /system/app/QuickOffice.apk", correct? Doing this just returns "adb: not found". Why is that?

I really can't seem to do a damn thing through ADB/terminal even though I know /system is RW. Root Explorer verifies it and I just removed several apps with no problem.

I forgot about that. Almost every command has to be issued from busybox.
So you would have to do:
# busybox touch test.

I don't use adb at all, I use call command line on the phone.
 
OP
D

duck on quack

Member
Joined
Sep 28, 2010
Messages
42
Reaction score
0
I forgot about that. Almost every command has to be issued from busybox.
So you would have to do:
# busybox touch test.

I don't use adb at all, I use call command line on the phone.

D'oh. I don't have busybox; not even sure what it is. It wasn't mentioned in the instructions I used to root in the first place, only ADB itself and its basic usage. Perhaps that's why nothing works for me through ADB or Terminal Emulator?

In the meantime, I have found a replacement for the pull/push commands, since I can get neither to work. Root Explorer has a move option, so I'm simply moving apps I'm unsure about to a new folder on my sdcard. This seems to effectively delete them, and if need be I assume I could move them back without issue.

Hell, this app essentially replaces the need for command line usage whatsoever (which is annoying to begin with). I'm sure there's some things I can't do through Root Explorer, but until then I'm oblivious anyway.
 
Top