2

I have written an application in C, statically linked without using any android services or framework. It just uses API provided by kernel and libc. I want to stop all android services, framework and just launch my application when some event occurs. Is there a way to modify android's init.rc to do this?

Note: I am modifying AOSP so modifying any part of android is possible.

prasannatsm
  • 900
  • 1
  • 11
  • 19

2 Answers2

0

The zygote process (app_process binary in system/bin) needs to be removed from init.rc or just renamed or similar.

I haven't tried this myself but thought about it before and googled, found the interesting link about it again: http://vinnysoft.blogspot.se/2009/12/zygote-system-process.html

Seems to be the same still: http://forum.xda-developers.com/showthread.php?t=2132607

Mattias Isegran Bergander
  • 11,811
  • 2
  • 41
  • 49
0

Add your native application as a service in init.rc and remove all other serivces in init.rc. and look at the init code in system/core/init/ hope this helps

vkumar
  • 169
  • 3
  • Switching between Android and my application should be possible by rebooting or some other method. So this method is not suitable I think. – prasannatsm Mar 15 '16 at 18:34