How to install multiple android applications ( fro

2019-03-10 16:38发布

I have 50 apk files and I need to install it to many android devices. How can I install it with one click. I can install an apk file using adb via "install" command but how to install 50 apk files at once?

I'm using Windows

Thanks.

标签: android adb apk
10条回答
倾城 Initia
2楼-- · 2019-03-10 16:38

I've installed 10 apk files on 30 devices with one SDCard and MultiAPKInstaller (available on play store: https://play.google.com/store/apps/details?id=com.bifusimo.multiapkinstaller&hl=pl).

查看更多
在下西门庆
3楼-- · 2019-03-10 16:41

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
查看更多
beautiful°
4楼-- · 2019-03-10 16:44

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 :]

查看更多
成全新的幸福
5楼-- · 2019-03-10 16:49

The step by step actions required to execute Alextooter's answer:

On windows 10:

  1. Download adb fastboot here(download link in first post):https://forum.xda-developers.com/showthread.php?t=2317790

Minimal ADB and Fastboot_techbeasts.rar

  1. extract to c:/b/fastboot (for example)
  2. open c:/b/fastboot/py_cmd.exe
  3. connect phone to windows via usb

on phone:

  1. settings>About phone>tap build nr or build model near bottom 7 times>that unlocks the developer options.
  2. Settings> developer options>Enable adb debugging
  3. in ADB on windows: type:

adb devices

to see which ones are available.

  1. If it says ... unauthorized, unlock phone screen and accept the pc key.

  2. then if you paste an .apk in c:/b/fastboot/test.apk, the following command installs the app:

    adb install test.apk

  3. The following command installs all the apks in a folder:

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

  4. Note if you have a space in the path you should put the path between quotation marks:

    for %f in ("c:/b/fastboot/subfolder with space in the name/apks\*.apk") do adb install "%f"

查看更多
手持菜刀,她持情操
6楼-- · 2019-03-10 16:53

I found the solution. Its actually very simple:

adb install application1.apk & adb install application2.apk & adb install applicaiton3

That's what i was looking for. Thanks everyone

查看更多
贪生不怕死
7楼-- · 2019-03-10 16:56

If you want to do it on a Mac, put all your APKs in a folder and try this in the Terminal:

for file in apk/*; 
do 
./adb install $file; 
done
查看更多
登录 后发表回答