当前位置:网站首页>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
边栏推荐
- Feature Engineering of interview summary
- Esp32 vhci architecture sets scan mode for traditional Bluetooth, so that the device can be searched
- Vscode tips
- Async void provoque l'écrasement du programme
- The difference between string and character array in C language
- POM of SSM integration xml
- X509 parsing
- LeetCode_ DFS_ Medium_ 695. Maximum area of the island
- MySQL basic statement query
- ECDSA signature verification principle and C language implementation
猜你喜欢

Learning notes of AMBA protocol

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

vscode小技巧

MySQL 8.0.11下载、安装和使用可视化工具连接教程

FatFs FAT32 learning notes

C语言之字符串与字符数组的区别

叮~ 你的奖学金已到账!C认证企业奖学金名单出炉
![[point cloud series] learning representations and generative models for 3D point clouds](/img/c5/712bd448fa6c0bffc09ce57f6e56b5.png)
[point cloud series] learning representations and generative models for 3D point clouds

Solve the problem that Oracle needs to set IP every time in the virtual machine

EMMC / SD learning notes
随机推荐
[notes de marche]
基于uniapp异步封装接口请求简介
[point cloud series] unsupervised multi task feature learning on point clouds
MySQL 8.0.11下载、安装和使用可视化工具连接教程
Feature Engineering of interview summary
three. JS text ambiguity problem
C语言之字符串与字符数组的区别
web三大组件之Filter、Listener
Mui + hbuilder + h5api simulate pop-up payment style
LeetCode_ DFS_ Medium_ 695. Maximum area of the island
[Journal Conference Series] IEEE series template download guide
Filter and listener of three web components
[untitled] PID control TT encoder motor
async void 導致程序崩潰
The use of dcast and melt in R language is simple and easy to understand
Migrating your native/mobile application to Unified Plan/WebRTC 1.0 API
hbuilderx + uniapp 打包ipa提交App store踩坑记
POM of SSM integration xml
mui + hbuilder + h5api模拟弹出支付样式
叮~ 你的奖学金已到账!C认证企业奖学金名单出炉