09 November 2016

Previous

  • AlarmManager does not provide persistence when off

  • Lack of reschedule on failure

  • Sync Adapter: your data transfer is also scheduled in conjunction with data transfers from other apps but not intended for general job scheduling

Project Volta

  • JobScheduler

Application Information

  • adb shell dumpsys package esms.msa2.SpeakerIdentifier2

Profiling and Trace

Call stack and start/stop times for any running methods - android.os.Debug dumpService() // possibly works when installed under /system/app or adb debug is connected getMemoryInfo() getPss() startMethodTracing() stopMethodTracing() threadCpuTimeNanos() ART GC: getRuntimeStat() // API23 ART GC: getRuntimeStats() // API23 - traceview - dmtracedump

  • android.os.BatteryManager for instantaneous current/remaining energy (Nexus 6/10)

  • adb shell dumpsys [battery | batterystats]

  • adb shell dumpsys batterystats --charged --checkin esms.msa2.SpeakerIdentifier2

  • android.net.TrafficStats/qtaguid/by sockets per thread

  • android.app.usage.NetworkStats in bucket intervals // API23

  • android.app.usage.NetworkStatsManager (android.permission.PACKAGE_USAGE_STATS)

  • adb shell dumpsys netstats detail

  • adb shell dumpsys [connoectivity | netstat | network_management | wifi | power]

  • adb shell dumpsys [cpuinfo | diskstat | meminfo packageName | sensor

Root required: android.permission.DUMP - andorid.os.Trace for APP marker if enabled - systrace/atrace/ftrace

App Standby

An application is active when it has: - A process currently in the foreground (either as an activity or foreground service, or in use by another activity or foreground service), such as notification listener, accessibility services, live wallpaper, etc. - A notification viewed by the user, such as in the lock screen or notification tray. - Explicitly been launched by the user.

Inactive apps are put into the App Standby mode when the device is not charging for a period of time.

Doze

  • Remain aware of motion

  • Adaptive sleep windows

  • User defined exemptions

  • Network access disallowed and wakelocks ignored

  • No WiFi scan

  • Delayed sync

Requirements - SENSOR_TYPE_SIGNIFICANT_MOTION - could messaging service to wake up