Grant Secure settings permission to Farhan

Required: Enable USB debugging on your android

  1. On your android go to Settings
  2. search for About phone
  3. find Build number and tap it a few times until you see a message indicating that developer options have been unlocked
  4. go to developer options and enable USB Debugging

Windows

  1. Download the latest release of the Android SDK platform tools
  2. Extract the content of the Zip file
  3. Open cmd in the folder you just extracted
  4. Connect your phone to your machine via USB cable
  5. Run the following command: adb shell pm grant ly.com.tahaben.farhan android.permission.WRITE_SECURE_SETTINGS
  6. Done you should be able to use screen grayscale now if needed restart Farhan

GNU Linux / MacOS

  1. Download the latest release of the Android SDK platform tools
  2. Extract the contents of the Zip file
  3. Open a terminal in the same location where you just extracted the files
  4. Connect your phone to your machine via USB cable
  5. run the following command ./adb shell pm grant ly.com.tahaben.farhan android.permission.WRITE_SECURE_SETTINGS
  6. Done you should be able to use screen grayscale now if needed restart Farhan
4.3 4 votes
Article Rating
Subscribe
Notify of
guest

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Fireyfennec

You can also use Shizuku to grant the permission. Just install Shizuku and aShell from F-Droid. Set up Shizuku and if you don’t know how to do it just watch a video. Then grant Shizuku permission to aShell and type this command [pm grant ly.com.tahaben.farhan android.permission.WRITE_SECURE_SETTINGS] after that open Farhan and you should see the gray-scale working. But unfortunately this only works in android 10 and above.

Menelaos

There seems to be an issue for me. I use windows and a Poco M3 pro and when I run the command it gives me this error:
Exception occurred while executing ‘grant’:
java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
I’ve enabled every permission the app has asked me to. Can anyone help?