• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

How To Guide How to give any app WRITE_SECURE_SETTINGS without a computer or root

Search This thread

onyxcode

Senior Member
DISCLAIMER: This guide works on any phone with Android 11 or newer. Previous versions do not have wireless debugging so this is not possible.


Hey all! In this short guide, I will be showing you how to give any app the permission "WRITE_SECURE_SETTINGS" without needing to connect to a computer.

For this guide, I will be using System UI Tuner by Zachary Wander as my example app.

First, download and install Shizuku. This is a wonderful app that allows system API access directly without needing to root your phone.

Once you've installed Shizuku, follow the steps to start it through the wireless debugging method. You will only need to pair once as long as you don't reinstall the app.
DISCLAIMER: Shizuku will need to be restarted if you restart your phone but it's just a matter of re-enabling wireless debugging and then clicking "Start" in the Shizuku app.

Next, we're going to install Termux by Fredrik Fornwall. Simply open the app once, wait for it to finish installing, then leave the app.

Now, re-enter Shizuku, and click the button that says "Use Shizuku in terminal apps".

Screenshot_20210719-141710~2.jpg


Then click "Export files".

Screenshot_20210719-142734~2.jpg

Afterwards, make a new folder, and call it "Shizuku".

Screenshot_20210719-142623~2.jpg

Screenshot_20210719-142631~2.jpg


Finally, click "Use this folder".

Screenshot_20210719-143121.jpg


Almost there!

Head over to Termux, and type:
Code:
pkg install nano
This installs a text editor that we will use to edit our Shizuku config file.

While it's installing, go to Termux's app info, and change the permissions to allow it access to all files. This will allow it to see the folder we made earlier.

Go back to Termux, and after nano is done installing, type the following:
Code:
cd /sdcard/Shizuku
nano shizuku

Once inside the text editor, press the CTRL key on Termux's key bar, and press the "\" key on your keyboard.

Screenshot_20210719-143643~2.jpg


Now, type "PKG", press Enter, then in the next field, type "com.termux".

Now, tap "a", tap Ctrl+X, tap "y", and you're done!

Whenever you want to authorize an app with "WRITE_SECURE_SETTINGS" simply open Termux, cd to "/sdcard/Shizuku", and type:

Code:
sh shizuku pm grant <package name here> android.permission.WRITE_SECURE_SETTINGS

You will only have to do this once per app as long as you do not uninstall it.

Have fun!
 

Attachments

  • Screenshot_20210719-142631~2.jpg
    Screenshot_20210719-142631~2.jpg
    33.2 KB · Views: 29
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    DISCLAIMER: This guide works on any phone with Android 11 or newer. Previous versions do not have wireless debugging so this is not possible.


    Hey all! In this short guide, I will be showing you how to give any app the permission "WRITE_SECURE_SETTINGS" without needing to connect to a computer.

    For this guide, I will be using System UI Tuner by Zachary Wander as my example app.

    First, download and install Shizuku. This is a wonderful app that allows system API access directly without needing to root your phone.

    Once you've installed Shizuku, follow the steps to start it through the wireless debugging method. You will only need to pair once as long as you don't reinstall the app.
    DISCLAIMER: Shizuku will need to be restarted if you restart your phone but it's just a matter of re-enabling wireless debugging and then clicking "Start" in the Shizuku app.

    Next, we're going to install Termux by Fredrik Fornwall. Simply open the app once, wait for it to finish installing, then leave the app.

    Now, re-enter Shizuku, and click the button that says "Use Shizuku in terminal apps".

    Screenshot_20210719-141710~2.jpg


    Then click "Export files".

    Screenshot_20210719-142734~2.jpg

    Afterwards, make a new folder, and call it "Shizuku".

    Screenshot_20210719-142623~2.jpg

    Screenshot_20210719-142631~2.jpg


    Finally, click "Use this folder".

    Screenshot_20210719-143121.jpg


    Almost there!

    Head over to Termux, and type:
    Code:
    pkg install nano
    This installs a text editor that we will use to edit our Shizuku config file.

    While it's installing, go to Termux's app info, and change the permissions to allow it access to all files. This will allow it to see the folder we made earlier.

    Go back to Termux, and after nano is done installing, type the following:
    Code:
    cd /sdcard/Shizuku
    nano shizuku

    Once inside the text editor, press the CTRL key on Termux's key bar, and press the "\" key on your keyboard.

    Screenshot_20210719-143643~2.jpg


    Now, type "PKG", press Enter, then in the next field, type "com.termux".

    Now, tap "a", tap Ctrl+X, tap "y", and you're done!

    Whenever you want to authorize an app with "WRITE_SECURE_SETTINGS" simply open Termux, cd to "/sdcard/Shizuku", and type:

    Code:
    sh shizuku pm grant <package name here> android.permission.WRITE_SECURE_SETTINGS

    You will only have to do this once per app as long as you do not uninstall it.

    Have fun!
    4
    Hmmm have to get some time to try this. Adulting sucks.
    1
    So this broke my brain just a bit (it's been one of those days) however if I am reading it correctly this will give some apps a pseudo root.