yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] oF2pks:
(Use with caution)

(Thanks to BackgroundRestrictor code versatility) attached is a fork/hack with all appOps not requiring aosp/sOpPerms i.e. the permission-less ones :

Use up-left white spinner to select or icon/Launcher shortcuts (for TOAST_WINDOW or RUN_IN_BACKGROUND). For now, targeted appOps are unsorted i.e. natural sdk evolution (KitKat to Android10 depending your device) and starts with GPS; final edition will be sorted.

I also added natural sort for packages' list (no differences for lower/upper case); grayed background for empty uses & time durations for active ones. [MENTION=5571967]ninestarkoko[/MENTION] [MENTION=9663492]MDV106[/MENTION] , check run_any_in_background time in-use, it doesn't seems to be triggered (?)

The app is Marshmallow/Lollipop-mr1 compatible for sdk23/22 appOps permission-less (

but sdk21 appops is set only ?

) : test with caution.

(I)nformation has a reset for all appOps : use with caution, it will wipe

all

your previous aosp appOps settings.

[MENTION=4467676]MrBIMC[/MENTION] ( [MENTION=7050182]MishaalRahman[/MENTION] ) if you don't plan to maintain your original app (2017), I will push this one to F-Droid soon.

GPLv3 : https://bitbucket.org/oF2pks/adbungfupermissionsetter/commits/branch/xda

fyi, all declared permissions on an android device can be parsed with Chairlock : https://xdaforums.com/android/apps-games/appfoss4-1-chairlock-complete-t3956991
[Android Apps and Games] MrBIMC:
Go ahead, push your updates to the F-Droid. I don't have time nor will lately to touch android-related stuff :(
[Android Apps and Games] theleftykid:
Does not work on Pie.. Sad..
[Android Apps and Games] ninestarkoko:
Thanks very much for the update with filtering.

Would you mind adding an option to show also system apps in the list?

Thanks
[Android Apps and Games] oF2pks:
These app needs #su granted: for Pie check menu Magisk/#Superuser list.

Attached has WAKE_LOCK plus following added (depending your android device...):

[sdk],"appOps"
19,VIBRATE</item>
19,SYSTEM_ALERT_WINDOW</item>
19,WAKE_LOCK</item>
23,BODY_SENSORS</item>
26,INSTANT_APP_START_FOREGROUND</item>
28,START_FOREGROUND</item>
29,USE_BIOMETRIC</item>
29,ACTIVITY_RECOGNITION</item>

Spinner is now sorted and minSDK is 22 (Lollipop-mr1), with WAKE_LOCK option at first; there is still an icon/Launcher shortcut for usefullest RUN_IN_BACKGROUND.

[MENTION=5571967]ninestarkoko[/MENTION] , with this one, you can use icon/Launcher shortcut or sort option to toggle +/- ☢DARK/System apps (

use with extreme caution!

).

Edit: useless INSTANT_APP_FOREGROUND_SERVICE & FOREGROUND_SERVICE versus INSTANT_APP_START_FOREGROUND & START_FOREGROUND (ADBungFu-debug

3

.apk)

Need someone with android10 to report if adb shell appops query-op USE_BIOMETRIC allow is valid ?; and same for ACTIVITY_RECOGNITION ?
[Android Apps and Games] oF2pks:
New build : ADBungFu-debug4.apk

- bug rotation fixed

- android10 fixed & missing ACTIVATE_PLATFORM_VPN

- tuned correct detection when appOps are inactive because of default [ignore]_5 & [deny]_4 (deny is for aosp _errored)

[sdk],?,"appOps"
19,5,WRITE_SMS</item>
21,5,PROJECT_MEDIA</item>
21,5,ACTIVATE_VPN</item>
23,4,MOCK_LOCATION</item>
28,4,MANAGE_IPSEC_TUNNELS</item>
29,4,WRITE_MEDIA_AUDIO</item>
29,4,WRITE_MEDIA_VIDEO</item>
29,4,WRITE_MEDIA_IMAGES</item>
29,4,READ_DEVICE_IDENTIFIERS</item>
29,5,ACTIVATE_PLATFORM_VPN</item>

