Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,736,958 Members 52,399 Now Online
XDA Developers Android and Mobile Development Forum

mounting /system as rw?

Tip us?
 
kusotare
Old
#1  
kusotare's Avatar
Senior Member - OP
Thanks Meter 73
Posts: 634
Join Date: Apr 2009
Location: Colorado
Default mounting /system as rw?

this seems simple enough since we can do it with all other android devices that have root. but it isnt, apparently. because we're running with a stock bootloader/SPL/recovery/ROM, adb wont run with SU permissions. this means abd remount doesnt work.

also, we dont know what the directory is to mount from /dev (i.e. on the G1 it was /dev/block/mtdblock3) to get system to mount as rw.

my point in asking is that i'm trying to do something i'm sure a lot of other people would like as well. custom ringtones in /system/media/audio instead of on the SD card. why? because with the ringtones on the SD card, media scanner picks them up every time and lumps them in with the actual music you have on your sd card. ugh.

so, as soon as someone can figure this out, i'd love to know how to do it so I can push the ringtones or cp them using busybox. anyone who can help...well, lets get it going.
 
cojonesx
Old
#2  
Senior Member
Thanks Meter 51
Posts: 387
Join Date: Feb 2009
Location: Cincinnati
Code:
Select Code
C:\android-sdk-windows\tools>adb shell
$ su -
su -
#
# mount
mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
/dev/block/stl6 /mnt/.lfs j4fs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /dev/cpuctl cgroup rw,cpu 0 0
/dev/block/stl9 /system rfs rw,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/mmcblk0p2 /data rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/mmcblk0p3 /data_tmo rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl10 /dbdata rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl11 /cache rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl3 /efs rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
#
busybox mount -o rw,remount /dev/block/stl9 /system
#
once you get there, just copy whatever you want wherever you want
something like
Code:
Select Code
busybox cp /sdcard/sd/myfile.mp3 /system/media/audio/
HTCOneSPR|CM11
The Following User Says Thank You to cojonesx For This Useful Post: [ Click to Expand ]
 
kusotare
Old
#3  
kusotare's Avatar
Senior Member - OP
Thanks Meter 73
Posts: 634
Join Date: Apr 2009
Location: Colorado
mucho kudos! i have a feeling this will come in handy for a lot of people in the future.
 
hah2110
Old
#4  
Senior Member
Thanks Meter 37
Posts: 2,442
Join Date: Nov 2008
Quote:
Originally Posted by cojonesx View Post
Code:
Select Code
C:\android-sdk-windows\tools>adb shell
$ su -
su -
#
# mount
mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
/dev/block/stl6 /mnt/.lfs j4fs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /dev/cpuctl cgroup rw,cpu 0 0
/dev/block/stl9 /system rfs rw,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/mmcblk0p2 /data rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/mmcblk0p3 /data_tmo rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl10 /dbdata rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl11 /cache rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl3 /efs rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
#
busybox mount -o rw,remount /dev/block/stl9 /system
#
once you get there, just copy whatever you want wherever you want
something like
Code:
Select Code
busybox cp /sdcard/sd/myfile.mp3 /system/media/audio/
Whoa... Do I need to do all this just to push a apk as system app?
 
kusotare
Old
(Last edited by kusotare; 20th July 2010 at 01:45 AM.)
#5  
kusotare's Avatar
Senior Member - OP
Thanks Meter 73
Posts: 634
Join Date: Apr 2009
Location: Colorado
No, all you need to do is:
adb shell (ony if you're using adb, if you're using terminal, skip this command)
su
busybox mount -o rw,remount /dev/block/stl9 /system
busybox cp /(location of the app here)/app.apk /system/app/
reboot

now, depending on where you have the app:
if its on the 14gb storage, it'll just be /sdcard/app.apk
if its on your actual sd card, it'll be /sdcard/sd/app.apk

all the stuff in the code post between # mount and the next # is what gets printed from the mount command. not actual commands.
 
t1n0m3n
Old
#6  
t1n0m3n's Avatar
Senior Member
Thanks Meter 41
Posts: 440
Join Date: Jan 2009
Location: Chicago
adb remount doesn't work? I have been using it to delete stuff out of the /system/app directory... Maybe I am not getting what you are referring to.
??
This is a signature
 
cojonesx
Old
#7  
Senior Member
Thanks Meter 51
Posts: 387
Join Date: Feb 2009
Location: Cincinnati
Quote:
Originally Posted by hah2110 View Post
Whoa... Do I need to do all this just to push a apk as system app?
Didn't mean to scare anyone with all that text, kusotare is right, the mount command shows what is currently mounted and where, its how I knew where to remount /system. Just used it as an example to teach as well
HTCOneSPR|CM11
 
t1n0m3n
Old
(Last edited by t1n0m3n; 20th July 2010 at 03:15 AM.)
#8  
t1n0m3n's Avatar
Senior Member
Thanks Meter 41
Posts: 440
Join Date: Jan 2009
Location: Chicago
ahh, never mind, I see the issue now

So adb push to /system/* is never going to work until we get some custom roms then?
This is a signature
 
kusotare
Old
#9  
kusotare's Avatar
Senior Member - OP
Thanks Meter 73
Posts: 634
Join Date: Apr 2009
Location: Colorado
precisely t1n0m3n.
 
LovellKid
Old
#10  
LovellKid's Avatar
Senior Member
Thanks Meter 13
Posts: 283
Join Date: Nov 2009
Location: Spanish Fork, UT
I used buysbox to try and re-install dlna.apk/odex and my phone boots normal, but wont every "wake up" after the Galaxy s screen, it just stays black, but the home keys are responsive? Did i screw something up?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Cell Phone SIM Unlock Bill Just Steps Away from President’s Desk

For all those who believe that Cinderella stories don’t actually … more

Get Your Cargo to its Destination in 4×4 Military Operations Reborn

Racing games have evolved quite a bit since the days of Pole … more

Automate Your Device with Sfen

Changing the profile of yourdevice manually is now long forgotten. Since the advent of Android automation … more