[Android Software Development] noname81:
Ok, I think we need to shed some light on this issue. For that I need your help (with you I mean all the LMT users experiencing this issue).

LMT, like all other apps which want to run at startup, registers a "boot complete receiver" to get a trigger, when the system is up and is ready to start apps. With this trigger LMT just starts its service again. To trace down the problem I want to see in your traces, when Android sends this startup trigger to LMT and how long LMT needs to startup afterwards. Please do the following and send me the results/post them here (you can also upload the complete trace and I'll analyze it):

- Shutdown the system, restart it and try to use LMT's pie as early as possible to trigger an action which needs root (e.g. menu key/back key)

- Record a logcat from the complete startup and save it for later filtering (e.g. "adb logcat > LMT.log" or with catlog from the PlayStore)

- Now filter the trace for the following strings:

>>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<

com.android.lmt/.StartupReceiver

LMT::StartupReceiver: Restarting TouchService

LMT::TouchService: TouchService started

LMT::InputContext: InputContext started

LMT::Launcher: Fire action

- I did a quick filtering with "grep":

cat LMT.log | grep '>>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<\|com.android.lmt/.StartupReceiver\|LMT::StartupReceiver: Restarting TouchService\|LMT::TouchService: TouchService started\|LMT::InputContext: InputContext started\|LMT::Launcher: Fire action'

- The result is, that LMT is started ~50s after Android started its initial entry point (Zygote). Then it takes 2-3s for LMT to be responsive and e.g. the pie can be used:

11-29 07:13:39.873 380 380 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<

11-29 07:14:28.271 990 1000 I ActivityManager: Start proc 3998:com.android.lmt/u0a124 for broadcast com.android.lmt/.StartupReceiver

11-29 07:14:28.482 3998 3998 D LMT::StartupReceiver: Restarting TouchService

11-29 07:14:29.150 3998 3998 D LMT::TouchService: TouchService started

11-29 07:14:29.718 4078 4078 D LMT::InputContext: InputContext started

11-29 07:14:30.882 3998 3998 D LMT::Launcher: Fire action type: 5, string: none

- So why is LMT only started after 50s? Android is doing a lot of init stuff at startup but side by side a lot of other apps are started. It seems like system apps are getting the boot receiver first. If you want to see, which apps get the trigger when, you can add one more trace to the filter:

ActivityManager: Start proc

- And here is the grep command:

cat LMT.log | grep '>>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<\|com.android.lmt/.StartupReceiver\|LMT::StartupReceiver: Restarting TouchService\|LMT::TouchService: TouchService started\|LMT::InputContext: InputContext started\|LMT::Launcher: Fire action\|ActivityManager: Start proc'

I don't paste the filtered trace here, since it is quite big.

Please post your results (also with filter 'ActivityManager: Start proc' so that we can see which apps started before LMT) and I'll check, if there is something I can improve in LMT.

Thanks!