[APP][ROOT/ADB][10][11/Oct] DarQ: Per-app selectable force dark option for Android 10

Search This thread

shpegun

Member
Nov 9, 2016
44
9
Doesn't work on Gboard (9.0.10.293644837) running Android 10 latest patch (February 5th) on Pixel 2XL.
The other apps are going dark as they should.

upd: it doesn't work on Gboard only when it chosen in "enabled apps", but when I select "force dark theme", it's going dark
 
Last edited:

Volnetiks

New member
Feb 11, 2020
2
0
Doesnt work on huawei mate 20, update 10.0.0.180(C432E8R1P5)
Android Q and EMUI 10
Hope you can find a way to fix it

---------- Post added at 12:27 AM ---------- Previous post was at 12:20 AM ----------

Edit:
Works almost everywhere, excepted what's app and snapchat
 

Maryan40k

Member
Nov 3, 2019
39
9
Doesnt work on huawei mate 20, update 10.0.0.180(C432E8R1P5)
Android Q and EMUI 10
Hope you can find a way to fix it

---------- Post added at 12:27 AM ---------- Previous post was at 12:20 AM ----------

Edit:
Works almost everywhere, excepted what's app and snapchat
Works on Facebook? Can you attach a screenshot?
 

Volnetiks

New member
Feb 11, 2020
2
0
Works on Facebook? Can you attach a screenshot?

Well, seems like it's not working well

It works fine on crunchyroll, twitter, play music and i havent tired other apps

Screenshot_20200228_014323_com.facebook.katana.jpg
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,507
7,747
23
Salford, Greater Manchester, UK
quinny898.co.uk

kam333

Senior Member
Jan 28, 2008
937
488
London
Should be, just running

sh /sdcard/Android/data/com.kieronquinn.app.darq/files/script.sh&

From a shell started from ADB will be sufficient
Ok, just that Shizuku can be set up to survive reboots it's also use to give app ops privileged access.

Just a side note, I searched the thread and found another request for tasker integration but you never answered. Would it be too difficult to implement?

Sent from my LYA-L09 using Tapatalk
 
Last edited:

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,507
7,747
23
Salford, Greater Manchester, UK
quinny898.co.uk
Ok, just that Shizuku can be set up to survive reboots it's also use to give app ops privileged access.

Just a side note, I searched the thread and found another request for tasker integration but you never answered. Would it be too difficult to implement?

Sent from my LYA-L09 using Tapatalk

I don't see what exactly could be implemented as a tasker plugin? Force dark doesn't need a plugin, you can just do it with a "run shell" option
 
  • Like
Reactions: kam333

kam333

Senior Member
Jan 28, 2008
937
488
London
I don't see what exactly could be implemented as a tasker plugin? Force dark doesn't need a plugin, you can just do it with a "run shell" option
Tasker has an invert display option, was thinking, just maybe, allowing tasker to set the per-app dark mode from your app, or toggle the force dark (all) mode when certain apps are launched, could be more consistent since it doesn't always work.

Just thinking of ways to get the per-app setting to work reliably.

But I defer to your greater knowledge of what's possible.

Thanks

Sent from my LYA-L09 using Tapatalk
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,507
7,747
23
Salford, Greater Manchester, UK
quinny898.co.uk
Tasker has an invert display option, was thinking, just maybe, allowing tasker to set the per-app dark mode from your app, or toggle the force dark (all) mode when certain apps are launched, could be more consistent since it doesn't always work.

Just thinking of ways to get the per-app setting to work reliably.

But I defer to your greater knowledge of what's possible.

Thanks

Sent from my LYA-L09 using Tapatalk

Toggling force dark doesn't need a plugin, you can just do it with a shell command using "setprop debug.hwui.force_dark 0" or "setprop debug.hwui.force_dark 1"

This is all the per-app mode does, sets that property depending on the app opened
 

kam333

Senior Member
Jan 28, 2008
937
488
London
Toggling force dark doesn't need a plugin, you can just do it with a shell command using "setprop debug.hwui.force_dark 0" or "setprop debug.hwui.force_dark 1"



This is all the per-app mode does, sets that property depending on the app opened
Got it.

Cheers

Sent from my LYA-L09 using Tapatalk
 

yochananmarqos

Recognized Contributor
Ok, just that Shizuku can be set up to survive reboots

It can?

@Quinny899 Here's some info on using Shizuku in your app: https://shizuku.rikka.app

Whenever I reboot, this is what I do:

Start ADB Wi-Fi for Tasker on PC
Code:
adb tcpip 5555

Start DarQ server

  • On PC...
    Code:
    ./rundarq-linux-mac.sh
  • ... or with Tasker:
    Code:
    DarQ Server (108)
        A1: ADB Wifi [  Command:sh /sdcard/Android/data/com.kieronquinn.app.darq/files/script.sh & Host: Port: Timeout (Seconds):1 Enable Debugging (Check Help):eek:ff ]

Start Shizuku server for App Ops

  • On PC run from a shell script...
    Code:
    adb -d shell sh /sdcard/Android/data/moe.shizuku.privileged.api/files/start.sh
  • ...or with Tasker:
    Code:
    Shizuku Server (110)
        A1: ADB Wifi [  Command:sh /sdcard/Android/data/moe.shizuku.privileged.api/files/start.sh & Host: Port: Timeout (Seconds):1 Enable Debugging (Check Help):eek:ff ]
 
Last edited:
  • Like
Reactions: kam333

kam333

Senior Member
Jan 28, 2008
937
488
London
It can?



@Quinny899 Here's some info on using Shizuku in your app: https://shizuku.rikka.app



Whenever I reboot, this is what I do:



Start ADB Wi-Fi for Tasker on PC

Code:
adb tcpip 5555



Start DarQ server



  • On PC...

    Code:
    ./rundarq-linux-mac.sh
  • ... or with Tasker:

    Code:
    DarQ Server (108)
    
        A1: ADB Wifi [  Command:sh /sdcard/Android/data/com.kieronquinn.app.darq/files/script.sh & Host: Port: Timeout (Seconds):1 Enable Debugging (Check Help):eek:ff ]



Start Shizuku server for App Ops



  • On PC run from a shell script...

    Code:
    adb -d shell sh /sdcard/Android/data/moe.shizuku.privileged.api/files/start.sh
  • ...or with Tasker:

    Code:
    Shizuku Server (110)
    
        A1: ADB Wifi [  Command:sh /sdcard/Android/data/moe.shizuku.privileged.api/files/start.sh & Host: Port: Timeout (Seconds):1 Enable Debugging (Check Help):eek:ff ]
My mistake, App Ops can survive reboots on non rooted phones by using the delegated admin mode.

Sent from my LYA-L09 using Tapatalk
 

Maryan40k

Member
Nov 3, 2019
39
9
Can it be resolved?
 

Attachments

  • Screenshot_20200228_014323_com.facebook.katana.jpg
    Screenshot_20200228_014323_com.facebook.katana.jpg
    163.3 KB · Views: 630
  • Screenshot_20200228_162317_com.facebook.katana.jpg
    Screenshot_20200228_162317_com.facebook.katana.jpg
    181.7 KB · Views: 630

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Dark theme is not applied when I start the app but if I force close and restart the app then dark theme works fine. Also after clearing the app from recents again it starts in non-dark mode. Is this the intended behaviour??
    Yes, read the FAQs.
    1
    I read it. Are you referring to this?

    View attachment 5325509

    Coz this doesn't exactly answer my question. For me it always works after a force-close. So do you mean that app's loading too quickly on first start and a little slower everytime after force-close (almost 100% consistency) that darQ is able to enable dark mode??

    P.S: I am using xposed
    Correct.
  • 93


    DarQ provides a per-app selectable force dark option for Android 10.

    It uses an accessibility service and root or ADB to allow you to pick just the apps you want to use the force dark theme on. Force dark is a hidden option, provided by the Android system, which intelligently inverts light backgrounds to dark, and dark text and icons to light. It allows a majority of third party apps, such as Snapchat, LinkedIn, as well as first-party Google apps which do not have a dark theme (such as the Play Store) to have a dark mode.

    DarQ also provides an option to apply the system dark theme (as well as selectable force dark) only after sunset and before sunrise, protecting your eyes when it's most needed.

    Please read the Frequently Asked Questions sections in the app or here for more information and some answers to questions

    Download from XDA Labs

    Download the script to run it without root using ADB

    Source available on GitHub

    Screenshots:



    Examples of apps with force dark enabled:




    Changelog:

    v1.3
    Added Xposed module to prevent apps disabling force dark mode programmatically
    Bumped target to Android 11, and added query packages permission to allow it to continue working
    Added instructions on how to use the script with ADB wireless pair on Android 11
    Background service will now restore the global override setting after a reboot
    App list no longer shows DarQ as an option
    Updated libraries
    Updated FAQ


    Contains a modified version of the "HK Grotesk" font, modified to have slightly rounder edges and use the secondary "g" instead of its original primary. Licenced under the Open Font Licence, available here
    13
    Version 1.1 is now on XDA Labs. It includes support for Android Q beta 5, and removes support for beta 4. Do not update if you are still on beta 4.

    Why did this take so long for a one line change?
    Yesterday, when beta 5 came out, and I discovered the force dark setprop key had reverted, the first thing I tried was to set it without root. To my surprise, it worked (but this does not mean DarQ works without root now, keep reading).
    However, after modifying the app to not need root and to only allow the auto dark option with root, I released an APK to a few testers. They all reported the same thing: It didn't work without root.
    What actually turned out was that while it worked without root permissions, selinux had to be disabled. As I use Viper4Android on my Pixel, I have selinux disabled (the only current way for it to work on Q), so I didn't notice this during development.
    And so, those modifications took a few hours and were all trashed this evening in favour of a one line change and release. Serves me right for not fully testing it before putting effort into development.

    Enjoy.
    10
    Version 1.2 is now available on XDA Labs, at long last!

    If you're using ADB (the non-root method), please make sure to download and run the script too.

    Changelog said:
    v1.2
    - DarQ now works without root! Use the ADB script from the XDA thread or GitHub repository to run the required background service to use DarQ without needing to root your device.
    - Fixed root detection
    - Added OxygenOS support
    - Added a search box to the app list
    - Added a filter for system apps (hidden by default) in the app list
    6
    When downloading from XDA labs app or browser, I get a "trouble parsing package" error.
    6
    Thread Cleaned, since it looks like someone is having a bad day, maybe too much quarantine or not enough. Nevertheless, be nice, play nice, or else you will find, yourself quarantined from XDA.

    Carry on.