How to add C daemon to android project and run it?
2016-02-01 00:00
453 查看
http://stackoverflow.com/questions/21299109/how-to-add-c-daemon-to-android-project-and-run-it
I have a daemon written in C language. I also have an android
application that uses this daemon via socket. Daemon run with system. Is
it possible to add compilled C daemon to android application and run it
from application?
++++++++++ answer
I guess it is possible, but just in case your device is rooted.You should include the daemon as part of your application, see NDK if you don't know how to do it, and somwhere in your application code call it like
where 'su' is super user utility, which forks your application and
executes daemon in sepparate proccess with elevated permissions.
I have a daemon written in C language. I also have an android
application that uses this daemon via socket. Daemon run with system. Is
it possible to add compilled C daemon to android application and run it
from application?
++++++++++ answer
I guess it is possible, but just in case your device is rooted.You should include the daemon as part of your application, see NDK if you don't know how to do it, and somwhere in your application code call it like
Runtime.getRuntime().exec("su root " + "path to daemon");
where 'su' is super user utility, which forks your application and
executes daemon in sepparate proccess with elevated permissions.
相关文章推荐
- androidannotations
- Android第一行代码小结
- Android笔记-canvas与自定义view相关内容
- 从零快速搭建Android项目
- Android中layout过程详解
- android-Maintaining Multiple APKs,Creating Multiple APKs for Different API Levels
- TexWatcher的用法
- android sdk tencent link
- Service 组件在新进程中的启动及在进程内的绑定过程
- Android 原生导航 III-Drawer导航
- 《Android Studio实用指南》4.27 使用演示模式
- Android sdk无法下载解决方法
- Android 自定义ViewGroup 实战篇 -> 实现FlowLayout
- Android购物动画
- Google Android如何分析和研究Log文件 ,如何看日志信息
- IPC机制---04 Android中的IPC通讯方式(A)
- 安卓进入fastboot模式后不能正确安装设备驱动解决办法
- Android 手把手教您自定义ViewGroup(一)
- 《Android Studio实用指南》4.27 使用演示模式
- Android 应用碎片化