Android 加了android.uid.system后,读写Storage会报错:
EACCES (Permission denied)
后来查到有说:
The system user can not access the SD card, because if the SD card gets unmounted it may need to kill any processes that have files open on it and we don’t want system processes being killed like that. If you want to access the SD card, you need to not use the system shared user ID.
本文探讨了在Android中使用android.uid.system时遇到的读写SD卡权限问题。当应用采用system共享用户ID时,由于系统进程的安全考虑,会导致无法访问SD卡。若需访问SD卡,则不应使用system共享用户ID。
1931

被折叠的 条评论
为什么被折叠?



