当前位置:网站首页>Using open to open a file in JNI returns a - 1 problem
Using open to open a file in JNI returns a - 1 problem
2022-04-23 13:19:00 【Johnny2004】
fd = open("/dev/test", O_RDWR|O_NOCTTY/*|O_NDELAY*/);
problem : Open the node , Always returns -1
One , Check dev/ Whether the node permission is open or not. Give permission
chmod 777 /dev/test
Code can be found in
init.rc Add permissions to
/dev/test 0666 system system
Second, check whether there is a system mode problem getenforce
console:/ # getenforce
Permissive
If not Permissive The pattern is Enforcing So modify Enforcing by Permissive
console:/ # setenforce 0
Modify the file in the code set_config Add
setenv bootargs androidboot.selinux=permissive
3、 ... and If the system is Enforcing You can view the mode in the system without modifying it .te Add corresponding permissions to the file
版权声明
本文为[Johnny2004]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230608014916.html
边栏推荐
- [point cloud series] foldingnet: point cloud auto encoder via deep grid deformation
- Xi'an CSDN signed a contract with Xi'an Siyuan University, opening a new chapter in IT talent training
- [untitled] make a 0-99 counter, P1 7 connected to key, P2 connected to nixie tube section, common anode nixie tube, P3 0,P3. 1. Connect the nixie tube bit code. Each time you press the key, the nixie
- 【行走的笔记】
- Migrating your native/mobile application to Unified Plan/WebRTC 1.0 API
- 2020最新Android大厂高频面试题解析大全(BAT TMD JD 小米)
- What do the raddr and rport in webrtc ice candidate mean?
- Playwright contrôle l'ouverture de la navigation Google locale et télécharge des fichiers
- Uninstall MySQL database
- Common commands of ADB shell
猜你喜欢

100 GIS practical application cases (51) - a method for calculating the hourly spatial average of NC files according to the specified range in ArcGIS

Machine learning -- PCA and LDA

Common interview questions and detailed analysis of the latest Android developers in 2020

AUTOSAR from introduction to mastery lecture 100 (84) - Summary of UDS time parameters

Nodejs + websocket cycle small case

Vscode tips

Servlet of three web components

Imx6ull QEMU bare metal tutorial 1: GPIO, iomux, I2C

Summary of request and response and their ServletContext
![[point cloud series] relationship based point cloud completion](/img/87/153a78a229a2f2d38c7b2b5ef0fb6a.png)
[point cloud series] relationship based point cloud completion
随机推荐
100 GIS practical application cases (34) - splicing 2020globeland30
[point cloud series] so net: self organizing network for point cloud analysis
榜样专访 | 孙光浩:高校俱乐部伴我成长并创业
"Xiangjian" Technology Salon | programmer & CSDN's advanced road
Hbuilderx + uniapp packaging IPA submission app store stepping on the pit
[untitled] make a 0-99 counter, P1 7 connected to key, P2 connected to nixie tube section, common anode nixie tube, P3 0,P3. 1. Connect the nixie tube bit code. Each time you press the key, the nixie
Nodejs + Mysql realize simple registration function (small demo)
Playwright contrôle l'ouverture de la navigation Google locale et télécharge des fichiers
office2021安装包下载与激活教程
CSDN高校俱乐部“名师高校行”——湖南师范大学站
Kernel error: no rule to make target 'Debian / canonical certs pem‘, needed by ‘certs/x509_ certificate_ list‘
初鉴canvas,展示个小小的小案例
Lpddr4 notes
web三大组件之Servlet
mysql 基本语句查询
解决虚拟机中Oracle每次要设置ip的问题
C语言之字符串与字符数组的区别
[indicators] precision, recall
“湘见”技术沙龙 | 程序员&CSDN的进阶之路
X509 parsing