yashsingh1/xdaforums huggingface dataset:
[Lenovo P2 Themes, Apps, and Mods] venu44:
This app is cool. I'm happy that finally this button serves a purpose. I'd like to see more options though. But god I thought I'd never see an app like this. Thanks a lot.
[Lenovo P2 Themes, Apps, and Mods] yajdintaydemir:
It's awesome. Finally there's no reason left to use the stock rom lol.
[Lenovo P2 Themes, Apps, and Mods] shivam71:
one word..... awesome
[Lenovo P2 Themes, Apps, and Mods] DS-1:
Is it only me, or the battery drains faster?

Now i've uninstalled it, trying a couple of days without it to test the battery life.

BTW, it's an amazing app.
[Lenovo P2 Themes, Apps, and Mods] sm00th4f3:
that is weird. i am running havocos and get the output you mentioned. Back on stock it worked normally.

I changed to coltOS which is aosp based. Works now! Thanks for the great app!
[Lenovo P2 Themes, Apps, and Mods] leo_97:
Huge thanks for all devs working on this, awesome functionality. Tested in Havoc OS by VladSor (08-20-2019 build v2.8) and it worked pretty good.

No battery problems here at all.
[Lenovo P2 Themes, Apps, and Mods] Abhi8232:
[MENTION=6656408]Prospero.X-3[/MENTION] Sorry to say but it does not work on Resurrection remix pie.Please consider this also when u publish new update.:(
[Lenovo P2 Themes, Apps, and Mods] avnish singh:
A huge thank you to the dev.

Ever since I rooted my device I had been wondering why no one includes the functionality of the toggle switch in the roms.

You sir, have finally answered my prayers.

The app works perfectly fine on ASOP Extended Pie.

For added functionality, I would suggest a few things:

1. Vibrate mode

2. Phone lock (this seems tacky but maybe useful for someone extremely paranoid)

3. Hotspot

4. Location

5. Gaming mode

Once again, a heartfelt appreciation from my side ?
[Lenovo P2 Themes, Apps, and Mods] leo_97:
I agree with those points. The other are cool too, but those listed above are coolest hehe...

PS: Tested on ViperOS pie v6.7 (08-14-19 build), and works flawlessly too, thank you developer.
[Lenovo P2 Themes, Apps, and Mods] Siddhesh saraf:
Working flawlessly on AEX rom. But the silent only functionality kind of restricts my usage as I prefer vibrate mode more. Looking forward to the update with vibrate mode option. :fingers-crossed::fingers-crossed:
[Lenovo P2 Themes, Apps, and Mods] emt_memo:
Finally someone has figured it out.

Thanks bro for this awesome app ?

Testing now on my lenovo running AEX rom 6.7 (pie)

Works fine till now with no issues
[Lenovo P2 Themes, Apps, and Mods] PROda221:
Not working on los16 for me :(:(
[Lenovo P2 Themes, Apps, and Mods] Siddhesh saraf:
When will you publish the new update ??
[Lenovo P2 Themes, Apps, and Mods] leo_97:
Hey, please, do not ask ETA here... It's against the rules.

PS: By now everything is fine, so no need to new updates.
[Lenovo P2 Themes, Apps, and Mods] Siddhesh saraf:
Ya i know very well that asking for ETA is considered rude and is against the rule but as there were quite a few suggestions by people and very positive response by the developer i just got excited and asked for the update. Everything is working fine but the silent only option restricts my usage of this app. I am eagerly waiting for the vibrate Option. If anybody is hurt I am sorry......:angel::angel:
[Lenovo P2 Themes, Apps, and Mods] kalel77:
Don't work on aosip android 10
[Lenovo P2 Themes, Apps, and Mods] emt_memo:
I tried it before with AEX and it worked

Now on SuperiorOS (Android 9) it doesn't work
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Hi everyone, apologies for neglecting this thread for a bit. The first update should be out in a couple of days. It'll add the much-requested vibrate, silent and location actions and a couple more (and several other general improvements). Unfortunately it won't have wireless hotspot as it turns out this isn't something Android exposes (either in the SDK or from the command line) and while it is possible it's rather complicated.

I'm honestly not sure why the switch is not working for some people on some ROMs - even with setups I've tested myself (namely Lineage 16 and RR 7). I will look into compatibility more in the next update.

You can check battery usage by navigating to P2oggle's app info in Settings. For me it shows "no battery use since last full charge".
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Version 0.2 released

Version 0.2 has been released and is available for download.

New in this release:

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

New option: Emit broadcasts for other apps - you can use this to extend P2oggle with apps such as Tasker

Overlay theming options added

Action Silent mode renamed to Total silence 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

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

Fixed superuser access not being detected until app restart
[Lenovo P2 Themes, Apps, and Mods] kalel77:
Don't work on Android 10

Send by Lenovo P2
[Lenovo P2 Themes, Apps, and Mods] kekeli217:
Bro Android 10 Aosip Derfest Not working pls important fix
[Lenovo P2 Themes, Apps, and Mods] Siddhesh saraf:
Thank you so much for your time and hard work. This is like a dream come true of having a mute switch like OnePlus.:D:D
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
What doesn't work? You need to be specific. Unfortunately I don't have time to test Android 10 at the moment as I use this as my main device. At minimum I need a logcat of you enabling the service and toggling the switch. Q incorporated a number of behaviour changes, particularly concerning file system access, and it's quite possible the compatibility layer for apps targeting SDK 28 and lower doesn't work correctly. Have you tried other Android 10 ROMs?
[Lenovo P2 Themes, Apps, and Mods] kekeli217:
Other Q Roms Not Working

Hello Maintanier, Bro Havoc + Pixel Experience + İON + AOSİP Derpfest Not Working P2oggle How To Fix Please Man Please
[Lenovo P2 Themes, Apps, and Mods] leo_97:
Hey, as he said above, please provide a logcat because this app was tested only on pie builds.

https://xdaforums.com/showthread.php?t=1726238
[Lenovo P2 Themes, Apps, and Mods] rzq8:
I installed it on Rom Aex_v6.5_Redwolf_edition and it doesn't work. Please fix it, thanks.
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
OK, I've confirmed the problem and am working on identifying the cause and a fix.

EDIT: As I guessed (#50) the issue is the restrictions Android Q places on filesystem access (and the compatibility layer that's supposed to allow apps to use the old behaviour doesn't extend to the directory P2oggle needs to read from). I have a workaround in mind, not sure how long it will take to implement (or if it will work) but I'll do my best.

EDIT2: Good news, I've confirmed the workaround works. Just need to implement it in the app, which I'll do as soon as I have time.
[Lenovo P2 Themes, Apps, and Mods] HACKIMTOSH:
I think if we can use slide button as voice recording trigger that will be awesome don't you think this is cool guys ? So we can record voice secretly ha ha ??
[Lenovo P2 Themes, Apps, and Mods] P2.nl:
Lineage OS

+Magisk

+P2oggle

------------

Working
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Version 0.3 released

Version 0.3 has been released and is available for download.

Changes in this release:

App should now be compatible with Android 10 (tested on Havoc OS by [MENTION=8536647]VladSor[/MENTION])

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

Additionally added some information contained in the thread to the first post. As always please post any problems/successes below; if you are reporting a bug please include a logcat if appropriate.
[Lenovo P2 Themes, Apps, and Mods] kalel77:
Work on MSM Xtended v3.0

Many Thanks

Inviato dal mio Lenovo P2a42 utilizzando Tapatalk
[Lenovo P2 Themes, Apps, and Mods] Roger1982:
Work on Havoc OS 3.0. Thanks
[Lenovo P2 Themes, Apps, and Mods] Sutcliffe9:
Simply lovely.
[Lenovo P2 Themes, Apps, and Mods] Nuaman:
Stuck here after granting root acess (havoc) android 10 by vlad
[Lenovo P2 Themes, Apps, and Mods] Nuaman:
Logs for the above
[Lenovo P2 Themes, Apps, and Mods] kalel77:
The same xtended.

Selinux enforcing?

Inviato dal mio Lenovo P2a42 utilizzando Tapatalk
[Lenovo P2 Themes, Apps, and Mods] Nuaman:
Yeah Selinux is Enforcing
[Lenovo P2 Themes, Apps, and Mods] kalel77:
This is the problem with P2 toggle

Inviato dal mio Lenovo P2a42 utilizzando Tapatalk
[Lenovo P2 Themes, Apps, and Mods] Sutcliffe9:
Yes it has stopped working with Selinux enforcing.
[Lenovo P2 Themes, Apps, and Mods] shivang_bagh:
Not working on selinux enforcing
[Lenovo P2 Themes, Apps, and Mods] leo_97:
See below :)

Just a little more below XD

Guys, I've checked right now with latest MSM-X ROM by VladSor (Xtended-kuntao-20191214-UNOFFICIAL-v4.0). I just installed Magisk v20.1, then p2oggle v0.3 and it's working fine even with selinux mode set to enforcing.

Please, check in your Magisk logs (Magisk Manager > Log (located at the sidebar) > Magisk Tab) if your Magisk is working, as I noticed when you flash Magisk with ROM zip when on TWRP for some reason it gets broken, so I re flashed it and made profit.

Huge thanks to our beloved dev that made this app.
[Lenovo P2 Themes, Apps, and Mods] mysteres:
Not working on decripted pixel experience 10
[Lenovo P2 Themes, Apps, and Mods] joshthemajor:
I did what you sugested but for me it doesn't work. I can Enable it and looks ok, superuser rights are granted, but then when I flip the switch, nothing happens
[Lenovo P2 Themes, Apps, and Mods] leo_97:
Did you check the logs located at Magisk Manager? What they show?
[Lenovo P2 Themes, Apps, and Mods] joshthemajor:
I see the request from P2oggle and "grant" with the time of when I've opened the app
[Lenovo P2 Themes, Apps, and Mods] mysteres:
Cannot install apk on stock rooted 251 rom
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Odd, I believe other people have mentioned using P2oggle on stock in this thread. Would you mind trying older versions (available here) to see if they work?

I looked into this and found the supolicy call was the source of the hang. I'm not sure if this is a bug with Magisk or the ROMs in question but I don't believe the issue is on P2oggle's side based in part on [MENTION=7978700]leo_97[/MENTION]'s results. I see [MENTION=8536647]VladSor[/MENTION] mentioned SELinux in the patch notes for Havoc recently, but I don't know if the changes were to fix the underlying problem with supolicy or simply to update the default SELinux policy so P2oggle never has to try making changes itself. The good news is I don't believe editing SELinux policy is even required with the workaround for Android 10 (I was lazy and kept it in to minimise code changes) so I can remove it if this continues to cause issues, or to be on the safe side.

I've recently noticed that with the workaround in place switch events while the screen is turned off may not be reported until the screen is turned on. Can anyone else confirm this? It may be that Android is less accommodating with command line processes than FileObserver processes, unfortunately.

Anyway, Happy New Year!
[Lenovo P2 Themes, Apps, and Mods] leo_97:
Happy New Year, everyone.

I flashed the last build of MSM-X (Xtended-kuntao-20200102-UNOFFICIAL-v4.0) by VladSor right now, with pico gapps and Magisk v20.2. The app v0.3 works like a charm and yes, I can confirm that when the screen is off sometimes the action takes some time to happen, perhaps has it something to do with Android Q doze mode? If you turn the screen off and right after you toggle the switch, then it works perfectly without any lag, but after a period of phone being locked, then the lag eventually occur.
[Lenovo P2 Themes, Apps, and Mods] mysteres:
I tried bit even the oldest One cannot be installed.
[Lenovo P2 Themes, Apps, and Mods] slovantes:
Is audio-recording possible with the toggle in combination with the sound recording apps?
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Yep, that's what I'm thinking. Though as far as I am aware the last significant changes to Android's power management were in Pie, which is why I think the command-line process used by the workaround is the reason for the different behaviour. An easy way to test this would be trying the workaround on Pie and seeing if the delay persists.

Very odd! As I said, it has worked for other people so I'm not very sure how to help, sorry. You could try installing the app with pm install <path to apk> to see if that gives any debug output.

I believe this is presently possible by using Emit broadcasts for other apps to provide integration with apps like Tasker (toggle that setting for more information - step 2 from this guide that was linked earlier shows how to receive an intent in Tasker). I quite like the idea of P2oggle being able to record audio on its own, I might add that as an action if it's not too annoying with Android 10's infamous file system changes.

Edit: I've just noticed the main download link has been pointing to v0.2 due to not being updated for v0.3, oops. Apologies for any confusion.
[Lenovo P2 Themes, Apps, and Mods] andyscuff:
Works great on LOS17.1 official.

Using it to toggle DND.

Thanks for this.
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Good to hear P2oggle works on the new Lineage builds!

Version 0.4 has been released and is available for download.

Changes in this release:

New action: Caffeine (this is analogous to Lineage's feature of the same name but will work on any ROM)

Fixed a crash on unrooted devices

I'm back to developing P2oggle after neglecting it for a while. When reporting bugs please include the ROM you are on and a logcat if relevant. Thanks!
[Lenovo P2 Themes, Apps, and Mods] Sutcliffe9:
Big thanks for the continued development, it is very much appreciated.
[Lenovo P2 Themes, Apps, and Mods] Biradarkushal:
caffeine not working for me .I am on msm extened v8.0 .Please fix it dev.Thank you for creating this in the first place
[Lenovo P2 Themes, Apps, and Mods] jk77:
Hello,

Please find attached the new version of this script, in order to fix some issues with the official LOS17.1.

No root required.

Jk
[Lenovo P2 Themes, Apps, and Mods] :
Does that mean you don't have to root while using the P2 toggle switch app?

Also I'm back to LOS 16.0 so which zip should i flash & how to remove that if i wanna delete it later?
[Lenovo P2 Themes, Apps, and Mods] jk77:
No root required, this script will only send an intent that you will need to use through Tasker or equivalent to trigger what you need, more details in my initial post.

Both scripts will work on LOS16.

No removal script yet.

Please use it at your own risk.
[Lenovo P2 Themes, Apps, and Mods] :
After the boot up, instantly a notification came that P2oggle is running than i opened the app to setup it asks for root.
[Lenovo P2 Themes, Apps, and Mods] Tahir Baig:
Is there a possibility to add Focus Mode, from digital wellbeing as an option to toggle?

Thanks
[Lenovo P2 Themes, Apps, and Mods] SrivatsaNag:
Same here on Havoc 3.2.

Can someone provide installation instructions for non rooted devices.

Thanks in advance.
[Lenovo P2 Themes, Apps, and Mods] salobar:
Can anybody confirm that the script (V2) is working with Los 17.1?
[Lenovo P2 Themes, Apps, and Mods] srkvas:
Sir im using lenovo p2a42 device with miroom miui 11 custom rom

P2oggle is not able.install it says there was error parsing package,tried everything no luck.pls help
[Lenovo P2 Themes, Apps, and Mods] srkvas:
nobody is responding
[Lenovo P2 Themes, Apps, and Mods] Pawlash:
Had to manually give app an root in Magisk, but it works even great on Android 11! (Havoc OS)
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
I'm not sure who else is still using their P2 in 2021 but we finally reached v1.0! This update is mostly targeted towards fixing many longstanding bugs but has a new feature as well.

DOWNLOAD(v1.0)

​
[Lenovo P2 Themes, Apps, and Mods] luukvbaal:
Hi, thanks for the update. I was interested to try and use the dictaphone but unfortunately it fails with the attached error.

It seems to fail because of invalid characters in the filename it tries to write to. I assume it worked during your testing, any idea why it doesn't work for me and if there is anything I can do to make it work? I'm on Android 11 Havoc 4.2, ext4 filesystem. Thanks in advance.
[Lenovo P2 Themes, Apps, and Mods] Sutcliffe9:
Big thanks for the update.
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
No, P2oggle requires root and always will. @jk77's script is unrelated to P2oggle, except that it uses some of the reverse engineering that went into it. Please move any future questions about JK's script to a new thread. Thank you!

Sorry about this but there's not really anything I can do. Some ROMs have a problem with the builds but I think this is a problem with them as on all others it works fine. Maybe you could find a way to get a more detailed log.

This would be a nice addition. Sadly it seems, Google being Google, that there is no API for this yet.

Thanks for the log. I believe it could be one of two things: something to do with Android 11's filesystem access changes or genuinely invalid characters. I think it is the former because there is also a "open failed: EPERM (Operation not permitted)" mentioned. For the Dictaphone I just did something quick and hoped it would work with Android 11 because the app targets Pie, however I was planning to rewrite it with the recommended APIs anyway. But just to check, what is your locale set to?
[Lenovo P2 Themes, Apps, and Mods] luukvbaal:
My locale is set to en_US.

The filename it tries to write to is included in the log:

/storage/emulated/0/Music/P2oggle/Mar 6, 2021 22:23:58.mp3

It contains spaces and colons but both of those are allowed on ext4 so it I suppose it could have something to do with filesystem access changes as you say.
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Yeah, I noticed the path but I wondered if it was possible that the MediaProvider error had seen a different path, somehow, and was another issue. But that error must be nonsense and the issue has to be the filesystem changes. I will try to fix that in v1.1.
[Lenovo P2 Themes, Apps, and Mods] Sutcliffe9:
Is v1.1 still in the pipeline?
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Yes, I have actually had an implementation using MediaStore ready for some time but haven't been able to grab enough time to install and test on Android 9 and 11 (it works on 10 but I had to increase the compile SDK version to be able to use the new APIs and I can't be sure there were no regressions).

I can upload a prerelease but I want to test all the actions, not sure if you're up for that?
[Lenovo P2 Themes, Apps, and Mods] Sutcliffe9:
I don't mind testing it for you.
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Here you go!
[Lenovo P2 Themes, Apps, and Mods] Sutcliffe9:
I'm on Mokee android 9 at the moment and this test version just crashes when launched.
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Logcat please!
[Lenovo P2 Themes, Apps, and Mods] Sutcliffe9:
Hope this helps
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Is something missing? 😅
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Alright, jumped back to P and fixed that bug (Android Studio is not always good at warning you when you use an API added in a later SDK than the minimum you support). Will carry on testing, then emit an update tomorrow all going well.
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Version 1.1 is now available.

DOWNLOAD(v1.1)

​
[Lenovo P2 Themes, Apps, and Mods] Prospero.X-3:
Version 1.2 is now available. It's a very small bugfix release, but I also added a bit of flair to the first post. 🌟

DOWNLOAD(v1.2)

​
[Lenovo P2 Themes, Apps, and Mods] slim71:
I'm not sure it is doable, but I was thinking about a new possibly useful functionality: could it be possible to link the button to a screen recording app to start/stop recordings?
[Huawei Y7 2019 Questions & Answers] artatekat:
So i bought a used phone and its locked by a google account. Tried to wipe, factory reset, hard reset, multiple softwares on pc, and even contacting the seller, without success.

What do i do now?

Thanks in advance, and greetings from austria.
[Huawei Y7 2019 Questions & Answers] 19deke55:
Did you ever get an answer to this? I know it probably won't help now but I managed to unlock the FRP by swapping SIM cards from other carriers. This was in an effort to 'Unlock' the phone which I'm still trying to do. The FRP appears to be unlocked but I can't get the phone to ask for the unlock code that I have. If you or indeed anyone else has a solution I'd be grateful to hear it.

Thanks.
[Windows Mobile Development and Hacking General] phoenyx:
I've tried searching for this but I haven't been able to find an answer, my apologies if I missed it.

I am using "HTC Home Plugin 0409 6-Tab.cab" on my Artemis (P3300) running WM6. Is there a way to have the weather auto-update/refresh either on a timer, schedule or some other way? It would be preferable if it could be set to only update/refresh if the phone is on a particular network or if could be easily set to not update (I sometimes travel internationally so this would be a great way to avoid international data roaming).

If its not possible with this .cab, is there one that does this that can be recommended?

Thanks in advance.
[Windows Mobile Development and Hacking General] lllboredlll:
In the settings where you select the city there is an option menu you can access via the right softkey. You can set it to update automatically.
[Windows Mobile Development and Hacking General] phoenyx:
Thank you! :)

Do you happen to know the frequency of the updates and if there is a way to adjust it?
[ASUS ROG Phone II Questions & Answers] tsoureki:
Does the phone support FM radio? On official Asus site the answer is yes. Anyone with Tencend version to confirm it?
[ASUS ROG Phone II Questions & Answers] standupdad:
Yes. Tap to have it scan for stations, and it brings in stations better than my Cruze infotainment sys.
[ASUS ROG Phone II Questions & Answers] tsoureki:
Chinese Tencent model 8gb 128gb? Where is the desktop icon?
[ASUS ROG Phone II Questions & Answers] standupdad:
Tencent 8/128, yes. There isn't an icon or app per say... at least that I found. It's in the quick settings drop down. And the oddity to it all... You MUST have your headphones in for it to work.
[ASUS ROG Phone II Questions & Answers] bluegizmo83:
Headphone are usually always required to use a phone's built in FM receiver (when it has one), because it uses the headphone cable as the antenna needed to receive the signals.
[ASUS ROG Phone II Questions & Answers] standupdad:
Had phones with it in the past, never used it so didn't know that. Wouldn't have this time either sans someone asking about it. Thanks for letting me know
[ASUS ROG Phone II Questions & Answers] standupdad:
Just found out my Tencent is running WW. Don't know if that means anything, but wanted to come back and correctly state the version of my phone.
[ASUS ROG Phone II Questions & Answers] AlanTham:
Anyone know how to add shortcut for FM radio please share
[ASUS ROG Phone II Questions & Answers] iAlex5:
[MENTION=8925523]AlanTham[/MENTION] you can download an app like this https://play.google.com/store/apps/details?id=de.szalkowski.activitylauncher

This shows all the application on your phone, also app with no icon in the launcher and create a shortcut to launch the app.
[Samsung Galaxy Note 10 Questions & Answers] ElAguila:
On standard notification (edge lighting off) when my phone is asleep and I get a new message the notification light will blink until I open the phone and check the notifications. When I enable edge lighting for notifications, the edge will only light up once and that is it. So I only know about the notification if I am looking at my phone when it happens. Is there any way to get the edge lighting to repeat like the standard notification does?