Disclosure: This post may contain affiliate links. We receive a small commission at no extra cost to you when you make a purchase using some of our links.
Unless you’ve been living under a rock, you’re aware of the new trend in UI/UX design across all the major operating systems and apps. First, they went white, and now they’re all jumping aboard the dark train, something Android was doing way before it was cool, but left because Google can’t decide. Android 10 has a dark mode now, and with this little tip, you can schedule automatic dark mode on Android 10 too. For the uninitiated, Android 10 does contain a system-wide dark mode and this article is not about how you can enable that dark mode manually. At least on the Google Pixel phones running Android 10, that part can be as easy as pulling down the notification shade and toggling the dark mode on or off.
However, Android’s implementation of the dark theme leaves something to be desired. And that’s the ability to schedule automatic dark mode.
Schedule Automatic Dark Mode On Android 10
- Download and install Automatic Dark Theme from the Google Play Store using the link provided below.
- Download: Automatic Dark Theme
- Grant WRITE_SECURE_SETTINGS permission to it using ADB. The steps for that are mentioned below this section.
- Once the said permission is granted, the app is simple and straightforward.
- Launch the Automatic Dark Mode app.
- Turn on the very first toggle next to Enable.
- Below that you can choose whether the dark theme is applied automatically based on sunset and sunrise times or at specific times.
- Under Behaviour, tap on the text Change the wallpaper according to theme.
- This will let you select two different wallpapers for your light and dark themes.
- After setting the wallpapers, you can toggle this feature on.
Another toggle under the Behaviour section labeled Switch the theme only when the phone is locked is enabled by default. This makes sure that the system theme does not change while you are using your phone. With many apps now relying on the system theme to provide you with a light or dark theme, the system theme changing while you’re using the phone can cause problems resulting in app crashes.
Grant “WRITE_SECURE_SETTINGS” Permission
Before you can go ahead and use the app, there’s something you need to take care of. To provide a full-screen experience, the app needs to hide the navigation bar. These days, even Samsung phones have navigation bars.
It’s basically necessary to hide it regardless of which phone you have. However, it is an essential part of the Android interface and the OS doesn’t just allow any app to hide it. We can use ADB (Android Debugging Bridge) to grant the app elevated privileges though. Thus, allowing it the permission it needs to hide or show the navigation bar.
Install ADB on PC
You’ll need a computer with ADB installed. If this is the first time, you are dealing with Android Debug Bridge (ADB) command-line tool, please follow the steps based on your operating system. There are two methods each for downloading and installing ADB and fastboot on Windows and Linux. You can add it to either the Operating System path or a specific directory. If you need any help in installing or setting it up, you can check out the guide we’ve published to install ADB and Fastboot on Windows, Mac & Linux.
Enable USB Debugging on Android
When you have it installed, enable USB debugging on your Android device. The option to enable USB debugging can be found under Settings > Developer options or Settings > System > Developer options if you’re using Android 8.0 or above.
The location of Developer options can also vary if your device runs a heavily customized skin on top of Android, such as MIUI.
Moreover, Developer options are hidden by default, for they’re not meant to be used by normal users. You can easily enable them by going to About phone and tapping the Build number 7 times in quick succession. Thereafter, you should see a toast message that says, “You are now a developer!”. This will enable Developer options in the settings.
Use ADB to Grant “Write Secure Settings” Permission
You may be a developer but you still need to grant that permission to get the full-screen navigation gestures. Now connect your Android device to your computer with a USB cable.
You should now see a prompt on your phone to allow USB debugging permission to your computer. If it doesn’t already, you can push the following command in ADB to trigger the prompt manually.
If you’ve granted the necessary permission, the above command should return your device’s serial number as you can see in the screenshot (above. This also means that your device is properly connected and detected. On Windows, it might be necessary to manually install your device’s USB drivers. Otherwise, ADB might not be able to detect your device.
With all that out of the way, we can finally grant the WRITE_SECURE_SETTINGS permission to Automatic Dark Theme. Simply copy and paste or type out the command given below into adb and hit enter.
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
./adb shell pm grant com.cannic.apps.automaticdarktheme android.permission.WRITE_SECURE_SETTINGS
With the permission granted, go ahead and launch the app on your Android device.
Automatic Dark Theme on Android 10
While Dark Mode is being made available on almost every operating system that didn’t officially have dark themes, only Apple seems to be doing it right. Both macOS and iOS have automatic dark mode toggles that trigger based on the time of the day. Meanwhile, the dark mode on Windows requires going all the way into the Settings to be enabled or disabled. Things are slightly better on Android with a quick toggle available, but the dark theme is not automatic. However, on some phones like those from OnePlus, this easy toggle is, for some reason, not available.
Many Google apps already support the system-wide dark theme toggle including Google Chrome, YouTube, Google Photos, Play Store, etc. So the automatic toggle is still pretty beneficial since most of your apps will be turned dark.
The Automatic Dark Theme app does work partially on OnePlus devices running Oxygen OS 10. It will change the parts of the OS that were left untouched such as the notification shade, notifications, and any apps that support the system-wide dark theme toggle. OnePlus apps, including the Settings app, do not follow the system-wide dark theme toggle on Android 10. So these remain either dark or light unless you change this from the Customizations section in Settings.