When running main.py uninstall nodataperm on Android 13, the script raised KeyErrors
because nodataperm was only designed for Android 11.
What’s changed
Added explicit handling for Android 13 in Nodataperm.__init__
Improved error message when version unsupported
Fixed minor regex SyntaxWarning
Why
The nodataperm patch only supports Android 11.
This fix prevents crashes when executed on Android 13.
Testing
✅ Android 11 → uninstall works normally ⚠️ Android 13 → exits gracefully (no crash)
➜ waydroid_script git:(main) sudo venv/bin/python3 main.py uninstall nodataperm
[sudo] password for gbk:
ok
Traceback (most recent call last):
File "/home/gbk/Git/waydroid_script/main.py", line 357, in <module>
main()
~~~~^^
File "/home/gbk/Git/waydroid_script/main.py", line 350, in main
args.func(args)
~~~~~~~~~^^^^^^
File "/home/gbk/Git/waydroid_script/main.py", line 144, in remove_app
remove_list.append(Nodataperm(args.android_version))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/gbk/Git/waydroid_script/stuff/nodataperm.py", line 39, in __init__
self.dl_link = self.dl_links[android_version][arch][0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'x86_64'
➜ waydroid_script git:(main) sudo venv/bin/python3 main.py uninstall nodataperm
ok
Traceback (most recent call last):
File "/home/gbk/Git/waydroid_script/main.py", line 357, in <module>
main()
~~~~^^
File "/home/gbk/Git/waydroid_script/main.py", line 350, in main
args.func(args)
~~~~~~~~~^^^^^^
File "/home/gbk/Git/waydroid_script/main.py", line 144, in remove_app
remove_list.append(Nodataperm(args.android_version))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/gbk/Git/waydroid_script/stuff/nodataperm.py", line 39, in __init__
self.dl_link = self.dl_links[android_version][arch][0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'x86_64'
➜ waydroid_script git:(main) sudo venv/bin/python3 main.py uninstall nodataperm
/home/gbk/Git/waydroid_script/stuff/nodataperm.py:101: SyntaxWarning: invalid escape sequence '\.'
name = re.findall("([a-zA-Z0-9]+)\.zip", self.dl_link)[0]
ERROR: No download links configured for Android version '13' in nodataperm
Traceback (most recent call last):
File "/home/gbk/Git/waydroid_script/main.py", line 357, in <module>
main()
~~~~^^
File "/home/gbk/Git/waydroid_script/main.py", line 350, in main
args.func(args)
~~~~~~~~~^^^^^^
File "/home/gbk/Git/waydroid_script/main.py", line 144, in remove_app
remove_list.append(Nodataperm(args.android_version))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/gbk/Git/waydroid_script/stuff/nodataperm.py", line 57, in __init__
raise KeyError(f"No download links for Android version '{android_version}'")
KeyError: "No download links for Android version '13'"
➜ waydroid_script git:(main) ✗ sudo venv/bin/python3 main.py uninstall nodataperm
ok
INFO: Uninstallation finished
➜ waydroid_script git:(main) ✗
### Summary
When running `main.py uninstall nodataperm` on Android 13, the script raised KeyErrors
because `nodataperm` was only designed for Android 11.
### What’s changed
- Added explicit handling for Android 13 in `Nodataperm.__init__`
- Improved error message when version unsupported
- Fixed minor regex `SyntaxWarning`
### Why
The nodataperm patch only supports Android 11.
This fix prevents crashes when executed on Android 13.
### Testing
✅ Android 11 → uninstall works normally
⚠️ Android 13 → exits gracefully (no crash)
```
➜ waydroid_script git:(main) sudo venv/bin/python3 main.py uninstall nodataperm
[sudo] password for gbk:
ok
Traceback (most recent call last):
File "/home/gbk/Git/waydroid_script/main.py", line 357, in <module>
main()
~~~~^^
File "/home/gbk/Git/waydroid_script/main.py", line 350, in main
args.func(args)
~~~~~~~~~^^^^^^
File "/home/gbk/Git/waydroid_script/main.py", line 144, in remove_app
remove_list.append(Nodataperm(args.android_version))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/gbk/Git/waydroid_script/stuff/nodataperm.py", line 39, in __init__
self.dl_link = self.dl_links[android_version][arch][0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'x86_64'
➜ waydroid_script git:(main) sudo venv/bin/python3 main.py uninstall nodataperm
ok
Traceback (most recent call last):
File "/home/gbk/Git/waydroid_script/main.py", line 357, in <module>
main()
~~~~^^
File "/home/gbk/Git/waydroid_script/main.py", line 350, in main
args.func(args)
~~~~~~~~~^^^^^^
File "/home/gbk/Git/waydroid_script/main.py", line 144, in remove_app
remove_list.append(Nodataperm(args.android_version))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/gbk/Git/waydroid_script/stuff/nodataperm.py", line 39, in __init__
self.dl_link = self.dl_links[android_version][arch][0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'x86_64'
➜ waydroid_script git:(main) sudo venv/bin/python3 main.py uninstall nodataperm
/home/gbk/Git/waydroid_script/stuff/nodataperm.py:101: SyntaxWarning: invalid escape sequence '\.'
name = re.findall("([a-zA-Z0-9]+)\.zip", self.dl_link)[0]
ERROR: No download links configured for Android version '13' in nodataperm
Traceback (most recent call last):
File "/home/gbk/Git/waydroid_script/main.py", line 357, in <module>
main()
~~~~^^
File "/home/gbk/Git/waydroid_script/main.py", line 350, in main
args.func(args)
~~~~~~~~~^^^^^^
File "/home/gbk/Git/waydroid_script/main.py", line 144, in remove_app
remove_list.append(Nodataperm(args.android_version))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/gbk/Git/waydroid_script/stuff/nodataperm.py", line 57, in __init__
raise KeyError(f"No download links for Android version '{android_version}'")
KeyError: "No download links for Android version '13'"
➜ waydroid_script git:(main) ✗ sudo venv/bin/python3 main.py uninstall nodataperm
ok
INFO: Uninstallation finished
➜ waydroid_script git:(main) ✗
```
There's no way that the same prebuilt services.jar can work for both Android 11 and Android 13.
Actually this should have never been shipping a prebuilt services.jar in the first place...
There's no way that the same prebuilt services.jar can work for both Android 11 and Android 13.
Actually this should have never been shipping a prebuilt services.jar in the first place...
I see, that makes sense.
This PR just makes sure that if someone accidentally runs the script on Android 13, they can safely uninstall it and recover from a bootloop instead of getting stuck...
I see, that makes sense.
This PR just makes sure that if someone accidentally runs the script on Android 13, they can safely uninstall it and recover from a bootloop instead of getting stuck...
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
When running
main.py uninstall nodatapermon Android 13, the script raised KeyErrorsbecause
nodatapermwas only designed for Android 11.What’s changed
Nodataperm.__init__SyntaxWarningWhy
The nodataperm patch only supports Android 11.
This fix prevents crashes when executed on Android 13.
Testing
✅ Android 11 → uninstall works normally
⚠️ Android 13 → exits gracefully (no crash)
@@ -20,4 +25,3 @@"13": {}}dl_file_name = "nodataperm.zip"extract_to = "/tmp/nodataperm"There's no way that the same prebuilt services.jar can work for both Android 11 and Android 13.
Actually this should have never been shipping a prebuilt services.jar in the first place...
@@ -20,4 +25,3 @@"13": {}}dl_file_name = "nodataperm.zip"extract_to = "/tmp/nodataperm"I see, that makes sense.
This PR just makes sure that if someone accidentally runs the script on Android 13, they can safely uninstall it and recover from a bootloop instead of getting stuck...
@@ -20,4 +25,3 @@"13": {}}dl_file_name = "nodataperm.zip"extract_to = "/tmp/nodataperm"Ehh alright.