Android adb over Wifi install apk
Asked Answered
D

1

9

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.

Deboer answered 6/2, 2012 at 15:19 Comment(0)
F
3

Have you tried this:

./adb.exe disconnect 192.168.2.143

Forsyth answered 6/2, 2012 at 15:22 Comment(4)
I 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 - "Deboer
@Deboer 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.Forsyth
he 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 ADBDeboer
Jonathan, I am installing on 8 devices (Optimus P990)Deboer

© 2022 - 2024 — McMap. All rights reserved.