Skip to content

Commit

Permalink
1、添加注意事项
Browse files Browse the repository at this point in the history
  • Loading branch information
LyounJAP committed Jan 20, 2022
1 parent 7839222 commit 5150ef2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,16 @@
2、[email protected]:licheedev/Android-SerialPort-API.git
3、[email protected]:kongqw/AndroidSerialPort.git
4、[email protected]:GeekBugs/Android-SerialPort.git



### 注意事项:
1、SELinux是Google从android 5.0开始,强制引入的一套非常严格的权限管理机制,主要用于增强系统的安全性。
在开发中,我们经常会遇到由于SELinux造成的各种权限不足,即使拥有“万能的root权限”,也不能获取全部的权限。
2、SerialPort类中将sSuPath改成:/system/bin/sh , 而不是/system/bin/su。
3、可通过 adb shell 进入设备后,输入:setenforce 0 (临时禁用掉SELinux),可参考: https://blog.csdn.net/tung214/article/details/72734086/
4、可通过androidstudio自带的模拟器调试串口,可参考:https://www.jianshu.com/p/491481c8a971
5、具体命令如下:
cd D:\androidSdk\emulator
emulator.exe -list-avds
emulator @Pixel_2_API_22 -writable-system -qemu -serial COM5

0 comments on commit 5150ef2

Please sign in to comment.