2014年12月28日 星期日

[Android][AOSP] Run Application in System Process

The method described here is for AOSP make, not including Eclipse and Android Studio build.

In Android.mk, add

LOCAL_CERTIFICATE := platform

In AndroidManifest, under block, add


android:sharedUserId="android.uid.system"

under </application> block, add

android:process="system"

and get back to the project folder and make (command mm) to build the app

To verify, launch the app and check the logcat for log from the app.

If the "Application" column shows "system_process", and the "PID" is the same as other system process (e.g. WindowManager, ActivityManager), then it's successful.

沒有留言:

張貼留言