android 9.0 SD卡权限问题 文件管理器没有权限
原文分析
https://blog.csdn.net/shift_wwx/article/details/85633801
修改方法:
增加-w 权限,下面第二个加上去的。
alps_p0_mp2\update\alps\system\vold\model\PublicVolume.cpp
if (!(mFusePid = fork())) {
if (getMountFlags() & MountFlags::kPrimary) {
if (execl(kFusePath, kFusePath,
"-u", "1023", // AID_MEDIA_RW
"-g", "1023", // AID_MEDIA_RW
"-U", std::to_string(getMountUserId()).c_str(),
"-w",
mRawPath.c_str(),
stableName.c_str(),
NULL)) {
PLOG(ERROR) << "Failed to exec";
}
} else {
if (execl(kFusePath, kFusePath,
"-u", "1023", // AID_MEDIA_RW
"-g", "1023", // AID_MEDIA_RW
"-U", std::to_string(getMountUserId()).c_str(),
"-w",//add by for add sdcard permission 就是这样
mRawPath.c_str(),
stableName.c_str(),
NULL)) {
PLOG(ERROR) << "Failed to exec";
}
}
更多相关文章
- Android(安卓)网络权限配置
- 关于Android动态权限的一些疑问
- Android(安卓)Fresco图片处理库用法API英文原文文档2-1(Facebook
- Android中进行HTTP操作
- 【转】Launcher研究之AndroidManifest.xml分析
- Android(安卓)App 权限一点知识
- Android权限分类及保护级别
- [置顶] Android安全机制分析
- Android利用NotificationListenerService实现消息盒子功能