Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,13 @@ fi

# Set ih8sn config
SERIALNO=$(getprop ro.boot.serialno)
MODEL=$(getprop ro.product.model)
PRODUCT=$(getprop ro.build.product)
DEFAULT_CONFIG=system/etc/ih8sn.conf
if [[ `unzip -l $ZIP | grep ih8sn.conf.$SERIALNO$` ]] && [[ ! -z "$SERIALNO" ]]; then
CONFIG=$DEFAULT_CONFIG.$SERIALNO
elif [[ `unzip -l $ZIP | grep ih8sn.conf.$MODEL$` ]] && [[ ! -z "$MODEL" ]]; then
CONFIG=$DEFAULT_CONFIG.$MODEL
elif [[ `unzip -l $ZIP | grep ih8sn.conf.$PRODUCT$` ]] && [[ ! -z "$PRODUCT" ]]; then
CONFIG=$DEFAULT_CONFIG.$PRODUCT
else
Expand Down
3 changes: 3 additions & 0 deletions push.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ adb wait-for-device push system/bin/ih8sn /system/bin/
adb wait-for-device push system/etc/init/ih8sn.rc /system/etc/init/

$serialno = adb shell getprop ro.boot.serialno
$model = adb shell getprop ro.product.model
$product = adb shell getprop ro.build.product

if (Test-Path "system/etc/ih8sn.conf.${serialno}" -PathType leaf) {
adb wait-for-device push system/etc/ih8sn.conf.${serialno} /system/etc/ih8sn.conf
} elseif (Test-Path "system/etc/ih8sn.conf.${model}" -PathType leaf) {
adb wait-for-device push system/etc/ih8sn.conf.${model} /system/etc/ih8sn.conf
} elseif (Test-Path "system/etc/ih8sn.conf.${product}" -PathType leaf) {
adb wait-for-device push system/etc/ih8sn.conf.${product} /system/etc/ih8sn.conf
} else {
Expand Down
3 changes: 3 additions & 0 deletions push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ adb wait-for-device push system/bin/ih8sn /system/bin/
adb wait-for-device push system/etc/init/ih8sn.rc /system/etc/init/

SERIALNO=$(adb shell getprop ro.boot.serialno)
MODEL=$(adb shell getprop ro.product.model)
PRODUCT=$(adb shell getprop ro.build.product)

if [[ -f "system/etc/ih8sn.conf.${SERIALNO}" ]]; then
adb wait-for-device push system/etc/ih8sn.conf.${SERIALNO} /system/etc/ih8sn.conf
elif [[ -f "system/etc/ih8sn.conf.${MODEL}" ]]; then
adb wait-for-device push system/etc/ih8sn.conf.${MODEL} /system/etc/ih8sn.conf
elif [[ -f "system/etc/ih8sn.conf.${PRODUCT}" ]]; then
adb wait-for-device push system/etc/ih8sn.conf.${PRODUCT} /system/etc/ih8sn.conf
else
Expand Down