Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android Developer Options

Android Developer Options

A brief tour of some of the Android Developer Options to help you debug issues in your app

80a71dbbf07fa2ff1f6f4bb7152bac21?s=128

Andrea Falcone

August 28, 2015
Tweet

Transcript

  1. Android Developer Options What can those toggles do for me?

    @asfalcone
  2. Andrea Falcone Senior Software Engineer, Twitter / Fabric @asfalcone

  3. None
  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. None
  11. None
  12. None
  13. None
  14. None
  15. $ adb bugreport

  16. None
  17. UPTIME (uptime) MMC PERF (/sys/block/mmcblk0/stat) MEMORY INFO (/proc/meminfo) CPU INFO

    (top -n 1 -d 1 -m 30 -t) PROCESSES (ps -P) PROCESSES AND THREADS (ps -t -p -P) APP ACTIVITIES (dumpsys activity all) APP SERVICES (dumpsys activity service all) APP PROVIDERS (dumpsys activity provider all) SYSTEM LOG (logcat -v threadtime -d *:v) VM TRACES JUST NOW (/data/anr/traces.txt.bugreport)
  18. None
  19. telnet localhost 5554 geo fix -71.09 42.36 emulator only

  20. LocationManager

  21. None
  22. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); android.os.Debug.waitForDebugger(); int breakpoint =

    1; }
  23. None
  24. None
  25. None
  26. None
  27. None
  28. None
  29. None
  30. None
  31. None
  32. None
  33. None
  34. Margins Optical bounds Clip bounds

  35. None
  36. None
  37. None
  38. No overdraw 1x overdraw 2x overdraw 3x overdraw 4+x overdraw

  39. lint --check Overdraw src/main

  40. None
  41. None
  42. None
  43. Original Monochrome Deuteranomaly Tritanomaly

  44. None
  45. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null)

    { // TODO: Find Bugs Here! } else { ... } } public void onSaveInstanceState(Bundle savedInstanceState) { // TODO: Find Bugs Here! ... super.onSaveInstanceState(savedInstanceState); } public void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); // TODO: Find Bugs Here! ... }
  46. None
  47. None
  48. adb over wifi!

  49. $ adb devices List of devices attached xxxxxxx device Connect

    device via usb $ adb tcpip 5555 restarting in TCP mode port: 5555 Start adb in tcpip mode - while connected via usb Get device IP address Connect device via tcp $ adb connect 192.168.1.6 connected to 192.168.1.6:5555
  50. $ adb shell More debugging tools: DDMS Hierarchy viewer Traceview

  51. None
  52. Thank you! @asfalcone