how to auto override force dark mode in android Q - Off-topic

In AOSP based android Q roms, there is a force dark option in developer settings whoich makes almost all apps to be appreaded in dark mode.
This option gets unselected after reboot.
One has to enable it after every reboot.
However it's possible to enable it by default after reboot.
For rooted phone.
Just add the following line in your build.prop file
debug.hwui.force_dark=true
Thats all.
It's working in my phone. Tested.
For unrooted Phone
execute the following line after reboot
setprop debug.hwui.force_dark true
To make it auto after reboot use tasker or script manager app or smthing similer.
Check the space after setprop and dark.
Hit a thanks to me if you are benifited.

Screenshots.??

Screenshot

Hmmmm.
Screenshot for many apps.?
Thanks

LoveFootJob said:
Hmmmm.
Screenshot for many apps.?
Thanks
Click to expand...
Click to collapse
look at your back....its there already

[email protected] said:
For unrooted Phone
execute the following line after reboot
setprop debug.hwui.force_dark true
To make it auto after reboot use tasker or script manager app or smthing similer.
Check the space after setprop and dark.
Click to expand...
Click to collapse
Hi
How did you manage that?
As far as I know, setprop needs root or it won't work unless it's done via adb on a computer
Sent from my SM-N976B using XDA Labs

paolo200 said:
Hi
How did you manage that?
As far as I know, setprop needs root or it won't work unless it's done via adb on a computer
Click to expand...
Click to collapse
No...it will work...
Just auto execute it after every reboot thru tasker

[email protected] said:
No...it will work...
Just auto execute it after every reboot thru tasker
Click to expand...
Click to collapse
Ok. Thanks.
May I ask what is the action to use within tasker?
Sent from my SM-N976B using XDA Labs

davidking2893 said:
First, turn off regular dark mode (if enabled) and reboot your cell phone. Then, toggle the override-dark-mode option in developer settings and restart the settings app. This will force all apps into the override-dark-mode color scheme. Thats' it.
Click to expand...
Click to collapse
Question is how to do it auto after reboot

[email protected] said:
For unrooted Phone
execute the following line after reboot
setprop debug.hwui.force_dark true
To make it auto after reboot use tasker or script manager app or smthing similer.
Check the space after setprop and dark.
Hit a thanks to me if you are benifited.
Click to expand...
Click to collapse
I don't get you. Can you give a detailed tutorial?

Not working
Im on a non-rooted Galaxy S10e [Android 10, OneUI 2.0]. If I run the command with tasker, it gives me the following message ("Ausführen" is german and means "execute", "Fehler" means "error"):
05.06.39/E Shell Ausführen: ->
05.06.39/E Shell Ausführen: ->
05.06.39/E Shell Ausführen: ->
05.06.39/Shell runBackground setprop debug.hwui.force_dark true root: false timeout: -1
05.06.39/Shell start process-thread ID 672
05.06.39/E add wait type Shell1 time 2147483647
05.06.39/E add wait type Shell1 done
05.06.39/E add wait task
05.06.39/E Fehler: 1
If I do it with the app "Android Terminal Emulator" it gives me the following error:
:/ $ setprop debug.hwui.force_dark true
setprop: failed to set property 'debug.hwui.force_dark' to 'true'
Either way, it doesnt work for me. Does anybody know what could be the issue here? Ive also tried setting it to "1" instead of "true", same result. Setting the real setting to enabled or disabled doesnt matter either.

