Skip to content

Commit

Permalink
Explicitly add 12th gen lineup
Browse files Browse the repository at this point in the history
I'm an idiot
  • Loading branch information
ThatHackerDudeFromCyberspace committed Jan 2, 2025
1 parent 0d1dfed commit dba98af
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 5 deletions.
57 changes: 53 additions & 4 deletions src/bridge
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ IS_KOA3="false"
IS_PW5="false"
IS_KT5="false"
IS_KS="false"
IS_PW6="false"
IS_KT6="false"
IS_CS="false"
K5_ATLEAST_54="false"
K5_ATLEAST_512="false"
MKK_PERSISTENT_STORAGE="/var/local/mkk"
Expand Down Expand Up @@ -96,8 +99,8 @@ find_rootfs()
elif [ "${IS_PW4}" == "true" ] || [ "${IS_KT4}" == "true" ] ; then
# NOTE: At least this time, rdev agrees with kdb...
ROOTPART="mmcblk1p8"
elif [ "${IS_PW5}" == "true" ] || [ "${IS_KT5}" == "true" ] || [ "${IS_KS}" == "true" ] ; then
# NOTE: On Bellatrix & Bellatrix3, kdb & platform_variables also agree...
elif [ "${IS_PW5}" == "true" ] || [ "${IS_KT5}" == "true" ] || [ "${IS_KS}" == "true" ] || [ "${IS_PW6}" == "true" ] || [ "${IS_KT6}" == "true" ] || [ "${IS_CS}" == "true" ] ; then
# NOTE: On Bellatrix & Bellatrix3 & Bellatrix4, kdb & platform_variables also agree...
ROOTPART="mmcblk0p8"
fi

Expand Down Expand Up @@ -206,6 +209,18 @@ check_model()
# KS...
IS_KS="true"
;;
"349" | "346" | "33X" | "33W" | "3HA" | "3H5" | "3H3" | "3H8" | "3J5" | "3JS" )
# PW6
IS_PW6="true"
;;
"3L5" | "3L6" | "3L4" | "3L3" | "A89" | "3L2" | "3KM" )
# KT6
IS_KT6="true"
;;
"3H7" )
# CS
IS_CS="true"
;;
* )
# Fallback... We shouldn't ever hit that.
IS_TOUCH="true"
Expand Down Expand Up @@ -234,12 +249,12 @@ check_model()
SCREEN_Y_RES=1680
EIPS_X_RES=16
EIPS_Y_RES=24
elif [ "${IS_PW5}" == "true" ] ; then
elif [ "${IS_PW5}" == "true" ] || [ "${IS_PW6}" == "true" ] ; then
SCREEN_X_RES=1236
SCREEN_Y_RES=1648
EIPS_X_RES=16
EIPS_Y_RES=24
elif [ "${IS_KT5}" == "true" ] ; then
elif [ "${IS_KT5}" == "true" || [ "${IS_KT6}" == "true" ] ] ; then
SCREEN_X_RES=1072
SCREEN_Y_RES=1448
EIPS_X_RES=16
Expand Down Expand Up @@ -322,6 +337,21 @@ check_version()
logmsg "I" "check_version" "" "KS detected, assuming >= 5.4"
K5_ATLEAST_54="true"
K5_ATLEAST_512="true"
elif [ "${IS_PW6}" == "true" ] ; then
# The PW6 shipped on >= 5.17.y ;)
logmsg "I" "check_version" "" "KS detected, assuming >= 5.4"
K5_ATLEAST_54="true"
K5_ATLEAST_512="true"
elif [ "${IS_KT6}" == "true" ] ; then
# The KT6 shipped on >= 5.17.y ;)
logmsg "I" "check_version" "" "KS detected, assuming >= 5.4"
K5_ATLEAST_54="true"
K5_ATLEAST_512="true"
elif [ "${IS_CS}" == "true" ] ; then
# The CS shipped on >= 5.18.y ;)
logmsg "I" "check_version" "" "KS detected, assuming >= 5.4"
K5_ATLEAST_54="true"
K5_ATLEAST_512="true"
else
# Poor man's last resort trick. See if we can find a new feature of FW 5.4 on the FS...
if [ -f "${ROOT}/etc/upstart/contentpackd.conf" ] ; then
Expand Down Expand Up @@ -759,6 +789,18 @@ install_log_kpp()
print_log_kpp_feedback
}

install_log_kpp_app()
{
mount_root_rw
logmsg "I" "install_log_kpp" "" "Patching in the dispatch command for kpp"
# KPP (React, new UI)
sed -e '/^{/a\' -e ' ";log" : "/usr/bin/logThis.sh",' -i "${ROOT}/app/kpp_app_cmds.json"
mount_ro

# Show some feedback
print_log_kpp_feedback
}

install_bridge_job()
{
mount_root_rw
Expand Down Expand Up @@ -916,6 +958,13 @@ if [ -f "${ROOT}/usr/share/app/kpp_sys_cmds.json" ] ; then
fi
fi

# Check if we need to do something about the dispatch command (for the new React UI, just to be safe - hackerdude)
if [ -f "${ROOT}/app/kpp_app_cmds.json" ] ; then
if ! grep -q "logThis.sh" "${ROOT}/app/kpp_app_cmds.json" ; then
install_log_kpp_app
fi
fi

# Check if we need to do something with the bridge job
if [ -f "${MKK_PERSISTENT_STORAGE}/bridge.conf" ] ; then
if [ ! -f "${ROOT}/etc/upstart/bridge.conf" ] ; then
Expand Down
2 changes: 1 addition & 1 deletion src/install-bridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ echo '# Name: Run Hotfix' >> /mnt/us/documents/run_bridge.sh
echo '# Author: HackerDude' >> /mnt/us/documents/run_bridge.sh
echo '# Icon:' >> /mnt/us/documents/run_bridge.sh
echo '# DontUseFBInk' >> /mnt/us/documents/run_bridge.sh
echo 'sh /var/local/system/fixup' >> /mnt/us/documents/run_bridge.sh
echo 'sh /var/local/mkk/bridge.sh' >> /mnt/us/documents/run_bridge.sh
echo 'reboot' >> /mnt/us/documents/run_bridge.sh

otautils_update_progressbar
Expand Down

0 comments on commit dba98af

Please sign in to comment.