Skip to content

Commit

Permalink
Add extract-files and setup-makefiles
Browse files Browse the repository at this point in the history
Change-Id: Ie59fb5bd40fa82bf398bd6380cd202fbcccb910a
  • Loading branch information
dhacker29 committed Jul 16, 2013
1 parent c2df46e commit bb9cdba
Show file tree
Hide file tree
Showing 7 changed files with 560 additions and 50 deletions.
28 changes: 28 additions & 0 deletions common-lte-proprietary-files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# LTE RIL files need for maserati, spyder and targa
bin/base64
bin/extract-embedded-files
bin/logcatd
bin/logcatd-blan
bin/mm-wrigley-qc-dump.sh
bin/oem-iptables-init.sh
bin/vril-dump
bin/wrigley-diag.sh
bin/wrigley-dump.sh
bin/wrigley-fetch-mpr.sh
bin/wrigley-iptables.sh
lib/libb64.so
lib/libbabysit.so
lib/libmotdb.so
lib/lib-mot-lte-ril.so
lib/libmoto_mdmctrl.so
lib/libmoto_nwif_ril.so
lib/libmoto_qmi_ril.so
lib/libmoto_ril.so
lib/librds_util.so
lib/libril_rds.so
lib/moto-ril-multimode.so
lib/libims_client_jni.so
lib/libmotricity.so
etc/permissions/com.verizon.hardware.telephony.ehrpd.xml
etc/permissions/com.verizon.hardware.telephony.lte.xml
etc/permissions/com.vzw.vzwapnlib.xml
57 changes: 8 additions & 49 deletions common-proprietary-files.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# system/bin (from spyder 98.72.16 JB OTA JB 4.1.2)
bin/ap_gain.bin
bin/ap_gain_mmul.bin
# system/bin
bin/batch
bin/battd
bin/dbvc_atvc_property_set
Expand All @@ -9,15 +7,13 @@ bin/enc_mgt_tool
bin/fips_loader
bin/ftmipcd
bin/libthermal-manager.cfg
bin/logcatd
bin/logcatd-blan
bin/mount_cdrom.sh
bin/mount_ext3.sh
bin/startup_smc.sh
bin/thermaldaemon
bin/tty2ttyd
bin/whisperd

# system/etc (from spyder 98.72.16 JB OTA JB 4.1.2)
# system/etc
etc/ecryptfs.tab
etc/encrypt.tab
etc/smc_android_cfg.ini
Expand All @@ -26,26 +22,23 @@ etc/smc_pa_pk_4_8Mb_ipa.bin
etc/smc_pa_pk_4_ipa.bin
etc/firmware/ap_bt_data.bin

# system/usr (from spyder 98.72.16 JB OTA JB 4.1.2)
# system/usr
usr/idc/Motorola_Mobility_Motorola_HD_Dock.idc
usr/keylayout/cpcap-key.kl

# system/lib/hw (from spyder 98.72.16 JB OTA JB 4.1.2)
# system/lib/hw
lib/hw/alsa.omap4.so
lib/hw/audio.primary.omap4.so
lib/hw/gps.spyder.so

# system/lib (from spyder 98.72.16 JB OTA JB 4.1.2)
# system/lib
lib/libaudio_ext.so
lib/libbattd.so
lib/libdataencrypt_openssl.so
lib/libdataencrypt_tpa.so
lib/libdataencrypt_utils.so
lib/libhdcp.so
lib/libhdmi.so
lib/libmot_atcmd.so
lib/libmotodbgutils.so
lib/libmoto_netutil.so
lib/libnbgm_9.0.1.so
lib/libnmea.so
lib/libopenssl-smime.so
lib/libOMX.ITTIAM.AAC.encode.so
Expand Down Expand Up @@ -74,43 +67,9 @@ etc/omapcam/module1_ee/cid1039_ov8820_ducati_gamma.bin
etc/omapcam/module1_ee/cid1039_ov8820_ipipe_ee_dcc.bin
etc/omapcam/module1_ee/cid1039_ov8820_ducati_nsf_ldc.bin

