Jump to content

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


Recommended Posts

Posted (edited)

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
Posted
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

Posted (edited)

Fix Bluetooth pls !!

because no bluetooth , no interest. :) and fun.

Edited by mmkim
Guest xian1243
Posted

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

Posted
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.

Guest danielj58
Posted

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

Guest Lens_flare
Posted (edited)

Installed this but nothing happens.

Are u shure that it's work?

Edited by Lens_flare
Guest Lens_flare
Posted (edited)

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
Posted
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.

Posted
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.

Guest Lens_flare
Posted (edited)

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
Posted
I'll check it.

Don't download until it's working.

reboot.....reboot....reboot....

Guest Lens_flare
Posted (edited)

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
Guest danielj58
Posted

We have lift off!

Light sensor working and screen responding :)

Many thanks! Here's the update zip I just flashed to get it working:-

http://www.multiupload.com/I5C0O0FG31

Proximity sensor doesn't seem to be doing anything though, just made a call then and covered it and the screen still responded to input.

Guest Lens_flare
Posted (edited)

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
Guest danielj58
Posted
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?

Guest Lens_flare
Posted (edited)
the default screen time-out

Maybe...

Where are the android settings for the proximity sensor?

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?

Edited by Lens_flare
Guest danielj58
Posted
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 :)

Guest Lens_flare
Posted (edited)

Hey! English locale was partially missed after I flashed it :rolleyes:

Framework-res is translateable to english?

Anyway thanks for your work! Light sensor made the MIUI better.

Edited by Lens_flare

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

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