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?

27 points · 6 comments · view on lemmy.world

6 Comments

ikidd@lemmy.world · 3 pts · 1y

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"
Flagstaff@programming.dev · 2 pts · 1y

Make a script using AutoHotkey (ask for help in !ahk@programming.dev) 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.

Xanza@lemm.ee · 2 pts · 1y (2 replies)

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."

ouch@lemmy.world · 1 pts · 1y (1 reply)

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.

Xanza@lemm.ee · 1 pts · 1y

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

limerod@reddthat.com · 1 pts · 1y

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.