Android的守护进程 [英] Android daemon process

查看:282
本文介绍了Android的守护进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能(不违反任何许可证)写了一个原生的C / C ++应用程序在Android操作系统之上,使之作为一个守护进程运行的?

有已经有几个守护进程的运行哪一个可以与看'PS'命令,法律部分我最关心的。而且还对如何准确地做到这一点缺少文档。

有关写作部分,我想人们可以使用基本的Linux编程概念,因为Android支持至少在一定水平标准的POSIX API。为了使其运行的手机靴,一些修改当然是在初始化需要为好。

我没有计划让这个应用程序在Android Market,所以手动安装到手机是没有问题的。只要它不要求重新编译整个操作系统或内核

我真的AP preciate此主题的所有信息,因为有没有多少用。

感谢。

解决方案
  

是否有可能(不违反任何   许可证)写了一个原生的C / C ++   在Android操作系统之上的应用   并使其作为一个守护进程运行的?

不干净。

  

和还对如何准确地做到这一点缺少文档。

由于你不应该这样做,除非修改固件。

  

要使其运行的手机靴,一些修改当然是在初始化需要为好。

这将只可能在有根电话(最好)或通过修改固件(在最坏的情况)。

Android的NDK旨在创建库连接到通过JNI的Java应用程序。如果你正在寻找一个通用的Linux环境,Android是不是答案。

Is it possible (without violating any licenses) to write a native C/C++ application on top of the Android OS and make it run as a daemon process?

There are already several daemon process' running which one can see with the 'ps' command, the legal part concerns me the most. And also the lack of documentation on how to exactly do this.

For the writing part, I guess one could use basic Linux programming concepts, since Android supports at least to some level the standard Posix API. To make it run as the phone boots, some modifications is of course required in init as well.

I have no plans to have this app in the Android Market, so installing it manually to the phone is not a problem. As long as it does not require re-compiling the whole OS or kernel.

I really appreciate all info on this topic, since there's isn't much available.

Thanks.

解决方案

Is it possible (without violating any licenses) to write a native C/C++ application on top of the Android OS and make it run as a daemon process?

Not cleanly.

And also the lack of documentation on how to exactly do this.

Because you're not supposed to be doing this, except by modifying the firmware.

To make it run as the phone boots, some modifications is of course required in init as well.

Which will only be possible on a rooted phone (at best) or via modifying the firmware (at worst).

Android's NDK is designed to create libraries to connect to Java applications via the JNI. If you are looking for a general-purpose Linux environment, Android is not the answer.

这篇关于Android的守护进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