# DRM blobs (from spyder 98.72.16 JB OTA JB 4.1.2)
# DRM blobs
lib/libWVphoneAPI.so
vendor/lib/libwvdrm_L3.so
vendor/lib/libwvm.so
vendor/lib/libWVStreamControlAPI_L3.so
vendor/lib/drm/libdrmwvmplugin.so

# LTE RIL files need for maserati, spyder and targa (from spyder 98.72.16 JB OTA JB 4.1.2)
bin/base64
bin/extract-embedded-files
bin/mm-wrigley-qc-dump.sh
bin/oem-iptables-init.sh
bin/vril-dump
bin/wrigley-diag.sh
bin/wrigley-dump.sh
bin/wrigley-fetch-mpr.sh
bin/wrigley-iptables.sh
lib/libb64.so
lib/libbabysit.so
lib/libmotdb.so
lib/lib-mot-lte-ril.so
lib/libmoto_mdmctrl.so
lib/libmoto_nwif_ril.so
lib/libmoto_qmi_ril.so
lib/libmoto_ril.so
lib/librds_util.so
lib/libril_rds.so
lib/moto-ril-multimode.so
lib/libims_client_jni.so

# VZW blobs (from spyder 98.72.16 JB OTA JB 4.1.2)
app/appdirectedsmspermission.apk
app/VerizonSSOEngine.apk
app/VZWAPNLib.apk
app/vzwapnpermission.apk
app/VZWAPNService.apk
etc/permissions/com.vzw.hardware.ehrpd.xml
etc/permissions/com.vzw.hardware.lte.xml
etc/permissions/com.vzw.vzwapnlib.xml
lib/libmotricity.so
6 changes: 6 additions & 0 deletions common-vzw-proprietary-files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# VZW blobs
app/appdirectedsmspermission.apk
app/VerizonSSOEngine.apk
app/VZWAPNLib.apk
app/vzwapnpermission.apk
app/VZWAPNService.apk
1 change: 0 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,3 @@ PRODUCT_LOCALES += en_US
# stuff specific to ti OMAP4 hardware
#$(call inherit-product, hardware/ti/omap4xxx/omap4.mk)
$(call inherit-product, hardware/ti/omap4xxx/security/Android.mk)
$(call inherit-product-if-exists, vendor/motorola/omap4-common/common-vendor.mk)
179 changes: 179 additions & 0 deletions extract-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
#!/bin/bash

