[MOD][Xposed] Make Infrared Blaster working with all 3rd party apps (on EUI)

Search This thread

androcheck

Senior Member
Dec 7, 2009
235
413
john.zweng.at
Update: Dec 6th, 2016: published version 1.1, works now with more LeEco phones. Btw, module was renamed to "LeEco Infrared Fix".

Hi!

I've created the Xposed module "LeEco Infrared Fix" for the LePro 3 (but seems to work on other LeEco phones too) which tries to make the IR blaster (the infrared hardware) usable via the standard Android API. This means that all 3rd-party infrared apps which use the standard API should work! :)

The module is open-source, you can find the code here on GitHub.
For background infos and details look into this thread: [REF] How Infrared is (not) working on LePro3 - some infos for IR devs.

Restrictions:

  • Problably only working with EUI (will not work on plain cyanogenmod. Update: seems to work also on Cyanogenmod as long as the proprietary sysrem app "UEI Android Services SDK(LeTV)" from the device's original ROM is also installed (as system app?) in Cyanogenmod). Developed on my LePro 3 --> Please give feedback if it also works on other phones or EUI versions
  • The app UEI Android Services SDK(LeTV) (QuickSet SDK Service) must not be removed or disabled (this service is responsible for talking to the IR chip). Its internal package name is: com.uei.quicksetsdk.letv.
  • It supports only sending Infrared (no receiving, learning-mode) simply because the standard Android API has no support yet for receiving infrared. But the original LeEco remote control app should still be able to use the learning-mode.
  • This module overrides the standard Android Infrared API, so this means the standard Infrared API must already be present in the ROM! This the case for EUI 5.8.018S on the LePro 3 but might not be the case on other ROMs. :-/ Update: no longer necessary since version 1.1
But you can disable or remove the original Le Eco remote control app. Or you can keep it. Just as you like. It should be able to co-exist with 3rd party apps.


Reported to work with following devices / ROMs:
  • LeEco Le Pro 3 (LEX720) running EUI 5.8.018S (tested by myself)
  • LeEco Le 2 MTK Chipset running EUI 5.9.020s (according to this posting from @bearady)
  • LeEco Le 2 X526 running EUI 5.9.020S (according to this posting from @jhakjhuk1853 and this posting from @kedaranmol)
  • LeEco Le Max 2 X820 running Madsurfer's 21s EUI 5.9 Rom according to this posting from @serc
  • LeEco LePro 3 running CM13 (as long as the proprietary system app "UEI Android Services SDK(LeTV)" from the original EUI ROM of the same device is also installed (as system app?) in Cyanogenmod)
  • Please report in comments if it's also working for other versions or devices, so I can complete this list.

Changelog and older releases:

Also:
Here be dragons.. (aka bugs)
8 days ago I had no idea how infrared works, had never used the infrared API or even used any infrared app. I just started poking around and then things escalated quickly (you can follow my story in this other thread if you have some hours to read...). Keep in mind that working with the infrared API is new for me, so there might be bugs..

If it's working or not, please give feedback. :)

Btw, I'm currently testing with the app RCoid free which works perfectly for me (and which I really like). I also tested with these randomly chosen apps: ZaZa Remote-Universal Remote, ASmart Remote IR and IR Universal Remote and all of them worked.


Download:
 

Attachments

  • xposed-module-lepro3-infrared-fix_v1.1.apk
    36.1 KB · Views: 3,987
Last edited:

serc

Senior Member
Sep 2, 2010
168
48
i have tested with lemax2 and eui 5.9.21s

is not working :(

but i will look at later versions, for me this is very important

thanks for your work

can we do this way principicaly for the camera too


edit edit new version 1.1 beta is running like charme :)

thank you androcheck
 
Last edited:
  • Like
Reactions: Roskous

androcheck

Senior Member
Dec 7, 2009
235
413
john.zweng.at
Tried on eUI 5.8.19s with Le 1s Eco. ended up with boot loop.

im testing again to ensure the bootloop not bcos of this module... unfortunately couldn't get a logcat
@androcheck can you post this in xposed modules repo that would be useful.

Hi, thanks for the feedback. Good idea, I will it submit to the Xposed repo. :good:

Yes, it's very likely that this might not work well on other devices (or even other EUI versions) as the tricks needed to get this working are very specific targeted. But in the other side (under the assumption that the used IR Blaster and QuickSet SDK is the same than on LePro 3) it might only require some small changes to get it working.

The logfiles from Xposed and maybe a Logcat (from the start of boot) would be extremly useful to see what's going wrong:

Boot into TWRP recovery and copy the Xposed logs to your computer:
Code:
adb pull /data/data/de.robv.android.xposed.installer/log/error.log
adb pull /data/data/de.robv.android.xposed.installer/log/error.log.old

Then boot normally start logcat from the beginning of boot (start it even before you see the bootanimation):
Code:
adb logcat -v time  '*:V' > logcat_lepro3_boottime.txt


[edit]
If you experience a bootloop (caused by my module), simply boot into TWRP and delete my app from there: Just navigate to the directory "/data/app", there you should find a subdirectotry named "at.zweng.xposed.debug.infrared-1" (maybe the digit at the end is different) and just delete this whole directory.
[/edit]
 
Last edited:

androcheck

Senior Member
Dec 7, 2009
235
413
john.zweng.at
Done. Published it into Xposed repo. :) Just search for "LePro 3 Infrared Fix".

