Android adb over Wifi install apk
19,388
Have you tried this:
./adb.exe disconnect 192.168.2.143
Author by
user1192534
Updated on June 20, 2022Comments
-
user1192534 almost 2 years
I have been using ADB on the command line to install apk's via USB. Now I have succesfully connected via Wifi. I am able to install apps.
./adb.exe connect 192.168.2.143 connected to 192.168.2.143:5555 ./adb.exe install -r xyz.apk pkg: /data/local/tmp/xyz.apk Success
The problem is that adb doesn't close after 'Success'. It just hangs. If I tether the phone via USB ADB will close correctly after installing an app.
This is a problem as I would like to write a script which uploads the apk to a number of phones all connected via Wifi.
-
user1192534 about 12 yearsI tried your suggestion. I opened another terminal and. entered "./adb.exe disconnect". The other adb command is still waiting. If I then enter "./adb connect 192.168.2.143" the waiting adb closes with "819 KB/s (26225 bytes in 0.031s). - waiting for device - "
-
Jonathan about 12 years@user1192534 Kind of hacky, but, Maybe...Start the connection and install in a background task write the contents to a log file. Monitor the log file for change. See if the change was a true. If so, disconnect and then connect to the next device. How many devices are you installing on? This sounds like it would be fun.
-
user1192534 about 12 yearshe following is sort of a solution: echo "start install" ./adb.exe install -r Z:/RobotControl.apk & sleep 5 echo "install should be complete" ./adb disconnect 192.168.2.143 ./adb connect 192.168.2.143 Ofcourse this totally ignores the Failure/Success response from ADB
-
user1192534 about 12 yearsJonathan, I am installing on 8 devices (Optimus P990)