When I mount a new Filesystem in the "adb shell" as root, the mountpoint is only visible to root (the user/process who created it).
Does anyone know why and how to workaround it?
user@ubuntu:~$ android/android-sdk-linux/platform-tools/adb shellshell@hammerhead:/ $ suroot@hammerhead:/ # mount -o rw,remount /root@hammerhead:/ # mkdir /mnt/testroot@hammerhead:/ # chown media_rw:media_rw /mnt/test/root@hammerhead:/ # chmod 777 /mnt/test/root@hammerhead:/ # busybox mount --bind /mnt/sdcard/ /mnt/testroot@hammerhead:/ # ls /mnt/test/ -ladrwxrwx--- root sdcard_r 2013-11-06 14:10 .MySecurityData-rw-rw---- root sdcard_r 33 2013-11-20 18:17 .bugsensedrwxrwx--- root sdcard_r 2013-11-21 14:00 .estrongsdrwxrwx--- root sdcard_r 1970-01-02 01:01 Alarmsdrwxrwx--x root sdcard_r 2013-11-06 01:12 Androiddrwxrwx--- root sdcard_r 2013-11-12 18:10 DCIMdrwxrwx--- root sdcard_r 2013-11-18 23:38 Download...root@hammerhead:/ # exitshell@hammerhead:/ $ ls /mnt/test -lashell@hammerhead:/ $
user@ubuntu:~$ emulator -avd KitKatuser@ubuntu:~$ adb install <a FileManager APK>user@ubuntu:~$ adb shellroot@generic:/ # mount -o rw,remount /root@generic:/ # mkdir /mnt/testroot@generic:/ # chown media_rw:media_rw /mnt/test/root@generic:/ # chmod 777 /mnt/testroot@generic:/ # mount -o bind /mnt/sdcard/ /mnt/test/
--
--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/group/android-kernel
---
You received this message because you are subscribed to the Google Groups "Android Linux Kernel Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-kerne...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
thank you for the reply and no you shouldn't keep your mouth shut, I appreciate every discussion because I'am really stuck with this.I've thought about this myself and actually think that you are right, it's proppably not a "problem" but an securtiy enhancement. But this is security I would like to disable.I've also digged as far as I can in SElinux and tried to understand whats happening there. But the reason why I think, that if this is because of the SElinux implementation it could Bug, is when I set SElinux to "permissive" ("setenforce 0") it still does not work.
It also could involve Mount Namespaces (another Security Feature) but every documentation says that "/" is mounted as shared and remounted as slaved only for each forked Dalvik-Process and ADB is no Dalvik-Child.
You received this message because you are subscribed to a topic in the Google Groups "Android Linux Kernel Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-kernel/JeY_u-pHcxQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-kerne...@googlegroups.com.
#!/system/bin/shumount /data/media/0/server/system/xbin/sshfs user@server:/ /data/media/0/server -o allow_other -o StrictHostKeyChecking=no -o reconnect -o IdentityFile=/data/.ssh/id_rsa
root@hammerhead:/ # start sshd
root@hammerhead:/ # ps | grep sshroot 6064 6060 2068 608 c0904218 b6e532c8 S /system/xbin/sshfsroot 6066 1 2584 1072 c027636c b6dd16d8 S ssh
root@hammerhead:/ # mount
...
sshfs#user@server:/ /data/media/0/server fuse rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other 0 0
root@hammerhead:/ # cat /proc/kmsg...<7>[ 9113.605760] SELinux: initialized (dev fuse, type fuse), uses genfs_contexts<3>[ 9125.443482] init: untracked pid 6066 exited<3>[ 9125.454009] init: untracked pid 6175 exited...
root@hammerhead:/ # cat /system/bin/start-ssh
#!/system/bin/shssh user@server -o StrictHostKeyChecking=no -o IdentityFile=/data/.ssh/id_rsa "ls /" 2>&1 >> /sdcard/ssh.log
root@hammerhead:/ # cat /sdcard/ssh.log
binbootdevetchome...
when I mount using a shell-script (masked as a system-service like /system/bin/debuggerd) with "/system/bin/start" the mount is visible systemwide.
Find out what services init knows:# grep "service " /init*rcStart the Service manually:# start <servicename>Stop the Service manually:# stop <servicename>
Sorry but I can't teach you everthing you need to know to get this working.
--
if your device is using init and start can be executed. "start <servicename>" is correct. "start-ssh" is just not a service name, it's the executable, the service name can be found with the "grep..." command from my previous post. in my case its "sshd".