How to grant permissions required by some features on non-root device?

How to grant permissions required by some features on non-root device?
← Knowledge Base
Most of the basic features of Greenify work out of the box on non-root devices, still some useful additional features require a one-time privilege escalation procedure different than normal permissions, which is enforced by Android system. (This procedure is NOT required on rooted device)

This one-time procedure requires a computer with USB port, a USB data cable and a tiny tool called "ADB", which is part of the official Android platform tools from Google.

1. Connect your Android device to the computer with USB data cable. Ensure the required driver is correctly installed on the computer for your Android device. (For Windows PC, this official guide and driver list for common OEM might be helpful. If it does not work out, the official Google Android USB driver should work for most Android devices, just manually install it, and select "Android ADB Interface" or "Android Composite ADB Interface")

2. On the Android device, if you cannot find "Settings – Developer options", then go to "Settings – About", click the "Build number" entry many times until a toast message shows "You are now a developer". (Settings path may be slightly different on various Android devices)

3. Go back to "Settings – Developer options" (the new entry activated by the last step), enable "USB debugging".

4. If you have never used the USB debugging before, new hardware should now be detected on the computer. If nothing detected or errors encountered, you may need to manually install the correct USB driver for your Android device, as mentioned in step 1.

5. Open the shell/terminal/command-prompt on the computer, run "adb devices" (without quotes). If everything is properly configured, there should be at least one device in the output. If not, recheck the physical usb connection, "USB debugging" option on the Android device and the device driver installed on the computer.

A sample of the expected output of "adb devices"
List of devices attached
0701352d251c75ab device

6. A permission request dialog "Allow USB debugging?" may appear on the Android device, asking for authorization for the USB debugging connected computer. Please accept it.

7. For different features, you need to run slightly different commands (without quotes) in the shell/terminal/command-prompt to grant the corresponding permission:

Accessibility service run-on-demand:
adb -d shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS
Aggressive Doze on Android 7.0+ (non-root):
adb -d shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS
Doze on the Go:
adb -d shell pm grant com.oasisfeng.greenify android.permission.DUMP
Aggressive Doze (on device/ROM with Doze disabled):
adb -d shell pm grant com.oasisfeng.greenify android.permission.DUMP
Wake-up Tracker:
adb -d shell pm grant com.oasisfeng.greenify android.permission.READ_LOGS
Wake-up Cut-off: (Android 4.4~5.x)
adb -d shell pm grant com.oasisfeng.greenify android.permission.READ_LOGS
adb -d shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS
Background-free enforcement on Android 8+ (non-root):
adb -d shell pm grant com.oasisfeng.greenify android.permission.GET_APP_OPS_STATS

8. Force stop Greenify to let the granted permission take effect. You can either do it in system "Settings – Apps – Greenify – Force stop", or execute this command:

adb -d shell am force-stop com.oasisfeng.greenify

9. (Optional) If you don’t need the USB debugging functionality any more, you can disable it for security reason in "Settings – Developer options". It will not affect the granted permissions to Greenify (until being uninstalled).

All done. Now you can disconnect the USB cable and enjoy the additional exciting features of Greenify!

The permission granted via the above one-time procedure will last until Greenify is uninstalled or your device is factory reset.

Tweet from The Economist (@TheEconomist)

The Economist (@TheEconomist) tweeted at 2:45 PM on Thu, Jan 18, 2018:
Seoul’s subway is run using real-time data, which can predict bottlenecks before they happen. It’s one of the ways South Korea’s capital is tackling travel congestion https://t.co/LQ2ASsCSwU
(https://twitter.com/TheEconomist/status/953881049876107264?s=03)

Get the official Twitter app at https://twitter.com/download?s=13

Yoga VPN, a great VPN

Yoga VPN, a great free VPN. After installation, please enter my invitation code dvry3, we will get 9000 points reward. http://bit.ly/Yoga-VPN

Jupyter Notebook Viewer

We recommend learning the command mode shortcuts in the following rough order:

  1. Basic navigation: enter, shift-enter, up/k, down/j
  2. Saving the notebook: s
  3. Change Cell types: y, m, 1-6, t
  4. Cell creation: a, b
  5. Cell editing: x, c, v, d, z
  6. Kernel operations: i, 0 (press twice)

Jupyter Notebook Viewer

http://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/source/examples/Notebook/Notebook%20Basics.ipynb

Reflection

Dear Orla,

The following is my reflection to the questions proposed on class. Thank you for your wonderful presentations and excellent ideas!

What did you learn?
I’ve learned not only English communication skills but also innovative ideas of high education. Ideas about blended teaching impressed me particularly.

What reasoned with you?
I am a teacher and I am particularly interested in teaching efficiently and effectively.

What did you find interesting?

There are so many interesting things I found in this class. For instance:
Socrative, a website we can interact with Ms. Orla in a timely way.
Ted, a website full of ideas worth spreading.

To introduce your companion, not yourself, the way first times proposed by Ms. Orla.

Did it make you think about something different?

Indeed. For example, BYOD, short form of “Bring Your Own Device”, is a method advocated by NMC Horizon Report. This method is absolutely discouraged at my University since it is thought a distraction to teaching process. Personally I encourage my students using mobile phones during teaching and learning process but I am not sure if it is reasonable. Now I understand that it is absolutely acceptable.

An other thing is virtual reality(VR) in teaching. VR is broadly adopted in engineering. I knew that VR can be used in teaching. But this is the first time that I find that VP can play such an important role in teaching and learning.

Did you carry out any further research on a topic
Yes.I am now performing two teaching research projects funded by Shanghai Municipal Educational Committee. As part of the research contents, Mass Open Online Class (MOOC) is of special importance to the teaching and learning process. I would like to carry out further research on this topic in order to enhance my students’ learning experience.
Did it challenge or make you critically evaluate your opinion
Yes. The idea of MOOC has impact on my thinking of teaching method. It’s quite different from traditional approach and there are a lot of new knowledge to learn. Since it is the trend of teaching method in high education, it deserves my more attention and efforts to implement on my classes.

Sincerely,

Yan Li

 
WordPress | LinkedIn | Facebook | Twitter |

itt question

What did you learn

what reasoned with you

what did you find interesting

did it make you think about something different

did you carry out any further research on a topic

did it challenge or make you critically evaluate your opinion

May 29, 2015, the first day of second round of learning the Holy Bible.

After more than four years I’ve read the Holy Bible yesterday. From today I will read the Holy Bible again beginning from New Testament. Let’s expect four years later, May 29 2019, I will finish the second round and will start the third round. How great!