Skip to content

Commit

Permalink
Fix model checker on first boot
Browse files Browse the repository at this point in the history
Change-Id: I6391298ae4b8959849aa71fcbea8069210090aa4
  • Loading branch information
BigMajster authored and Quarx2k committed Dec 19, 2014
1 parent 7e64105 commit 99fc481
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 21 deletions.
5 changes: 2 additions & 3 deletions device_w7.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 += \
Expand Down
12 changes: 0 additions & 12 deletions prebuilt/etc/init.d/10nfc_checker

This file was deleted.

11 changes: 10 additions & 1 deletion prebuilt/etc/init.d/11keys_checker → prebuilt/etc/init.zetaw.model.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -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
5 changes: 0 additions & 5 deletions prebuilt/etc/init.zetaw.post_boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions rootdir/init.zetaw.syspart_fixup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99fc481

Please sign in to comment.