Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,31 @@ def check_system_requirements(
)
ime_list = result.stdout.strip()

if "com.android.adbkeyboard/.AdbIME" in ime_list:
# Check if permission denied (Android 13+)
if "SecurityException" in result.stderr or "Permission" in result.stderr:
# Fallback: check if package is installed
pkg_result = subprocess.run(
[
"adb",
"shell",
"pm",
"list",
"packages",
"com.android.adbkeyboard",
],
capture_output=True,
text=True,
timeout=10,
)
if "com.android.adbkeyboard" in pkg_result.stdout:
print(
"✅ OK (package installed, please ensure enabled in settings)"
)
else:
print("❌ FAILED")
print(" Error: ADB Keyboard is not installed on the device.")
all_passed = False
elif "com.android.adbkeyboard/.AdbIME" in ime_list:
print("✅ OK")
else:
print("❌ FAILED")
Expand Down