summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao Wei Liew <zhaoweiliew@gmail.com>2016-02-13 11:16:02 +0800
committerZhao Wei Liew <zhaoweiliew@gmail.com>2016-02-13 11:30:36 +0800
commit1ca6b959a164ada31daae109729a1924c9af21f3 (patch)
treedc8914c8c57fded6efc199de779d1a6e6b8efd54
parentd0390b5eac48b3d69a6bb595f60bf91592e89c38 (diff)
deb: Bring up CM
* Add proprietary file scripts * Add widevine blobs and remove unnecessary blobs * Configure hardware keys appropriately * Move over to Trebuchet from Launcher2 * Don't restrict vendor files Change-Id: Iae45847deb780fbf3b6a118bc4c541c45f5c675c
-rw-r--r--aosp_deb.mk1
-rw-r--r--cm.dependencies6
-rw-r--r--cm.mk31
-rw-r--r--device.mk1
-rw-r--r--extract-files.sh40
-rw-r--r--overlay/frameworks/base/core/res/res/values/config.xml28
-rw-r--r--overlay/packages/apps/Trebuchet/res/values/config.xml (renamed from overlay/packages/apps/Launcher2/res/values/config.xml)0
-rw-r--r--proprietary-blobs.txt16
-rw-r--r--releasetools.py32
-rw-r--r--setup-makefiles.sh75
10 files changed, 214 insertions, 16 deletions
diff --git a/aosp_deb.mk b/aosp_deb.mk
index 6845af7..751ec12 100644
--- a/aosp_deb.mk
+++ b/aosp_deb.mk
@@ -28,4 +28,3 @@ PRODUCT_DEVICE := deb
PRODUCT_BRAND := Android
PRODUCT_MODEL := AOSP on Deb
PRODUCT_MANUFACTURER := ASUS
-PRODUCT_RESTRICT_VENDOR_FILES := true
diff --git a/cm.dependencies b/cm.dependencies
new file mode 100644
index 0000000..ede7dda
--- /dev/null
+++ b/cm.dependencies
@@ -0,0 +1,6 @@
+[
+ {
+ "repository": "android_device_asus_flo",
+ "target_path": "device/asus/flo"
+ }
+]
diff --git a/cm.mk b/cm.mk
new file mode 100644
index 0000000..0f37305
--- /dev/null
+++ b/cm.mk
@@ -0,0 +1,31 @@
+# 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.
+
+# Inherit some common CM stuff.
+$(call inherit-product, vendor/cm/config/common_full_tablet_wifionly.mk)
+
+# Enhanced NFC
+$(call inherit-product, vendor/cm/config/nfc_enhanced.mk)
+
+## Device identifier. This must come after all inclusions
+PRODUCT_DEVICE := deb
+PRODUCT_NAME := cm_deb
+PRODUCT_BRAND := google
+PRODUCT_MODEL := Nexus 7
+PRODUCT_MANUFACTURER := asus
+
+PRODUCT_BUILD_PROP_OVERRIDES += \
+ PRODUCT_NAME=razorg \
+ BUILD_FINGERPRINT=google/razorg/deb:6.0.1/MMB29Q/2480792:user/release-keys \
+ PRIVATE_BUILD_DESC="razorg-user 6.0.1 MMB29Q 2480792 release-keys"
diff --git a/device.mk b/device.mk
index 61e8968..365ad4a 100644
--- a/device.mk
+++ b/device.mk
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+$(call inherit-product-if-exists, vendor/asus/deb/deb-vendor.mk)
# rild
PRODUCT_PACKAGES := \
diff --git a/extract-files.sh b/extract-files.sh
new file mode 100644
index 0000000..8de30b7
--- /dev/null
+++ b/extract-files.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+set -e
+
+VENDOR=asus
+DEVICE=deb
+
+if [ $# -eq 0 ]; then
+ SRC=adb
+else
+ if [ $# -eq 1 ]; then
+ SRC=$1
+ else
+ echo "$0: bad number of arguments"
+ echo ""
+ echo "usage: $0 [PATH_TO_EXPANDED_ROM]"
+ echo ""
+ echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from"
+ echo "the device using adb pull."
+ exit 1
+ fi
+fi
+
+BASE=../../../vendor/$VENDOR/$DEVICE/proprietary
+rm -rf $BASE/*
+
+for FILE in `cat proprietary-blobs.txt | grep -v ^# | grep -v ^$ | sed -e 's#^/system/##g'`; do
+ DIR=`dirname $FILE`
+ if [ ! -d $BASE/$DIR ]; then
+ mkdir -p $BASE/$DIR
+ fi
+ if [ "$SRC" = "adb" ]; then
+ adb pull /system/$FILE $BASE/$FILE
+ else
+ cp $SRC/system/$FILE $BASE/$FILE
+ fi
+
+done
+
+./setup-makefiles.sh
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 0281a1d..bb99cc5 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -284,4 +284,32 @@
<!-- Flag indicating if device supports EAP SIM, AKA, AKA' -->
<bool name="config_eap_sim_based_auth_supported">false</bool>
+
+ <!-- Hardware keys present on the device, stored as a bit field.
+ This integer should equal the sum of the corresponding value for each
+ of the following keys present:
+ 1 - Home
+ 2 - Back
+ 4 - Menu
+ 8 - Assistant (search)
+ 16 - App switch
+ 32 - Camera
+ 64 - Volume rocker
+ For example, a device with Home, Back and Menu keys would set this
+ config to 7. -->
+ <integer name="config_deviceHardwareKeys">64</integer>
+
+ <!-- Hardware keys present on the device with the ability to wake, stored as a bit field.
+ This integer should equal the sum of the corresponding value for each
+ of the following keys present:
+ 1 - Home
+ 2 - Back
+ 4 - Menu
+ 8 - Assistant (search)
+ 16 - App switch
+ 32 - Camera
+ 64 - Volume rocker
+ For example, a device with Home, Back and Menu keys would set this
+ config to 7. -->
+ <integer name="config_deviceHardwareWakeKeys">64</integer>
</resources>
diff --git a/overlay/packages/apps/Launcher2/res/values/config.xml b/overlay/packages/apps/Trebuchet/res/values/config.xml
index 3b82809..3b82809 100644
--- a/overlay/packages/apps/Launcher2/res/values/config.xml
+++ b/overlay/packages/apps/Trebuchet/res/values/config.xml
diff --git a/proprietary-blobs.txt b/proprietary-blobs.txt
index 6e2a3a2..125bd4b 100644
--- a/proprietary-blobs.txt
+++ b/proprietary-blobs.txt
@@ -41,12 +41,7 @@
/system/bin/thermald
/system/bin/usbhub
/system/bin/usbhub_init
-/system/etc/apns-conf.xml
-/system/etc/firmware/tzapps.b00
-/system/etc/firmware/tzapps.b01
-/system/etc/firmware/tzapps.b02
-/system/etc/firmware/tzapps.b03
-/system/etc/firmware/tzapps.mdt
+/system/etc/DxHDCP.cfg
/system/etc/firmware/vidc.b00
/system/etc/firmware/vidc.b01
/system/etc/firmware/vidc.b02
@@ -54,8 +49,6 @@
/system/etc/firmware/vidc.mdt
/system/etc/firmware/vidcfw.elf
/system/etc/firmware/vidc_1080p.fw
-/system/etc/firmware/wcd9310/wcd9310_anc.bin
-/system/etc/firmware/wcd9310/wcd9310_mbhc.bin
/system/etc/gps.conf
/system/vendor/lib/egl/eglsubAndroid.so
/system/vendor/lib/egl/libEGL_adreno.so
@@ -97,6 +90,7 @@
/system/lib/libI420colorconvert.so
/system/lib/libidl.so
/system/vendor/lib/libllvm-qcom.so
+/system/vendor/lib/libbccQTI.so
/system/lib/libloc_core.so
/system/lib/libloc_eng.so
/system/lib/libmm-abl.so
@@ -129,6 +123,7 @@
/system/lib/libsensor_reg.so
/system/lib/libsensor_user_cal.so
/system/lib/libstagefright_hdcp.so
+/system/vendor/lib/libWVphoneAPI.so
/system/lib/libxml.so
/system/vendor/firmware/a300_pfp.fw
/system/vendor/firmware/a300_pm4.fw
@@ -182,6 +177,7 @@
/system/vendor/firmware/wcnss.b04
/system/vendor/firmware/wcnss.b05
/system/vendor/firmware/wcnss.mdt
+/system/vendor/lib/drm/libdrmwvmplugin.so
/system/vendor/lib/libdrmdecrypt.so
/system/vendor/lib/libgemini.so
/system/vendor/lib/libgeofence.so
@@ -208,3 +204,7 @@
/system/vendor/lib/libmmstillomx.so
/system/vendor/lib/liboemcamera.so
/system/vendor/lib/libqomx_jpegenc.so
+/system/vendor/lib/libwvdrm_L1.so
+/system/vendor/lib/libwvm.so
+/system/vendor/lib/libWVStreamControlAPI_L1.so
+/system/vendor/lib/mediadrm/libwvdrmengine.so
diff --git a/releasetools.py b/releasetools.py
index 1714eaa..6f485c1 100644
--- a/releasetools.py
+++ b/releasetools.py
@@ -22,6 +22,12 @@ def FullOTA_InstallEnd(info):
else:
print "no radio.img in target_files; skipping install"
+ DDR_img = FindDDR(info.input_zip)
+ if DDR_img:
+ WriteDDR(info, DDR_img)
+ else:
+ print "no DDR.bin in target_files; skipping install"
+
def IncrementalOTA_VerifyEnd(info):
target_radio_img = FindRadio(info.target_zip)
@@ -36,13 +42,6 @@ def IncrementalOTA_VerifyEnd(info):
len(target_radio_img), common.sha1(target_radio_img).hexdigest()))
-def IncrementalOTA_InstallBegin(info):
- # Reduce the space taken by the journal.
- info.script.Unmount("/system")
- info.script.TunePartition("/system", "-O", "^has_journal")
- info.script.Mount("/system")
-
-
def IncrementalOTA_InstallEnd(info):
try:
target_bootloader_img = info.target_zip.read("RADIO/bootloader.img")
@@ -58,6 +57,13 @@ def IncrementalOTA_InstallEnd(info):
except KeyError:
print "no bootloader.img in target target_files; skipping install"
+ df = FindDDR(info.target_zip)
+ if not df:
+ print "no DDR.bin in target target_files; skipping install"
+ else:
+ df = common.File("DDR.bin", df)
+ WriteDDR(info, df.data)
+
tf = FindRadio(info.target_zip)
if not tf:
# failed to read TARGET radio image: don't include any radio in update.
@@ -101,6 +107,18 @@ def WriteRadio(info, radio_img):
info.script.AppendExtra(
'package_extract_file("radio.img", "%s");' % (device,))
+def FindDDR(zipfile):
+ try:
+ return zipfile.read("RADIO/DDR.bin")
+ except KeyError:
+ return None
+
+
+def WriteDDR(info, DDR_img):
+ info.script.Print("Writing DDR...")
+ common.ZipWriteStr(info.output_zip, "DDR.bin", DDR_img)
+ info.script.AppendExtra(
+ 'package_extract_file("DDR.bin", "/dev/block/platform/msm_sdcc.1/by-name/DDR");' )
# /* msm8960 bootloader.img format */
#
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
new file mode 100644
index 0000000..66b649f
--- /dev/null
+++ b/setup-makefiles.sh
@@ -0,0 +1,75 @@
+#!/bin/sh
+
+VENDOR=asus
+DEVICE=deb
+OUTDIR=vendor/$VENDOR/$DEVICE
+MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk
+
+(cat << EOF) > $MAKEFILE
+# 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.
+
+# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
+
+PRODUCT_COPY_FILES += \\
+EOF
+
+LINEEND=" \\"
+COUNT=`cat proprietary-blobs.txt | grep -v ^# | grep -v ^$ | wc -l | awk {'print $1'}`
+for FILE in `cat proprietary-blobs.txt | grep -v ^# | grep -v ^$ | sed -e 's#^/system/##g'`; do
+ COUNT=`expr $COUNT - 1`
+ if [ $COUNT = "0" ]; then
+ LINEEND=""
+ fi
+ echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE
+done
+
+(cat << EOF) > ../../../$OUTDIR/$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
+#
+# 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/$VENDOR/$DEVICE/setup-makefiles.sh
+
+\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk)
+EOF
+
+(cat << EOF) > ../../../$OUTDIR/BoardConfigVendor.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.
+
+# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
+
+EOF