[OnePlus 3 Guides, News, & Discussion] stelio_kontos:
*This requires root!*

So i was tweaking around with Tasker and I came across this tutorial online: http://www.notenoughtech.com/tasker/tasker-run-shell-commands

I decided to use the 3 commands he uses to make a list of shell commands that we can use. Basically this will allow you to change settings that are only found in Oxygen os and thus you can't normally change within Tasker. (I recommend you check out the page and try some things for yourself. There are more settings like these. The ones below are just the ones I thought would be most useful.)

Some examples of what you could use this for: A better power saving mode that disables all gestures and backlighting. Or automatically lock the hardware buttons when watching a show or movie, etc. This is not a guide for Tasker. If you don't know how Tasker works then I recommend you go watch some tutorials on YouTube. It definitely has a learning curve, but it is 100% worth it.

To add the shell script in Tasker:

create a task>'+' button>Code>Run Shell>enter the command line

Make sure you select the 'use root' checkbox, otherwise this will not work!

I've tested all of the commands below (on Oxygen os 4.0.3), however I'm not responsible for any damage that might occur to your phone.

Lock hw buttons

(You don't get the notification to re-enable the buttons. To do so you have to toggle the quick tile. Keep this in mind!)

On: settings put system oem_acc_key_lock_mode 4

Off: settings put system oem_acc_key_lock_mode 0

[Choose any percentage. If you go to battery settings and then tap 'Turn on automatically', it will set the value to 0. (So if you want to keep your settings, don't do this.)]

Auto enable battery saver at XX%: settings put global low_power_trigger_level XX

Capacitive button backlight

On: settings put system buttons_brightness 1

Off: settings put system buttons_brightness 0

Seconds in the clock

On: settings put secure clock_seconds 1

Off: settings put secure clock_seconds 0

Advanced reboot

On: settings put secure advanced_reboot 1

Off: settings put secure advanced_reboot 0

Double click power for camera

On: settings put secure

camera_double_tap_power_gesture_disabled 0

Off: settings put secure camera_double_tap_power_gesture_disabled 1

[For the button commands you can set it to multiple values (0-10). Below is a list of what the values mean. Replace the 'X' in the command line by the number of your choosing.]

0=No Action

1=Open/Close Menu

2=Recents

3=Search Assistant

4=Turn Off Screen

5=Open Camera

6=Voice Search

7=Open Last Used App

8=Open Shelf

9=Open/Close Notification Center

10=Open/Close Split Screen

Button Commands:

Long press home: settings put system key_home_long_press_action X

Double tap home: settings put system key_home_double_tap_action X

Long press Recents: settings put system key_app_switch_long_press_action X

Double tap Recents: settings put system key_app_switch_double_tap_action X

Long press back: settings put system key_back_long_press_action X

Double tap back: settings put system key_back_double_tap_action X

Screen on Gestures

Flip to mute

On: settings put system

oem_acc_sensor_rotate_silent 1

Off: settings put system

oem_acc_sensor_rotate_silent 0

3 Finger screenshot

On: settings put system

oem_acc_sensor_three_finger 1

Off: settings put system oem_acc_sensor_three_finger 0

[The screen off gestures work a little different. Every gesture has a certain number (written below). You have to add up the values of the gestures you want to have enabled. So everything enabled is 128+64+1+30=223 and nothing enabled is 0+0+0+0=0. Replace the 'XXX' in the command by the value you get.]

Double tap to wake=128

Open camera=64

Toggle flashlight=1

Music control=30

Screen off gesture: settings put system oem_acc_blackscreen_gestrue_enable XXX

I've tested these on Oxygen os 4.0.3. I'm not sure if they work on other versions/on the OnePlus 3t. I believe that the 'seconds in clock' and the 'lock hw buttons' weren't available before. So I doubt that those will work on marshmallow versions of Oxygen os (aside from maybe the marshmallow open beta). The others should be fine.