定位问题:
adb shell pidof com.example 3398 adb shell cat /proc/3398/status |grep Groups Groups: 1000 1002 1004 1007 1065 1077 1079 2001 2002 3001 3002 3003 3007 3010 3011 9997破案了!猜测的“Linux 组权限”问题。
Groups 列表中缺少了最关键的一个数字:1023 (media_rw)。
1000 1002 1004 ... 1077 ...
- 1000 (system): 说明你确实是系统 UID (System App),这没问题。
- 1077 (external_storage): 这是为了访问 Fuse 文件系统的组,但它不能让你直接访问原始挂载点 /mnt/media_rw/ 。
- ❌ 缺失 1023 (media_rw): 这是访问 /mnt/media_rw/ 的硬性门票。
drwxrwx--- root media_rw 意思是:只有root 用户