Android/Unity debug tips : Wireless ADB Debugging

 

After years of debugging with cable I decided to find another method since I have only one USB-C cable with my phone (Mi-4c).

Here’s how I push my Unity game to my phone, this can be used by any other Android developement platform.

1 – Download WiFi ADB


WiFi ADB – Debug Over Air
It requires root but you can find other that don’t require it (I don’t try other apps).

2 – Connect ADB to your phone

Note that you need WiFi enabled on your smartphone and your PC needs to be in the same network as well.

Launch the command line “adb connect 192.168.X.X:5555” in your batch/powershell or use this script :

 


$ip = Read-Host "End of IP ?"
cd "C:\Program Files (x86)\Android\android-sdk\platform-tools"
$cmd = ".\adb connect 192.168.1." + $ip + ":5555"
Write-Debug $cmd
Invoke-Expression $cmd
Pause

Note : You may need to change the beggining of the IP in the script

connectADB.ps1

Then Right click/Run with PowerShell

push

3 – Enjoy !

You can push your games using ADB

push

 

If you have time you can write your own scanner to find the good IP or use a fixed IP Address for your smartphone setted by MAC or any other method in your router for example.

Feel free to improve the script 🙂

Good coding

Leave a Reply

Your email address will not be published. Required fields are marked *