How to install multiple android applications ( from apk files) into device?

Are you using linux ? You could copy all apks to one directory, and then run simply use:

#!/bin/sh
for file in /dir/*
do
  adb install $file 
done

In Windows, you can using this command line:

for %f in (C:\your_app_path\*.apk) do adb install "%f"

you can either use (from ADB help):

adb install-multiple [-lrtsdpg] <file...>
                             - push this package file to the device and install it
                               (-l: forward lock application)
                               (-r: replace existing application)
                               (-t: allow test packages)
                               (-s: install application on sdcard)
                               (-d: allow version code downgrade)
                               (-p: partial application install)
                               (-g: grant all runtime permissions)

which is prefered over installing one-by-one, since you'll be saving some overhead connection-time over each command connecting/disconnecting to your device's modem,

generally speaking, use the install-multiple while escaping the package name (your apk files), you better make sure the apk files-names do not have spaces or you'll have to escape the file-names. if you are using windows's cmd escaping and wrapping with " is mandatory, unless you are using a little trick: dropping a few apk files over a batch file and using the %* as argument.

if you are still on the "I want to install one-by-one, use my script from the following answer https://stackoverflow.com/a/34553043/257319 it will allow you an unlimited amount of arguments, while properly shortening the apk-file name in the install command..

another alternative is batch compressing the whole APK to a 'storage-compression zip' pushing it to the sdCard, uncompressing it to a tmp folder, and using shell to install the packages one by one, but since those exist locally the overhead of "adb-to-modem conversations" would be almost none :)

happy installation :]

Tags:

Android

Adb

Apk