[Samsung Galaxy S8 Guides, News, & Discussion] tytydraco:
About

In this guide I will be telling you about how to create your own device mods like this. This involves using an engine built into Android Nougat. There is no root required.

Prerequisites

- Apktool installed (official guide here)

- The apk of the app you wish to modify (ex: SystemUI.apk) (system dump here; USE WINRAR AS 7z DOESN'T EXTRACT RIGHT)

- Android Studio

- Basic knowledge of apk guts

- Template RRO project

- optional: Finished Example Project (for reference)

Tutorial

The first step is to decompile your target APK so we can see what options we can change. For this tutorial, I am going to be modding SystemUI.apk.

"apktool d SystemUI.apk"

After it finishes, go to "SystemUI/res/values", as this will be where we change most things.

Here we can see files like "bools.xml, strings.xml, integers.xml, etc..."

Let's look in "bools.xml".

I see a line in here that mentions lock screen rotation:

"<item type="bool" name="config_enableLockScreenRotation">@android:bool/config_enableLockScreenTranslucentDecor</item>"

For this tutorial, let's change this value, as it is easy to change, and we can visually see this change.

It looks like this boolean is enabled if "config_enableLockScreenTranslucentDecor" is enabled. To override this, we have to change it to "true" instead.

Now that we know what we are changing, let's open up the "RRO_Template" project in android studio.

First navigate to the Gradle Scripts and select the "build.gradle" for the "(Module: app)"

Here lets change some variables. First is the "theme_name". Let's change it to "Lockscreen Rotation"

Next is "theme_id". Let's make it "com.mod.lockscreen_rotation"

We don't need to mess with "priority"

Last is the "package_id" Since default is the id for the SystemUI, we don't have to change anything. If you need to find this for another app, look in the decompiled APKs AndroidManifest.xml under "package="com.app.id""

Next, navigate to the res folder. If you remember, our "bools.xml" file is under "res/values/bools.xml", so let's add that file.

We can delete the sample "strings.xml" as we don't need to change anything there, and add the "bools.xml" file.

Inside of the newly created XML file, we should see a setup like this (if not add it):

"<?xml version="1.0" encoding="utf-8"?>

<resources></resources>"

Looking back at the setting we want to change, it's "<item type="bool" name="config_enableLockScreenRotation">@android:bool/config_enableLockScreenTranslucentDecor</item>". So let's add that line.

But since we are overriding the value to true, it will now look like this :"<item type="bool" name="config_enableLockScreenRotation">true</item>"

And that's it for the value changing!

Now let's go build the APK. Press "Alt + B" to bring up the Build menu and press "Build APK"

Click "Show In Folder" on the bottom right after it compiles to see the APK.

Put this on your phone and install the APK.

Since we modified the SystemUI.apk, we need to reboot to see the changes.

Now, lets try going to the lock screen and rotating the screen. It should rotate!

Congratulations! You made a mod / theme!

If you have any questions, please ask. I will try to help if I am available. I have classes starting in a few days so I may be busy. Enjoy the guide! ;)