Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,804,192 Members 37,566 Now Online
XDA Developers Android and Mobile Development Forum

[APP] QuickRemote IR Blaster for AOSP roms

Tip us?
 
sefnap
Old
#1  
Member - OP
Thanks Meter 378
Posts: 40
Join Date: Sep 2013
Default [APP] QuickRemote IR Blaster for AOSP roms

Hi everybody! I've switched over to CM 10.2 M1 as my daily driver, but I missed being able to change the volume on my tv with my phone. So, I've managed to get the QuickRemote app from the stock ROM working on Cyanogenmod (and hopefully other AOSP roms). There is nothing carrier-specific in this, so it should work on all variants.

Luckily there is no kernel module involved in driving the IR hardware. Instead the IR chip is a black box that is controlled via an internal serial port interface. The QuicksetSDK.apk package includes the code to control the IR chip. It creates a Service that the LGQRemote.apk app binds to to send commands to the IR hardware.

Installation
This will only work on rooted devices.
To get this working you'll need to install two APKs:
You'll also need to add a script that runs on device boot.
You can download mine here: 10QuickRemote

Or just make one yourself, containing this code:
Code:
#!/system/bin/sh

chmod 666 /dev/ttyHSL1
setprop persist.sys.lge.eula_agreement true
This makes the serial port accessible to non-system processes. On the LG stock rom the QuicksetSDK package runs as the system user, but here we're running it as a normal unprivileged user, so we need to make the serial port world-readable and writable. We also use the 'setprop' command to tell the QuickRemote app that we've agreed to LG's EULA, otherwise it will attempt to launch a non-existent EULA activity and crash.

I'm not 100% sure how the init.d system works on other AOSP roms, but on Cyanogenmod, you can place this script in the /data/local/userinit.d directory (creating the userinit.d directory if necessary). The script should not have an extension, and should be executable.

A quick method that works on CM, assuming you've downloaded my 10QuickRemote script to your current directory:
Code:
adb root
adb shell "mkdir -p /data/local/userinit.d"
adb push 10QuickRemote /data/local/userinit.d
adb shell "chmod 755 /data/local/userinit.d/10QuickRemote
For the above to work, you'll need to enable root for adb in Settings > Developer Options > Root Access

After a reboot, you should be able to use the QuickRemote app just like on the stock ROM!

If the app crashes right away, or if it launches but won't send any IR commands or learn new ones, your start-up script probably isn't being executed properly. Try running it manually and see if things work:

Code:
adb shell
--- inside adb, as root:
# sh /data/local/userinit.d/10QuickRemote

# ls -l /dev/ttyHSL1
--  result should be: 
crw-rw-rw- system   system   245,   1 2013-11-06 08:20 ttyHSL1

# getprop persist.sys.lge.eula_agreement
--  result should be:
true
If running it manually works, make sure the script is executable or it won't be called automatically on boot:
Code:
-- inside a root shell
# chmod 755 /data/local/userinit.d/10QuickRemote
If it is executable and still doesn't work after a reboot, and you're running a non-Cyanogen ROM, they probably do init scripts differently. Hopefully you can google up how to make it work

If everything looks correct and it still won't work, send me a logcat and I'll try to figure it out.

Enjoy!
The Following 84 Users Say Thank You to sefnap For This Useful Post: [ Click to Expand ]
 
steveo17
Old
(Last edited by steveo17; 6th November 2013 at 06:26 PM.) Reason: update
#2  
steveo17's Avatar
Senior Member
Thanks Meter 108
Posts: 595
Join Date: Sep 2010
Location: South Amboy

 
DONATE TO ME
Quote:
Originally Posted by sefnap View Post
Hi everybody! I've switched over to CM 10.2 M1 as my daily driver, but I missed being able to change the volume on my tv with my phone. So, I've managed to get the QuickRemote app from the stock ROM working on Cyanogenmod (and hopefully other AOSP roms). There is nothing carrier-specific in this, so it should work on all variants.

Luckily there is no kernel module involved in driving the IR hardware. Instead the IR chip is a black box that is controlled via an internal serial port interface. The QuicksetSDK.apk package includes the code to control the IR chip. It creates a Service that the LGQRemote.apk app binds to to send commands to the IR hardware.



Enjoy!

thanks so much!!

would it be possible to make this into a flashable zip?
Help Me & Help You. Sign up for 15gb of free storage at Copy.com using this referral, https://copy.com?r=fJoSfY

I get 5 more GB and you get 5 more GB. We both win.
 
blkghost22
Old
(Last edited by blkghost22; 6th November 2013 at 06:54 PM.)
#3  
Senior Member
Thanks Meter 159
Posts: 527
Join Date: Jan 2010
just a quick question am i suppose to see the list of make and models? if so i dont see it... the remote is installed though

nvm... some how the list came out.. not sure what i did. thx for the mod
 
