File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ <h2>Pairing</h2>
1313 < button onclick ="pair() "> Pair</ button >
1414 < button onclick ="persistent() "> Maker persistent (after pairing)</ button >
1515< button onclick ="port() "> Get adb port from logcat (requires persistence)</ button >
16+ < button onclick ="wireless() "> Toggle wireless (requires persistence)</ button >
1617 < input type ="text " placeholder ="command " id ="command ">
1718< h2 > Commands</ h2 >
1819 < button onclick ="send() "> Send command</ button >
@@ -22,6 +23,11 @@ <h2>Quick guide</h2>
2223< br >
2324If it does QAVS should work fine completely
2425< script >
26+ function wireless ( ) {
27+ fetch ( `/api/adb/togglewireless` , {
28+ method : "POST"
29+ } )
30+ }
2531 function persistent ( ) {
2632 fetch ( `/api/adb/makepersistent` , {
2733 method : "POST"
Original file line number Diff line number Diff line change @@ -1528,6 +1528,19 @@ public void Start()
15281528 request . SendString ( AdbWrapper . GetAdbWiFiPort ( ) . ToString ( ) ) ;
15291529 return true ;
15301530 } ) ;
1531+ server . AddRoute ( "POST" , "/api/adb/togglewireless" , request =>
1532+ {
1533+ try
1534+ {
1535+ AdbWrapper . EnableAdbWiFi ( true ) ;
1536+ request . SendString ( GenericResponse . GetResponse ( "cycled wireless adb" , true ) , "application/json" ) ;
1537+ }
1538+ catch ( Exception e )
1539+ {
1540+ request . SendString ( GenericResponse . GetResponse ( "Failed to cycle wireless adb: " + e , false ) , "application/json" ) ;
1541+ }
1542+ return true ;
1543+ } ) ;
15311544 server . AddRoute ( "POST" , "/api/adb/makepersistent" , request =>
15321545 {
15331546 try
You can’t perform that action at this time.
0 commit comments