The Quest 2 can run many ADB commands which enhance the overall experience of the VR world, but there's a catch.
Every time the Quest 2 is rebooted, all adb settings are reset to provide a clean slate. This is similar to how iOS relinks everything with a simple reboot. Doing this makes sure the user isn't impacted and has to factory reset as a result.
Therefore, users need to be connected to a PC and run ADB commands every time the headset reboots. My goal is to take the PC out of the equation and do everything on the headset.
This goal is accomplished through the use of:
-
LADB - to create a local ADB server for issuing commands (costs money on play store, but you can build it from Draco's GitHub)
-
SetEdit - a settings database editor
-
Logcat Reader - reads the android system logcat to get a wireless ADB port
The current method of "wireless" debugging involves using the adb tcpip <port>
command which involves a USB connection. Once that's finished, the USB can be severed and adb connect <IP:port>
is used to wirelessly connect to the headset.
This method is used by SideQuest to run adb commands wirelessly on the headset. This is why changing settings directly on the headset is not supported by the SideQuest application on the Quest headset.
-
Enable developer mode from the Meta Quest app for ADB
-
Enable secure settings access for SetEdit and log access for Logcat Reader
-
adb shell pm grant by4a.setedit22 com.android.permissions.WRITE_SECURE_SETTINGS
-
adb shell pm grant com.dp.logcatapp android.permission.READ_LOGS
-
Create a logcat filter in Logcat Reader that looks for
adb wifi started
-
Head to the
global
settings table on your quest and changeadb_wifi_enabled
to1
-
A dialog should pop up for enabling wireless debugging. Select, allow and a port should show up on Logcat Reader. Write that port down or memorize it.
-
Inside LADB, turn off the
pair and shell
setting and force close/reopen the app -
In LADB, type
adb connect localhost:<port>
where port is the port you wrote down from step 5. A prompt for USB debugging should show up -
ADB commands galore!
With this method, many hidden Oculus settings can be toggled without the use of a PC cable or using old wireless debugging methods.
Thanks to:
-
lmore377 for providing me the missing piece for grabbing the wireless debugging port Reddit post here
-
Draco for LADB
-
Darshan Parajuli for Logcat Reader
-
4A for Settings Database Editor