1

After my NANDroid restore didn't work as expected, flashed a clean ROM + Magisk.

When booted to system, internal storage is not accessible (regular File Manager, MTP, adb shell, MiXplorer's Internal Storage).

But it is accessible via elevated rights (TWRP File Manager, MTP when in recovery mode, su in adb shell, Root option in MiXplorer).

Permission while in recovery and booted to system are respectively:

drwxrwxrwx 2 system system 4096 1970-01-01 18:21 sdcard

lrw-r--r-- 1 root root 21 2009-01-01 05:30 sdcard -> /storage/self/primary

--> Tried chmod -R 777 sdcard with no luck. As it is a symlink, did chmod directly to /storage/self/primary and /storage/emulated/0 but it doesn't have an effect.

--> Tried from scratch, wiping and formatting every partition and entire Internal Storage, tried older known working ROMs. Still the same.

Surely, it's a permissions issue. What am I missing?

5
  • try maybe chmod 777 /data/media/0 or chmod -R /data/media/0
    – Silent
    Jun 6, 2022 at 16:00
  • Nothing changes. However, chmod -R 777 sdcard when in recovery (root) now resulted in drwxrwx--- 4 media_rw media_rw 4096 2022-06-06 14:44 sdcard
    – pras92
    Jun 6, 2022 at 16:15
  • has it been solved now?
    – Silent
    Jun 6, 2022 at 16:17
  • Sorry if I wasn't clear. It's the same as only with su access internal storage is accessible.
    – pras92
    Jun 6, 2022 at 16:22
  • Oh sorry. I didnt get that part. Hope you will get a solution.
    – Silent
    Jun 6, 2022 at 16:43

1 Answer 1

1

After being stumbled for days, found a very simple solution. This will need root privileges.

From an ADB shell or terminal emulator in phone:

su
restorecon -v -R /data/media

This will make Internal Storage mounted at /data/media readable again, without any data loss.

Source: XDA, as referred by this post:

Tip: Using different search engines with same keyword helps to find additional threads/ articles.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .