Skip to content

Fix: location permission blocks startup + GPS battery drain#1

Closed
baptisterajaut wants to merge 1 commit intocycloarcane:masterfrom
baptisterajaut:fix/startup-permissions-and-gps-drain
Closed

Fix: location permission blocks startup + GPS battery drain#1
baptisterajaut wants to merge 1 commit intocycloarcane:masterfrom
baptisterajaut:fix/startup-permissions-and-gps-drain

Conversation

@baptisterajaut
Copy link
Copy Markdown

@baptisterajaut baptisterajaut commented Mar 20, 2026

Hey, thanks for picking up this project and modernizing it!

Found a few issues while using the launcher:

1. App won't start if you deny location permission
Location (fine + coarse) is in the startup permission batch. Denying it shows "grant Storage permission" and kills the app. But location is only needed for weather, it shouldn't be mandatory.

2. GPS drains battery in background
Once location is granted, TuiLocationManager registers a LocationListener that never gets removed. GPS stays on even with show_weather=false.

3. BusyBox binary can't execute on modern Android
The busybox.so binary is saved to getFilesDir()/bin/, but on Android 10+ many devices mount /data/data/<pkg>/files/ with noexec. File.setExecutable() succeeds and canExecute() returns true, but the kernel still blocks execution. The .so suffix workaround doesn't help here. The fix would be to ship the binary as a native lib in lib/<abi>/ so it lands in nativeLibsDir which is mounted with exec.

This PR fixes only the first point by removing location from the startup batch (it's already requested lazily by TuiLocationManager.register()) and by not killing the app when non-critical permissions are denied.

2 and 3 are deeper changes, didn't want to mix them in.

@cycloarcane
Copy link
Copy Markdown
Owner

Hello, thanks for the PR I think the location issues on start have been addressed. Looking at busybox now and I think you're right, and I'll investigate whether the GPS draining issue is still a problem with the implemented changes.

@baptisterajaut
Copy link
Copy Markdown
Author

Thanks mate

@cycloarcane
Copy link
Copy Markdown
Owner

I'm killing the busybox integration it's a quagmire and only adds a couple of commands over toybox that would have actually worked without root access anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants