Fix: location permission blocks startup + GPS battery drain#1
Closed
baptisterajaut wants to merge 1 commit intocycloarcane:masterfrom
Closed
Fix: location permission blocks startup + GPS battery drain#1baptisterajaut wants to merge 1 commit intocycloarcane:masterfrom
baptisterajaut wants to merge 1 commit intocycloarcane:masterfrom
Conversation
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. |
Author
|
Thanks mate |
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,
TuiLocationManagerregisters aLocationListenerthat never gets removed. GPS stays on even withshow_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/withnoexec.File.setExecutable()succeeds andcanExecute()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 inlib/<abi>/so it lands innativeLibsDirwhich 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.