steveo17
Old
#4  
steveo17's Avatar
Senior Member
Thanks Meter 108
Posts: 595
Join Date: Sep 2010
Location: South Amboy

 
DONATE TO ME
Quote:
Originally Posted by blkghost22 View Post
just a quick question am i suppose to see the list of make and models? if so i dont see it... the remote is installed though

nvm... some how the list came out.. not sure what i did. thx for the mod
I have the same issue. You just keep playing around with it?

Sent from my LG-VS980 using Tapatalk
Help Me & Help You. Sign up for 15gb of free storage at Copy.com using this referral, https://copy.com?r=fJoSfY

I get 5 more GB and you get 5 more GB. We both win.
 
blkghost22
Old
#5  
Senior Member
Thanks Meter 159
Posts: 527
Join Date: Jan 2010
Quote:
Originally Posted by steveo17 View Post
I have the same issue. You just keep playing around with it?

Sent from my LG-VS980 using Tapatalk
yes.. but honestly i really dont know what i did... the last thing i did was try to make a universal remote and just cancelled out of it... and installed the sql...apk

---------- Post added at 11:11 AM ---------- Previous post was at 11:09 AM ----------

just figured it out.. the •QuicksetSDK.apk is not running at first.. so i just reinstalled it again... and the list comes up... for some reason i guess it doesnt start.
 
steveo17
Old
#6  
steveo17's Avatar
Senior Member
Thanks Meter 108
Posts: 595
Join Date: Sep 2010
Location: South Amboy

 
DONATE TO ME
Quote:
Originally Posted by blkghost22 View Post
yes.. but honestly i really dont know what i did... the last thing i did was try to make a universal remote and just cancelled out of it... and installed the sql...apk

---------- Post added at 11:11 AM ---------- Previous post was at 11:09 AM ----------

just figured it out.. the •QuicksetSDK.apk is not running at first.. so i just reinstalled it again... and the list comes up... for some reason i guess it doesnt start.

Right i installed it by clicking the apk and installed it like normal. And now it works


Sent from my LG-VS980 using Tapatalk
Help Me & Help You. Sign up for 15gb of free storage at Copy.com using this referral, https://copy.com?r=fJoSfY

I get 5 more GB and you get 5 more GB. We both win.
 
blkghost22
Old
#7  
Senior Member
Thanks Meter 159
Posts: 527
Join Date: Jan 2010
Quote:
Originally Posted by steveo17 View Post
Right i installed it by clicking the apk and installed it like normal. And now it works


Sent from my LG-VS980 using Tapatalk
for some reason tho... once i reboot my phone. i need to install that again.
 
player911
Old
#8  
player911's Avatar
Recognized Developer
Thanks Meter 905
Posts: 6,814
Join Date: Sep 2006
Location: Cincinnati

 
DONATE TO ME
awesome job!

I've been leery of flashing a custom rom for the lack of IR and other features. Plus I'm really digging the stock rom.

But with AOKP coming soon, I am might be tempted. Good to know that the application works with directly with the IR blaster.

I thought AOSP 4.4 was suppose to have support for IR blasters, but it seems noone has them working on CM yet.
LG G2 - Modded Stock
Nexus 7 FHD - Jelly Bean 4.4.2 [CM Kang Banged]
HTC Touch Pro►HTC Touch Diamond 2►Nexus One►LG G2x►HTC Rezound►Galaxy NexusLG G2!
iPad►iPad2►Asus TransformerGalaxy Tab 7 [CM10]Nook►Nook TabletNexus 7Nexus 7 FHD!

[Site Owner] MiiWiiChat.com - Free Chat for your Wii
[Site Owner] SnapSite Admins.com - Free Custom Website

Like what I do? - Donations welcome or hit the Thanks button!

0101100101
 
steveo17
Old
#9  
steveo17's Avatar
Senior Member
Thanks Meter 108
Posts: 595
Join Date: Sep 2010
Location: South Amboy

 
DONATE TO ME
Quote:
Originally Posted by blkghost22 View Post
for some reason tho... once i reboot my phone. i need to install that again.
Same here

Sent from my LG-VS980 using Tapatalk
Help Me & Help You. Sign up for 15gb of free storage at Copy.com using this referral, https://copy.com?r=fJoSfY

I get 5 more GB and you get 5 more GB. We both win.
 
sefnap
Old
#10  
Member - OP
Thanks Meter 378
Posts: 40
Join Date: Sep 2013
Quote:
Originally Posted by blkghost22 View Post
yes.. but honestly i really dont know what i did... the last thing i did was try to make a universal remote and just cancelled out of it... and installed the sql...apk

---------- Post added at 11:11 AM ---------- Previous post was at 11:09 AM ----------

just figured it out.. the •QuicksetSDK.apk is not running at first.. so i just reinstalled it again... and the list comes up... for some reason i guess it doesnt start.
The list is actually downloaded by the QuicksetSDK app at runtime. I guess they did it that way so they could add models after shipping the phone.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes