目前我在驱动创建了一个节点,在setting app 去写这个节点文件,报错如下,这个节点的权限 已经是777,selinux设为了Permissive,log中的avc警告也全解决了,在adb下面使用echo 可以写成功,自己写的linux应用也是可以写成功,就是app写不成功。还有我把代码放在RK平台运行,app也是可以写成功的。大神们还有什么思路吗?
25 16:04:09.396 2074 2188 E PowerManagerService: Holding wake lock suspend blocker
11-25 16:04:09.486 4280 4280 E UsbSettings: hkt onPreferenceChange objValue = true
11-25 16:04:09.486 4280 4280 E UsbSettings: hkt onPreferenceChange mMode = 0
11-25 16:04:09.490 4280 5011 E UsbSettings: start run mMode= 0
11-25 16:04:09.495 4280 5011 W System.err: java.io.IOException: write failed: EPERM (Operation not permitted)
11-25 16:04:09.496 4280 5011 W System.err: at libcore.io.IoBridge.write(IoBridge.java:544)
11-25 16:04:09.496 4280 5011 W System.err: at java.io.FileOutputStream.write(FileOutputStream.java:392)
11-25 16:04:09.496 4280 5011 W System.err: at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
11-25 16:04:09.497 4280 5011 W System.err: at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
11-25 16:04:09.497 4280 5011 W System.err: at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
11-25 16:04:09.497 4280 5011 W System.err: at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
11-25 16:04:09.498 4280 5011 W System.err: at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
11-25 16:04:09.498 4280 5011 W System.err: at java.io.BufferedWriter.flush(BufferedWriter.java:254)
11-25 16:04:09.498 4280 5011 W System.err: at com.android.settings.UsbSetting.Write2File(UsbSetting.java:179)
11-25 16:04:09.499 4280 5011 W System.err: at com.android.settings.UsbSetting$sysFileOperation.run(UsbSetting.java:277)
11-25 16:04:09.499 4280 5011 W System.err: at java.lang.Thread.run(Thread.java:919)
11-25 16:04:09.501 4280 5011 W System.err: Caused by: android.system.ErrnoException: write failed: EPERM (Operation not permitted)
11-25 16:04:09.502 4280 5011 W System.err: at libcore.io.Linux.writeBytes(Native Method)
11-25 16:04:09.502 4280 5011 W System.err: at libcore.io.Linux.write(Linux.java:294)
11-25 16:04:09.502 4280 5011 W System.err: at libcore.io.ForwardingOs.write(ForwardingOs.java:241)
11-25 16:04:09.502 4280 5011 W System.err: at libcore.io.BlockGuardOs.write(BlockGuardOs.java:416)
11-25 16:04:09.502 4280 5011 W System.err: at libcore.io.ForwardingOs.write(ForwardingOs.java:241)
11-25 16:04:09.502 4280 5011 W System.err: at libcore.io.IoBridge.write(IoBridge.java:539)
11-25 16:04:09.503 4280 5011 W System.err: ... 10 more
11-25 16:04:09.505 4280 5011 E UsbSettings: hkt111111 config=1
11-25 16:04:09.518 1795 1795 V audio_hw_primary: out_set_parameters: routing=2
11-25 16:04:09.521 4280 4280 E UsbSettings: hkt mode=1
最近编辑记录 swhkt (2021-11-25 18:26:59)
离线