[Galaxy Note 3 Original Android Development] jcadduono:
somewhere in the build, it compiles the ramdisk for the kernel. that includes healthd, adbd. init, sepolicy files, etc. I need the whole ramdisk with the changes to android_device_samsung_hlte/init/init_hlte.cpp:

if (strstr(bootloader, "N900S")) {
/* hlteskt */
property_set("ro.build.fingerprint", "samsung/hlteskt/hlte:4.4.2/KOT49H/N900SKSUFNH4:user/release-keys");
property_set("ro.build.description", "hlteskt-user 4.4.2 KOT49H N900SKSUFNH4 release-keys");
property_set("ro.product.model", "SM-N900S");
property_set("ro.product.device", "hlteskt");
} else if (strstr(bootloader, "N900K")) {
/* hltektt */
property_set("ro.build.fingerprint", "samsung/hltektt/hlte:4.4.2/KOT49H/N900KKKUFNI1:user/release-keys");
property_set("ro.build.description", "hltektt-user 4.4.2 KOT49H N900KKKUFNI1 release-keys");
property_set("ro.product.model", "SM-N900K");
property_set("ro.product.device", "hltektt");
} else {
/* hltexx */
property_set("ro.build.fingerprint", "samsung/hltexx/hlte:4.4.2/KOT49H/N9005XXUENC2:user/release-keys");
property_set("ro.build.description", "hltexx-user 4.4.2 KOT49H N9005XXUENC2 release-keys");
property_set("ro.product.model", "SM-N9005");
property_set("ro.product.device", "hltexx");
}

replace with:

