Last active
July 27, 2023 10:29
-
-
Save nyxiereal/6fe95033bdb8b3383bd8f270f21bdbd0 to your computer and use it in GitHub Desktop.
Install all .apk files inside a directory using ADB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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