Help us understand the problem. What is going on with this article?

adb - Android debug tool

Enable Device Debug

  • Enable developer mode on your Android device
    1. Settings ⇒ System ⇒ About Phone ⇒ Tap "Build number" over 7 times and quickly
    2. Then you will see "You are already developer"
  • Enable debugging
    1. Go to "Developer Options" ⇒ Enable "ADB debugging"
    2. Connect Android phone to your Windows PC, then you will see a pop-up ( some phone will not show pop-up, please check notification center)
    3. Choose "Transfer files"

adb Setup

Windows

    cd C:\{adb folder path}

Mac

Check installation success

  • Type
    adb
  • If you can see below message, means adb is able to use
    Android Debug Bridge version 1.0.40
    Version 4986621
    Installed as C:\{adb folder path}\adb\adb.exe

    global options:
     -a         listen on all network interfaces, not just localhost
     -d         use USB device (error if multiple devices connected)
     -e         use TCP/IP device (error if multiple TCP/IP devices available)
     -s SERIAL  use device with given serial (overrides $ANDROID_SERIAL)
     -t ID      use device with given transport id
     -H         name of adb server host [default=localhost]
     -P         port of adb server [default=5037]
     -L SOCKET  listen on given socket for adb server [default=tcp:localhost:5037]

adb command

  • Connect your Android phone to PC/MAC, then type
    adb devices

If you see below message, means your Android phone already connected to PC, and able to use adb command

    List of devices attached
    35PDU18712000000        device
  • Send text to device
    adb shell input text "textttt"
    adb shell input keyevent TAB
    adb shell input keyevent 61
Tamako
From Taiwan 台湾人です
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした