Initial commit

This commit is contained in:
ggow
2015-11-04 14:23:51 +00:00
commit 71e77c9bec
26 changed files with 848 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
#
# Copyright (C) 2012 The Android Open-Source 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.
#
# WARNING: Everything listed here will be built on ALL platforms,
# including x86, the emulator, and the SDK. Modules must be uniquely
# named (liblights.tuna), and must build everywhere, or limit themselves
# to only building on ARM if they include assembly. Individual makefiles
# are responsible for having their own logic, for fine-grained control.
LOCAL_PATH := $(call my-dir)
ifeq ($(TARGET_DEVICE),ford)
ifneq ($(TARGET_SIMULATOR),true)
include $(call first-makefiles-under,$(LOCAL_PATH))
endif
endif
+2
View File
@@ -0,0 +1,2 @@
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/full_ford.mk
+70
View File
@@ -0,0 +1,70 @@
BOARD_VENDOR := amazon
# headers
TARGET_SPECIFIC_HEADER_PATH := device/amazon/ford/include
# inherit from the proprietary version
-include vendor/amazon/ford/BoardConfigVendor.mk
TARGET_OTA_ASSERT_DEVICE := ford
# Platform
TARGET_BOARD_PLATFORM := mt8127
TARGET_BOARD_PLATFORM_GPU := mali-450
TARGET_BOOTLOADER_BOARD_NAME := ford
# Bootloader
TARGET_NO_BOOTLOADER := true
# Architecture
TARGET_ARCH := arm
TARGET_CPU_VARIANT := cortex-a7
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_ARCH_VARIANT_CPU := cortex-a15
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_CPU_SMP := true
# Kernel Config
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x04000000 --tags_offset 0x00000100
BOARD_KERNEL_CMDLINE :=
BOARD_KERNEL_BASE := 0x80000000
BOARD_KERNEL_PAGESIZE := 2048
TARGET_PREBUILT_KERNEL := device/amazon/ford/kernel
#TARGET_KERNEL_SOURCE := kernel/amazon/ford
#TARGET_KERNEL_CONFIG := ford_defconfig
# Flags
TARGET_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp
TARGET_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp
COMMON_GLOBAL_CFLAGS += -DREFRESH_RATE=60
BOARD_HAS_MTK := true
# Filesystem
BOARD_BOOTIMAGE_PARTITION_SIZE := 16777216
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 16777216
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1258291200
BOARD_USERDATAIMAGE_PARTITION_SIZE := 6227082752
BOARD_FLASH_BLOCK_SIZE := 131072
TARGET_USERIMAGES_USE_EXT4 := true
# Vold
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/mt_usb/musb-hdrc.0.auto/gadget/lun%d/file
# Cyanogen recovery
RECOVERY_VARIANT := cm
TARGET_RECOVERY_FSTAB := device/amazon/ford/fstab.ford
#BOARD_CUSTOM_RECOVERY_KEYMAPPING := ../../device/samsung/smdk4412-common/recovery/recovery_keys.c
#BOARD_CUSTOM_GRAPHICS := ../../../device/samsung/smdk4412-common/recovery/graphics.c
BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_23x41.h\"
BOARD_USES_MMCUTILS := true
BOARD_HAS_LARGE_FILESYSTEM := true
BOARD_HAS_NO_MISC_PARTITION := true
BOARD_HAS_NO_SELECT_BUTTON := true
RECOVERY_SDCARD_ON_DATA := true
TW_INTERNAL_STORAGE_PATH := "/data/media"
TW_INTERNAL_STORAGE_MOUNT_POINT := "data"
TW_EXTERNAL_STORAGE_PATH := "/sdcard"
TW_EXTERNAL_STORAGE_MOUNT_POINT := "sdcard"
+28
View File
@@ -0,0 +1,28 @@
/*
* Copyright (C) 2014 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.
*/
#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H
#define BLUETOOTH_QCOM_SW TRUE
#define BTM_DEF_LOCAL_NAME "Amazon Fire"
// skips conn update at conn completion
#define BTA_BLE_SKIP_CONN_UPD TRUE
#endif
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

