Flashlight

Silent mode

Battery saver

Aeroplane mode

Wi-Fi

Mobile data

Bluetooth

NFC

Location

Silent

Vibrate

Priority only

Alarms only

Total silence

Play/pause

Caffeine

Requirements

P2a42

P2c72

su -c pm hide com.lenovo.powersetting

hide

unhide

Changelog

New action: Caffeine

Fixed a crash on unrooted devices

0.3

Changes in this release: App should now be compatible with Android 10

Minimised number of su processes to reduce toast notification spam from Magisk and lag on enabling service 0.2

New in this release: New actions: Vibrate , Silent , Play/pause , Location , Priority only , Alarms only

, , , , , New option: Emit broadcasts for other apps - this lets you extend P2oggle with apps such as Tasker

- this lets you extend P2oggle with apps such as Tasker Overlay theming options added

Action Silent mode renamed to Total silence to better represent its function

renamed to to better represent its function Better error messages on initial setup Bug fixes in this release: Overlay should now be completely reliable

Disabling Start on boot now actually works

now actually works Service now immediately unbinds from switch when disabled

Disabled Notification settings and Hide intents on N, where using these options would prevent the overlay from working

and intents on N, where using these options would prevent the overlay from working Fixed superuser access not being detected until app restart 0.1 Initial release Changes in this release:New in this release:Bug fixes in this release:

XDA:DevDB Information

P2oggle, Device Specific App for the Lenovo P2

Contributors

Version Information

The Lenovo P2 features a somewhat unusual hardware switch (referred to by Lenovo as the "one-key power saver"). On the stock ROM this switch toggles a battery saving mode but in aftermarket development it has remained unused - until now. P2oggle (pronounced "") is an app which enables this switch and allows you to assign toggleableto it.Actions can be configured separately for when the screen is on or off. If you have suggestions for any you think would be useful, please make them below and I will be happy to add them.Additionally you can configure P2oggle to broadcast switch events for other apps.Since the Android input stack more or less ignores the existence of hardware switches, P2oggle uses the kernel's input event interface (evdev) directly. It therefore. You will need a superuser binary that includes supolicy and BusyBox, e.g. Magisk.The service that listens for switch input consumes minimal resources: in my testing battery usage has never risen above 0% with memory consumption averaging about 25 MB, depending on the actions selected.P2oggle is compatible with the stock ROM and should work with all custom ROMs and kernels. I wrote it for the(global variant) but it should also be fully compatible with the(domestic variant). If it works for you please let me know.If you are on stock you will probably want to disable the power saver mode from being bound to the switch in order to use P2oggle properly. You can do that by runningin a terminal emulator or adb shell. Replacewithto reverse.P2oggle is released under the Mozilla General Public License version 2.0. As always, please post any feedback/suggestions/bug reports below, or open an issue on GitHub if you prefer.Changes in this release:Beta0.42020-05-012019-09-062020-05-01