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

コマンドなしでぼくはAndroid開発できない話

operandoOS
March 10, 2017

 コマンドなしでぼくはAndroid開発できない話

コマンドなしでぼくはAndroid開発できない話
文字起こし
https://github.com/operando/DroidKaigi/blob/master/2017/no_command_no_life/README.md

DroidKaigi 2017 Day2
https://droidkaigi.github.io/2017/timetable.html#session-60

operandoOS

March 10, 2017
Tweet

More Decks by operandoOS

Other Decks in Technology

Transcript

  1. adb

  2. ωοτϫʔΫӽ͠ͰίϚϯυΛ ࣮ߦ͢Δ • adb shell ip addr show wlan0 |

    grep 'inet ' | cut -d' ' -f6|cut -d/ -f1 • ip෦෼͚ͩऔΓग़͢ • adb tcpip 5555 • adb connect ip:5555
  3. input keyevent • adb shell input keyevent KEYCODE_POWER • ిݯΩʔԡ͢

    • adb shell input keyevent KEYCODE_SLEEP • εΫϦʔϯOFF
  4. am

  5. am start • ActivityΛελʔτͤ͞Δ΋ͷ • adb shell am start 


    -a android.intent.action.VIEW 
 -d https://google.com
  6. am broadcast • adb shell am broadcast -a com.android.systemui.BATTERY_LEVEL_TEST •

    ి஑࢒ྔ0ʙ100%ͷը૾ΛΞχϝʔγϣϯ
 Ͱ֬ೝͰ͖Δʂ • ࢖Θͳ͍ͩΖʔ
  7. pm

  8. pm list • adb shell pm list packages • adb

    shell pm list packages -e • adb shell pm list packages -d • adb shell pm list packages -s • adb shell pm list packages -3
  9. dumpsys activity top • adb shell dumpsys activity top •

    ࠓදࣔͯ͠ΔActivityͷ৘ใ͕ݟ͑Δʂ • ϨΠΞ΢τͷߏ଄΋ݟΕΔʂ • FragmentManagerͷ৘ใ΋dump͞ΕΔ
  10. adb shell dumpsys dbinfo • adb shell dumpsys dbinfo •

    adb shell dumpsys dbinfo packageName • ࣮ߦͨ͠SQLͱ͔ͷཤྺ͕ݟ͑Δ • ςʔϒϧߏ଄ؙད໰୊
  11. log

  12. apkҾͬ͜ൈ͘͜ͱʹ
 શྗΛਚͨ͘͠ʂ • adb shell dumpsys activity activities | 


    grep apkΛվ଄ͯ͠pecoͱ߹Θͤͯ
 બ୒ͯ͠pull͢Δ΍ͭ࡞Δ