Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
kusotare
Old
#1  
kusotare's Avatar
Senior Member - OP
Thanks Meter 13
Posts: 611
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.
SprintGalaxy S III
follow me on twitter
 
cojonesx
Old
#2  
Senior Member
Thanks Meter 37
Posts: 337
Join Date: Feb 2009
Location: Cincinnati
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:
busybox cp /sdcard/sd/myfile.mp3 /system/media/audio/
GNexus|CM10.1
 
kusotare
Old
#3  
kusotare's Avatar
Senior Member - OP
Thanks Meter 13
Posts: 611
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.
SprintGalaxy S III
follow me on twitter
 
hah2110
Old
#4  
Senior Member
Thanks Meter 35
Posts: 2,443
Join Date: Nov 2008
Quote:
Originally Posted by cojonesx View Post
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:
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 13
Posts: 611
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.
SprintGalaxy S III
follow me on twitter
 
t1n0m3n
Old
#6  
t1n0m3n's Avatar
Senior Member
Thanks Meter 29
Posts: 394
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 37
Posts: 337
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
GNexus|CM10.1
 
t1n0m3n
Old
(Last edited by t1n0m3n; 20th July 2010 at 03:15 AM.)
#8  
t1n0m3n's Avatar
Senior Member
Thanks Meter 29
Posts: 394
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 13
Posts: 611
Join Date: Apr 2009
Location: Colorado
precisely t1n0m3n.
SprintGalaxy S III
follow me on twitter
 
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?

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Profile Flow: A Tasker Alternative

By now, we’re all quite familiar with Tasker, the personal automation app that seems to be able to … more

More Tips to Help Promote Your Android App

With over 700,000 apps in the Google Play store and more than 48 billion app installs, it’s … more

Sony Continues AOSP Initiative on the Tablet Z

Sometimes, you can harp on a subject so much that you end upbeating a dead horse. In our eyes, … more