Sunday, August 19, 2018

YouTube dark theme on Android without root or modified APKs

YouTube dark theme on Android without root or modified APKs


Back in March, Google declared that the YouTube versatile application for Android and iOS would get a dull mode. That dim topic took off for iOS clients very quickly however has taken a very long time to achieve the Android form.

 Truth be told, Google just as of late began testing the dull subject for a bunch of clients. For those of you who get a kick out of the chance to tinker with your gadget, you presumably realize that YouTube's dull subject has been open on Android for a considerable length of time—gave you're willing to root your gadget or introduce an altered APK.

 For those of you who either would prefer not to root your gadget or sideload an adjusted form of the YouTube application, you'll have a long hold up in front of you before the component takes off for your gadget. In any case, in the event that you would prefer not to pause, we figured out how to empower YouTube for Android's dull mode without root and without changing the APK.

YouTube dark theme on Android without root or modified APKs
YouTube dark theme on Android without root or modified APKs

Much the same as huge numbers of our past instructional exercises, we will utilize a helpful device called "ADB" for this little trap of our own. ADB, or the Android Debug Bridge, is a PC device that engineers use to interface with their gadget. It offers a cluster of valuable investigating devices, one of which enables clients to reinforcement and reestablish their application information. We will exploit ADB's reinforcement and reestablish usefulness to mightily empower YouTube's dim mode. 

Empowering it is simple—the procedure should take seconds on the off chance that you as of now have ADB set up. In the event that you don't have ADB set up, you'll need to experience that procedure before you can continue. We suggest you do set up ADB access for your cell phone, however, as it opens up an extensive variety of concealed customization choices that typically aren't accessible, (for example, framework wide, rootless custom topics on Android 8.0 Oreo and Android 8.1 Oreo.) If you're alright with that and need to get YouTube for Android's dull topic, at that point here's the secret. We'll clarify precisely how this functions after the well ordered directions.


How to Enable YouTube’s Dark Theme on Android Phones ?


  1. Make sure you’re up to date on the latest version of the app by downloading it from the Google Play Store above.
  2. If you haven’t alreadydownload the latest platform-tools for your operating system so you can use ADB.
  3. Download YouTubeDarkTheme_XDA.zipfrom APKSECURED
  4. Extract “YouTubeDarkTheme_XDA.ab” from the zip file and place it in the platform-tools folder where the ADB binary is located.
Open up a command prompt or terminal window in the directory where ADB is located and enter the following command depending on your OS:

Windows Command Prompt: adb restore YouTubeDarkTheme_XDA.ab
Windows Power Shell: .\adb restore YouTubeDarkTheme_XDA.ab
macOS Terminal: ./adb restore YouTubeDarkTheme_XDA.ab
Linux Terminal: ./adb restore YouTubeDarkTheme_XDA.ab    
YouTube dark theme on Android without root or modified APKs
6. You should see a message telling you to unlock your phone and confirm the restore 
operation.
YouTube dark theme on Android without root or modified APKs
1.On your smartphone, you should see a fullscreen prompt requesting you approve a “full restore of all data.” Accept it without entering a password (the file we made doesn’t need one). Pressing “Restore My Data” will not wipe or replace any of your phone’s data (except YouTube’s settings, which is our goal here), so don’t worry.

2.After a few seconds, the fullscreen prompt should disappear. If you are already in the YouTube app, it should reload with the dark theme present. If you weren’t already in the app, just open it up and it should load with the theme. There’s a small chance YouTube might force close, but this can safely be ignored by just re-opening the app.
3.Congratulations, you should now have YouTube for Android’s dark theme enabled! You won’t see the toggle in settings, so if you want to turn off the dark mode you’ll have to clear YouTube’s app data.

How it works

Every Android application stores their data in a location that’s only accessible to that app. For YouTube, that location is in /data/data/com.google.android.youtube. Within this location is the “shared preferences” folder which contains XML files that hold the app’s settings. The youtube.xml file contains the preferences that define whether the app should display the dark theme (among other things). By default, that preference value is false. Manually modifying this value to be true requires root access because all files within /data (excluding /data/media, which requires the appropriate external storage permissions to read/write) are inaccessible to third-party apps without root. But we can take advantage of built-in, first-party tools to work around that restriction.
The files in the “shared preferences” folder can be backed up manually by ADB or automatically to Google Drive if the app allows it. We can take advantage of the former backup method by preparing our own modified “backup” file to restore that contains a modified youtube.xml with the dark theme preference set to value. That’s exactly what was done here—we took a YouTube ADB backup, unpacked it, modified it, and then re-packed it all using this tool. You can unpack the .ab file we made yourself to verify its contents if you like. Restoring this .ab file overwrites the original youtube.xml file, thus forcing the dark mode value to be set to true.
Previous Post
Next Post

0 comments: