Skip to content

Commit

Permalink
Create main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
unchaineddev authored Aug 18, 2023
1 parent 78a19c9 commit 7f80d51
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import subprocess

# Uninstalls packages
def uninstall_apk(package_name):
subprocess.run(["adb", "shell", "pm", "uninstall", "--user", "0", package_name])

# Reads from file and uninstalls
with open("commands.txt", "r") as file:
lines = file.readlines()
for line in lines:
if line.strip():
package_name = line.split("|")[0].strip()
print(f"Uninstalling: {package_name}")
uninstall_apk(package_name)

print("APK uninstallation completed.")

0 comments on commit 7f80d51

Please sign in to comment.