I'm a beginner at this so just mind me if I ask anything obvious. I'm trying to install an apk to my device using adb install apk.apk
however, the apk is around a few hundred MB big and it takes some time. Is there some sort of progress bar that I could implement in the command window to show the progress? I've seen stuff for adb push/pull . I'm not sure if it's the same. I'm running this in Windows 8.1. I also have an adb environment variable set up.
Thanks so much.
Well, adb install apk.apk
is just a glorified shortcut for:
adb push apk.apk /data/local/tmp
adb shell pm install /data/local/tmp/apk.apk
adb shell rm /data/local/tmp/apk.apk
So if you are so inclined to see the upload progress bar - just adb push -p
your apk first and then adb shell pm install
it either manually or with a simple script.
A bit bulky but ADB can become verbose if you ask it to:
$ adb --help
...
$ADB_TRACE
comma-separated list of debug info to log:
all,adb,sockets,packets,rwx,usb,sync,sysdeps,transport,jdwp
For example, if you set ADB_TRACE=all
before calling adb push
(e.g. by running ADB_TRACE=all adb push path/to/app.apk
in a single line, or doing an export ADB_TRACE=all
in advance), then you'd get something like this:
...
adb D 01-02 15:41:36 41828 1867505 adb_io.cpp:81] readx: fd=3 wanted=72
adb D 01-02 15:41:36 41828 1867505 adb_io.cpp:97] readx: fd=3 wanted=72 got=72 535441320000000020fd000000000000 STA2.... ....... [truncated]
adb D 01-02 15:41:36 41828 1867505 adb_io.cpp:107] writex: fd=3 len=51 53454e442b0000002f646174612f6c6f SEND+.../data/lo [truncated]
adb D 01-02 15:41:36 41828 1867505 adb_io.cpp:107] writex: fd=3 len=65544 4441544100000100504b030400000000 DATA....PK...... [truncated]
adb D 01-02 15:41:36 41828 1867505 adb_io.cpp:107] writex: fd=3 len=65544 44415441000001002c7903adab89d6d5 DATA....,y...... [truncated]
adb D 01-02 15:41:36 41828 1867505 adb_io.cpp:107] writex: fd=3 len=65544 4441544100000100e570055c0957c1d5 DATA.....p.\.W.. [truncated]
adb D 01-02 15:41:36 41828 1867505 adb_io.cpp:107] writex: fd=3 len=65544 4441544100000100f94f47fe441a3fa6 DATA.....OG.D.?. [truncated]
adb D 01-02 15:41:36 41828 1867505 adb_io.cpp:107] writex: fd=3 len=65544 44415441000001007bf1fa1b58c33b89 DATA....{...X.;. [truncated]
adb D 01-02 15:41:36 41828 1867505 adb_io.cpp:107] writex: fd=3 len=65544 4441544100000100c6d8384d98f7b39d DATA......8M.... [truncated]
...
which roughly shows what appears to be 64k block transmissions with timestamps, in real time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With