Skip to content

Instantly share code, notes, and snippets.

@nyxiereal
Last active July 27, 2023 10:29
Show Gist options
  • Save nyxiereal/6fe95033bdb8b3383bd8f270f21bdbd0 to your computer and use it in GitHub Desktop.
Save nyxiereal/6fe95033bdb8b3383bd8f270f21bdbd0 to your computer and use it in GitHub Desktop.
Install all .apk files inside a directory using ADB
# Made by Xemulated | GPL-2
import os
def install_apk_files(directory):
apk_files = [file for file in os.listdir(directory) if file.endswith(".apk")]
if not apk_files:
print("No APK files found in the directory.")
return
for apk_file in apk_files:
apk_path = os.path.join(directory, apk_file)
print(f'Installing {apk_file}...')
command = f"adb install {apk_path}"
os.system(command)
# Provide the directory path where the APK files are located
directory_path = "C:/Users/xemulated/Desktop/apks"
install_apk_files(directory_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment