Sample Header Ad - 728x90

Enable and disable system overlays with shell command

0 votes
0 answers
5301 views
I'm trying to create an automatic Dark Mode using Tasker, which would work disabling overlays (to get a default light theme) and enabling others (to get a dark mode). For the light theme I run
overlay disable --user 0 + package name
However, when i try to use
.android.system.overlay.dark
(an overlay that comes with my custom ROM) it changes it for a moment and gets back to how it was before. If I do
overlay list | grep dark
, I can see for a moment that it does get disabled, and enables itself again. When i run
overlay enable
it does the same, enables and then disables the overlay. I also tried running the command with su If I change the theme from the ROM settings, everything works fine. Also, the command works with other overlays from substratum themes and some settings overlays that come with the rom. Im using HavocOS 2.9, with android 9.0 Can anyone help?
Asked by Psycoguana (1 rep)
Oct 1, 2019, 09:09 PM