[One (M7) Original Android Development] formula84:
I know I manually added everything and still have issues, I will list what I did step by step and you tell me where I may have gone wrong, I feel like its an issue during the ramdisk build. Also did you see my comments comparing the ramdisk to cm and the thing i found about #cir ?

---------- Post added at 05:56 PM ---------- Previous post was at 05:52 PM ----------

Also you do still have some thing from HTC CIR in your builds... they are in Vendor and are copied during build, but there is more to it that I had manually added + adjusted needed files that I will outline in another reply.

https://github.com/TripNRaVeR/android_vendor_htc_m7/tree/master-43/proprietary/etc = cir.img

https://github.com/TripNRaVeR/android_vendor_htc_m7/tree/master-43/proprietary/bin = cir_fw_update

---------- Post added at 05:57 PM ---------- Previous post was at 05:56 PM ----------

Could you maybe point to the commit where these were removed so i can look over what was changed, and compare to what i already added back in? I looked over commit history on the ramdisk folder and don't see anything were these were removed, while they are not present from the start...

Also you have init.rc in Device/htc/m7 and I don't see anything like that in CM setup, I only find system/core/rootdir init.rc in CM

You seem to have both and look similar at first glance can you tell me which one is utilized during build and where i might find the equivalent in CM source to compare yours vs theirs?

---------- Post added at 06:23 PM ---------- Previous post was at 05:57 PM ----------

Okay so what I did:

1. Grabbed the files from this commit as a Zip... https://github.com/SlimRoms/device_...09de0ae790414b8a8e89078c367c64e61790dfa#L5R28

2. Copied cir dir to device/htc/m7

3. Modified Adroid.mk and removed the if statement / filter (line 2-"ifneq ($(filter m7att m7spr m7tmo m7ul,$(TARGET_DEVICE)),)" and 31-"endif")

since I am only building for one device.

4. modified your device_m7.mk and added "HTC IR Blaster resources" lines between # Misc Packages and # Apps

# HTC IR Blaster resources

PRODUCT_PACKAGES += \

CIRModule \

htcirlibs \

libhtcirinterface_jni \

init.rc

5. Modified your device/htc/m7/ramdisk/init.qcom.rc to include the shown changes via the commit

At the top under on init I added the below export

import init.qcom.usb.rc

on init
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/htcirlibs.jar

5b. Modified your # htc_cir section to the below, beyond what was in the commit I also saw your section had "chown irda irda" rather then "chown system system", I looked at CM source and they changed it because irda does not exist they said in the commit for the change.

# htc_cir

chown system system /sys/class/htc_cir/cir/reset_cir

chmod 0660 /sys/class/htc_cir/cir/reset_cir

chown system system /sys/class/htc_cir/cir/enable_cir

chmod 0660 /sys/class/htc_cir/cir/enable_cir

5c. Added the service stuff right after your # governor settings as shown below... theirs did have "# HTC CIR firmware update - BEGIN" before, and "# HTC CIR firmware update - END" but they also had alot of entries for things I could not find in your file so i stuck it were I saw the start of similar code, just my guess.

# governor settings
write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 1

service cir_fw_update /system/bin/cir_fw_update -u /system/etc/cir.img
class main
user root
group root
oneshot

service akmd /system/bin/akmd
class main
user system
group system misc input

Can you please tell me where I may have issues? I verified all files get copied during build its does not crash and the service apk does run and the app does not crash when sending commands, however it does not actually send or receive and IR commands.

---------- Post added at 06:27 PM ---------- Previous post was at 06:23 PM ----------

@TripNRaVeR Also one thing I am confused on is your init.rc that I can't compare against cm source has under # setup the global environment

export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar

When I Add below to your init.qcom.rc since that file is imported by init.rc does my values below get replaced by the on in init.rc? Should I be making the below edit in init.rc rather then init.qcom.rc?

export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/htcirlibs.jar

---------- Post added at 06:56 PM ---------- Previous post was at 06:27 PM ----------

I also saw this comment on CM gerrit from Ethan Chen but I don't quite understand this stuff, it seem like he is saying rather then use the massive export BOOTCLASSPATH you can use "<tab>export $BOOTCLASSPATH:system/framework/htcirlibs.jar" instead... ? Would that append it to the end of whats in init.rc?

http://review.cyanogenmod.org/#/c/48638/1/rootdir/etc/init.qcom.rc

---------- Post added at 07:04 PM ---------- Previous post was at 06:56 PM ----------

I also tried changing to what this commit "Export BOOTCLASSPATH from device rc, use stock init.rc" had in init.qcom.rc

https://github.com/codefireXperimen...mmit/714082233a8b158fab292fec07b634cf5cdcc9b0

export BOOTCLASSPATH ${BOOTCLASSPATH}:/system/framework/htcirlibs.jar

That did not work either...do you think it could be that minor change in your file vs cm for the below?

Edit 2: While comparing your ramdisk with CM i found something maybe in ueventd.qcom.rc

cm has = # cir /dev/ttyHSL2 0660 system system

you have=# cir /dev/ttyHSL3 0660 system system