Also I would like to get feedback from LePro3 users if it's working on the newer EUI versions for the american version. (And please include logs if it's not working.)

And when we finally have a working cyanogenmod device tree (so that we can build it ourselves) I will happily support developers to get this working for cyanogenmod, too so that infrared will work there out-of-the-box without the need for an Xposed module. (After searching the forums here on XDA I guess this would make the LePro3 being the first device with a UniversalElectronics IR chip where infrared will work on cyanogenmod with all 3rd party apps. :))
 

androcheck

Senior Member
Dec 7, 2009
235
413
john.zweng.at
i have tested with lemax2 and eui 5.9.21s

is not working :(

but i will look at later versions, for me this is very important

thanks for your work

can we do this way principicaly for the camera too
One thought: could you test with an app like z-device test if the phone advertises having infrared capabilities to apps?

Because this is the case with the LePro 3. It has the Infrared API included (so all infrared apps install and work fine), but just didn't do anything.

My module only works if the Infrared API is already present in first place.

I did not understand what you meant about the camera.
 
Last edited:
  • Like
Reactions: serc and alichiddy

reversegear

Senior Member
Jul 17, 2011
2,279
1,609
Xiaomi Mi Max 2
One thought: could you test with an app like z-device test if the phone advertises having infrared capabilities to apps?

Because this is the case with the LePro 3. It has the Infrared API included (so all infrared apps install and work fine), but just didn't do anything.

My module only works if the Infrared API is already present in first place.

I did not understand what you meant about the camera.

May be he meant to say about working camera 2 API
 

kedaranmol

Member
Nov 23, 2013
15
1
Z-device test says no IR capabilities

One thought: could you test with an app like z-device test if the phone advertises having infrared capabilities to apps?

Because this is the case with the LePro 3. It has the Infrared API included (so all infrared apps install and work fine), but just didn't do anything.

My module only works if the Infrared API is already present in first place.

I did not understand what you meant about the camera.

Z-device test says no IR capabilities in Le 2 (X526) Indian Version. So i guess we cant use your xposed module? Is there any way to add the Infrared API with rooted phone? I could test it, if you have any theories...
 

bearady

Member
Jul 4, 2014
6
5
OMG...you're a life saver and a genius.I can confirm it worked on Leeco Le 2 X620 eui 5.9.020s mtk chipset. I've tested with Anymote,Rcoid(also suggested by you),Peel Smart and Zaza Remote. Thank you very much...respect for your work :):)
 
Last edited:
  • Like
Reactions: androcheck

jhakjhuk1853

Senior Member
Nov 28, 2012
506
231
33
Mumbai
Which eui version?

One of the user said worked on mtk 20s we can also try on Chinese 20s
Z-device test says no IR capabilities in Le 2 (X526) Indian Version. So i guess we cant use your xposed module? Is there any way to add the Infrared API with rooted phone? I could test it, if you have any theories...


---------- Post added at 10:42 AM ---------- Previous post was at 10:41 AM ----------

@androcheck can you help in making it for le2 Indian x526
I can help for files etc
 

kedaranmol

Member
Nov 23, 2013
15
1
One of the user said worked on mtk 20s we can also try on Chinese 20s