Like original BackgroundRestrictor, the app use toggle = [allow]/[ignore]

(I)nformation has a reset for all appOps : use with caution, it will wipe all your previous aosp appOps settings, including preferences for apps with alert_window or install_packages or any other granted.

minSDK = 22 ; GPLv3: https://bitbucket.org/oF2pks/adbungfupermissionsetter/commits/
[Android Apps and Games] dsjd:
Amazing, you should make a thread or telegram group for this. Quick question, what the difference between using the option of not allowing an app to run in the background and not allowing wakelock permission? If o dont allow an app to run in the background, can it still cause wakelocks?
[Android Apps and Games] oF2pks:
Hope the app will be soon on F-Droid ( [MENTION=6749263]Licaon_Kter[/MENTION] ). (For info you can parse your android applications with these 2 fdroid apps : https://xdaforums.com/android/software-hacking/dexdump-xodus-trackers-apk-static-t3833391

)

Differs depending every android version; run_in_background is appOps permission-less added in Nougat, but there was also the new Marshmallow active/inactive added functionality (alarms).

Basically run_in_background off can save battery for apps you don't really need every day, whereas wake_lock is a deeper & strategical appOps associated to a permission; restricting it could result in a broken app: don't use on /system apps or apps you depend on.

Unfortunately many fancy fashionable apps are triggering wake_lock to spread adds or sniff analytics & privacy: it's up to you to decide whether or not to try these apps with wake_lock off (or any appops), some apps will remain useful while others could malfunction.

For example: Opera browser is not open source https://forums.opera.com/topic/31982/why-can-t-opera-go-free-and-open-source; so I don't really need it but if I can sometimes use it with wake_lock down (and many other appOps like gps, run_in_background, start_foreground ...) it's okay for me to have it installed on my device: data saving or vpn for occasional neutral web surf (?).

As for Marshmallow related active/inactive added functionality (alarms) https://developer.android.com/training/monitoring-device-state/doze-standby , following same #su adb cmd injection, it could be added to fdroid [MENTION=9138098]hcur[/MENTION] SuperFreezZ (I will give a try soon : https://gitlab.com/SuperFreezZ/Supe...reeze/tool/android/backend/FreezeUsingRoot.kt)

$ adb shell dumpsys battery unplug
$ adb shell am set-inactive <packageName> true

Finally, I also worked on my permission explorer Chairlock https://xdaforums.com/android/apps-games/appfoss4-1-chairlock-complete-t3956991 to use #su to toggle permissions off, but wasn't satisfy by final relevance (I may upload on xda only a #su debug version). That's why I move back to ADBungFu here.
[Android Apps and Games] Trovies:
How to use this app? Is it similar to WakeBlock?

I wanna use it to save battery drain, can u tell which one is safe to disable?
[Android Apps and Games] oF2pks:
New build : ADBungFu-debug_9.apk

- added disable/enable #su feature which also speed-up launch a lot compare to the slowness of any appops iterative checking injection on previous (wake-lock or other).

Let me know if you need other shortcut straight access to specific appops, like existing usefullest RUN_IN_BACKGROUND: wake_lock, start_foreground ...

Use ☢DARK/System apps to re-enabled frozen apps that won't show anymore in regular simplified screen after update.

Included is [Active] tag (instead of appops time-in) for apps with stand-by status up. (Always on for every apps when device is in charge) Check your Settings/DeveloperOptions/Stand-byApps for fine tuning.

Strangely, app like mandatory Cell Broadcast com.android.cellbroadcastreceiver is active even when force-disabled.

[MENTION=7050182]MishaalRahman[/MENTION] , I checked breaking android11 preview and did not find any new appops entry: https://android.googlesource.com/pl...core/java/android/app/AppOpsManager.java#1509

Like original app, every appops restricted is perform the exact same way that PC plus adb shell via usb cable. Check previous post for more info: https://xdaforums.com/showpost.php?p=81770949&postcount=235

