当前位置:网站首页>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
边栏推荐
- 榜样专访 | 孙光浩:高校俱乐部伴我成长并创业
- SHA512 / 384 principle and C language implementation (with source code)
- Ffmpeg common commands
- mui picker和下拉刷新冲突问题
- AUTOSAR from introduction to mastery 100 lectures (51) - AUTOSAR network management
- Hbuilderx + uniapp packaging IPA submission app store stepping on the pit
- async void 導致程序崩潰
- Summary of request and response and their ServletContext
- 数据仓库—什么是OLAP
- filter()遍历Array异常友好
猜你喜欢
MySQL5.5安装教程
"Xiangjian" Technology Salon | programmer & CSDN's advanced road
[point cloud series] multi view neural human rendering (NHR)
Summary of request and response and their ServletContext
Solve the problem of Oracle Chinese garbled code
Machine learning -- PCA and LDA
9419页最新一线互联网Android面试题解析大全
“湘见”技术沙龙 | 程序员&CSDN的进阶之路
[indicators] precision, recall
100 GIS practical application cases (51) - a method for calculating the hourly spatial average of NC files according to the specified range in ArcGIS
随机推荐
How to convert opencv pictures to bytes
Stack protector under armcc / GCC
MySQL5.5安装教程
[point cloud series] unsupervised multi task feature learning on point clouds
100 lectures on practical application cases of Excel (VIII) - report connection function of Excel
[point cloud series] so net: self organizing network for point cloud analysis
【行走的笔记】
AUTOSAR from introduction to mastery 100 lectures (52) - diagnosis and communication management function unit
CSDN高校俱乐部“名师高校行”——湖南师范大学站
@Excellent you! CSDN College Club President Recruitment!
hbuilderx + uniapp 打包ipa提交App store踩坑记
Hbuilderx + uniapp packaging IPA submission app store stepping on the pit
Conflict between Mui picker and drop-down refresh
RTOS mainstream assessment
Example interview | sun Guanghao: College Club grows and starts a business with me
普通大学生如何拿到大厂offer?敖丙教你一招致胜!
AUTOSAR from introduction to mastery lecture 100 (84) - Summary of UDS time parameters
[point cloud series] Introduction to scene recognition
[indicators] precision, recall
[point cloud series] learning representations and generative models for 3D point clouds