android SD卡读写权限

frameworks\base\core\java\android\content\pm\PackageParser.java

    if (CtaUtils.isCtaSupported()) {
        CtaPackageManagerInternal ctaPkgMgrInternal =
                LocalServices.getService(CtaPackageManagerInternal.class);
        if (ctaPkgMgrInternal != null) {
            ctaPkgMgrInternal.linkCtaPermissions(pkg);
        }
    }
    ///@}
        
    //tgy add start       
	if (pkg.requestedPermissions.contains("android.permission.WRITE_EXTERNAL_STORAGE")) {
		  pkg.requestedPermissions.add("android.permission.WRITE_MEDIA_STORAGE");
	} 
    // tgy add end    

frameworks\base\core\res\AndroidManifest.xml

 
    修改成
        

你可能感兴趣的:(android,9.0,android,8.0)