HELP! LED notification suddenly stops working - RAZR i Q&A, Help & Troubleshooting

hi everyone,
as stated in the title, the front LED - notification LED - on my RAZR i suddenly stopped working recently.
I'm running Omar's latest rom, with xposed, xprivacy, xblast, gravitybox and some other (unlikely relevant) modules.
I tried to used gravitybox and xblast tools notification control to test lighting up the LED, but without success. other notification light apps on play store such as light flow don't work, even Motorola's notification widget doesn't work.
i also tried restoring to previous ROM versions, and even back to stock. the light just won't bother. in all cases, xposed was respectively turned on and off.
i thought the light just died, but every time the phone boots up, i can still see it turn green.
so now, I'm out of ideas i don't know what else to try.
i really hope you guys can help me with this. thanks a lot!

alienyd said:
hi everyone,
as stated in the title, the front LED - notification LED - on my RAZR i suddenly stopped working recently.
I'm running Omar's latest rom, with xposed, xprivacy, xblast, gravitybox and some other (unlikely relevant) modules.
I tried to used gravitybox and xblast tools notification control to test lighting up the LED, but without success. other notification light apps on play store such as light flow don't work, even Motorola's notification widget doesn't work.
i also tried restoring to previous ROM versions, and even back to stock. the light just won't bother. in all cases, xposed was respectively turned on and off.
i thought the light just died, but every time the phone boots up, i can still see it turn green.
so now, I'm out of ideas i don't know what else to try.
i really hope you guys can help me with this. thanks a lot!
Click to expand...
Click to collapse
Try this app.
https://play.google.com/store/apps/details?id=com.motorola.ledwidget

Hi.
Try this (maybe needs root - don't know exactly).
Enable USB debugging and run "adb shell" (Needs adb installed).
Code:
cd /sys/class/leds
ls -l
you should see red/green/blue folders between others. Please post output here.
Following needs root:
Code:
cd red
echo 100 > brightness
Red LED should light up. Does it? If not, please post output of
Code:
dmesg | tail -n 40
(run shortly after the above led light up code)
Turn off LED by
Code:
echo 0 > brightness
Good luck

hi PosixCompatible,
thanks for the detailed instruction. sadly it didn't show any light .
I'm including the output from cmd below:
Code:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]:/ # cd /sys/class/leds
cd /sys/class/leds
[email protected]:/sys/class/leds # ls -l
ls -l
lrwxrwxrwx root root 2014-06-15 12:08 charging -> ../../devices
/ipc/msic_chrg_led/leds/charging
; no light lighted up here
[email protected]:/sys/class/leds # cd red
cd red
/system/bin/sh: cd: /sys/class/leds/red: No such file or directory
2|[email protected]:/sys/class/leds # echo 100 > brightness
echo 100 > brightness
/system/bin/sh: can't create brightness: No such file or directory
1|[email protected]:/sys/class/leds #
; no red light either
1|[email protected]:/sys/class/leds # dmesg | tail -n 40
dmesg | tail -n 40
[76881.555123,0] intel_mdf_battery msic_battery: Charger type: SDP, current n
egotiated: 100
[76881.555630,0] penwell_otg 0000:00:02.3: Found private SRAM at ffff8000 siz
e:4000
[76881.596409,0] intel_mdf_battery msic_battery: Charger type: SDP, current n
egotiated: 500
[76881.597036,0] intel_mdf_battery msic_battery: Current Temp zone is 1, it's
parameters are:
[76881.597079,0] intel_mdf_battery msic_battery: full_volt:4340, full_cur:150
0
[76881.597113,0] intel_mdf_battery msic_battery: maint_vol_ll:4290, maint_vol
_ul:4340, maint_cur:1500
[76881.597141,0] intel_mdf_battery msic_battery: Enable Charging
[76881.602474,0] intel_mdf_battery msic_battery: retry reading Fault Reg:0xc0
[76881.632711,0] intel_mdf_battery msic_battery: Current Temp zone is 1, it's
parameters are:
[76881.632767,0] intel_mdf_battery msic_battery: full_volt:4340, full_cur:150
0
[76881.632807,0] intel_mdf_battery msic_battery: maint_vol_ll:4290, maint_vol
_ul:4340, maint_cur:1500
[76881.632843,0] intel_mdf_battery msic_battery: Enable Charging
[76881.703561,0] android_usb: did not send uevent (0 0 (null))
[76881.731435,0] android_usb: sent uevent USB_STATE=CONNECTED
[76881.735580,0] android_usb: sent uevent USB_STATE=DISCONNECTED
[76881.792970,0] android_usb: sent uevent USB_STATE=CONNECTED
[76881.824231,0] android_usb gadget: high speed config #1: android
[76881.824567,0] android_usb: sent uevent USB_STATE=CONFIGURED
[76882.826007,0] mtp_open
[76899.207981,0] intel_mdf_battery msic_battery: vbus_volt:4365
[76899.210021,0] intel_mdf_battery msic_battery: vbatt:4241875 temp:300
[76959.241737,0] intel_mdf_battery msic_battery: vbus_volt:4372
[76959.243445,0] intel_mdf_battery msic_battery: vbatt:4256875 temp:290
[76961.617535,0] intel_scu_watchdog: Expected SW WDT warning irq received
[76961.617588,0] intel_scu_watchdog: interrupt tasklet body start
[76961.617711,1] intel_scu_watchdog: watchdog_keepalive
[77019.305649,0] intel_mdf_battery msic_battery: vbus_volt:4365
[77019.307374,0] intel_mdf_battery msic_battery: vbatt:4258125 temp:290
[77020.581285,0] [drm] dsi status [12:TX False Control Error]
[77079.390647,0] intel_mdf_battery msic_battery: vbus_volt:4372
[77079.392670,0] intel_mdf_battery msic_battery: vbatt:4261250 temp:290
[77139.433087,0] intel_mdf_battery msic_battery: vbus_volt:4379
[77139.434794,0] intel_mdf_battery msic_battery: vbatt:4263125 temp:290
[77161.010905,0] intel_scu_watchdog: Expected SW WDT warning irq received
[77161.010973,0] intel_scu_watchdog: interrupt tasklet body start
[77161.011101,1] intel_scu_watchdog: watchdog_keepalive
[77199.546708,0] intel_mdf_battery msic_battery: vbus_volt:4372
[77199.548418,0] intel_mdf_battery msic_battery: vbatt:4265000 temp:290
[77259.580338,0] intel_mdf_battery msic_battery: vbus_volt:4379
[77259.582416,0] intel_mdf_battery msic_battery: vbatt:4262500 temp:290
; nothing happened on the phone, so I skipped the turning off command
I'm guessing something might have accidentally deleted my parameter folder for the light.
any way to find this or fix it?
thanks a lot!

alienyd said:
I'm guessing something might have accidentally deleted my parameter folder for the light.
any way to find this or fix it?
thanks a lot!
Click to expand...
Click to collapse
Did you try this one?
https://play.google.com/store/apps/details?id=com.motorola.ledwidget
This activates your led again in the case it was disabled by something
after installing there is a widget for activating

ICuaI said:
Did you try this one?
https://play.google.com/store/apps/details?id=com.motorola.ledwidget
This activates your led again in the case it was disabled by something
after installing there is a widget for activating
Click to expand...
Click to collapse
I've already written to try this widget. He could deactivate led accidentally.

thanks for the info, i already tried the widget, it didn't help !

could somebody please post the content of
sys/class/leds
please?! I can't find it anywhere. And it seems to the problem here

alienyd said:
could somebody please post the content of
sys/class/leds
please?! I can't find it anywhere. And it seems to the problem here
Click to expand...
Click to collapse
You should return to stock ROM by flashing on RSD lite and flash Omar's ROM (after flashing CWM by fastboot, etc.)

lelapincretin8 said:
You should return to stock ROM by flashing on RSD lite and flash Omar's ROM (after flashing CWM by fastboot, etc.)
Click to expand...
Click to collapse
thanks, I'd already tried that, it didn't work either.
I returned to stock with rsd lite, tried the led, flash Omar's ROM, tried again, no luck!

alienyd said:
thanks, I'd already tried that, it didn't work either.
I returned to stock with rsd lite, tried the led, flash Omar's ROM, tried again, no luck!
Click to expand...
Click to collapse
In this case, I think your LED is broken... You should repair it by a LED replacement

i think it's not the case because at boot, it does light up green!

I think everyone can agree that the LED light in this phone is pretty crappy.

Related

Disable Charging LED ?

Hey!
Just wanted to know if it is possible to deactivate charging LED without using lightflow because it has some bugging sometimes !
Thanks
Gesendet von meinem HTC One mit Tapatalk 2
nobody`?
so_ony said:
nobody`?
Click to expand...
Click to collapse
You could place a small sticker over the LED I guess, in all seriousness
MacHackz said:
You could place a small sticker over the LED I guess, in all seriousness
Click to expand...
Click to collapse
sorry but I dont wanna do that I would like to disable it like you can do it on the galaxy s4
*** Must be ROOTED ***
I have a "night mode" tasker profile set up that does this for the backlight buttons. I just tried it for the charging LED and I think it works. NOTE: this will disable the LED completely until you revert it.
Task Edit:
NIGHT MODE ON (when phone is plugged into charger AND time is between 11pm and 6am)
Wait 2 seconds
Run Shell -> Command: (disables RED LED)
Code:
chmod 0333 /sys/class/leds/amber/brightness; echo 0 > /sys/class/leds/amber/brightness
Run Shell -> Command: (disables GREEN LED)
Code:
chmod 0333 /sys/class/leds/green/brightness; echo 0 > /sys/class/leds/green/brightness
Run Shell -> Command: (disables backlight buttons)
Code:
chmod 0333 /sys/class/leds/button-backlight/brightness; echo 0 > /sys/class/leds/button-backlight/brightness
Silent Mode on
Media Volume 0
You're basically changing permissions so the system cannot modify the brightness property of the LEDs. You are then setting the brightness to 0. Until you change the permissions back to 644, your LEDs will be off. No charging light, no LED notification.
Task Edit:
NIGHT MODE OFF (exit task)
Run Shell -> Command: (enables RED LED)
Code:
chmod 0644 /sys/class/leds/amber/brightness
Run Shell -> Command: (enables GREEN LED)
Code:
chmod 0644 /sys/class/leds/green/brightness
Run Shell -> Command: (enables backlight buttons)
Code:
chmod 0644 /sys/class/leds/button-backlight/brightness
Silent Mode off
Media Volume 10
Also if you wanted you can make a single shell command and just separate all the commands by semicolons to streamline.
minuteZERO said:
*** Must be ROOTED ***
I have a "night mode" tasker profile set up that does this for the backlight buttons. I just tried it for the charging LED and I think it works. NOTE: this will disable the LED completely until you revert it.
Task Edit:
NIGHT MODE ON (when phone is plugged into charger AND time is between 11pm and 6am)
Wait 2 seconds
Run Shell -> Command: (disables RED LED)
Code:
chmod 0333 /sys/class/leds/amber/brightness; echo 0 > /sys/class/leds/amber/brightness
Run Shell -> Command: (disables GREEN LED)
Code:
chmod 0333 /sys/class/leds/green/brightness; echo 0 > /sys/class/leds/green/brightness
Run Shell -> Command: (disables backlight buttons)
Code:
chmod 0333 /sys/class/leds/button-backlight/brightness; echo 0 > /sys/class/leds/button-backlight/brightness
Silent Mode on
Media Volume 0
You're basically changing permissions so the system cannot modify the brightness property of the LEDs. You are then setting the brightness to 0. Until you change the permissions back to 644, your LEDs will be off. No charging light, no LED notification.
Task Edit:
NIGHT MODE OFF (exit task)
Run Shell -> Command: (enables RED LED)
Code:
chmod 0644 /sys/class/leds/amber/brightness
Run Shell -> Command: (enables GREEN LED)
Code:
chmod 0644 /sys/class/leds/green/brightness
Run Shell -> Command: (enables backlight buttons)
Code:
chmod 0644 /sys/class/leds/button-backlight/brightness
Silent Mode off
Media Volume 10
Also if you wanted you can make a single shell command and just separate all the commands by semicolons to streamline.
Click to expand...
Click to collapse
Thanks! It worked on my att desire eye

[guide][root] Tweaks Redmi 4x stock ROM

Hello xda world,
EDIT 24 may 2018: using Luis kernel now on RR 5.8.4. Best I have tried so far!!
Link: http://luis-builds.de/downloads/lineageos/rr/Xiaomi_Redmi_4X_(santoni)/
EDIT 10-feb-2018: battery drain due to *alarm* and *launcher* system wakelocks solved with firmware V32.
Grab it here and flash with TWRP: https://forum.xda-developers.com/xiaomi-redmi-4x/how-to/firmwares-t3682965
Here I hope to collect some tweaks and mods that work in rooted Redmi 4x stock rom. (8.2.10.0 Global)
EDIT: since I use Resurrection Remix now I also added some RR tweaks
Since I just own the device it will be work in progress for a while. I search the forums for solutions for problems I encounter.
My Redmi 4x is OEM unlocked via Xiaomi, has twrp and Magisk root. (you need root for tweaks)
For OEM unlock you need account and register at miui.com, ask for unlock, wait 30+ hours and then use the miui unlock tool that checks if you are granted bij Xiaomi for unlock.
Some Redmi 4x facts:
- Xiaomi Redmi 4x has codename Santoni
- The Soc is Qualcomm 435 (msm8940 socid 313, msm8937 for the firmware), 4 cpu cores perf and 4 cpu cores power
- The gpu is Adreno 505
- main camera is Samsung S5K3L8, front camera is Omnivision ov5675
- notification LED has RGB!
- 5 GHz (11ac) only supported for wifi hotspot (wlan.ko issue)
- MIUI features are setup in the /etc/device_features/santoni.xml file
- CPU/kernel features are mostly setup in the /etc/init.qcom.post_boot.sh file
- fastboot: hold vol- and power, release power after vibrate
- recovery: hold vol+ and vol- and power, release power after vibrate
Redmi 4x related sites:
- Official miui.com for Redmi 4x http://en.miui.com/forum-123-1.html
- Resurrection Remix ROM for Redmi 4x https://sourceforge.net/projects/resurrectionremix/files/santoni/ (Antutu score 43000+)
- Miui EU ROM https://xiaomi.eu/community/forums/miui-weekly-rom-releases.103/
- Mi-Globe ROM (like EU ROM but with options) Mi-Globe
- Miui Belarus (MiuiPro) ROM https://miuipro.by/roms/
- Redmi 4x Global Edition on Bangood
- AOSP Extended (AEX) ROM Redmi 4X http://downloads.aospextended.com/santoni/
Note: If you change any file always make a copy of it first. I always copy the file in the same folder and give it extension .ORG. So build.prop becomes build.prop.ORG with adb shell: cp -p build.prop build.prop.ORG
Be sure the permissions of the files are set to rw-r--r-- (644)!!!!!!
Example adb/linux commands
From pc:
adb push "afile" /sdcard
adb shell
On device:
su
stop
mount -o remount,rw /system
cd "/afolder"
cp -p "afile" "afile.ORG"
cp /sdcard/"afile" .
ls -l "afile*"
chmod 644 "afile"
reboot
Ofcourse afile and afolder are just example names.
If you are not familiar with linux shell or adb then you can find zip files to flash in TWRP mode.
You need to REBOOT after changing any of these files.
Note 2: I am not responsible for any damage to your device. Use this at your own risk!
Audio recording mod (mixer mod)
Recording audio on stock rom is terrible. On the internet I found a solution. You need to change 2 mixer files.
If you also want louder speaker you need to copy /etc/mixer_paths.xml too.
/etc/mixer_paths_qrd_sku1.xml
mic volume for voice call
Code:
<path name="voice-call">
<!-- tweakradje add 2 lines -->
<ctl name="DEC1 Volume" value="88" />
<ctl name="DEC2 Volume" value="88" />
<ctl name="PRI_MI2S_RX_Voice Mixer CSVoice" value="1" />
<ctl name="Voice_Tx Mixer TERT_MI2S_TX_Voice" value="1" />
</path>
mic volume for audio rec like movie, try between 100-124, use 100 for very loud env
Code:
<path name="handset-mic">
<path name="adc1" />
<!-- tweakradje add 2 lines -->
<ctl name="DEC1 Volume" value="110" />
<ctl name="DEC2 Volume" value="110" />
<ctl name="IIR1 INP1 MUX" value="DEC1" />
</path>
mic volume for audio rec like movie, try between 100-124, use 100 for very loud env
Code:
<path name="handset-stereo-dmic-ef">
<!-- tweakradje add 2 lines -->
<ctl name="DEC1 Volume" value="110" />
<ctl name="DEC2 Volume" value="110" />
<path name="speaker-dmic-endfire" />
</path>
/etc/audio_platform_info.xml
Code:
<acdb_ids>
<!-- tweakradje add 2 lines, but no more auto rec mic volume -->
<device name="SND_DEVICE_IN_HANDSET_MIC" acdb_id="1"/>
<device name="SND_DEVICE_IN_HANDSET_STEREO_DMIC" acdb_id="1"/>
<device name="SND_DEVICE_OUT_SPEAKER_PROTECTED" acdb_id="136"/>
<device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED" acdb_id="136"/>
<device name="SND_DEVICE_OUT_SPEAKER_PROTECTED_VBAT" acdb_id="136"/>
<device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED_VBAT" acdb_id="136"/>
<device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK" acdb_id="137"/>
</acdb_ids>
Now audio is fine when recording video and sounds even great!
You can download the 2 files below. Check if you need to insert these lines in your file or that you can use mine.
For recording stereo audio only I use Sony Audio Recorder which is free and perfect.
EDIT 18 dec 2017: Found that acdb_id="4" works well, which is the default mic profile in ACDB. However you need to lower the "DEC1 Volume" and "DEC2 Volume" to 94.
EDIT 23 dec 2017: About Audio Calibration (ACDB) files
You might have noticed that there are more than one set of acdb file in /etc/acdbdata folder. There are MTP end QRD sets. QRD stands for Qualcomm Reference Design. You can play with these Calibration Profiles for speakers and microphone.
Easiest is to create a new build.prop (644) in the /vendor folder.
Then play with these values. You can also mix MTP and QRD for devices. Like using all MTP but for General and Handset use the QRD version.
Code:
persist.audio.calfile0=/etc/acdbdata/QRD/QRD_Bluetooth_cal.acdb
persist.audio.calfile1=/etc/acdbdata/QRD/QRD_General_cal.acdb
persist.audio.calfile2=/etc/acdbdata/QRD/QRD_Global_cal.acdb
persist.audio.calfile3=/etc/acdbdata/QRD/QRD_Handset_cal.acdb
persist.audio.calfile4=/etc/acdbdata/QRD/QRD_Hdmi_cal.acdb
persist.audio.calfile5=/etc/acdbdata/QRD/QRD_Headset_cal.acdb
persist.audio.calfile6=/etc/acdbdata/QRD/QRD_Speaker_cal.acdb
#persist.audio.calfile0=/etc/acdbdata/MTP/MTP_Bluetooth_cal.acdb
#persist.audio.calfile1=/etc/acdbdata/MTP/MTP_General_cal.acdb
#persist.audio.calfile2=/etc/acdbdata/MTP/MTP_Global_cal.acdb
#persist.audio.calfile3=/etc/acdbdata/MTP/MTP_Handset_cal.acdb
#persist.audio.calfile4=/etc/acdbdata/MTP/MTP_Hdmi_cal.acdb
#persist.audio.calfile5=/etc/acdbdata/MTP/MTP_Headset_cal.acdb
#persist.audio.calfile6=/etc/acdbdata/MTP/MTP_Speaker_cal.acdb
MIUI Camera mod (features unlock)
This is how you unlock those high end features you find on higher end models. To enable the features you need to edit the /etc/device_features/santoni.xml (or /sdcard/device_features/santoni.xml) file. Mostly change false into true to enable them.
Some are also added from other Xiaomi devices.
Download from below.
Camera parameters found:
Code:
support_camera_4k_quality
support_camera_age_detection
support_camera_aohdr
support_camera_audio_focus
support_camera_boost_brightness
support_camera_burst_shoot
support_camera_gradienter
support_camera_hfr
support_camera_manual_function
support_camera_movie_solid
support_camera_peaking_mf
!support_camera_press_down_capture
support_camera_quick_snap
support_camera_record_location
support_camera_shader_effect
support_camera_skin_beauty
support_camera_tilt_shift
support_camera_torch_capture
support_camera_ubifocus
support_camera_video_pause
support_camera_water_mark
Camera 2 API
You can enable Camera 2 API for 3rd party camera apps. Think about manual focus etc.
Add this line to your build.prop:
persist.camera.HAL3.enabled=1
More interesting Camera's: https://forum.xda-developers.com/mi-5/themes/app-collection-camera-modded-t3591177
Better (modded) MIUI Camera
From my friends at 4pda. Much better camera at low light. Also JPEG quality set to 98.
http://4pda.ru/forum/index.php?showtopic=793497&view=findpost&p=57013739
Flash zip in twrp (backup of original camera is made by script)
If you want to do it manualy:
- take the MiuiCamera.apk from the zip
- adb push MiuiCamera.apk /sdcard/
- adb shell
- su
- mount -o remount,rw /system
- cd /system/priv-app/MiuiCamera
- mv MiuiCamera.apk MiuiCamera.apk.ORG
- mv oat oat.ORG
- cp /sdcard/MiuiCamera.apk .
- chmod 644 MiuiCamera.apk
- ls -l
- stop
- sync
- reboot
Enable Dalvik JIT (Android 6)
Add this line to your build.prop file:
debug.usejit=true
When cleaning the dalvik cache your phone will boot much faster. Don't have to wait for 5 or 10 minutes anymore
Test Color Notification Led
See here: http://en.miui.com/thread-605570-1-1.html
EDIT 15 sep 2017:
Color Notification led support: http://en.miui.com/thread-850569-1-1.html
or at the source: http://4pda.ru/forum/index.php?showtopic=841683&st=0#entry64978644
Change MIUI theme and launcher
You can change variables of the package (apk) using MIUI themes. But you can also change the default theme.
The default theme is located at /system/media/theme/default
Changes to the MIUI Launcher (home screen) can easily made. It is a zip file (com.miui.home.zip) with a theme_values.xml in it. Change or add values to the xml file, copy it to /system/media/theme/default/com.miui.home and reboot.
Note that the zip has no extension when you copy it to the folder!!! It must have the name of the package.
Below you find an example of a 5x6 launcher grid. If you want to know more better search google with MIUI_Theme_Values
You can do this for example also with MiuiSystemUI.apk (com.android.systemui) and many more
Alternative CPU core control
There are 4 performance cpu's (cpu 0123) and 4 powersave cpu's (cpu 4567). Depending on the task load they increase or decrease their cpu frequency. But they can also switch on or off. Default 2 perf cores and all 4 power cores stay on.
I modified the /etc/init.qcom.post_boot.sh script for the purpose that only 1 perf and 1 power core stay on with no task load. This consumes less power and increases battery life.
Copy init.qcom.post_boot.sh.txt to /etc/init.qcom.post_boot.sh and reboot. Don't forget to make a copy.
Code:
echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
### power cluster min 1 cpu max 4, busy up/down from 0000 to 68 and 40, perf cluster up like 80+
### prefer (low-)power cores cpu4567 up before perf cores cpu0123 (high power consumtion)
echo "80 85 90 95" > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres #68, only looks at 1st value
echo 68 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
echo 40 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
### Wait x ms before switching core off, you might need it again
echo 500 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms #100 (test .5 sec)
echo 500 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms #100 (test .5 sec)
Resurrection Remix strange adb shell prompt
Change /etc/mkshrc, comment last 3 lines
Code:
}$HOSTNAME:${PWD:-?} '"$PS1 "
#if [ "z$ANDROID_SOCKET_adbd" != "z" ]; then
# resize
#fi
Force battery charge to 90%
Code:
# Charge only up to 89% instead of 100% for longer battery life? cat /sys/class/power_supply/battery/voltage_now
echo 4260 > /sys/class/power_supply/battery/voltage_max # 4400 (nominal 3.85V)
My additions to build.prop (/vendor/build.prop)
This is my current /vendor/build.prop and the big advantage is that you can leave your ROM's /system/build.prop as it is. The /vendor/build.prop will overwrite settings from /system/build.prop!
High wakelock with low signal data connection? Try this in build.prop
ro.ril.wake_lock_timeout=2000
Ps: Check for property errors direct after reboot with: dmesg | grep prop
Code:
### always check values with "dmesg | grep prop"
### /default.prop
### /system/build.prop
### /vendor/build.prop (*)
### /factory/factory.prop
### /data/local.prop
### tweakradje RR 5.8.4/5
lockscreen.rot_override=true
#ro.radio.noril=true
# dumpsys SurfaceFlinger will give 1920x1200 density of 295 dpi
#ro.sf.lcd_density=295
#30% faster app loading?
sys.use_fifo_ui=1
# pm multitask def = 6
persist.pm.multitask=8
#ro.recents.grid=true
ro.cutoff_voltage_mv=3200
ro.config.swap=false
ro.config.zram=false
ro.sys.sdcardfs=true
ro.ril.wake_lock_timeout=2000
persist.radio.aosp_usr_pref_sel=true
#ro.audio.offload_wakelock=true (default)
#audio.offload.ignore_setawake=false (default)
#opengl 3d hw accel
debug.egl.hw=1
# hw compositing, if 0 then always software
debug.sf.hw=1
#sys.hwc.gpu_perf_mode=1
### composition valid if debug.sf.hw=0 (and sys.hwc.gpu_perf_mode=0)
#debug.composition.type=c2d
debug.composition.type=mdp
ro.sf.compbypass.enable=0
# use development settings for force gpu
#persist.sys.ui.hw=true
debug.gr.numframebuffers=3
#no debug messages
debug.hwui.level=0
#debug.egl.swapinterval=-1 (def)
#debug.egl.swapinterval=0
#HWUI properties
#ro.hwui.texture_cache_size=72
#ro.hwui.layer_cache_size=48
#ro.hwui.r_buffer_cache_size=8
#ro.hwui.path_cache_size=32
#ro.hwui.gradient_cache_size=1
#ro.hwui.drop_shadow_cache_size=6
###ro.hwui.texture_cache_flushrate=0.4
#ro.hwui.text_small_cache_width=1024
#ro.hwui.text_small_cache_height=1024
#ro.hwui.text_large_cache_width=2048
#ro.hwui.text_large_cache_height=2048
###ro.hwui.fbo_cache_size=32
#debug.hwui.skip_empty_damage=true
#debug.hwui.use_buffer_age=true
#debug.hwui.enable_partial_updates=true
#debug.hwui.render_dirty_regions=true
#debug.hwui.disable_draw_defer=false
#debug.hwui.disable_draw_reorder=true
#debug.choreographer.vsync=false
#debug.choreographer.frametime=false
#debug.choreographer.skipwarning=20
# Use UBWC
###debug.gralloc.map_fb_memory=0
###debug.gralloc.enable_fb_ubwc=1
# 0 = force to enable scrollingCacheEnabled regardless of app setting
# 1 = default is to enable scrollingCacheEnabled unless app specifies
# 2 = default is to disable scrollingCacheEnabled unless app specifies
# 3 = force to disable scrollingCacheEnabled regardless of app setting
persist.sys.scrollingcache=3
ro.config.max_starting_bg=12
#ro.sys.fw.bg_apps_limit=20
ro.config.vc_call_vol_steps=14
ro.config.media_vol_steps=30
#ro.hardware.egl=adreno
#perstist.power.usetwilightadj=true
# JIT Android 6
debug.usejit=true
# JIT Android 7
#dalvik.vm.usejit=true
#dalvik.vm.usejitprofiles=true
#ro.core_ctl_min_cpu=0
#ro.min_freq_0=200000
#ro.min_freq_0=384000
#ro.min_freq_4=384000
### EXTRA CAMERA ###
###https://android.googlesource.com/platform/hardware/qcom/camera/+/9fc7225504a6f969bd7277c1070f0b91b0ce4874/msmcobalt/QCamera2/HAL/QCameraParameters.cpp
###https://android.googlesource.com/platform/hardware/qcom/camera/+/nougat-dev/QCamera2/HAL/QCameraParameters.cpp
persist.sys.camera-sound=0
persist.camera.HAL3.enabled=1
###https://android.googlesource.com/platform/hardware/qcom/camera/+/f9a41d251fab1320345588e7654a1b0f4c70ae1c/QCamera2/stack/common/cam_types.h
#-persist.camera.hal3.feature=32
### HAL3 High Frame Rate
#-persist.camera.hal3hfr.enable=1
#-persist.camera.hal3.force.hdr=0
#persist.camera.perflock.enable=1
# fps def is 60
persist.camera.disp.fps=30
persist.camera.max.previewfps=30
#persist.camera.pdaf.enable=1
# focus call back (def 1)
#-persist.camera.depth.focus.cb=0
#persist.camera.disp.num_vsync=4
#persist.camera.disp.ms_to_vsync=2
#persist.camera.disp.filter_max=2
#persist.camera.disp.filter_min=4
# thumbnail needed
#-persist.camera.tn.disable=0
# anti banding 0 1=auto 2=50Hz 1=60Hz
#persist.camera.set.afd=2
# 0=disable 1=with aggressive AEC 2=with fast AEC
#-persist.camera.instant.capture=2
#-persist.camera.instant.aec=2
#persist.camera.dt=0
#persist.camera.vc=0
### adb shell setprop persist.camera.effect <effect>
### none,mono,negative,solarize,sepia,posterize,whiteboard,blackboard,aqua,emboss,sketch,neon,beauty
#persist.camera.effect=none
### check for raw images /data/misc/camera folder!
#persist.camera.raw.dump=0
#persist.camera.raw.debug.dump=0
# raw format 16(yuv?) 17 or 18
#persist.camera.raw.format=17
#persist.camera.raw.subformat=
#persist.camera.raw_yuv=0
#persist.camera.zsl_raw=0
#persist.camera.snapshot_raw=20
# nr buffers, adb shell setprop persist.camera.preview_yuv 20 <20 preview buffers>
#persist.camera.preview_yuv=0
#persist.camera.preview_raw=0
#persist.camera.video_raw=0
# raw data i? mode
#persist.camera.rdi.mode=disable
#persist.camera.offlineraw=0
### manual exposure, enables persist.camera.exposure.time
#persist.camera.manual.capture=1
### adb shell setprop persist.camera.exposure.time "exposure time" (in millisec) 10 = 1/100
#persist.camera.exposure.time=10
#persist.camera.initial.exp.val=10
# 1=CAM_ISO_MODE_DEBLUR 100 200 ...
#persist.camera.iso=1
#persist.camera.continuous.iso=100
#correlated double sampling mode on off auto(def) (noise reduction)
#persist.camera.CDS=on
#persist.camera.video.CDS=auto
# TemporalDenoise (Supported at all?)
#persist.camera.tnr_cds=1
#persist.camera.tnr.snapshot=on
#persist.camera.tnr.video=on
#persist.camera.tnr.preview=on
# Low light noise feature is to avoid noise seen at the snapshot frame edges due to WNR processing
#persist.camera.llnoise=0
# low light capture
#persist.camera.llc=1
# 0=CAM_WAVELET_DENOISE_YCBCR_PLANE
# 1=CAM_WAVELET_DENOISE_CBCR_ONLY
# 2=CAM_WAVELET_DENOISE_STREAMLINE_YCBCR
# 3=CAM_WAVELET_DENOISE_STREAMLINED_CBCR
#persist.denoise.process.plates=2
#persist.tnr.process.plates=2
#persist.camera.tintless=enable
# Burst LED on period 1-799 def 300
#persist.camera.led.on.period=150
#persist.camera.secure.mode=disable
#camera.lowpower.record.enable=1
#cpp or vfe scaling
#persist.camera.pp_scaling=0
#persist.camera.ltmforseemore=1
#persist.camera.preview.seemore=1
#persist.camera.liveshot.size=1280x720
#persist.camera.stats.af.paaf=1
#persist.camera.preview.ubwc=1
# high temp? then lower fps (or frameskip)
persist.camera.thermal.mode=fps
#persist.camera.batchcount=0
#persist.camera.video.batchsize=6
#persist.camera.opt.livepic=1
# Chromatic Aberation enabled? Check logcat grep -i chroma
# E mm-camera: <IMGLIB><ERROR> 695: module_cac_handle_aec_update: module_cac_handle_aec_update 695: Invalid chromatix ptr
#persist.camera.feature.cac=1
persist.camera.eis.enable=1
# preferred IS type for 8937 is IS_TYPE_DIS i.e, 1
# IS_TYPE_NONE=0, IS_TYPE_DIS=1, IS_TYPE_GA_DIS=2, IS_TYPE_EIS_1_0=3, IS_TYPE_EIS_2_0=4 IS_TYPE_MAX=5
persist.camera.is_type=4
persist.camera.is_type_preview=4
#CAMERA_LONGSHOT_STAGES=4
#persist.camera.longshot.stages=1
#persist.camera.longshot.max=5
#persist.camera.longshot.shotnum=5
#persist.camera.longshot.save=0
# use jpeg burst if persist.camera.longshot.save=0
#persist.camera.jpeg_burst=1
### Check whether shutter should be triggered immediately after capture
persist.camera.feature.shutter=1
#persist.camera.facedetect=1
#persist.camera.snapshot.fd=1
# face detect in video 0 1 2(only for focus)
#persist.camera.fdvideo=1
#persist.camera.mem.usepool=1
# video shooting ION cache, disable for faster shooting
persist.camera.mem.usecache=0
persist.sys.exif.make=Xiaomi
persist.sys.exif.model=Redmi 4X Tweakradje
#persist.camera.auto.hdr.enable=enable
### dual camera range finding
persist.camera.dcrf.enable=0
### multi_pass cause 3/4 green effect when zoomin
persist.camera.multi_pass=0
#persist.camera.zsl.mode=1
#persist.camera.zsl.interval=1
#persist.camera.zsl.backlookcnt=2
#persist.camera.zsl.queuedepth=2
#persist.camera.zsl.buffer.size=
# zigzag hdr
#persist.camera.hdr.outcrop=enable
persist.camera.zzhdr.enable=1
persist.camera.zzhdr.video=1
# disable UBWC (universal bandwidth compression) if enable eztune
#debug.gralloc.gfx_ubwc_disable=0
#persist.camera.eztune.enable=0
#persist.camera.perf.memlimit=0x800
#persist.camera.capture.animate=1
camera.qcom.misc.disable=0
persist.ts.rtmakeup=0
#persist.camcorder.4k.nolimit=1
#persist.camcorder.eis.maxfps=30
#debug.camera.yv12=true
#debug.camera.preview.flip=90
#debug.camera.video.flip=90
#debug.camera.picture.flip=90
#ClearSight? settings
#persist.camera.cs.threshold=0xf4240 clearsight threshold (long)
#persist.camera.cs.burstcount=4
#persist.camera.cs.dumpframes=0
#persist.camera.cs.timeout=0x12c
#ro.miui.screen_layout_size=3
#ro.sys.oosenhance.enable=true
#ro.sys.oosenhance.timer=2000
#debug.oosenhance.turnon=true
### EXTRA AUDIO ###
# resampler DEFAULT=0
# OLD values LOW_QUALITY=1(1st order) MED_QUALITY=2(3rd order) HIGH_QUALITY=3(fixed multi-tap FIR) 4 VERY_HIGH_QUALITY
# 1-3 AudioResampler: Assertion failed: format != AUDIO_FORMAT_PCM_16_BIT /system/lib/libaudioresampler.so (_ZN7android14AudioResampler6createE14audio_format_tiiNS0_11src_qualityE+1024)
# Using the new DYN_*_QUALITY resamplers (modes 5-7) allows floating point audio to work. 8 works too
af.resampler.quality=7
# cat /proc/asound/card0/id -> msm8920sku7sndc -> /etc/acdbdata/QRD/msm8920-sku7-snd-card
### QRD (Qualcomm Reference Design) or MTP Audio Calibration files?
#persist.audio.calfile0=/etc/acdbdata/MTP/MTP_Bluetooth_cal.acdb
#persist.audio.calfile1=/etc/acdbdata/MTP/MTP_General_cal.acdb
#persist.audio.calfile2=/etc/acdbdata/MTP/MTP_Global_cal.acdb
#persist.audio.calfile3=/etc/acdbdata/MTP/MTP_Handset_cal.acdb
#persist.audio.calfile4=/etc/acdbdata/MTP/MTP_Hdmi_cal.acdb
#persist.audio.calfile5=/etc/acdbdata/MTP/MTP_Headset_cal.acdb
#persist.audio.calfile6=/etc/acdbdata/MTP/MTP_Speaker_cal.acdb
# calibrate speaker duration (0) if spk prot true
persist.speaker.prot.enable=false
#persist.spkr.cal.duration=50
# audio, offload to audio hardware
audio.offload.disable=false
audio.offload.buffer.size.kb=256
av.streaming.offload.enable=true
audio.offload.multiple.enabled=true
ro.audio.max_fast_tracks=8
ro.audio.flinger_standbytime_ms=500
audio_hal.period_multiplier=2
#audio_hal.period_size=192
audio_hal.in_period_size=50
#Qualcomm Immersive Audio Noise Cancellation (Fluence), Pro is quadmic
#ro.qc.sdk.audio.fluencetype=fluencepro
#ro.qc.sdk.audio.fluencetype=fluence
#ro.qc.sdk.audio.fluencetype=none
#persist.audio.fluence.voicecall=true
#persist.audio.fluence.audiorec=false
persist.audio.fluence.mode=endfire
#persist.audio.fluence.mode=broadside
#rec.playback.conc.disabled=false
#surround recording
ro.qc.sdk.audio.ssr=false
# dump recording /data/misc/audio/ssr_input_3ch.pcm
#ssr.pcmdump=true
# acdb full freq spectrum on speakers ACDB 131
# persist.audio.FFSP.enable=true -> gives acdb error in logcat!!!
# native audio?
audio.nat.codec.enabled=true
persist.audio.hifi.int_codec=true
# active noise cancelation
#persist.aanc.enable=1
#persist.headset.anc.type=
#persist.audio.vbat.enabled=true
#libdirac.so also /vendor/etc/diracmobile.config
audio.dirac.logging=0
#persist.audio.dirac.headset=5
#persist.audio.dirac.eq=
#persist.audio.dirac.music.state=0
# not complete lib files to enable dirac in RR
persist.audio.dirac.speaker=false
#
use.dts_eagle=false
persist.bt.max.hs.connections=4
persist.bt.max.a2dp.connections=4
persist.bt.enableAptXHD=true
persist.service.bt.a2dp.sink=false
#ro.bluetooth.hfp.ver=1.5
#ro.bluetooth.hfp.ver=1.6
ro.bluetooth.hfp.ver=1.7
#persist.bluetooth.disableabsvol=true
#wc_transport.force_special_byte=true
#bt.pts.certification=true
audio.dolby.ds2.enabled=false
audio.dolby.ds2.hardbypass=true
### EXTRA NETWORK ###
ro.net.dns_cache_size=1500
net.dns.cache_size=1500
net.dns.cache_ttl=1800
net.http.threads=20
net.dns2=8.8.8.8
### EXTRA SQLITE ###
# find /data/data \( -name *-journal -o -name *-wal -o -name *-shm \) -exec rm {} \;
#debug.sqlite.journalmode=DELETE
#debug.sqlite.syncmode=FULL
#debug.sqlite.pagesize=
#sqlite Write Ahead Logging on? creates big WAL files and shm (shared mem) files, log 512KB
debug.sqlite.journalmode=WAL
debug.sqlite.wal.autocheckpoint=0
debug.sqlite.wal.syncmode=FULL
debug.sqlite.journalsizelimit=524288
#debug.sqlite.wal.poolsize=
If you have more interesting mods don't hesitate to post them and I will add them to the OP.
EDIT 5 sep 2017: added new RR init script (v2), better CPU cores and audio !!! v2 might cause battery drain, then v3
EDIT 8 sep 2017: added /etc/wifi/WCNSS_qcom_cfg.ini for 40 Mhz channel on 2.4Ghz
added new RR init script (v3) for better battery life
EDIT 15 oct 2017: removed mixer_paths.xml, use stock. Changes applied to new mixer_paths_qrd_sku1.xml
EDIT 21 oct 2017: added V4 for RR, better target_loads for big/little CPU's
EDIT 31 oct 2017: added V5 for RR, better big perf/little lowpower cpu switching. Perf cpu minimal is 0. Most tasks done with lowpower cpu's. Can run youtube for almost 11 hours now!
EDIT 4 nov 2017: Noticed one little error in V5 RR script.
Echo Y > /sys/module/workqueue/parameters/power_efficient
should be
echo Y > /sys/module/workqueue/parameters/power_efficient
EDIT 16 nov 2017: V6 RR script. Optimal use of RAM. Tested for 3 GB only. All apps stay in ram. Almost no swapping. Example, Chrome keep tabs without reloading. Antutu score now 46350!
EDIT 20 nov 2017: V7 RR script. Create 512 MB ZRAM swap if RAM < 2GB and don't lower swappiness (only for 3 GB)
Little change for V7 script:
### tweakradje use small cores to the max before switch to big cores (antutu only 35000 instead of 46000)
echo 0 > /dev/cpuctl/cpu.upmigrate_discourage
EDIT 23 nov 2017: added stereo recording in AAC with Redmi 4X (speakers cyburg needles with Tangband w3-881sjf https://www.youtube.com/watch?v=MsgAFoTghvw )
EDIT 2 dec 2017: little corrections in V7 RR script and changed to flashable zip.
EDIT 6 jan 2018: change emmc max freq from 200 to 300 MHz. Increase the read speed from 80Mb/s to 120 Mb/s (note: you can try 400 or 500 Mhz. Might cause reboot, please report back) Test with busybox hdparm -tT /dev/block/mmcblk0p49
EDIT 13 feb 2018: V9 of the script. Added tweaked deviceidle (doze) settings. Device looses 0-1% overnight!
EDIT 15 feb 2018: V10 of the script. Improved Light/Deep Doze settings with documentation in the script. Put your email app in the whitelist too!!!
EDIT 18 feb 2018: V11 ready. Won battle with Google Play Services that reset the device_idle_constants to "null" every few hours. Solution: pm disable --user 0 com.google.android.gms/.phenotype.service.sync.PhenotypeConfigurator
Doze settings and explanation are in the script for those who want to change some timings. The script sets it to this scheme:
- Enter light doze after screen off
- Light maintenance windows every 5 minutes
- Enter Deep doze after 15 minutes (enter deep if there is no alarm within 5 minutes from now, was 1 hour)
- Deep maintenance windows every hour
- Whatsapp and Gmail white listed (can do their thing regardless of doze state)
- No delays for phone motion or whatever
EDIT 8 mar 2018: updated some audio related files with comments in it. Change to your liking , now awesome high quality good calibrated stereo sound recording!!
EDIT 6 apr 2018: V13 of the init script. Changed things like min/max cpu speed for custom kernel
EDIT 9 apr 2018: flashable scripts now create backup of replaced files if not exist. (*.ORG)
EDIT 25 may 2018: V15 of the init script for 7.x Nougat ROMs.
EDIT 16 jun 2018: V16 of the init script for 7.x Nougat ROMs (LAST AND FINAL!)
Cheers
PLEASE don't quote first post. Waste of space and it will change anyway. THANKS
Data partition is encrypted
I found that the data partition is encrypted when coming from Miui ROM to RR. Fingerprint is not working with encrypted data partition.
Data is encrypted if TWRP asks for unlock code.
These steps decrypts it and preserves data.
Code:
- Boot into TWRP
- Backup /data to "internal sd" (or to "ext sd card") with TWRP
- On PC: adb pull /data/media/0
- Wipe -> Format /data in TWRP
- Reboot to TWRP again
- On PC: adb push . /data/media/0
- On PC: adb shell chown -R media_rw.media_rw /data/media/0
- Reboot to TWRP again
- Restore the previous backup with TWRP
- On PC: adb shell rm /data/system/locksettings* /data/system/*.key
- On PC: adb shell rm -r /data/dalvik*
- Reboot
Change Doze (deviceidle) settings
On the device you can change the Doze settings very easy. First list the Doze settings to get all current parameters:
Code:
dumpsys deviceidle
Then change parameters by setting some variables in the Android Global Settings db:
Code:
settings put global Phenotype_flags device_idle_constants
settings put global device_idle_constants inactive_to=300000,idle_after_inactive_to=300000
Enable light doze too (mLightEnabled=true mDeepEnabled=true)
Code:
dumpsys deviceidle enable all
Add whatsapp and gmail to the whitelist
Code:
dumpsys deviceidle whitelist +com.whatsapp +com.google.android.gm
Note: Google Play Services reset the device_idle_constants to "null" every few hours. Solution: pm disable --user 0 com.google.android.gms/.phenotype.service.sync.PhenotypeConfigurator
See more info in post above
Use Fingerprint sensor as button
As you might know hardware keys have keycodes. These keycodes can be found using an app like KeyEvent Dipslay
The mapping between Keycode and Function is done in the kl files in the folder /system/usr/keylayout
To map the Fingerprint key (Keycode 353) you use the gf3208.kl file.
Code:
#key 353 ENTER
#key 353 CAMERA
#key 353 MENU
key 353 SLEEP
Reboot for effect. This will not effect the Fingerprint function.
Super audio for Resurrection Remix
To enable HD audio for headphones and other audio tweaks for RR (maybe for Miui too)
Add these lines to the end of your build.prop
Code:
audio.offload.disable=false
audio.offload.buffer.size.kb=1024
persist.audio.FFSP.enable=true
audio.nat.codec.enabled=true
persist.audio.hifi.int_codec=true
persist.audio.dirac.speaker=false
use.dts_eagle=true
Some tweaks for camera driver
To enable some extra features to play with. You can add these to the end of your build.prop
For the stock camera on RR ROM make sure you disable Color Denoise setting.
Code:
#persist.camera.liveshot.size=1280x720
persist.camera.HAL3.enabled=1
persist.camera.hal3hfr.enable=1
persist.camera.ltmforseemore=1
persist.camera.led.on.period=500
persist.camera.stats.af.paaf=1
persist.camera.manual.capture=1
# high temp? then lower fps (or frameskip)
persist.camera.thermal.mode=fps
persist.camera.opt.livepic=1
# Chromatic Aberation enabled? Check logcat grep -i chroma
# E mm-camera: <IMGLIB><ERROR> 695: module_cac_handle_aec_update: module_cac_handle_aec_update 695: Invalid chromatix ptr
persist.camera.feature.cac=1
persist.camera.eis.enable=1
persist.denoise.process.plates=2
persist.camera.longshot.stages=1
persist.camera.facedetect=1
persist.camera.snapshot.fd=1
# face detect in video 0 1 2(only for focus)
persist.camera.fdvideo=1
persist.camera.mem.usepool=1
persist.camera.mem.usecache=5000000
persist.sys.exif.make=Xiaomi
persist.sys.exif.model=Redmi 4X
persist.camera.feature.shutter=1
persist.camera.auto.hdr.enable=1
persist.camera.tintless=1
#persist.camera.continuous.iso=200
#persist.camera.exposure.time=
# dual camera range finding
persist.camera.dcrf.enable=0
persist.camera.multi_pass=1
persist.camera.zsl.mode=1
persist.camera.zsl.interval=1
persist.camera.zsl.backlookcnt=2
persist.camera.zsl.queuedepth=2
# zigzag hdr
persist.camera.zzhdr.enable=1
persist.camera.zzhdr.video=1
persist.camera.eztune.enable=0
# TemporalDenoise (Supported at all?)
persist.camera.tnr_cds=1
persist.camera.tnr.snapshot=1
persist.camera.tnr.video=1
persist.camera.tnr.preview=1
# low light noise enabled?
persist.camera.llnoise=1
More will follow
oke thanks
Sipppp
Mine has rgb led. See led test script in OP. But even in RR rom it is not suported. Pitty. Perhaps support will come later. I've seen users with tasker scripts to make it work.
Very thanks for the cpu control you have created, my backup is now nearly +30% thanks again and also for camera mod keep up the good work:good:
Abugk said:
Does this redmi 4x has RGB LED . Can you please confirm it ?
From these screenshots I'm assuming that it has a RGB LED . How can I enable it ?
Click to expand...
Click to collapse
Easiest way to get it is install camera mod.
For just led colors, change the line on /system/etc/device_features/santoni.xml
Code:
<bool name="support_led_color">[B]true[/B]</bool>
Wow. Great work... cant wait to try these one too. Thanks
Hi, how can I use your CPU cores tweak in MIUI 9?
Thanks!
You can take the RR version. Make copy of your original file first!
Cheers
Anyone running RR with my V2 script having battery drain issues? I have since yesterday.
I am now running new script to test battery drain. The change is to disable all these
low power modes again. Lets see tomorrow.
Oh and if you see the notification led blinking purple after reboot? The V3 script switches it
off again after 3 sec.
Can everything here useful for any rom with nougat or just RR?
Not everything. A lot is MIUI related.
Except the things that are qualcomm related like xml files and init files.
RR files are for nougat in general.
But always make a copy of your original file first!!!
can u make text percentage only mod for miui9 global. this option is present in miuipro
tweakradje said:
Not everything. A lot is MIUI related.
Except the things that are qualcomm related like xml files and init files.
RR files are for nougat in general.
But always make a copy of your original file first!!!
Click to expand...
Click to collapse
So , that means ,these tweaks can be used in miui9???
Sure. Make copy first so that you can always go back to original.
tweakradje said:
Anyone running RR with my V2 script having battery drain issues? I have since yesterday.
I am now running new script to test battery drain. The change is to disable all these
low power modes again. Lets see tomorrow.
Oh and if you see the notification led blinking purple after reboot? The V3 script switches it
off again after 3 sec.
Click to expand...
Click to collapse
Me too, mine dropped 10% after a night with wifi and data off.
I'm on RR build 170815.
Thanks for the feedback. I use v3 of the script now for 2 days and battery is perfect. Try it. After install switch off the phone completely ( no reboot ) and then switch it on again. It worked for me.
tweakradje said:
Thanks for the feedback. I use v3 of the script now for 2 days and battery is perfect. Try it. After install switch off the phone completely ( no reboot ) and then switch it on again. It worked for me.
Click to expand...
Click to collapse
How to install it? your cpu Config, Iam using 8.2..10 and have copied the txt to my sh file, i already save it and set to rwrr too, but cpu config still default, even after i restart my phone.. still default config cpu running helpppp
You have to remove the txt extension. Then copy it over existing file. Check permissions and then reboot.
Don't edit file. It has unix EOL in it.
thanks for your advice, i have tried it.. is RRV3 version have same config as default? 2 perf 4 power cpu on?

Getting UART working

Hello,
I'm trying to get UART output of gt-s6500d, but it's not working.
I've connected 620kΩ resistor between GND and ID pin, I got messages "AST_POWERON" and "BOOTING COMPLETED", however I cannot send anything on my own.
I'v tried
Code:
su;
echo "test" > /dev/ttyMSM0
(as well as tty0, ttyHS0, ttyGS0, ttyGS1) but nothing worked so far.
UART settings: 115200baud, no parity, no flow control, 1 stop bit, 8 data bits.
I've RS-232 connector powered with 3.3V, phone sends 1.8V signal but considering PC can read those two messages I assume this part is okay, I haven't connected phone VCC line, only ground, ID and TX.
Stock software and kernel, Android 2.3.6(S6500DXXMD1), kernel 2.6.38.6, phone is rooted and contains CWM recovery
Update 2018-09-28:
As it turns out 620kΩ resistor is ideal to get bootloader data, not sure if it even work with kernel, but I needed to add line
Code:
/dev/ttyHSL0 0660 system system
to ueventd.rc in initram to get one additional line on boot: "AST_UPLOAD" but the phone now is in a boot loop, maybe the boot.img is broken so bootloader send this information that uploading new boot.img is needed and restarts itself?
Bootloader outputs info with following resistors:
* 619kΩ (automatic boot)
* 150kΩ (manual boot)
* ~520kΩ probably works too
As it turn out I am unable to set cmdline to console=ttyMSM0 to allow any output from kernel, something (I think that may be bootloader) append this to cmdline:
Code:
console=null androidboot.hardware=qcom hw=3 androidboot.emmc=true androidboot.serialno=25db5e2a androidboot.baseband=msm
hardcoding cmdline into kernel seems only option for now
I'll update the post if I find out more

creating my 1st module: but service.sh never run

Magisk v19.3 on lineageos 16.0 for wt86047
trying to create my first module, no files to replace, just one task: run a remove.sh script
I put following two lines in ./common/service.sh , but there's no file created after boot , seems the service.sh itself never be run at all.
echo -e "\n------------${MODPATH}----------------------------" >> /sdcard/s.txt >&1
sh ./remove.sh
LATESTARTSERVICE=true in ./install.sh --YES
./META-INF/com/google/android/update-binary updated --YES
./module.prop edited --YES
the module installed with no error --YES
manual run remove.sh successfully in terminal after reboot --YES
called from service.sh --NO
need help, THANK YOU!
attached remove.sh
Code:
#!/system/bin/sh
DIRFILE="/sdcard/dir"
if [ -f "$USRFILE" ];then
while IFS= read -r LINE
do
if [ -n "${LINE}" ];then
...
...
fi
I haven't looked at what might be your issue, but you don't need a module for that... Just place your remove.sh script in /data/adb/service.d and give it execution permission.
Didgeridoohan said:
I haven't looked at what might be your issue, but you don't need a module for that... Just place your remove.sh script in /data/adb/service.d and give it execution permission.
Click to expand...
Click to collapse
thanks. but it doesn't work either.
When I manually run the script from terminal, it prompt 'Permission denied.'
But it works after execute 'su' first.
Is this the reason? But how could I authorise root right to the script since it doesn't pop dialogbox at all.
Again, I haven't looked at your script at all, but...
Any scripts run by Magisk at boot will run with superuser permission. That's not your issue...
Might be that the script has to run after boot is completed (if it works while booted but not during boot). You can look for the sys.boot_completed and when it's changed to 1 you can let the script execute.
I use this code in my modules, if it can help
Code:
_SLEEPBOOT=60
# ...
RETRY_INTERVAL=${_SLEEPBOOT} #in seconds
MAX_RETRY=30
retry=${MAX_RETRY}
while (("$retry" > "0")) && [ "$(getprop sys.boot_completed)" != "1" ]; do
sleep ${RETRY_INTERVAL}
((retry--))
done
Didgeridoohan said:
Again, I haven't looked at your script at all, but...
Any scripts run by Magisk at boot will run with superuser permission. That's not your issue...
Might be that the script has to run after boot is completed (if it works while booted but not during boot). You can look for the sys.boot_completed and when it's changed to 1 you can let the script execute.
Click to expand...
Click to collapse
Code:
# Wait for boot to complete
until [ "$(getprop sys.boot_completed)" ]
do
sleep 2
done
insert this code to script but still not work...
after all, found the solution:
don't use '/sdcard/, use '/storage/emulated/0/' instead, don't know why
funnypc said:
Code:
# Wait for boot to complete
until [ "$(getprop sys.boot_completed)" ]
do
sleep 2
done
insert this code to script but still not work...
after all, found the solution:
don't use '/sdcard/, use '/storage/emulated/0/' instead, don't know why
Click to expand...
Click to collapse
Might have worked if you had checked for sys.boot_completed = 1.
But yeah, /sdcard isn't available during boot. To be even more sure it'll work you could use /data/media/0 instead. That's always available (as long as /data is accessible).
Didgeridoohan said:
Might have worked if you had checked for sys.boot_completed = 1.
But yeah, /sdcard isn't available during boot. To be even more sure it'll work you could use /data/media/0 instead. That's always available (as long as /data is accessible).
Click to expand...
Click to collapse
though the script can work alone , I still want make it a module so that could install/disable easier with magisk gui than terminal.
currently I'm add a 'bypass' mode while script load, if volume key pressed repeatly. (like xposed does) but the code can only work after unlock, it seems the getevent can't work after system reboot, before keyguard unlocked. any workaround? thx!
Code:
#!/system/bin/sh
KEYSTRING="KEY_VOLUME"
KEYREPEAT=1
KEYCOUNTS=0
until [ "$(getprop sys.boot_completed)" ]
do
sleep 2
done
setenforce Permissive
echo 300 > /sys/class/timed_output/vibrator/enable
sleep 0.3
for i in `seq 1 4`;
do
EVENT=$(timeout 1 getevent -l -q -c 1)
RESULT=`echo $EVENT | grep -c $KEYSTRING`
input keyevent mouse
if [ "$RESULT" -gt 0 ] ;then
KEYCOUNTS=`expr $KEYCOUNTS + $RESULT`
echo 100 > /sys/class/timed_output/vibrator/enable
fi
done
if [ "$KEYCOUNTS" -gt "$KEYREPEAT" ] ;then
echo 1000 > /sys/class/timed_output/vibrator/enable
fi
Simple, just put your code in the service.sh file of the module instead of a separate script file...
Didgeridoohan said:
Simple, just put your code in the service.sh file of the module instead of a separate script file...
Click to expand...
Click to collapse
can't work. so I put the keypress detection part in a standalone script for debug. just script in service.d folder, not pack to module yet.
if I run the script manually in terminal after keyguard unlocked, everything works as I want
but not when keyguard locked status just after reboot.
funnypc said:
can't work. so I put the keypress detection part in a standalone script for debug. just script in service.d folder, not pack to module yet.
if I run the script manually in terminal after keyguard unlocked, everything works as I want
but not when keyguard locked status just after reboot.
Click to expand...
Click to collapse
I mean the code from your remove.sh file, not the key detecting stuff... That way you can disable the module from the Manager and also from TWRP (or other custom recovery) by placing a disable file in the module directory or enabling Magisk Core Only Mode by placing a .disable_magisk file in /cache.

How to change the value of ro.config.tima Systemless-ly?

Hello!
I am trying to change the value of the 'ro.config.tima' property from 1 to 0 using a boot script and resetprop,
I made a file in /data/adb/post-fs-data.d called 'resetprop.sh' and I put this into it:
Code:
#!/system/bin/sh
resetprop ro.config.tima 0
Then, I gave it execution permissions and rebooted, only to see that the value was still 1...
So I tried again, but this time I added other properties to that file to make sure that the script was running:
Code:
#!/system/bin/sh
resetprop ro.config.tima 0
resetprop ro.boot.warranty_bit 1
resetprop ro.warranty_bit 1
When I rebooted, the other properties changed from 0 to 1; while, the 'ro.config.tima' property stayed at 1.
I then tried a third time, this time I did the exact same thing but put the file in /data/adb/service.d instead, I rebooted and got the same result, the other properties changed to 1 and 'ro.config.tima' stayed at 1.
So then, I tried the "MagiskHide Props Config" Module but when I install it, it causes my whole system to crash and then my device restarts/reboots (Over and over again until I remove the module with TWRP).
Edit: My device is an SM-T350 (Samsung Galaxy Tab A)
Is there any way I can get this property to change to 0 Systemless-ly? Any help would be appreciated.
First try running the command in a terminal emulator. If that changes the value you can try adding a delay to the script before it executes the resetprop command (use service.d).
Didgeridoohan said:
First try running the command in a terminal emulator. If that changes the value you can try adding a delay to the script before it executes the resetprop command (use service.d).
Click to expand...
Click to collapse
When I type it in a Terminal emulator it changes to 0,
So how long of a delay should I add?
JJcoder said:
When I type it in a Terminal emulator it changes to 0,
So how long of a delay should I add?
Click to expand...
Click to collapse
Start with sleep 60 and if that works you can try 30 and so on until you find a value that works and you're comfortable with.
Didgeridoohan said:
Start with sleep 60 and if that works you can try 30 and so on until you find a value that works and you're comfortable with.
Click to expand...
Click to collapse
Thanks, I will let you know if it works.
Didgeridoohan said:
Start with sleep 60 and if that works you can try 30 and so on until you find a value that works and you're comfortable with.
Click to expand...
Click to collapse
Unfortunately, it did not work. Is there anything else I can try? This is what I have in the 'resetprop.sh' file located in /data/adb/service.d:
Code:
#!/system/bin/sh
sleep 60
resetprop ro.config.tima 0
JJcoder said:
Unfortunately, it did not work. Is there anything else I can try? This is what I have in the 'resetprop.sh' file located in /data/adb/service.d:
Code:
#!/system/bin/sh
sleep 60
resetprop ro.config.tima 0
Click to expand...
Click to collapse
If 60 doesn't work, try a longer time...
Didgeridoohan said:
If 60 doesn't work, try a longer time...
Click to expand...
Click to collapse
I tried 100, 300, 500, even 1000 and none of them have worked...
How much longer do I have to go? Or am I going to have to do something else?
Try something like this:
Code:
LOC="/data/media/0/tima_test.txt"
echo "$(date +"%H:%M:%S")" > $LOC
resetprop -v ro.config.tima 0 >> $LOC
until [ "$(getprop ro.config.tima)" == 1 ]; do
sleep 1
done
echo "$(date +"%H:%M:%S")" >> $LOC
resetprop -v ro.config.tima 0 >> $LOC
getprop ro.config.time >> $LOC
That is pure untested air code, but in theory it should let us know if the prop value resets to 1 sometime after boot, and when it happens. If nothing else, it might give us some info on what happens when resetprop runs on that prop (but unless something is wrong it'll likely not show anything).
All the info should be in the tima_test.txt file on your internal storage. Wait a good while before you check it...

Categories

Resources