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

ADB (Android Debug Bridge) - how can it help you

ADB (Android Debug Bridge) - how can it help you

A brief dive into the 'guts' of the ADB (Android Debug Bridge) with useful commands that will (I hope) make your development/debugging life easier

GDG Porto - Android Sessions - #4 Farfetch (Porto-Portugal)

https://www.meetup.com/pt-BR/GDG-Porto/events/253780128/

Avatar for Filipe Batista

Filipe Batista

September 05, 2018
Tweet

More Decks by Filipe Batista

Other Decks in Programming

Transcript

  1. Hello! I AM FILIPE BAPTISTA - Android Developer (+6 Years)

    - Work @ WIT-Software since 2016 - Coffee lover - Traveler - And music addict 2
  2. 3

  3. What is ADB ? ADB stands for Android Debug Bridge

    and basically is a command-line tool that lets you communicate with your Android device. Is included in the Android SDK Platform-Tools package. /android_sdk/platform-tools/ 4
  4. 5

  5. 6

  6. 8

  7. 9

  8. 21 dumpsys: activity top Component name Current state of the

    Activity (Resumed, Stopped or Finished) Current configuration in use (font scale, locale, screen density, screen orientation, etc)
  9. 22 dumpsys: activity top The hierarchical structure of the View

    constituting the screen being displayed
  10. 23 dumpsys: activity top See what fragments are active Active

    nested fragments Fragment current state Fragment current state
  11. 27 Find receivers by Intent Action adb shell cmd package

    query-receivers [--brief] –a intent_action
  12. 28 Send broadcast Intent adb shell am broadcast –a intent_action

    [--es] extra_key extra_string_value –p package
  13. 31 See scheduled alarms Represents the type of alarm (RTC_WAKEUP,

    RTC, ELAPSED_WAKEUP, ELAPSED) and corresponds to an integer value 0-3, respectively
  14. 32 See scheduled alarms whenElapsed= refers to the time (approximately)

    of when the alarm will be triggered since the system started. when= date/time at which this alarm will be triggered
  15. 33 See scheduled alarms Used in repeating alarms to specify

    the interval between repeats PendingIntent that will be triggered. Depending on whether the PendingIntent was instantiated using getService, getBroadcast or getActivity, the alarm will start a service, send a broadcast, or start one activity. See the AlarmManagerService file the AOSP repo for more details. (platform_frameworks_base/services/core/java/com/android/server/AlarmManagerService.java)