[Concept] Root without unlocking - One (M7) Q&A, Help & Troubleshooting

Hello,
I've been trying the dolphin emulator for android and to get it running with the opengles3.0 backend, we need to disable some kernel function. Otherwise, the device is rebooting.
this is the command we run with root right:
echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/fast_hang_detect
echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/ft_pagefault_policy
echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/ft_policy
echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/ib_check
echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/long_ib_detect
My guest is there is some flaw in these kernel function and maybe we can get root by using those flaw? Simply using an app ahah
Is there any possibility of a possible exploiting of these crash?
Thank, I'm simply curious. (and I've already root)

Related

How to permantly Disable dynamic fsync??

How can i permantly disable dynamic fsync??? with a init d script or something... but DONT tell me any app plz
Run Terminal Emulator in Root and Enter:
Disable:
su
echo 0 > /sys/kernel/dyn_fsync/Dyn_fsync_active
Click to expand...
Click to collapse
Enable:
su
echo 1 > /sys/kernel/dyn_fsync/Dyn_fsync_active
Click to expand...
Click to collapse
Setting/value will be lost after reboot..
Or:
1) By downloading and using Trickster MOD
2) By directly editing the file /sys/kernel/dyn_fsync/Dyn_fsync_active and setting 1 to enable the dynamic fsync, 0 to disable it (note that set value will be lost after a reboot/shutdown)
mrjraider said:
Run Terminal Emulator in Root and Enter:
Disable:
Enable:
Setting/value will be lost after reboot..
Or:
1) By downloading and using Trickster MOD
2) By directly editing the file /sys/kernel/dyn_fsync/Dyn_fsync_active and setting 1 to enable the dynamic fsync, 0 to disable it (note that set value will be lost after a reboot/shutdown)
Click to expand...
Click to collapse
ye i know that ways... ty anyway.. but if i make a init.d script with "echo 0 > /sys/kernel/dyn_fsync/Dyn_fsync_active"? or something with busybox?

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?

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

samsung ultra power save mode

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

Categories

Resources