RnKn98 said:
Im on a non-rooted Galaxy S10e [Android 10, OneUI 2.0]. If I run the command with tasker, it gives me the following message ("Ausführen" is german and means "execute", "Fehler" means "error"):
05.06.39/E Shell Ausführen: ->
05.06.39/E Shell Ausführen: ->
05.06.39/E Shell Ausführen: ->
05.06.39/Shell runBackground setprop debug.hwui.force_dark true root: false timeout: -1
05.06.39/Shell start process-thread ID 672
05.06.39/E add wait type Shell1 time 2147483647
05.06.39/E add wait type Shell1 done
05.06.39/E add wait task
05.06.39/E Fehler: 1
If I do it with the app "Android Terminal Emulator" it gives me the following error:
:/ $ setprop debug.hwui.force_dark true
setprop: failed to set property 'debug.hwui.force_dark' to 'true'
Either way, it doesnt work for me. Does anybody know what could be the issue here? Ive also tried setting it to "1" instead of "true", same result. Setting the real setting to enabled or disabled doesnt matter either.
Click to expand...
Click to collapse
In Samsung phone setprop command is diff i guess... Google it for command.

[email protected] said:
In Samsung phone setprop command is diff i guess... Google it for command.
Click to expand...
Click to collapse
Do you have proof it's working for non root??

[email protected] said:
In Samsung phone setprop command is diff i guess... Google it for command.
Click to expand...
Click to collapse
First thanks for the answer , but...
I dont think its different. The getprop command (getprop debug.hwui.force_dark) works fine, gives me true if its turned on.
If i do the setprop command over adb (adb shell setprop debug.hwui.force_dark true) it also works fine.
The only thing not working is the setprop command executed directly on my device. Which lets me conclude that i probably need root?

RnKn98 said:
First thanks for the answer , but...
I dont think its different. The getprop command (getprop debug.hwui.force_dark) works fine, gives me true if its turned on.
If i do the setprop command over adb (adb shell setprop debug.hwui.force_dark true) it also works fine.
The only thing not working is the setprop command executed directly on my device. Which lets me conclude that i probably need root?
Click to expand...
Click to collapse
No... Its working in non rooted device... Tested.
There may be one more thing... Shell need to have write secure settings permission. Its permission issue.

[email protected] said:
In AOSP based android Q roms, there is a force dark option in developer settings whoich makes almost all apps to be appreaded in dark mode.
This option gets unselected after reboot.
One has to enable it after every reboot.
However it's possible to enable it by default after reboot.
For rooted phone.
Just add the following line in your build.prop file
debug.hwui.force_dark=1
Thats all.
It's working in my phone. Tested.
Hit a thanks to me if you are benifited.
Click to expand...
Click to collapse
Hello,
Thank you so much for your solution that works very well on my rooted phone :good:
1) I would like to know how to totally disable this feature if I no longer want the override force-dark someday please ?
2) Actually, how to force the rest of the remaining white applications to become black please ?
Thank you in advance for your help.
Cordially

MobAndro said:
Hello,
Thank you so much for your solution that works very well on my rooted phone :good:
1) I would like to know how to totally disable this feature if I no longer want the override force-dark someday please ?
2) Actually, how to force the rest of the remaining white applications to become black please ?
Thank you in advance for your help.
Cordially
Click to expand...
Click to collapse
Just switch off dark theme... Force dark need not to be changed. Add dark theme icon in qs header

[email protected] said:
Just switch off dark theme... Force dark need not to be changed. Add dark theme icon in qs header
Click to expand...
Click to collapse
Hello,
I've been using the dark mode since I bought my S10.
I discovered the override force-dark a few days ago then I realized that after the reboot this option was disabled on its own and every time.
I did some research to have it automatically and I came across your tuto that worked very well for me. Only some applications had problems with the override force-dark.
Since yesterday, I don't know why now the override force-dark disables itself. When I turn it on, it immediately turns off itself without even restarting.
I don't understand what's going on because this option was automatically activated after each reboot.
I didn't again even touch the build.prop either...

MobAndro said:
Hello,
I've been using the dark mode since I bought my S10.
I discovered the override force-dark a few days ago then I realized that after the reboot this option was disabled on its own and every time.
I did some research to have it automatically and I came across your tuto that worked very well for me. Only some applications had problems with the override force-dark.
Since yesterday, I don't know why now the override force-dark disables itself. When I turn it on, it immediately turns off itself without even restarting.
I don't understand what's going on because this option was automatically activated after each reboot.
I didn't again even touch the build.prop either...
Click to expand...
Click to collapse
It's tough to tell the problem from here. U hv to find it.

[email protected] said:
It's tough to tell the problem from here. U hv to find it.
Click to expand...
Click to collapse
Do you think that I can delete this line "debug.hwui.force_dark=1" and put it back in the build.prop again after reboot please ?
Because it's the first time that I've modified this system file so I'm not used to manipulating it...
Thank you in advance for your answer.

Related

Launcher(any) lag fix

As mentioned here and here:
adding "echo ro.HOME_APP_ADJ=1" to /data/local.prop fixes the launcher redraw lag.
Documentation:
http://code.google.com/p/sipdroid/wiki/FAQ
Due to limited memory home screen often takes several seconds to load. Luckily these phones allow root access. Issue the command "echo ro.HOME_APP_ADJ=1 >/data/local.prop" and reboot, to lock home screen in memory.
Click to expand...
Click to collapse
update:
it does seem to made a difference
Here are the commands: (batch file to do this here,post#5)
Code:
adb remount
adb pull /system/build.prop .
edit build.prop with a decent text editor and add these two lines a the end
#fix for screen redraw lag
ro.HOME_APP_ADJ=1
Click to expand...
Click to collapse
Code:
adb push build.prop /system/
adb reboot
you could try
Code:
adb shell stop
adb shell setprop ro.HOME_APP_ADJ=1
adb shell start
if it works you just have to add ro.HOME_APP_ADJ=1 to build.prop.
g4rb4g3 said:
you could try
Code:
adb shell stop
adb shell setprop ro.HOME_APP_ADJ=1
adb shell start
if it works you just have to add ro.HOME_APP_ADJ=1 to build.prop.
Click to expand...
Click to collapse
tried:
Code:
adb shell stop
adb shell setprop ro.HOME_APP_ADJ 1
adb shell start
My phone hot rebooted after the last command.
After it rebooted I ran
Code:
C:\Users\meeee>adb shell getprop ro.HOME_APP_ADJ
4
Since its 4. I guess it did not stick.
Also tried setting it and immediately reading it, did not stick.
Code:
C:\Users\meeee>adb shell setprop ro.HOME_APP_ADJ 1
C:\Users\meeee>adb shell getprop ro.HOME_APP_ADJ
4
The setting stuck after putting it in build.prop, time to check if it made any difference...
Code:
C:\Users\meeee\Desktop>adb shell getprop ro.HOME_APP_ADJ
1
Don't reboot, try the commands and watch out if your problem got fixed. If it works like that you can add the line to build.prop.
g4rb4g3 said:
Don't reboot, try the commands and watch out if your problem got fixed. If it works like that you can add the line to build.prop.
Click to expand...
Click to collapse
It did it on its own.
seems to be working, updated op with the commands.
britoso said:
seems to be working, updated op with the commands.
Click to expand...
Click to collapse
Added this cmd to build.prop but see no changes... what lags you talking about btw?
For me my home screens were sluggish. There was a delay when I tried to switch desktops.
I made a little bat.file, which adds those 2 lines to your build.prop.
- put "Launcher_lag_fix.bat" in ..Android/tools/
- doubleklick
- and wait till reboot.
rori~ said:
I made a little bat.file, which adds those 2 lines to your build.prop.
- put "Launcher_lag_fix.bat" in ..Android/tools/
- doubleklick
- and wait till reboot.
Click to expand...
Click to collapse
thanks rori.
No one has posted yet what the command actually does. All it does is tell Android to try to keep the launcher in memory.
Shouldn't affect anything like the scrolling or any response while actually using the launcher, but will fix some lag for when going back home from any other app, as it doesn't have to re-launch the launcher if it was kicked out of memory.
Various options like this exist in some launchers, and I think Cyanogenmod has this option in the settings too. They are not all the same as this command though, so this may work better for some people while the other ways to do it may work better for others.
Clarkster said:
No one has posted yet what the command actually does. All it does is tell Android to try to keep the launcher in memory.
Click to expand...
Click to collapse
As per this it locks the 'screen' in memory. (maybe they mean the screen buffer)
Due to limited memory home screen often takes several seconds to load. Luckily these phones allow root access. Issue the command "echo ro.HOME_APP_ADJ=1 >/data/local.prop" and reboot, to lock home screen in memory.
Click to expand...
Click to collapse
Makes sense as I always have had launcher locked in memory before this and was still having my home screen redraw very slowly when I switched to it.
A good find
Btw just for info there were issues in apps from pre release system dump of arc
However if u r using apps from the retail dump 'they don't lag'
Sent from my U20i using XDA App
rori~ said:
I made a little bat.file, which adds those 2 lines to your build.prop.
- put "Launcher_lag_fix.bat" in ..Android/tools/
- doubleklick
- and wait till reboot.
Click to expand...
Click to collapse
can you specify where is the android/tools mentioned, can it be found in all android phones?
Btw, I have seen ">>" and ">" then "space" /data/local.prop in other websites, while in the sipdroid article, it is exactly
"echo ro.HOME_APP_ADJ=1 >/data/local.prop".
otivaeey said:
can you specify where is the android/tools mentioned, can it be found in all android phones?
Btw, I have seen ">>" and ">" then "space" /data/local.prop in other websites, while in the sipdroid article, it is exactly
"echo ro.HOME_APP_ADJ=1 >/data/local.prop".
Click to expand...
Click to collapse
adb comes with the sdk, for my windows machine its at
C:\android-sdk-windows\platform-tools
in unix ">" sends text to a file (deletes whatever was there) and ">>" appends at the end of a file. If you're not familiar its easiest to just add the one line manually at the end of build.prop.
Hey y'all, wondering if anybody can help me with this:
I'm at work and don't have access to ADB. Can I use Root Explorer to copy the file to the sdcard, mount the card on a PC, edit it, and then use Root Explorer to copy it back again? Or will that cause issues with permissions or something?
EDIT: Well it's intellectual now, I nandroided back to my previous ROM due to some other issues. I'd still like to know though.
Ya the root explorer thing should work but just to be safe I would nandroid first cause worst case scenario your phone freezes you pull battery boot into recovery restore nandroid. But seriously I don't think it will be a problem.
Just out of curiosity I wanted to see if I could do this without a computer at all and turns out all you really need to do is download estrong (or any other root explorer), turn root explorer option on, mount /system and go and edit build.prop through the the built in note editor in estrong. So that might be an alternate solution for you kippswanson.

[GUIDE] How to enable Chromecast Mirroring on Lollipop for the N7 2012

So this doesn't work outright on the new Lollipop build for the N7, but it can easily be made to work. Unfortunately the MirrorEnabler app doesn't work on Lollipop yet, and the SQLite Installer app that would make it work hasn't caught up; it installs a non-executable binary that even when set with the correct permissions doesn't run. Credit goes to @r3pwn for finding the initial method for doing this.
UPDATE: MirrorEnabler had been updated for 5.0, and i've seen reports it works now. You can try it Here. Don't forget to thank @r3pwn if it works for you! Otherwise, this method still works, so take your pick. [emoji2]
UPDATE 2: The update of the crhomecast app supposedly supports this natively now on ALL devices, so this may not even be needed anymore. If someone who has not applied this fix can test that out (Has to be chromcast v 1.9.6 or higher) and report back in this thread, that'd be great.
So because I wanted my screen mirroring back, I dove in and made it work. Yes, there are 20 steps, but they are all outlined precisely. If done correctly this shouldn't take more than 5 minutes.
Here's how:
1) Be rooted on Android 5.0 (L)
2) Install chromecast app from play store - Link
3) Open the chromecast app and set up your chromecast device
4) Install busybox (I prefer sterricson version) - Link
5) Open Busybox app and click Install.
6) Install SQLite Editor (not free, but works great on L and worth the money if you like to tinker) - Link
7) get adb shell and issue the commands:
Code:
[email protected]:/ $ su
[email protected]:/ # setenforce 0
[email protected]:/ # getenforce
Permissive
[email protected]:/ #
DO NOT EXIT ADB YET!
8) Open SQLite Editor on your device and navigate to "Google Services Framework"
9) Under google services Framework, select "gservices.db"
10) In gservices.db select "overrides"
11) Click "+ NEW RECORD"
12) In the name field put (exactly as shown):
Code:
gms:cast:mirroring_enabled
13) In the value field put (exactly as shown):
Code:
true
14) Click Save
15) Click "+ NEW RECORD" again
16) In the name field put (exactly as shown):
Code:
gms:cast:remote_display_enabled
17) In the value field put (exactly as shown):
Code:
true
18) Click Save
19) Exit SQLite Editor
20) In your adb shell ( you didn't close it, right? ):
Code:
[email protected]:/ # am force-stop com.google.android.gsf
[email protected]:/ # am force-stop com.google.android.gms
[email protected]:/ # am force-stop com.google.android.apps.chromecast.app
[email protected]:/ #
If it worked you won't see any output from these three commands; You can now exit adb and disconnect your device.
If you see this:
Code:
Error type 2
android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:298)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:99)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:249)
You didn't do step 7 correctly. Repeat step 7 and then try this step again.
That's it! NO reboot required! You should now be able to stream screen mirror to a chromecast device from your N7(2012) using Lollipop!
To test it, you should now be able to use your quick settings "Cast Screen" button, or the "Cast Screen" option from within the chromecast app.
Enjoy!
Nice guide !
Gesendet von meinem GT-I9195 mit Tapatalk
Nice guide.
Can confirm after following this guide casting from settings pull down is indeed working on lollipop N7 2012!!
Cheers!
Its works great! thank you!
I think Mirror Enabler only set the first one row, and it is the reason it stopped working on this tablet
Unfortunately not working with panasonic ptv3000
does this hack survive a Google Services Framework update, and is there really need to install chromecast app?
thanks
m52 power! said:
Unfortunately not working with panasonic ptv3000
Click to expand...
Click to collapse
Never said it would.
Sent from my leanKernel 3.11.3 powered stock 4.4.2 (NF9) SM-N900T
donpippo said:
does this hack survive a Google Services Framework update, and is there really need to install chromecast app?
thanks
Click to expand...
Click to collapse
Theoretically yes. It's just a data change. Add for having to install the chromecast app, you can try without installing it but i do believe it's required.
Sent from my leanKernel 3.11.3 powered stock 4.4.2 (NF9) SM-N900T
Wow. Yep. Works with Chromecast.
not working on my N7 [emoji26]
Edit: tried again with success. I started from 0 again. thank you
I would like to annonce that this method worked perfectly in the Moto X 2014 (Lollipop)... the only problem is, when i restart the phone it stops working and i need to do the whole process again..... Any way to fix that?
Thank you
toastido said:
So this doesn't work outright on the new Lollipop build for the N7, but it can easily be made to work. Unfortunately the MirrorEnabler app doesn't work on Lollipop yet, and the SQLite Installer app that would make it work hasn't caught up; it installs a non-executable binary that even when set with the correct permissions doesn't run.
So because I wanted my screen mirroring back, I dove in and made it work. Yes, there are 20 steps, but they are all outlined precisely. If done correctly this shouldn't take more than 5 minutes.
Here's how:
1) Be rooted on Android 5.0 (L)
2) Install chromecast app from play store - Link
3) Open the chromecast app and set up your chromecast device
4) Install busybox (I prefer sterricson version) - Link
5) Open Busybox app and click Install.
6) Install SQLite Editor (not free, but works great on L and worth the money if you like to tinker) - Link
7) get adb shell and issue the commands:
Code:
[email protected]:/ $ su
[email protected]:/ # setenforce 0
[email protected]:/ # getenforce
Permissive
[email protected]:/ #
DO NOT EXIT ADB YET!
8) Open SQLite Editor on your device and navigate to "Google Services Framework"
9) Under google services Framework, select "gservices.db"
10) In gservices.db select "overrides"
11) Click "+ NEW RECORD"
12) In the name field put (exactly as shown):
Code:
gms:cast:mirroring_enabled
13) In the value field put (exactly as shown):
Code:
true
14) Click Save
15) Click "+ NEW RECORD" again
16) In the name field put (exactly as shown):
Code:
gms:cast:remote_display_enabled
17) In the value field put (exactly as shown):
Code:
true
18) Click Save
19) Exit SQLite Editor
20) In your adb shell ( you didn't close it, right? ):
Code:
[email protected]:/ # am force-stop com.google.android.gsf
[email protected]:/ # am force-stop com.google.android.gms
[email protected]:/ # am force-stop com.google.android.apps.chromecast.app
[email protected]:/ #
If it worked you won't see any output from these three commands; You can now exit adb and disconnect your device.
If you see this:
Code:
Error type 2
android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:298)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:99)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:249)
You didn't do step 7 correctly. Repeat step 7 and then try this step again.
That's it! NO reboot required! You should now be able to stream screen mirror to a chromecast device from your N7(2012) using Lollipop!
To test it, you should now be able to use your quick settings "Cast Screen" button, or the "Cast Screen" option from within the chromecast app.
Enjoy!
Click to expand...
Click to collapse
I would like to annonce that this method worked perfectly in the Moto X 2014 (Lollipop)... the only problem is, when i restart the phone it stops working and i need to do the whole process again..... Any way to fix that?
Thank you
Anyone have any idea if this is necessary on the newer ver2 N7 after OTA?
MLT2004 said:
Anyone have any idea if this is necessary on the newer ver2 N7 after OTA?
Click to expand...
Click to collapse
Not sure after OTA update, but my son's N7 (2013 / gen 2) needed zero mods to get screen casting to work. It worked fine after installing the google N7 image from https://developers.google.com/android/nexus/images
Sent from either Maguro or Grouper via XDA free
On step 9) Under google services Framework, select "gservices.db" i get the error
An error occurred while opening the database. attempt to write a readonly database (code 776) while compiling: select * from sqlite_master where type in('table','view') order by name
How can i solve this?
theone_s_me said:
I would like to annonce that this method worked perfectly in the Moto X 2014 (Lollipop)... the only problem is, when i restart the phone it stops working and i need to do the whole process again..... Any way to fix that?
Thank you
Click to expand...
Click to collapse
Unknown. Don't own that device. Only tested on the n7 2012.
boriznl said:
On step 9) Under google services Framework, select "gservices.db" i get the error
An error occurred while opening the database. attempt to write a readonly database (code 776) while compiling: select * from sqlite_master where type in('table','view') order by name
How can i solve this?
Click to expand...
Click to collapse
No idea. You are rooted, right? Might see if remounting /system in read/write mode would help. Also make sure you granted root privileges to sqlite editor if it asked.
Sent from my SM-T320 using Tapatalk
Creds? Or at least link to my source code that you took this from.
r3pwn said:
Creds? Or at least link to my source code that you took this from.
Click to expand...
Click to collapse
I didn't steal any source code, since it's a guide and not an application. I will, however, credit you for finding the method initially, although your app did not work in Lollipop at the time.
toastido said:
I didn't steal any source code, since it's a guide and not an application. I will, however, credit you for finding the method initially, although your app did not work in Lollipop at the time.
Click to expand...
Click to collapse
I know you didn't "steal the code", but parts of this guide are letter-for-letter in the code of my app. And don't worry, Lollipop-compatible version coming soon.
EDIT: Thanks for adding that to the OP, but I found the ActivityManager commands to kill the required processes, too.
r3pwn said:
I know you didn't "steal the code", but parts of this guide are letter-for-letter in the code of my app. And don't worry, Lollipop-compatible version coming soon.
EDIT: Thanks for adding that to the OP, but I found the ActivityManager commands to kill the required processes, too.
Click to expand...
Click to collapse
D'oh. My bad. Updated OP to be a bit more generic.
Also, when you get the Lollipop compatible version ready, let me know and I'll gladly update the OP to point people that way for those who don't want to manually do this

auto start

Hows do I automatically shut and start my phone at specific times
One option is via Tasker with Secure Settings plug-in, but your phone must be rooted.
Action > System > Reboot type: Shutdown
Change reboot type to Normal if you want the device to simply reboot.
Using an s7edge , says reboot option is unavailable
k****ij84 said:
Hows do I automatically shut and start my phone at specific times
Click to expand...
Click to collapse
k****ij84 said:
Using an s7edge , says reboot option is unavailable
Click to expand...
Click to collapse
You can also use the shell command "reboot" (without quotes). I don't remember properly, but I don't think you have to write "su" before. You can try and if it fails, then write "su" before.
#Henkate said:
You can also use the shell command "reboot" (without quotes). I don't remember properly, but I don't think you have to write "su" before. You can try and if it fails, then write "su" before.
Click to expand...
Click to collapse
You mean "su -c"
And he can simply tick the "Use root" box.
Sorry all this is going over my head , new to tasker , can you please put in a step by step
Any help?
Action > Code > Run Shell
Tick the "Use Root" box and enter this code:
reboot
Yes but my device is unrooted , don't want to root
k****ij84 said:
Yes but my device is unrooted , don't want to root
Click to expand...
Click to collapse
Try it without root.
It might work.
want to see for xperia z3.
snhfa said:
want to see for xperia z3.
Click to expand...
Click to collapse
Dude, just read the other posts of this thread.
You'll have to use a method that mimics human interaction. Give auto tools a try. See this reddit post for pointers.

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
/sbin/.magisk/img/.core/post-fs-data.d/doze.disable.sh
but even if the magisk log reports the script was executed... it isn't executed.
The script has the purpose to completely disable the doze and it has root/root and all r/w/x permissions
The content is
#!/system/bin/sh
su -c 'dumpsys deviceidle disable'
The magisk log is attached
Where am I wrong??
Or, how I can execute the script every boot?
Samsung S7 with The Galaxy Project OREO
Thanks
A couple of things:
You don't need to call su in the boot script. It's being executed by Magisk, which always has superuser access...
post-fs-data.d might be too early. Try moving it to service.d instead. Depending on when that's being set during boot, you might also have to add a delay as to when the command is being run.
Didgeridoohan said:
A couple of things:
You don't need to call su in the boot script. It's being executed by Magisk, which always has superuser access...
post-fs-data.d might be too early. Try moving it to service.d instead. Depending on when that's being set during boot, you might also have to add a delay as to when the command is being run.
Click to expand...
Click to collapse
Thanks,
1) I've tried also without calling the su option but without success. So I tried also calling it
2) after checking the script in the service.d didn't work I tried puttin it also in post-fs-data.d
... yes, I've tried different ways.
So something like this (considering 10 seconds)?
#!/system/bin/sh
sleep 10
dumpsys deviceidle disable
Something like that might work, yes. Have you made sure that the command works at all on your device? If it does it's likely a matter of finding the correct delay...
Didgeridoohan said:
Something like that might work, yes. Have you made sure that the command works at all on your device? If it does it's likely a matter of finding the correct delay...
Click to expand...
Click to collapse
Yes, sending it manually it works
I will try
Thanks again
It seems it is working now, thanks for the tip "delay"
sverza said:
It seems it is working now, thanks for the delay tip
Click to expand...
Click to collapse
No worries. Been there, done that, pulled my hair out in frustration... :laugh:
I'm running into this same problem, Magisk is saying it was executed but the process is not running. Here is my script in
/sbin/.magisk/img/.core/service.d/customboot.sh
The script runs fine when i run it via ssh but it never works on boot?
Code:
#!/system/bin/sh
sleep 30
/data/data/com.termux/files/usr/bin/rclone mount gDRIVE: /data/media/0/Movies \
--config=/storage/sda1/tools/rclone/rclone.conf \
--allow-non-empty \
--allow-other \
--dir-cache-time 72h \
--cache-workers 6 \
--debug-fuse \
-v \
--daemon
Any ideas?
[email protected] said:
Any ideas?
Click to expand...
Click to collapse
Have you tried running it on device (not trough ssh)? How about putting the command on one line?
Didgeridoohan said:
Have you tried running it on device (not trough ssh)? How about putting the command on one line?
Click to expand...
Click to collapse
hmm you found something interesting, when I launch termux and try to launch it from there directly off the device it doesn't work:
su
sh /sbin/.magisk/img/.core/service.d/customboot.sh
however there are no errors or anything like that. the command is not running in the processes I see via top (when i run the command thru ssh the process shows) and the log I designed only shows the sleep command and rclone command no other errors:
exec > /sbin/.magisk/img/.core/service.d/test.log 2>&1
set -x
I'm stuck at this point any ideas
edit--i figured it out it was a problem within rclone itself strangely enough it hda a dependency that didn't load till later
So now that I figured out I'm missing an environmental variable does anyone know how I can add a custom program as an environmental variable to Android or Magisk so that when my bootscript runs it calls the right programs and fix "executable file not found in $PATH"
figured it out:
#!/system/bin/sh
PATH=$PATH:<directory you want to add>
<rest of script>
So, with regards to the Doze script, how do you tell if it worked?
nijohnson said:
So, with regards to the Doze script, how do you tell if it worked?
Click to expand...
Click to collapse
In console write
su
dumpsys deviceidle
and search for
mlightnenable=false and mdeepenable=false
If they are = true it means the doxe is still active
Cool! Thanks
curious why do you want to disable doze?
virtyx said:
curious why do you want to disable doze?
Click to expand...
Click to collapse
It is causing delayed notification on some apps.
Oreo
what is the command to disable doze please? Thanks
Deleted
sverza said:
It is causing delayed notification on some apps.
Oreo
Click to expand...
Click to collapse
Credit @return_of_0ctobot
while [ "$(getprop sys.boot_completed)" != 1 ];
do sleep 1;
done
Much more universal ... And does not require trial and error to find boot completed

Pixel 5 reboot when I use "dismiss all" to clear google's notification

Hi, I have been struggled with this wired issue on Android 11 and Android 12.
My Pixel 5 will reboot when I use "dismiss all" to clear google's notification.
I grabbed some ADB log and it says "E Zygote : java.lang.IllegalArgumentException: Unexpected cancel with surface 12"
Part of my ADB log (Google drive link, Can't insert more than 8000 characters in thread)
I can't figure out what cause this. My Pixel 5 is rooted and has LSPosed installed. I have tried to disable all XPosed module and this issue persist. Is there any way to fix it or is there any way I can get more detail about how this happened?
Thanks in advance.
Exactly the same issue here... The problem happens sometimes when I swipe to clear the Gmail notifications.
bitbot said:
Exactly the same issue here... The problem happens sometimes when I swipe to clear the Gmail notifications.
Click to expand...
Click to collapse
Try to use adb excute this command:
Code:
setprop persist.log.tag.NotificationService ""
and then reboot your phone
It works for me
lupohan44 said:
Try to use adb excute this command:
Code:
setprop persist.log.tag.NotificationService ""
and then reboot your phone
It works for me
Click to expand...
Click to collapse
Awesome! Thanks dude!

Categories

Resources