[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.
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:
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:
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:
--- 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:
If running it manually works, make sure the script is executable or it won't be called automatically on boot:
-- 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.