minSDK = 22 ; GPLv3: https://bitbucket.org/oF2pks/adbungfupermissionsetter/commits/
[Android Apps and Games] MishaalRahman:
We won't know of the full changes to AppOps until the source code drop in August. ACTIVATE_PLATFORM_VPN is a new feature that's being developed openly in AOSP, so it's no surprise it's already there.
[Android Apps and Games] NoSauce:
Thank you for this app. I'm trying it out and had a couple questions:

1. Which one is for preventing apps from autostarting during bootup/restart?

2. What's the difference between runinbackground and run_any_in_background?
[Android Apps and Games] oF2pks:
ADBungFu is now live on F-Droid

More info post#235: every appOps behavior can change depending android version.

These need related Events to be triggered; give a try to attached Pie/arm64 compatible autostartS debug flavor: root #su only.

For a live dynamic Greenify similar manager, check F-Droid SuperFreezZ (with screen0ff shortcut)

autostartS GPLv3 : https://gitlab.com/oF2pks/autostartsg
[Android Apps and Games] DE SEXIEST:
How do I use adbbungfu on Mon rooted android 9 device?
[Android Apps and Games] andy356:
[MENTION=7489364]oF2pks[/MENTION] Dark theme, please!
[Android Apps and Games] oF2pks:
Attached is hot-fix (debug flavor) for active and time-in whited through android10 dark theme (final dark feature is wip with androidX and more ...)

( [MENTION=5123058]NoSauce[/MENTION] [MENTION=5230775]dsjd[/MENTION] ) For live dynamic Greenify similar manager hibernation superuser, check attached lifted SuperFreezZ with #su (and screen0ff shortcut), in post https://xdaforums.com/showpost.php?p=81954189&postcount=240
[Android Apps and Games] andy356:
Is this still WIP? I tried 3.0-13 from F-Droid and some elements seem to be darker.
[Android Apps and Games] oF2pks:
Indeed, 3.0-13 is finalized overhaul compatible with [MENTION=4467676]MrBIMC[/MENTION] internal com.pavelsikun.runinbackgroundpermissionsetter. App is naturally slightly dark and android10 switchable; I chose text _white for user apps vs _black for system ones.

I have added an action button with basic features such as underrated Trim caches for all apps : useful prior any twrp backups, to save time and xGo(s).

Next version will upgrade to latest Chainfire libsuperuser 1.1.0 to ease features like adb shell cmd deviceidle whitelist or any free interpreted ADB expression ( & refactored to internal com.oF2pks.adbungfu): let me know about any ADB related specific needs.
[Android Apps and Games] andy356:
That's an extremely useful feature, trimming cache before TWRP backups! Thank you!
[Android Apps and Games] dsjd:
Quick question, whats the difference between run_in_background vs run_any_in_background.

Also is there away to link the two in your app so that we can go through the app list only once?
[Android Apps and Games] oF2pks:
New ADBungFu' xda thread created, with experimental features : https://xdaforums.com/android/apps-games/approotfoss5-0-adbungfu-appops-manager-t4104149

All these can can be android's version specific ... As example: https://cs.android.com/android/plat...e9c1515af202880edbab57cdd93d040c16cf326b;l=67

btw, a very few ADB appops commands, like location related "dependent" permission are inefficient/fake(?)

whatever

a plugged PC's terminal or ADBungFu https://bitbucket.org/oF2pks/adbungfupermissionsetter/issues/2/location-restrictions-do-not-work
[Android Apps and Games] oF2pks:
I've updated ADBungFu with latest official android 11 changes

[SIZE="1"] <item>30,3,QUERY_ALL_PACKAGES</item>
<item>30,5,ACTIVATE_PLATFORM_VPN</item>
<item>30,3,AUTO_REVOKE_PERMISSIONS_IF_UNUSED</item>
<item>30,0,AUTO_REVOKE_MANAGED_BY_INSTALLER</item>
<item>30,4,NO_ISOLATED_STORAGE</item>[/SIZE]

