Jump to content

[PATCH] Light and Proximity sensor fix with koudelka's MIUI 11.05


Guest roggin
 Share

Recommended Posts

Hello everybody,

koudelka's MIUI ROM is a very good ROM, Big thanks to koudelka and others contributors. I have ported light and proximity sensor fix to koudelka's MIUI 11.05.

Because MIUI is not a opensource ROM, I have to baksmali and add my PowerManagerService class to it and fix some resource mapping. So, sorry for late.

In this fix, I try to use a more larger distance threshold in proximity sensor, Hope this will not cause any buggy thing. :)

You have to backup before add this fix.

This patch is only for koudelka's MIUI 11.05. services.zip

Because Modaco not allow me to upload a jar file, so Please unzip it and put services.jar to /system/framework

You can buy me a beer if you like it:Paypal donation

Edited by roggin
Link to comment
Share on other sites

Hello everybody,

koudelka's MIUI ROM is a very good ROM, Big thanks to koudelka and others contributors. I have ported light and proximity sensor fix to koudelka's MIUI 11.05.

Because MIUI is not a opensource ROM, I have to baksmali and add my PowerManagerService class to it and fix some resource mapping. So, sorry for late.

In this fix, I try to use a more larger distance threshold in proximity sensor, Hope this will not cause any buggy thing. :)

You have to backup before add this fix.

This patch is only for koudelka's MIUI 11.05. services.zip

Because Modaco not allow me to upload a jar file, so Please unzip it and put services.jar to /system/framework

You can buy me a beer if you like it:Paypal donation

thx

Link to comment
Share on other sites

Guest xian1243

Roggin, what exactly did you change in /framworks/base/services/java/com/android/server/PowerManagerService.java ? I see a threshold value...

I can fork the framwork from CyanogenMod, patch it, ifdef it, than pull request it upstream into CyanogenMod's source :)

Xian

Link to comment
Share on other sites

Roggin, what exactly did you change in /framworks/base/services/java/com/android/server/PowerManagerService.java ? I see a threshold value...

I can fork the framwork from CyanogenMod, patch it, ifdef it, than pull request it upstream into CyanogenMod's source :)

Xian

Hi Xian,

Nice to see you, Thank you for the amazing liquid device tree :) .

I will give you the source code when I clean the code up.

Link to comment
Share on other sites

Guest danielj58

I can see that they're working in the SensorViewer app from the market, but the Proximity Sensor reports 650cm distance when it's covered up (dunno whether you've fixed that by changing the range in services, as I've not tested it on a call yet), and the light sensor is picking up changes but MIUI isn't adjusting the brightness? Have I missed something blatantly obvious? :)

I've attached an unsigned update zip, for those who might prefer that :)

MIUI_Light_Sensor_Patch.zip

Link to comment
Share on other sites

Guest Lens_flare

sorry i wasn't read this :)

Humm, and what about proximity sensor? It seems that it doesn't work too.5-seconds-timer isn't sensor!

UPD:

Rewriting framework-res.apk killed market(force close). Then i reboot my liquid and the system now not working!

Edited by Lens_flare
Link to comment
Share on other sites

sorry i wasn't read this :)

Humm, and what about proximity sensor? It seems that it doesn't work too.5-seconds-timer isn't sensor!

UPD:

Rewriting framework-res.apk killed market(force close). Then i reboot my liquid and the system now not working!

Sorry, I'll check it.

I delete the update post until it's working.

Link to comment
Share on other sites

sorry i wasn't read this :)

Humm, and what about proximity sensor? It seems that it doesn't work too.5-seconds-timer isn't sensor!

UPD:

Rewriting framework-res.apk killed market(force close). Then i reboot my liquid and the system now not working!

Could you download "sensor dump" in marker and check the proximity sensor value.

I'll check the sensor value.

Link to comment
Share on other sites

Guest Lens_flare

Program shows about 500 cm for proximity value when i close the sensor.

It means that it works?

Also this program shows about 16 lux in light sensor tab when i close the sensor.

Edited by Lens_flare
Link to comment
Share on other sites

Guest Lens_flare

what a pitty ;[

I hope that tommorow label "work in progress" will disappear.

In addition to proximity sensor theme:

I scaled real distance from my finger to screen. Sensor started to react on my finger in 0.5-1 cm(program displayed about 1100)

Edited by Lens_flare
Link to comment
Share on other sites

Guest Lens_flare

we? Ok i'm first tester :]

Proximity sensor doesn't seem to be doing anything though

Yes it is. But after about five seconds screen offs, but until you press a power button it doesn't on.

UPD:

when i tried to flash this recovery said:

E: error while reading data

E: Can't read update script

what's wrong?

Edited by Lens_flare
Link to comment
Share on other sites

Guest danielj58
we? Ok i'm first tester :]

Yes it is. But after about five seconds screen offs, but until you press a power button it doesn't on.

That's the default screen time-out though isn't it?

I can see it's registering measurements but it seems to be a few factors out, presumably meaning it doesn't fall into the range in which android switches off the screen?

Anyway, the light sensor is all I wanted, the proximity sensor would just be a bonus. Where are the android settings for the proximity sensor? They used to be under call settings but I can't find them in MIUI?

Link to comment
Share on other sites

Guest danielj58
Maybe...

No working sensor-no settings :)

when i tried to flash this, recovery said:

E: error while reading data

E: Can't read update script

what's wrong?

Might have corrupted on upload, I'll take a look.

The sensor does "work" though, it just reports silly values :)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.