Hello.First of all,I am sorry if this question has been asked before,but I was not able to find it.
Is there any way turn Greenify on only when Wifi is turned off,and then if I turn Wifi on,Greenify to stop?
Thank you very much!
chris_b0ss said:
Hello.First of all,I am sorry if this question has been asked before,but I was not able to find it.
Is there any way turn Greenify on only when Wifi is turned off,and then if I turn Wifi on,Greenify to stop?
Thank you very much!
Click to expand...
Click to collapse
Use Tasker or similar app.
Thank you for answering !
is Tasker compatible with Greenify ? I ask,because I've never used Tasked,and I don't know a lot about it
chris_b0ss said:
Thank you for answering !
is Tasker compatible with Greenify ? I ask,because I've never used Tasked,and I don't know a lot about it
Click to expand...
Click to collapse
Yes, Greenify has a plugin for Tasker.
This is misleading wrong information.
The plugin for tasker only lets you wake up an app or hibernate one app or all greenified apps. It does not let you 'pause', 'stop', 'resume' or 'start' greenify.
Edit:
Tasker could be used to kill it and restart it later, but in my quick testing it looks like greenify doesn't like being killed.
Tasker *could* be used alongside Secure Settings (yet another app) or using command line code to disable greenify's package (the whole app will disappear) when Wi-Fi is connected, and then re-enable it when Wi-Fi is disconnected. This would need you to have a rooted device. This method would be quite complicated, but do-able. It works in my quick testing, but explaining how to achieve it would need a full tutorial. It would remove your home screen shortcuts whenever the app is disabled. Disabling is easy. Enabling is complicated. You'd have to set tasker to unlock your screen using whichever lock screen method you have, and then open greenify, click on the message at the bottom that says the service is not running, then close greenify and lock your screen again. There could be unexpected side-effects of doing this. I cannot get into a deeper explanation than this because it would be a time sink.
Sukarn said:
This is misleading information........
Click to expand...
Click to collapse
The proper word would have been "wrong" not "misleading".
" Misleading" has a bad connotation implying that the info was supplied with the knowledge that it was not true. The fact is that I don't use Tasker and presumed (may be wrongly) that since Greenify has a plugin, it should be possible to hibernate and unhibernate apps enmasse.
Please be careful in usage in future.
The correct way to disable auto-hibernation is to disable the "CleanerService" of Greenify.
As shell command (requires root):
Code:
su -c pm disable com.oasisfeng.greenify/.CleanerService
To restore:
Code:
su -c pm enable com.oasisfeng.greenify/.CleanerService
su -c am broadcast -a android.intent.action.BOOT_COMPLETED com.oasisfeng.greenify
oasisfeng said:
The correct way to disable auto-hibernation is to disable the "CleanerService" of Greenify.
As shell command (requires root):
Code:
su -c pm disable com.oasisfeng.greenify/.CleanerService
To restore:
Code:
su -c pm enable com.oasisfeng.greenify/.CleanerService
su -c am broadcast -a android.intent.action.BOOT_COMPLETED com.oasisfeng.greenify
Click to expand...
Click to collapse
Thank you. I couldn't find an obvious way to disable a service without disabling the whole package. I knew how to disable a package using command line but not a service.
Related
Hi,
I've been trying to find a decent terminal with many netstat options, but havn't had much luck. So im wondering if someone knows of an app that has netstat ability with the ability to select and kill established processes linked to certain connections.
If not, do you know of a terminal that includes all the netstat options?
Thank you for your time.
Shouldn't netstat functionality be determined by your binaries (busybox) rather than the terminal app you're using?
Yeah, I believe that is right, but it seems that the PID option is not working, and am wondering if you know of a binary, app, etc. that allows this option.
I use SManager and installed BusyBox.
segomyeggo said:
Yeah, I believe that is right, but it seems that the PID option is not working, and am wondering if you know of a binary, app, etc. that allows this option.
I use SManager and installed BusyBox.
Click to expand...
Click to collapse
Try Busybox installer by stericson, netstat -p works fine for me with it. However make a backup first.. It killed my GS2 T989 the first time I installed it.
which terminal are you using? that is the busybox i have installed.
do i understand correctly?
you want to see devices connected to your wifi...
and have the option to block them individually?
theres an app i have that does just that and it works! i use it at work to stop customers from downloading movies on our free wifi
its called wifikill heres a link http://forum.xda-developers.com/showthread.php?t=1282900
Alright I just bought the donation package for Greenify (latest) but the auto-hibernate option is gone now. I tried to disable every module, reinstall root, reinstall greenify, clear cache, edit the settings (Security and accessibility) but still no luck. I don't have the yellow message that shows up when something is wrong with the auto-hibernation. All I can see is "will hibernate in minutes after screen is off" but the apps are still working in stand by and aren't hibernated. The only way that the apps are hibernated is using the Hibernate + Lock screen shortcut.
@DavidMKD:
You are using it in root or boost mode? Does Supersu show Greenify in its logs?
Update/reinstall Supersu.
tnsmani said:
@DavidMKD:
You are using it in root or boost mode? Does Supersu show Greenify in its logs?
Update/reinstall Supersu.
Click to expand...
Click to collapse
Boost mode. Yes it's shown and as I stated in the OP i did reinstall SU
DavidMKD said:
Boost mode. Yes it's shown and as I stated in the OP i did reinstall SU
Click to expand...
Click to collapse
You are running Supersu and not SuperUser? Normally this happens if granting root permission is somehow ****ed up. So are you sure Greenify was specifically granted root priveleges?
How long did you wait after screen off to check? Sometimes it takes 3 to 5 minutes for autohibernation.
tnsmani said:
You are running Supersu and not SuperUser? Normally this happens if granting root permission is somehow ****ed up. So are you sure Greenify was specifically granted root priveleges?
How long did you wait after screen off to check? Sometimes it takes 3 to 5 minutes for autohibernation.
Click to expand...
Click to collapse
That was one of my questions here how long does it take and why isn't instant like the shortcut that the app has. It's SuperSU and i was just removing and flashing and what not so that's not the problem. Stamina mode is disable every other module is disable but still doesn't hibernate as it should. I even set the default permission in SuperSU to granted without pompit
DavidMKD said:
That was one of my questions here how long does it take and why isn't instant like the shortcut that the app has.
Click to expand...
Click to collapse
It is intentionally set to hibernate after a short delay so that if you had second thoughts after screen off and wanted to work on an app already running, it won't consume much battery or time. Atleast this is what the Dev said earlier.
I have no other ideas for your issue, sorry.
Every time I disable "Find My Device" under device administrators, it re-enables itself whenever I reboot my phone. In the phone settings, I turned off location and went to Google->security->Find My Device and toggled off. Then I went to my Google account on my PC to remove the device. Nope! Makes no difference. WTH?! Come on, Google! you creep up on my phone. I have to disable it because when it's enabled, it causes issues with MacroDroid app. My phone is rooted. I'm on Marshmallow 6.0.1 Any solutions? Google makes me wanna rip out my hair. Ugh, this is a nightmare. Same issue on another phone
Can confirm this too.
See that since Yesterday... Android Oreo and/or Pie! Makes no difference... Zte Axon7...
Thanks to Google for this funny new Feature :good:
It might help if you mention either of the phones you're talking about, just in case this is a device specific issue.
If it's re-enabling itself on reboot, it doesn't sound like you're disabling it properly. Try freezing it using Root Uninstaller to freeze the app.
free_axon said:
Can confirm this too.
See that since Yesterday... Android Oreo and/or Pie! Makes no difference... Zte Axon7...
Thanks to Google for this funny new Feature :good:
Click to expand...
Click to collapse
Thank you for confirming this. The feature disappears when I disable Google Play services but I can't leave it disabled
Redline said:
It might help if you mention either of the phones you're talking about, just in case this is a device specific issue.
If it's re-enabling itself on reboot, it doesn't sound like you're disabling it properly. Try freezing it using Root Uninstaller to freeze the app.
Click to expand...
Click to collapse
Firstly, my device and running system are in my post, as you meant me too. I'm quite sure it's not device related... This "issue" appears as soon as i update to the new beta of gplayservices and disappears as soon as I downgrade!
One after another in by friendships have it now, too. So it's rolling out with stable, because none of them is beta tester or it comes over another backdoors...
Redline said:
It might help if you mention either of the phones you're talking about, just in case this is a device specific issue.
If it's re-enabling itself on reboot, it doesn't sound like you're disabling it properly. Try freezing it using Root Uninstaller to freeze the app.
Click to expand...
Click to collapse
Right now I'm using LG Volt. Another one is ZTE Warp 7. It's the feature, not the app. If It were the app, I would uninstall it. I tried disabling the feature under Google Play services via the app called "Disable Application [ROOT]" by BIZKAI Apps but it asked me to pay for it pfftt
Hi, did anyone manage to solve this issue? I'm trying to disable Google's device admin access but it keeps turning on by itself
The settings might not be saved to your Google account properly , try connecting your device to a stable internet connection and disabling it .. might work, usually same happens with my device when enabling adb(debug security settings) if internet connectivity is poor.
If you're still looking for a fix, I've finally found one! https://forum.xda-developers.com/apps/magisk/module-universal-gms-doze-t3853710
Fyi...it seems the GmsIntentOperationService service in GooglePlayServices is what is causing it to re-enable at boot. If you are rooted and disable this service it stops re-enabling at boot. Google should fix this....not cool Google.
fish312 said:
If you're still looking for a fix, I've finally found one! https://forum.xda-developers.com/apps/magisk/module-universal-gms-doze-t3853710
Click to expand...
Click to collapse
I've tested that Magisk module on a Blu Life One X3 phone, rooted with TWRP as bootloader and Magisk as root. It does indeed permanently disable 'Find My Device' (and removes it from the Device Administrators list), but on this particular phone, it messes up the WiFi connection... it flips between 'Connected' and 'Connected, No Internet', and doesn't transit any data.
I uninstalled the 'Universal GMS Doze' Magisk module, and WiFi functionality returned to normal, but 'Find My Device' was re-enabled. I did this three times, just to be sure, same each time.
For now, to save battery, I'm using 'Enable Doze for GMS Magisk Module' Magisk module, but it doesn't disable 'Find My Device' like 'Universal GMS Doze' does.
I'm now looking at using Disable Application [ROOT] (package:/data/app/com.iamaner.oneclickfreeze-1/base.apk=com.iamaner.oneclickfreeze) to stop the Google Play Services from setting a Device Administrator... you should check out that program, it's awesome. It's a paid program, but it's well worth the coinage.
Here's the Google Play Services activities:
https://github.com/alt236/apkdetails/blob/master/sample_output/google_play_services_11.9.49.md
We have a few avenues to explore in turning off 'Find My Device' permanently:
com.google.android.gms.mdm.receivers.ActivateDeviceAdminUponUnlockReceiver
com.google.android.gms.mdm.receivers.MdmDeviceAdminReceiver
android.permission.MANAGE_DEVICE_ADMINS
{forgive the spaces in the above... the xda-developers.com editor adds them, for some reason}
s00thsayer said:
GmsIntentOperationService service in GooglePlayServices is what is causing it to re-enable at boot.
Click to expand...
Click to collapse
How's it possible to fetch that Service, with non-root? Best I can get on Android One is:
I'm not sure you can do it, non-root. I'm trying to figure out the ADB command to disable 'Find My Device' permanently... it's got to be related to what I posted above. Still experimenting.
Turn off the find my "device"
If you would like to remotely locate, lock, ring or erase your device, view this info.
Notes:
Find My Device Android allows you to remotely locate, lock, ring or erase your device.
A GmailTM account must be set up on the device to utilize Find My Device.
Log in to the Find My Device Device (URL: google.com/android/find) to access these services.
From a Home screen, navigate: Apps > Settings > Google (Google services).
To allow the device to be remotely located:
Tap Location.
Ensure the Location switch (located in the upper-right) is set to the ON position.
Tap Security.
Tap the following switches to turn on or off:
Remotely locate this device
Allow remote lock and erase
Hope: It will helps.
That doesn't work for me, as I've disabled Google location features in build.prop and disabled Captive Portal Login connectivity checking (which checks with a Google server to switch your WiFi icon to 'Connected' from 'Connected, No Internet'), as I explicate here:
https://forum.xda-developers.com/ge...bootloader-t3812910/post79374402#post79374402
So Google can only see if the phone is online or not. It can't locate it, nor can it communicate with 'Find My Device'.
But good news! If you install AFWall+ and disable:
[10014] Google Play Services, Google Services Framework, Google Account Manager
[10023] Google Play Store
for both Data and Wifi in the firewall, Google can't even tell when your phone is online.
What I did was to set up three profiles in AFWall+, one with the basic connectivity enabled and Google enabled, one with basic connectivity only, and one lockdown profile (nothing enabled). Set up AFWall+ so it shows a notification, press that notification to take you to the AFWall+ window. Just below the green header, you'll see a drop-down box where you can quickly switch the profile. Or set up the widget to do the same thing.
Heh, leave it to Google to make permanently disabling "Find My Device" as unintuitive as possible.
Go to Settings > Google > Security > Find My Device > Turn it off
If you simply go to Settings > Security > Device Administrators and disable Find My Device, it'll re-enable itself upon reboot.
futuretricks
very informative
---------- Post added at 05:50 AM ---------- Previous post was at 05:47 AM ----------
very wonderful
---------- Post added at 05:54 AM ---------- Previous post was at 05:50 AM ----------
wonderful
Lusty Rugnuts said:
We have a few avenues to explore in turning off 'Find My Device' permanently:
com.google.android.gms.mdm.receivers.ActivateDeviceAdminUponUnlockReceiver
com.google.android.gms.mdm.receivers.MdmDeviceAdminReceiver
android.permission.MANAGE_DEVICE_ADMINS
{forgive the spaces in the above... the xda-developers.com editor adds them, for some reason}
Click to expand...
Click to collapse
I can't find any of them to disable.
i had the same problem, every reboot option returned on. i fixed with this command from terminal emulator. i use TERMUX APP.
type "su" then enter and allow root
type "pm disable com.google.android.gms/com.google.android.gms.mdm.receivers.MdmDeviceAdminReceiver" then enter.
this makes DISAPPEAR the total row of the option find my device. and disable 4ever. tested now on lenovo p2, havoc 2.9 pie
realista87 said:
i had the same problem, every reboot option returned on. i fixed with this command from terminal emulator. i use TERMUX APP.
type "su" then enter and allow root
type "pm disable com.google.android.gms/com.google.android.gms.mdm.receivers.MdmDeviceAdminReceiver" then enter.
this makes DISAPPEAR the total row of the option find my device. and disable 4ever. tested now on lenovo p2, havoc 2.9 pie
Click to expand...
Click to collapse
I did this, worked for 3 days then my phone rebooted by itself (which has never happened before). When it powered back on, Find My Device came right back in an enabled state. I have a HTC 10 and almost positive this is what causes the horrific battery life. Once its disabled, my battery history is fairly flat. Every 3 days or so it will re-enable itself and its fairly obvious when it happens -- my battery starts draining much faster. There has to be another way to block this completely, I've already disabled it in my Google account, on the phone, and unchecked it in device admins but again, 3 days later its enabled again like a bad virus.
i have xiaomi mi9t android pie. When phone going to deep sleep on lock screen doze i cant get notification . i tired everything on phone but its not work .
i want to whitelist whatsapp in doze.
i tried this commands on adb server
dumpsys deviceidle enable light
dumpsys deviceidle enable deep
dumpsys deviceidle whitelist +com.whatsapp +com.google.android.gms
Click to expand...
Click to collapse
but this command not work on pie. this commanda work on andorid 7. anyone can help me how to do this ?
i want whatsapp always work background
i dont want close all doze. i only want whatsapp whitelist
when i do this command adb server its working fine . but this is closing all doze for phone. i need only close for whatsapp
adb shell dumpsys deviceidle disabled all
Click to expand...
Click to collapse
hulyahulya said:
i want whatsapp always work background
Click to expand...
Click to collapse
Hi, did you find a solution for this issue? Would be great if you could share your experience.
I have almost same problem: I cannot get any notifications from telegram application, whereas whatsapp works fine.
When I ran special seach utility which is capable of searching certain string in files' contents, I found that 'com.whatsapp' can be seen in some xml-files which are inside of power management application of my phone. I tried to edit such apk in order to add 'org.telegram.messenger' but I failed. So, I could not get telegram working as correctly as whatsapp works.
I'm not sharing the name of apk I tried to edit as it seems a propriatory apk of nasty QIKU vendor so it is highly unlickly anybody has same apk on his phone.
Hey everyone, today i want to share a not so pretty but working workaround about an issue that seems to be happening on some GSI images on this device (and its predecessor as well, the Note 10S which i used to own!), and i also want to collect some data from some more knowledgeable people about this so we could get a proper solution.
The issue is that when the device is left locked and idle for around 5 minutes, apps lose network connectivity so not only you get issues like Spotify not playing anything anymore after the last played song before the phone lost connectivity, but most importantly app notifications can be delayed by a few minutes, sometimes even an hour or more, or just never get to you until you unlock the phone and either wait a bit or open that app yourself. After the device enters Doze, and after it is unlocked to exit it, it takes a bit but not too long before your notifications all come in again. This does NOT happen when the device is connected to a power source.
If you have this issue, a not-so-pretty solution i found at least for now is running the following ADB command from a computer:
adb shell dumpsys deviceidle disable
Click to expand...
Click to collapse
This disables Doze entirely until the next reboot (after every reboot you need to run this again or Doze will kick back in).
Now your device will never enter Doze for your current Android session, battery life doesn't seem to be impacted much if at all, but it's better to have less battery life than not getting important messages.
EDIT: At first i was blaming Doze being broken directly, but this seems to be related to a BPF bug in the MediaTek kernel, and it depends on the device manufacturer if they have merged the fix or not. I tested the same GSI on A12 MIUI, and it still has the bug (along with many other bugs which is why everyone tells you to flash A11 before you flash any GSI), so Xiaomi did not fix it yet.
This bug causes mostly networking issues, some ROMs like LineageOS 20 not having network due to Restricted Network Mode causing no network like that post says (workaround for that too there), Battery Saver completely killing the network and probably this issue. After some thinking, Doze actually is working fine (Spotify only stops playing when it tries to get a new song from the network, the song it already got keeps playing even on Doze), it's just the network in apps while on Doze that dies. I tried the same exact GSI on a SD device, and there are zero issues there. There also were no issues on A11 and A12 GSIs on my old Redmi Note 10s, which is also affected by the same sleep bug on A13!
For this particular issue, you can use that adb command, but be aware that other networking issues like the above might exist.
There are some other workarounds like unlocking the phone ever so often before it exceeds 5 minutes staying locked, which is just painful, or leaving it always connected to a power source which isn't always viable, so those are out of the question.
If anyone with more knowledge knows the cause of this and/or a less "bandaid" fix, feel free to reply here, it would be much appreciated both for me and other users with the same issue!
U are my man. i thought its a problem like that, but i dont figured out how to prevent.
i will test this and report if its working.
isnt it possible to run it as bootscript?
lurchiii said:
U are my man. i thought its a problem like that, but i dont figured out how to prevent.
i will test this and report if its working.
isnt it possible to run it as bootscript?
Click to expand...
Click to collapse
I think it's possible to run it as bootscript but i think it requires root and i don't know how to do either of these yet, sorry. Hopefully someone more experienced can help us
I tried this using termux(with su) and It works for now, I'll write in a few days if it still works
i tried to make a magisk-bootscript and it will be executed (according on magisk log) but when i checked with "adb shell dumpsys deviceidle enabled" it shows "1" but when i executed it manually with termux it shows "0". Idk why it dont worked on boot.
lurchiii said:
i tried to make a magisk-bootscript and it will be executed (according on magisk log) but when i checked with "adb shell dumpsys deviceidle enabled" it shows "1" but when i executed it manually with termux it shows "0". Idk why it dont worked on boot.
Click to expand...
Click to collapse
Hm that is weird, i have no idea. I never tried running the command from the phone itself, i usually just used adb on a computer. The output i got from the command was something along the lines of
"Light idle mode disabled
Deep idle mode disabled"
(may not be exact message but you get the point)
Try running the command from a computer and see if it works, should work fine there.
from pc or from termux its np but from a bootscript it wont work. i think dumsys command can only be executed after boot or something?
it seems im not alone on the whole wide world:
Execute a script at boot
Hello, I'd like to execute a easy script at every boot of the phone so basically I've placed the script in the folder /sbin/.magisk/img/.core/service.d/doze.disable.sh I've tried also putting it in...
forum.xda-developers.com
but i found these interesting commands + module:
Universal GMS Doze - Magisk
Systemlessly prevent unnecessary GMS running in the background, optimized and adjusted with additional modified services.
themagisk.com
lurchiii said:
it seems im not alone on the whole wide world:
Execute a script at boot
Hello, I'd like to execute a easy script at every boot of the phone so basically I've placed the script in the folder /sbin/.magisk/img/.core/service.d/doze.disable.sh I've tried also putting it in...
forum.xda-developers.com
but i found these interesting commands + module:
Universal GMS Doze - Magisk
Systemlessly prevent unnecessary GMS running in the background, optimized and adjusted with additional modified services.
themagisk.com
Click to expand...
Click to collapse
Hm, that module actually looks like it limits some apps in the background, which is what exactly triggers this issue. Basically whenever the OS tries to limit network for some apps, it's bugged due to the kernel and instead of limiting it only for some apps it limits it on all apps and it happens on Doze, battery saver and restrictive network mode. About trying to run it as boot script, i haven't tried, but yeah it probably needs to be ran once the OS is fully booted.
SuperLolMine said:
Hm, that module actually looks like it limits some apps in the background, which is what exactly triggers this issue. Basically whenever the OS tries to limit network for some apps, it's bugged due to the kernel and instead of limiting it only for some apps it limits it on all apps and it happens on Doze, battery saver and restrictive network mode. About trying to run it as boot script, i haven't tried, but yeah it probably needs to be ran once the OS is fully booted.
Click to expand...
Click to collapse
i mean that command under "Troubleshooting"
lurchiii said:
i mean that command under "Troubleshooting"
Click to expand...
Click to collapse
Oh yeah, that still controls doze, but basically the issue with BPF bug is that the OS can't restrict network for only some apps because then all apps lose network connectivity. I'm not sure if adding an app to the Doze whitelist may work, and even if it did you'd have to do it for every app you want notifications for. At least adding to the whitelist is permanent instead of the disable command which is temporary, but i'm not sure it will work, i think the best thing for now is trying to find a way to run the command at boot or at least from the phone itself without needing a computer.
Thanks for the idea though, sadly i can't test the whitelist right now as i'm back on MIUI (probably going back to PE soon)
SuperLolMine said:
Oh yeah, that still controls doze, but basically the issue with BPF bug is that the OS can't restrict network for only some apps because then all apps lose network connectivity. I'm not sure if adding an app to the Doze whitelist may work, and even if it did you'd have to do it for every app you want notifications for. At least adding to the whitelist is permanent instead of the disable command which is temporary, but i'm not sure it will work, i think the best thing for now is trying to find a way to run the command at boot or at least from the phone itself without needing a computer.
Thanks for the idea though, sadly i can't test the whitelist right now as i'm back on MIUI (probably going back to PE soon)
Click to expand...
Click to collapse
to run the command without PC and without repeatedly typing it, i use Script Manager:
Script Manager | F-Droid - Free and Open Source Android App Repository
An application to manage shell scripts!
f-droid.org
Add a new Script and type:
#!/system/bin/sh
dumpsys deviceidle disable
Hit save and apply.. done
lurchiii said:
to run the command without PC and without repeatedly typing it, i use Script Manager:
Script Manager | F-Droid - Free and Open Source Android App Repository
An application to manage shell scripts!
f-droid.org
Add a new Script and type:
#!/system/bin/sh
dumpsys deviceidle disable
Hit save and apply.. done
Click to expand...
Click to collapse
Oh, i didn't know about this application, thank you! I usually had to use a pc when i reboot my phone for whatever reason so it's nice to at least be able to do it from the phone. I wonder if a boot script can be made with maybe another app that runs a little bit after startup
i tried with :"sleep xx" but it wont help.