1

My sdcard is empty when I use su. I have gained root using Kingoroot.
This answer shows the SuperSU solution (mount namespace separation).

How to mount an sdcard to su? What additional information should I provide to get help?

It's a MTK device with Android 4.4.

Irfan Latif
  • 20,353
  • 3
  • 70
  • 213
miduja
  • 43
  • 5

1 Answers1

0

I never used Kingoroot, so can't be sure if it provides and option for master mount (su mm) or not. You can switch to Magisk or SuperSU once the device is rooted. If you can't or don't want to, you can use:

su -c 'nsenter -t 1 -m /system/bin/sh'

from commandline instead of simple su. This will make you switch to root mount namespace. For details see this answer.
nsenter is usually available as busybox applet.

Since mount namesapce was implemented in Android 6, this might not be the problem with your KK device.

PS:
If Kingoroot works for you, it indicates that your device has some serious security flaw(s). Do consider an upgrade.

Irfan Latif
  • 20,353
  • 3
  • 70
  • 213
  • Empty output, as well as /storage/sdcard0 – miduja Aug 26 '19 at 08:16
  • https://pastebin.com/uZwv5GYG – miduja Aug 26 '19 at 08:25
  • The link you provided contains "DISABLE INTERNAL MEMORY (/data/media/0) AND USE EXTERNAL SD CARD AS INTERNAL STORAGE" But /data/media/ contains only an obb folder – miduja Aug 26 '19 at 13:52
  • https://pastebin.com/RGaR7grk mount /dev/block/vold/179:8 /my_sdcard still gives Usage: mount [-r] [-w] [-o options] [-t type] device directory – miduja Aug 27 '19 at 07:14
  • I have rebooted the device and mount -o rw,remount /; mkdir /my_sdcard; mount -t vfat /dev/block/vold/179:8 /my_sdcard kinda works ls /my_sdcard shows the list of files on the sdcard. /my_sdcard is still empty in root explorer – miduja Aug 27 '19 at 08:22
  • 1
    I did mount -o uid=0,gid=0 -t vfat /dev/block/vold/179:8 /my_sdcard, mount still shows uid=1023,gid=1023 – miduja Aug 27 '19 at 08:45