How to keep the WiFi ADB open feature in Android 12

42 views Asked by At

I have an ASUS Tinker Board, which is based on the rk3399 chipset. I'm using the official Android image provided by ASUS as my Android intranet server. I need a 24-hour ADB connection, but due to the layout of my server cabinet, I can't use a USB cable for a direct connection to an upstream server. Therefore, I'm using network ADB.

When the development board is running at full power, the Wi-Fi connection often gets interrupted. This is not a major issue because it quickly reconnects on its own. However, this causes my Wi-Fi ADB functionality to be interrupted, resulting in a loss of control over my server. After each Wi-Fi interruption, I need to manually enable the Wi-Fi ADB functionality and the port changes randomly. Additionally, since my device is placed inside a server cabinet, manually enabling Wi-Fi ADB and obtaining a new port each time is a cumbersome task.

Therefore, I would like my operating system to automatically restart the Wi-Fi ADB functionality and persist the port during boot or when there is an interruption. I have found some methods that involve developing an application using Android Studio, but I don't know Java or Kotlin. Is there a way to enable this functionality by modifying the operating system configuration files or similar methods?

0

There are 0 answers