diff --git a/device_w7.mk b/device_w7.mk index d93033f..f1cd136 100644 --- a/device_w7.mk +++ b/device_w7.mk @@ -81,6 +81,7 @@ PRODUCT_COPY_FILES += \ device/lge/w7/prebuilt/etc/init.crda.sh:system/etc/init.crda.sh \ device/lge/w7/prebuilt/etc/init.zetaw.post_boot.sh:system/etc/init.zetaw.post_boot.sh \ device/lge/w7/prebuilt/etc/init.zetaw.bt.sh:system/etc/init.zetaw.bt.sh \ + device/lge/w7/prebuilt/etc/init.zetaw.model.sh:system/etc/init.zetaw.model.sh \ device/lge/w7/prebuilt/etc/sap.conf:system/etc/sap.conf \ device/lge/w7/prebuilt/etc/gps.conf:system/etc/gps.conf \ device/lge/w7/prebuilt/etc/msap.conf:system/etc/msap.conf \ @@ -92,9 +93,7 @@ PRODUCT_COPY_FILES += \ device/lge/w7/prebuilt/etc/nfc-nci.conf:system/etc/nfc-nci.conf \ device/lge/w7/prebuilt/etc/libnfc-nxp.conf:system/etc/libnfc-nxp.conf \ device/lge/w7/prebuilt/etc/nfcee_access.xml:system/etc/nfcee_access.xml \ - device/lge/w7/prebuilt/etc/quipc.conf:system/etc/quipc.conf \ - device/lge/w7/prebuilt/etc/init.d/10nfc_checker:system/etc/init.d/10nfc_checker \ - device/lge/w7/prebuilt/etc/init.d/11keys_checker:system/etc/init.d/11keys_checker + device/lge/w7/prebuilt/etc/quipc.conf:system/etc/quipc.conf # Ramdisk PRODUCT_COPY_FILES += \ diff --git a/prebuilt/etc/init.d/10nfc_checker b/prebuilt/etc/init.d/10nfc_checker deleted file mode 100755 index fec9333..0000000 --- a/prebuilt/etc/init.d/10nfc_checker +++ /dev/null @@ -1,12 +0,0 @@ -#!/system/bin/sh - -model=`getprop ro.product.model` - -if [ "$model" = "LG-D410" ] || [ "$model" = "LG-D405" ]; then - mount -o remount,rw /system - chmod 000 /system/etc/permissions/android.hardware.nfc.xml - chmod 000 /system/etc/permissions/android.hardware.nfc.hce.xml - chmod 000 /system/lib/hw/nfc_nci.w7.so - chmod 000 /system/app/NfcNci/NfcNci.apk - mount -o remount,ro /system -fi diff --git a/prebuilt/etc/init.d/11keys_checker b/prebuilt/etc/init.zetaw.model.sh old mode 100755 new mode 100644 similarity index 57% rename from prebuilt/etc/init.d/11keys_checker rename to prebuilt/etc/init.zetaw.model.sh index e237a35..2d5d859 --- a/prebuilt/etc/init.d/11keys_checker +++ b/prebuilt/etc/init.zetaw.model.sh @@ -1,12 +1,21 @@ #!/system/bin/sh model=`getprop ro.product.model` + mount -o remount,rw /system rm /system/usr/keylayout/Generic.kl + if [ "$model" = "LG-D410" ] || [ "$model" = "LG-D410hn" ]; then ln -s /system/usr/keylayout/Generic-D410.kl /system/usr/keylayout/Generic.kl else ln -s /system/usr/keylayout/Generic-D4x5.kl /system/usr/keylayout/Generic.kl fi -mount -o remount,ro /system +if [ "$model" = "LG-D410" ] || [ "$model" = "LG-D405" ]; then + chmod 000 /system/etc/permissions/android.hardware.nfc.xml + chmod 000 /system/etc/permissions/android.hardware.nfc.hce.xml + chmod 000 /system/lib/hw/nfc_nci.w7.so + chmod 000 /system/app/NfcNci/NfcNci.apk +fi + +mount -o remount,ro /system diff --git a/prebuilt/etc/init.zetaw.post_boot.sh b/prebuilt/etc/init.zetaw.post_boot.sh index a905a85..82fd085 100644 --- a/prebuilt/etc/init.zetaw.post_boot.sh +++ b/prebuilt/etc/init.zetaw.post_boot.sh @@ -26,11 +26,6 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# Run model checker -mount -o remount,rw /system -find /system/etc/init.d -type f -exec chmod 755 {} \; -mount -o remount,ro /system - target=`getprop ro.board.platform` debuggable=`getprop ro.debuggable` case "$target" in diff --git a/rootdir/init.zetaw.syspart_fixup.sh b/rootdir/init.zetaw.syspart_fixup.sh index 32980c1..b6dbafc 100755 --- a/rootdir/init.zetaw.syspart_fixup.sh +++ b/rootdir/init.zetaw.syspart_fixup.sh @@ -65,6 +65,11 @@ if [ -f /system/etc/init.zetaw.wifi.sh ]; then /system/bin/sh /system/etc/init.zetaw.wifi.sh "$target" "$serial" fi +# Run model checker +if [ -f /system/etc/init.zetaw.model.sh ]; then + /system/bin/sh /system/etc/init.zetaw.model.sh +fi + # Run the sensor script if [ -f /system/etc/init.zetaw.sensor.sh ]; then /system/bin/sh /system/etc/init.zetaw.sensor.sh