Skip to content

Commit

Permalink
userguide, porting: update for ADB authorization prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
peat-psuwit authored and doniks committed Dec 18, 2023
1 parent ec79eee commit f931d5f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions porting/configure_test_fix/USBModed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ This behavior is helpful for the porters. However, this can be confusing to end-

Another rescue feature available is the ability to force usb-moded to go to "rescue mode" or to enable ADB on every boot. This can be done by placing an empty file at ``/userdata/.force-ssh`` or ``/userdata/.force-adb`` (which translate to ``/data/.force-ssh`` or ``/data/.force-adb`` in the recovery), and the system will make sure the correct mode is enabled.

.. note::
If using ADB, you may also have to disable ADB authorization prompt. See :ref:`AdbdAuthz`.

Configuring usb-moded directly
------------------------------

Expand Down
17 changes: 17 additions & 0 deletions userguide/advanceduse/adb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,23 @@ Next, you'll need to turn on Developer Mode.
If there's a device in the list here (The command doesn't print "List of devices attached" and a blank line), you are able to use ADB.
If not, continue to the next section.

.. _AdbdAuthz:

Authorize access to the device
------------------------------

When using adb for the first time on a computer, the following dialog will appear when you unlock the screen.

.. figure:: /_static/images/userguide/adb_authorization_prompt.png

This ensures that ADB commands will not work on a new computer unless user unlock the phone and acknowledge the dialog. Selecting "Allow" will make the ADB commands work for this session, and will also remember this computer so that it won't prompt you again in the future.

.. note::
If you're bringing up a port and you require ADB access before the UI is available, you can disable this protection by editing ``/etc/default/adbd`` and change ``ADBD_SECURE=1`` to ``ADBD_SECURE=0``.

Frequently used ADB commands
----------------------------

ADB shell commands::

adb shell — Gives you access to the Linux command-line shell on your device.
Expand Down

0 comments on commit f931d5f

Please sign in to comment.