How can I create a system service in framework base package ?

100 views
Skip to first unread message

Huy Hoàng Nguyễn

unread,
Jul 16, 2020, 11:05:49 AM7/16/20
to android-platform
I want create a sample system service in framework/base with system permission, it can be the same with LocalTransport service
But my sample service is keeping removed by ActivityManager and cannot run. This is the logcat I collected:

5:17:57.477 14528 14528 I dex2oat : dex2oat took 461.318ms (439.864ms cpu) (threads: 8) arena alloc=4864B (4864B) java alloc=16KB (17328B) native alloc=1524KB (1561592B) free=551KB (564232B)

07-15 15:17:57.483  2606  2898 V installd: DexInv: --- END '/data/app/com.android.sampleservice-gbgRk_AEVYlqhSz4nmLV1Q==/base.apk' (success) ---

07-15 15:17:57.490  2606  2898 E         : Couldn't opendir /data/app/vmdl45469695.tmp: No such file or directory

07-15 15:17:57.490  2606  2898 E installd: Failed to delete /data/app/vmdl45469695.tmp: No such file or directory

07-15 15:17:57.491  2791  2848 V ActivityManager: Broadcast: Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.android.sampleservice  flg=0x4000010 (has extras) } ordered=false userid=0

07-15 15:17:57.491  2791  2848 I ActivityManager: broadcastIntentLocked function -> action != null -> if (killProcess) -> case Intent.ACTION_PACKAGES_UNSUSPENDED: -> forceStopPackageLocked

07-15 15:17:57.491  2791  2848 I ActivityManager: final boolean forceStopPackageLocked function

07-15 15:17:57.491  2791  2848 I ActivityManager: Force stopping com.android.sampleservice  appid=1000 user=0: pkg removed

07-15 15:17:57.493  2791  2848 V ActivityManager: Enqueueing broadcast: android.intent.action.PACKAGE_REMOVED replacePending=false

Reply all
Reply to author
Forward
0 new messages