---------- Post added at 10:42 AM ---------- Previous post was at 10:41 AM ----------

@androcheck can you help in making it for le2 Indian x526
I can help for files etc

But the 20s rom is for mtk chipset? Or are you referring to 20s ported from Chinese 5.9.20s?
 

androcheck

Senior Member
Dec 7, 2009
235
413
john.zweng.at
Z-device test says no IR capabilities in Le 2 (X526) Indian Version. So i guess we cant use your xposed module? Is there any way to add the Infrared API with rooted phone? I could test it, if you have any theories...

@androcheck can you help in making it for le2 Indian x526
I can help for files etc

I am currently playing around and testing.. :) I am trying to hook also all the relevant PackageManager methods, so that for an app everything looks like if there is a standard infrared HAL implementation available. Not sure, if this would work for the X526.

If the IR blaster hardware or the QuickSet SDK is only a little bit different, then it might not work. So this is just a try.. Don't get your hopes too high..


Hi Androcheck, Reversegear with Camera I mean this ROM
http://forum.xda-developers.com/le-max-2/development/unofficial-cyanogenmod-14-1-t3498764
here is Camera not running, i thinked your way can Help here perhaps
Hi! I think there is a misunderstanding what Xposed is and what it's used for. Xposed is a (not so easy) way to "hook" (in other words: modify) existing code during runtime.
It's complicated to work with Xposed and it should only be the last resort if you have no other ways to do it. If you have the orginal source code of some peace of software it's MUCH easier to just work with the plain source code and fix the bugs directly there before you build it (and not take the unnecessarily complicated road with Xposed).

In Cyanogenmod you have all the source code (besides low-level drivers, and there Xposed also cannot be used), so devs should try to fix the errors in the source code, not with Xposed. Also, I have never worked with Camera API (and I can only assume that it's way more complicated than Infrared), so I'm afraid I cannot really help here.
 
  • Like
Reactions: alichiddy and serc

androcheck

Senior Member
Dec 7, 2009
235
413
john.zweng.at
Hi, @serc, @reversegear, @kedaranmol, @jhakjhuk1853!

I've extended the module so that it now also fakes the availability of standard Android Infrared API. So now all Infrared apps should think infrared is available. I attached it to this posting below. Update: removed attachement, use final version 1.1 instead from first post (or from Xposed installer app)

Maybe you can try it this beta version on your devices. No guarantee that it will work (as I don't have the devices for testing). If it seems to work please verify with a digital camera or another's phone camera that the infrared LED actually is really emitting light (cameras can see infrared light, which humans cannot see).
--> also please report your exact phone model plus the version of the ROM you're running!

If it's not working I would need a logcat output (started directly at boot) as well as the Xposed logfile (found in the Xposed installer app).
Code:
adb logcat -v time  '*:V' >> logcat_debug_infrared.txt

Have fun! :)

[EDIT]
Removed BETA attachement as final version 1.1 is now released in Xposed installer app (and in first post)
[/EDIT]
 
Last edited:

jhakjhuk1853

Senior Member
Nov 28, 2012
506
231
33
Mumbai
update : le2 x526 EUI 20s version
after installing module phone booted succesfuly
installing peel smart and report back when home will check on TV


will check and report in 10min
thank you
Hi, @serc, @reversegear, @kedaranmol, @jhakjhuk1853!

I've extended the module so that it now also fakes the availability of standard Android Infrared API. So now all Infrared apps should think infrared is available. I attached it to this posting below.

Maybe you can try it this beta version on your devices. No guarantee that it will work (as I don't have the devices for testing). If it seems to work please verify with a digital camera or another's phone camera that the infrared LED actually is really emitting light (cameras can see infrared light, which humans cannot see).
--> also please report your exact phone model plus the version of the ROM you're running!

If it's not working I would need a logcat output (started directly at boot) as well as the Xposed logfile (found in the Xposed installer app).
Code:
adb logcat -v time  '*:V' >> logcat_debug_infrared.txt

Have fun! :)


---------- Post added at 03:23 PM ---------- Previous post was at 02:47 PM ----------

Guys this really worked I am using peel smart on my le2
nothing can be better than this thanks
 
Last edited:

kedaranmol

Member
Nov 23, 2013
15
1
Hi, @serc, @reversegear, @kedaranmol, @jhakjhuk1853!

I've extended the module so that it now also fakes the availability of standard Android Infrared API. So now all Infrared apps should think infrared is available. I attached it to this posting below.

Maybe you can try it this beta version on your devices. No guarantee that it will work (as I don't have the devices for testing). If it seems to work please verify with a digital camera or another's phone camera that the infrared LED actually is really emitting light (cameras can see infrared light, which humans cannot see).
--> also please report your exact phone model plus the version of the ROM you're running!

If it's not working I would need a logcat output (started directly at boot) as well as the Xposed logfile (found in the Xposed installer app).


Have fun! :)

I have tested it and I can confirm that this xposed module now works on Le 2 X526 (Indian version with Snapdragon 652). I can see IR signals from another phone's camera using the Anymote Universal Remote and Rcoid. But strangely SURE Universal Remote for TV didn't work for me. I will test with other apps later when I get home. I am yet to test if this works with my TV and other devices. Will update when I do this.
 

serc

Senior Member
Sep 2, 2010
168
48
Hi Androcheck compliment you are a Genius !!!

ver. 1.1 beta
my Phone LeEco LeMax2 x820 with Madsurfer's 21s EUI 5.9 Rom, from lemax2 forum xda
rCoid remote is running wonderfull, for me one of the important things at this phone.

Thank You very much , i am now very very happy ;)
 

