FR: toggle flashlight with long press powerbutton with display off
Yes of course the quicksettings toggle is there. But it takes a few secods.
Some examples, riding a bike, or in a car if you need a flashlight, it is really dangerous to take that long. Long pressing on that standalone button works blind.
It is am immense usability improvement and also safety, a lot.
I am curious what you would map otherwise?
I am curious what you would map otherwise?
A quick reboot option to get data at rest comes to mind.
missing-root Yes of course the quicksettings toggle is there. But it takes a few secods.
Some examples, riding a bike, or in a car if you need a flashlight, it is really dangerous to take that long. Long pressing on that standalone button works blind.
It is am immense usability improvement and also safety, a lot.
Rest assured that I understand this is not what you're asking, and you can feel free to tell me to put my advice where the sun don't shine, but might I suggest carrying a (very small) flashlight? There exist flashlights that aren't bigger than a finger and which will outperform your phone every single time, in form factor, brightness etc.
I do understand wanting to use your phone since you always have it, and depending on one's needs, it'll do just fine, but if you use a flashlight enough to need power button access to it, perhaps the right tool for the job is just what one needs!
- Edited
For sure for like really threatened people this could be a useful feature, really.
But afaik pressing the power button for 7s does the same, or is this removed? It was there on Android 11 I think. Apart from that, reboot is just a long press and a button in the power menu (a bit easier that flashlight but ≈ the same)
2 valid options, one for general use and one for activists etc. I would prioritize the activists etc. here, even though a setting would be cool too.
And having a separate flashlight kinda kills the purpose of a phone. But a small flashlight could for sure be a good investment.
[deleted]
missing-root how about using something like KeyMapper to toggle the flashlight? Allow accessibility and set battery use to unrestricted. I just tried it, works. Not with power button, but you can set a sequence like double press volume down to avoid interference with other features. Please try it and report back before asking any more questions.
- Edited
[deleted] I wouldn't recommend that. I am aware that there are many apps that allow you to use accessibility permissions to use hardware buttons to trigger the flashlight; it's a horrible idea.
Sure, you might trust the app in question, but in my humble opinion, unless you absolutely have to (and absolutely have to here means absolutely), you shouldn't be granting accessibility permissions to any app. It's incredibly powerful and gives the app an extreme amount of power over your device.
I understand we're just trying to come up with solutions, but in this case, the danger here is big enough where I have to warn against doing it.
[deleted]
matchboxbananasynergy this particular app works with just sensors granted, I haven't found anything of concern with LibChecker and functions that require root will not work anyway. But I do understand and accept your opinion when it comes to allowing accessibility to an app in general so I will not recommend using it either apart from desperate case like we're dealing with here. There is no app out there as far as I know that would provide desired functionality without granting it accessibility use when the device is locked and cooking such feature into the OS also doesn't seem like the best idea. I personally don't need it and rely on the lockscreen shortcut.
- Edited
[deleted] this particular app works with just sensors granted,
The problem is that an app granted accessibility services is given the ability to block your inputs to the phone, display anything on the screen and can make inputs itself. Much more to worry about than it being granted any of the normal permissions.
Try torchie from fdroid. It allows you to turn on the flashlight by pressing both volume buttons at once. It can be used with the screen off as well. Ive been using it for years and it has been great
tjk It's important to note that if it can do that, it also requests accessibility permissions, in which case, see above regarding the dangers of that.
matchboxbananasynergy I see. That makes a lot more sense why that feature is built into so many other roms now. If im understanding things correctly, your concern has to do with a compromised version of an app with accessibility permissions? Maybe, if the concern is great enough, GrapheneOS could provide a similar app through its own distribution channel in the same way as android auto etc? Then it would just maintain the same chain of trust as the os. It could just be a fork of torchie or torchie redistributed from graphene. Maybe another app would work better too, i dont know.
Almost every android user I know, graphene or otherwise, uses either torchie or their rom's builtin flashlight toggle from the button. It is a really handy feature regardless. I think that is a decent solution to the whole problem anyways. Let me know what you think!
tjk
The concern is that granting any app the ability to act as a accessibility service opens a huge hole in the security of the device and is best avoided if at all possible. The serious consequence of granting this to any app is why Auditor app checks and reliably reports if this has been granted.
GrapheneOS will not be contributing to people believing that its normal and acceptable for apps to ask for the opening of this massive security vulnerability to preform relatively mundane tasks.
For years there have been repeated requests to add this button press flashlight shortcut to GrapheneOS. So many that the team now almost considers it a meme.
The response is always the same. As GrapheneOS is focused on security and privacy any use of physical button press shortcuts would be for a privacy or security features.
There is a long list of work the team plans to implement which has higher priority than adding button press shortcuts.
Personally I am more missing the ability to turn the flashlight off using the power button (MIUI has this feature). I learned to "overcome" this limitation by turning on camera (which automatically disables flashlight), but it's a bit annoying.
As for the power button, considering it may be unsafe granting accessibility permissions to an app (although if the application is opensource and trusted, why not?), it would be very nice to have a possibility to assign various privacy-related (and others) toggles to the hardware buttons (which can be picked from a menu in settings?) on the OS level.
traveller It would be very nice to have a possibility to assign various privacy-related (and others) toggles to the hardware buttons (which can be picked from a menu in settings?) on the OS level.
As mentioned above (Carlos-Anso) many users have reported that it would be nice, but the project has determined that some nice things are unlikely to occur in the foreseeable future.
The project provides detailed instructions for people who wish to build private forks of GrapheneOS incorporating features the project is not shipping generally.
- Edited
Carlos-Anso So any app that uses the accessibility services opens security holes? What if I am 100% confident that the app is not malicious? Are there still security holes that could be exploited outside of the application by lets say another app or some outside device?
Why not provide some sort of way to achieve this sort of functionality securely? It seems like a lot of users rely on these accessibility services in one way or another, and if these services are opening up security holes it sounds like something that GrapheneOS (with its focus on security and privacy) should at least hold at some priority IMO.
Im not trying to demand that this gets put in the pipeline anytime soon of couse, im just curious about all of this. Thanks
[deleted]
tjk the project team has not reacted on this, above mentioned comments are opinions of community moderators. It would be nice if it came with an explanation as to why an app that works with literally no permissions but requires an accessibility service poses a huge security concern and is a bad idea to use.
[deleted]
Dumdum yes, that is possible but not a fact. The fact is that we a being recommended to eat a diet that makes us all sick so that Big Pharma can benefit from management of our health issues instead of addressing the root cause. Anyway, the thread is marked solved. No further input necessary.
- Edited
tjk What if I am 100% confident that the app is not malicious?
There is no 100%.
App developers could turn malicious or their machines could be exploited. Could also sell or pass the app to a new malicious developer. Same things could happen with the developers of any libraries the app uses. Theres numerous recorded cases of these things happening with all kinds of software.
Whoever builds the version of the app you use could be malicious or compromised.
As a final possibility the app on your device could be exploited.
An app granted accessibility services has more control of the device than the user. It is much more dangerous than granting an app all the standard permissions as it can block the user from doing things, operate the device, use apps and display whatever it likes on the screen to hide what is really happening.
tjk Why not provide some sort of way to achieve this sort of functionality securely?
By the nature of the privileges required to perform the accessibility tasks there is no way to easily make a more secure implementation.
Unless you need genuine accessibility aids its not hard to avoid using apps, or the functionality within apps, which require it being granted the ability to act as an accessibility service. That is the way to address this security concern.