samsung ultra power save mode - Tasker Tips & Tricks

Can I use gasket to enable upsm at 5% ? I'm complete noob so will need talking through thanks

ROOT + shell
echo "0" > /sys/devices/virtual/mdnie/mdnie/accessibility
echo "1" > /sys/devices/virtual/mdnie/mdnie/accessibility
echo "2" > /sys/devices/virtual/mdnie/mdnie/accessibility
echo "3" > /sys/devices/virtual/mdnie/mdnie/accessibility
0 : Normal Screen
1 : Inverted Colors
2 : Ultra Power Save Mode
3 : Screen off but not locked and touchscreen is still working

Thanks for reply but that means nothing to me?

No one with a basic guide

Do you have ROOT?
If not, you can"t auto turn on UPSM.

Yes I have root

@bandit250
you are still interested?

Yes please

First, Make a test.
Task:
1. Run shell [mark ROOT]
Command:
echo "2" > /sys/devices/virtual/mdnie/mdnie/accessibility
Push play
upsm should turn on.

Hi I get this error
17.49.16/E Run Shell: ->
17.49.16/E Run Shell: ->
17.49.16/E Run Shell: ->
17.49.16/Shell runBackground echo "2" > /sys/devices/virtual/mdnie/mdnie/accessibility root: true timeout: -1
17.49.16/Shell start process-thread ID 4097
17.49.16/E add wait type Shell1 time 2147483647
17.49.16/E add wait type Shell1 done
17.49.16/E add wait task
17.49.16/E Error: 1

Related

what's wrong with my script?

In order to improve the sound ,I write a script.
as below,the script doesn't work.
Can you tell me,what's wrong in the script?
sorry from my bad English!
#!/system/bin/sh
# by liweichu
echo 1 > /sys/class/misc/voodoo_sound_control/enable
echo 1 > /sys/class/misc/voodoo_sound/headphone_eq
echo -10000 > /sys/class/misc/voodoo_sound/digital_gain
echo 50 > /sys/class/misc/voodoo_sound/headphone_amplifier_level
echo 1 > /sys/class/misc/voodoo_sound/fll_tuning
echo 1 > /sys/class/misc/voodoo_sound/dac_osr128
echo 1 > /sys/class/misc/voodoo_sound/adc_osr128
echo 1 > /sys/class/misc/voodoo_sound/dac_direct
echo 0 > /sys/class/misc/voodoo_sound/mono_downmix
echo 1 > /sys/class/misc/voodoo_sound/fm_radio_headset_normalize_gain
echo 1 > /sys/class/misc/voodoo_sound/fm_radio_headset_restore_bass
echo 1 > /sys/class/misc/voodoo_sound/fm_radio_headset_restore_highs
echo 10 > /sys/class/misc/voodoo_sound/headphone_eq_b1_gain
echo -2 > /sys/class/misc/voodoo_sound/headphone_eq_b2_gain
echo -9 > /sys/class/misc/voodoo_sound/headphone_eq_b3_gain
echo 4 > /sys/class/misc/voodoo_sound/headphone_eq_b4_gain
echo 8 > /sys/class/misc/voodoo_sound/headphone_eq_b5_gain
echo 1 > /sys/class/misc/voodoo_sound/recording_preset

How to Enable fast charge and disable Fsync

I am using nyakkernel which supports fast charge and Disabling Fsync and i tried typing commands in terminal but i always get nothing can anyone tell me what i should do exactly ?
You could use an application like nsTools or:
To enable Fast Charge:
Enter in terminal emulator:
su
echo 1 > /sys/kernel/fast_charge/force_fast_charge
To disable:
su
echo 0 > /sys/kernel/fast_charge/force_fast_charge
Dynamic Fsync:
Disable:
su
echo 0 > /sys/kernel/dyn_fsync/Dyn_fsync_active
Re-enable:
su
echo 1 > /sys/kernel/dyn_fsync/Dyn_fsync_active
is this tested?

[Q] How can I disable the LED while charging?

