yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] DiamondJohn:
Disable doze?? None!

Technique(s) I use, as I am running the most aggressive one, if I need it to stay "awake" while the device is unattended (ie in practice, the screen turns off) , is to Turn the Caffeine feature of my ROM on and the screen brightness to the lowest. The other technique I use is to set the screen timeout to the highest (ie 30m on my device) and then manually turn the screen off. This means it will only go into doze when I manually turn the screen off. The other option is to keep the phone plugged into a charger.

To actually effectively disable doze, then you need to create your own parameters/profile to suit. ie increase all the timeout parameter's (ending with "_to" to a huge value.
[Android Apps and Games] rodken:
Would you agree that in combination with "dumpsys deviceidle disable", setting idle_to and max_idle_to to 1 sec along with any associated scaling factors to 1 would 'do away with doze'?
[Android Apps and Games] LuckyStrike1695:
Ok, thank you for answering anyway. Sadly that's what I tried : owner can detach and it works, secondary can try, but it doesn't work.

Will keep looking for a solution.
[Android Apps and Games] DiamondJohn:
Logically the dumpsys deviceidle disable would disable device idle. But I do not know if it blocks ALL levels (deep & light) idle; maybe just deep IDK. I have a VERY vague memory of a similar command to disable specific states of idle; but that doesn't really make sense now, as I write it.:unsure:

The thing I would do, is use the dbcc command you found, turn the screen off and then after a few hours, run the graph which will basically tell/confirm to you if it's working.
[Android Apps and Games] DiamondJohn:
If you would like some more help:

When you disable on the the first account, run the method and save results

Run the check detach method, save the results

Switch to the second account

Run the check detach method, save the results

When you disable on the the second account, run the method and save results

Run the check detach method, save the results

zip up these 5 files

PM me a web location I can download the results from

NB: DO NOT USE SCREENSHOTS! I put debug info in hidden places within the html files.

No guarantees, but I may find the time, and it nay be a simple fix that would help others. It may even highlight a weakness in detaching for single accounts. ie everyone else. which of course, includes ME!
[Android Apps and Games] LuckyStrike1695:
Done. Will PM you the link.

It says ”pass” on both accounts but on the secondary one, the package keeps appearing in Google play.

Thanks !!
[Android Apps and Games] DiamondJohn:
Focus on the second part of the response.

===Initial thoughts =======================================================================

When you say "keeps appearing in Google play" in the secondary account, are you specifically talking about the LIST of installed apps? or when you search for youtube?

So, the primary account works as expected, if the secondary account gets the update, does that mean the primary account also gets the updated APK version?

I have a memory of seeing the account name for each app registration, and so, i just ignored it, thinking that both cases/accounts would be handled by the same detach components. Its all logical reverse engineering, and guess work and trial and error of the black box, that is the playstore.

===2nd thoughts =======================================================================

Forget about the above, I thought I lost the above response by accidentally closing the web browser, and when I first checked, it didn't re-appear, But now it has. This extra time actually may of given me an opportunity to derive a possible explanation of what is happening.

The overriding principal is, you cannot detach something that is not attached

I ignore the account name, relying on the assumption, if you detach something, it will detach for both accounts

However, if it is only attached on one account, I assume that what I am seeing is for your current logged in account, but it may actually be the other account its seeing the detachment for. And so the test thinks and reports it all looks good.

So my test only shows that there IS a detachment, but it is blind to the possibly that it is for the other account

So, if one of the accounts is attached, and the other isn't, TeMeFI goes happily and oblivious to the fact, there should be two attachments, and thus only detaches for the one account., which could be the other account.

My next suggestion to try is:

Go into the primary account

Remove all detach artifacts. You only appear to have youtube detached, so it shouldn't be too onerous to recreate / detach the one app. I have 10.

Search for youtube in the playstrore, then click the update button, but STOP / cancel it before it finishes "installing". This step ensures there is an attachment for this primary account

Detach YouTube in this primary account

Switch to the second account

Search for youtube in the playstrore, then click the update button, but STOP / cancel it before it completes "installing". This step ensures there is an attachment for this second account

Detach YouTube in this second account

If the above doesn't work, I'll create some scripts which may possibly let me better understand what is going wrong. The script will be able to be dropped into the /sdcard/TeMeFi/scripts/ path and then run from within TeMeFi.

And thanks for your time and efforts.(y)
[Android Apps and Games] LuckyStrike1695:
Thank you for taking the time to look into it.

About 1st thoughts :

By "keeps appearing in GP" I meant in app list and, more annoying, in available update list.

As I understood from previous researches, when different users use the same app, they use the same space, android is just giving access to the app to any additional user that installs it afterwards.

>> As so, when any secondary user updates the app, it's updated for all.

If any user deletes it, it just looses access to it. The app is only really deleted when the last user deletes it.

For instance, package manager uses --user <UID> to operate (eg. pm enable <package> --user 11 enables <package> for user 11).

All that to say that yeah, even if package location is the same for all users, every users has its own access/config/data/whatever and also its own attachment.

About 2nd thoughts :

Yup, that could be it. We’ll try to experiment and report between patients tonight : the joy of being on call at the hospital -_-.

Edit : small issue, when hitting ”update”, I can cancel while it’s downloading but as soon as it reaches ”installing” I can't cancel anymore. So I can't cancel ”before it finishes installing”, only ”before it finishes downloading”.
[Android Apps and Games] DiamondJohn:
That technique is not a Google approved recommendation, just something I abused when I dev'ed and tested detaching. It was an easy way I found to correct and reattach when I borked it a little too far, or wanted to re-run it from a clean slate. So, I haven't personally used it for a few years now, so maybe stopping it during the download is all that is needed. Others have said it worked for them, so they would of probably encountered the same; or I just said during the download back then.

edit: It was late last night, I thought I only sent this in your PM, but was thinking about also posting in this thread, I must of fluffed up, but hope I did cleanse your PM... which also explains why I thought I lost it when I went to my PM's but then found it in another window, which I didn't realise was for the thread for the thread.
[Android Apps and Games] rodken:
Google Play service will periodically reset device_idle_constants, and the general idea would require an ADB command to prevent Play Services from resetting everything back to default. What say you?

$ adb shell "su -c 'pm disable --user 0 com.google.android.gms/.phenotype.service.sync.PhenotypeConfigurator'"
[Android Apps and Games] LuckyStrike1695:
Update :

Had a few minutes to experiment. Detach from main account still works as expected. But I tried to "reattach" from secondary account (cancelling while downloading) then detach and it still fails (update still appearing in play store on secondary account). I even tried to update package from secondary account (to be sure to reattach for good) :

- check fails afterwards (check 9.0)

- detach fails (appear to succeed but app is still listed in play store "installed app")

So no matter what, any detach from secondary account fails (silently).

