A flow to automatically activate wireless debugging and set ADB over TCP/IP port 5555, allowing you to continue using your device seamlessly without manual reconfiguration after every restart.
Table of Contents
- Open Automate and go to community.
- Find Auto ADB over TCPIP in community tab.
- Click on Download and go to flows tab.
- Open Automate settings
- Find Privileges under Access Control, tap then give access to:
Access location in the background
Show Notifications
Modify System Settings
Ignore App Hibernation
Ignore Battery Optimizations
Schedule Exact Alarms
- Find Privileged service start method under Privileged & Superuser
- Select
Android Debug Bridge (ADB)
- Go to Developer options and turn on Wireless debugging:
- Check
Always allow on this network
. - Select allow on
allow wireless debugging on this network
.
- Check
- Tap on Pair Device with pairing code.
- Enter
Wi-Fi pairing code
toEnter code that's shown
dialog at the top.
- Enter
- Select
- Check Run on system startup under Safety.
- Find Privileges under Access Control, tap then give access to:
- Go to the Flows tab and start the flow.
Note
- Problem? Refer to Troubleshooting.
- Didn't find the fix for your issue? Ask the question in the comments in detail.
Action |
---|
Boot Completed |
Category | Name | Value |
---|---|---|
Global | "adb_wifi_enabled" | 1 |
Service Type |
---|
"_adb-tls-connect._tcp" |
Protocol | TCP/IP Port | Hostname | Port |
---|---|---|---|
TCP/IP | 5555 | hosts | ports |
Note
- Hostname and Port are using variable we got from Network Service Discover.
- Boot Completion Wait:
- The flow waits until the device finishes booting using Broadcast Receive block.
- ADB Restart Notification:
- After boot completion, it displays a notification asking if the user wants to restart ADB in TCPIP mode.
- Wi-Fi Connection Check:
- If the user clicks on the notification, it immediately checks if the device is connected to Wi-Fi.
- If connected, it proceeds; otherwise, it waits for the device to connect to Wi-Fi.
- Enable Wireless Debugging:
- It enables wireless debugging using the System Setting Set block.
- Hostname and Port Discovery:
- The flow attempts to find the hostname and port for connection using the Network Service Discover block.
- If no information is found, it continues trying until it discovers the hostname and port.
- Set TCPIP to 5555:
- It sets the TCPIP to port 5555 using the ADB Protocol Set block.
- If this step fails, the flow turns off wireless debugging and starts again from block 4.
Note
- For first-time use, the flow starts from the Is Wi-Fi Connected block to ensure everything is working as expected.
-
com.llamalab.automate.RequiredArgumentNullException: alias
- Install Generated Key, then add it to Keychain alias.
-
android.security.KeyChainException: Certificate or private key inaccessible:{certificate}
- Re-install Generated Key, then add it to Keychain alias.
-
android.system.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused)
- Try Forget privileged service ADB keys, then pair again.
-
javax.net.ssl.SSLProtocolException: Read error: ssl=0xb400007dbbf10988: Failure in SSL library, usually a protocol error
- Try pairing again.
-
error:10000416:SSL routines:OPENSSL_internal:SSLV3_ALERT_CERTIFICATE_UNKNOWN (external/boringssl/src/ssl/tls_record.cc:592 0xb400007dbaa83600:0x00000003)
- Try pairing again.
If you find any mistakes in the flow or missing information on this documentation or want to support financially, you can do so in the comments by commenting.
Thank you for using the flow.