summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Shields <keepcalm444@gmail.com>2016-12-04 11:34:23 +1100
committerTrafalgar Square <schneller.demian@gmail.com>2016-12-19 15:33:23 +0100
commita659aaa6fca9b0aec3fcde5b5d7c699efc1ca09d (patch)
treef51369dd0deaf2d50484a39f2b5331252fbb1245
parent83a3369867d0713bda8cd49a42f6165a787f288f (diff)
i9300: switch to generic extract-utils
Change-Id: Ic73260c1c1fb948426ce7ac234c3551dd17e7151
-rwxr-xr-xextract-files.sh88
-rw-r--r--proprietary-files.txt8
2 files changed, 10 insertions, 86 deletions
diff --git a/extract-files.sh b/extract-files.sh
index 5088007..1af3f5c 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -1,87 +1,12 @@
-#!/bin/sh
-
-# Copyright (C) 2016 The CyanogenMod Project
+#!/bin/bash
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This file is generated by device/common/generate-blob-scripts.sh - DO NOT EDIT
-
-VENDOR=samsung
-DEVICE=i9300
-
-mkdir -p ../../../vendor/$VENDOR/$DEVICE/proprietary
-
-adb root
-adb wait-for-device
-
-echo "Pulling proprietary files..."
-for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do
- DEST=$FILE
- if echo $FILE | grep ':' 2>&1 >/dev/null; then
- DEST=`echo $FILE | sed 's/.*://'`
- FILE=`echo $FILE | sed 's/:.*//'`
- fi
- DIR=`dirname $DEST`
- if [ ! -d ../../../vendor/$VENDOR/$DEVICE/proprietary/$DIR ]; then
- mkdir -p ../../../vendor/$VENDOR/$DEVICE/proprietary/$DIR
- fi
- adb pull /$FILE ../../../vendor/$VENDOR/$DEVICE/proprietary/$DEST
-done
-
-
-(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk
-# Copyright (C) 2016 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.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := vendor/__VENDOR__/__DEVICE__
-
-PRODUCT_COPY_FILES += \\
-EOF
-
-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
- DEST=$FILE
- if echo $FILE | grep ':' 2>&1 >/dev/null; then
- DEST=`echo $FILE | sed 's/.*://'`
- FILE=`echo $FILE | sed 's/:.*//'`
- fi
- echo " \$(LOCAL_PATH)/proprietary/$DEST:$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) 2016 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.
# You may obtain a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -89,10 +14,9 @@ done
# See the License for the specific language governing permissions and
# limitations under the License.
-# Pick up overlay for features that depend on non-open-source files
-DEVICE_PACKAGE_OVERLAYS += vendor/__VENDOR__/__DEVICE__/overlay
+set -e
-\$(call inherit-product, vendor/__VENDOR__/__DEVICE__/__DEVICE__-vendor-blobs.mk)
-EOF
+export VENDOR=samsung
+export DEVICE=i9300
-./../../../device/samsung/smdk4412-common/extract-files.sh
+./../smdk4412-common/extract-files.sh $@
diff --git a/proprietary-files.txt b/proprietary-files.txt
index bc71c03..32ea739 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -1,4 +1,4 @@
-system/bin/glgps
-system/lib/hw/gps.exynos4.vendor.so:system/lib/hw/gps.tegra3.so
-system/lib/libakm.so
-system/lib/libsec-ril.so
+bin/glgps
+lib/hw/gps.exynos4.vendor.so
+lib/libakm.so
+lib/libsec-ril.so