系统是全志安卓 10
在 AOSP/android/development 下面创建了 hello 目录,目录下添加 Android.mk 和 hello.c, 模块名是 helloworld, 在 android 根目录下执行 make helloworld , 编译正常,adb push 到设备上后,通过 adb shell 里执行 helloworld ,一切正常。 当在 App 里通过 Runtime.getRuntime().exec()来执行 helloworld 就出现了下面的错误,网上搜索是 SELinux 的问题,有没有资料可以分享下如何集成自己的程序?
07-06 14:36:34.610 4382 4382 I eight.tomu.home: type=1400 audit(0.0:294): avc: denied { execute_no_trans } for path="/system/bin/helloworld" dev="dm-3" ino=60 scontext=u:r:zygote:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=1 07-06 14:36:34.565 3649 3649 I ExecuteCmd: executeCmd: helloworld 07-06 14:36:35.077 3649 3649 D MainActivity: Home:: helloworld true
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.