Related
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.
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/
mucho kudos! i have a feeling this will come in handy for a lot of people in the future.
cojonesx said:
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/
Click to expand...
Click to collapse
Whoa... Do I need to do all this just to push a apk as system app?
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.
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.
??
hah2110 said:
Whoa... Do I need to do all this just to push a apk as system app?
Click to expand...
Click to collapse
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
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?
precisely t1n0m3n.
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?
kusotare said:
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.
Click to expand...
Click to collapse
Tried doing this. I have com.neevo.mobiledefense.apk in my adb folder so on my N1, I never actually had to type a location of the file but whether I use the location or not, I get file not found... Will my N1 mobiledefense system app *.zip work on this phone or no since the directories are different?
I used swap on /dev/block/mmcbl0p2 but I flashed Merruk lernel 2.5 (overclocked) I found that /dev/block/stl6 is being used as swap instead of mmcblk0p2......
$ mount | grep j4fs
/dev/stl6 /mnt/.lfs j4fs rw,relatime 0 0
$ free
total used free shared buffers
Mem: 296216 290604 5612 0 21052
Swap: 153596 3488 150108
Total: 449812 294092 155720
$
Click to expand...
Click to collapse
flashed DDLK2 with ODIN but it's all the same.... IS IT NORMAL???
See Here from Galaxy Tab
/data/local/tmp/busybox mount -o
rw,remount /system > /data/local/tmp/
output 2>&1
export TEMPRANDOM=34850
export PS1=END:$TEMPRANDOM;cat /
data/local/tmp/output
mount: permission denied (are you root?)
END:34850export PS1=""
/data/local/tmp/busybox mount > /data/
local/tmp/output 2>&1
export TEMPRANDOM=76781
export PS1=END:$TEMPRANDOM;cat /
data/local/tmp/output
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs
(rw,relatime,mode=755)
devpts on /dev/pts type devpts
(rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /acct type cgroup
(rw,relatime,cpuacct)
/dev/block/stl6 on /mnt/.lfs type j4fs
(rw,relatime)
tmpfs on /mnt/asec type tmpfs
(rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs
(rw,relatime,mode=755,gid=1000)
tmpfs on /app-cache type tmpfs
(rw,relatime,size=12288k)
none on /dev/cpuctl type cgroup
(rw,relatime,cpu)
/dev/block/stl9 on /system type rfs
(ro,relatime,vfat,log_off,check=no,gid/
uid/rwx,iocharset=utf8)
/dev/block/mmcblk0p2 on /data type rfs
(rw,nosuid,nodev,relatime,vfat,llw,check=
no,gid/uid/rwx,iocharset=utf8)
/dev/block/mmcblk0p3 on /preinstall type
rfs
(rw,nosuid,nodev,relatime,vfat,llw,check=
no,gid/uid/rwx,iocharset=utf8)
/dev/block/stl10 on /dbdata type rfs
(rw,nosuid,nodev,relatime,vfat,llw,check=
no,gid/uid/rwx,iocharset=utf8)
/dev/block/mmcblk0p1 on /cache type rfs
(rw,nosuid,nodev,relatime,vfat,llw,check=
no,gid/uid/rwx,iocharset=utf8)
/dev/block/vold/179:9 on /mnt/sdcard
type vfat
(rw,dirsync,nosuid,nodev,noexec,noatime,
nodiratime,uid=1000,gid=1015,fmask=
0002,dmask=0002,allow_
utime=0020,codepage=cp437,iocharset=
iso8859-1,shortname=mixed,utf8,errors=
remount-ro)
/dev/block/vold/179:9 on /mnt/secure/
asec type vfat
(rw,dirsync,nosuid,nodev,noexec,noatime,
nodiratime,uid=1000,gid=1015,fmask=
0002,dmask=0002,allow_
utime=0020,codepage=cp437,iocharset=
iso8859-1,shortname=mixed,utf8,errors=
remount-ro)
tmpfs on /mnt/sdcard/.android_secure
type tmpfs
(ro,relatime,size=0k,mode=000)
Click to expand...
Click to collapse
Here is what worked for me:
(I am on a Pixel from the Google store using a Verizon sim on build NDE63X / bootloader unlocked / rooted / on EX kernel)
While the phone is turned on (NOT in download mode), open minimal ADB and push these commands:
1.) adb shell
2.) su
3.) mount -o rw,remount /system_root
4.) cd /system_root/system/
5.) settings put global tether_dun_required 0
6.) echo net.tethering.noprovisioning=true >> /system_root/system/build.prop
7.) adb reboot
Also note, adb reboot command did not reboot my phone, so I did it manually and it worked out fine.
...
This works!
thanks I can confirm this works!
Not working:
C:\Users\Jordan and Nichole\Desktop\Android\sdk\platform-tools>adb shell
marlin:/ $ su
marlin:/ # mount -o rw,remount/system_root
rootfs on / type rootfs (ro,seclabel)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1900840k,nr_inodes=475210,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
none on /dev/stune type cgroup (rw,relatime,schedtune)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
none on /dev/cpuset type cgroup (rw,relatime,cpuset,noprefix,release_agent=/sbin/cpuset_release_agent)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt type tmpfs (rw,seclabel,relatime,size=1900840k,nr_inodes=475210,mode=755,gid=1000)
/dev/fuse on /mnt/runtime/default/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
none on /config type configfs (rw,relatime)
/dev/block/sda33 on /system_root type ext4 (ro,seclabel,noatime,discard,data=ordered)
/dev/block/sda31 on /vendor type ext4 (ro,seclabel,noatime,discard,data=ordered)
/dev/block/sda25 on /firmware/radio type vfat (ro,context=ubject_r:firmware_file:s0,noatime,uid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro)
/dev/block/sda35 on /data type ext4 (rw,seclabel,nosuid,nodev,relatime,noauto_da_alloc,data=ordered)
/dev/block/sda33 on /system type ext4 (ro,seclabel,noatime,discard,data=ordered)
/dev/block/sdd3 on /persist type ext4 (rw,seclabel,nosuid,nodev,relatime,data=ordered)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,size=1900840k,nr_inodes=475210,mode=755,gid=1000)
/dev/fuse on /storage/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/block/loop0 on /su type ext4 (rw,seclabel,noatime,data=ordered)
marlin:/ # cd/system_root/system/
sush: cd/system_root/system/: not found
127|marlin:/ # settings put global tether_dun_required 0
marlin:/ # echo net.tethering.noprovisioning=true>>
sush: syntax error: 'newline' unexpected
1|marlin:/ # adb reboot
Any suggestions?
kirschdog1 said:
marlin:/ # cd/system_root/system/
sush: cd/system_root/system/: not found
marlin:/ # echo net.tethering.noprovisioning=true>>
sush: syntax error: 'newline' unexpected
Click to expand...
Click to collapse
You didn't do those two commands right. There should be a space between "cd" and "/" in the first one, and you forgot the stuff after the ">>" in the second one.
When I enter su it says permission denied. Please help.
Hi @all,
I'm experimenting with a Ubuntu chroot on my Moto G5 with LineageOS 14.1. I tried to use the same setup as on the HT6 from HomTom, where I used a partitioned SD card. First partition as Fat32 and second partition as Ext4. Now I recognised that the kernel can manage Ext4 as well as Fat32. Both of the partitions are mounted by default. So I tried to remount the Ext4 partition without the noexec, nosuid etc. options. It worked so far and I created the groups for the network access and added my user to this groups.
But still no permission to the socket...
I think the possible matter is the SELinux security policy. Is this a possible reason for no connectivity?
If yes, does anyone know how to solve this?
Or if someone knows the reason for my problem, could you please tell me?
Thanks in advance for your help!
PS: Here's the output of mount:
rootfs on / type rootfs (ro,seclabel,size=865040k,nr_inodes=114726)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=945880k,nr_inodes=117258,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt type tmpfs (rw,seclabel,relatime,size=945880k,nr_inodes=117258,mode=755,gid=1000)
none on /config type configfs (rw,relatime)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
/dev/block/mmcblk0p53 on /system type ext4 (ro,seclabel,relatime,discard,data=ordered)
/dev/block/mmcblk0p54 on /data type f2fs (rw,seclabel,nosuid,nodev,noatime,nodiratime,background_gc=on,discard,user_xattr,inline_xattr,acl,inline_data,nobarrier,extent_cache,active_logs=6)
/dev/block/mmcblk0p52 on /cache type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/mmcblk0p19 on /firmware type ext4 (ro,context=ubject_r:firmware_file:s0,nosuid,nodev,relatime,nobarrier,data=ordered)
/dev/block/mmcblk0p29 on /fsg type ext4 (ro,context=ubject_r:fsg_file:s0,nosuid,nodev,relatime)
/dev/block/mmcblk0p22 on /dsp type ext4 (ro,seclabel,nosuid,nodev,relatime,data=ordered)
/dev/block/mmcblk0p30 on /persist type ext4 (rw,context=ubject_rersist_file:s0,nosuid,nodev,noatime,noauto_da_alloc,data=ordered)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,size=945880k,nr_inodes=117258,mode=755,gid=1000)
/dev/fuse on /mnt/runtime/default/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /storage/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/block/vold/public:179_65 on /mnt/media_rw/F840-4482 type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/fuse on /mnt/runtime/default/F840-4482 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /storage/F840-4482 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/F840-4482 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/F840-4482 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/block/vold/public:179_66 on /mnt/media_rw/bc5464af-da29-422a-a8b0-778b375690ee type ext4 (rw,dirsync,context=ubject_r:sdcard_posix:s0,nosuid,nodev,noatime,data=ordered)
/dev/fuse on /mnt/runtime/default/bc5464af-da29-422a-a8b0-778b375690ee type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /storage/bc5464af-da29-422a-a8b0-778b375690ee type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/bc5464af-da29-422a-a8b0-778b375690ee type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/bc5464af-da29-422a-a8b0-778b375690ee type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
Click to expand...
Click to collapse
Hi,
I have a galaxy A20 with a broken screen.
I managed to boot into recovery and adb detects the device which is rooted with magisk.
But when i try the "su" command after "adb shell", it returns:
Code:
/sbin/sh: su: not found
The mount command returns:
Code:
rootfs on / type rootfs (rw,seclabel)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1392352k,nr_inodes=348088,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime,size=1392352k,nr_inodes=348088)
none on /sys/kernel/config type configfs (rw,relatime)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
/dev/block/mmcblk0p28 on /cache type ext4 (rw,seclabel,relatime,i_version)
/dev/block/mmcblk0p32 on /data type ext4 (rw,seclabel,relatime,resgid=5678,i_version,data=ordered)
/dev/block/mmcblk0p32 on /sdcard type ext4 (rw,seclabel,relatime,resgid=5678,i_version,data=ordered)
I have to access the system partiion in order to enable USB debug by editing default.prop and /system/build.prop.
My intention is to mirror and control the phone screen from my PC.
Can anyone give me a direction?
Thanks