androcheck

Senior Member
Dec 7, 2009
235
413
john.zweng.at
Hi, @jhakjhuk1853, @kedaranmol and @serc! :)

Thanks for reporting back! I will clean up the code (remove a little bit of the debug logging I've included for the case if it wouldn't work), and will make a new clean 1.1 release (and also release the source again).
I'm glad you like it! At the beginning I only wanted to solve this problem just for me personally, but I am happy that my solution now even is working for several devices. :)

(And if you like it really much and feel like buying me a coffee, there is also a donation link at my profile page.. ;);))


P.S.: The app SURE Universal Remote for TV also doesn't work for me. It seems that they are not only using the standard API to query for infrared capabilities. Hmm.. it looks like they include several other proprietary IR implementations to make it work on as much devices as possible. It seems there is also a version of QuickSet SDK included but it's a different one than the one we see in our phones (I guess it's for LG phones). I'm not sure what exactly is causing the problem.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    Update: Dec 6th, 2016: published version 1.1, works now with more LeEco phones. Btw, module was renamed to "LeEco Infrared Fix".

    Hi!

    I've created the Xposed module "LeEco Infrared Fix" for the LePro 3 (but seems to work on other LeEco phones too) which tries to make the IR blaster (the infrared hardware) usable via the standard Android API. This means that all 3rd-party infrared apps which use the standard API should work! :)

    The module is open-source, you can find the code here on GitHub.
    For background infos and details look into this thread: [REF] How Infrared is (not) working on LePro3 - some infos for IR devs.

    Restrictions:

    • Problably only working with EUI (will not work on plain cyanogenmod. Update: seems to work also on Cyanogenmod as long as the proprietary sysrem app "UEI Android Services SDK(LeTV)" from the device's original ROM is also installed (as system app?) in Cyanogenmod). Developed on my LePro 3 --> Please give feedback if it also works on other phones or EUI versions
    • The app UEI Android Services SDK(LeTV) (QuickSet SDK Service) must not be removed or disabled (this service is responsible for talking to the IR chip). Its internal package name is: com.uei.quicksetsdk.letv.
    • It supports only sending Infrared (no receiving, learning-mode) simply because the standard Android API has no support yet for receiving infrared. But the original LeEco remote control app should still be able to use the learning-mode.
    • This module overrides the standard Android Infrared API, so this means the standard Infrared API must already be present in the ROM! This the case for EUI 5.8.018S on the LePro 3 but might not be the case on other ROMs. :-/ Update: no longer necessary since version 1.1
    But you can disable or remove the original Le Eco remote control app. Or you can keep it. Just as you like. It should be able to co-exist with 3rd party apps.


    Reported to work with following devices / ROMs:
    • LeEco Le Pro 3 (LEX720) running EUI 5.8.018S (tested by myself)
    • LeEco Le 2 MTK Chipset running EUI 5.9.020s (according to this posting from @bearady)
    • LeEco Le 2 X526 running EUI 5.9.020S (according to this posting from @jhakjhuk1853 and this posting from @kedaranmol)
    • LeEco Le Max 2 X820 running Madsurfer's 21s EUI 5.9 Rom according to this posting from @serc
    • LeEco LePro 3 running CM13 (as long as the proprietary system app "UEI Android Services SDK(LeTV)" from the original EUI ROM of the same device is also installed (as system app?) in Cyanogenmod)
    • Please report in comments if it's also working for other versions or devices, so I can complete this list.

    Changelog and older releases:

    Also:
    Here be dragons.. (aka bugs)
    8 days ago I had no idea how infrared works, had never used the infrared API or even used any infrared app. I just started poking around and then things escalated quickly (you can follow my story in this other thread if you have some hours to read...). Keep in mind that working with the infrared API is new for me, so there might be bugs..

    If it's working or not, please give feedback. :)

    Btw, I'm currently testing with the app RCoid free which works perfectly for me (and which I really like). I also tested with these randomly chosen apps: ZaZa Remote-Universal Remote, ASmart Remote IR and IR Universal Remote and all of them worked.


    Download:
    6
    Hi, @serc, @reversegear, @kedaranmol, @jhakjhuk1853!

    I've extended the module so that it now also fakes the availability of standard Android Infrared API. So now all Infrared apps should think infrared is available. I attached it to this posting below. Update: removed attachement, use final version 1.1 instead from first post (or from Xposed installer app)

    Maybe you can try it this beta version on your devices. No guarantee that it will work (as I don't have the devices for testing). If it seems to work please verify with a digital camera or another's phone camera that the infrared LED actually is really emitting light (cameras can see infrared light, which humans cannot see).
    --> also please report your exact phone model plus the version of the ROM you're running!

    If it's not working I would need a logcat output (started directly at boot) as well as the Xposed logfile (found in the Xposed installer app).
    Code:
    adb logcat -v time  '*:V' >> logcat_debug_infrared.txt

    Have fun! :)

    [EDIT]
    Removed BETA attachement as final version 1.1 is now released in Xposed installer app (and in first post)
    [/EDIT]
    5
    Updated original post, added version 1.1 APK. Published new source on Github and uploaded new version also into Xposed repository. Just search in the Xposed installer app under "Download" for "LeEco Infrared Fix".

    Enough for today! :)
    4
    Tried on eUI 5.8.19s with Le 1s Eco. ended up with boot loop.

    im testing again to ensure the bootloop not bcos of this module... unfortunately couldn't get a logcat
    @androcheck can you post this in xposed modules repo that would be useful.

    Hi, thanks for the feedback. Good idea, I will it submit to the Xposed repo. :good:

    Yes, it's very likely that this might not work well on other devices (or even other EUI versions) as the tricks needed to get this working are very specific targeted. But in the other side (under the assumption that the used IR Blaster and QuickSet SDK is the same than on LePro 3) it might only require some small changes to get it working.

    The logfiles from Xposed and maybe a Logcat (from the start of boot) would be extremly useful to see what's going wrong:

    Boot into TWRP recovery and copy the Xposed logs to your computer:
    Code:
    adb pull /data/data/de.robv.android.xposed.installer/log/error.log
    adb pull /data/data/de.robv.android.xposed.installer/log/error.log.old

    Then boot normally start logcat from the beginning of boot (start it even before you see the bootanimation):
    Code:
    adb logcat -v time  '*:V' > logcat_lepro3_boottime.txt


    [edit]
    If you experience a bootloop (caused by my module), simply boot into TWRP and delete my app from there: Just navigate to the directory "/data/app", there you should find a subdirectotry named "at.zweng.xposed.debug.infrared-1" (maybe the digit at the end is different) and just delete this whole directory.
    [/edit]
    3
    Done. Published it into Xposed repo. :) Just search for "LePro 3 Infrared Fix".

    Also I would like to get feedback from LePro3 users if it's working on the newer EUI versions for the american version. (And please include logs if it's not working.)

    And when we finally have a working cyanogenmod device tree (so that we can build it ourselves) I will happily support developers to get this working for cyanogenmod, too so that infrared will work there out-of-the-box without the need for an Xposed module. (After searching the forums here on XDA I guess this would make the LePro3 being the first device with a UniversalElectronics IR chip where infrared will work on cyanogenmod with all 3rd party apps. :))
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone