summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2013-02-09 15:21:20 +0000
committercodeworkx <codeworkx@cyanogenmod.org>2013-02-09 15:22:00 +0000
commitbb39d2ca33d3dbec8d45dbc2e549005e0366d195 (patch)
tree14388d81e8acdbcd46341bd8a791409fc2eec7ad
parent51c5e4ccc9f55ef384ff35cd60b680282a713965 (diff)
downloaddevice_samsung_n7100-bb39d2ca33d3dbec8d45dbc2e549005e0366d195.tar.gz
device_samsung_n7100-bb39d2ca33d3dbec8d45dbc2e549005e0366d195.tar.bz2
device_samsung_n7100-bb39d2ca33d3dbec8d45dbc2e549005e0366d195.zip
n7100: update extract script
Change-Id: Ief86ed9c59ec77d55cca552bb4ffc2cb13fbb6f2
-rwxr-xr-xextract-files.sh99
-rw-r--r--proprietary-files.txt18
2 files changed, 52 insertions, 65 deletions
diff --git a/extract-files.sh b/extract-files.sh
index 28d4de0..3d140b2 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2012 The CyanogenMod Project
+# Copyright (C) 2013 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,37 +16,26 @@
# This file is generated by device/common/generate-blob-scripts.sh - DO NOT EDIT
-MANUFACTURER=samsung
+VENDOR=samsung
DEVICE=n7100
-mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
+mkdir -p ../../../vendor/$VENDOR/$DEVICE/proprietary
adb root
-sleep 3
-
-adb pull /system/bin/gpsd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/bin/gpsd
-adb pull /system/bin/rild ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/bin/rild
-adb pull /system/bin/sensorservice ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/bin/sensorservice
-adb pull /system/bin/sensorhubservice ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/bin/sensorhubservice
-adb pull /system/lib/hw/gps.exynos4.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/lib/hw/gps.exynos4.so
-adb pull /system/lib/hw/vendor-camera.exynos4.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/lib/hw/camera.smdk4x12.so
-adb pull /system/lib/hw/sensors.smdk4x12.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/lib/hw/sensors.smdk4x12.so
-adb pull /system/lib/hw/sensorhubs.smdk4x12.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/lib/hw/sensorhubs.smdk4x12.so
-adb pull /system/lib/libakm.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/lib/libakm.so
-adb pull /system/lib/libril.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/lib/libril.so
-adb pull /system/lib/libsec-ril.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/lib/libsec-ril.so
-adb pull /system/lib/libsensorservice.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/lib/libsensorservice.so
-adb pull /system/lib/libsensorhubservice.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/lib/libsensorhubservice.so
-adb pull /system/usr/idc/sec_e-pen.idc ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/usr/idc/sec_e-pen.idc
-adb pull /system/usr/keylayout/sec_e-pen.kl ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/usr/keylayout/sec_e-pen.kl
-adb pull /system/usr/keylayout/sec_touchkey.kl ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/usr/keylayout/sec_touchkey.kl
-adb pull /system/vendor/firmware/libpn544_fw.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/vendor/firmware/libpn544_fw.so
-adb pull /system/vendor/firmware/SlimISP_GK.bin ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/vendor/firmware/SlimISP_GK.bin
-adb pull /system/vendor/firmware/SlimISP_ZK.bin ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/vendor/firmware/SlimISP_ZK.bin
-
-
-(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/$DEVICE-vendor-blobs.mk
-# Copyright (C) 2012 The CyanogenMod Project
+adb wait-for-device
+
+echo "Pulling proprietary files..."
+for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do
+ DIR=`dirname $FILE`
+ if [ ! -d ../../../vendor/$VENDOR/$DEVICE/proprietary/$DIR ]; then
+ mkdir -p ../../../vendor/$VENDOR/$DEVICE/proprietary/$DIR
+ fi
+ adb pull /$FILE ../../../vendor/$VENDOR/$DEVICE/proprietary/$FILE
+done
+
+
+(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk
+# Copyright (C) 2013 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -60,43 +49,23 @@ adb pull /system/vendor/firmware/SlimISP_ZK.bin ../../../vendor/$MANUFACTURER/$D
# See the License for the specific language governing permissions and
# limitations under the License.
-LOCAL_PATH := vendor/samsung/n7100
-
-PRODUCT_COPY_FILES += \\
- \$(LOCAL_PATH)/proprietary/system/bin/gpsd:system/bin/gpsd \\
- \$(LOCAL_PATH)/proprietary/system/bin/sensorservice:system/bin/sensorservice \\
- \$(LOCAL_PATH)/proprietary/system/bin/sensorhubservice:system/bin/sensorhubservice \\
- \$(LOCAL_PATH)/proprietary/system/bin/rild:system/bin/rild
-
-PRODUCT_COPY_FILES += \\
- \$(LOCAL_PATH)/proprietary/system/lib/libakm.so:system/lib/libakm.so \\
- \$(LOCAL_PATH)/proprietary/system/lib/libril.so:system/lib/libril.so \\
- \$(LOCAL_PATH)/proprietary/system/lib/libsec-ril.so:system/lib/libsec-ril.so \\
- \$(LOCAL_PATH)/proprietary/system/lib/libsensorservice.so:system/lib/libsensorservice.so \\
- \$(LOCAL_PATH)/proprietary/system/lib/libsensorhubservice.so:system/lib/libsensorhubservice.so
-
-PRODUCT_COPY_FILES += \\
- \$(LOCAL_PATH)/proprietary/system/lib/hw/gps.exynos4.so:system/lib/hw/gps.exynos4.so \\
- \$(LOCAL_PATH)/proprietary/system/lib/hw/camera.smdk4x12.so:system/lib/hw/vendor-camera.exynos4.so \\
- \$(LOCAL_PATH)/proprietary/system/lib/hw/sensors.smdk4x12.so:system/lib/hw/sensors.smdk4x12.so \\
- \$(LOCAL_PATH)/proprietary/system/lib/hw/sensorhubs.smdk4x12.so:system/lib/hw/sensorhubs.smdk4x12.so
-
-PRODUCT_COPY_FILES += \\
- \$(LOCAL_PATH)/proprietary/system/usr/idc/sec_e-pen.idc:system/usr/idc/sec_e-pen.idc
+LOCAL_PATH := vendor/__VENDOR__/__DEVICE__
PRODUCT_COPY_FILES += \\
- \$(LOCAL_PATH)/proprietary/system/usr/keylayout/sec_e-pen.kl:system/usr/keylayout/sec_e-pen.kl \\
- \$(LOCAL_PATH)/proprietary/system/usr/keylayout/sec_touchkey.kl:system/usr/keylayout/sec_touchkey.kl
-
-PRODUCT_COPY_FILES += \\
- \$(LOCAL_PATH)/proprietary/system/vendor/firmware/libpn544_fw.so:system/vendor/firmware/libpn544_fw.so \\
- \$(LOCAL_PATH)/proprietary/system/vendor/firmware/SlimISP_GK.bin:system/vendor/firmware/SlimISP_GK.bin \\
- \$(LOCAL_PATH)/proprietary/system/vendor/firmware/SlimISP_ZK.bin:system/vendor/firmware/SlimISP_ZK.bin
-
EOF
-(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/$DEVICE-vendor.mk
-# Copyright (C) 2012 The CyanogenMod Project
+LINEEND=" \\"
+COUNT=`cat proprietary-files.txt | grep -v ^# | grep -v ^$ | wc -l | awk {'print $1'}`
+for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do
+ COUNT=`expr $COUNT - 1`
+ if [ $COUNT = "0" ]; then
+ LINEEND=""
+ fi
+ echo " \$(LOCAL_PATH)/proprietary/$FILE:$FILE$LINEEND" >> ../../../vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk
+done
+
+(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$DEVICE/$DEVICE-vendor.mk
+# Copyright (C) 2013 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -111,13 +80,13 @@ EOF
# limitations under the License.
# Pick up overlay for features that depend on non-open-source files
-DEVICE_PACKAGE_OVERLAYS := vendor/__MANUFACTURER__/__DEVICE__/overlay
+DEVICE_PACKAGE_OVERLAYS += vendor/__VENDOR__/__DEVICE__/overlay
-\$(call inherit-product, vendor/__MANUFACTURER__/__DEVICE__/__DEVICE__-vendor-blobs.mk)
+\$(call inherit-product, vendor/__VENDOR__/__DEVICE__/__DEVICE__-vendor-blobs.mk)
EOF
-(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/BoardConfigVendor.mk
-# Copyright (C) 2012 The CyanogenMod Project
+(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$DEVICE/BoardConfigVendor.mk
+# Copyright (C) 2013 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/proprietary-files.txt b/proprietary-files.txt
new file mode 100644
index 0000000..d173b9f
--- /dev/null
+++ b/proprietary-files.txt
@@ -0,0 +1,18 @@
+system/bin/gpsd
+system/bin/rild
+system/bin/sensorservice
+system/bin/sensorhubservice
+system/lib/hw/gps.exynos4.so
+system/lib/hw/vendor-camera.exynos4.so
+system/lib/hw/sensors.smdk4x12.so
+system/lib/hw/sensorhubs.smdk4x12.so
+system/lib/libakm.so
+system/lib/libril.so
+system/lib/libsec-ril.so
+system/lib/libsensorservice.so
+system/lib/libsensorhubservice.so
+system/usr/idc/sec_e-pen.idc
+system/usr/keylayout/sec_e-pen.kl
+system/usr/keylayout/sec_touchkey.kl
+system/vendor/firmware/SlimISP_GK.bin
+system/vendor/firmware/SlimISP_ZK.bin