A little guidance please (delete permissions, etc.)

armyturtle

Member
Aug 23, 2007
35
2
0
(Sorry for not posting actual links - the system won't let me because I'm still a "new user.")

I already rooted my Sprint Hero using this (thread 583291) guide and can successfully tether using the WiFi Tether app. Yay!

Now I want to delete and/or replace the boot up sound (boot.mp3 located in /system/media/bootscreen) When I try to delete it right now (either through adb shell on my computer or from within a file manager app on the phone itself) I get permission denied or "read-only file system."

I see two threads regarding busybox, superuser, and adb remount. Thread 591303 which is dated 11/28/09 and is just for busybox and Thread 593952 which is dated 12/03/09.

I'm not sure which of these two I need to install. If it's the latter which includes ADB remount and superuser as well as busybox, then I'm not sure if I am supposed to unzip them before pushing them to my phone.

Could anyone point me in the right direction based on what I want to do (delete files on my phone - ANY file I want)?

Thanks in advance for any help you can offer.
 

Mr. Biggz

Senior Member
Jun 23, 2009
121
0
0
All you should need to do is:
Code:
adb remount
rm /insert file path/file
So yours would be
Code:
rm /system/media/bootscreen/boot.mp3
 

Mr. Biggz

Senior Member
Jun 23, 2009
121
0
0
As long as you can shell into the phone it should work. The rm command is to be run inside the shell.
So it actually should be
Code:
adb remount
adb shell
rm /system/media/bootscreen/boot.mp3
 

gbhil

Senior Member
Oct 28, 2009
330
0
0
Basement
You want to install the busybox remount and superuser Rom if you want to run stock.
Or manually install busybox, superuser whitelist and adb remount :)

Biggz - looks like they are on stock. No adb remount.
 

jonnythan

Senior Member
Oct 27, 2008
1,196
84
0
If you are on stock, do this:

Code:
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mv /system/media/bootscreen/boot.mp3 /system/media/bootscreen/boot.mp3.old
exit
[you can also do rm /system/media/bootscreen/boot.mp3 instead]
 

armyturtle

Member
Aug 23, 2007
35
2
0
You want to install the busybox remount and superuser Rom if you want to run stock.
Or manually install busybox, superuser whitelist and adb remount :)