Hello XDA-developers
How can I disable the LED while charging?
I have root access on my Huawei ascend P7.
Lightflow (lite) doesn't help, and Settings > Display > LED and disable it there doesn't help too.
Thanks for your help.
heyhou95 said:
Hello XDA-developers
How can I disable the LED while charging?
I have root access on my Huawei ascend P7.
Lightflow (lite) doesn't help, and Settings > Display > LED and disable it there doesn't help too.
Thanks for your help.
Click to expand...
Click to collapse
Hello !
Here it is :
Code:
> adb shell
$ su
# echo 0 > sys/devices/platform/hkled/leds/green/brightness
# echo 0 > sys/devices/platform/hkled/leds/red/brightness
# exit
$ exit
Good luck !
surdu_petru said:
Hello !
Here it is :
Code:
> adb shell
$ su
# echo 0 > sys/devices/platform/hkled/leds/green/brightness
# echo 0 > sys/devices/platform/hkled/leds/red/brightness
# exit
$ exit
Good luck !
Click to expand...
Click to collapse
sudru ..
i replaced bootanimation.zip bxcos i want original animation.. but instead is just small android write in the middle .. why it doesnt work ?
surdu_petru said:
Hello !
Here it is :
Code:
> adb shell
$ su
# echo 0 > sys/devices/platform/hkled/leds/green/brightness
# echo 0 > sys/devices/platform/hkled/leds/red/brightness
# exit
$ exit
Good luck !
Click to expand...
Click to collapse
Hey surdu_petru, what options else are there? You say echo 0 with output at red and green....can i find the options somewhere?
My red and green/red files are on zero but i have light at charging.
surdu_petru said:
Hello !
Here it is :
Code:
> adb shell
$ su
# echo 0 > sys/devices/platform/hkled/leds/green/brightness
# echo 0 > sys/devices/platform/hkled/leds/red/brightness
# exit
$ exit
Good luck !
Click to expand...
Click to collapse
It works
Thank you very much and good luck with the CM port.
Dont work on Mate S
surdu_petru said:
Hello !
Here it is :
Code:
> adb shell
$ su
# echo 0 > sys/devices/platform/hkled/leds/green/brightness
# echo 0 > sys/devices/platform/hkled/leds/red/brightness
# exit
$ exit
Good luck !
Click to expand...
Click to collapse
I tried that now under Lollipop, but it doesn't survive a reboot. When only setting brightness to zero, the light returns after un- and replugging. So, I set the rights to -r--r--r--, now it works until reboot.
There is also a file called trigger, which I can't change at all, although the rights are -rw-r--r--. I could save, but when opening the next time, it is like it was originally.
Does anyone have an idea how to make those changes permanent? Might the reset be caused by the kernel?

M7 Usb modes from adb

These are different usb modes you can force from a adb shell (needs root)
This is just a fyi for information.
echo 1 > /sys/devices/virtual/android_usb/android0/f_diag/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_diag_mdm/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_rndis/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_modem/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_serial/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_acm/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_ccid/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_accessory/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_adb/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_audio_source/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_cdc_ethernet/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_cdc_network/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_mass_storage/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_mtp/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_projector/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_projector2/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_ptp/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_rmnet/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_rmnet_sdio/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_rmnet_smd/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_rmnet_smd_sdio/on
echo 1 > /sys/devices/virtual/android_usb/android0/f_rmnet/on
cdc_ether
Hi I am trying to connect a cdc_ether device into the LG Nexus5 usb port. I have cross compiled kernel for 3.4.0 hammerhead for this devices and enabled the cdc_ether module on it. But when I looked at the /sys/devices/virtual/android_usb/android0/f_cdc_ethernet/on, the f_cdc_ethernet directory doesnt exist. Does that mean the kernel was compiled wrong?

Need help with enabling Diag port on Z3+ (E6553) with zROM v1.1

Hi all,
I have unlocked bootloader and flashed zROM v1.1 so I got root. I want to enable Diag port to connect phone to the QXDM. Here is what i know.
Most important files are /init.usbmode.sh and /init.usbmode.platform.sh:
/init.usbmode.sh:
-disables USB and writes VendorID
Code:
echo 0 > /sys/class/android_usb/android0/enable
echo ${VENDOR_ID} > /sys/class/android_usb/android0/idVendor
-it setups engineering port with /init.usbmode.platform.sh if "getprop perist.usb.eng" is set to 1
-writes PID and USB FUNCTION
Code:
echo ${PID} > /sys/class/android_usb/android0/idProduct
echo ${USB_FUNCTION} > /sys/class/android_usb/android0/functions
-enables USB
Code:
echo 1 > /sys/class/android_usb/android0/enable
/init.usbmode.platform.sh:
Code:
setup_engmode()
{
PID_PREFIX=0
SUPPORT_RMNET=1
case ${1} in
"mass_storage,adb") PID_PREFIX=6 ;;
"mtp,adb") PID_PREFIX=5 ;;
"rndis,adb")
PID_PREFIX=D
SUPPORT_RMNET=0
;;
*)
/system/bin/log -t ${TAG} -p i "No eng PID for: ${1}"
exit 1
;;
esac
PID=${PID_PREFIX}146
USB_FUNCTION=${1},serial,diag
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,tty > /sys/class/android_usb/android0/f_serial/transports
if [ ${SUPPORT_RMNET} -eq 1 ] ; then
USB_FUNCTION=${USB_FUNCTION},rmnet
echo qti,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
fi
echo "${PID} ${USB_FUNCTION}"
exit 0
}
set_rndis_qc()
{
(...)
}
case ${1} in
"eng_setup")
if [ $# -ne 2 ] ; then
exit 1
fi
setup_engmode ${2}
;;
"set_rndis_qc")
set_rndis_qc
exit 0
;;
esac
-returns PID and USB_FUNCTION to /init.usbmode.sh, By default phone has USB_FUNCTION set to "mtp,adb" so there should be PID=5146 and USB_FUNCTION=mtp,adb,serial,diag,rmnet
-echoes
Code:
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo qti,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
The main issue is that "getprop perist.usb.eng" doesn't exist.
As you know this Android runs on SE Linux. In /property_contexts file we can find following lines:
Code:
#line 1 "vendor/semc/system/sepolicy/Bootstrap_Applications/1.0.0/usbeng/property_contexts"
persist.usb.eng u:object_r:usb_eng_prop:s0
sys.usb.diag_mode u:object_r:usb_diag_mode_prop:s0
persist.sys.usb.config u:object_r:usb_config_prop:s0
persist.service.adb.enable u:object_r:usb_adb_enable_prop:s0
Only "persist.sys.usb.config " is visible in getprop command. This custom ROM has script located in /system/su.d/permissive.sh which enables permissive mode on SE Linux:
Code:
#!/system/bin/sh
/system/bin/setenforce 0
So in theory restrictions to the file types and process domains should not operate. Correct me if I am wrong.
Also there is a file /system/bin/usbeng which should be stared as a service by /init.sony.usb.rc
Code:
#Start usbeng
service usbeng /system/bin/usbeng
user system
group system
class late_start
oneshot
But it can't be seen in services list or process list. Also "getprop init.svc.usbeng" says it is "stopped". We can find SE Linux properties of this file in /file_contexts:
Code:
#line 1 "vendor/semc/system/sepolicy/Bootstrap_Applications/1.0.0/usbeng/file_contexts"
/system/bin/usbeng u:object_r:usbeng_exec:s0
I have tried echoing mentioned lines with a script:
Code:
echo 0 > /sys/class/android_usb/android0/enable
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo qti,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
echo 5146 > /sys/class/android_usb/android0/idProduct
echo mtp,adb,serial,diag,rmnet > /sys/class/android_usb/android0/functions
echo 1 > /sys/class/android_usb/android0/enable
But last line seems to fail and USB doesn't get enabled and reboot is needed.
Seems that SE Linux is one of main reasons that Diag port can't be enabled. In effect there is lack of "persist.usb.eng" "sys.usb.diag_mode" in "getprop" command and "usbeng" service. Here comes question to you guys. Do you have idea how to enable mentioned properties and service? I will very appreciate any help or information that will help me enabling Diag port.
Best regards,
Piotr
solution?
did you find the solution, i need the same?
same here, i'm xperia z3 user

Categories

Resources