当前位置:网站首页>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
边栏推荐
- 解决Oracle中文乱码的问题
- How do ordinary college students get offers from big factories? Ao Bing teaches you one move to win!
- 【行走的笔记】
- 100 GIS practical application cases (53) - making three-dimensional image map as the base map of urban spatial pattern analysis
- Solve the problem of Oracle Chinese garbled code
- Kernel error: no rule to make target 'Debian / canonical certs pem‘, needed by ‘certs/x509_ certificate_ list‘
- 这几种 VSCode 扩展是我最喜欢的
- decast id.var measure. Var data splitting and merging
- Imx6ull QEMU bare metal tutorial 1: GPIO, iomux, I2C
- [point cloud series] so net: self organizing network for point cloud analysis
猜你喜欢
![[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

MySQL5. 5 installation tutorial

X509 parsing
![[point cloud series] foldingnet: point cloud auto encoder via deep grid deformation](/img/c0/cc29ae6948dbe42954cd9da326ef77.png)
[point cloud series] foldingnet: point cloud auto encoder via deep grid deformation

According to the salary statistics of programmers in June 2021, the average salary is 15052 yuan. Are you holding back?

Super 40W bonus pool waiting for you to fight! The second "Changsha bank Cup" Tencent yunqi innovation competition is hot!
![[Journal Conference Series] IEEE series template download guide](/img/1b/a3cf2688778ec34354e77e28e32be8.png)
[Journal Conference Series] IEEE series template download guide

初鉴canvas,展示个小小的小案例

Analysis of the latest Android high frequency interview questions in 2020 (BAT TMD JD Xiaomi)

在 pytorch 中加载和使用图像分类数据集 Fashion-MNIST
随机推荐
[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
Hbuilderx + uniapp packaging IPA submission app store stepping on the pit
Brief introduction of asynchronous encapsulation interface request based on uniapp
Riscv MMU overview
According to the salary statistics of programmers in June 2021, the average salary is 15052 yuan. Are you holding back?
AUTOSAR from introduction to mastery 100 lectures (51) - AUTOSAR network management
vscode小技巧
office2021安装包下载与激活教程
Common commands of ADB shell
AUTOSAR from introduction to mastery 100 lectures (86) - 2F of UDS service foundation
MySQL5. 5 installation tutorial
[point cloud series] pointfilter: point cloud filtering via encoder decoder modeling
[quick platoon] 215 The kth largest element in the array
这几种 VSCode 扩展是我最喜欢的
叮~ 你的奖学金已到账!C认证企业奖学金名单出炉
Is Hongmeng system plagiarism? Or the future? Professional explanation that can be understood after listening in 3 minutes
AUTOSAR from introduction to mastery 100 lectures (87) - key weapon of advanced EEA - AUTOSAR and DDS
torch. Where can transfer gradient
Example interview | sun Guanghao: College Club grows and starts a business with me
Mui close other pages and keep only the first page