casualsnek / waydroid_script

Python Script to add OpenGapps, Magisk, libhoudini translation library and libndk translation library to waydroid !
GNU General Public License v3.0
1.73k stars 160 forks source link

Do not implicitly assume the presence of sudo #103

Closed lavafroth closed 1 year ago

lavafroth commented 1 year ago

This PR removes the unnecessary invocations of sudo when opening subprocesses. The presence of sudo should not be implicitly assumed.

For example, I'm running doas instead of sudo. So instead of sudo python3 main.py, I'd run doas python3 main.py. Once the program has superuser privileges, it should not ask for it again anyways.

lavafroth commented 1 year ago

@burgerzuhsaga, I understand your stance. However, as the script already asks for superuser privileges to begin with, the use of sudo in the subprocess calls appears redundant. AFAIK, any subprocess the spawns will have the euid of 0 (root).