Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go


ADB Install APK Package

20200121 Be careful when installing arbitrary Android packages from the Internet. Only do so if they are from a trustworthy source and have been independently audited. The example here downloads the open source F-Droid client for Android.

$ wget https://f-droid.org/FDroid.apk
--2020-01-22 11:41:07--  https://f-droid.org/FDroid.apk
Resolving f-droid.org (f-droid.org)...,,
Connecting to f-droid.org (f-droid.org)||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7568874 (7.2M) [application/vnd.android.package-archive]
Saving to: 'FDroid.apk'

FDroid.apk   100%[=============================>]   7.22M  1.30MB/s    in 7.2s    

2020-01-22 11:41:16 (1024 KB/s) - 'FDroid.apk' saved [7568874/7568874]

Installation is then effected using the install command:

$ adb install FDroid.apk

Check the Android device to see that the application has indeed been installed.

If the app supports installation on the SD Card (the primary storage can be prone to filling up) then the -s option can be used.

The -r option forces the re-installation or update of an existing app.

Not tested, but we can identify a particular package to uninstall:

$ adb uninstall au.com.bitbot.phonetowers
$ adb shell 'pm list packages -f' |
  sed -e 's/.*=//' |
  sed 's/\r//g' |
  grep "com.foobar" |
  while read pkg; do adb uninstall $pkg; done;

Support further development by purchasing the PDF version of the book.
Other online resources include the Data Science Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2020 Togaware Pty Ltd. Creative Commons ShareAlike V4.