And detach from main account (UID 0) succeed (but is ruined by other account's auto-update).
[Android Apps and Games] rodken:
Increasing timeout parameters to a huge value [2952000000] seems to do the trick along with

-- pm disable --user 0 com.google.android.gms/.phenotype.service.sync.PhenotypeConfigurator
[Android Apps and Games] DiamondJohn:
In my experience, the PlayStore does not reset doze, it may simply hold a wakelock.

EDIT: what I *have* seen is that in my custom ROM (not in stock Pixel), it has many battery saving techniques, and at least one of them mess with selected doze attributes. Never had any ROM do this before. I went 1-2 years on stock, and the Doze settings stuck, and obviously I used the PlayStore. But, its all a black box,.

However, there is the disable idle method (I think you found, which I have avoided), and also a Force idle method, which I recently tried, and that worked better than I expected. Normally when on the charger, doze is disabled, and the phone is in full wake. I think my battery is dying, so I was doing a lot of messin with stuff, and set the force idle to on, and when I came back to my phone, checked the idle history, the phone was in deep idle while it was charging. No scientific method, just a feeling, but it may of actually charged faster than normal. I prefer to use an old slow charger charger, to protect the battery. I think it was a one off placebo effect.
[Android Apps and Games] DiamondJohn:
Ok, I'll send you a script or maybe a couple of TeMeFI "Favourites" (they are shareable between devices, and its what I do whenever I change / upgrade phones). But probably not for a few days.

The worst case is that they took a shortcut and are treating the second account differently. "A little bit of this and a little bit of that"; inconsistent shortcut.

I haven't checked it, but it *may* be easy to make the detach, account aware (possibly even detach both accounts from the one account). I haven't looked deeper, and when I first did it, I saw the apps were account specific, but I only had a single account when I created it.
[Android Apps and Games] DiamondJohn:
As I said above, there is a method to specifically target & disable doze.

A few years back I created a small APP/service, that ran shell scripts triggered/mapped off of intents. The original plan was to call a script to put the phone into a very low power state whenever the intent for screen off was received, and the opposite for screen on. But, I never used it in anger. I have not had another use for it, and I think it may of been created before Doze was in Android. But there are literally 000's of public intents.
[Android Apps and Games] DiamondJohn:
@rodken After I walked away from the keyboard, I remembered another reason I dont *think* the PlayStore mods the doze settings (in addition to never seeing it myself). It does not have to, because it is whitelisted from doze. Search the menu in TeMeFI for "whitelist" and it should come up.
[Android Apps and Games] aringler:
Unfortunately the list of apps while trying to detach an app is empty. Tried reinstalling, updating to the newest version of TeMeFi.. But nothing worked so far. Anybody who can help me?
[Android Apps and Games] DiamondJohn:
The list of apps is not Generated by TeMeFI. It is explicitly Extracted from your PlayStore data by TeMeFI. So my first first guess would be that there is something not quite correct with your PlayStore data. Had you recently cleared your PlayStore data? or just created or changed/switched or just logged into the account on that device? ie not given the PlayStore enough time to generate its internal list (from which I present your list of apps from.

And please, use thumbnails (you can edit your post and correct it).

Also, have you checked your SQLite installation? I would suggest to use the internal one provided within in TeMeFI. I have seen some dodgy old ones distributed in ROMs.
[Android Apps and Games] rodken:
Maybe, we are talking apples and oranges.

-- I was referring to the fact if Google Play Services [not Google Play Store] has a tendency to reset device_idle_constants after rebooting.
[Android Apps and Games] DiamondJohn:
Because I have not had my Doze reset (except read below) on my phones daily, I don't think its a thing. Including on my Pixel 4a running stock ROMs for almost 2 years. That google phone should of been pretty close to ASOP and of course running the latest Play Services. If anything, I think google would of been over-reaching in their treatment of "their devices".:poop:

The exception to the above, is that a few months ago I switched to a heavily modified custom ROM (Bliss A11) which has MANY battery optimisation's. One of the things it appears to do in its optimisation's, is reset my doze settings, which blows away my custom doze. ie its not the play services but the ROM. The more I think of play services modding doze (beyond a wake-lock or whitelisting) on a device., the more it sounds like an overreach.

EDIT: PS its not just Vending that is whitelisted.
[Android Apps and Games] KitsuneFoxy:
Anything I do i get this error. I m rooted and on marshmallow 6.0.1. with magisk. nothing is being actually denied to it writing or reading. But then it crashes. I can't upload any logs because it gives the same error.
[Android Apps and Games] DiamondJohn:
Connect to the phone via ADB (or you could do it in a rooted terminal on the device)

adb connect ?????
adb shell

run the following in the shell

su;

echo "1" > /sdcard/TeMeFI/.config/LOG_INF_ON;
echo "1" > /sdcard/TeMeFI/.config/LOG_WRN_ON;
echo "1" > /sdcard/TeMeFI/.config/LOG_TRC_ON;
echo "1" > /sdcard/TeMeFI/.config/LOG_DBG_ON;

logcat -c;
am start -n diamondjohndroid.utility.temefi/.main

From what you are saying, This should start temefi, and trigger the error

Go to the UI and click "NO"

In the adb shell, run the following

logcat -d > /sdcard/$(date +"%Y%m%d%H%M%S")_logcat.log; logcat -c;

rm /sdcard/TeMeFI/.config/LOG_INF_ON;
rm /sdcard/TeMeFI/.config/LOG_WRN_ON;
rm /sdcard/TeMeFI/.config/LOG_TRC_ON;
rm /sdcard/TeMeFI/.config/LOG_DBG_ON;

Copy and zip up the file /sdcard/202210DDMMHHSS_logcat.log and post it to me as an attachment in a PM to me.

It may also help to get the output from:

ls -l /data/user/0/diamondjohndroid.utility.temefi/cache/* > /sdcard/$(date +"%Y%m%d%H%M%S")_cachecontents.log
[Android Apps and Games] DiamondJohn:
And anyone else interested in blocking sensors during doze, I just randomly came across the following, but have not tested it myself.

dumpsys sensorservice restrict <SENSOR_WHITELIST_PACKAGE>;
dumpsys sensorservice enable;

Seems a mismatch, that you disable by a single package, but then re-enable all.

Info on sernsor service from TeMeFI Current State>Dumpsys>sensorservice which I *think* calls dumpsys sensorservice;

also a little more left field (ie no doc / or didnt take any time to check)

dumpsys sensorservice data_injection <PACKAGE_ID>;

I Have NO IDEA what data_inject does, possibly as a guess, trigger the sensor via code/shell IDK.
[Android Apps and Games] DiamondJohn:
Something I accidently came across recently further regarding "sensors". I am testing the next release by running as many methods as possible.

Under the Battery History Extras Graphs, it will actually plot "sensors". I am guessing its a flag showing something was triggered.
[Android Apps and Games] ogmexicanfoo:
Hi, I installed the latest APK (as of 10/30/22). When the app was first installed I was able to find the menu to detach apps, as well as other options on the main menu. I detached Youtube and Youtube Music, restarted and it worked. Problem is that now when I launch the app I can't find nothing related to detaching, or any of the previous options shown on the main menu. After looking around XDA, Google and in the app itself I can't find why the options went away. The app doesn't even mention anything about it. I'm running Oxygen OS based off Android 12 on a One Plus 8 Pro with the latest Magisk (as of 10/30/22). Busybox and Toybox is installed via Magisk, LSposed running too but I believe it is unrelated. Thanks!
[Android Apps and Games] DiamondJohn:
The only check I do to show or hide that menu item, is a root check. Check that the app still has root and its being logged as being granted root. You should see a toast telling you it was granted root.
[Android Apps and Games] DiamondJohn:
the "latest magisk" is NOT stable Magisk,
[Android Apps and Games] thunderteaser:
I am getting a similar crash whenever it tries to build a menu. This started happening after upgrading to Magisk v25 from v23. I have followed your instruction on collecting some logs, so I'm sending those to you if you don't mind having a look.
[Android Apps and Games] DiamondJohn:
I ONLY build & test against STABLE Magisk. As soon YOU install BETAS of anything, especially something as core as your root, YOU accept that you are running software that by definition has bugs, which could break other or even all your root apps.

A few years ago I had a similar issue with people wanting me to "fix" TeMeFI as it wasnt working against the latest Beta at that time. I gave the same response back then, and a few days later, a new Beta was released, that fixed the bug in Magisk.

Wait a sec, you "upgraded" from v25 to v23? isnt that a downgrade? I am running 25.2. To be honest, I haven't checked if that is still the latest stable for a while.

I also note the Bomb icon in the top right, of your screenshot. have you check what that error is? NO error should be reported without checking that first. And please, do not attach it as a screenshot. It may give a better idea of what has actually gone wrong.

PS: please use thumbnails when including screenshots in this thread. You can edit your post to switch it back.
[Android Apps and Games] thunderteaser:
Yes, I'm running the latest stable Magisk release, which is v25.2.

Nope, I said "to v25 from v23", it means it was working fine with v23, but as soon as I upgraded to v25.2 I had this weird exception.

That bomb icon just reloads the top navbar buttons. It appeared as I took that screenshot but can't seem to make it appear any longer. I just get the DataSourceFD exception

Sorry, I posted from my phone, fixed that.

By the way, I'm not expecting you to look into anything. I just politely asked if you minded having a look at my logs to tell me what's going on. If you don't have time or don't want to, I fully understand and thank you anyways for answering me back. I have this weird feeling that it's actually my phone itself telling me to please just let it die as it is behaving rather strangely from a month or so. It might not be TeMeFi nor Magisk at all, it's what i'm saying.

BTW it's a Redmi Note 7 (lavender) running on a stock ROM based on Android 9.
[Android Apps and Games] DiamondJohn:
Sorry, my bad, just saw the ver change on second reading, without seeing it was "from" and assumed X TO Y :whistle:

No it should not, unless you have another issue as well. The bomb icon shows the details of the last error and or warnings encountered within a TeMeFI script (which includes filling the menu items). ie it may actually be the details to help to determine your specific issue. A click displays the error; which can be saved off and attached to this thread. ie not a screenshot. A long press clears the warning / error. as the error stays until. a new error/warning is encountered.

I have TeMeFI running both A8 and A11. Its good to report errors/issues. It just would be easier with the correct logs to help both of us.

Without any further details, try running each of the following in a non-rooted terminal shell or over ADB.

su -c 'ls /data/data 2>/dev/null';

su -c busybox --list 2>/dev/null;

su -c 'ls /data/user_de/0/com.topjohnwu.magisk/databases/sulogs.db 2>/dev/null

PS: Thanks for switching the image (y)
[Android Apps and Games] thunderteaser:
That's too bad I couldn't get any more info. Any animation basically triggers another error and I have to tap "Yes" all the time, so I can barely navigate the app. I can click on a menu and go down a level, but then it says "please wait until the menu finishes building" on anything I try to access.

I attached these logs to the post.

This outputs 1.

EDIT: I just remembered I hid magisk app, so changed the path to reflect the hidden package name and it outputs the path to sulogs.db. Is this to be expected? If you meant to let me collect Magisk logs I could find another way

Oh, and thanks for helping, I do really appreciate it. :)
[Android Apps and Games] DiamondJohn:
A "backdoor" method, while the message is still displayed in TeMeFI and then again after clicking the OK button is to run the following in a rooted terminal shell:

cat /data/data/diamondjohndroid.utility.temefi/cache/TeMeFI_error.log" > /sdcard/$(date +"%Y%m%d%H%M%S")_temefierrorlog.log;

but probably best to clear it before running the above. ie: rm /data/data/diamondjohndroid.utility.temefi/cache/TeMeFI_error.log;

This will create a copy of the file in the root of your SDCard.

Also, in a rooted shell,

logcat -d > /sdcard/$(date +"%Y%m%d%H%M%S")_logcat.log;

Are you telling me you had NO output from the third command? On review, I should of excluded the "2>/dev/null" 😩
[Android Apps and Games] thunderteaser:
I had no relevant output from the third command, but I can browse that file with a SQLite browser and see a bunch of logs related to temefi which are basically the three commands you posted before. I am sending a magisk log and my logcat (which I also sent you via DM yesterday) hoping there's something useful in it. As for the temefi logs you just asked me to collect... I get a no such file or directory! It seems temefi can't write that file as it didn't have permissions? I'm just guessing.

Thank you so much for helping, but0Please don't try too hard on this as I am getting more and more certain my phone is just dying on me. Probably emmc or cpu

EDIT: I found what's going on!!! Along with Magisk, I also updated some modules. Among them was busybox 1.34.1. I reverted it back to the version I was using before upgrading, which is 1.31.1 and it works! Thanks for giving me an insight, please keep up the good work!!! Peace
[Android Apps and Games] DiamondJohn:
So it works, right (stating the obvious...) ;)

I too am using Busybox by @osm0sis v1.31.1

A few days ago, I downloaded what I think is a new stable build, but have yet to install it.

But, to be honest, that should not affect the third test, which is explicitly testing for Magisk o_O 👀 Are you certain you are finding the dB in the exact location I specify?
[Android Apps and Games] DiamondJohn:
almost forgot, with out the extra details you supplied, and solved for yourself, the following lines caught my interest in your logcast.

12-04 14:38:56.825 16518 16518 I WebViewFactory: Loading com.android.chrome version 107.0.5304.141 (code 530414123)
12-04 14:38:56.831 16518 16518 W linker : Warning: "/data/app/com.android.chrome-dOT4y93ocKzjPsnTcpSAvg==/lib/arm64/libmonochrome.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
12-04 14:38:56.884 16518 16518 I .utility.temef: Rejecting re-init on previously-failed class java.lang.Class<rh2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/PacProcessor;

The above implies that the issue is with your web-view. But obviously not. Which version are you runing?