+14
View File
@@ -0,0 +1,14 @@
# 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)
# Inherit device configuration for Fire Phone
$(call inherit-product, device/amazon/ford/full_ford.mk)
TARGET_SCREEN_WIDTH := 600
TARGET_SCREEN_HEIGHT := 1024
PRODUCT_NAME := cm_ford
PRODUCT_RELEASE_NAME := ford
+63
View File
@@ -0,0 +1,63 @@
LOCAL_PATH := device/amazon/ford
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := $(LOCAL_PATH)/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif
DEVICE_FOLDER := device/amazon/ford
# Get non-open-source specific aspects
$(call inherit-product-if-exists, vendor/amazon/ford/ford-vendor.mk)
# Device overlay
DEVICE_PACKAGE_OVERLAYS += $(DEVICE_FOLDER)/overlay
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
# Device uses high-density artwork where available
PRODUCT_AAPT_CONFIG := normal mdpi
PRODUCT_AAPT_PREF_CONFIG := mdpi
# Permissions
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/tablet_core_hardware.xml:system/etc/permissions/tablet_core_hardware.xml \
frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \
frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \
frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \
frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \
frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \
frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \
frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.compass.xml \
frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \
frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \
frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:system/etc/permissions/android.hardware.sensor.stepcounter.xml \
frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:system/etc/permissions/android.hardware.sensor.stepdetector.xml \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \
frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \
frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml
$(call inherit-product, device/common/gps/gps_us_supl.mk)
$(call inherit-product-if-exists, vendor/amazon/ford/ford-vendor.mk)
DEVICE_PACKAGE_OVERLAYS += device/amazon/ford/overlay
$(call inherit-product, build/target/product/full.mk)
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel
PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
PRODUCT_NAME := full_ford
PRODUCT_DEVICE := ford
+2
View File
@@ -0,0 +1,2 @@
0 0 android
0 1 mali
+49
View File
@@ -0,0 +1,49 @@
#!/bin/bash
VENDOR=amazon
DEVICE=ford
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/*
for FILE in `egrep -v '(^#|^$)' ../$DEVICE/proprietary-files.txt`; do
echo "Extracting /system/$FILE ..."
OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS
FILE=`echo ${PARSING_ARRAY[0]} | sed -e "s/^-//g"`
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
./setup-makefiles.sh
+9
View File
@@ -0,0 +1,9 @@
/dev/block/platform/mtk-msdc.0/by-name/boot /boot emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/UBOOT /UBOOT emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/TEE1 /TEE1 emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/cache /cache ext4 defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/userdata /data ext4 defaults defaults,length=-16385
/dev/block/platform/mtk-msdc.0/by-name/MISC /misc emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/recovery /recovery emmc defaults defaults
/dev/block/mmcblk0boot0 /boot0 emmc defaults defaults
/dev/block/platform/mtk-msdc.0/by-name/system /system ext4 defaults defaults
+16
View File
@@ -0,0 +1,16 @@
# Inherit from those products. Most specific first.
$(call inherit-product, device/amazon/ford/device.mk)
# The gps config appropriate for this device
$(call inherit-product, device/common/gps/gps_eu_supl.mk)
PRODUCT_CHARACTERISTICS := phone,nosdcard
#$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
PRODUCT_NAME := full_ford
PRODUCT_DEVICE := ford
PRODUCT_BRAND := google
PRODUCT_MODEL := Fire
PRODUCT_MANUFACTURER := amzn
BIN
View File
Binary file not shown.
View File
+149
View File
@@ -0,0 +1,149 @@
import /init.recovery.${ro.hardware}.rc
on early-init
# Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
write /sys/fs/selinux/checkreqprot 0
# Set the security context for the init process.
# This should occur before anything else (e.g. ueventd) is started.
setcon u:r:init:s0
start ueventd
start healthd
on init
export PATH /sbin:/system/bin
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard
symlink /system/etc /etc
mkdir /sdcard
mkdir /system
mkdir /data
mkdir /cache
mkdir /sideload
mount tmpfs tmpfs /tmp
chown root shell /tmp
chmod 0775 /tmp
mkdir /mnt 0775 root system
mkdir /storage 0050 root sdcard_r
mount tmpfs tmpfs /storage mode=0050,uid=0,gid=1028
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell 0700 shell shell
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Create private mountpoint so we can MS_MOVE from staging
mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Fuse public mount points.
mkdir /mnt/fuse 0700 root system
mount tmpfs tmpfs /mnt/fuse mode=0775,gid=1000
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/vm/max_map_count 1000000
on fs
mkdir /dev/usb-ffs 0770 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct D001
write /sys/class/android_usb/android0/f_ffs/aliases adb
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
mount_all /etc/recovery.fstab
on boot
ifup lo
hostname localhost
domainname localdomain
class_start default
# Load properties from /system/ + /factory after fs mount.
on load_all_props_action
load_all_props
on firmware_mounts_complete
rm /dev/.booting
# Mount filesystems and start core system services.
on late-init
trigger early-fs
trigger fs
trigger post-fs
trigger post-fs-data
# Load properties from /system/ + /factory after fs mount. Place
# this in another action so that the load will be scheduled after the prior
# issued fs triggers have completed.
trigger load_all_props_action
# Remove a file to wake up anything waiting for firmware
trigger firmware_mounts_complete
trigger early-boot
trigger boot
on property:sys.powerctl=*
powerctl ${sys.powerctl}
service ueventd /sbin/ueventd
critical
seclabel u:r:ueventd:s0
service healthd /sbin/healthd -r
critical
seclabel u:r:healthd:s0
service recovery /sbin/recovery
seclabel u:r:recovery:s0
service setup_adbd /sbin/setup_adbd
oneshot
seclabel u:r:recovery:s0
disabled
service adbd /sbin/adbd --root_seclabel=u:r:su:s0 --device_banner=recovery
disabled
socket adbd stream 660 system system
seclabel u:r:adbd:s0
service vold /sbin/minivold
socket vold stream 0660 root mount
ioprio be 2
setenv BLKID_FILE /tmp/vold_blkid.tab
seclabel u:r:vold:s0
# setup_adbd will start adb once it has checked the keys
on property:ro.debuggable=1
start setup_adbd
on property:service.adb.root=1
write /sys/class/android_usb/android0/enable 0
restart adbd
write /sys/class/android_usb/android0/enable 1
on property:sys.storage.ums_enabled=1
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/functions adb,mass_storage
write /sys/class/android_usb/android0/enable 1
on property:sys.storage.ums_enabled=0
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/enable ${service.adb.root}
View File
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env python
#
# Copyright (C) 2008 The Android Open Source 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.
"""
A shim to generate an OTA for ford
"""
import sys
if sys.hexversion < 0x02040000:
print >> sys.stderr, "Python 2.4 or newer is required."
sys.exit(1)
import imp
import os
# grab the releasetools directory and add it to our import path
RELEASETOOLS = os.path.realpath(os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "build", "tools", "releasetools"))
sys.path.append(RELEASETOOLS)
# import the stuff we're going to overwrite
import common
imp.load_source("ota", os.path.join(RELEASETOOLS, "ota_from_target_files"))
import ota
ota.OPTIONS.extra_script = os.path.realpath(os.path.join(os.path.dirname(__file__), 'extra_script'))
if __name__ == '__main__':
try:
ota.main(sys.argv[1:])
except common.ExternalError, e:
print
print " ERROR: %s" % (e,)
print
sys.exit(1)
+366
View File
@@ -0,0 +1,366 @@
VENDOR=amazon
DEVICE=ford
OUTDIR=vendor/$VENDOR/$DEVICE
MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk
(cat << EOF) > $MAKEFILE
# Copyright (C) 2014 The Gummy ROM 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=`wc -l proprietary-files.txt | awk {'print $1'}`
DISM=`egrep -c '(^#|^$)' proprietary-files.txt`
COUNT=`expr $COUNT - $DISM`
for FILE in `egrep -v '(^#|^$)' ../$DEVICE/proprietary-files.txt`; do
COUNT=`expr $COUNT - 1`
if [ $COUNT = "0" ]; then
LINEEND=""
fi
# Split the file from the destination (format is "file[:destination]")
OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS
FILE=${PARSING_ARRAY[0]}
DEST=${PARSING_ARRAY[1]}
if [ -z "$DEST" ]; then
if [[ ! "$FILE" =~ ^-.* ]]; then
echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE
fi
else
if [[ ! "$FILE" =~ ^-.* ]]; then
echo " $OUTDIR/proprietary/$DEST:system/$DEST$LINEEND" >> $MAKEFILE
fi
fi
done
(cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk
# Copyright (C) 2014 The Gummy ROM 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
# Pick up overlay for features that depend on non-open-source files
DEVICE_PACKAGE_OVERLAYS += vendor/$VENDOR/$DEVICE/overlay
\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk)
EOF
(cat << EOF) > ../../../$OUTDIR/BoardConfigVendor.mk
# Copyright (C) 2014 The Gummy ROM 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
if [ -d ../../../${OUTDIR}/proprietary/app ]; then
(cat << EOF) > ../../../${OUTDIR}/proprietary/app/Android.mk
# Copyright (C) 2014 The Gummy ROM 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
LOCAL_PATH := \$(call my-dir)
EOF
echo "ifeq (\$(TARGET_DEVICE),$DEVICE)" >> ../../../${OUTDIR}/proprietary/app/Android.mk
echo "" >> ../../../${OUTDIR}/proprietary/app/Android.mk
echo "# Prebuilt APKs" >> ../../../$OUTDIR/$DEVICE-vendor.mk
echo "PRODUCT_PACKAGES += \\" >> ../../../$OUTDIR/$DEVICE-vendor.mk
LINEEND=" \\"
COUNT=`ls -1 ../../../${OUTDIR}/proprietary/app/*.apk | wc -l`
for APK in `ls ../../../${OUTDIR}/proprietary/app/*apk`; do
COUNT=`expr $COUNT - 1`
if [ $COUNT = "0" ]; then
LINEEND=""
fi
apkname=`basename $APK`
apkmodulename=`echo $apkname|sed -e 's/\.apk$//gi'`
(cat << EOF) >> ../../../${OUTDIR}/proprietary/app/Android.mk
include \$(CLEAR_VARS)
LOCAL_MODULE := $apkmodulename
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $apkname
LOCAL_CERTIFICATE := platform
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX)
include \$(BUILD_PREBUILT)
EOF
echo " $apkmodulename$LINEEND" >> ../../../$OUTDIR/$DEVICE-vendor.mk
done
echo "" >> ../../../$OUTDIR/$DEVICE-vendor.mk
echo "endif" >> ../../../${OUTDIR}/proprietary/app/Android.mk
fi
if [ -d ../../../${OUTDIR}/proprietary/framework ]; then
(cat << EOF) > ../../../${OUTDIR}/proprietary/framework/Android.mk
# Copyright (C) 2014 The Gummy ROM 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
LOCAL_PATH := \$(call my-dir)
EOF
echo "ifeq (\$(TARGET_DEVICE),$DEVICE)" >> ../../../${OUTDIR}/proprietary/framework/Android.mk
echo "" >> ../../../${OUTDIR}/proprietary/framework/Android.mk
echo "# Prebuilt jars" >> ../../../$OUTDIR/$DEVICE-vendor.mk
echo "PRODUCT_PACKAGES += \\" >> ../../../$OUTDIR/$DEVICE-vendor.mk
LINEEND=" \\"
COUNT=`ls -1 ../../../${OUTDIR}/proprietary/framework/*.jar | wc -l`
for JAR in `ls ../../../${OUTDIR}/proprietary/framework/*jar`; do
COUNT=`expr $COUNT - 1`
if [ $COUNT = "0" ]; then
LINEEND=""
fi
jarname=`basename $JAR`
jarmodulename=`echo $jarname|sed -e 's/\.jar$//gi'`
(cat << EOF) >> ../../../${OUTDIR}/proprietary/framework/Android.mk
include \$(CLEAR_VARS)
LOCAL_MODULE := $jarmodulename
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $jarname
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_MODULE_SUFFIX := \$(COMMON_JAVA_PACKAGE_SUFFIX)
include \$(BUILD_PREBUILT)
EOF
echo " $jarmodulename$LINEEND" >> ../../../$OUTDIR/$DEVICE-vendor.mk
done
echo "" >> ../../../$OUTDIR/$DEVICE-vendor.mk
echo "endif" >> ../../../${OUTDIR}/proprietary/framework/Android.mk
fi
if [ -d ../../../${OUTDIR}/proprietary/priv-app ]; then
(cat << EOF) > ../../../${OUTDIR}/proprietary/priv-app/Android.mk
# Copyright (C) 2014 The Gummy ROM 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
LOCAL_PATH := \$(call my-dir)
EOF
echo "ifeq (\$(TARGET_DEVICE),$DEVICE)" >> ../../../${OUTDIR}/proprietary/priv-app/Android.mk
echo "" >> ../../../${OUTDIR}/proprietary/priv-app/Android.mk
echo "# Prebuilt privileged APKs" >> ../../../$OUTDIR/$DEVICE-vendor.mk
echo "PRODUCT_PACKAGES += \\" >> ../../../$OUTDIR/$DEVICE-vendor.mk
LINEEND=" \\"
COUNT=`ls -1 ../../../${OUTDIR}/proprietary/priv-app/*.apk | wc -l`
for APK in `ls ../../../${OUTDIR}/proprietary/priv-app/*apk`; do
COUNT=`expr $COUNT - 1`
if [ $COUNT = "0" ]; then
LINEEND=""
fi
privapkname=`basename $APK`
privmodulename=`echo $privapkname|sed -e 's/\.apk$//gi'`
(cat << EOF) >> ../../../${OUTDIR}/proprietary/priv-app/Android.mk
include \$(CLEAR_VARS)
LOCAL_MODULE := $privmodulename
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $privapkname
LOCAL_CERTIFICATE := platform
LOCAL_MODULE_CLASS := APPS
LOCAL_PRIVILEGED_MODULE := true
LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX)
include \$(BUILD_PREBUILT)
EOF
echo " $privmodulename$LINEEND" >> ../../../$OUTDIR/$DEVICE-vendor.mk
done
echo "" >> ../../../$OUTDIR/$DEVICE-vendor.mk
echo "endif" >> ../../../${OUTDIR}/proprietary/priv-app/Android.mk
fi
LIBS=`cat proprietary-files.txt | grep '\-lib' | cut -d'-' -f2 | head -1`
if [ -f ../../../${OUTDIR}/proprietary/${LIBS} ]; then
(cat << EOF) > ../../../$OUTDIR/proprietary/lib/Android.mk
# Copyright (C) 2014 The Gummy ROM 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
LOCAL_PATH := \$(call my-dir)
EOF
echo "ifeq (\$(TARGET_DEVICE),$DEVICE)" >> ../../../${OUTDIR}/proprietary/lib/Android.mk
echo "" >> ../../../${OUTDIR}/proprietary/lib/Android.mk
echo "# Prebuilt libs needed for compilation" >> ../../../$OUTDIR/$DEVICE-vendor.mk
echo "PRODUCT_PACKAGES += \\" >> ../../../$OUTDIR/$DEVICE-vendor.mk
LINEEND=" \\"
COUNT=`cat proprietary-files.txt | grep '\-lib' | wc -l`
for LIB in `cat proprietary-files.txt | grep '\-lib' | cut -d'/' -f2`;do
COUNT=`expr $COUNT - 1`
if [ $COUNT = "0" ]; then
LINEEND=""
fi
libname=`basename $LIB`
libmodulename=`echo $libname|sed -e 's/\.so$//gi'`
(cat << EOF) >> ../../../${OUTDIR}/proprietary/lib/Android.mk
include \$(CLEAR_VARS)
LOCAL_MODULE := $libmodulename
LOCAL_MODULE_OWNER := oppo
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $libname
LOCAL_MODULE_PATH := \$(TARGET_OUT_SHARED_LIBRARIES)
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
include \$(BUILD_PREBUILT)
EOF
echo " $libmodulename$LINEEND" >> ../../../$OUTDIR/$DEVICE-vendor.mk
done
echo "" >> ../../../$OUTDIR/$DEVICE-vendor.mk
echo "endif" >> ../../../${OUTDIR}/proprietary/lib/Android.mk
fi
VENDORLIBS=`cat proprietary-files.txt | grep '\-vendor\/lib' | cut -d'-' -f2 | head -1`
if [ -f ../../../${OUTDIR}/proprietary/${VENDORLIBS} ]; then
(cat << EOF) > ../../../$OUTDIR/proprietary/vendor/lib/Android.mk
# Copyright (C) 2014 The Gummy ROM 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
LOCAL_PATH := \$(call my-dir)
EOF
echo "ifeq (\$(TARGET_DEVICE),$DEVICE)" >> ../../../${OUTDIR}/proprietary/vendor/lib/Android.mk
echo "" >> ../../../${OUTDIR}/proprietary/vendor/lib/Android.mk
echo "# Prebuilt vendor/libs needed for compilation" >> ../../../$OUTDIR/$DEVICE-vendor.mk
echo "PRODUCT_PACKAGES += \\" >> ../../../$OUTDIR/$DEVICE-vendor.mk
LINEEND=" \\"
COUNT=`cat proprietary-files.txt | grep '\-vendor\/lib' | wc -l`
for VENDORLIB in `cat proprietary-files.txt | grep '\-vendor\/lib' | cut -d'/' -f3`;do
COUNT=`expr $COUNT - 1`
if [ $COUNT = "0" ]; then
LINEEND=""
fi
vendorlibname=`basename $VENDORLIB`
vendorlibmodulename=`echo $vendorlibname|sed -e 's/\.so$//gi'`
(cat << EOF) >> ../../../${OUTDIR}/proprietary/vendor/lib/Android.mk
include \$(CLEAR_VARS)
LOCAL_MODULE := $vendorlibmodulename
LOCAL_MODULE_OWNER := oppo
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $vendorlibname
LOCAL_MODULE_PATH := \$(TARGET_OUT_VENDOR_SHARED_LIBRARIES)
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
include \$(BUILD_PREBUILT)
EOF
echo " $vendorlibmodulename$LINEEND" >> ../../../$OUTDIR/$DEVICE-vendor.mk
done
echo "endif" >> ../../../${OUTDIR}/proprietary/vendor/lib/Android.mk
fi
View File
+1
View File
@@ -0,0 +1 @@
add_lunch_combo cm_ford-userdebug