-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
55 lines (49 loc) · 2.24 KB
/
main.py
File metadata and controls
55 lines (49 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# DroidHelper - ADB Android Tools
# أداة سطر أوامر بسيطة للتعامل مع أجهزة أندرويد باستخدام ADB
# Author: mina2357
# GitHub: https://github.com/mina2357/DroidHelper
import os
def run_adb_command(command):
result = os.popen(f'adb {command}').read()
print(result)
def main():
print("\n📱 DroidHelper - أدوات أندرويد بسيطة عبر ADB\n")
print("1. عرض إصدار النظام")
print("2. استخراج تطبيق (Package Path)")
print("3. تشغيل تطبيق")
print("4. قراءة اللوج (logcat)")
print("5. عرض جميع التطبيقات")
print("6. حذف تطبيق")
print("7. نسخ ملف من الهاتف إلى الكمبيوتر")
print("8. نسخ ملف من الكمبيوتر إلى الهاتف")
print("9. خروج")
choice = input("\nاختر رقم: ")
if choice == "1":
run_adb_command("shell getprop ro.build.version.release")
elif choice == "2":
package = input("اكتب اسم الباكدج: ")
run_adb_command(f"shell pm path {package}")
elif choice == "3":
package = input("اكتب اسم الباكدج: ")
run_adb_command(f"shell monkey -p {package} -c android.intent.category.LAUNCHER 1")
elif choice == "4":
run_adb_command("logcat -d | tail -n 20")
elif choice == "5":
run_adb_command("shell pm list packages")
elif choice == "6":
package = input("اكتب اسم الباكدج اللي هتحذفه: ")
run_adb_command(f"uninstall {package}")
elif choice == "7":
remote_path = input("📥 اكتب مسار الملف على الهاتف: ")
local_path = input("💾 اكتب مسار الحفظ على الكمبيوتر: ")
run_adb_command(f"pull {remote_path} {local_path}")
elif choice == "8":
local_path = input("📤 اكتب مسار الملف على الكمبيوتر: ")
remote_path = input("📱 اكتب مكان الحفظ على الهاتف: ")
run_adb_command(f"push {local_path} {remote_path}")
elif choice == "9":
print("👋 مع السلامة")
else:
print("❌ اختيار غير صحيح")
if __name__ == "__main__":
main()