zjn0505/adb-alfred

List alarms, jobschedulars

zjn0505 opened this issue · 2 comments

It will be very interesting and helpful if we could know what's the pending alarms/JobSchedulars/Works within this workflow.

Currently the outputs from dumpsys are quite messy.

adb shell dumpsys jobscheduler {package} is a good start point.

The attracting outputs are

  1. JOB ID, user.
    So adb shell cmd jobscheduler run -f [-u {USER_ID}] {package} {JOB_ID} could be used to force a job to run. (API 25+)

  2. minimum latency, if this is a periodical job.

  3. Constraints, Satisfied and Unsatisfied.

  4. Some useful info currently I don't know how to handle them.

 Enqueue time: -24s295ms
 Run time: earliest=+1m35s705ms, latest=none
 Num failures: 3
 Last failed run: 2019-11-04 13:03:41
 Last run heartbeat: 0
 Ready: false (job=false user=true !pending=true !active=true !backingup=true comp=true)

https://developer.android.com/studio/inspect/task

Cannot think of better solution than Background Task Inspector