1 2 3 4 5 6 7 8 9 10 |
try { String result1 = device.executeShellCommand("pm grant com.cuiweiyou.uiautomator20 android.permission.WRITE_EXTERNAL_STORAGE"); Log.e("ard", "申请写sd卡权限shell 反馈:" + result1); String result2 = device.executeShellCommand("pm grant com.cuiweiyou.uiautomator20 android.permission.READ_EXTERNAL_STORAGE"); Log.e("ard", "申请读sd卡权限shell 反馈:" + result2); } catch (IOException e) { e.printStackTrace(); } |
end
声明
本文由崔维友 威格灵 cuiweiyou vigiles cuiweiyou 原创,转载请注明出处:http://www.gaohaiyan.com/2320.html
承接App定制、企业web站点、办公系统软件 设计开发,外包项目,毕设