How to set a schedule for Android 10’s dark mode

How to set a schedule for Android 10’s dark mode

Stable Android 10 is now available for all generations of Pixel smartphones and the Essential Phone, and it brings a plethora of highly-requested features such as revamped gesture navigation and system-wide dark mode. The latter feature is perhaps the most impactful since it’s led to many applications adding dark themes, such as Gmail, the Google Play Store, and more. In early Android Q betas, you were able to schedule the dark mode toggle based on the time of day, much like Night Light. However, Google got rid of that option because it might negatively affect the user experience by suddenly restarting applications while you’re using them. Thankfully, with a third-party app, you can bring back Android 10 dark mode scheduling.

I confirmed this app works on my Pixel 2 XL running the stable Android 10 release. All I had to do was install it and run a single ADB command to grant it permission to change the setting that controls the system-wide dark mode toggle. ADB, or Android Debug Bridge, is a developer tool that can be used to control various options on your phone; it’s mostly used for development, but it can also be useful to grant permissions that the Android OS otherwise won’t let you grant. So long as you’re careful about what apps you’re granting permissions to, you’ll be safe. Oh, and running this command won’t void the warranty in any way.

After you grant the app the proper permission, the app then handles changing the dark mode based on your chosen schedule. The best part is that it also has an option to only change the active theme when the phone is locked. That way, an app won’t suddenly restart on you while you’re using it. Now, here’s how to set it up.

Automatic Dark Theme for Android 10 screenshots, retrieved from the app’s Play Store listing.

Requirements:

  • Android 10 (stable, beta, or custom ROM): Currently available in stable on all Pixel smartphones and the Essential Phone, but also available in beta for the Huawei P30 Pro, the Xiaomi Mi 9, the Redmi K20 Pro (“stable beta”), and many others. Custom ROM users can also take advantage of this app.
  • ADB installed on your PC. Instructions for how to set it up on your Windows, macOS, or Linux PC can be found here.

Steps:

  1. Install the “Automatic Dark Theme for Android 10” app from the Google Play Store. You can either click on the link in the box above or click here.
  2. Plug your phone into your PC and open a command prompt or terminal window in the same directory where you downloaded the ADB binary.
  3. Open the app on your phone.
  4. Run the following command:
    Windows 10 Command Prompt:

    adb shell pm grant com.cannic.apps.automaticdarktheme android.permission.WRITE_SECURE_SETTINGS

    Windows 10 PowerShell:

    .\adb shell pm grant com.cannic.apps.automaticdarktheme android.permission.WRITE_SECURE_SETTINGS

    macOS/Linux Terminal:

    ./adb shell pm grant com.cannic.apps.automaticdarktheme android.permission.WRITE_SECURE_SETTINGS
  5. Enjoy using the app! You can customize the app behavior slightly by changing whether you want the app to only toggle the dark mode when the phone is locked. You can also hide the notification that the app posts; this notification is necessary for the app to run in the background so it can change the dark theme on schedule without getting killed by the Android OS.

The developer of this app says that they plan on adding dark mode scheduling based on the sunrise and sunset schedule as well as an option to hide the app icon from the app drawer. This is a fairly simple app that does its job just fine, but these added features will make Android 10 dark mode scheduling feel like a native feature.


Note: While you can technically automate the dark mode in Android 10 using an automation app like Tasker, this app is free to use and serves only a single purpose. If you’re interested in automation in general, I highly recommend learning how to use an app like Tasker.

Discuss This Story

Want more posts like this delivered to your inbox? Enter your email to be subscribed to our newsletter.

READ THIS NEXT