if [ $# -eq 1 ]; then
COPY_FROM=$1
test ! -d "$COPY_FROM" && echo error reading dir "$COPY_FROM" && exit 1
fi

test -z "$DEVICE" && echo device not set && exit 2
test -z "$VENDOR" && echo vendor not set && exit 2
test -z "$VENDORDEVICEDIR" && VENDORDEVICEDIR=$DEVICE
export VENDORDEVICEDIR

BASE=../../../vendor/$VENDOR/$VENDORDEVICEDIR/proprietary
rm -rf $BASE/*
rm -rf $BASE/../packages 2> /dev/null

for FILE in `egrep -v '(^#|^$)' ../$DEVICE/device-proprietary-files.txt`; do
echo "Extracting /system/$FILE ..."
OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS
FILE=${PARSING_ARRAY[0]}
DEST=${PARSING_ARRAY[1]}
if [ -z $DEST ]
then
DEST=$FILE
fi
DIR=`dirname $FILE`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
if [ "$COPY_FROM" = "" ]; then
adb pull /system/$FILE $BASE/$DEST
# if file dot not exist try destination
if [ "$?" != "0" ]
then
adb pull /system/$DEST $BASE/$DEST
fi
else
cp $COPY_FROM/$FILE $BASE/$DEST
# if file does not exist try destination
if [ "$?" != "0" ]
then
cp $COPY_FROM/$DEST $BASE/$DEST
fi
fi
done

for FILE in `egrep -v '(^#|^$)' ../omap4-common/proprietary-files.txt`; do
echo "Extracting /system/$FILE ..."
OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS
FILE=${PARSING_ARRAY[0]}
DEST=${PARSING_ARRAY[1]}
if [ -z $DEST ]
then
DEST=$FILE
fi
DIR=`dirname $FILE`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
if [ "$COPY_FROM" = "" ]; then
adb pull /system/$FILE $BASE/$DEST
# if file dot not exist try destination
if [ "$?" != "0" ]
then
adb pull /system/$DEST $BASE/$DEST
fi
else
cp $COPY_FROM/$FILE $BASE/$DEST
# if file does not exist try destination
if [ "$?" != "0" ]
then
cp $COPY_FROM/$DEST $BASE/$DEST
fi
fi
done

BASE=../../../vendor/$VENDOR/omap4-common/proprietary
rm -rf $BASE/*
for FILE in `egrep -v '(^#|^$)' ../omap4-common/common-proprietary-files.txt`; do
echo "Extracting /system/$FILE ..."
OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS
FILE=${PARSING_ARRAY[0]}
DEST=${PARSING_ARRAY[1]}
if [ -z $DEST ]
then
DEST=$FILE
fi
DIR=`dirname $FILE`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
if [ "$COPY_FROM" = "" ]; then
adb pull /system/$FILE $BASE/$DEST
# if file dot not exist try destination
if [ "$?" != "0" ]
then
adb pull /system/$DEST $BASE/$DEST
fi
else
cp $COPY_FROM/$FILE $BASE/$DEST
# if file does not exist try destination
if [ "$?" != "0" ]
then
cp $COPY_FROM/$DEST $BASE/$DEST
fi
fi
done

if [ "$DEVICE" != edison ] && [ "$DEVICE" != solana ] && [ "$DEVICE" != umts_spyder ]; then
for FILE in `egrep -v '(^#|^$)' ../omap4-common/common-lte-proprietary-files.txt`; do
echo "Extracting /system/$FILE ..."
OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS
FILE=${PARSING_ARRAY[0]}
DEST=${PARSING_ARRAY[1]}
if [ -z $DEST ]
then
DEST=$FILE
fi
DIR=`dirname $FILE`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
if [ "$COPY_FROM" = "" ]; then
adb pull /system/$FILE $BASE/$DEST
# if file dot not exist try destination
if [ "$?" != "0" ]
then
adb pull /system/$DEST $BASE/$DEST
fi
else
cp $COPY_FROM/$FILE $BASE/$DEST
# if file does not exist try destination
if [ "$?" != "0" ]
then
cp $COPY_FROM/$DEST $BASE/$DEST
fi
fi
done

for FILE in `egrep -v '(^#|^$)' ../omap4-common/common-vzw-proprietary-files.txt`; do
echo "Extracting /system/$FILE ..."
OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS
FILE=${PARSING_ARRAY[0]}
DEST=${PARSING_ARRAY[1]}
if [ -z $DEST ]
then
DEST=$FILE
fi
DIR=`dirname $FILE`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
if [ "$COPY_FROM" = "" ]; then
adb pull /system/$FILE $BASE/$DEST
# if file dot not exist try destination
if [ "$?" != "0" ]
then
adb pull /system/$DEST $BASE/$DEST
fi
else
cp $COPY_FROM/$FILE $BASE/$DEST
# if file does not exist try destination
if [ "$?" != "0" ]
then
cp $COPY_FROM/$DEST $BASE/$DEST
fi
fi
done
fi

IMGTEC=../../../vendor/$VENDOR/omap4-common/imgtec
if [ ! -d $IMGTEC ]; then
mkdir -p $IMGTEC
fi
echo "Don't forget to add the imgtec blobs from"
echo "http://omapzoom.org/?p=device/ti/proprietary-open.git;a=blob_plain;f=omap4/sgx.tgz;hb=7eef6aa6ef73ce97a9283a89d24a11c0606fd622"
echo "to vendor/motorola/omap4-common"
echo "These scripts will not work properly for solana as it requires some targa blob."
../omap4-common/setup-makefiles.sh
7 changes: 7 additions & 0 deletions proprietary-files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# put anything that is on all devices, but cannot be in omap4-common because it is device specific
bin/akmd8975
bin/ap_gain.bin
bin/ap_gain_mmul.bin
etc/firmware/ducati-m3.bin
etc/firmware/TIInit_10.6.15.bts
lib/hw/audio.primary.omap4.so
Loading

0 comments on commit bb9cdba

Please sign in to comment.