if (strstr(bootloader, "N900A")) {
/* hlteatt */
property_set("ro.build.fingerprint", "samsung/hlteuc/hlteatt:5.0/LRX21V/N900AUCUEOC1:user/release-keys");
property_set("ro.build.description", "hlteuc-user 5.0 LRX21V N900AUCUEOC1 release-keys");
property_set("ro.product.model", "SM-N900A");
property_set("ro.product.name", "hlteuc");
property_set("ro.product.device", "hlteatt");
} else if (strstr(bootloader, "N900W8")) {
/* hltecan */
if (strstr(bootloader, "N900W8UB")) {
/* hltecan/ub */
property_set("ro.build.fingerprint", "samsung/hlteub/hltecan:5.0/LRX21V/N900W8UBU2DOI2:user/release-keys");
property_set("ro.build.description", "hlteub-user 5.0 LRX21V N900W8UBU2DOI2 release-keys");
property_set("ro.product.name", "hlteub");
} else {
/* hltecan/vl */
property_set("ro.build.fingerprint", "samsung/hltevl/hltecan:5.0/LRX21V/N900W8VLU2DOH1:user/release-keys");
property_set("ro.build.description", "hltevl-user 5.0 LRX21V N900W8VLU2DOH1 release-keys");
property_set("ro.product.name", "hltevl");
}
property_set("ro.product.model", "SM-N900W8");
property_set("ro.product.device", "hltecan");
} else if (strstr(bootloader, "SC01F")) {
/* hltedcm */
property_set("ro.build.fingerprint", "samsung/SC-01F/SC-01F:5.0/LRX21V/SC01FOMUGOI4:user/release-keys");
property_set("ro.build.description", "hltedcm-user 5.0 LRX21V SC01FOMUGOI4 release-keys");
property_set("ro.product.model", "SC-01F");
property_set("ro.product.name", "hltedcm");
property_set("ro.product.device", "hltedcm");
} else if (strstr(bootloader, "SCL22")) {
/* hltekdi */
property_set("ro.build.fingerprint", "KDDI/SCL22/SCL22:5.0/LRX21V/SCL22KDU2GOH7:user/release-keys");
property_set("ro.build.description", "hltekdi-user 5.0 LRX21V SCL22KDU2GOH7 release-keys");
property_set("ro.product.model", "SCL22");
property_set("ro.product.name", "hltekdi");
property_set("ro.product.device", "hltekdi");
} else if (strstr(bootloader, "N900K")) {
/* hltektt */
property_set("ro.build.fingerprint", "samsung/hltektt/hltektt:5.0/LRX21V/N900KKKU0GOF2:user/release-keys");
property_set("ro.build.description", "hltektt-user 5.0 LRX21V N900KKKU0GOF2 release-keys");
property_set("ro.product.model", "SM-N900K");
property_set("ro.product.name", "hltektt");
property_set("ro.product.device", "hltektt");
} else if (strstr(bootloader, "N900L")) {
/* hltelgt */
property_set("ro.build.fingerprint", "samsung/hltelgt/hltelgt:5.0/LRX21V/N900LKLU0GOJ4:user/release-keys");
property_set("ro.build.description", "hltelgt-user 5.0 LRX21V N900LKLU0GOJ4 release-keys");
property_set("ro.product.model", "SM-N900L");
property_set("ro.product.name", "hltelgt");
property_set("ro.product.device", "hltelgt");
} else if (strstr(bootloader, "N900S")) {
/* hlteskt */
property_set("ro.build.fingerprint", "samsung/hlteskt/hlteskt:5.0/LRX21V/N900SKSU0GOJ2:user/release-keys");
property_set("ro.build.description", "hlteskt-user 5.0 LRX21V N900SKSU0GOJ2 release-keys");
property_set("ro.product.model", "SM-N900S");
property_set("ro.product.name", "hlteskt");
property_set("ro.product.device", "hlteskt");
} else if (strstr(bootloader, "N900P")) {
/* hltespr */
property_set("ro.build.fingerprint", "samsung/hltespr/hltespr:5.0/LRX21V/N900PVPUEOH1:user/release-keys");
property_set("ro.build.description", "hltespr-user 5.0 LRX21V N900PVPUEOH1 release-keys");
property_set("ro.product.model", "SM-N900P");
property_set("ro.product.name", "hltespr");
property_set("ro.product.device", "hltespr");
} else if (strstr(bootloader, "N900T")) {
/* hltetmo */
property_set("ro.build.fingerprint", "samsung/hltetmo/hltetmo:5.0/LRX21V/N900TUVUFOB6:user/release-keys");
property_set("ro.build.description", "hltetmo-user 5.0 LRX21V N900TUVUFOB6 release-keys");
property_set("ro.product.model", "SM-N900T");
property_set("ro.product.name", "hltetmo");
property_set("ro.product.device", "hltetmo");
} else if (strstr(bootloader, "N900R4")) {
/* hlteusc */
property_set("ro.build.fingerprint", "samsung/hlteusc/hlteusc:5.0/LRX21V/N900R4TYUDOH1:user/release-keys");
property_set("ro.build.description", "hlteusc-user 5.0 LRX21V N900R4TYUDOH1 release-keys");
property_set("ro.product.model", "SM-N900R4");
property_set("ro.product.name", "hlteusc");
property_set("ro.product.device", "hlteusc");
} else if (strstr(bootloader, "N900V")) {
/* hltevzw */
property_set("ro.build.fingerprint", "Verizon/hltevzw/hltevzw:5.0/LRX21V/N900VVRUEOF1:user/release-keys");
property_set("ro.build.description", "hltevzw-user 5.0 LRX21V N900VVRUEOF1 release-keys");
property_set("ro.product.model", "SM-N900V");
property_set("ro.product.name", "hltevzw");
property_set("ro.product.device", "hltevzw");
} else {
/* hlte */
if (strstr(bootloader, "N9005DX")) {
/* hlte/dx */
property_set("ro.build.fingerprint", "samsung/hltedx/hlte:5.0/LRX21V/N9005DXUGBOK1:user/release-keys");
property_set("ro.build.description", "hltedx-user 5.0 LRX21V N9005DXUGBOK1 release-keys");
property_set("ro.product.name", "hltedx");
} else if (strstr(bootloader, "N9005VJ")) {
/* hlte/vj */
property_set("ro.build.fingerprint", "samsung/hltevj/hlte:5.0/LRX21V/N9005VJUGBOI3:user/release-keys");
property_set("ro.build.description", "hltevj-user 5.0 LRX21V N9005VJUGBOI3 release-keys");
property_set("ro.product.name", "hltevj");
} else if (strstr(bootloader, "N9005ZS")) {
/* hlte/zh */
property_set("ro.build.fingerprint", "samsung/hltezh/hlte:5.0/LRX21V/N9005ZSUGOI1:user/release-keys");
property_set("ro.build.description", "hltezh-user 5.0 LRX21V N9005ZSUGOI1 release-keys");
property_set("ro.product.name", "hltezh");
} else {
/* all other variants become hlte/xx */
property_set("ro.build.fingerprint", "samsung/hltexx/hlte:5.0/LRX21V/N9005XXUGBOK6:user/release-keys");
property_set("ro.build.description", "hltexx-user 5.0 LRX21V N9005XXUGBOK6 release-keys");
property_set("ro.product.name", "hltexx");
}
property_set("ro.product.model", "SM-N9005");
property_set("ro.product.device", "hlte");
}

that's the repository at https://github.com/CyanogenMod/android_device_samsung_hlte/tree/cm-13.0

By replacing the device check block with that it should properly set model info and stuff for every variant, and I can use that in every AOSP based rom :)

Another alternative is to replace the entire init msm function with: (will g++ even let you compile an empty function? lol)

void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *board_type)
{
UNUSED(msm_id);
UNUSED(msm_ver);
UNUSED(board_type);
}

That would stop it from setting any device information props and I could just go off the kernel ramdisk using init.carrier.rc, but my first solution is a much better plan. (loading proper device info based on bootloader version)

If you want you can also edit in BoardConfig.mk: (replace similar line with this)

TARGET_OTA_ASSERT_DEVICE := hlte,hltexx,hlteatt,hltecan,hltedcm,hltekdi,hltektt,hltelgt,hlteskt,hltespr,hltetmo,hlteusc,hltevzw,SM-N9005,SM-N900A,SM-N900W8,SC-01F,SCL22,SM-N900K,SM-N900L,SM-N900S,SM-N900P,SM-N900T,SM-N900R4,SM-N900V

That will allow you to flash your CM zips in recovery of all the devices added in the init code block.

update: fixed typo in hltespr model name