https://xdaforums.com/android/apps-games/approotfoss5-0-adbungfu-appops-manager-t4104149
[Android Apps and Games] ALELOCOOO:
Does it work on A13?
[Android Apps and Games] ctakah27:
Sooo "ignore" = "do not run in the background"?
[Android Apps and Games] Still_living714:
+1
[Android Apps and Games] Arerive:
this is what i want to get for a such long time. now i get it. thanks dev for your work. :good:
[Android Apps and Games] obol2:
Yes

---------- Post added at 03:52 AM ---------- Previous post was at 03:49 AM ----------

Can this app have an option to sort alphabetical?
[Android Apps and Games] The Doctor04:
This functionality wasn't available until Nougat, so MM will most likely be a no go
[Android Apps and Games] dimm0k:
so I'm curious, is there a way to determine if I really need to disable an app's background permission? for example earlier this morning I ran the "T-Mobile Tuesdays" and the "XDA Labs" apps for various reasons and shortly after using the back button to exit the apps I noticed that both of them were still in the process list of 'top' eating up some CPU. prior to running the apps my CPU usage was under 10%, however during the usage of the two apps and backing out of them my CPU was around 20-25% and it stayed like that for about an hour or so before they both disappeared from 'top' and CPU usage dropped back to <10%. is this normal or should I have them denied?
[Android Apps and Games] rahul9999:
Good work mate.. keep this good work continues :fingers-crossed:
[Android Apps and Games] Arerive:
it look like facebook and other app still running in background and i do not open it.
[Android Apps and Games] ToxxMe:
Works like charm :good:
[Android Apps and Games] silentkiller143:
Many thanks for such a useful app. Just one request : is it possible by any chance to see and disable system apps as well?
[Android Apps and Games] murali3127:
Thanks for the app sir. Is it possible to add play services to the list ?
[Android Apps and Games] Rhodesgod:
amazing ...

can this app stop google play service too ? the main cause for idle drain ...

ty.
[Android Apps and Games] Darkphyx:
It's the same functionality of privacy guard on Lineage OS?
[Android Apps and Games] demonoidmaster:
No
[Android Apps and Games] dego_:
Maybe it's a bug, but on my phone apps stop sending ANY notifications when the screen is off (and these apps being hybernated by Greenify with root access).
[Android Apps and Games] Darkphyx:
Which is best?
[Android Apps and Games] dima-82:
Can anyone confirm me, if this has the same capabilities?

App Ops - PRO (There is a free version on the playstore as well)

Since Xposed and Xprivacy is not available for Nougat I tried to find an alternative. One of the permissions is exactly what described here. I never permitted it, but now I will do :)
[Android Apps and Games] kpirnie:
thats what its supposed to do mate.

run through the list in the app and unselect the ones you need notifications from
[Android Apps and Games] Arerive:
nice app but i think facebook still running in background. i set facebook ignore.
[Android Apps and Games] tracerit:
Is this the same as Privacy Guard's "run in background" option with LineageOS?
[Android Apps and Games] dego_:
https://xdaforums.com/showpost.php?p=73087803&postcount=34
[Android Apps and Games] ulxerker:
Awesome tool, thanks! Hopefully this will work on O, too.

Yes, they do.
[Android Apps and Games] demonoidmaster:
Resurrection Remix has Privacy Guard too, but this app finds any and all apps who have a background run task (some apps have em hidden too so this app pretty much easily fixes that)

With Privacy Guard you can change a lot of permissions, but some apps still run in the background even if you disable "run in background", etc so running this instead forces apps from doing whatever they want into submission
[Android Apps and Games] dima-82:
What's about my question im post #37? AppOps is a good permission manager as well. And I think it can block / permit background execution.
[Android Apps and Games] Javi22:
The creator itself told it's the same if I'm not wrong

https://xdaforums.com/showthread.php?p=73080983

Enviado desde mi MI 5s mediante Tapatalk
[Android Apps and Games] demonoidmaster:
In that reply he says he's not sure and based his response on what users from reddit told him, but anyways i don't know about that "Limit Background Activity" tool in LineageOS but if it is then it's probably kinda like what this app does, though def not like App Ops or Privacy Guard because for one Privacy Guards function is intercept apps access demands and ask the user if yes, no or temporarily say yes for stuff like location, camera, etc

Privacy Guard doesn't ask these questions about Run In BG or Run On Boot or Stay Awake, those you have to set yourself, lol
[Android Apps and Games] tcpcd:
i think it is not working for whatsapp
[Android Apps and Games] dego_:
My phone became a bit snapier with this app. Love it!
[Android Apps and Games] deepu458:
Hi Dev [MENTION=4467676]MrBIMC[/MENTION], thx for the app. Its nice and simple 1 future request if possible would be can u please add the option of Backup and Restore Settings for various apps (within my device) in the app settings.

I mean if i select 20 APPS from the complete list and if u can provide the option of Backup those apps and settings. So when we do a clean flash we can just simple install the app & restore those settings and its a simple one button click functionality like app ops app is doing.

One more question i tried finding this app on XDA labs i couldn't find it? So can u let me know what name i should search for?
[Android Apps and Games] edzamber:
Great job [MENTION=4467676]MrBIMC[/MENTION] :)
[Android Apps and Games] MrBIMC:
Quick Update: TY for notifying me that app was not available at the xda labs, that was actually my fault as I forgot to toggle it's availability there. Now it's published!

Here's the link https://labs.xda-developers.com/store/app/com.pavelsikun.runinbackgroundpermissionsetter
[Android Apps and Games] Salty Wagyu:
Is it working correctly? After ignoring, National Rail app continues to wakelock since unplugged
[Android Apps and Games] Grander0:
I disabled background activity for QuickLyric, but it still gives me notifications when it finds lyrics for a song I'm listening to, does anyone know why?
[Android Apps and Games] AdroitAdorKhan:
Can system apps also be added?!
[Android Apps and Games] Gurkanwal Chauhan:
Yeah
[Android Apps and Games] CrazyCypher:
Hy guys, I don't have root but I did the same thing through ADB and now I am wondering how can I know it works? I did this for Facebook app and ADB seems to be successful but when I go into settings-apps-facebook I can still click on force stop button..does that mean run in background is working but this button is like this normally or this mean it doesn't work?

Do you have the force stop button grayed out on apps you disabled run in background or not?

Thank you for answers, AI appreciate it
[Android Apps and Games] Salty Wagyu:
I don't think it works, whoever submitted it to frontpage probably didn't test it throughly
[Android Apps and Games] icke:
I don't think u work...whoever submitted u to earth probably didn't tested u.
[Android Apps and Games] ram4ufriends:
Have you seen reports on this thread? Many said it works..it may not be working for you..but I don't think this is correct way to report...what doesn't work for you?
[Android Apps and Games] icke:
+1

That's what I was trying to say with my comment...thank U! [emoji6]
[Android Apps and Games] Aveeux:
What's so different between this and App Ops?
[Android Apps and Games] kpirnie:
read the first couple of posts
[Android Apps and Games] Javi22:
Mm do you know the app Aegis which is exclusive from the room Mokee?

Maybe that's the same as this?
[Android Apps and Games] Neejay:
Thanks, great app! 2 requests: A dark theme, and the ability to sort to have the "ignored" apps at the top of the list.
[Android Apps and Games] zputnyq:
Can this app be installed on android under nougat or mm?
[Android Apps and Games] mayankkhajnchi:
nice work man.
[Android Apps and Games] DEVILOPS 007:
Anyone got a guide on what apps you are restricting the background processes for? Thanks.
[Android Apps and Games] guntzog:
If you're still on marshmallow, you can use prevent running Xposed mod, same functionally.
[Android Apps and Games] ram4ufriends:
[MENTION=4467676]MrBIMC[/MENTION]... Excellent app, can you add search feature or sort apps alphabetically?
[Android Apps and Games] guntzog:
Hello, still having wakelocks with ignored apps.
[Android Apps and Games] AndroidHtc101:
Does this app save after boot?
[Android Apps and Games] MrBIMC:
Released update with Sorting and Searching abilities. Check xda labs or github for apk.

Gonna add sorting by enabled/disabled in the next update.
[Android Apps and Games] shahfaishal:
where is the app???
[Android Apps and Games] n0j0e:
https://labs.xda-developers.com/store/app/com.pavelsikun.runinbackgroundpermissionsetter

Hit the blue download button

Send with much love & Android.
[Android Apps and Games] ram4ufriends:
Yeah for me too..not sure if I am missing something...I selected ignore for Facebook and I could see that in Running Services in Developer Options...
[Android Apps and Games] guntzog:
Same goes with maps, I didn't used it since I installed this app, I changed its state to ignored, still wake the device..
[Android Apps and Games] pdaddy:
Will it be possible to have access to system apps in the future?
[Android Apps and Games] demonoidmaster:
It finds any app that runs in the bg and you then have an option to turn it off, it's not complicated
[Android Apps and Games] sireddie:
This app seems to offer the same functionality as the "Run in background" toggle in "Privacy Guard" found in Ressurection Remix (Lineage OS).

Setting an app to "Ignore" in this app, disables "Run in background" in "Privacy Guard" and vice versa.

I guess this app is useful for those who don't have "Privacy Guard" in their OS or for keeping track of/easily see which apps have "Run in background" disabled
[Android Apps and Games] DEVILOPS 007:
I know but I don't want to break my apps and isn't gave time to mess around and would like to know what apps people disable like what services and whether any system apps etc. Thanks
[Android Apps and Games] Chaplan:
It's the same as running the commands via adb, Privacy Guard or App Ops, but with less options and no system apps ability.

Enabling and disabling background services on this app will achieve the same result as on the mentioned others, so what is toggled on one will be reported on the others if you have them.

It's a nice Gui app to achieve what the OP aims at on the user installed apps IMO.

Running it alongside APP Ops and I find it useful nevertheless.
[Android Apps and Games] demonoidmaster:
Break your apps how? It doesn't modify your apps in any way, it only tells the app to disable it's boot option

This isn't meant for system apps or services, this is for stuff like Facebook, snapchat, etc
[Android Apps and Games] munyukmambu:
hi develeoper, this app is good!

but please add better description to the toggles.

because it is confusing.

when the toggles are on and it says "allow", does it mean "allow the background process" or "allow restriction to the background process"?

thanks
[Android Apps and Games] TomiLynch:
I'm quite sure it means "allow background process". [MENTION=4467676]MrBIMC[/MENTION], if this is the case, a good solution to avoid confusion would be changing the "ignore" lable to "restrict", and probably inverting the toggle so that we activate the restriction instead of deactivating the permission to run in background.

Thanks for your hard work though!! I'm not complaining at all, just trying to help improve.
[Android Apps and Games] NLBeev:
Keep in mind that this app concerns a RUN_IN_BACKGROUND permission.
[Android Apps and Games] MrBIMC:
Ok, I updated the app.

Changelog: https://github.com/MrBIMC/RunInBackgroundPermissionSetter/releases

new apk can be found either at xda labs or at github releases.
[Android Apps and Games] martinklaus:
Is it possible to add some statistics to know which app is useful to block?
[Android Apps and Games] Dieppy:
If I block Facebook for example or any other chat app I will lose notifications?
[Android Apps and Games] AndroidHtc101:
This app you have made is simple yet effective :) I couldn't believe apps that stay in background that have no reason to until I launch.
[Android Apps and Games] sireddie:
Great update!

Very useful now with the sorting by state sorted.

Thanks
[Android Apps and Games] x11term:
Not working

"There was error setting $ru.dublgis.... "

https://photos.app.goo.gl/F19Of9zdZPhVwmsq2
[Android Apps and Games] MrBIMC:
It actually works, I'm just displaying the wrong message.

My derp. Gonna release a fix in 10 minutes.

UPD: fix released.
[Android Apps and Games] TomiLynch:
Thanks for the "restrict" lable!!