Lean Mean Battery Power Saving App Review

We talk a lot about battery topics here at XDA TV. We talk about everything from Power Banks to USB … more

Android 5.1 Possibly Coming February 2015

Google released Android 5.0 just over a month ago, and since then Lollipop has been trying to … more

Double Tap to Wake on the Nexus 6 Without Root

A few weeks ago, we featured an app which allowed the Nexus 6 to regain the double tap to wake … more

Make Your Own Heat Sink for the LG Optimus 4X HD

Its not a rare occurrence that performing a resource heavy task on your Android device (e.g. … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

mounting /system as rw?

OP kusotare

20th July 2010, 12:07 AM   |  #1  
kusotare's Avatar
OP Senior Member
Flag Colorado
Thanks Meter: 83
 
635 posts
Join Date:Joined: Apr 2009
More
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.
20th July 2010, 12:45 AM   |  #2  
Senior Member
Flag Cincinnati
Thanks Meter: 51
 
395 posts
Join Date:Joined: Feb 2009
More
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/
The Following User Says Thank You to cojonesx For This Useful Post: [ View ]
20th July 2010, 01:10 AM   |  #3  
kusotare's Avatar
OP Senior Member
Flag Colorado
Thanks Meter: 83
 
635 posts
Join Date:Joined: Apr 2009
More
mucho kudos! i have a feeling this will come in handy for a lot of people in the future.
20th July 2010, 02:26 AM   |  #4  
Senior Member
Thanks Meter: 37
 
2,442 posts
Join Date:Joined: Nov 2008
Quote:
Originally Posted by cojonesx

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?
20th July 2010, 02:43 AM   |  #5  
kusotare's Avatar
OP Senior Member
Flag Colorado
Thanks Meter: 83
 
635 posts
Join Date:Joined: Apr 2009
More
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.
Last edited by kusotare; 20th July 2010 at 02:45 AM.
20th July 2010, 04:03 AM   |  #6  
t1n0m3n's Avatar
Senior Member
Flag Chicago
Thanks Meter: 56
 
489 posts
Join Date:Joined: Jan 2009
More
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.
??
20th July 2010, 04:05 AM   |  #7  
Senior Member
Flag Cincinnati
Thanks Meter: 51
 
395 posts
Join Date:Joined: Feb 2009
More
Quote:
Originally Posted by hah2110

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
20th July 2010, 04:10 AM   |  #8  
t1n0m3n's Avatar
Senior Member
Flag Chicago
Thanks Meter: 56
 
489 posts
Join Date:Joined: Jan 2009
More
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?
Last edited by t1n0m3n; 20th July 2010 at 04:15 AM.
20th July 2010, 04:20 AM   |  #9  
kusotare's Avatar
OP Senior Member
Flag Colorado
Thanks Meter: 83
 
635 posts
Join Date:Joined: Apr 2009
More
precisely t1n0m3n.
22nd July 2010, 04:46 PM   |  #10  
LovellKid's Avatar
Senior Member
Spanish Fork, UT
Thanks Meter: 13
 
283 posts
Join Date:Joined: Nov 2009
More
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 Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes