We found that Google was working on a dark mode for Android since 2020, date of the release of Android 8.0 Oreo. There was a dark hidden theme that was not quite ready for prime time. Then we had a dark theme with Android Pie. In 2020, we finally have a suitable dark mode on Android with Android 10. With iOS 13, Apple has also introduced a dark mode. iOS 13 was the first time that Apple was working on a dark mode for iOS.
Unlike Android 10, iOS 13 can automatically set clear and dark themes according to the time of day. Now, it's not to criticize Android, I'm a fan. But sometimes, it just shows that Google is struggling to implement even good ideas while Apple usually clicks them right away. This can become frustrating as an Android user. With third-party developer support, you can also set up clear, dark, automatic themes on Android 10.
Automatic dark theme
Automatic Dark Theme works pretty much as advertised on all Google Pixel smartphones running Android 10 as well as Essential Phone, since it runs mostly on Android. The app is also available in beta for the Huawei P30 Pro, the Xiaomi Mi 9 and the Redmi K20 Pro ("stable beta"). Several custom ROMs are also supported because they are all mainly based on the AOSP format. On OnePlus devices running Oxygen OS, most of the things that change depending on the failover of the dark theme of Android 10 work. However, this list of things excludes everything related to OnePlus, including all stored applications such as Phone, Contacts, Messages, Settings, and so on.
It's a simple application that makes system-level changes. Therefore, it requires a special permission called WRITE_SECURE_SETTINGS. Many Android personalization apps have required this permission in the past. This is not new. The only thing to do is that this permission is not as easy to tune as enabling a switch in the settings, though it is not difficult either. Just a little embarrassing if anything.
Enable USB debugging
To grant the required permission, you must first enable USB debugging on your device, found in Developer options.
- Go to Settings > About phone.
- Press on Construction number 7 times.
- You will see a message of toast saying, "You are a developer".
- Go back to Settings now, and you'll find a new option called "Developer Options", select it.
- Scroll and find USB debugging and activate it.
Grant WRITE_SECURE_SETTINGS
Now that your device is ready to receive ADB commands, you will need ADB.
- Download Android SDK platform tools for Windows, Mac, and Linux
- Extract the downloaded zip file anywhere on your PC.
- The extracted platform-tools folder contains all the necessary tools to run ADB and Fastboot.
- Then, launch a command prompt, Windows Powershell, or Terminal in the extracted area. platform tools folder.
- In Windows, right-click and select Open Powershell here. You can also type cmd in the address bar and press Enter to launch a command prompt window.
- Under macOS or Linux, right-click on the folder and select Open in Terminal.
- Connect your Android 10 device to your PC with a USB cable.
- You should see a prompt on your Android device asking you to Allow USB debug permissions on your PC. Let this.
- If you do not see the prompt right away, type the command below on your PC and press Enter.
adb devices
- If you do not see the prompt right away, type the command below on your PC and press Enter.
- Now that you can run ADB commands from your PC on your phone, you can finally grant the required permission to the application. Enter the following command to do this.
- Command Prompt:
adb shell pm grant com.cannic.apps.automaticdarktheme android.permission.WRITE_SECURE_SETTINGS
- Windows Powershell:
.adb shell pm grant com.cannic.apps.automaticdarktheme android.permission.WRITE_SECURE_SETTINGS
- Linux terminal and macOS:
./adb shell pm grant com.cannic.apps.automaticdarktheme android.permission.WRITE_SECURE_SETTINGS
- Command Prompt:
Turn on the dark auto theme on Android 10
Finally, launch the application you have installed and you should be able to activate it with the toggle at the top. By default, the app is set to turn on the dark theme at 10pm. It will also automatically disable the dark theme at 7 o'clock. You can adjust these timings or simply enable the option above: Watch the sunset and the sunrise. The application itself also follows the dark theme, but it's not an application that you will open a lot after the initial setup.
There is also the switch to Change the theme only when the phone is locked. This seems like a subtle option to include, but it is not. If the system switches to a dark theme when you use an application, it crashes or reboots. Certainly not great for the user experience. The application solves this problem by simply doing it while the device is locked, that is, it is not used. Google's method was to completely remove the feature after testing it in beta.
Read more: 5 Android browsers with dark mode / night theme