Spyke
android·Androidbyouch

How to batch install a list of apps?

What ways are there to automate installation of a list of apps?

"adb install" can be used to install apks without rooting the phone.

fdroidcl can automate downloading apks from F-Droid.

Is there anything similar that can install a list of Play store apps / package names?

View original on lemmy.world

Installs all apk files in a given folder to a connected device.

#!/bin/bash

# Check if directory argument is provided
if [ $# -ne 1 ]; then
    echo "Usage: $0 <directory_path>"
    exit 1
fi

# Store directory path
APK_DIR="$1"

# Check if directory exists
if [ ! -d "$APK_DIR" ]; then
    echo "Error: Directory '$APK_DIR' does not exist"
    exit 1
fi

# Check if adb is available
if ! command -v adb &> /dev/null; then
    echo "Error: ADB is not installed or not in PATH"
    exit 1
fi

# Check if any device is connected
if ! adb devices | grep -q "device$"; then
    echo "Error: No Android device connected"
    exit 1
fi

# Count total APKs
total_apks=$(find "$APK_DIR" -name "*.apk" | wc -l)
if [ "$total_apks" -eq 0 ]; then
    echo "No APK files found in '$APK_DIR'"
    exit 1
fi

echo "Found $total_apks APK file(s)"
echo "Starting installation..."

# Counter for successful and failed installations
success=0
failed=0

# Find and install all APK files
find "$APK_DIR" -name "*.apk" | while read -r apk_file; do
    echo -n "Installing $(basename "$apk_file")... "
    
    if adb install -r "$apk_file" &> /dev/null; then
        echo "SUCCESS"
        ((success++))
    else
        echo "FAILED"
        ((failed++))
    fi
done

# Print summary
echo
echo "Installation complete!"
echo "Successfully installed: $success"
echo "Failed installations: $failed"
echo "Total APKs processed: $total_apks"
3
lemm.ee

automate installation of a list of apps

Not really. I'm sure you could set something up using fdroidcl or eget or something to grab apk's from Github, but nothing would be "automated."

2
ouchreply
lemmy.world

This eget?

With automated in this context I mean non-interactive ways to install multiple apps, as opposed to having to manually tap install on each app.

1
Xanzareply

It's like you didn't even read my comment....

1

Make a script using AutoHotkey (ask for help in ![email protected]) that goes through the list in a Windows desktop browser and remotely installs the apps to the device one by one. That's how I'd do it, anyway.

2

If its a convenience thing. PI with shizuku can do background(in the notification) installs. So, you can tap install on multiple apks at the same time.

1

You reached the end

How to batch install a list of apps? | Spyke