summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-08-23 20:53:24 +0200
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-08-23 20:53:24 +0200
commit24b3da1777b8e4ce8acc85f835889ed1c9d5f4ff (patch)
tree6c268886c2c19321d6b8624c39ec2a6930f8df83
parent2eaab69ec70878441e4b3cb3791d469b1a16ee60 (diff)
Quick first shot based on firefly
-rwxr-xr-xAndroidProducts.mk18
-rwxr-xr-xBoardConfig.mk79
-rw-r--r--Vendor_103c_Product_184f.kl442
-rwxr-xr-xbluetooth/bdroid_buildcfg.h24
-rwxr-xr-xbuild-rk3399-box.sh168
-rwxr-xr-xbuild-rk3399-laptop.sh179
-rwxr-xr-xbuild-rk3399-mid.sh179
-rwxr-xr-xbuildspec-rk3399-32.mk114
-rwxr-xr-xbuildspec-rk3399-box.mk114
-rwxr-xr-xbuildspec.mk114
-rw-r--r--debug/init.coredump.rc15
-rw-r--r--debug/init.crashlogd.rc19
-rw-r--r--debug/init.debug-charging.rc18
-rw-r--r--debug/init.debug.rc7
-rw-r--r--debug/init.kernel.rc7
-rw-r--r--debug/init.log-watch.rc3
-rw-r--r--debug/init.logs.rc55
-rw-r--r--debug/init.stt_trace.rc13
-rw-r--r--debug/log-watch-kmsg.cfg54
-rwxr-xr-xdevice.mk243
-rwxr-xr-xdptx.binbin0 -> 98320 bytes
-rwxr-xr-xfstab.rk30board.bootmode.emmc27
-rwxr-xr-xfstab.rk30board.bootmode.forceencrypt.emmc25
-rwxr-xr-xfstab.rk30board.bootmode.forceencrypt.nvme25
-rwxr-xr-xfstab.rk30board.bootmode.forceencrypt.unknown22
-rwxr-xr-xfstab.rk30board.bootmode.nvme25
-rwxr-xr-xfstab.rk30board.bootmode.unknown23
-rw-r--r--gps/gps.conf83
-rwxr-xr-xgps/lib32/gps.default.sobin0 -> 1591992 bytes
-rwxr-xr-xgps/lib64/gps.default.sobin0 -> 2406000 bytes
-rw-r--r--gps/u-blox.conf123
-rwxr-xr-xinit.box.rc30
-rwxr-xr-xinit.laptop.rc27
-rwxr-xr-xinit.rk30board.usb.rc79
-rwxr-xr-xinit.rk3399.rc15
-rwxr-xr-xinit.tablet.rc27
-rwxr-xr-xinit.vr.rc27
-rwxr-xr-xiobin0 -> 76188 bytes
-rw-r--r--javaenv.sh6
-rw-r--r--kernel/Image0
-rwxr-xr-xnand/drmboot.kobin0 -> 711 bytes
-rwxr-xr-xnand/rk30xxnand_ko.ko.3.10.0bin0 -> 219119 bytes
-rwxr-xr-xota/loader/misc_loadercmd.imgbin0 -> 49152 bytes
-rwxr-xr-xota/loader/readme2
-rwxr-xr-xota/parameter/readme14
-rwxr-xr-xpackage_performance.xml5
-rw-r--r--preinstall/Android.mk2
-rw-r--r--preinstall/README.txt1
-rw-r--r--preinstall/preinstall.mk0
-rw-r--r--preinstall_del/Android.mk2
-rw-r--r--preinstall_del/README.txt1
-rw-r--r--preinstall_del/preinstall.mk0
-rw-r--r--preinstall_del_forever/Android.mk2
-rw-r--r--preinstall_del_forever/README.txt1
-rw-r--r--preinstall_del_forever/preinstall.mk0
-rwxr-xr-xproduct.mk23
-rwxr-xr-xproduct_32_only.mk27
-rwxr-xr-xproduct_64_only.mk30
-rw-r--r--public.libraries.txt1
-rwxr-xr-xpuma.mk46
-rwxr-xr-xrecovery.emmc.fstab21
-rwxr-xr-xrk3399.mk47
-rwxr-xr-xrk3399_firefly_edp_box/BoardConfig.mk42
-rw-r--r--rk3399_firefly_edp_box/overlay/frameworks/base/core/res/res/values/config.xml31
-rw-r--r--rk3399_firefly_edp_box/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml24
-rwxr-xr-xrk3399_firefly_edp_box/parameter.txt15
-rwxr-xr-xrk3399_firefly_edp_box/parameter_system_3.0G.txt15
-rwxr-xr-xrk3399_firefly_edp_box/system.prop53
-rwxr-xr-xsubin0 -> 339848 bytes
-rwxr-xr-xsystem.prop42
-rwxr-xr-xvendorsetup.sh1
-rw-r--r--wake_lock_filter.xml9
-rwxr-xr-xwifi_bt.mk43
73 files changed, 2929 insertions, 0 deletions
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
new file mode 100755
index 0000000..74f8ea4
--- /dev/null
+++ b/AndroidProducts.mk
@@ -0,0 +1,18 @@
+#
+# Copyright 2014 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.
+#
+
+PRODUCT_MAKEFILES := \
+ $(LOCAL_DIR)/puma.mk
diff --git a/BoardConfig.mk b/BoardConfig.mk
new file mode 100755
index 0000000..8c1f79b
--- /dev/null
+++ b/BoardConfig.mk
@@ -0,0 +1,79 @@
+#
+# Copyright 2014 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.
+#
+
+# Use the non-open-source parts, if they're present
+-include vendor/rockchip/rk3399/BoardConfigVendor.mk
+
+TARGET_NO_KERNEL := true
+TARGET_PREBUILT_KERNEL := device/theobromasystems/puma/kernel/Image
+#TARGET_PREBUILT_KERNEL := kernel/arch/arm64/boot/Image
+
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-a
+TARGET_CPU_ABI := arm64-v8a
+TARGET_CPU_ABI2 :=
+TARGET_CPU_VARIANT := cortex-a53
+TARGET_CPU_SMP := true
+
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv7-a-neon
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+TARGET_2ND_CPU_VARIANT := cortex-a53.a57
+
+
+# Disable emulator for "make dist" until there is a 64-bit qemu kernel
+BUILD_EMULATOR := false
+
+TARGET_BOARD_PLATFORM := rk3399
+TARGET_BOARD_PLATFORM_GPU := mali-t860
+BOARD_USE_DRM := true
+
+# RenderScript
+# OVERRIDE_RS_DRIVER := libnvRSDriver.so
+BOARD_OVERRIDE_RS_CPU_VARIANT_32 := cortex-a53
+BOARD_OVERRIDE_RS_CPU_VARIANT_64 := cortex-a53
+# DISABLE_RS_64_BIT_DRIVER := true
+
+TARGET_USES_64_BIT_BCMDHD := true
+TARGET_USES_64_BIT_BINDER := true
+# BOARD_USE_AFBC_LAYER := true
+
+# HACK: Build apps as 64b for volantis_64_only
+ifneq (,$(filter ro.zygote=zygote64, $(PRODUCT_DEFAULT_PROPERTY_OVERRIDES)))
+TARGET_PREFER_32_BIT_APPS :=
+TARGET_SUPPORTS_64_BIT_APPS := true
+endif
+
+# Sensors
+BOARD_SENSOR_ST := false
+BOARD_SENSOR_MPU := false
+BOARD_SENSOR_MPU_VR := true
+#BOARD_USES_GENERIC_INVENSENSE := false
+
+# Copy rk3399 own init.rc file
+# TARGET_PROVIDES_INIT_RC := true
+
+
+//MAX-SIZE=2G, for generate out/.../system.img
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736
+
+# product has GPS or not
+BOARD_HAS_GPS := true
+
+ENABLE_CPUSETS := true
+
+-include device/rockchip/common/BoardConfig.mk
diff --git a/Vendor_103c_Product_184f.kl b/Vendor_103c_Product_184f.kl
new file mode 100644
index 0000000..9073975
--- /dev/null
+++ b/Vendor_103c_Product_184f.kl
@@ -0,0 +1,442 @@
+# Copyright (C) 2010 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.
+
+#
+# Generic key layout file for full alphabetic US English PC style external keyboards.
+#
+# This file is intentionally very generic and is intended to support a broad rang of keyboards.
+# Do not edit the generic key layout to support a specific keyboard; instead, create
+# a new key layout file with the required keyboard configuration.
+#
+
+key 1 ESCAPE
+key 2 1
+key 3 2
+key 4 3
+key 5 4
+key 6 5
+key 7 6
+key 8 7
+key 9 8
+key 10 9
+key 11 0
+key 12 MINUS
+key 13 EQUALS
+key 14 DEL
+key 15 TAB
+key 16 Q
+key 17 W
+key 18 E
+key 19 R
+key 20 T
+key 21 Y
+key 22 U
+key 23 I
+key 24 O
+key 25 P
+key 26 LEFT_BRACKET
+key 27 RIGHT_BRACKET
+key 96 ENTER
+key 29 CTRL_LEFT
+key 30 A
+key 31 S
+key 32 D
+key 33 F
+key 34 G
+key 35 H
+key 36 J
+key 37 K
+key 38 L
+key 39 SEMICOLON
+key 40 APOSTROPHE
+key 41 GRAVE
+key 42 SHIFT_LEFT
+key 43 BACKSLASH
+key 44 Z
+key 45 X
+key 46 C
+key 47 V
+key 48 B
+key 49 N
+key 50 M
+key 51 COMMA
+key 52 PERIOD
+key 53 SLASH
+key 54 SHIFT_RIGHT
+key 55 NUMPAD_MULTIPLY
+key 56 ALT_LEFT
+key 57 SPACE
+key 58 CAPS_LOCK
+key 59 F1
+key 60 F2
+key 61 F3
+key 62 F4
+key 63 F5
+key 64 F6
+key 65 F7
+key 66 F8
+key 67 F9
+key 68 F10
+key 69 NUM_LOCK
+key 70 SCROLL_LOCK
+key 71 NUMPAD_7
+key 72 NUMPAD_8
+key 73 NUMPAD_9
+key 74 NUMPAD_SUBTRACT
+key 75 NUMPAD_4
+key 76 NUMPAD_5
+key 77 NUMPAD_6
+key 78 NUMPAD_ADD
+key 79 NUMPAD_1
+key 80 NUMPAD_2
+key 81 NUMPAD_3
+key 82 NUMPAD_0
+key 83 NUMPAD_DOT
+# key 84 (undefined)
+key 85 ZENKAKU_HANKAKU
+key 86 BACKSLASH
+key 87 F11
+key 88 F12
+key 89 RO
+# key 90 "KEY_KATAKANA"
+# key 91 "KEY_HIRAGANA"
+key 92 HENKAN
+key 93 KATAKANA_HIRAGANA
+key 94 MUHENKAN
+key 95 NUMPAD_COMMA
+key 97 CTRL_RIGHT
+key 98 NUMPAD_DIVIDE
+key 99 SYSRQ
+key 100 ALT_RIGHT
+# key 101 "KEY_LINEFEED"
+key 102 MOVE_HOME
+key 103 DPAD_UP
+key 104 PAGE_UP
+key 105 DPAD_LEFT
+key 106 DPAD_RIGHT
+key 107 MOVE_END
+key 108 DPAD_DOWN
+key 109 PAGE_DOWN
+key 110 INSERT
+key 111 FORWARD_DEL
+# key 112 "KEY_MACRO"
+key 113 VOLUME_MUTE
+key 114 VOLUME_DOWN
+key 115 VOLUME_UP
+key 116 POWER
+key 117 NUMPAD_EQUALS
+# key 118 "KEY_KPPLUSMINUS"
+key 119 BREAK
+# key 120 (undefined)
+key 121 NUMPAD_COMMA
+key 122 KANA
+key 123 EISU
+key 124 YEN
+key 125 META_LEFT
+key 126 META_RIGHT
+key 127 MENU
+key 128 MEDIA_STOP
+# key 129 "KEY_AGAIN"
+# key 130 "KEY_PROPS"
+# key 131 "KEY_UNDO"
+# key 132 "KEY_FRONT"
+key 133 COPY
+# key 134 "KEY_OPEN"
+key 135 PASTE
+# key 136 "KEY_FIND"
+key 137 CUT
+# key 138 "KEY_HELP"
+key 139 MENU
+key 140 CALCULATOR
+# key 141 "KEY_SETUP"
+key 142 SLEEP
+key 143 WAKEUP
+# key 144 "KEY_FILE"
+# key 145 "KEY_SENDFILE"
+# key 146 "KEY_DELETEFILE"
+# key 147 "KEY_XFER"
+# key 148 "KEY_PROG1"
+# key 149 "KEY_PROG2"
+key 150 EXPLORER
+# key 151 "KEY_MSDOS"
+key 152 POWER
+# key 153 "KEY_DIRECTION"
+# key 154 "KEY_CYCLEWINDOWS"
+key 155 ENVELOPE
+key 156 BOOKMARK
+# key 157 "KEY_COMPUTER"
+key 158 BACK
+key 159 FORWARD
+key 160 MEDIA_CLOSE
+key 161 MEDIA_EJECT
+key 162 MEDIA_EJECT
+key 163 MEDIA_NEXT
+key 164 MEDIA_PLAY_PAUSE
+key 165 MEDIA_PREVIOUS
+key 166 MEDIA_STOP
+key 167 MEDIA_RECORD
+key 168 MEDIA_REWIND
+key 169 CALL
+# key 170 "KEY_ISO"
+key 171 MUSIC
+key 172 HOME
+# key 173 "KEY_REFRESH"
+# key 174 "KEY_EXIT"
+# key 175 "KEY_MOVE"
+# key 176 "KEY_EDIT"
+key 177 PAGE_UP
+key 178 PAGE_DOWN
+key 179 NUMPAD_LEFT_PAREN
+key 180 NUMPAD_RIGHT_PAREN
+# key 181 "KEY_NEW"
+# key 182 "KEY_REDO"
+# key 183 F13
+# key 184 F14
+# key 185 F15
+# key 186 F16
+# key 187 F17
+# key 188 F18
+# key 189 F19
+# key 190 F20
+# key 191 F21
+# key 192 F22
+# key 193 F23
+# key 194 F24
+# key 195 (undefined)
+# key 196 (undefined)
+# key 197 (undefined)
+# key 198 (undefined)
+# key 199 (undefined)
+key 200 MEDIA_PLAY
+key 201 MEDIA_PAUSE
+# key 202 "KEY_PROG3"
+# key 203 "KEY_PROG4"
+# key 204 (undefined)
+# key 205 "KEY_SUSPEND"
+# key 206 "KEY_CLOSE"
+key 207 MEDIA_PLAY
+key 208 MEDIA_FAST_FORWARD
+# key 209 "KEY_BASSBOOST"
+# key 210 "KEY_PRINT"
+# key 211 "KEY_HP"
+key 212 CAMERA
+key 213 MUSIC
+# key 214 "KEY_QUESTION"
+key 215 ENVELOPE
+# key 216 "KEY_CHAT"
+key 217 SEARCH
+# key 218 "KEY_CONNECT"
+# key 219 "KEY_FINANCE"
+# key 220 "KEY_SPORT"
+# key 221 "KEY_SHOP"
+# key 222 "KEY_ALTERASE"
+# key 223 "KEY_CANCEL"
+key 224 BRIGHTNESS_DOWN
+key 225 BRIGHTNESS_UP
+key 226 HEADSETHOOK
+
+key 256 BUTTON_1
+key 257 BUTTON_2
+key 258 BUTTON_3
+key 259 BUTTON_4
+key 260 BUTTON_5
+key 261 BUTTON_6
+key 262 BUTTON_7
+key 263 BUTTON_8
+key 264 BUTTON_9
+key 265 BUTTON_10
+key 266 BUTTON_11
+key 267 BUTTON_12
+key 268 BUTTON_13
+key 269 BUTTON_14
+key 270 BUTTON_15
+key 271 BUTTON_16
+
+key 288 BUTTON_1
+key 289 BUTTON_2
+key 290 BUTTON_3
+key 291 BUTTON_4
+key 292 BUTTON_5
+key 293 BUTTON_6
+key 294 BUTTON_7
+key 295 BUTTON_8
+key 296 BUTTON_9
+key 297 BUTTON_10
+key 298 BUTTON_11
+key 299 BUTTON_12
+key 300 BUTTON_13
+key 301 BUTTON_14
+key 302 BUTTON_15
+key 303 BUTTON_16
+
+
+key 304 BUTTON_A
+key 305 BUTTON_B
+key 306 BUTTON_C
+key 307 BUTTON_X
+key 308 BUTTON_Y
+key 309 BUTTON_Z
+key 310 BUTTON_L1
+key 311 BUTTON_R1
+key 312 BUTTON_L2
+key 313 BUTTON_R2
+key 314 BUTTON_SELECT
+key 315 BUTTON_START
+key 316 BUTTON_MODE
+key 317 BUTTON_THUMBL
+key 318 BUTTON_THUMBR
+
+
+# key 352 "KEY_OK"
+key 353 DPAD_CENTER
+# key 354 "KEY_GOTO"
+# key 355 "KEY_CLEAR"
+# key 356 "KEY_POWER2"
+# key 357 "KEY_OPTION"
+# key 358 "KEY_INFO"
+# key 359 "KEY_TIME"
+# key 360 "KEY_VENDOR"
+# key 361 "KEY_ARCHIVE"
+key 362 GUIDE
+# key 363 "KEY_CHANNEL"
+# key 364 "KEY_FAVORITES"
+# key 365 "KEY_EPG"
+key 366 DVR
+# key 367 "KEY_MHP"
+# key 368 "KEY_LANGUAGE"
+# key 369 "KEY_TITLE"
+# key 370 "KEY_SUBTITLE"
+# key 371 "KEY_ANGLE"
+# key 372 "KEY_ZOOM"
+# key 373 "KEY_MODE"
+# key 374 "KEY_KEYBOARD"
+# key 375 "KEY_SCREEN"
+# key 376 "KEY_PC"
+key 377 TV
+# key 378 "KEY_TV2"
+# key 379 "KEY_VCR"
+# key 380 "KEY_VCR2"
+# key 381 "KEY_SAT"
+# key 382 "KEY_SAT2"
+# key 383 "KEY_CD"
+# key 384 "KEY_TAPE"
+# key 385 "KEY_RADIO"
+# key 386 "KEY_TUNER"
+# key 387 "KEY_PLAYER"
+# key 388 "KEY_TEXT"
+# key 389 "KEY_DVD"
+# key 390 "KEY_AUX"
+# key 391 "KEY_MP3"
+# key 392 "KEY_AUDIO"
+# key 393 "KEY_VIDEO"
+# key 394 "KEY_DIRECTORY"
+# key 395 "KEY_LIST"
+# key 396 "KEY_MEMO"
+key 397 CALENDAR
+# key 398 "KEY_RED"
+# key 399 "KEY_GREEN"
+# key 400 "KEY_YELLOW"
+# key 401 "KEY_BLUE"
+key 402 CHANNEL_UP
+key 403 CHANNEL_DOWN
+# key 404 "KEY_FIRST"
+# key 405 "KEY_LAST"
+# key 406 "KEY_AB"
+# key 407 "KEY_NEXT"
+# key 408 "KEY_RESTART"
+# key 409 "KEY_SLOW"
+# key 410 "KEY_SHUFFLE"
+# key 411 "KEY_BREAK"
+# key 412 "KEY_PREVIOUS"
+# key 413 "KEY_DIGITS"
+# key 414 "KEY_TEEN"
+# key 415 "KEY_TWEN"
+
+key 429 CONTACTS
+
+# key 448 "KEY_DEL_EOL"
+# key 449 "KEY_DEL_EOS"
+# key 450 "KEY_INS_LINE"
+# key 451 "KEY_DEL_LINE"
+
+
+key 464 FUNCTION
+key 465 ESCAPE FUNCTION
+key 466 F1 FUNCTION
+key 467 F2 FUNCTION
+key 468 F3 FUNCTION
+key 469 F4 FUNCTION
+key 470 F5 FUNCTION
+key 471 F6 FUNCTION
+key 472 F7 FUNCTION
+key 473 F8 FUNCTION
+key 474 F9 FUNCTION
+key 475 F10 FUNCTION
+key 476 F11 FUNCTION
+key 477 F12 FUNCTION
+key 478 1 FUNCTION
+key 479 2 FUNCTION
+key 480 D FUNCTION
+key 481 E FUNCTION
+key 482 F FUNCTION
+key 483 S FUNCTION
+key 484 B FUNCTION
+
+
+# key 497 KEY_BRL_DOT1
+# key 498 KEY_BRL_DOT2
+# key 499 KEY_BRL_DOT3
+# key 500 KEY_BRL_DOT4
+# key 501 KEY_BRL_DOT5
+# key 502 KEY_BRL_DOT6
+# key 503 KEY_BRL_DOT7
+# key 504 KEY_BRL_DOT8
+
+key 580 APP_SWITCH
+key 582 VOICE_ASSIST
+
+# Keys defined by HID usages
+key usage 0x0c006F BRIGHTNESS_UP
+key usage 0x0c0070 BRIGHTNESS_DOWN
+
+# Joystick and game controller axes.
+# Axes that are not mapped will be assigned generic axis numbers by the input subsystem.
+axis 0x00 X
+axis 0x01 Y
+axis 0x02 Z
+axis 0x03 RX
+axis 0x04 RY
+axis 0x05 RZ
+axis 0x06 THROTTLE
+axis 0x07 RUDDER
+axis 0x08 WHEEL
+axis 0x09 GAS
+axis 0x0a BRAKE
+axis 0x10 HAT_X
+axis 0x11 HAT_Y
+
+# LEDs
+led 0x00 NUM_LOCK
+led 0x01 CAPS_LOCK
+led 0x02 SCROLL_LOCK
+led 0x03 COMPOSE
+led 0x04 KANA
+led 0x05 SLEEP
+led 0x06 SUSPEND
+led 0x07 MUTE
+led 0x08 MISC
+led 0x09 MAIL
+led 0x0a CHARGING
+key 218 FLYMODE
+key 248 MICMUTE
diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h
new file mode 100755
index 0000000..78eec6b
--- /dev/null
+++ b/bluetooth/bdroid_buildcfg.h
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+#ifndef _BDROID_BUILDCFG_H
+#define _BDROID_BUILDCFG_H
+
+#define BTM_DEF_LOCAL_NAME "rk3399"
+#define BTA_DM_COD {0x1A, 0x01, 0x10}
+
+#endif
+
diff --git a/build-rk3399-box.sh b/build-rk3399-box.sh
new file mode 100755
index 0000000..420cb0d
--- /dev/null
+++ b/build-rk3399-box.sh
@@ -0,0 +1,168 @@
+#!/bin/bash
+
+usage()
+{
+ echo "USAGE: [-o] [-u] [-v VERSION_NAME]"
+ echo "No ARGS means use default build option"
+ echo "WHERE: -o = generate ota package "
+ echo " -u = generate update.img "
+ echo " -v = set build version name for output image folder"
+ exit 1
+}
+
+BUILD_UPDATE_IMG=false
+BUILD_OTA=false
+BUILD_VERSION="IMAGES"
+
+# check pass argument
+while getopts "ouv:" arg
+do
+ case $arg in
+ o)
+ echo "will build ota package"
+ BUILD_OTA=true
+ ;;
+ u)
+ echo "will build update.img"
+ BUILD_UPDATE_IMG=true
+ ;;
+ v)
+ BUILD_VERSION=$OPTARG
+ ;;
+ ?)
+ usage ;;
+ esac
+done
+
+source build/envsetup.sh >/dev/null && setpaths
+TARGET_PRODUCT=`get_build_var TARGET_PRODUCT`
+
+#set jdk version
+export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+export PATH=$JAVA_HOME/bin:$PATH
+export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
+# source environment and chose target product
+DEVICE=`get_build_var TARGET_PRODUCT`
+BUILD_VARIANT=`get_build_var TARGET_BUILD_VARIANT`
+UBOOT_DEFCONFIG=rk3399_box_defconfig
+KERNEL_DEFCONFIG=rockchip_defconfig
+KERNEL_DTS=rk3399-box-rev2
+PACK_TOOL_DIR=RKTools/linux/Linux_Pack_Firmware
+IMAGE_PATH=rockdev/Image-$TARGET_PRODUCT
+export PROJECT_TOP=`gettop`
+
+#lunch $DEVICE-$BUILD_VARIANT
+
+PLATFORM_VERSION=`get_build_var PLATFORM_VERSION`
+DATE=$(date +%Y%m%d.%H%M)
+STUB_PATH=Image/"$KERNEL_DTS"_"$PLATFORM_VERSION"_"$DATE"_"$BUILD_VERSION"
+STUB_PATH="$(echo $STUB_PATH | tr '[:lower:]' '[:upper:]')"
+export STUB_PATH=$PROJECT_TOP/$STUB_PATH
+export STUB_PATCH_PATH=$STUB_PATH/PATCHES
+#echo $STUB_PATH
+
+# build uboot
+echo "start build uboot"
+cd u-boot && make distclean && make $UBOOT_DEFCONFIG && make ARCHV=aarch64 -j12 && cd -
+if [ $? -eq 0 ]; then
+ echo "Build uboot ok!"
+else
+ echo "Build uboot failed!"
+ exit 1
+fi
+
+
+# build kernel
+echo "Start build kernel"
+cd kernel && make ARCH=arm64 $KERNEL_DEFCONFIG && make ARCH=arm64 $KERNEL_DTS.img -j12 && cd -
+if [ $? -eq 0 ]; then
+ echo "Build kernel ok!"
+else
+ echo "Build kernel failed!"
+ exit 1
+fi
+
+lunch rk3399_box-userdebug
+
+# build wifi driver ko
+if [ -f "device/rockchip/common/build_wifi_ko.sh" ]; then
+ echo "start build wifi driver ko"
+ source device/rockchip/common/build_wifi_ko.sh
+fi
+
+# build android
+echo "start build android"
+make installclean
+make -j12
+if [ $? -eq 0 ]; then
+ echo "Build android ok!"
+else
+ echo "Build android failed!"
+ exit 1
+fi
+
+# mkimage.sh
+echo "make and copy android images"
+./mkimage.sh
+if [ $? -eq 0 ]; then
+ echo "Make image ok!"
+else
+ echo "Make image failed!"
+ exit 1
+fi
+
+# copy images to rockdev
+#echo "copy u-boot images"
+#cp u-boot/uboot.img $IMAGE_PATH/
+#cp u-boot/RK322XHMiniLoaderAll* $IMAGE_PATH/
+#cp u-boot/trust.img $IMAGE_PATH/
+
+#echo "copy kernel images"
+#cp kernel/resource.img $IMAGE_PATH/
+#cp kernel/kernel.img $IMAGE_PATH/
+
+echo "copy manifest.xml"
+cp manifest.xml $IMAGE_PATH/manifest_${DATE}.xml
+
+if [ "$BUILD_OTA" = true ] ; then
+ echo "generate ota package"
+ make otapackage -j16
+ ./mkimage.sh ota
+ cp out/target/product/$TARGET_PRODUCT/${TARGET_PRODUCT}*.zip $IMAGE_PATH/
+ cp out/target/product/$TARGET_PRODUCT/obj/PACKAGING/target_files_intermediates/${TARGET_PRODUCT}*.zip $IMAGE_PATH/
+fi
+
+if [ "$BUILD_UPDATE_IMG" = true ] ; then
+ echo "generate update.img"
+ cp -f $PACK_TOOL_DIR/rockdev_for_build/* rockdev/
+ cd rockdev
+ ./mkupdate.sh
+ if [ $? -eq 0 ]; then
+ echo "Make update image ok!"
+ else
+ echo "Make update image failed!"
+ exit 1
+ fi
+ cd -
+fi
+
+mkdir -p $STUB_PATH
+
+#Generate patches
+
+.repo/repo/repo forall -c '[ "$REPO_REMOTE" = "rk" -a "$REPO_RREV" != "refs/tags/android-6.0.1_r55" ] && { REMOTE_DIFF=`git log $REPO_REMOTE/$REPO_RREV..HEAD`; LOCAL_DIFF=`git diff`; [ -n "$REMOTE_DIFF" ] && { mkdir -p $STUB_PATCH_PATH/$REPO_PATH/; git format-patch $REPO_REMOTE/$REPO_RREV..HEAD -o $STUB_PATCH_PATH/$REPO_PATH; } || :; [ -n "$LOCAL_DIFF" ] && { mkdir -p $STUB_PATCH_PATH/$REPO_PATH/; git reset HEAD ./; git diff > $STUB_PATCH_PATH/$REPO_PATH/local_diff.patch; } || :; }'
+
+#Copy stubs
+cp manifest.xml $STUB_PATH/manifest_${DATE}.xml
+
+mkdir -p $STUB_PATCH_PATH/kernel
+cp kernel/.config $STUB_PATCH_PATH/kernel
+cp kernel/vmlinux $STUB_PATCH_PATH/kernel
+
+mkdir -p $STUB_PATH/IMAGES/
+cp $IMAGE_PATH/* $STUB_PATH/IMAGES/
+
+#Save build command info
+echo "UBOOT: defconfig: $UBOOT_DEFCONFIG" >> $STUB_PATH/build_cmd_info
+echo "KERNEL: defconfig: $KERNEL_DEFCONFIG, dts: $KERNEL_DTS" >> $STUB_PATH/build_cmd_info
+echo "ANDROID:$DEVICE-$BUILD_VARIANT" >> $STUB_PATH/build_cmd_info
diff --git a/build-rk3399-laptop.sh b/build-rk3399-laptop.sh
new file mode 100755
index 0000000..d9f8511
--- /dev/null
+++ b/build-rk3399-laptop.sh
@@ -0,0 +1,179 @@
+#!/bin/bash
+
+usage()
+{
+ echo "USAGE: [-o] [-u] [-v VERSION_NAME]"
+ echo "No ARGS means use default build option"
+ echo "WHERE: -o = generate ota package "
+ echo " -u = generate update.img "
+ echo " -v = set build version name for output image folder"
+ exit 1
+}
+
+BUILD_UPDATE_IMG=false
+BUILD_OTA=false
+BUILD_VERSION="IMAGES"
+
+# check pass argument
+while getopts "ouv:" arg
+do
+ case $arg in
+ o)
+ echo "will build ota package"
+ BUILD_OTA=true
+ ;;
+ u)
+ echo "will build update.img"
+ BUILD_UPDATE_IMG=true
+ ;;
+ v)
+ BUILD_VERSION=$OPTARG
+ ;;
+ ?)
+ usage ;;
+ esac
+done
+
+source build/envsetup.sh >/dev/null && setpaths
+TARGET_PRODUCT=`get_build_var TARGET_PRODUCT`
+
+#set jdk version
+export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+export PATH=$JAVA_HOME/bin:$PATH
+export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
+# source environment and chose target product
+DEVICE=`get_build_var TARGET_PRODUCT`
+BUILD_VARIANT=`get_build_var TARGET_BUILD_VARIANT`
+UBOOT_DEFCONFIG=rk3399_defconfig
+KERNEL_DEFCONFIG=rockchip_defconfig
+KERNEL_DTS=rk3399-tve1205g
+PACK_TOOL_DIR=RKTools/linux/Linux_Pack_Firmware
+IMAGE_PATH=rockdev/Image-$TARGET_PRODUCT
+export PROJECT_TOP=`gettop`
+
+#lunch $DEVICE-$BUILD_VARIANT
+
+PLATFORM_VERSION=`get_build_var PLATFORM_VERSION`
+DATE=$(date +%Y%m%d.%H%M)
+STUB_PATH=Image/"$KERNEL_DTS"_"$PLATFORM_VERSION"_"$DATE"_"$BUILD_VERSION"
+STUB_PATH="$(echo $STUB_PATH | tr '[:lower:]' '[:upper:]')"
+export STUB_PATH=$PROJECT_TOP/$STUB_PATH
+export STUB_PATCH_PATH=$STUB_PATH/PATCHES
+#echo $STUB_PATH
+
+# build uboot
+echo "start build uboot"
+cd u-boot && make clean && make $UBOOT_DEFCONFIG && make ARCHV=aarch64 -j12 && cd -
+if [ $? -eq 0 ]; then
+ echo "Build uboot ok!"
+else
+ echo "Build uboot failed!"
+ exit 1
+fi
+
+
+# build kernel
+echo "Start build kernel"
+cd kernel && make clean && make ARCH=arm64 $KERNEL_DEFCONFIG && make ARCH=arm64 $KERNEL_DTS.img -j12 && cd -
+if [ $? -eq 0 ]; then
+ echo "Build kernel ok!"
+else
+ echo "Build kernel failed!"
+ exit 1
+fi
+
+lunch rk3399_laptop-userdebug
+
+# build wifi driver ko
+if [ -f "device/rockchip/common/build_wifi_ko.sh" ]; then
+ echo "start build wifi driver ko"
+ source device/rockchip/common/build_wifi_ko.sh
+fi
+
+# build android
+echo "start build android"
+make installclean
+make -j12
+if [ $? -eq 0 ]; then
+ echo "Build android ok!"
+else
+ echo "Build android failed!"
+ exit 1
+fi
+
+# mkimage.sh
+echo "make and copy android images"
+./mkimage.sh
+if [ $? -eq 0 ]; then
+ echo "Make image ok!"
+else
+ echo "Make image failed!"
+ exit 1
+fi
+
+# copy images to rockdev
+#echo "copy u-boot images"
+#cp u-boot/uboot.img $IMAGE_PATH/
+#cp u-boot/RK322XHMiniLoaderAll* $IMAGE_PATH/
+#cp u-boot/trust.img $IMAGE_PATH/
+
+#echo "copy kernel images"
+#cp kernel/resource.img $IMAGE_PATH/
+#cp kernel/kernel.img $IMAGE_PATH/
+
+echo "copy manifest.xml"
+cp manifest.xml $IMAGE_PATH/manifest_${DATE}.xml
+
+if [ "$BUILD_UPDATE_IMG" = true ] ; then
+ echo "generate update.img"
+ unzip -o $PACK_TOOL_DIR/Linux_rockdev_2015-06-17_for_RK3399.zip -d ${IMAGE_PATH}/../update_gen
+ cp ${IMAGE_PATH}/parameter.txt ${IMAGE_PATH}/../update_gen/rockdev/parameter.txt -rf
+ cp ${IMAGE_PATH}/parameter.txt ${IMAGE_PATH}/../update_gen/rockdev/parameter -rf
+ cp ${IMAGE_PATH}/trust.img ${IMAGE_PATH}/../update_gen/rockdev/trust.img -rf
+ cp ${IMAGE_PATH}/uboot.img ${IMAGE_PATH}/../update_gen/rockdev/uboot.img -rf
+ cp ${IMAGE_PATH}/MiniLoaderAll.bin ${IMAGE_PATH}/../update_gen/rockdev/RK3399MiniLoaderAll_V1.05.bin -rf
+ cp ${IMAGE_PATH}/* ${IMAGE_PATH}/../update_gen/rockdev/Image/ -rf
+ cd ${IMAGE_PATH}/../update_gen/rockdev
+ chmod +x ./mkupdate.sh
+ chmod +x ./afptool
+ chmod +x ./rkImageMaker
+ chmod +x ./unpack.sh
+ ./mkupdate.sh
+ if [ $? -eq 0 ]; then
+ echo "Make update image ok!"
+ else
+ echo "Make update image failed!"
+ exit 1
+ fi
+ cd -
+ cp ${IMAGE_PATH}/../update_gen/rockdev/update.img ${IMAGE_PATH}/update.img
+ rm -rf ${IMAGE_PATH}/../update_gen
+fi
+
+if [ "$BUILD_OTA" = true ] ; then
+ echo "generate ota package"
+ make otapackage -j16
+ cp out/target/product/$TARGET_PRODUCT/${TARGET_PRODUCT}*.zip $IMAGE_PATH/
+ cp out/target/product/$TARGET_PRODUCT/obj/PACKAGING/target_files_intermediates/${TARGET_PRODUCT}*.zip $IMAGE_PATH/
+fi
+
+mkdir -p $STUB_PATH
+
+#Generate patches
+
+#.repo/repo/repo forall -c '[ "$REPO_REMOTE" = "rk" -a "$REPO_RREV" != "refs/tags/android-6.0.1_r55" ] && { REMOTE_DIFF=`git log $REPO_REMOTE/$REPO_RREV..HEAD`; LOCAL_DIFF=`git diff`; [ -n "$REMOTE_DIFF" ] && { mkdir -p $STUB_PATCH_PATH/$REPO_PATH/; git format-patch $REPO_REMOTE/$REPO_RREV..HEAD -o $STUB_PATCH_PATH/$REPO_PATH; } || :; [ -n "$LOCAL_DIFF" ] && { mkdir -p $STUB_PATCH_PATH/$REPO_PATH/; git reset HEAD ./; git diff > $STUB_PATCH_PATH/$REPO_PATH/local_diff.patch; } || :; }'
+
+#Copy stubs
+cp manifest.xml $STUB_PATH/manifest_${DATE}.xml
+
+mkdir -p $STUB_PATCH_PATH/kernel
+cp kernel/.config $STUB_PATCH_PATH/kernel
+cp kernel/vmlinux $STUB_PATCH_PATH/kernel
+
+mkdir -p $STUB_PATH/IMAGES/
+cp $IMAGE_PATH/* $STUB_PATH/IMAGES/
+
+#Save build command info
+echo "UBOOT: defconfig: $UBOOT_DEFCONFIG" >> $STUB_PATH/build_cmd_info
+echo "KERNEL: defconfig: $KERNEL_DEFCONFIG, dts: $KERNEL_DTS" >> $STUB_PATH/build_cmd_info
+echo "ANDROID:$DEVICE-$BUILD_VARIANT" >> $STUB_PATH/build_cmd_info
diff --git a/build-rk3399-mid.sh b/build-rk3399-mid.sh
new file mode 100755
index 0000000..514884a
--- /dev/null
+++ b/build-rk3399-mid.sh
@@ -0,0 +1,179 @@
+#!/bin/bash
+
+usage()
+{
+ echo "USAGE: [-o] [-u] [-v VERSION_NAME]"
+ echo "No ARGS means use default build option"
+ echo "WHERE: -o = generate ota package "
+ echo " -u = generate update.img "
+ echo " -v = set build version name for output image folder"
+ exit 1
+}
+
+BUILD_UPDATE_IMG=false
+BUILD_OTA=false
+BUILD_VERSION="IMAGES"
+
+# check pass argument
+while getopts "ouv:" arg
+do
+ case $arg in
+ o)
+ echo "will build ota package"
+ BUILD_OTA=true
+ ;;
+ u)
+ echo "will build update.img"
+ BUILD_UPDATE_IMG=true
+ ;;
+ v)
+ BUILD_VERSION=$OPTARG
+ ;;
+ ?)
+ usage ;;
+ esac
+done
+
+source build/envsetup.sh >/dev/null && setpaths
+TARGET_PRODUCT=`get_build_var TARGET_PRODUCT`
+
+#set jdk version
+export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+export PATH=$JAVA_HOME/bin:$PATH
+export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
+# source environment and chose target product
+DEVICE=`get_build_var TARGET_PRODUCT`
+BUILD_VARIANT=`get_build_var TARGET_BUILD_VARIANT`
+UBOOT_DEFCONFIG=rk3399_defconfig
+KERNEL_DEFCONFIG=rockchip_defconfig
+KERNEL_DTS=rk3399-mid-818-android
+PACK_TOOL_DIR=RKTools/linux/Linux_Pack_Firmware
+IMAGE_PATH=rockdev/Image-$TARGET_PRODUCT
+export PROJECT_TOP=`gettop`
+
+#lunch $DEVICE-$BUILD_VARIANT
+
+PLATFORM_VERSION=`get_build_var PLATFORM_VERSION`
+DATE=$(date +%Y%m%d.%H%M)
+STUB_PATH=Image/"$KERNEL_DTS"_"$PLATFORM_VERSION"_"$DATE"_"$BUILD_VERSION"
+STUB_PATH="$(echo $STUB_PATH | tr '[:lower:]' '[:upper:]')"
+export STUB_PATH=$PROJECT_TOP/$STUB_PATH
+export STUB_PATCH_PATH=$STUB_PATH/PATCHES
+#echo $STUB_PATH
+
+# build uboot
+echo "start build uboot"
+cd u-boot && make clean && make $UBOOT_DEFCONFIG && make ARCHV=aarch64 -j12 && cd -
+if [ $? -eq 0 ]; then
+ echo "Build uboot ok!"
+else
+ echo "Build uboot failed!"
+ exit 1
+fi
+
+
+# build kernel
+echo "Start build kernel"
+cd kernel && make clean && make ARCH=arm64 $KERNEL_DEFCONFIG && make ARCH=arm64 $KERNEL_DTS.img -j12 && cd -
+if [ $? -eq 0 ]; then
+ echo "Build kernel ok!"
+else
+ echo "Build kernel failed!"
+ exit 1
+fi
+
+lunch rk3399_mid-userdebug
+
+# build wifi driver ko
+if [ -f "device/rockchip/common/build_wifi_ko.sh" ]; then
+ echo "start build wifi driver ko"
+ source device/rockchip/common/build_wifi_ko.sh
+fi
+
+# build android
+echo "start build android"
+make installclean
+make -j12
+if [ $? -eq 0 ]; then
+ echo "Build android ok!"
+else
+ echo "Build android failed!"
+ exit 1
+fi
+
+# mkimage.sh
+echo "make and copy android images"
+./mkimage.sh
+if [ $? -eq 0 ]; then
+ echo "Make image ok!"
+else
+ echo "Make image failed!"
+ exit 1
+fi
+
+# copy images to rockdev
+#echo "copy u-boot images"
+#cp u-boot/uboot.img $IMAGE_PATH/
+#cp u-boot/RK322XHMiniLoaderAll* $IMAGE_PATH/
+#cp u-boot/trust.img $IMAGE_PATH/
+
+#echo "copy kernel images"
+#cp kernel/resource.img $IMAGE_PATH/
+#cp kernel/kernel.img $IMAGE_PATH/
+
+echo "copy manifest.xml"
+cp manifest.xml $IMAGE_PATH/manifest_${DATE}.xml
+
+if [ "$BUILD_UPDATE_IMG" = true ] ; then
+ echo "generate update.img"
+ unzip -o $PACK_TOOL_DIR/Linux_rockdev_2015-06-17_for_RK3399.zip -d ${IMAGE_PATH}/../update_gen
+ cp ${IMAGE_PATH}/parameter.txt ${IMAGE_PATH}/../update_gen/rockdev/parameter.txt -rf
+ cp ${IMAGE_PATH}/parameter.txt ${IMAGE_PATH}/../update_gen/rockdev/parameter -rf
+ cp ${IMAGE_PATH}/trust.img ${IMAGE_PATH}/../update_gen/rockdev/trust.img -rf
+ cp ${IMAGE_PATH}/uboot.img ${IMAGE_PATH}/../update_gen/rockdev/uboot.img -rf
+ cp ${IMAGE_PATH}/MiniLoaderAll.bin ${IMAGE_PATH}/../update_gen/rockdev/RK3399MiniLoaderAll_V1.05.bin -rf
+ cp ${IMAGE_PATH}/* ${IMAGE_PATH}/../update_gen/rockdev/Image/ -rf
+ cd ${IMAGE_PATH}/../update_gen/rockdev
+ chmod +x ./mkupdate.sh
+ chmod +x ./afptool
+ chmod +x ./rkImageMaker
+ chmod +x ./unpack.sh
+ ./mkupdate.sh
+ if [ $? -eq 0 ]; then
+ echo "Make update image ok!"
+ else
+ echo "Make update image failed!"
+ exit 1
+ fi
+ cd -
+ cp ${IMAGE_PATH}/../update_gen/rockdev/update.img ${IMAGE_PATH}/update.img
+ rm -rf ${IMAGE_PATH}/../update_gen
+fi
+
+if [ "$BUILD_OTA" = true ] ; then
+ echo "generate ota package"
+ make otapackage -j16
+ cp out/target/product/$TARGET_PRODUCT/${TARGET_PRODUCT}*.zip $IMAGE_PATH/
+ cp out/target/product/$TARGET_PRODUCT/obj/PACKAGING/target_files_intermediates/${TARGET_PRODUCT}*.zip $IMAGE_PATH/
+fi
+
+mkdir -p $STUB_PATH
+
+#Generate patches
+
+#.repo/repo/repo forall -c '[ "$REPO_REMOTE" = "rk" -a "$REPO_RREV" != "refs/tags/android-6.0.1_r55" ] && { REMOTE_DIFF=`git log $REPO_REMOTE/$REPO_RREV..HEAD`; LOCAL_DIFF=`git diff`; [ -n "$REMOTE_DIFF" ] && { mkdir -p $STUB_PATCH_PATH/$REPO_PATH/; git format-patch $REPO_REMOTE/$REPO_RREV..HEAD -o $STUB_PATCH_PATH/$REPO_PATH; } || :; [ -n "$LOCAL_DIFF" ] && { mkdir -p $STUB_PATCH_PATH/$REPO_PATH/; git reset HEAD ./; git diff > $STUB_PATCH_PATH/$REPO_PATH/local_diff.patch; } || :; }'
+
+#Copy stubs
+cp manifest.xml $STUB_PATH/manifest_${DATE}.xml
+
+mkdir -p $STUB_PATCH_PATH/kernel
+cp kernel/.config $STUB_PATCH_PATH/kernel
+cp kernel/vmlinux $STUB_PATCH_PATH/kernel
+
+mkdir -p $STUB_PATH/IMAGES/
+cp $IMAGE_PATH/* $STUB_PATH/IMAGES/
+
+#Save build command info
+echo "UBOOT: defconfig: $UBOOT_DEFCONFIG" >> $STUB_PATH/build_cmd_info
+echo "KERNEL: defconfig: $KERNEL_DEFCONFIG, dts: $KERNEL_DTS" >> $STUB_PATH/build_cmd_info
+echo "ANDROID:$DEVICE-$BUILD_VARIANT" >> $STUB_PATH/build_cmd_info
diff --git a/buildspec-rk3399-32.mk b/buildspec-rk3399-32.mk
new file mode 100755
index 0000000..cf28dfb
--- /dev/null
+++ b/buildspec-rk3399-32.mk
@@ -0,0 +1,114 @@
+#
+# Copyright (C) 2007 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.
+#
+
+######################################################################
+# This is a do-nothing template file. To use it, copy it to a file
+# named "buildspec.mk" in the root directory, and uncomment or change
+# the variables necessary for your desired configuration. The file
+# "buildspec.mk" should never be checked in to source control.
+######################################################################
+
+TARGET_BOARD_PLATFORM ?= rk3399
+TARGET_BOARD_PLATFORM_GPU ?= mali-t860
+
+# Choose a product to build for. Look in the products directory for ones
+# that work.
+ifndef TARGET_PRODUCT
+TARGET_PRODUCT:=rk3399_32
+endif
+
+# Choose a variant to build. If you don't pick one, the default is eng.
+# User is what we ship. Userdebug is that, with a few flags turned on
+# for debugging. Eng has lots of extra tools for development.
+ifndef TARGET_BUILD_VARIANT
+#TARGET_BUILD_VARIANT:=user
+TARGET_BUILD_VARIANT:=userdebug
+#TARGET_BUILD_VARIANT:=eng
+endif
+
+# Choose additional targets to always install, even when building
+# minimal targets like "make droid". This takes simple target names
+# like "Browser" or "MyApp", the names used by LOCAL_MODULE or
+# LOCAL_PACKAGE_NAME. Modules listed here will always be installed in
+# /system, even if they'd usually go in /data.
+ifndef CUSTOM_MODULES
+#CUSTOM_MODULES:=
+endif
+
+# Set this to debug or release if you care. Otherwise, it defaults to release.
+ifndef TARGET_BUILD_TYPE
+#TARGET_BUILD_TYPE:=release
+endif
+
+# Uncomment this if you want the host tools built in debug mode. Otherwise
+# it defaults to release.
+ifndef HOST_BUILD_TYPE
+#HOST_BUILD_TYPE:=debug
+endif
+
+# Turn on debugging for selected modules. If DEBUG_MODULE_<module-name> is set
+# to a non-empty value, the appropriate HOST_/TARGET_CUSTOM_DEBUG_CFLAGS
+# will be added to LOCAL_CFLAGS when building the module.
+#DEBUG_MODULE_ModuleName:=true
+
+# Specify an alternative tool chain prefix if needed.
+#TARGET_TOOLS_PREFIX:=
+
+# Specify the extra CFLAGS to use when building a module whose
+# DEBUG_MODULE_ variable is set. Host and device flags are handled
+# separately.
+#HOST_CUSTOM_DEBUG_CFLAGS:=
+#TARGET_CUSTOM_DEBUG_CFLAGS:=
+
+# Choose additional locales, like "en_US" or "it_IT", to add to any
+# built product. Any locales that appear in CUSTOM_LOCALES but not in
+# the locale list for the selected product will be added to the end
+# of PRODUCT_LOCALES.
+ifndef CUSTOM_LOCALES
+#CUSTOM_LOCALES:=
+endif
+
+# If you have a special place to put your ouput files, set this, otherwise
+# it goes to <build-root>/out
+#OUT_DIR:=/tmp/stuff
+
+# If you want to always set certain system properties, add them to this list.
+# E.g., "ADDITIONAL_BUILD_PROPERTIES += ro.prop1=5 prop2=value"
+# This mechanism does not currently support values containing spaces.
+#ADDITIONAL_BUILD_PROPERTIES +=
+
+# If you want to reduce the system.img size by several meg, and are willing to
+# lose access to CJK (and other) character sets, define NO_FALLBACK_FONT:=true
+ifndef NO_FALLBACK_FONT
+#NO_FALLBACK_FONT:=true
+endif
+
+# To enable instrumentation in webcore based apps like gmail and
+# the browser, define WEBCORE_INSTRUMENTATION:=true
+ifndef WEBCORE_INSTRUMENTATION
+#WEBCORE_INSTRUMENTATION:=true
+endif
+
+# To disable SVG in webcore define ENABLE_SVG:=false
+ifndef ENABLE_SVG
+#ENABLE_SVG:=false
+endif
+
+# when the build system changes such that this file must be updated, this
+# variable will be changed. After you have modified this file with the new
+# changes (see buildspec.mk.default), update this to the new value from
+# buildspec.mk.default.
+BUILD_ENV_SEQUENCE_NUMBER := 10
diff --git a/buildspec-rk3399-box.mk b/buildspec-rk3399-box.mk
new file mode 100755
index 0000000..089823c
--- /dev/null
+++ b/buildspec-rk3399-box.mk
@@ -0,0 +1,114 @@
+#
+# Copyright (C) 2007 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.
+#
+
+######################################################################
+# This is a do-nothing template file. To use it, copy it to a file
+# named "buildspec.mk" in the root directory, and uncomment or change
+# the variables necessary for your desired configuration. The file
+# "buildspec.mk" should never be checked in to source control.
+######################################################################
+
+TARGET_BOARD_PLATFORM ?= rk3399
+TARGET_BOARD_PLATFORM_GPU ?= mali-t860
+
+# Choose a product to build for. Look in the products directory for ones
+# that work.
+ifndef TARGET_PRODUCT
+TARGET_PRODUCT:=rk3399_box
+endif
+
+# Choose a variant to build. If you don't pick one, the default is eng.
+# User is what we ship. Userdebug is that, with a few flags turned on
+# for debugging. Eng has lots of extra tools for development.
+ifndef TARGET_BUILD_VARIANT
+#TARGET_BUILD_VARIANT:=user
+TARGET_BUILD_VARIANT:=userdebug
+#TARGET_BUILD_VARIANT:=eng
+endif
+
+# Choose additional targets to always install, even when building
+# minimal targets like "make droid". This takes simple target names
+# like "Browser" or "MyApp", the names used by LOCAL_MODULE or
+# LOCAL_PACKAGE_NAME. Modules listed here will always be installed in
+# /system, even if they'd usually go in /data.
+ifndef CUSTOM_MODULES
+#CUSTOM_MODULES:=
+endif
+
+# Set this to debug or release if you care. Otherwise, it defaults to release.
+ifndef TARGET_BUILD_TYPE
+#TARGET_BUILD_TYPE:=release
+endif
+
+# Uncomment this if you want the host tools built in debug mode. Otherwise
+# it defaults to release.
+ifndef HOST_BUILD_TYPE
+#HOST_BUILD_TYPE:=debug
+endif
+
+# Turn on debugging for selected modules. If DEBUG_MODULE_<module-name> is set
+# to a non-empty value, the appropriate HOST_/TARGET_CUSTOM_DEBUG_CFLAGS
+# will be added to LOCAL_CFLAGS when building the module.
+#DEBUG_MODULE_ModuleName:=true
+
+# Specify an alternative tool chain prefix if needed.
+#TARGET_TOOLS_PREFIX:=
+
+# Specify the extra CFLAGS to use when building a module whose
+# DEBUG_MODULE_ variable is set. Host and device flags are handled
+# separately.
+#HOST_CUSTOM_DEBUG_CFLAGS:=
+#TARGET_CUSTOM_DEBUG_CFLAGS:=
+
+# Choose additional locales, like "en_US" or "it_IT", to add to any
+# built product. Any locales that appear in CUSTOM_LOCALES but not in
+# the locale list for the selected product will be added to the end
+# of PRODUCT_LOCALES.
+ifndef CUSTOM_LOCALES
+#CUSTOM_LOCALES:=
+endif
+
+# If you have a special place to put your ouput files, set this, otherwise
+# it goes to <build-root>/out
+#OUT_DIR:=/tmp/stuff
+
+# If you want to always set certain system properties, add them to this list.
+# E.g., "ADDITIONAL_BUILD_PROPERTIES += ro.prop1=5 prop2=value"
+# This mechanism does not currently support values containing spaces.
+#ADDITIONAL_BUILD_PROPERTIES +=
+
+# If you want to reduce the system.img size by several meg, and are willing to
+# lose access to CJK (and other) character sets, define NO_FALLBACK_FONT:=true
+ifndef NO_FALLBACK_FONT
+#NO_FALLBACK_FONT:=true
+endif
+
+# To enable instrumentation in webcore based apps like gmail and
+# the browser, define WEBCORE_INSTRUMENTATION:=true
+ifndef WEBCORE_INSTRUMENTATION
+#WEBCORE_INSTRUMENTATION:=true
+endif
+
+# To disable SVG in webcore define ENABLE_SVG:=false
+ifndef ENABLE_SVG
+#ENABLE_SVG:=false
+endif
+
+# when the build system changes such that this file must be updated, this
+# variable will be changed. After you have modified this file with the new
+# changes (see buildspec.mk.default), update this to the new value from
+# buildspec.mk.default.
+BUILD_ENV_SEQUENCE_NUMBER := 10
diff --git a/buildspec.mk b/buildspec.mk
new file mode 100755
index 0000000..cd6ba36
--- /dev/null
+++ b/buildspec.mk
@@ -0,0 +1,114 @@
+#
+# Copyright (C) 2007 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.
+#
+
+######################################################################
+# This is a do-nothing template file. To use it, copy it to a file
+# named "buildspec.mk" in the root directory, and uncomment or change
+# the variables necessary for your desired configuration. The file
+# "buildspec.mk" should never be checked in to source control.
+######################################################################
+
+TARGET_BOARD_PLATFORM ?= rk3399
+TARGET_BOARD_PLATFORM_GPU ?= mali-t860
+
+# Choose a product to build for. Look in the products directory for ones
+# that work.
+ifndef TARGET_PRODUCT
+TARGET_PRODUCT:=rk3399
+endif
+
+# Choose a variant to build. If you don't pick one, the default is eng.
+# User is what we ship. Userdebug is that, with a few flags turned on
+# for debugging. Eng has lots of extra tools for development.
+ifndef TARGET_BUILD_VARIANT
+#TARGET_BUILD_VARIANT:=user
+TARGET_BUILD_VARIANT:=userdebug
+#TARGET_BUILD_VARIANT:=eng
+endif
+
+# Choose additional targets to always install, even when building
+# minimal targets like "make droid". This takes simple target names
+# like "Browser" or "MyApp", the names used by LOCAL_MODULE or
+# LOCAL_PACKAGE_NAME. Modules listed here will always be installed in
+# /system, even if they'd usually go in /data.
+ifndef CUSTOM_MODULES
+#CUSTOM_MODULES:=
+endif
+
+# Set this to debug or release if you care. Otherwise, it defaults to release.
+ifndef TARGET_BUILD_TYPE
+#TARGET_BUILD_TYPE:=release
+endif
+
+# Uncomment this if you want the host tools built in debug mode. Otherwise
+# it defaults to release.
+ifndef HOST_BUILD_TYPE
+#HOST_BUILD_TYPE:=debug
+endif
+
+# Turn on debugging for selected modules. If DEBUG_MODULE_<module-name> is set
+# to a non-empty value, the appropriate HOST_/TARGET_CUSTOM_DEBUG_CFLAGS
+# will be added to LOCAL_CFLAGS when building the module.
+#DEBUG_MODULE_ModuleName:=true
+
+# Specify an alternative tool chain prefix if needed.
+#TARGET_TOOLS_PREFIX:=
+
+# Specify the extra CFLAGS to use when building a module whose
+# DEBUG_MODULE_ variable is set. Host and device flags are handled
+# separately.
+#HOST_CUSTOM_DEBUG_CFLAGS:=
+#TARGET_CUSTOM_DEBUG_CFLAGS:=
+
+# Choose additional locales, like "en_US" or "it_IT", to add to any
+# built product. Any locales that appear in CUSTOM_LOCALES but not in
+# the locale list for the selected product will be added to the end
+# of PRODUCT_LOCALES.
+ifndef CUSTOM_LOCALES
+#CUSTOM_LOCALES:=
+endif
+
+# If you have a special place to put your ouput files, set this, otherwise
+# it goes to <build-root>/out
+#OUT_DIR:=/tmp/stuff
+
+# If you want to always set certain system properties, add them to this list.
+# E.g., "ADDITIONAL_BUILD_PROPERTIES += ro.prop1=5 prop2=value"
+# This mechanism does not currently support values containing spaces.
+#ADDITIONAL_BUILD_PROPERTIES +=
+
+# If you want to reduce the system.img size by several meg, and are willing to
+# lose access to CJK (and other) character sets, define NO_FALLBACK_FONT:=true
+ifndef NO_FALLBACK_FONT
+#NO_FALLBACK_FONT:=true
+endif
+
+# To enable instrumentation in webcore based apps like gmail and
+# the browser, define WEBCORE_INSTRUMENTATION:=true
+ifndef WEBCORE_INSTRUMENTATION
+#WEBCORE_INSTRUMENTATION:=true
+endif
+
+# To disable SVG in webcore define ENABLE_SVG:=false
+ifndef ENABLE_SVG
+#ENABLE_SVG:=false
+endif
+
+# when the build system changes such that this file must be updated, this
+# variable will be changed. After you have modified this file with the new
+# changes (see buildspec.mk.default), update this to the new value from
+# buildspec.mk.default.
+BUILD_ENV_SEQUENCE_NUMBER := 10
diff --git a/debug/init.coredump.rc b/debug/init.coredump.rc
new file mode 100644
index 0000000..8a7d3be
--- /dev/null
+++ b/debug/init.coredump.rc
@@ -0,0 +1,15 @@
+on early-init
+ setrlimit 4 -1 -1
+
+ # Add code sections in coredump
+ write /proc/self/coredump_filter 0x2F
+
+on post-fs-data
+ mkdir /data/core 0773 root log
+ write /proc/sys/kernel/core_pattern /data/core/%t_%e_%p.core
+
+on property:persist.core.enabled=0
+ setrlimit 4 0 0
+
+on property:persist.core.enabled=1
+ setrlimit 4 -1 -1
diff --git a/debug/init.crashlogd.rc b/debug/init.crashlogd.rc
new file mode 100644
index 0000000..e1a283e
--- /dev/null
+++ b/debug/init.crashlogd.rc
@@ -0,0 +1,19 @@
+on init
+ write /proc/sys/fs/suid_dumpable 1
+
+on post-fs-data
+ mkdir /data/tombstones 0755 system system
+ mkdir /data/system 0755 system system
+ mkdir /data/system/dropbox 0700 system system
+ mkdir /data/logs/modemcrash 0775 system system
+ mkdir /data/logs/stats 0775 system system
+ mkdir /data/logs/aplogs 0775 system log
+
+service crashlogd /system/vendor/bin/crashlogd
+ class late_start
+ seclabel u:r:crashlogd:s0
+
+# started by vendor/intel/log_capture/crashlog
+#service logsystemstate /system/vendor/bin/dumpstate_dropbox.sh -v
+# disabled
+# oneshot
diff --git a/debug/init.debug-charging.rc b/debug/init.debug-charging.rc
new file mode 100644
index 0000000..4a03929
--- /dev/null
+++ b/debug/init.debug-charging.rc
@@ -0,0 +1,18 @@
+on charger
+ trigger early-fs
+ trigger charger_adb
+
+on charger_adb
+ # enable USB adb mode
+ mkdir /dev/usb-ffs 0770 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/f_ffs/aliases adb
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 8087
+ write /sys/class/android_usb/android0/idProduct 0a5f
+ write /sys/class/android_usb/android0/functions adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop persist.sys.usb.config mtp,adb
diff --git a/debug/init.debug.rc b/debug/init.debug.rc
new file mode 100644
index 0000000..e60806e
--- /dev/null
+++ b/debug/init.debug.rc
@@ -0,0 +1,7 @@
+import /init.stt_trace.rc
+import /init.logs.rc
+import /init.crashlogd.rc
+import /init.coredump.rc
+import /init.log-watch.rc
+import /init.kernel.rc
+import /init.debug-charging.rc
diff --git a/debug/init.kernel.rc b/debug/init.kernel.rc
new file mode 100644
index 0000000..26f82e2
--- /dev/null
+++ b/debug/init.kernel.rc
@@ -0,0 +1,7 @@
+on early-init
+ write /proc/sys/kernel/panic_on_stackoverflow 1
+
+on fs
+ # Overwrite system/core/rootdir/init.rc config declared "on init"
+ write /proc/sys/kernel/hung_task_timeout_secs 120
+
diff --git a/debug/init.log-watch.rc b/debug/init.log-watch.rc
new file mode 100644
index 0000000..10591a9
--- /dev/null
+++ b/debug/init.log-watch.rc
@@ -0,0 +1,3 @@
+service log-watch /vendor/bin/log-watch -a /vendor/etc/log-watch-kmsg.cfg
+ class late_start
+ seclabel u:r:log-watch:s0
diff --git a/debug/init.logs.rc b/debug/init.logs.rc
new file mode 100644
index 0000000..1e993ad
--- /dev/null
+++ b/debug/init.logs.rc
@@ -0,0 +1,55 @@
+on post-fs-data
+ mkdir /data/logs 0770 system log
+
+on property:persist.service.aplogfs.enable=0
+ stop ap_logfs
+
+on property:persist.service.aplogfs.enable=1
+ setprop persist.service.apklogfs.enable 0
+ restart ap_log_srv
+
+on property:persist.service.apklogfs.enable=0
+ stop apk_logfs
+
+on property:persist.service.apklogfs.enable=1
+ setprop persist.service.aplogfs.enable 0
+ restart ap_log_srv
+
+service apk_logfs /system/vendor/bin/logcat_ep.sh auto \
+ -b main -b system -b radio -b events -b crash -b kernel \
+ -v threadtime -f /data/logs/aplog
+ disabled
+ seclabel u:r:apk_logfs:s0
+
+service ap_logfs /system/vendor/bin/logcat_ep.sh auto \
+ -b main -b system -b radio -b events -b crash \
+ -v threadtime -f /data/logs/aplog
+ disabled
+
+# Service called at boot time after data is decrypted
+#
+# This is done through the late_start class or through persist properties
+# that are only available after data is decrypted.
+# The service may be called again when the properties are updated.
+service ap_log_srv /system/vendor/bin/start_log_srv.sh
+ class late_start
+ oneshot
+ seclabel u:r:ap_log_srv_script:s0
+
+service earlylogs /system/vendor/bin/elogs.sh
+ class core
+ oneshot
+ seclabel u:r:earlylogs:s0
+
+on nonencrypted
+ stop earlylogs
+
+on property:vold.decrypt=trigger_restart_framework
+ stop earlylogs
+
+on property:persist.service.elogs.enable=1
+ mkdir /cache/elogs 0770 system log
+ restorecon /cache/elogs
+
+on property:persist.service.elogs.enable=0
+ exec -- /system/bin/rm -rf /cache/elogs
diff --git a/debug/init.stt_trace.rc b/debug/init.stt_trace.rc
new file mode 100644
index 0000000..5bf1074
--- /dev/null
+++ b/debug/init.stt_trace.rc
@@ -0,0 +1,13 @@
+service oct_trace_on /system/bin/oct_trace_ctrl.sh ON
+ class main
+ disabled
+ user root
+ group root
+ oneshot
+
+service oct_trace_off /system/bin/oct_trace_ctrl.sh OFF
+ class main
+ disabled
+ user root
+ group root
+ oneshot
diff --git a/debug/log-watch-kmsg.cfg b/debug/log-watch-kmsg.cfg
new file mode 100644
index 0000000..6f23b30
--- /dev/null
+++ b/debug/log-watch-kmsg.cfg
@@ -0,0 +1,54 @@
+{
+ "root-workdir": "/data/logs",
+ "instance-name": "lw-kmsg",
+ "source": {
+ "type": "kmsg"
+ },
+ "watchers": [
+ {
+ "name": "coldboot-timeout",
+ "start_pattern": "Timed out waiting for .+\\.coldboot_done",
+ "max_items": 1,
+ "max_records": 1,
+ "attachments": [
+ {
+ "exec": true,
+ "src": "dmesg",
+ "dst": "dmesg.txt",
+ "max_run": 30
+ }
+ ],
+ "min_level": 3,
+ "max_level": 3,
+ "event_level": 2
+ },
+ {
+ "name": "Wifi Recovery",
+ "start_pattern": "0x([0-9a-zA-Z]+) \\| (ADVANCED_SYSASSERT|NMI_...)",
+ "end_pattern": "ieee80211 phy.: Hardware restart",
+ "max_items": 100,
+ "max_records": 2,
+ "flush_timeout": 120,
+ "data": [
+ {
+ "id": 0,
+ "format": "%2: %1"
+ }
+ ],
+ "attachments": [
+ {
+ "src": "/sys/module/iwlwifi/version",
+ "dst": "iwlwifi-version"
+ },
+ {
+ "exec": true,
+ "src": "dmesg",
+ "dst": "dmesg.txt"
+ }
+ ],
+ "min_level": 3,
+ "max_level": 6,
+ "event_level": 2
+ }
+ ]
+}
diff --git a/device.mk b/device.mk
new file mode 100755
index 0000000..bd8d71b
--- /dev/null
+++ b/device.mk
@@ -0,0 +1,243 @@
+#
+# Copyright 2014 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.
+#
+PRODUCT_PROPERTY_OVERRIDES := \
+ wifi.interface=wlan0 \
+ ro.opengles.version=196609
+
+PRODUCT_PACKAGES += \
+ memtrack.$(TARGET_BOARD_PLATFORM) \
+ WallpaperPicker \
+ Launcher3
+
+#enable this for support f2fs with data partion
+BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
+# This ensures the needed build tools are available.
+# TODO: make non-linux builds happy with external/f2fs-tool; system/extras/f2fs_utils
+ifeq ($(HOST_OS),linux)
+TARGET_USERIMAGES_USE_F2FS := true
+endif
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/rk3399_firefly_box/init.rc:root/init.rc
+#copy init.rc for tablet or box product
+#ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
+#PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/rk3399_box/init.rc:root/init.rc
+#else
+#ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), tablet)
+#PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/rk3399_32/init.rc:root/init.rc
+#endif
+#endif
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/init.${TARGET_BOARD_PLATFORM}.rc:root/init.${TARGET_BOARD_PLATFORM}.rc \
+ $(LOCAL_PATH)/init.${TARGET_BOARD_PLATFORM_PRODUCT}.rc:root/init.${TARGET_BOARD_PLATFORM_PRODUCT}.rc \
+ $(LOCAL_PATH)/debug/init.debug.rc:root/init.debug.rc \
+ $(LOCAL_PATH)/init.rk30board.usb.rc:root/init.rk30board.usb.rc \
+ $(LOCAL_PATH)/wake_lock_filter.xml:system/etc/wake_lock_filter.xml
+
+#fireware for dp
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/dptx.bin:root/lib/firmware/rockchip/dptx.bin
+
+#debug io bin
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/io:system/xbin/io
+#add su bin
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/su:system/xbin/su
+
+ifeq ($(BUILD_WITH_FORCEENCRYPT),true)
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/fstab.rk30board.bootmode.forceencrypt.unknown:root/fstab.rk30board.bootmode.unknown \
+ $(LOCAL_PATH)/fstab.rk30board.bootmode.forceencrypt.emmc:root/fstab.rk30board.bootmode.emmc \
+ $(LOCAL_PATH)/fstab.rk30board.bootmode.forceencrypt.nvme:root/fstab.rk30board.bootmode.nvme
+else
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/fstab.rk30board.bootmode.unknown:root/fstab.rk30board.bootmode.unknown \
+ $(LOCAL_PATH)/fstab.rk30board.bootmode.emmc:root/fstab.rk30board.bootmode.emmc \
+ $(LOCAL_PATH)/fstab.rk30board.bootmode.nvme:root/fstab.rk30board.bootmode.nvme
+endif
+# debug-logs
+ifeq ($(MIXIN_DEBUG_LOGS),true)
+ADDITIONAL_DEFAULT_PROPERTIES += ro.service.default_logfs=apklogfs
+ADDITIONAL_DEFAULT_PROPERTIES += ro.intel.logger=/system/vendor/bin/logcatext
+ADDITIONAL_DEFAULT_PROPERTIES += persist.intel.logger.rot_cnt=20
+ADDITIONAL_DEFAULT_PROPERTIES += persist.intel.logger.rot_size=5000
+BOARD_SEPOLICY_DIRS += $(local_path)/sepolicy/debug-logs
+BOARD_SEPOLICY_M4DEFS += module_debug_logs=true
+endif
+
+# debug-crashlogd
+ifeq ($(MIXIN_DEBUG_LOGS),true)
+
+CRASHLOGD_LOGS_PATH := "/data/logs"
+CRASHLOGD_APLOG := true
+CRASHLOGD_FULL_REPORT := true
+CRASHLOGD_MODULE_MODEM ?= true
+CRASHLOGD_MODULE_BTDUMP := true
+CRASHLOGD_USE_SD := false
+CRASHLOGD_ARCH := sofia
+endif
+
+# debug-coredump
+ifeq ($(MIXIN_DEBUG_LOGS),true)
+BOARD_SEPOLICY_DIRS += $(local_path)/sepolicy/coredump
+
+# Enable core dump for eng builds
+ifeq ($(TARGET_BUILD_VARIANT),eng)
+ADDITIONAL_DEFAULT_PROPERTIES += persist.core.enabled=1
+else
+ADDITIONAL_DEFAULT_PROPERTIES += persist.core.enabled=0
+endif
+CRASHLOGD_COREDUMP := true
+endif
+
+
+
+# debug-unresponsive
+ifneq ($(TARGET_BUILD_VARIANT),user)
+ADDITIONAL_DEFAULT_PROPERTIES += sys.dropbox.max_size_kb=4096
+
+ADDITIONAL_DEFAULT_PROPERTIES += sys.dump.binder_stats.uiwdt=1
+ADDITIONAL_DEFAULT_PROPERTIES += sys.dump.binder_stats.anr=1
+endif
+
+ifeq ($(MIXIN_DEBUG_LOGS),true)
+PRODUCT_COPY_FILES += $(LOCAL_PATH)/debug/init.logs.rc:root/init.logs.rc
+PRODUCT_PACKAGES += \
+ logcatext \
+ elogs.sh \
+ start_log_srv.sh \
+ logcat_ep.sh
+endif
+
+# debug-crashlogd
+ifeq ($(MIXIN_DEBUG_LOGS),true)
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/debug/init.crashlogd.rc:root/init.crashlogd.rc \
+ $(call add-to-product-copy-files-if-exists,$(LOCAL_PATH)/ingredients.conf:$(TARGET_COPY_OUT_VENDOR)/etc/ingredients.conf) \
+ $(call add-to-product-copy-files-if-exists,$(LOCAL_PATH)/crashlog.conf:$(TARGET_COPY_OUT_VENDOR)/etc/crashlog.conf)
+PRODUCT_PACKAGES += \
+ crashlogd \
+ dumpstate_dropbox.sh
+endif
+
+# debug-coredump
+ifeq ($(MIXIN_DEBUG_LOGS),true)
+PRODUCT_COPY_FILES += $(LOCAL_PATH)/debug/init.coredump.rc:root/init.coredump.rc
+endif
+
+# debug-phonedoctor
+ifeq ($(MIXIN_DEBUG_LOGS),true)
+# PRODUCT_PACKAGES += crash_package
+endif
+# debug-charging
+# make console and adb available in charging mode for eng and userdebug builds
+ifneq ($(TARGET_BUILD_VARIANT),user)
+PRODUCT_COPY_FILES += $(LOCAL_PATH)/debug/init.debug-charging.rc:root/init.debug-charging.rc
+endif
+
+# debug-kernel
+ifneq ($(TARGET_BUILD_VARIANT),user)
+PRODUCT_COPY_FILES += $(LOCAL_PATH)/debug/init.kernel.rc:root/init.kernel.rc
+endif
+
+# debug-log-watch
+ifneq ($(TARGET_BUILD_VARIANT),user)
+ifeq ($(MIXIN_DEBUG_LOGS),true)
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/debug/log-watch-kmsg.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/log-watch-kmsg.cfg \
+ $(LOCAL_PATH)/debug/init.log-watch.rc:root/init.log-watch.rc
+
+PRODUCT_PACKAGES += log-watch
+endif
+endif
+
+# config file for App alarm alignment
+ifeq ($(strip $(BOARD_USE_APP_ALARM_ALIGNMENT)),true)
+PRODUCT_COPY_FILES += \
+ device/rockchip/common/alarm_alignment_conf.xml:system/etc/alarm_alignment_conf.xml
+# Setup default value, SHOULD be the same as the value in alarm_alignment_conf.xml
+# In milli-second unit.
+# This value can (and will) be overwritten at runtime.
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.sys.alarm.fixed=300000
+endif
+
+# limit dex2oat threads to improve thermals
+PRODUCT_PROPERTY_OVERRIDES += \
+ dalvik.vm.boot-dex2oat-threads=2 \
+ dalvik.vm.dex2oat-threads=2 \
+ dalvik.vm.image-dex2oat-threads=2
+
+PRODUCT_COPY_FILES += \
+ device/rockchip/rk3399/package_performance.xml:system/etc/package_performance.xml
+
+PRODUCT_COPY_FILES += \
+ device/rockchip/rk3399/gps/gps.conf:system/etc/gps.conf \
+ device/rockchip/rk3399/gps/u-blox.conf:system/etc/u-blox.conf \
+ device/rockchip/rk3399/gps/lib64/gps.default.so:system/lib64/hw/gps.default.so \
+ device/rockchip/rk3399/gps/lib32/gps.default.so:system/lib/hw/gps.default.so \
+
+########################################################
+# this product has GPS or not
+########################################################
+ifeq ($(strip $(BOARD_HAS_GPS)),true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.factory.hasGPS=true
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml
+else
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.factory.hasGPS=false
+endif
+
+# setup dalvik vm configs.
+$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
+
+ifeq ($(BUILD_WITH_WIDEVINE),true)
+$(call inherit-product-if-exists, vendor/widevine/widevine.mk)
+endif
+
+$(call inherit-product-if-exists, vendor/rockchip/rk3399/device-vendor.mk)
+
+# Add product overlay
+PRODUCT_PACKAGE_OVERLAYS += $(TARGET_DEVICE_DIR)/overlay
+
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), tablet)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.rk.hdmi_enable=false
+endif
+
+ifeq ($(strip $(PRODUCT_SYSTEM_VERITY)), true)
+# add verity dependencies
+$(call inherit-product, build/target/product/verity.mk)
+PRODUCT_SUPPORTS_BOOT_SIGNER := false
+PRODUCT_SYSTEM_VERITY_PARTITION := /dev/block/platform/fe330000.sdhci/by-name/system
+
+# for warning
+PRODUCT_PACKAGES += \
+ slideshow \
+ verity_warning_images
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.software.verified_boot.xml:system/etc/permissions/android.software.verified_boot.xml
+endif
+
+PRODUCT_COPY_FILES += \
+ device/rockchip/rk3399/public.libraries.txt:system/vendor/etc/public.libraries.txt
diff --git a/dptx.bin b/dptx.bin
new file mode 100755
index 0000000..042ec48
--- /dev/null
+++ b/dptx.bin
Binary files differ
diff --git a/fstab.rk30board.bootmode.emmc b/fstab.rk30board.bootmode.emmc
new file mode 100755
index 0000000..9fbfaba
--- /dev/null
+++ b/fstab.rk30board.bootmode.emmc
@@ -0,0 +1,27 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+
+/dev/block/platform/fe330000.sdhci/by-name/system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,resize
+# use this line below instead to enable verity
+#/dev/block/platform/fe330000.sdhci/by-name/system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,check,verify
+/dev/block/platform/fe330000.sdhci/by-name/cache /cache ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check
+/dev/block/platform/fe330000.sdhci/by-name/metadata /metadata ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check
+/dev/block/platform/fe330000.sdhci/by-name/userdata /data f2fs noatime,nodiratime,nosuid,nodev,discard,inline_xattr wait,check,notrim,encryptable=/metadata/key_file
+#data for f2fs nobarrier
+#/dev/block/platform/fe330000.sdhci/by-name/userdata /data f2fs noatime,nodiratime,nosuid,nodev,discard,inline_xattr,nobarrier wait,check,notrim,encryptable=/metadata/key_file
+#data for ext4
+#/dev/block/platform/fe330000.sdhci/by-name/userdata /data ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard,errors=panic wait,check,encryptable=/metadata/key_file
+/dev/block/platform/fe330000.sdhci/by-name/misc /misc emmc defaults defaults
+# sdcard
+/devices/platform/fe320000.dwmmc/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
+
+# for usb2.0
+/devices/platform/*.usb* auto vfat defaults voldmanaged=usb:auto
+# for usb3.0
+/devices/platform/usb@*/*.dwc3* auto vfat defaults voldmanaged=usb:auto
+# pcie
+/devices/platform/*.pcie* auto vfat defaults voldmanaged=pcie:auto
+
+/dev/block/zram0 none swap defaults zramsize=533413200
diff --git a/fstab.rk30board.bootmode.forceencrypt.emmc b/fstab.rk30board.bootmode.forceencrypt.emmc
new file mode 100755
index 0000000..9adbfb9
--- /dev/null
+++ b/fstab.rk30board.bootmode.forceencrypt.emmc
@@ -0,0 +1,25 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+
+/dev/block/platform/fe330000.sdhci/by-name/system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,resize,verify=/dev/block/platform/fe330000.sdhci/by-name/verity_mode
+# use this line below instead to enable verity
+#/dev/block/platform/fe330000.sdhci/by-name/system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,check,verify
+/dev/block/platform/fe330000.sdhci/by-name/cache /cache ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check
+/dev/block/platform/fe330000.sdhci/by-name/metadata /metadata ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check
+/dev/block/platform/fe330000.sdhci/by-name/userdata /data f2fs noatime,nodiratime,nosuid,nodev,discard,inline_xattr wait,check,notrim,forceencrypt=/metadata/key_file
+#data for f2fs nobarrier
+#/dev/block/platform/fe330000.sdhci/by-name/userdata /data f2fs noatime,nodiratime,nosuid,nodev,discard,inline_xattr,nobarrier wait,check,notrim,forceencrypt=/metadata/key_file
+#data for ext4
+#/dev/block/platform/fe330000.sdhci/by-name/userdata /data ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard,errors=panic wait,check,forceencrypt=/metadata/key_file
+/dev/block/platform/fe330000.sdhci/by-name/misc /misc emmc defaults defaults
+# sdcard
+/devices/platform/fe320000.dwmmc/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
+
+# for usb2.0
+/devices/platform/*.usb* auto vfat defaults voldmanaged=usb:auto
+# for usb3.0
+/devices/platform/usb@*/*.dwc3* auto vfat defaults voldmanaged=usb:auto
+
+/dev/block/zram0 none swap defaults zramsize=533413200
diff --git a/fstab.rk30board.bootmode.forceencrypt.nvme b/fstab.rk30board.bootmode.forceencrypt.nvme
new file mode 100755
index 0000000..13475f1
--- /dev/null
+++ b/fstab.rk30board.bootmode.forceencrypt.nvme
@@ -0,0 +1,25 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+
+/dev/block/platform/f8000000.pcie/by-name/system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,resize,verify=/dev/block/platform/f8000000.pcie/by-name/verity_mode
+# use this line below instead to enable verity
+#/dev/block/platform/fe330000.sdhci/by-name/system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,check,verify
+/dev/block/platform/f8000000.pcie/by-name/cache /cache ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check
+/dev/block/platform/f8000000.pcie/by-name/metadata /metadata ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check
+/dev/block/platform/f8000000.pcie/by-name/userdata /data f2fs noatime,nodiratime,nosuid,nodev,discard,inline_xattr wait,check,notrim,forceencrypt=/metadata/key_file
+#data for f2fs nobarrier
+#/dev/block/platform/fe330000.sdhci/by-name/userdata /data f2fs noatime,nodiratime,nosuid,nodev,discard,inline_xattr,nobarrier wait,check,notrim,forceencrypt=/metadata/key_file
+#data for ext4
+#/dev/block/platform/fe330000.sdhci/by-name/userdata /data ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard,errors=panic wait,check,forceencrypt=/metadata/key_file
+/dev/block/platform/f8000000.pcie/by-name/misc /misc emmc defaults defaults
+# sdcard
+/devices/platform/fe320000.dwmmc/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
+
+# for usb2.0
+/devices/platform/*.usb* auto vfat defaults voldmanaged=usb:auto
+# for usb3.0
+/devices/platform/usb@*/*.dwc3* auto vfat defaults voldmanaged=usb:auto
+
+/dev/block/zram0 none swap defaults zramsize=533413200
diff --git a/fstab.rk30board.bootmode.forceencrypt.unknown b/fstab.rk30board.bootmode.forceencrypt.unknown
new file mode 100755
index 0000000..33a9066
--- /dev/null
+++ b/fstab.rk30board.bootmode.forceencrypt.unknown
@@ -0,0 +1,22 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+
+/dev/block/rknand_system /system ext4 ro,noatime,nodiratime,noauto_da_alloc,discard wait,resize
+# use this line below instead to enable verity
+#/dev/block/rknand_system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,check,verify
+/dev/block/rknand_cache /cache ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait
+/dev/block/rknand_metadata /metadata ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check
+/dev/block/rknand_userdata /data ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard,errors=panic wait,check,forceencrypt=/metadata/key_file
+
+/devices/ff0c0000.rksdmmc/mmc_host/mmc* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
+
+# non box product,configuration to the first item, will filter out left
+#58,54 support high speed & full speed;50 only support high speed, 5c only support full speed and must link hsic hub
+/devices/ff580000.usb* auto vfat defaults voldmanaged=usb:auto
+/devices/ff500000.usb* auto vfat defaults voldmanaged=usb:auto
+/devices/ff540000.usb* auto vfat defaults voldmanaged=usb:auto
+/devices/ff5c0000.usb* auto vfat defaults voldmanaged=usb:auto
+
+/dev/block/zram0 none swap defaults zramsize=533413200
diff --git a/fstab.rk30board.bootmode.nvme b/fstab.rk30board.bootmode.nvme
new file mode 100755
index 0000000..f1a92b7
--- /dev/null
+++ b/fstab.rk30board.bootmode.nvme
@@ -0,0 +1,25 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+
+/dev/block/platform/f8000000.pcie/by-name/system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,resize
+# use this line below instead to enable verity
+#/dev/block/platform/fe330000.sdhci/by-name/system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,check,verify
+/dev/block/platform/f8000000.pcie/by-name/cache /cache ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check
+/dev/block/platform/f8000000.pcie/by-name/metadata /metadata ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check
+/dev/block/platform/f8000000.pcie/by-name/userdata /data f2fs noatime,nodiratime,nosuid,nodev,discard,inline_xattr wait,check,notrim,encryptable=/metadata/key_file
+#data for f2fs nobarrier
+#/dev/block/platform/fe330000.sdhci/by-name/userdata /data f2fs noatime,nodiratime,nosuid,nodev,discard,inline_xattr,nobarrier wait,check,notrim,encryptable=/metadata/key_file
+#data for ext4
+#/dev/block/platform/fe330000.sdhci/by-name/userdata /data ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard,errors=panic wait,check,encryptable=/metadata/key_file
+/dev/block/platform/f8000000.pcie/by-name/misc /misc emmc defaults defaults
+# sdcard
+/devices/platform/fe320000.dwmmc/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
+
+# for usb2.0
+/devices/platform/*.usb* auto vfat defaults voldmanaged=usb:auto
+# for usb3.0
+/devices/platform/usb@*/*.dwc3* auto vfat defaults voldmanaged=usb:auto
+
+/dev/block/zram0 none swap defaults zramsize=533413200
diff --git a/fstab.rk30board.bootmode.unknown b/fstab.rk30board.bootmode.unknown
new file mode 100755
index 0000000..82068de
--- /dev/null
+++ b/fstab.rk30board.bootmode.unknown
@@ -0,0 +1,23 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+
+/dev/block/rknand_system /system ext4 ro,noatime,nodiratime,noauto_da_alloc,discard wait,resize
+# use this line below instead to enable verity
+#/dev/block/rknand_system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,check,verify
+/dev/block/rknand_cache /cache ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait
+/dev/block/rknand_metadata /metadata ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check
+/dev/block/rknand_userdata /data ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard,errors=panic wait,check,encryptable=/metadata/key_file
+/dev/block/rknand_misc /misc mtd defaults defaults
+
+/devices/ff0c0000.rksdmmc/mmc_host/mmc* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
+
+# non box product,configuration to the first item, will filter out left
+#58,54 support high speed & full speed;50 only support high speed, 5c only support full speed and must link hsic hub
+/devices/ff580000.usb* auto vfat defaults voldmanaged=usb:auto
+/devices/ff500000.usb* auto vfat defaults voldmanaged=usb:auto
+/devices/ff540000.usb* auto vfat defaults voldmanaged=usb:auto
+/devices/ff5c0000.usb* auto vfat defaults voldmanaged=usb:auto
+
+/dev/block/zram0 none swap defaults zramsize=533413200
diff --git a/gps/gps.conf b/gps/gps.conf
new file mode 100644
index 0000000..86af136
--- /dev/null
+++ b/gps/gps.conf
@@ -0,0 +1,83 @@
+###############################################################################
+#
+# Copyright (C) u-blox AG
+# u-blox AG, Thalwil, Switzerland
+#
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose without fee is hereby granted, provided that this entire notice
+# is included in all copies of any software which is or includes a copy
+# or modification of this software and in all copies of the supporting
+# documentation for such software.
+#
+# THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+# WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR U-BLOX MAKES ANY
+# REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+# OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+#
+###############################################################################
+#
+# Project: Android GNSS Driver
+#
+###############################################################################
+# $Id: gps.conf 82175 2014-06-18 15:18:01Z jon.bowern $
+# $HeadURL: http://svn.u-blox.ch/GPS/SOFTWARE/hmw/android/release/release_v2.3/gps/gps.conf $
+###############################################################################
+
+###############################################################################
+#
+# Configuration file for an Android GPS Driver
+#
+###############################################################################
+
+
+### Network Time Protocol (NTP) server
+
+NTP_SERVER=europe.pool.ntp.org
+# NTP_SERVER=uk.pool.ntp.org
+# NTP_SERVER=asia.pool.ntp.org
+# NTP_SERVER=oceania.pool.ntp.org
+# NTP_SERVER=north-america.pool.ntp.org
+# NTP_SERVER=south-america.pool.ntp.org
+# NTP_SERVER=africa.pool.ntp.org
+
+
+### AssistNow Offline (XTRA) Link
+
+XTRA_SERVER_1=http://alp.u-blox.com/current_7d.bin
+
+
+### AGPS SETTINGS ###
+
+# Secure User Plane Location (AGPS-SUPL) - TLS connection
+
+SUPL_HOST=supl.google.com
+SUPL_PORT=7275
+
+
+# Secure User Plane Location (AGPS-SUPL) - non-TLS connection
+
+#SUPL_HOST=supl.google.com
+#SUPL_PORT=7276
+
+
+# sls1.sirf.com 7275 7276
+# suplcn.sirf.com 7275 7276
+# supl.nokia.com 7275
+# supl.google.com 7275 7276
+# supl.sonyericsson.com 7275
+# lge.glpals.com
+# 130.141.44.135
+
+# uncomment and set the correct IP address for the SUPL test server
+#SUPL_HOST=10.64.4.69
+#SUPL_PORT=7275
+
+#SUPL_HOST=supl.google.com
+#SUPL_HOST=supl.nokia.com
+#SUPL_HOST=supl.sonyericsson.com
+#SUPL_HOST=sls1.sirf.com
+
+
+###############################################################################
diff --git a/gps/lib32/gps.default.so b/gps/lib32/gps.default.so
new file mode 100755
index 0000000..8a481ef
--- /dev/null
+++ b/gps/lib32/gps.default.so
Binary files differ
diff --git a/gps/lib64/gps.default.so b/gps/lib64/gps.default.so
new file mode 100755
index 0000000..472c435
--- /dev/null
+++ b/gps/lib64/gps.default.so
Binary files differ
diff --git a/gps/u-blox.conf b/gps/u-blox.conf
new file mode 100644
index 0000000..686b41d
--- /dev/null
+++ b/gps/u-blox.conf
@@ -0,0 +1,123 @@
+###############################################################################
+#
+# Copyright (C) u-blox AG
+# u-blox AG, Thalwil, Switzerland
+#
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose without fee is hereby granted, provided that this entire notice
+# is included in all copies of any software which is or includes a copy
+# or modification of this software and in all copies of the supporting
+# documentation for such software.
+#
+# THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+# WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR U-BLOX MAKES ANY
+# REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+# OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+#
+###############################################################################
+#
+# Project: Android GNSS Driver
+#
+###############################################################################
+# $Id: u-blox.conf 83773 2014-08-07 12:20:13Z marcel.baracchi $
+# $HeadURL: http://svn.u-blox.ch/GPS/SOFTWARE/hmw/android/release/release_v2.3/gps/u-blox.conf $
+###############################################################################
+
+
+###############################################################################
+#
+# u-blox Android GNSS Driver configuration file
+#
+###############################################################################
+
+
+### Serial interface
+# Device to be used by the driver
+SERIAL_DEVICE /dev/ttyS4
+#SERIAL_DEVICE /dev/s3c2410_serial2
+#SERIAL_DEVICE /dev/i2c-4
+#SERIAL_DEVICE /dev/ttyACM0
+
+# The baudrate that should be used to communicate with the receiver and at
+# which the receiver will output the NMEA messages.
+BAUDRATE 9600
+
+# The default baudrate the receiver is configured to after startup. The
+# HAL interface will configure itself to this baudrate and send a command
+# to the receiver to switch to the baudrate assigned to the BAUDRATE keyword
+BAUDRATE_DEF 9600
+
+### Assistance
+# File path and name for aiding information
+ALP_TEMP /data/aiding.ubx
+
+# Timeout for stopping the receiver [in seconds]
+STOP_TIMEOUT 5
+
+# AssistNow Offline (AGPS-XTRA) Link interval [in hours]
+XTRA_POLL_INTERVAL 20
+
+# AssistNow Online (AGPS-UBX) Link
+#UBX_HOST = agps.u-blox.com
+#UBX_PORT = 46434
+
+# Save aiding data to file system when engine stops
+PERSISTENCE 1
+
+### SUPL configuration
+# SUPL requests configuration
+SUPL_ALMANAC_REQUEST 0
+SUPL_UTC_MODEL_REQUEST 0
+SUPL_IONOSPHERIC_MODEL_REQUEST 1
+SUPL_DGPS_CORRECTIONS_REQUEST 0
+SUPL_REF_LOC_REQUEST 1
+SUPL_REF_TIME_REQUEST 1
+SUPL_AQUISITION_ASSIST_REQUEST 0
+SUPL_TIME_INTEGRITY_REQUEST 0
+SUPL_NAVIGATIONAL_MODEL_REQUEST 1
+
+# The SUPL_CACERT keyword enables a TLS encryption to the SUPL server.
+# It this keyword is missing, the communication will be unencrypted. If
+# no value is assigned to this keyword every CA certificate will be
+# accepted as valid. If a value is assigned to this keyword, this value
+# will be interpreted as the path to a ca-certificate file. If the
+# ca-certificate in this file does not match the root of the certificate
+# chain the connection will be aborted.
+#SUPL_CACERT /system/etc/ca-cert-google.pem
+SUPL_CACERT
+
+# uncomment the line below to use the certificate in SUPL test server
+# SUPL_CACERT /system/etc/v1_slp_rs_de_cert.pem
+
+# Number of retries for contacting the SUPL server
+SUPL_CONNECT_RETRIES 0
+
+# Maximum time to show the dialog for network initiated SUPL session [in seconds]
+SUPL_NI_UI_TIMEOUT 10
+
+# Maximum time for sending information to the SUPL server for network
+# initiated SUPL session [in seconds]
+SUPL_NI_RESPONSE_TIMEOUT 75
+
+
+### Debugging aids
+
+# Option to send fake mobile phone network information
+# leave this as 0 unless you are testing
+SUPL_FAKE_PHONE_CONNECTION 0
+
+# Port number for the UDP debug server
+UDP_SERVER_PORT 46434
+
+# save decoded RRLP and UPL data to logcat
+SUPL_LOG_MESSAGES 0
+
+# create CMCC compatible A-GPS.LOG and GPS.LOG
+SUPL_CMCC_LOGGING 0
+
+# save decoded RRLP and UPL data to file SUPL-MESSAGE.LOG
+SUPL_MSG_TO_FILE 0
+
+###############################################################################
diff --git a/init.box.rc b/init.box.rc
new file mode 100755
index 0000000..71a0b22
--- /dev/null
+++ b/init.box.rc
@@ -0,0 +1,30 @@
+on early-init
+ # raise cpu fre.
+ chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor performance
+ chmod 0644 /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor performance
+
+on property:sys.boot_completed=1
+ # recover cpu fre.
+ chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
+ chmod 0644 /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor interactive
+ # chmod switch usb mode node
+ chown system system /sys/kernel/debug/usb@fe800000/rk_usb_force_mode
+ chmod 0664 /sys/kernel/debug/usb@fe800000/rk_usb_force_mode
+
+on boot
+ # update cpusets feature nodes for rk3399 tablet
+ write /dev/cpuset/foreground/cpus 0-5
+ write /dev/cpuset/foreground/boost/cpus 0-5
+ write /dev/cpuset/background/cpus 0
+ write /dev/cpuset/system-background/cpus 0-3
+ write /dev/cpuset/top-app/cpus 0-5
+
+service media /system/bin/mediaserver
+ class main
+ user system
+ group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc mediadrm sdcard_rw media_rw system
+ ioprio rt 4
diff --git a/init.laptop.rc b/init.laptop.rc
new file mode 100755
index 0000000..776bc74
--- /dev/null
+++ b/init.laptop.rc
@@ -0,0 +1,27 @@
+on post-fs-data
+
+ #CABC
+ chown root system /sys/class/graphics/fb0/cabc
+ chmod 0664 /sys/class/graphics/fb0/cabc
+
+on init
+ # Load persistent dm-verity state
+ verity_load_state
+
+on verity-logging
+ exec u:r:slideshow:s0 -- /sbin/slideshow warning/verity_red_1 warning/verity_red_2
+
+on boot
+
+ # update cpusets feature nodes for rk3399 tablet
+ write /dev/cpuset/foreground/cpus 0-5
+ write /dev/cpuset/foreground/boost/cpus 0-5
+ write /dev/cpuset/background/cpus 0
+ write /dev/cpuset/system-background/cpus 0-3
+ write /dev/cpuset/top-app/cpus 0-5
+
+service media /system/bin/mediaserver
+ class main
+ user media
+ group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc mediadrm
+ ioprio rt 4
diff --git a/init.rk30board.usb.rc b/init.rk30board.usb.rc
new file mode 100755
index 0000000..1a0cca9
--- /dev/null
+++ b/init.rk30board.usb.rc
@@ -0,0 +1,79 @@
+on boot
+ mkdir /dev/usb-ffs 0770 shell shell
+ mkdir /dev/usb-ffs/adb 0770 shell shell
+ mount configfs none /config
+ mkdir /config/usb_gadget/g1 0770 shell shell
+ write /config/usb_gadget/g1/idVendor 0x2207
+ write /config/usb_gadget/g1/bcdDevice 0x0310
+ write /config/usb_gadget/g1/bcdUSB 0x0200
+ mkdir /config/usb_gadget/g1/strings/0x409 0770
+ write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+ write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
+ write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
+ mkdir /config/usb_gadget/g1/functions/accessory.gs2
+ mkdir /config/usb_gadget/g1/functions/audio_source.gs3
+ mkdir /config/usb_gadget/g1/functions/ffs.adb
+ mkdir /config/usb_gadget/g1/functions/mtp.gs0
+ mkdir /config/usb_gadget/g1/functions/ptp.gs1
+ mkdir /config/usb_gadget/g1/functions/rndis.gs4
+ write /config/usb_gadget/g1/functions/rndis.gs4/wceis 1
+ mkdir /config/usb_gadget/g1/functions/midi.gs5
+ mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell
+ mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
+ write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
+ write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
+ write /config/usb_gadget/g1/configs/b.1/MaxPower 500
+ symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
+ mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
+ setprop sys.usb.configfs 1
+ setprop sys.usb.controller "fe800000.dwc3"
+
+on property:sys.usb.config=none && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/os_desc/use 0
+ setprop sys.usb.ffs.ready 0
+
+on property:init.svc.adbd=stopped
+ setprop sys.usb.ffs.ready 0
+
+on property:sys.usb.config=mtp && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id "MTP"
+ write /config/usb_gadget/g1/os_desc/use 1
+ write /config/usb_gadget/g1/idProduct 0x0001
+
+on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id "MTP"
+ write /config/usb_gadget/g1/os_desc/use 1
+ write /config/usb_gadget/g1/idProduct 0x0011
+
+on property:sys.usb.config=rndis && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idProduct 0x0003
+
+on property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idProduct 0x0013
+
+on property:sys.usb.config=ptp && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/compatible_id "PTP"
+ write /config/usb_gadget/g1/os_desc/use 1
+ write /config/usb_gadget/g1/idProduct 0x0002
+
+on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/compatible_id "PTP"
+ write /config/usb_gadget/g1/os_desc/use 1
+ write /config/usb_gadget/g1/idProduct 0x0012
+
+on property:sys.usb.config=adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idProduct 0x0006
+
+on property:sys.usb.config=midi && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idProduct 0x0004
+
+on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idProduct 0x0014
+
+on property:sys.usb.config=accessory && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d00
+
+on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d01
diff --git a/init.rk3399.rc b/init.rk3399.rc
new file mode 100755
index 0000000..ea0e4f5
--- /dev/null
+++ b/init.rk3399.rc
@@ -0,0 +1,15 @@
+on init
+
+ chown root system /sys/bus/platform/drivers/rk3399-dmc-freq/dmc/devfreq/dmc/min_freq
+ chmod 0644 /sys/bus/platform/drivers/rk3399-dmc-freq/dmc/devfreq/dmc/min_freq
+ chown root system /sys/bus/platform/drivers/rk3399-dmc-freq/dmc/devfreq/dmc/max_freq
+ chmod 0644 /sys/bus/platform/drivers/rk3399-dmc-freq/dmc/devfreq/dmc/max_freq
+ chown root system /sys/bus/platform/drivers/rk3399-dmc-freq/dmc/devfreq/dmc/governor
+ chmod 0644 /sys/bus/platform/drivers/rk3399-dmc-freq/dmc/devfreq/dmc/governor
+
+ chown root system /sys/class/devfreq/ff9a0000.gpu/governor
+ chmod 0644 /sys/class/devfreq/ff9a0000.gpu/governor
+ chown root system /sys/class/devfreq/ff9a0000.gpu/min_freq
+ chmod 0644 /sys/class/devfreq/ff9a0000.gpu/min_freq
+ chown root system /sys/class/devfreq/ff9a0000.gpu/max_freq
+ chmod 0644 /sys/class/devfreq/ff9a0000.gpu/max_freq
diff --git a/init.tablet.rc b/init.tablet.rc
new file mode 100755
index 0000000..776bc74
--- /dev/null
+++ b/init.tablet.rc
@@ -0,0 +1,27 @@
+on post-fs-data
+
+ #CABC
+ chown root system /sys/class/graphics/fb0/cabc
+ chmod 0664 /sys/class/graphics/fb0/cabc
+
+on init
+ # Load persistent dm-verity state
+ verity_load_state
+
+on verity-logging
+ exec u:r:slideshow:s0 -- /sbin/slideshow warning/verity_red_1 warning/verity_red_2
+
+on boot
+
+ # update cpusets feature nodes for rk3399 tablet
+ write /dev/cpuset/foreground/cpus 0-5
+ write /dev/cpuset/foreground/boost/cpus 0-5
+ write /dev/cpuset/background/cpus 0
+ write /dev/cpuset/system-background/cpus 0-3
+ write /dev/cpuset/top-app/cpus 0-5
+
+service media /system/bin/mediaserver
+ class main
+ user media
+ group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc mediadrm
+ ioprio rt 4
diff --git a/init.vr.rc b/init.vr.rc
new file mode 100755
index 0000000..d214e20
--- /dev/null
+++ b/init.vr.rc
@@ -0,0 +1,27 @@
+on post-fs
+ insmod /system/lib/modules/rk_ovr.ko
+
+on boot
+
+ # update cpusets feature nodes for rk3399 vr
+ # reserve CPU 4-5 for the top-app(especially vr app rendering thread')
+ # We shoud make vr app's render thread available in top-app cpuset
+ write /dev/cpuset/foreground/cpus 0-3
+ write /dev/cpuset/foreground/boost/cpus 0-3
+ write /dev/cpuset/background/cpus 0
+ write /dev/cpuset/system-background/cpus 0-3
+ write /dev/cpuset/top-app/cpus 4-5
+ write /dev/cpuset/top-app/cpu_exclusive 1
+
+on property:sys.start_rkvrd=1
+ start rkvrd
+
+service media /system/bin/mediaserver
+ class main
+ user media
+ group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc mediadrm
+ ioprio rt 4
+
+service rkvrd /system/bin/rkvrd
+ class main
+ disabled
diff --git a/io b/io
new file mode 100755
index 0000000..7365344
--- /dev/null
+++ b/io
Binary files differ
diff --git a/javaenv.sh b/javaenv.sh
new file mode 100644
index 0000000..8b96c75
--- /dev/null
+++ b/javaenv.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
+
+export PATH=$JAVA_HOME/bin:$PATH
diff --git a/kernel/Image b/kernel/Image
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/kernel/Image
diff --git a/nand/drmboot.ko b/nand/drmboot.ko
new file mode 100755
index 0000000..df20f1c
--- /dev/null
+++ b/nand/drmboot.ko
Binary files differ
diff --git a/nand/rk30xxnand_ko.ko.3.10.0 b/nand/rk30xxnand_ko.ko.3.10.0
new file mode 100755
index 0000000..650c2a2
--- /dev/null
+++ b/nand/rk30xxnand_ko.ko.3.10.0
Binary files differ
diff --git a/ota/loader/misc_loadercmd.img b/ota/loader/misc_loadercmd.img
new file mode 100755
index 0000000..2d0320a
--- /dev/null
+++ b/ota/loader/misc_loadercmd.img
Binary files differ
diff --git a/ota/loader/readme b/ota/loader/readme
new file mode 100755
index 0000000..06c81a7
--- /dev/null
+++ b/ota/loader/readme
@@ -0,0 +1,2 @@
+将需要升级的loader,以RK*Loader*.bin格式放到device/rockchip/rk**/loader/目录下
+OTA打包时即会加入到升级包中。
diff --git a/ota/parameter/readme b/ota/parameter/readme
new file mode 100755
index 0000000..fdff466
--- /dev/null
+++ b/ota/parameter/readme
@@ -0,0 +1,14 @@
+涓銆佺洰鍓嶈胺姝屾爣鍑唎ta鍖呮柟寮忓崌绾ц兘鏀寔parameter鏇存柊锛屼絾鏈変竴浜涢檺鍒讹細
+
+1. 鏇存柊parameter鍙兘浣跨敤ota瀹屾暣鍖呭崌绾э紝涓嶆敮鎸佸樊寮傚崌绾arameter銆
+2. 鏍规嵁RK29 Parameter File Format Ver1.1.pdf 鎻忚堪锛宐ackup鍖轰笉鑳芥敼澶э紝鍙兘鏀瑰皬銆傚鏋滄兂鏀瑰ぇbackup鍖猴紝蹇呴』鎿﹂櫎idb锛屾墍浠ユ湰鏈哄崌绾т笉鑳藉幓鏀瑰ぇbackup鍖恒
+3. backup鍖轰互鍙婁箣鍓嶇殑鍒嗗尯澶у皬鍜屼綅缃笉鑳芥敼鍙樸備箣鍚庣殑鍒嗗尯鑳介殢鎰忔敼鍙樺拰澧炲姞鍒嗗尯銆
+4. user鍖哄彲鑳借鏀瑰彉锛屾墍浠ヤ笉鏀寔鍗囩骇鍖呮斁鍦ㄥ唴閮╢alsh鐨勫崌绾э紝鍙兘鏀惧湪澶栭儴sd鍗″崌绾с傛垨鑰呰兘淇濊瘉鍏舵墍鍦ㄥ垎鍖轰綅缃ぇ灏忎笉鍙樸
+5. recovery鍖虹殑鍦板潃涓嶈兘鏀瑰彉锛屽惁鍒欓噸鍚悗灏辨壘涓嶅埌recovery浜嗭紱
+
+浜屻乸arameter鍗囩骇鎿嶄綔姝ラ
+
+1. 鎷疯礉鏈鏂扮殑parameter鏂囦欢鍒癲evice/rockchip/rk**/parameter/鐩綍涓嬶紝浠arameter鍚嶇О寮澶村嵆鍙紝濡俻arameter_sdk銆傝鐩綍涓嬪彧鑳藉瓨鍦ㄤ竴涓猵arameter鏂囦欢銆
+2. make otapackage 缂栬瘧ota瀹屾暣鍖
+3. 鎷疯礉鍒皊d鍗℃垨flash鏍圭洰褰曚笅閲嶅懡鍚島pdate.zip绯荤粺鑳借嚜鍔ㄦ娴嬪埌璇ュ崌绾у寘锛岃兘鑷姩瀹屾垚鍗囩骇銆傚崌绾ц繃绋嬩腑鍏堢儳鍐欐柊鐨刾arameter锛岀劧鍚庝細閲嶅惎涓娆★紝鎺ョ潃缁х画鏇存柊鍏朵粬閮ㄥ垎銆
+
diff --git a/package_performance.xml b/package_performance.xml
new file mode 100755
index 0000000..5f8b43f
--- /dev/null
+++ b/package_performance.xml
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<performance-package>
+<app package="com.antutu.ABenchMark" mode="1"/>
+<app package="com.antutu.benchmark.full" mode="1"/>
+</performance-package>
diff --git a/preinstall/Android.mk b/preinstall/Android.mk
new file mode 100644
index 0000000..8338432
--- /dev/null
+++ b/preinstall/Android.mk
@@ -0,0 +1,2 @@
+include $(call all-subdir-makefiles)
+
diff --git a/preinstall/README.txt b/preinstall/README.txt
new file mode 100644
index 0000000..d5cda04
--- /dev/null
+++ b/preinstall/README.txt
@@ -0,0 +1 @@
+棰勭疆涓嶅彲鍗歌浇apk 灏哸pk鏂囦欢鏀剧疆璇ョ洰褰曞嵆鍙 apk鏈濂戒笉甯︿腑鏂
diff --git a/preinstall/preinstall.mk b/preinstall/preinstall.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/preinstall/preinstall.mk
diff --git a/preinstall_del/Android.mk b/preinstall_del/Android.mk
new file mode 100644
index 0000000..8338432
--- /dev/null
+++ b/preinstall_del/Android.mk
@@ -0,0 +1,2 @@
+include $(call all-subdir-makefiles)
+
diff --git a/preinstall_del/README.txt b/preinstall_del/README.txt
new file mode 100644
index 0000000..3817064
--- /dev/null
+++ b/preinstall_del/README.txt
@@ -0,0 +1 @@
+棰勭疆鍙嵏杞絘pk (鎭㈠鍑哄巶璁剧疆鍙仮澶) 灏哸pk鏂囦欢鏀剧疆璇ョ洰褰曞嵆鍙 apk鏈濂戒笉甯︿腑鏂
diff --git a/preinstall_del/preinstall.mk b/preinstall_del/preinstall.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/preinstall_del/preinstall.mk
diff --git a/preinstall_del_forever/Android.mk b/preinstall_del_forever/Android.mk
new file mode 100644
index 0000000..8338432
--- /dev/null
+++ b/preinstall_del_forever/Android.mk
@@ -0,0 +1,2 @@
+include $(call all-subdir-makefiles)
+
diff --git a/preinstall_del_forever/README.txt b/preinstall_del_forever/README.txt
new file mode 100644
index 0000000..127dd25
--- /dev/null
+++ b/preinstall_del_forever/README.txt
@@ -0,0 +1 @@
+棰勭疆鍙嵏杞絘pk (鎭㈠鍑哄巶璁剧疆涓嶅彲鎭㈠) 灏哸pk鏂囦欢鏀剧疆璇ョ洰褰曞嵆鍙 apk鏈濂戒笉甯︿腑鏂
diff --git a/preinstall_del_forever/preinstall.mk b/preinstall_del_forever/preinstall.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/preinstall_del_forever/preinstall.mk
diff --git a/product.mk b/product.mk
new file mode 100755
index 0000000..2ef938f
--- /dev/null
+++ b/product.mk
@@ -0,0 +1,23 @@
+# Copyright (C) 2014 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.
+
+#
+# This file is the build configuration that is shared by all products
+# based on the rk3399 device
+#
+PRODUCT_RUNTIMES := runtime_libart_default
+
+$(call inherit-product, device/rockchip/rk3399/device.mk)
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
diff --git a/product_32_only.mk b/product_32_only.mk
new file mode 100755
index 0000000..1610af6
--- /dev/null
+++ b/product_32_only.mk
@@ -0,0 +1,27 @@
+# Copyright (C) 2014 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.
+
+#
+# This file is the build configuration that is shared by all products
+# based on the rk3399_32 device
+#
+PRODUCT_RUNTIMES := runtime_libart_default
+
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
+ ro.zygote=zygote32
+PRODUCT_COPY_FILES += \
+ system/core/rootdir/init.zygote32.rc:root/init.zygote32.rc
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.carrier=unknown
diff --git a/product_64_only.mk b/product_64_only.mk
new file mode 100755
index 0000000..9099dee
--- /dev/null
+++ b/product_64_only.mk
@@ -0,0 +1,30 @@
+# Copyright (C) 2014 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.
+
+#
+# This file is the build configuration that is shared by all products
+# based on the rockchip rk3399 device that want only a 64-bit zygote (no
+# 32-bit app support)
+#
+
+# Make sure we have the 64b zygote service
+PRODUCT_COPY_FILES += system/core/rootdir/init.zygote64.rc:root/init.zygote64.rc
+
+# Use 64b single zygote
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote64
+
+# Disable bluetooth because of continuous driver crashes
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += config.disable_bluetooth=true
+
+$(call inherit-product, device/rockchip/rk3399/product.mk)
diff --git a/public.libraries.txt b/public.libraries.txt
new file mode 100644
index 0000000..7fa1adc
--- /dev/null
+++ b/public.libraries.txt
@@ -0,0 +1 @@
+libGLES_mali.so
diff --git a/puma.mk b/puma.mk
new file mode 100755
index 0000000..508bd1b
--- /dev/null
+++ b/puma.mk
@@ -0,0 +1,46 @@
+#
+# Copyright 2014 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.
+#
+
+$(call inherit-product, $(LOCAL_PATH)/rk3399.mk)
+# $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+$(call inherit-product, device/rockchip/common/tv/tv_base.mk)
+
+PRODUCT_CHARACTERISTICS := box
+
+PRODUCT_BRAND := Android
+PRODUCT_MANUFACTURER := TheobromaSystems
+PRODUCT_NAME := puma
+PRODUCT_DEVICE := puma
+PRODUCT_MODEL := AOSP on RK3399-Q7
+
+PRODUCT_AAPT_CONFIG := normal tvdpi hdpi
+PRODUCT_AAPT_PREF_CONFIG := tvdpi
+
+# debug-logs
+ifneq ($(TARGET_BUILD_VARIANT),user)
+MIXIN_DEBUG_LOGS := true
+endif
+
+#for drm widevine
+BUILD_WITH_WIDEVINE := true
+
+PRODUCT_LOCALES := en_US cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_NZ es_ES fr_CA fr_CH fr_BE fr_FR it_CH it_IT nb_NO nl_BE nl_NL pl_PL pt_PT ru_RU sk_SK sv_SE tr_TR
+
+#PRODUCT_PACKAGES += \
+# Telecom \
+# TeleService \
+# TelephonyProvider \
+# MmsService
diff --git a/recovery.emmc.fstab b/recovery.emmc.fstab
new file mode 100755
index 0000000..b880ef7
--- /dev/null
+++ b/recovery.emmc.fstab
@@ -0,0 +1,21 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+/dev/block/platform/fe330000.sdhci/by-name/user /mnt/internal_sd vfat defaults defaults
+/dev/block/mmcblk0p1 /mnt/external_sd vfat /dev/block/mmcblk0 defaults
+/dev/block/platform/fe330000.sdhci/by-name/system /system ext4 defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/cache /cache ext4 defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/metadata /metadata ext4 defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/userdata /data f2fs defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/cust /cust ext4 defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/custom /custom ext4 defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/misc /misc emmc defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/uboot /uboot emmc defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/charge /charge emmc defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/resource /resource emmc defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/parameter /parameter emmc defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/boot /boot emmc defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/recovery /recovery emmc defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/backup /backup emmc defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/trust /trust emmc defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/baseparamer /baseparamer emmc defaults defaults
+/dev/block/platform/fe330000.sdhci/by-name/frp /frp emmc defaults defaults
diff --git a/rk3399.mk b/rk3399.mk
new file mode 100755
index 0000000..46c6625
--- /dev/null
+++ b/rk3399.mk
@@ -0,0 +1,47 @@
+#
+# Copyright 2014 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.
+
+#
+# This file is the build configuration for an aosp Android
+# build for rockchip rk3399 hardware. This cleanly combines a set of
+# device-specific aspects (drivers) with a device-agnostic
+# product configuration (apps). Except for a few implementation
+# details, it only fundamentally contains two inherit-product
+# lines, aosp and rk3399, hence its name.
+
+include device/theobromasystems/puma/BoardConfig.mk
+
+# Inherit from those products. Most specific first.
+$(call inherit-product, device/rockchip/rk3399/product.mk)
+$(call inherit-product, device/rockchip/common/device.mk)
+
+PRODUCT_CHARACTERISTICS := tablet
+PRODUCT_SHIPPING_API_LEVEL :=25
+
+# Live Wallpapers
+PRODUCT_PACKAGES += \
+ rild \
+ Launcher3
+
+PRODUCT_NAME := rk3399
+PRODUCT_DEVICE := rk3399
+PRODUCT_BRAND := Android
+PRODUCT_MODEL := rk3399
+PRODUCT_MANUFACTURER := rockchip
+
+
+# Get the long list of APNs
+PRODUCT_COPY_FILES += vendor/rockchip/common/phone/etc/apns-full-conf.xml:system/etc/apns-conf.xml
+PRODUCT_COPY_FILES += vendor/rockchip/common/phone/etc/spn-conf.xml:system/etc/spn-conf.xml
diff --git a/rk3399_firefly_edp_box/BoardConfig.mk b/rk3399_firefly_edp_box/BoardConfig.mk
new file mode 100755
index 0000000..b1fde38
--- /dev/null
+++ b/rk3399_firefly_edp_box/BoardConfig.mk
@@ -0,0 +1,42 @@
+include device/rockchip/rk3399/BoardConfig.mk
+
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-a
+TARGET_CPU_ABI := arm64-v8a
+TARGET_CPU_ABI2 :=
+TARGET_CPU_VARIANT := cortex-a53
+TARGET_CPU_SMP := true
+
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv7-a-neon
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+TARGET_2ND_CPU_VARIANT := cortex-a15
+
+# Re-enable emulator for 32-bit
+BUILD_EMULATOR := false
+
+TARGET_BOARD_PLATFORM_PRODUCT := box
+
+# Set system.img size
+ifeq ($(strip $(BUILD_BOX_WITH_GOOGLE_MARKET)), true)
+ BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1500000000
+else
+ ifeq ($(TARGET_BUILD_VARIANT),user)
+ BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1500000000
+ else
+ BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1200000000
+ endif
+endif
+
+# Enable dex-preoptimization to speed up first boot sequence
+ifeq ($(HOST_OS),linux)
+ ifeq ($(TARGET_BUILD_VARIANT),user)
+ WITH_DEXPREOPT := true
+ else
+ WITH_DEXPREOPT := false
+ endif
+endif
+
+BOARD_SENSOR_MPU := true
+BOARD_SENSOR_MPU_VR := false
diff --git a/rk3399_firefly_edp_box/overlay/frameworks/base/core/res/res/values/config.xml b/rk3399_firefly_edp_box/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..972cb9f
--- /dev/null
+++ b/rk3399_firefly_edp_box/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<resources>
+ <!-- If true, the screen can be rotated via the accelerometer in all 4
+ rotations as the default behavior. -->
+ <bool name="config_allowAllRotations">true</bool>
+
+ <!-- If true, enables auto-rotation features using the accelerometer.
+ Otherwise, auto-rotation is disabled. Applications may still request
+ to use specific orientations but the sensor is ignored and sensor-based
+ orientations are not available. Furthermore, all auto-rotation related
+ settings are omitted from the system UI. In certain situations we may
+ still use the accelerometer to determine the orientation, such as when
+ docked if the dock is configured to enable the accelerometer. -->
+ <bool name="config_supportAutoRotation">true</bool>
+
+</resources>
diff --git a/rk3399_firefly_edp_box/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/rk3399_firefly_edp_box/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
new file mode 100644
index 0000000..4e68b61
--- /dev/null
+++ b/rk3399_firefly_edp_box/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<resources>
+
+ <!-- Do not enable auto rotation switching -->
+ <bool name="def_accelerometer_rotation">true</bool>
+
+ <!-- Keep screen on at all times by default -->
+ <bool name="def_stay_on_while_plugged_in">false</bool>
+</resources>
diff --git a/rk3399_firefly_edp_box/parameter.txt b/rk3399_firefly_edp_box/parameter.txt
new file mode 100755
index 0000000..1f0b846
--- /dev/null
+++ b/rk3399_firefly_edp_box/parameter.txt
@@ -0,0 +1,15 @@
+FIRMWARE_VER: 7.1.1
+MACHINE_MODEL: rk3399-box
+MACHINE_ID: 007
+MANUFACTURER: RK3399
+MAGIC: 0x5041524B
+ATAG: 0x00200800
+MACHINE: 3399
+CHECK_MASK: 0x80
+PWR_HLD: 0,0,A,0,1
+#KERNEL_IMG: 0x00280000
+#FDT_NAME: rk-kernel.dtb
+#RECOVER_KEY: 1,1,0,20,0
+#in section; per section 512(0x200) bytes
+CMDLINE: androidboot.baseband=N/A androidboot.selinux=permissive androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init mtdparts=rk29xxnand:0x00002000@0x00002000(uboot),0x00002000@0x00004000(trust),0x00002000@0x00006000(misc),0x00008000@0x00008000(resource),0x0000C000@0x00010000(kernel),0x00010000@0x0001C000(boot),0x00010000@0x0002C000(recovery),0x00038000@0x0003C000(backup),0x00040000@0x00074000(cache),0x00300000@0x000B4000(system),0x00008000@0x003B4000(metadata),0x00002000@0x003BC000(baseparamer),-@0x003BE000(userdata)
+
diff --git a/rk3399_firefly_edp_box/parameter_system_3.0G.txt b/rk3399_firefly_edp_box/parameter_system_3.0G.txt
new file mode 100755
index 0000000..5fd97f4
--- /dev/null
+++ b/rk3399_firefly_edp_box/parameter_system_3.0G.txt
@@ -0,0 +1,15 @@
+FIRMWARE_VER: 7.1.1
+MACHINE_MODEL: rk3399-box
+MACHINE_ID: 007
+MANUFACTURER: RK3399
+MAGIC: 0x5041524B
+ATAG: 0x00200800
+MACHINE: 3399
+CHECK_MASK: 0x80
+PWR_HLD: 0,0,A,0,1
+#KERNEL_IMG: 0x00280000
+#FDT_NAME: rk-kernel.dtb
+#RECOVER_KEY: 1,1,0,20,0
+#in section; per section 512(0x200) bytes
+CMDLINE: androidboot.baseband=N/A androidboot.selinux=permissive androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init mtdparts=rk29xxnand:0x00002000@0x00002000(uboot),0x00002000@0x00004000(trust),0x00002000@0x00006000(misc),0x00008000@0x00008000(resource),0x0000C000@0x00010000(kernel),0x00010000@0x0001C000(boot),0x00010000@0x0002C000(recovery),0x00038000@0x0003C000(backup),0x00040000@0x00074000(cache),0x00600000@0x000B4000(system),0x00008000@0x006B4000(metadata),0x00002000@0x006BC000(baseparamer),-@0x006BE000(userdata)
+
diff --git a/rk3399_firefly_edp_box/system.prop b/rk3399_firefly_edp_box/system.prop
new file mode 100755
index 0000000..e6f7bcb
--- /dev/null
+++ b/rk3399_firefly_edp_box/system.prop
@@ -0,0 +1,53 @@
+#
+# system.prop
+#
+
+#rild.libpath=/system/lib/libreference-ril.so
+#rild.libargs=-d /dev/ttyUSB2
+# Default ecclist
+ro.ril.ecclist=112,911
+ro.opengles.version = 196609
+wifi.interface=wlan0
+persist.tegra.nvmmlite = 1
+persist.sys.boot.check=false
+ro.audio.monitorOrientation=true
+
+#NFC
+debug.nfc.fw_download=false
+debug.nfc.se=false
+
+#add Rockchip properties here
+ro.rk.screenoff_time=2147483647
+ro.rk.screenshot_enable=true
+ro.rk.def_brightness=200
+ro.rk.homepage_base=http://www.t-firefly.com/zh/
+ro.rk.install_non_market_apps=true
+sys.hwc.compose_policy=6
+sys.wallpaper.rgb565=0
+sf.power.control=8847360
+sys.rkadb.root=0
+ro.sf.fakerotation=false
+ro.sf.hwrotation=0
+ro.rk.MassStorage=false
+ro.rk.systembar.voiceicon=true
+ro.rk.systembar.tabletUI=false
+ro.rk.LowBatteryBrightness=true
+ro.tether.denied=false
+sys.resolution.changed=false
+ro.default.size=100
+persist.sys.timezone=
+ro.product.usbfactory=rockchip_usb
+ro.support.lossless.bitstream=true
+wifi.supplicant_scan_interval=15
+ro.factory.tool=0
+#set default lcd density for rk3399 box product
+ro.sf.lcd_density=320
+ro.adb.secure =0
+ro.rk.statusbar=0
+# set to false if not use displayd
+ro.rk.displayd.enable=false
+
+ro.ff.sensor.enable=true
+
+# default main framebuffer resolution
+persist.sys.framebuffer.main=0@60
diff --git a/su b/su
new file mode 100755
index 0000000..276877b
--- /dev/null
+++ b/su
Binary files differ
diff --git a/system.prop b/system.prop
new file mode 100755
index 0000000..0e3a6a9
--- /dev/null
+++ b/system.prop
@@ -0,0 +1,42 @@
+#
+# system.prop
+#
+
+#rild.libpath=/system/lib/libreference-ril.so
+#rild.libargs=-d /dev/ttyUSB2
+# Default ecclist
+ro.ril.ecclist=112,911
+ro.opengles.version = 196609
+wifi.interface=wlan0
+persist.tegra.nvmmlite = 1
+ro.audio.monitorOrientation=true
+
+#NFC
+debug.nfc.fw_download=false
+debug.nfc.se=false
+
+#add Rockchip properties here
+ro.rk.screenshot_enable=true
+ro.rk.def_brightness=200
+ro.rk.homepage_base=http://www.google.com/webhp?client={CID}&amp;source=android-home
+ro.rk.install_non_market_apps=false
+sys.hwc.compose_policy=6
+sys.wallpaper.rgb565=0
+sf.power.control=8847360
+sys.rkadb.root=0
+ro.sf.fakerotation=false
+ro.sf.hwrotation=0
+ro.rk.MassStorage=false
+ro.rk.systembar.voiceicon=true
+ro.rk.systembar.tabletUI=false
+ro.rk.LowBatteryBrightness=true
+ro.tether.denied=false
+sys.resolution.changed=false
+ro.default.size=100
+persist.sys.timezone=
+ro.product.usbfactory=rockchip_usb
+wifi.supplicant_scan_interval=15
+ro.factory.tool=0
+#set default lcd density for rk3399 tablet
+ro.sf.lcd_density=240
+ro.adb.secure =0
diff --git a/vendorsetup.sh b/vendorsetup.sh
new file mode 100755
index 0000000..ffd8ce9
--- /dev/null
+++ b/vendorsetup.sh
@@ -0,0 +1 @@
+add_lunch_combo puma-userdebug
diff --git a/wake_lock_filter.xml b/wake_lock_filter.xml
new file mode 100644
index 0000000..fec1776
--- /dev/null
+++ b/wake_lock_filter.xml
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<wakelock-package>
+<app package="com.google.android.gms"/>
+<!--
+<app package="com.google.android.youtube"/>
+<app package="com.android.vending"/>
+<app package="com.google.android.partnersetup"/>
+-->
+</wakelock-package>
diff --git a/wifi_bt.mk b/wifi_bt.mk
new file mode 100755
index 0000000..6d53792
--- /dev/null
+++ b/wifi_bt.mk
@@ -0,0 +1,43 @@
+#
+# wifi bt config
+#
+
+#
+# BOARD_CONNECTIVITY_VENDOR:
+# for broadcom, realteck wifi, bt
+# Broadcom:
+# rk90x,
+# ap6xxx,
+# ap6xxx_gps, #like ap6476
+# ap6xxx_nfc, #like ap6441 & ap6493
+#
+# for mtk wifi, bt
+# MediaTek:
+# combo_mt66xx,
+# mt5931_6622,
+#
+# for realtek wifi, bt & rda587x bt
+# RealTek:
+#
+# rtl81xx, #only wifi
+# rtl8723as, #like rtl8723as sdio
+# rtl8723bs, #like rtl8723bs sdio
+# rtl8723au, #like rtl8723au usb
+# rtl8723bu, #like rtl8723bu usb
+# rda587x, #like rtl8188+rda587x
+# mt6622, #like rtl8188+mt6622
+#
+# for Espressif wifi & Beken bt
+# Espressif:
+# esp8089_bk3515,
+# esp8089, #only wifi
+# mt6622, #like esp8089+mt6622
+# rda587x, #like esp8089+rda587x
+#
+# MediaTek_mt7601:
+# mt7601 #only wifi
+# rda587x, #like rtl8188+rda587x
+# mt6622, #like rtl8188+mt6622
+#
+BOARD_CONNECTIVITY_VENDOR := Broadcom
+BOARD_CONNECTIVITY_MODULE := ap6xxx