Biggz - looks like they are on stock. No adb remount.
successfully removed (rm) the boot.mp3 in the shell - Thank you for that. I do want to replace it with a different one (I'll use the same file name since the .xml file still refers to it) so I'll need the cp command and I've noticed that it's missing in shell. I'm assuming I need to install busybox to get this functionality. I'm not really sure I want to install a complete new ROM and I don't mind manually installing busybox, adb remount, etc. What does installing "superuser whitelist" and "adb remount" allow me to do? I'm not sure what their potential uses are?
 

armyturtle

Member
Aug 23, 2007
35
2
0
I installed busybox and have the cp command functionality now (see above post) but now when I try to copy anything to the /system/media/bootscreen folder I get "cp: cannot create '/system/media/bootscreen/boot.mp3': Permission denied"

I type "mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system" after getting into shell and typing "su" and getting the "#" prompt and it takes successfully (this is the only way I was able to actually "rm" the original boot.mp3 file to begin with.

See anything I'm doing wrong?
 

jonnythan

Senior Member
Oct 27, 2008
1,196
84
0
Nope, that is correct.

/system is normally mounted as read-only, so you can't add or delete anything. The mount command remounts it as read-write, so you can modify it as root.
 

gbhil

Senior Member
Oct 28, 2009
330
0
0
Basement
<snip> I'm not really sure I want to install a complete new ROM and I don't mind manually installing busybox, adb remount, etc. What does installing "superuser whitelist" and "adb remount" allow me to do? I'm not sure what their potential uses are?
Superuser whitelist is an application that warns you and asks for you to provide permission whenever an app tries to use the su binary to run as another user. You want this, as without it there's no way to know if an application runs as root.

Adb remount is a service that allows you to toggle the +RW bit on the /system/ partition through the shell. IIRC the one one floating around also kills color terminfo so you don't get all the extra chars on a windows PC when using the ls command. Just a matter of convenience.
 

armyturtle

Member
Aug 23, 2007
35
2
0
Nope, that is correct.

/system is normally mounted as read-only, so you can't add or delete anything. The mount command remounts it as read-write, so you can modify it as root.
I can't create/copy anything after getting into the shell and remounting as read-write. From CMD prompt I type:
adb shell

and get:
$

Then I type:
su

and get:
#

This is where I type:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system

Then trying to copy anything into the /system directory gives me:
Permission denied

It will let me DELETE anything I want from this folder (as confirmed by now deleting boot.gif just to check) but it won't let me cp (copy) anything to this folder. WHY?
What the heck?
 
Last edited:

wtphoto

Senior Member
Dec 14, 2009
1,037
14
0
Southfield, MI
try these commands for the boot mp3

Code:
cd/
cd /androidsdk/tools/
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
exit
adb push directoryonpcwhereyourbootmp3is /system/media/bootscreen/
make sure that you rename the mp3 to boot.mp3 or it wont work anyways.

the other option (this is what I do) is find a bootscreen that you like (I use this one). open the zip file useing winrar or 7zip, navigate into the files where you see the boot.mp3 and drag in YOUR (now renamed) boot.mp3 close the window, put the zip file onto the root of your sd card, boot into recovery, choose flash from zip, flash the file and your good to go.
 

armyturtle

Member
Aug 23, 2007
35
2
0
try these commands for the boot mp3

Code:
cd/
cd /androidsdk/tools/
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
exit
adb push directoryonpcwhereyourbootmp3is /system/media/bootscreen/
make sure that you rename the mp3 to boot.mp3 or it wont work anyways.

the other option (this is what I do) is find a bootscreen that you like (I use this one). open the zip file useing winrar or 7zip, navigate into the files where you see the boot.mp3 and drag in YOUR (now renamed) boot.mp3 close the window, put the zip file onto the root of your sd card, boot into recovery, choose flash from zip, flash the file and your good to go.
tried this just now and still get "failed to copy 'C:\android-sdk-windows\tools\boot.mp3' to '/system/media/bootscreen/boot.mp3': Permission denied"
It's the /system folder... I can push to /data/local all day long, but anything in the /system folder is read only. How the hell can I change this?
 

wtphoto

Senior Member
Dec 14, 2009
1,037
14
0
Southfield, MI
/system/media/bootscreen/boot.mp3
if this is the code you are using then that could be your issue

the code line should look like this

Code:
adb push C:\android-sdk-windows\tools\boot.mp3 /system/media/bootscreen/
doing adb push C:\android-sdk-windows\tools\boot.mp3 /system/media/bootscreen/boot.mp3 says that you are trying to push the boot.mp3 to the directory bott.mp3 and there is no boot.mp3 directory the folder where you want the boot.mp3 is bootscreen. try the ubove code and see what happenes.
 

armyturtle

Member
Aug 23, 2007
35
2
0
if this is the code you are using then that could be your issue

the code line should look like this

Code:
adb push C:\android-sdk-windows\tools\boot.mp3 /system/media/bootscreen/
doing adb push C:\android-sdk-windows\tools\boot.mp3 /system/media/bootscreen/boot.mp3 says that you are trying to push the boot.mp3 to the directory bott.mp3 and there is no boot.mp3 directory the folder where you want the boot.mp3 is bootscreen. try the ubove code and see what happenes.
Nope, was a typo on my part (here in the post, not when issuing the command). Still permission denied. I don't think it's actually mounting the /system folder as writable. Is there a way to check after issuing the remount command?

A quick command of "ls -l" at root prompt gives the following for the /system folder:
drwxr-xr-x root root 2009-09-21 06:30 system
 
Last edited:

wtphoto

Senior Member
Dec 14, 2009
1,037
14
0
Southfield, MI
honestly at this point what I would try doing is do a back up then flash a custom rom like fresh 1.1 that has all the tools built into it. then go into the cmd prompt and cd to where sdk is then type adb remount and see what it says then adb shell and try to cp the file to that directory.

this is more a test than anything else.
 

armyturtle

Member
Aug 23, 2007
35
2
0
honestly at this point what I would try doing is do a back up then flash a custom rom like fresh 1.1 that has all the tools built into it. then go into the cmd prompt and cd to where sdk is then type adb remount and see what it says then adb shell and try to cp the file to that directory.

this is more a test than anything else.
I'll try this - so you recommend trying fresh 1.1 then? I know it's just a test, but just in case I like the ROM and decide to stick with it, might as well try a really good one! I'll try this tomorrow - I'm beat! (Thanks again!)