Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[APP] QuickRemote IR Blaster for AOSP roms

OP sefnap

6th November 2013, 06:07 PM   |  #1  
OP Member
Thanks Meter: 388
 
40 posts
Join Date:Joined: Sep 2013
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 86 Users Say Thank You to sefnap For This Useful Post: [ View ]
6th November 2013, 07:19 PM   |  #2  
steveo17's Avatar
Senior Member
Flag South Amboy
Thanks Meter: 121
 
648 posts
Join Date:Joined: Sep 2010
Donate to Me
Quote:
Originally Posted by sefnap

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?
Last edited by steveo17; 6th November 2013 at 07:26 PM. Reason: update
6th November 2013, 07:42 PM   |  #3  
Senior Member
Thanks Meter: 160
 
531 posts
Join Date:Joined: 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
Last edited by blkghost22; 6th November 2013 at 07:54 PM.
6th November 2013, 08:00 PM   |  #4  
steveo17's Avatar
Senior Member
Flag South Amboy
Thanks Meter: 121
 
648 posts
Join Date:Joined: Sep 2010
Donate to Me
Quote:
Originally Posted by blkghost22

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
6th November 2013, 08:11 PM   |  #5  
Senior Member
Thanks Meter: 160
 
531 posts
Join Date:Joined: Jan 2010
Quote:
Originally Posted by steveo17

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.
6th November 2013, 08:26 PM   |  #6  
steveo17's Avatar
Senior Member
Flag South Amboy
Thanks Meter: 121
 
648 posts
Join Date:Joined: Sep 2010
Donate to Me
Quote:
Originally Posted by blkghost22

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
6th November 2013, 08:28 PM   |  #7  
Senior Member
Thanks Meter: 160
 
531 posts
Join Date:Joined: Jan 2010
Quote:
Originally Posted by steveo17

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.
6th November 2013, 09:01 PM   |  #8  
player911's Avatar
Recognized Developer
Flag Cincinnati
Thanks Meter: 913
 
6,862 posts
Join Date:Joined: Sep 2006
Donate to Me
More
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.
6th November 2013, 09:42 PM   |  #9  
steveo17's Avatar
Senior Member
Flag South Amboy
Thanks Meter: 121
 
648 posts
Join Date:Joined: Sep 2010
Donate to Me
Quote:
Originally Posted by blkghost22

for some reason tho... once i reboot my phone. i need to install that again.

Same here

Sent from my LG-VS980 using Tapatalk
6th November 2013, 10:26 PM   |  #10  
OP Member
Thanks Meter: 388
 
40 posts
Join Date:Joined: Sep 2013
Quote:
Originally Posted by blkghost22

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.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes