- Jan 3, 2020
- 29
- 15
I can't turn on notification light too. Even when I do the full check of the phone, there is no "LED Notification Light" option, as it is shown in some video reviews.How to turn on led lights? Please help to enable led.
Gửi từ Redmi K30 của tôi bằng cách sử dụng Tapatalk
.method static public setLight_native_patched(IIIIII)V
.registers 15
const/4 v0, 0x3
if-eq p0, v0, :check_color_mode_write
const/4 v0, 0x4
if-eq p0, v0, :check_color_mode_write
goto :call_native
:check_color_mode_write
if-nez p1, :color_is_not_0_check_mode
:write_0_0
new-instance v0, Ljava/io/FileWriter;
const-string v1, "/sys/class/leds/white/breath"
invoke-direct {v0, v1}, Ljava/io/FileWriter;-><init>(Ljava/lang/String;)V
const-string v1, "0"
invoke-virtual {v0, v1}, Ljava/io/FileWriter;->write(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/FileWriter;->close()V
new-instance v0, Ljava/io/FileWriter;
const-string v1, "/sys/class/leds/white/brightness"
invoke-direct {v0, v1}, Ljava/io/FileWriter;-><init>(Ljava/lang/String;)V
const-string v1, "0"
invoke-virtual {v0, v1}, Ljava/io/FileWriter;->write(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/FileWriter;->close()V
:write_0_0_end
.catch Ljava/lang/Exception; {:write_0_0 .. :write_0_0_end} :catch_write_0_0
goto :return
:color_is_not_0_check_mode
if-nez p2, :mode_is_not_0
:write___4
new-instance v0, Ljava/io/FileWriter;
const-string v1, "/sys/class/leds/white/brightness"
invoke-direct {v0, v1}, Ljava/io/FileWriter;-><init>(Ljava/lang/String;)V
const-string v1, "4"
invoke-virtual {v0, v1}, Ljava/io/FileWriter;->write(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/FileWriter;->close()V
:write___4_end
.catch Ljava/lang/Exception; {:write___4 .. :write___4_end} :catch_write___4
goto :return
:mode_is_not_0
new-instance v0, Ljava/io/FileWriter;
const-string v1, "/sys/class/leds/white/breath"
invoke-direct {v0, v1}, Ljava/io/FileWriter;-><init>(Ljava/lang/String;)V
const-string v1, "1"
invoke-virtual {v0, v1}, Ljava/io/FileWriter;->write(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/FileWriter;->close()V
:mode_is_not_0_end
.catch Ljava/lang/Exception; {:mode_is_not_0 .. :mode_is_not_0_end} :catch_mode_is_not_0
goto :return
:catch_write_0_0
:catch_write___4
:catch_mode_is_not_0
move-exception v0
const-string v1, "LightsService"
const-string v2, "setLight_native_patched exception"
invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto :return
:call_native
move v0, p0
move v1, p1
move v2, p2
move v3, p3
move v4, p4
move v5, p5
invoke-static/range {v0 .. v5}, Lcom/android/server/lights/LightsService;->setLight_native(IIIIII)V
:return
return-void
.end method
public static void setLight_native_patched(int i, int i2, int i3, int i4, int i5, int i6) {
if (i != 3 && i != 4) {
setLight_native(i, i2, i3, i4, i5, i6);
} else if (i2 == 0) {
FileWriter fileWriter = new FileWriter("/sys/class/leds/white/breath");
fileWriter.write("0");
fileWriter.close();
FileWriter fileWriter2 = new FileWriter("/sys/class/leds/white/brightness");
fileWriter2.write("0");
fileWriter2.close();
} else if (i3 == 0) {
FileWriter fileWriter3 = new FileWriter("/sys/class/leds/white/brightness");
fileWriter3.write("4");
fileWriter3.close();
} else {
FileWriter fileWriter4 = new FileWriter("/sys/class/leds/white/breath");
fileWriter4.write(SplitScreenReporter.ACTION_ENTER_SPLIT);
fileWriter4.close();
}
}
Can you explain why hacking the setLight_native method is necessary? This guy seem to be able to get it to work with just support_led_light=trueIn any case I tested the system with modified xml in `vendor` and notification light did not work. But I found a way to make it works.
After setting support_led_light = true in /vendor/etc/device_features/picasso.xml we have Notification Light settings and in logcat we can see that the system tries to work with notification light. In particular there are records from the method "realSetLightLocked". But there is no light.
just support_led_light=true
After setting support_led_light = true in /vendor/etc/device_features/picasso.xml we have Notification Light settings and in logcat we can see that the system tries to work with notification light. In particular there are records from the method "realSetLightLocked". But there is no light.
I bought the phone less than 40 days ago (on Ali, with EU Express delivery), so I think I'm not from first batches.first sold batches of K30/K30 5G had LED light
Well I donno what you mean by "make tests". I myself, like so many others in Xiaomi.cn forum, tested by dialling "*#*#7664#*#*" and entering the QMMI test. There are usually three options about LED tests, red blue and green, among others. I entered all three and didn't see any LED light, not when I was using China ROM or EU ROM now. Many users reported same results as mine. I am not sure QMMI is the proper tool to test.I bought the phone less than 40 days ago (on Ali, with EU Express delivery), so I think I'm not from first batches.
Basically I never heard about K30 4G/5G (and Poco X2) without LED. But of course not so much people make tests.
Now, it is in xiaomi.eu firmware and we will have more reviews.
The most reliable test is executing of command `echo 1 > /sys/class/leds/white/breath` (in TWRP or in the system with root)what you mean by "make tests"
The most reliable test is executing of command `echo 1 > /sys/class/leds/white/breath` (in TWRP or in the system with root)
There are at least two test apps - CIT (com.miui.cit) and QMMI (com.qualcomm.qti.qmmi).
*#*#7664#*#* allows to run QMMI
*#*#6484#*#* allows to run CIT
Not always both codes work, it depends on firmware.
But as I see all firmwares have both apps, it is possible to run any of them using Activity Launcher or something.
From my tests I see that QMMI can enable LED, but CIT can not.
So, when you use QMMI you do NOT see light? I see it with QMMI for all of red/green/blue tests (of course it is white in all cases).
Which phone do you have? My is K30 5G.
Which model it is? Settings - My device - All specs. My model is "M2001G7AE".
Also maybe you could run CIT and check hardware version in "check version info". My is "MP".
In any case I think it is good to have this patch in the firmware. Those who have LED will be able to use it. Those who have not will not lose anything.
The most reliable test is executing of command `echo 1 > /sys/class/leds/white/breath` (in TWRP or in the system with root)
There are at least two test apps - CIT (com.miui.cit) and QMMI (com.qualcomm.qti.qmmi).
*#*#7664#*#* allows to run QMMI
*#*#6484#*#* allows to run CIT
Not always both codes work, it depends on firmware.
But as I see all firmwares have both apps, it is possible to run any of them using Activity Launcher or something.
From my tests I see that QMMI can enable LED, but CIT can not.
So, when you use QMMI you do NOT see light? I see it with QMMI for all of red/green/blue tests (of course it is white in all cases).
Which phone do you have? My is K30 5G.
Which model it is? Settings - My device - All specs. My model is "M2001G7AE".
Also maybe you could run CIT and check hardware version in "check version info". My is "MP".
In any case I think it is good to have this patch in the firmware. Those who have LED will be able to use it. Those who have not will not lose anything.
Thank you for implementing this! I do have the LED notification on a Redmi K30 4G purchased 06/16/2020, and it works when charging and when checking in QMMI. CIT does not show any notification LED test. However, I do not get any notification light for anything else besides charging, despite it being enabled in each app permission and in the additional settings in MIUI 12 @Igor Eisberg Is there anything I'm missing out on?
I've done so already, LED notifications on, along with app permissions for it, but no light pulses.On my 5g, go to Setting, Addational Setting, LED Notifications. There you can activate or deactivate it
I'm interested on this as well.Greetings! Is it possible to make the notification LED to work without rooting the device? I'm currently using a K30 5G with the xiaomi.eu 12.0.5 stable ROM. Thanks in advance!
I really didn't want to root my device because I don't like to mess with the Magisk Hide settings to make both Pokémon Go and my banking app work under such circumstances. Nonetheless I made a full TWRP backup and rooted my device, after that I installed an app available into the Play Store that enables the notification LED for both the Redmi K30 4G/5G and the POCO X2 but as soon as I gave SU permissions and ran it then was when I realised my unit doesn't came with the LED installed... It's a shame because it's a deal breaker for me and I'm even considering selling the deviceI'm interested on this as well.
I can't do the QMMI test, it doesn't open. I'm still don't know if my K30 5G has the LED.
We use essential cookies to make this site work, and optional cookies to enhance your experience. Cookies are also used for ads personalisation