summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-08-23 20:44:04 +0200
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-08-23 20:44:04 +0200
commit119af01f51cfbc9e5219514ff01875894c106389 (patch)
tree495a1d6a8dc66a78227811db356857bac75e9c9d
parent3ae35a963041f9d4e9e73d337319083d79546324 (diff)
Import of Rockchip Android 7.1.1 SDK
-rwxr-xr-x.classpath184
-rwxr-xr-x.gitignore41
-rwxr-xr-x20050030_pwm.kl29
-rw-r--r--Android.mk3
-rw-r--r--AndroidProducts.mk18
-rwxr-xr-xBoardConfig.mk319
-rw-r--r--alarm_alignment_conf.xml89
-rw-r--r--alarm_filter.xml14
-rwxr-xr-xaudio_policy_px5car.conf109
-rwxr-xr-xaudio_policy_rk30board.conf109
-rw-r--r--audio_policy_sofiaboard.conf86
-rw-r--r--auto_generator.py134
-rw-r--r--bluetooth/bdroid_buildcfg.h24
-rwxr-xr-xboot_boost/libboot_optimization.sobin0 -> 79168 bytes
-rw-r--r--boot_boost/prescan_packages.xml23
-rwxr-xr-xbootshutdown/bootshutdown.mk11
-rwxr-xr-xbugreport.sh23
-rwxr-xr-xbuild.sh7
-rwxr-xr-xbuild_wifi_ko.sh25
-rw-r--r--buildspec-rk3036.mk115
-rw-r--r--buildspec-rk312x.mk114
-rw-r--r--buildspec-rk3288.mk114
-rw-r--r--buildspec.mk111
-rw-r--r--common.mk13
-rwxr-xr-xdevice.mk679
-rwxr-xr-xdumpstate/Android.mk30
-rw-r--r--dumpstate/NOTICE190
-rwxr-xr-xdumpstate/dumpstate.cpp35
-rwxr-xr-xff420030_pwm.kl30
-rwxr-xr-xff680030_pwm.kl29
-rw-r--r--fstab.rk30board.bootmode.emmc31
-rw-r--r--fstab.rk30board.bootmode.unknown30
-rw-r--r--health/Android.mk33
-rw-r--r--health/bat_cap.cpp140
-rw-r--r--health/healthd-rockchip.cpp279
-rw-r--r--init.box.samba.rc18
-rwxr-xr-xinit.connectivity.rc175
-rw-r--r--init.rk30board.bootmode.emmc.rc7
-rw-r--r--init.rk30board.bootmode.nvme.rc7
-rw-r--r--init.rk30board.bootmode.unknown.rc9
-rwxr-xr-xinit.rk30board.rc304
-rw-r--r--init.rk30board.usb.rc162
-rw-r--r--init.rockchip.hasCDROM.true.rc9
-rw-r--r--init.rockchip.hasUMS.false.rc2
-rw-r--r--init.rockchip.hasUMS.true.rc2
-rwxr-xr-xinit.rockchip.rc194
-rw-r--r--init.sofiaboard.rc360
-rw-r--r--init.sofiaboard.usb.rc170
-rwxr-xr-xinitlogo.rlebin0 -> 27288 bytes
-rw-r--r--javaenv.sh6
-rwxr-xr-xloader/misc_loadercmd.imgbin0 -> 49152 bytes
-rw-r--r--lowmem_package_filter.xml104
-rw-r--r--media_profiles_default.xml679
-rwxr-xr-xmkimage.sh233
-rwxr-xr-xmkimage_verity.sh112
-rwxr-xr-xneon_transform/lib/librockchipxxx.sobin0 -> 14004 bytes
-rwxr-xr-xneon_transform/lib64/librockchipxxx.sobin0 -> 6208 bytes
-rw-r--r--nfc/libnfc-brcm-20791b03.conf65
-rw-r--r--nfc/libnfc-brcm-20791b04.conf73
-rw-r--r--nfc/libnfc-brcm-20791b05.conf61
-rw-r--r--nfc/libnfc-brcm-43341b00.conf57
-rw-r--r--nfc/libnfc-brcm.conf260
-rw-r--r--nfc/nfcee_access.xml11
-rw-r--r--nfc/nfcee_access_debug.xml17
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml31
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc005/config.xml27
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc012/config.xml27
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc026/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc030/config.xml47
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc070/config.xml47
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc090/config.xml47
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc150/config.xml47
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc160/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc170/config.xml41
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc200/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc210/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc220/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc230/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc240/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc250/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml33
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc270/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc280/config.xml47
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc290/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc310/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc330/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc380/config.xml41
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml51
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc490/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc560/config.xml47
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc580/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc660/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc680/config.xml47
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc800/config.xml28
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc980/config.xml47
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc310-mnc990/config.xml47
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc311-mnc180/config.xml47
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml31
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc311-mnc481/config.xml27
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc311-mnc482/config.xml27
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc311-mnc483/config.xml27
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc311-mnc484/config.xml27
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc311-mnc485/config.xml27
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc311-mnc486/config.xml27
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc311-mnc487/config.xml27
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc311-mnc488/config.xml27
-rw-r--r--overlay/frameworks/base/core/res/res/values-mcc311-mnc489/config.xml27
-rw-r--r--overlay/frameworks/base/core/res/res/values/config.xml231
-rwxr-xr-xoverlay/frameworks/base/core/res/res/values/strings.xml21
-rw-r--r--overlay/frameworks/base/core/res/res/xml/power_profile.xml152
-rw-r--r--overlay/frameworks/base/packages/SystemUI/res/values/config.xml26
-rw-r--r--overlay/packages/apps/Bluetooth/res/values/config.xml32
-rwxr-xr-xoverlay/packages/apps/Settings/res/values/bools.xml20
-rw-r--r--overlay/packages/services/Telephony/res/values/config.xml22
-rw-r--r--overlay_screenoff/frameworks/base/packages/SettingsProvider/res/values/defaults.xml26
-rwxr-xr-xparameter/readme14
-rwxr-xr-xperformance_info.xml4
-rw-r--r--prebuild.mk5
-rw-r--r--preinstall.mk0
-rwxr-xr-xpreinstall_cleanup.sh5
-rw-r--r--prescan_packages.xml23
-rw-r--r--radical_update/certs/radical_update.x509.pem27
-rw-r--r--recovery.emmc.fstab21
-rw-r--r--recovery.fstab21
-rwxr-xr-xrecovery.nvme.fstab21
-rw-r--r--recovery/Android.mk13
-rw-r--r--recovery/etc/init.bootmode.emmc.rc5
-rw-r--r--recovery/etc/init.bootmode.unknown.rc4
-rw-r--r--recovery/etc/init.rc126
-rwxr-xr-xrecovery/recovery_ui.cpp118
-rw-r--r--recovery/res/README0
-rwxr-xr-xrecovery_contents.sh34
-rwxr-xr-xreleasetools.py214
-rw-r--r--rk29-keypad.kl10
-rwxr-xr-xsamba/bin/rksmbdbin0 -> 17914396 bytes
-rwxr-xr-xsamba/bin/rksmbpasswdbin0 -> 3006916 bytes
-rwxr-xr-xsamba/bin/stopsamba.sh6
-rwxr-xr-xsamba/etc/smb.conf48
-rwxr-xr-xsamba/etc/smbpasswd1
-rwxr-xr-xsamba/etc/smbusers1
-rwxr-xr-xsamba/rk31_samba.mk8
-rwxr-xr-xsepolicy/abc.te7
-rw-r--r--sepolicy/adbd.te4
-rw-r--r--sepolicy/akmd.te12
-rw-r--r--sepolicy/ap_log_srv.te14
-rw-r--r--sepolicy/apk_logfs.te16
-rw-r--r--sepolicy/app.te3
-rw-r--r--sepolicy/audioserver.te3
-rw-r--r--sepolicy/bluetooth.te9
-rw-r--r--sepolicy/bootanim.te8
-rw-r--r--sepolicy/bootstat.te1
-rw-r--r--sepolicy/cameraserver.te17
-rwxr-xr-xsepolicy/cifsmanager.te5
-rw-r--r--sepolicy/clear_test.te2
-rw-r--r--sepolicy/crashlogd.te38
-rw-r--r--sepolicy/device.te17
-rw-r--r--sepolicy/dex2oat.te1
-rw-r--r--sepolicy/displayd.te24
-rw-r--r--sepolicy/drmserver.te5
-rw-r--r--sepolicy/drmservice.te24
-rw-r--r--sepolicy/earlylogs.te10
-rw-r--r--sepolicy/execmod/mediadrmserver.te1
-rw-r--r--sepolicy/execmod/mediaserver.te1
-rw-r--r--sepolicy/file.te13
-rwxr-xr-xsepolicy/file_contexts112
-rw-r--r--sepolicy/fsck.te7
-rw-r--r--sepolicy/genfs_contexts2
-rw-r--r--sepolicy/gpsd.te6
-rw-r--r--sepolicy/healthd.te6
-rwxr-xr-xsepolicy/init.te59
-rwxr-xr-xsepolicy/iso.te5
-rw-r--r--sepolicy/kernel.te15
-rw-r--r--sepolicy/log-watch.te13
-rw-r--r--sepolicy/mediacodec.te3
-rw-r--r--sepolicy/mediadrmserver.te3
-rw-r--r--sepolicy/mediaextractor.te2
-rw-r--r--sepolicy/mediaserver.te31
-rw-r--r--sepolicy/netd.te11
-rw-r--r--sepolicy/ntfs3g.te18
-rwxr-xr-xsepolicy/platform_app.te21
-rw-r--r--sepolicy/pppoe.te24
-rw-r--r--sepolicy/priv_app.te5
-rw-r--r--sepolicy/procrank.te3
-rw-r--r--sepolicy/property.te7
-rw-r--r--sepolicy/property_contexts11
-rw-r--r--sepolicy/pvrsrvctl.te7
-rw-r--r--sepolicy/radio.te4
-rw-r--r--sepolicy/recovery.te40
-rw-r--r--sepolicy/resize2fs.te8
-rw-r--r--sepolicy/rild.te11
-rw-r--r--sepolicy/sdcardd.te4
-rw-r--r--sepolicy/service.te2
-rw-r--r--sepolicy/service_contexts2
-rw-r--r--sepolicy/shell.te19
-rw-r--r--sepolicy/slideshow.te5
-rw-r--r--sepolicy/surfaceflinger.te18
-rw-r--r--sepolicy/system_app.te25
-rw-r--r--sepolicy/system_server.te50
-rw-r--r--sepolicy/tee-supplicant.te3
-rw-r--r--sepolicy/toolbox.te1
-rw-r--r--sepolicy/ueventd.te9
-rw-r--r--sepolicy/uncrypt.te6
-rw-r--r--sepolicy/untrusted_app.te17
-rwxr-xr-xsepolicy/vold.te22
-rw-r--r--sepolicy/wfd.te5
-rw-r--r--sepolicy/wpa.te6
-rw-r--r--sepolicy/zygote.te7
-rw-r--r--system.prop50
-rw-r--r--tv/overlay/frameworks/base/core/res/res/anim/atv_fade_in_bottom.xml25
-rw-r--r--tv/overlay/frameworks/base/core/res/res/anim/atv_fade_in_top.xml25
-rw-r--r--tv/overlay/frameworks/base/core/res/res/anim/atv_fade_out_bottom.xml25
-rw-r--r--tv/overlay/frameworks/base/core/res/res/anim/atv_fade_out_top.xml25
-rw-r--r--tv/overlay/frameworks/base/core/res/res/anim/atv_wallpaper_enter.xml24
-rw-r--r--tv/overlay/frameworks/base/core/res/res/anim/atv_wallpaper_exit.xml24
-rw-r--r--tv/overlay/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.pngbin0 -> 6161 bytes
-rw-r--r--tv/overlay/frameworks/base/core/res/res/drawable/progress_volume.xml41
-rw-r--r--tv/overlay/frameworks/base/core/res/res/layout/volume_adjust.xml49
-rw-r--r--tv/overlay/frameworks/base/core/res/res/layout/volume_adjust_item.xml44
-rw-r--r--tv/overlay/frameworks/base/core/res/res/values-sw600dp/config.xml20
-rw-r--r--tv/overlay/frameworks/base/core/res/res/values-television/config.xml20
-rw-r--r--tv/overlay/frameworks/base/core/res/res/values/config.xml63
-rw-r--r--tv/overlay/frameworks/base/core/res/res/values/styles.xml54
-rw-r--r--tv/overlay/frameworks/base/core/res/res/xml/global_keys.xml36
-rw-r--r--tv/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml34
-rw-r--r--tv/permissions/tv_core_hardware.xml36
-rw-r--r--tv/tv_base.mk116
-rwxr-xr-xueventd.rockchip.rc267
-rwxr-xr-xwhtest.sh10
-rwxr-xr-xwifi_bt_build.sh35
-rw-r--r--wifi_bt_common.mk42
230 files changed, 10955 insertions, 0 deletions
diff --git a/.classpath b/.classpath
new file mode 100755
index 0000000..93288ed
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Note:
+ Camera2, Gallery2, Launcher3等应用由于存在The type Pools is already defined的问题,默认关闭
+ 如果需要调试,可以通过下述方式绕过:
+ 右击上述工程中的android.util包->Refactor->Rename->com.android.util
+-->
+<classpath>
+ <classpathentry kind="src" path="packages/apps/Bluetooth/src"/>
+ <classpathentry kind="src" path="packages/apps/Browser/src"/>
+ <classpathentry kind="src" path="packages/apps/Calendar/src"/>
+ <classpathentry kind="src" path="packages/apps/Calendar/extensions_src"/>
+ <classpathentry kind="src" path="packages/apps/Calculator/src"/>
+ <classpathentry kind="src" path="packages/apps/Camera2/src"/>
+ <classpathentry kind="src" path="packages/apps/Camera2/src_pd"/>
+ <classpathentry kind="src" path="packages/apps/Camera2/src_pd_gcam"/>
+ <classpathentry kind="src" path="packages/apps/CertInstaller/src"/>
+ <classpathentry kind="src" path="packages/apps/Contacts/src"/>
+ <classpathentry kind="src" path="packages/apps/ContactsCommon/src"/>
+ <classpathentry kind="src" path="packages/apps/DeskClock/src"/>
+ <classpathentry kind="src" path="packages/apps/Dialer/src"/>
+ <classpathentry kind="src" path="packages/apps/Email/src"/>
+ <classpathentry kind="src" path="packages/apps/Email/emailcommon/src"/>
+ <!--<classpathentry kind="src" path="packages/apps/Gallery2/src"/>
+ <classpathentry kind="src" path="packages/apps/Gallery2/src_pd"/>
+ <classpathentry kind="src" path="packages/apps/Gallery2/gallerycommon/src"/>-->
+ <!--<classpathentry kind="src" path="packages/apps/HTMLViewer/src"/>
+ <classpathentry kind="src" path="packages/apps/InCallUI/src"/>-->
+ <classpathentry kind="src" path="packages/apps/Launcher3/src"/>
+ <classpathentry kind="src" path="packages/apps/Mms/src"/>
+ <!--<classpathentry kind="src" path="packages/apps/Nfc/src"/>
+ <classpathentry kind="src" path="packages/apps/Nfc/nci/src"/>-->
+ <classpathentry kind="src" path="packages/apps/PackageInstaller/src"/>
+ <classpathentry kind="src" path="packages/apps/Phone/src"/>
+ <classpathentry kind="src" path="packages/apps/PhoneCommon/src"/>
+ <classpathentry kind="src" path="packages/apps/QuickSearchBox/src"/>
+ <classpathentry kind="src" path="packages/apps/Provision/src"/>
+ <classpathentry kind="src" path="packages/apps/Settings/src"/>
+ <classpathentry kind="src" path="packages/apps/SoundRecorder/src"/>
+ <!--<classpathentry kind="src" path="packages/apps/Stk/src"/>
+ <classpathentry kind="src" path="packages/apps/VoiceDialer/src"/>-->
+ <classpathentry kind="src" path="packages/apps/UnifiedEmail/src"/>
+ <classpathentry kind="src" path="packages/providers/CalendarProvider/src"/>
+ <classpathentry kind="src" path="packages/providers/ContactsProvider/src"/>
+ <classpathentry kind="src" path="packages/providers/DownloadProvider/src"/>
+ <classpathentry kind="src" path="packages/providers/DrmProvider/src"/>
+ <classpathentry kind="src" path="packages/providers/MediaProvider/src"/>
+ <classpathentry kind="src" path="packages/providers/TelephonyProvider/src"/>
+ <classpathentry kind="src" path="packages/screensavers/Basic/src"/>
+ <classpathentry kind="src" path="packages/screensavers/PhotoTable/src"/>
+ <classpathentry kind="src" path="packages/screensavers/WebView/src"/>
+ <classpathentry kind="src" path="packages/services/Telephony/src"/>
+ <classpathentry kind="src" path="packages/services/Telephony/common/src"/>
+ <classpathentry kind="src" path="frameworks/base/cmds/am/src"/>
+ <classpathentry kind="src" path="frameworks/base/cmds/input/src"/>
+ <classpathentry kind="src" path="frameworks/base/cmds/pm/src"/>
+ <classpathentry kind="src" path="frameworks/base/cmds/svc/src"/>
+ <classpathentry kind="src" path="frameworks/base/core/java"/>
+ <classpathentry kind="src" path="frameworks/base/drm/java"/>
+ <classpathentry kind="src" path="frameworks/base/ethernet/java"/>
+ <classpathentry kind="src" path="frameworks/base/graphics/java"/>
+ <classpathentry kind="src" path="frameworks/base/icu4j/java"/>
+ <classpathentry kind="src" path="frameworks/base/keystore/java"/>
+ <classpathentry kind="src" path="frameworks/base/location/java"/>
+ <classpathentry kind="src" path="frameworks/base/location/lib/java"/>
+ <classpathentry kind="src" path="frameworks/base/media/java"/>
+ <!--<classpathentry kind="src" path="frameworks/base/media/tests/MediaFrameworkTest/src"/>-->
+ <classpathentry kind="src" path="frameworks/base/media/mca/effect/java"/>
+ <classpathentry kind="src" path="frameworks/base/media/mca/filterfw/java"/>
+ <classpathentry kind="src" path="frameworks/base/media/mca/filterpacks/java"/>
+ <classpathentry kind="src" path="frameworks/base/nfc-extras/java"/>
+ <classpathentry kind="src" path="frameworks/base/obex"/>
+ <classpathentry kind="src" path="frameworks/base/opengl/java"/>
+ <classpathentry kind="src" path="frameworks/base/packages/FusedLocation/src"/>
+ <classpathentry kind="src" path="frameworks/base/packages/SettingsProvider/src"/>
+ <classpathentry kind="src" path="frameworks/base/packages/SystemUI/src"/>
+ <classpathentry kind="src" path="frameworks/base/policy/src"/>
+ <classpathentry kind="src" path="frameworks/base/sax/java"/>
+ <classpathentry kind="src" path="frameworks/base/services/java"/>
+ <classpathentry kind="src" path="frameworks/base/telephony/java"/>
+ <classpathentry kind="src" path="frameworks/base/test-runner/src"/>
+ <classpathentry kind="src" path="frameworks/base/wifi/java"/>
+ <classpathentry kind="src" path="frameworks/ex/carousel/java"/>
+ <classpathentry kind="src" path="frameworks/ex/camera2/public/src"/>
+ <classpathentry kind="src" path="frameworks/ex/chips/src"/>
+ <classpathentry kind="src" path="frameworks/ex/common/java"/>
+ <classpathentry kind="src" path="frameworks/ex/photoviewer/src"/>
+ <classpathentry kind="src" path="frameworks/ex/variablespeed/src"/>
+ <classpathentry kind="src" path="frameworks/opt/timezonepicker/src"/>
+ <classpathentry kind="src" path="frameworks/opt/colorpicker/src"/>
+ <classpathentry kind="src" path="frameworks/opt/datetimepicker/src"/>
+ <classpathentry kind="src" path="frameworks/opt/calendar/src"/>
+ <classpathentry kind="src" path="frameworks/opt/photoviewer/src"/>
+ <classpathentry kind="src" path="frameworks/opt/photoviewer/activity/src"/>
+ <classpathentry kind="src" path="frameworks/opt/telephony/src/java"/>
+ <classpathentry kind="src" path="frameworks/opt/mms/src/java"/>
+ <classpathentry kind="src" path="frameworks/opt/net/voip/src/java"/>
+ <classpathentry kind="src" path="frameworks/opt/vcard/java"/>
+ <classpathentry kind="src" path="frameworks/support/v8/renderscript/java/src"/>
+ <classpathentry kind="src" path="frameworks/support/v13/java"/>
+ <classpathentry kind="src" path="frameworks/support/v13/ics"/>
+ <classpathentry kind="src" path="frameworks/support/v13/ics-mr1"/>
+<!--
+ <classpathentry kind="src" path="development/samples/ApiDemos/src"/>
+ <classpathentry kind="src" path="development/samples/ApiDemos/tests/src"/>
+ <classpathentry kind="src" path="development/samples/Compass/src"/>
+ <classpathentry kind="src" path="development/samples/HelloActivity/src"/>
+ <classpathentry kind="src" path="development/samples/HelloActivity/tests/src"/>
+ <classpathentry kind="src" path="development/samples/Home/src"/>
+ <classpathentry kind="src" path="development/samples/LunarLander/src"/>
+ <classpathentry kind="src" path="development/samples/LunarLander/tests/src"/>
+ <classpathentry kind="src" path="development/samples/NotePad/src"/>
+ <classpathentry kind="src" path="development/samples/NotePad/tests/src"/>
+ <classpathentry kind="src" path="development/samples/RSSReader/src"/>
+ <classpathentry kind="src" path="development/samples/SkeletonApp/src"/>
+ <classpathentry kind="src" path="development/samples/SkeletonApp/tests/src"/>
+ <classpathentry kind="src" path="development/samples/Snake/src"/>
+ <classpathentry kind="src" path="development/samples/Snake/tests/src"/>
+-->
+ <classpathentry kind="src" path="libcore/crypto/src/main/java"/>
+ <classpathentry kind="src" path="libcore/dalvik/src/main/java"/>
+ <classpathentry kind="src" path="libcore/dex/src/main/java"/>
+ <classpathentry kind="src" path="libcore/json/src/main/java"/>
+ <classpathentry kind="src" path="libcore/libdvm/src/main/java"/>
+ <classpathentry kind="src" path="libcore/luni/src/main/java"/>
+ <classpathentry kind="src" path="libcore/xml/src/main/java"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/ApiDemos_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/Browser_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/CalendarProvider_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/ContactsProvider_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/Gallery2_intermediates/src/renderscript/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/Launcher3_intermediates/src/proto/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/MediaProvider_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/Music_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/Phone_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/PackageInstaller_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/Settings_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/QuickSearchBox_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/SystemUI_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/APPS/TeleService_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/android-common-carousel_intermediates/src/renderscript/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/com.android.services.telephony.common_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/com.android.emailcommon_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/ethernet/java"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/core/java"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/keystore/java"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/location/java"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/media/java"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/telephony/java"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/wifi/java"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/packages/services/Proxy"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/packages/services/PacProcessor"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/NfcLogTags_intermediates/src/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/services_intermediates/src"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/src/src/java"/>
+ <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/voip-common_intermediates/src/src/java"/>
+ <classpathentry kind="src" path="out/target/common/R"/>
+ <!--<classpathentry kind="src" path="pdk/apps/TestingCamera2/src"/>-->
+ <classpathentry kind="src" path="external/apache-http/src"/>
+ <classpathentry kind="src" path="external/bouncycastle/bcprov/src/main/java"/>
+ <classpathentry kind="src" path="external/easymock/src"/>
+ <classpathentry kind="src" path="external/guava/guava/src"/>
+ <classpathentry kind="src" path="external/hamcrest/src"/>
+ <classpathentry kind="src" path="external/junit/src"/>
+ <classpathentry kind="src" path="external/libphonenumber/java/src"/>
+ <classpathentry kind="src" path="external/mockito/src"/>
+ <classpathentry kind="src" path="external/mp4parser/isoparser/src/main/java"/>
+ <classpathentry kind="src" path="external/nist-sip/java"/>
+ <classpathentry kind="src" path="external/objenesis/main/src"/>
+ <classpathentry kind="src" path="external/tagsoup/src"/>
+ <classpathentry kind="src" path="external/xmp_toolkit/XMPCore/src"/>
+ <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/android-common-carousel_intermediates/classes-jarjar.jar"/>
+ <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/classes-jarjar.jar"/>
+ <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/android-support-v4_intermediates/javalib.jar"/>
+ <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/classes.jar"/>
+ <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates/classes.jar"/>
+ <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/android-support-v13_intermediates/javalib.jar"/>
+ <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/javalib.jar"/>
+ <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/guava_intermediates/javalib.jar"/>
+ <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/libprotobuf-java-2.3.0-nano_intermediates/javalib.jar"/>
+ <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/classes-jarjar.jar"/>
+ <classpathentry kind="lib" path="packages/apps/Calculator/arity-2.1.2.jar"/>
+ <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/junit-runner_intermediates/javalib.jar"/>
+ <classpathentry kind="output" path="out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes"/>
+</classpath>
diff --git a/.gitignore b/.gitignore
new file mode 100755
index 0000000..6bcde36
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,41 @@
+*.pyc
+*~
+*.swp
+*.swo
+*.swn
+*.bak
+*.log
+*.diff
+
+# /out
+# *.sh
+
+# 忽略所有名称是 CVS 的目录.
+CVS/
+html/
+temp/
+
+*.back
+# *.rc
+*.bin
+*.rar
+*.bat
+*.BAT
+*.o
+# *.so
+*.a
+*.ko
+*.mod.c
+*.cmd
+*.mod
+*.order
+
+*.jar
+
+*.html
+*.vim
+
+temp.*
+*.temp
+*.dump
+
diff --git a/20050030_pwm.kl b/20050030_pwm.kl
new file mode 100755
index 0000000..cd3fa2a
--- /dev/null
+++ b/20050030_pwm.kl
@@ -0,0 +1,29 @@
+#$_FOR_ROCKCHIP_RBOX_$
+#$_rbox_$_modify_$_chenzhi_20120220: add for IR remote
+
+key 28 ENTER
+key 116 POWER WAKE
+key 158 BACK
+key 139 MENU
+key 217 SEARCH
+key 232 DPAD_CENTER
+key 108 DPAD_DOWN
+key 103 DPAD_UP
+key 102 HOME
+key 105 DPAD_LEFT
+key 106 DPAD_RIGHT
+key 115 VOLUME_UP
+key 114 VOLUME_DOWN
+key 143 NOTIFICATION WAKE
+key 113 VOLUME_MUTE
+#key 388 TV_KEYMOUSE_MODE_SWITCH
+#key 400 TV_MEDIA_MULT_BACKWARD
+#key 401 TV_MEDIA_MULT_FORWARD
+#key 402 TV_MEDIA_PLAY_PAUSE
+#key 64 TV_MEDIA_PLAY
+#key 65 TV_MEDIA_PAUSE
+#key 66 TV_MEDIA_STOP
+#key 67 TV_MEDIA_REWIND
+#key 68 TV_MEDIA_FAST_FORWARD
+#key 87 TV_MEDIA_PREVIOUS
+#key 88 TV_MEDIA_NEXT
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..7a16792
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,3 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
new file mode 100644
index 0000000..fc550db
--- /dev/null
+++ b/AndroidProducts.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2011 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)/common.mk
diff --git a/BoardConfig.mk b/BoardConfig.mk
new file mode 100755
index 0000000..0e864e3
--- /dev/null
+++ b/BoardConfig.mk
@@ -0,0 +1,319 @@
+#
+# 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/common/BoardConfigVendor.mk
+
+TARGET_NO_KERNEL ?= false
+TARGET_PREBUILT_KERNEL ?= kernel/arch/arm/boot/zImage
+TARGET_PREBUILT_RESOURCE ?= kernel/resource.img
+
+TARGET_BOARD_PLATFORM ?= rk3288
+TARGET_BOARD_HARDWARE ?= rk30board
+# value: tablet,box,phone
+# It indicates whether to be tablet platform or not
+
+ifneq ($(filter %box, $(TARGET_PRODUCT)), )
+TARGET_BOARD_PLATFORM_PRODUCT ?= box
+else
+ifneq ($(filter %vr, $(TARGET_PRODUCT)), )
+TARGET_BOARD_PLATFORM_PRODUCT ?= vr
+else
+TARGET_BOARD_PLATFORM_PRODUCT ?= tablet
+endif
+endif
+
+# CPU feature configration
+ifeq ($(strip $(TARGET_BOARD_HARDWARE)), rk30board)
+
+TARGET_ARCH ?= arm
+TARGET_ARCH_VARIANT ?= armv7-a-neon
+ARCH_ARM_HAVE_TLS_REGISTER ?= true
+TARGET_CPU_ABI ?= armeabi-v7a
+TARGET_CPU_ABI2 ?= armeabi
+TARGET_CPU_VARIANT ?= cortex-a9
+TARGET_CPU_SMP ?= true
+else
+TARGET_ARCH ?= x86
+TARGET_ARCH_VARIANT ?= silvermont
+TARGET_CPU_ABI ?= x86
+TARGET_CPU_ABI2 ?=
+TARGET_CPU_SMP ?= true
+endif
+
+
+# GPU configration
+TARGET_BOARD_PLATFORM_GPU ?= mali-t760
+BOARD_USE_LCDC_COMPOSER ?= false
+GRAPHIC_MEMORY_PROVIDER ?= ump
+USE_OPENGL_RENDERER ?= true
+TARGET_DISABLE_TRIPLE_BUFFERING ?= false
+TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK ?= false
+
+DEVICE_HAVE_LIBRKVPU ?= true
+
+#rotate screen to 0, 90, 180, 270
+#0: rotate_0
+#90: rotate_90
+#180: rotate_180
+#270: rotate_270
+ROTATE_SCREEN ?= rotate_0
+
+#Screen to Double, Single
+#YES: Screen to Double
+#NO: Screen to single
+DOUBLE_SCREEN ?= NO
+
+
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), mali400)
+BOARD_EGL_CFG := vendor/rockchip/common/gpu/Mali400/lib/arm/egl.cfg
+endif
+
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), mali450)
+BOARD_EGL_CFG := vendor/rockchip/common/gpu/Mali450/lib/x86/egl.cfg
+endif
+
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), mali-t860)
+BOARD_EGL_CFG := vendor/rockchip/common/gpu/MaliT860/etc/egl.cfg
+endif
+
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), mali-t760)
+BOARD_EGL_CFG := vendor/rockchip/common/gpu/MaliT760/etc/egl.cfg
+endif
+
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), mali-t720)
+BOARD_EGL_CFG := vendor/rockchip/common/gpu/MaliT720/etc/egl.cfg
+endif
+
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), PVR540)
+BOARD_EGL_CFG ?= vendor/rockchip/common/gpu/PVR540/egl.cfg
+endif
+
+TARGET_BOOTLOADER_BOARD_NAME ?= rk30sdk
+TARGET_NO_BOOTLOADER ?= true
+BOARD_USE_LOW_MEM ?= false
+DEVICE_PACKAGE_OVERLAYS += device/rockchip/common/overlay
+
+#######for target product ########
+ifeq ($(TARGET_BOARD_PLATFORM_PRODUCT),box)
+DEVICE_PACKAGE_OVERLAYS += device/rockchip/common/overlay_screenoff
+
+ADDITIONAL_DEFAULT_PROPERTIES += \
+ ro.target.product=box
+else ifeq ($(TARGET_BOARD_PLATFORM_PRODUCT),vr)
+ ADDITIONAL_DEFAULT_PROPERTIES += \
+ ro.target.product=vr
+else ifeq ($(TARGET_BOARD_PLATFORM_PRODUCT),laptop)
+ ADDITIONAL_DEFAULT_PROPERTIES += \
+ ro.target.product=laptop
+else
+ ADDITIONAL_DEFAULT_PROPERTIES += \
+ ro.target.product=tablet
+endif
+TARGET_RELEASETOOLS_EXTENSIONS := device/rockchip/common
+TARGET_PROVIDES_INIT_RC ?= false
+#BOARD_HAL_STATIC_LIBRARIES ?= libdumpstate.$(TARGET_PRODUCT) libhealthd.$(TARGET_PRODUCT)
+
+//MAX-SIZE=512M, for generate out/.../system.img
+BOARD_SYSTEMIMAGE_PARTITION_SIZE ?= 1073741824
+BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016
+BOARD_FLASH_BLOCK_SIZE ?= 131072
+
+# Enable dex-preoptimization to speed up first boot sequence
+ifeq ($(HOST_OS),linux)
+ ifeq ($(TARGET_BUILD_VARIANT),user)
+ ifeq ($(WITH_DEXPREOPT),)
+ WITH_DEXPREOPT ?= true
+ endif
+ endif
+endif
+
+ART_USE_HSPACE_COMPACT ?= true
+
+TARGET_USES_LOGD ?= true
+
+# Sepolicy
+BOARD_SEPOLICY_DIRS ?= device/rockchip/common/sepolicy
+
+# Recovery
+TARGET_NO_RECOVERY ?= false
+TARGET_ROCHCHIP_RECOVERY ?= true
+
+# to flip screen in recovery
+BOARD_HAS_FLIPPED_SCREEN ?= false
+
+# Auto update package from USB
+RECOVERY_AUTO_USB_UPDATE ?= false
+
+# To use bmp as kernel logo, uncomment the line below to use bgra 8888 in recovery
+TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
+TARGET_ROCKCHIP_PCBATEST ?= false
+#TARGET_RECOVERY_UI_LIB ?= librecovery_ui_$(TARGET_PRODUCT)
+TARGET_USERIMAGES_USE_EXT4 ?= true
+TARGET_USERIMAGES_USE_F2FS ?= false
+BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE ?= ext4
+RECOVERY_UPDATEIMG_RSA_CHECK ?= false
+
+RECOVERY_BOARD_ID ?= false
+# RECOVERY_BOARD_ID ?= true
+
+# for widevine drm
+BOARD_WIDEVINE_OEMCRYPTO_LEVEL := 3
+
+# for drmservice
+BUILD_WITH_DRMSERVICE :=true
+
+# for tablet encryption
+BUILD_WITH_CRYPTO := false
+
+# Audio
+BOARD_USES_GENERIC_AUDIO ?= true
+
+# Wifi&Bluetooth
+BOARD_HAVE_BLUETOOTH ?= true
+BLUETOOTH_USE_BPLUS ?= false
+BOARD_HAVE_BLUETOOTH_BCM ?= false
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR ?= device/rockchip/$(TARGET_BOARD_PLATFORM)/bluetooth
+include device/rockchip/common/wifi_bt_common.mk
+
+#Camera flash
+BOARD_HAVE_FLASH ?= true
+
+# google apps
+BUILD_BOX_WITH_GOOGLE_MARKET ?= false
+BUILD_WITH_GOOGLE_MARKET ?= false
+BUILD_WITH_GOOGLE_MARKET_ALL ?= false
+BUILD_WITH_GOOGLE_FRP ?= false
+
+# face lock
+BUILD_WITH_FACELOCK ?= false
+
+# ebook
+BUILD_WITH_RK_EBOOK ?= false
+
+# Sensors
+BOARD_SENSOR_ST ?= true
+# if use akm8963
+#BOARD_SENSOR_COMPASS_AK8963 ?= true
+# if need calculation angle between two gsensors
+#BOARD_SENSOR_ANGLE ?= true
+# if need calibration
+#BOARD_SENSOR_CALIBRATION ?= true
+# if use mpu
+#BOARD_SENSOR_MPU ?= true
+#BOARD_USES_GENERIC_INVENSENSE ?= false
+
+# readahead files to improve boot time
+# BOARD_BOOT_READAHEAD ?= true
+
+BOARD_BP_AUTO ?= true
+
+# phone pad codec list
+BOARD_CODEC_WM8994 ?= false
+BOARD_CODEC_RT5625_SPK_FROM_SPKOUT ?= false
+BOARD_CODEC_RT5625_SPK_FROM_HPOUT ?= false
+BOARD_CODEC_RT3261 ?= false
+BOARD_CODEC_RT3224 ?= true
+BOARD_CODEC_RT5631 ?= false
+BOARD_CODEC_RK616 ?= false
+
+# Vold configrations
+# if set to true m-user would be disabled and UMS enabled, if set to disable UMS would be disabled and m-user enabled
+BUILD_WITH_UMS ?= false
+# if set to true BUILD_WITH_UMS must be false.
+BUILD_WITH_CDROM ?= false
+BUILD_WITH_CDROM_PATH ?= /system/etc/cd.iso
+# multi usb partitions
+BUILD_WITH_MULTI_USB_PARTITIONS ?= false
+# define tablet support NTFS
+BOARD_IS_SUPPORT_NTFS ?= true
+
+# pppoe for cts, you should set this true during pass CTS and which will disable pppoe function.
+BOARD_PPPOE_PASS_CTS ?= false
+
+# ethernet
+BOARD_HS_ETHERNET ?= true
+
+# manifest
+SYSTEM_WITH_MANIFEST ?= false
+
+# no battery
+BUILD_WITHOUT_BATTERY ?= false
+
+BOARD_CHARGER_ENABLE_SUSPEND ?= true
+CHARGER_ENABLE_SUSPEND ?= true
+CHARGER_DISABLE_INIT_BLANK ?= true
+BOARD_CHARGER_DISABLE_INIT_BLANK ?= true
+
+#stress test
+BOARD_HAS_STRESSTEST_APP ?= true
+
+#boot optimization
+BOARD_WITH_BOOT_BOOST ?= false
+
+#optimise mem
+BOARD_WITH_MEM_OPTIMISE ?= false
+
+#force app can see udisk
+BOARD_FORCE_UDISK_VISIBLE ?= true
+
+
+# disable safe mode to speed up boot time
+BOARD_DISABLE_SAFE_MODE ?= true
+
+#enable 3g dongle
+BOARD_ENABLE_3G_DONGLE := true
+
+#for boot and shutdown animation ringing
+BOOT_SHUTDOWN_ANIMATION_RINGING ?= false
+
+#for pms multi thead scan
+BOARD_ENABLE_PMS_MULTI_THREAD_SCAN ?= false
+
+# product has follow sensors or not,if had override it in product's BoardConfig
+BOARD_HAS_GPS ?= false
+BOARD_NFC_SUPPORT ?= false
+BOARD_GRAVITY_SENSOR_SUPPORT ?= false
+BOARD_COMPASS_SENSOR_SUPPORT ?= false
+BOARD_GYROSCOPE_SENSOR_SUPPORT ?= false
+BOARD_PROXIMITY_SENSOR_SUPPORT ?= false
+BOARD_LIGHT_SENSOR_SUPPORT ?= false
+BOARD_PRESSURE_SENSOR_SUPPORT ?= false
+BOARD_TEMPERATURE_SENSOR_SUPPORT ?= false
+BOARD_USB_HOST_SUPPORT ?= false
+BOARD_USB_ACCESSORY_SUPPORT ?= true
+BOARD_CAMERA_SUPPORT ?= false
+
+USE_CLANG_PLATFORM_BUILD ?= true
+
+# For 4G dongle
+BOARD_HAVE_DONGLE := true
+BOARD_HAVE_MODEM :=true
+BOARD_MODEM_VENDOR :=SIGNAL
+BOARD_MODEM_ID :=SLM630
+BOARD_MODEM_HAVE_DATA_DEVICE :=true
+
+ifeq ($(TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS),true)
+BOARD_SEPOLICY_DIRS += \
+ device/rockchip/common/sepolicy/execmod
+
+
+endif
+
+# Zoom out recovery ui of box by two percent.
+ifeq ($(TARGET_BOARD_PLATFORM_PRODUCT),box)
+ TARGET_RECOVERY_OVERSCAN_PERCENT := 2
+endif
diff --git a/alarm_alignment_conf.xml b/alarm_alignment_conf.xml
new file mode 100644
index 0000000..3249a75
--- /dev/null
+++ b/alarm_alignment_conf.xml
@@ -0,0 +1,89 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+
+<!--
+/*
+ * Copyright (C) 2016-2017 Intel Mobile Communications GmbH
+ *
+ * Sec Class: Intel Confidential (IC)
+ *
+ * All rights reserved.
+*/
+
+alarm-align:
+ strategy: the alarm alignment strategy.
+ "fixed2": force align alarm in a fixed interval, the alignment base is boot elapsed time.
+ "none": no optimization, android default.
+ default value: "none"
+ fixed_alignment: fixed alignment unit.
+ for strategy: "fixed2"
+ default value: 0
+ strict: if this is true:
+ 1, the repeat_alignment below will be invalid,
+ and the value of repeat_alignment will be set to a value
+ according to what current strategy is.
+ fixed2: set repeat_alignment to the same as fixed_alignment
+ 2, the repeat alarm will also be aligned.
+ for strategy: "fixed2"
+ default value: true
+ skip_non_wakeup: defer triggering of the non-wakeup App alarm, until screen on.
+ for strategy: all strategy
+ default value: true
+ align_non_wakeup: determine if the non-wakeup App alarm should be aligned.
+ for strategy: all strategy
+ default value: false
+ align_system: set to "true" to also align system alarms, otherwise "false".
+ for strategy: all strategy
+ default value: false
+ skip_short_len: some App alarm has very short trigger time, and it could be very
+ critical to the App, we can't modify it. This configuration item
+ is to set the length of the short interval at most we need to
+ check before modify the alarm (based on second).
+ for strategy: all strategy
+ default value: 0
+ repeat_alignment: force extend the interval for repeat alarm (based on second).
+ for strategy: all strategy
+ default value: 0
+
+white-list: skip the alarms in this list.
+ for strategy: all strategy
+
+ ignore_top_app: skip the alarms set by the App with top activity (on top screen). Options: true or false. NOTE: NOT implemented currently.
+ app:
+ package: the package name of the App.
+ action: the intent action of the alarm. NOTE: the string should be regex pattern.
+
+black-list: always align the alarm in this list.
+ for strategy: all strategy
+ app:
+ package: the package name of the App.
+ action: the intent action of the alarm. NOTE: the string should be regex pattern.
+
+NOTE:
+1, the implementation will check if an alarm needs to be aligned in following priority.
+ balcklist > whitelist > system flag check
+-->
+
+<alarm-align strategy="fixed2" strict="true" skip_non_wakeup="false"
+ fixed_alignment="300" skip_short_len="10" repeat_alignment="300">
+ <white-list>
+ <!-- SAMPLE
+ <app package="com.tencent.mobileqq" action="com\.tencent\.mobileqq:MSF_.*" />
+ -->
+ <app package="com.google.android.deskclock" />
+ <app package="com.alarmclock.xtreme" />
+ <app package="com.alarmclock.xtreme.free" />
+ <app package="com.zdworks.android.zdclock" />
+ <app package="com.tiantian.ttclock" />
+ <app package="com.macropinch.axe" />
+ <app package="com.maize.digitalClock" />
+ <app package="nl.jsource.retroclock.android" />
+ <app package="com.asus.deskclock" />
+
+ </white-list>
+ <black-list>
+ <!-- SAMPLE
+ <app package="com.tencent.mobileqq" action="com\.tencent\.mobileqq:MSF_.*" />
+ -->
+ <app package="com.android.phone" action="com.android.internal.telephony.data-stall" />
+ </black-list>
+</alarm-align>
diff --git a/alarm_filter.xml b/alarm_filter.xml
new file mode 100644
index 0000000..1c170ca
--- /dev/null
+++ b/alarm_filter.xml
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<alarm-package>
+<app package="com.google.android.gsf"/>
+<app package="com.google.android.apps.maps"/>
+<app package="com.android.vending"/>
+<app package="com.android.phone"/>
+<app package="com.google.android.partnersetup"/>
+<app package="com.google.android.gms"/>
+<app package="com.android.calendar"/>
+<app package="com.android.providers.calendar"/>
+<app package="com.google.android.googlequicksearchbox"/>
+<app package="com.mobisystems.office"/>
+<app package="com.excelliance.dualaid"/>
+</alarm-package>
diff --git a/audio_policy_px5car.conf b/audio_policy_px5car.conf
new file mode 100755
index 0000000..84315ad
--- /dev/null
+++ b/audio_policy_px5car.conf
@@ -0,0 +1,109 @@
+# Global configuration section: lists input and output devices always present on the device
+# as well as the output device selected by default.
+# Devices are designated by a string that corresponds to the enum in audio.h
+
+global_configuration {
+ attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
+ default_output_device AUDIO_DEVICE_OUT_SPEAKER
+ attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX
+}
+
+# audio hardware module section: contains descriptors for all audio hw modules present on the
+# device. Each hw module node is named after the corresponding hw module library base name.
+# For instance, "primary" corresponds to audio.primary.<device>.so.
+# The "primary" module is mandatory and must include at least one output with
+# AUDIO_OUTPUT_FLAG_PRIMARY flag.
+# Each module descriptor contains one or more output profile descriptors and zero or more
+# input profile descriptors. Each profile lists all the parameters supported by a given output
+# or input stream category.
+# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
+# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
+
+audio_hw_modules {
+ primary {
+ outputs {
+ primary {
+ sampling_rates 44100|48000
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_SPDIF
+ flags AUDIO_OUTPUT_FLAG_PRIMARY
+ }
+ spdif_passthrough {
+ sampling_rates 44100|48000
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_SPDIF
+ flags AUDIO_OUTPUT_FLAG_DIRECT
+ }
+
+ hdmi {
+ sampling_rates 44100|48000|192000
+ channel_masks AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_7POINT1
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_AUX_DIGITAL
+ flags AUDIO_OUTPUT_FLAG_DIRECT
+ }
+ }
+ inputs {
+ primary {
+ sampling_rates 8000|11025|16000|22050|32000|44100|48000
+ channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET
+ }
+ }
+ }
+ a2dp {
+ outputs {
+ a2dp {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_ALL_A2DP
+ }
+ }
+ }
+ usb {
+ outputs {
+ usb_accessory {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_USB_ACCESSORY
+ }
+ usb_device {
+ sampling_rates dynamic
+ channel_masks dynamic
+ formats dynamic
+ devices AUDIO_DEVICE_OUT_USB_DEVICE
+ }
+ }
+ inputs {
+ usb_device {
+ sampling_rates dynamic
+ channel_masks AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_USB_DEVICE
+ }
+ }
+ }
+ r_submix {
+ outputs {
+ submix {
+ sampling_rates 48000
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
+ }
+ }
+ inputs {
+ submix {
+ sampling_rates 48000
+ channel_masks AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
+ }
+ }
+ }
+}
diff --git a/audio_policy_rk30board.conf b/audio_policy_rk30board.conf
new file mode 100755
index 0000000..84315ad
--- /dev/null
+++ b/audio_policy_rk30board.conf
@@ -0,0 +1,109 @@
+# Global configuration section: lists input and output devices always present on the device
+# as well as the output device selected by default.
+# Devices are designated by a string that corresponds to the enum in audio.h
+
+global_configuration {
+ attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
+ default_output_device AUDIO_DEVICE_OUT_SPEAKER
+ attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX
+}
+
+# audio hardware module section: contains descriptors for all audio hw modules present on the
+# device. Each hw module node is named after the corresponding hw module library base name.
+# For instance, "primary" corresponds to audio.primary.<device>.so.
+# The "primary" module is mandatory and must include at least one output with
+# AUDIO_OUTPUT_FLAG_PRIMARY flag.
+# Each module descriptor contains one or more output profile descriptors and zero or more
+# input profile descriptors. Each profile lists all the parameters supported by a given output
+# or input stream category.
+# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
+# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
+
+audio_hw_modules {
+ primary {
+ outputs {
+ primary {
+ sampling_rates 44100|48000
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_SPDIF
+ flags AUDIO_OUTPUT_FLAG_PRIMARY
+ }
+ spdif_passthrough {
+ sampling_rates 44100|48000
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_SPDIF
+ flags AUDIO_OUTPUT_FLAG_DIRECT
+ }
+
+ hdmi {
+ sampling_rates 44100|48000|192000
+ channel_masks AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_7POINT1
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_AUX_DIGITAL
+ flags AUDIO_OUTPUT_FLAG_DIRECT
+ }
+ }
+ inputs {
+ primary {
+ sampling_rates 8000|11025|16000|22050|32000|44100|48000
+ channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET
+ }
+ }
+ }
+ a2dp {
+ outputs {
+ a2dp {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_ALL_A2DP
+ }
+ }
+ }
+ usb {
+ outputs {
+ usb_accessory {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_USB_ACCESSORY
+ }
+ usb_device {
+ sampling_rates dynamic
+ channel_masks dynamic
+ formats dynamic
+ devices AUDIO_DEVICE_OUT_USB_DEVICE
+ }
+ }
+ inputs {
+ usb_device {
+ sampling_rates dynamic
+ channel_masks AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_USB_DEVICE
+ }
+ }
+ }
+ r_submix {
+ outputs {
+ submix {
+ sampling_rates 48000
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
+ }
+ }
+ inputs {
+ submix {
+ sampling_rates 48000
+ channel_masks AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
+ }
+ }
+ }
+}
diff --git a/audio_policy_sofiaboard.conf b/audio_policy_sofiaboard.conf
new file mode 100644
index 0000000..b2b50d0
--- /dev/null
+++ b/audio_policy_sofiaboard.conf
@@ -0,0 +1,86 @@
+# Global configuration section: lists input and output devices always present on the device
+# as well as the output device selected by default.
+# Devices are designated by a string that corresponds to the enum in audio.h
+
+global_configuration {
+ attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER
+ default_output_device AUDIO_DEVICE_OUT_EARPIECE
+ attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX
+}
+
+# audio hardware module section: contains descriptors for all audio hw modules present on the
+# device. Each hw module node is named after the corresponding hw module library base name.
+# For instance, "primary" corresponds to audio.primary.<device>.so.
+# The "primary" module is mandatory and must include at least one output with
+# AUDIO_OUTPUT_FLAG_PRIMARY flag.
+# Each module descriptor contains one or more output profile descriptors and zero or more
+# input profile descriptors. Each profile lists all the parameters supported by a given output
+# or input stream category.
+# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
+# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
+
+audio_hw_modules {
+ primary {
+ outputs {
+ primary {
+ sampling_rates 48000 | 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_FM
+ flags AUDIO_OUTPUT_FLAG_PRIMARY
+ }
+ }
+ inputs {
+ primary {
+ sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
+ channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_FM_RX
+ }
+ }
+ }
+ a2dp {
+ outputs {
+ a2dp {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_ALL_A2DP
+ }
+ }
+ }
+ usb {
+ outputs {
+ usb_accessory {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_USB_ACCESSORY
+ }
+ usb_device {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_USB_DEVICE
+ }
+ }
+ }
+ r_submix {
+ outputs {
+ submix {
+ sampling_rates 48000
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
+ }
+ }
+ inputs {
+ submix {
+ sampling_rates 48000
+ channel_masks AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
+ }
+ }
+ }
+}
diff --git a/auto_generator.py b/auto_generator.py
new file mode 100644
index 0000000..48aaccc
--- /dev/null
+++ b/auto_generator.py
@@ -0,0 +1,134 @@
+#!/usr/bin/env python
+import sys
+import os
+import re
+import zipfile
+import shutil
+
+templet = """include $(CLEAR_VARS)
+LOCAL_MODULE := %s
+LOCAL_MODULE_CLASS := APPS
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/%s
+LOCAL_SRC_FILES := $(LOCAL_MODULE)$(COMMON_ANDROID_PACKAGE_SUFFIX)
+LOCAL_CERTIFICATE := PRESIGNED
+#LOCAL_DEX_PREOPT := false
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
+LOCAL_JNI_SHARED_LIBRARIES_ABI := %s
+MY_LOCAL_PREBUILT_JNI_LIBS := %s
+MY_APP_LIB_PATH := $(TARGET_OUT_VENDOR)/%s/$(LOCAL_MODULE)/lib/$(LOCAL_JNI_SHARED_LIBRARIES_ABI)
+ifneq ($(LOCAL_JNI_SHARED_LIBRARIES_ABI), None)
+$(warning MY_APP_LIB_PATH=$(MY_APP_LIB_PATH))
+LOCAL_POST_INSTALL_CMD := \
+ mkdir -p $(MY_APP_LIB_PATH) \
+ $(foreach lib, $(MY_LOCAL_PREBUILT_JNI_LIBS), ; cp -f $(LOCAL_PATH)/$(lib) $(MY_APP_LIB_PATH)/$(notdir $(lib)))
+endif
+include $(BUILD_PREBUILT)
+
+"""
+def main(argv):
+ preinstall_dir = os.path.dirname(argv[0])
+ preinstall_dir = os.path.join(preinstall_dir, '../' + argv[1] + '/' + argv[2])
+ if os.path.exists(preinstall_dir):
+ #Use to include modules
+ isfound = 'not_found_lib'
+ include_path = preinstall_dir + '/preinstall.mk'
+ android_path = preinstall_dir + '/Android.mk'
+
+ if os.path.exists(include_path):
+ os.remove(include_path)
+ if os.path.exists(android_path):
+ os.remove(android_path)
+
+ includefile = file(include_path, 'w')
+ androidfile = file(android_path, 'w')
+
+ androidfile.write("include $(call all-subdir-makefiles)\n\n")
+
+ MY_LOCAL_PREBUILT_JNI_LIBS = '\\' + '\n'
+
+ for root, dirs, files in os.walk(preinstall_dir):
+ for file_name in files:
+ p = re.compile(r'\S*(?=.apk\b)')
+ found = p.search(file_name)
+ if found:
+ include_apk_path = preinstall_dir + '/' + found.group()
+ makefile_path = include_apk_path + '/Android.mk'
+ apk = preinstall_dir + '/' + found.group() + '.apk'
+ try:
+ zfile = zipfile.ZipFile(apk,'r')
+ except:
+ if os.path.exists(include_apk_path):
+ shutil.rmtree(include_apk_path)
+ os.makedirs(include_apk_path)
+ apkpath = preinstall_dir + '/' + found.group() + '/'
+ shutil.move(apk,apkpath)
+ makefile = file(makefile_path,'w')
+ makefile.write("LOCAL_PATH := $(my-dir)\n\n")
+ makefile.write(templet % (found.group(),argv[3],'None',MY_LOCAL_PREBUILT_JNI_LIBS,argv[3]))
+ continue
+ for lib_name in zfile.namelist():
+ include_apklib_path = include_apk_path + '/lib' + '/arm'
+ if os.path.exists(include_apk_path):
+ shutil.rmtree(include_apk_path)
+ os.makedirs(include_apklib_path)
+ makefile = file(makefile_path,'w')
+ makefile.write("LOCAL_PATH := $(my-dir)\n\n")
+ apkpath = preinstall_dir + '/' + found.group() + '/'
+ for lib_name in zfile.namelist():
+ lib = re.compile(r'\A(lib/armeabi-v7a/)+?')
+ find_name = 'lib/armeabi-v7a/'
+ if not cmp(lib_name,find_name):
+ continue
+ libfound = lib.search(lib_name)
+ if libfound:
+ isfound = 'armeabi-v7a'
+ data = zfile.read(lib_name)
+ string = lib_name.split(libfound.group())
+ libfile = include_apklib_path + '/' + string[1]
+ MY_LOCAL_PREBUILT_JNI_LIBS += '\t' + 'lib/arm' + '/' + string[1] + '\\' + '\n'
+ if(os.path.isdir(libfile)):
+ continue
+ else:
+ includelib = file(libfile,'w')
+ includelib.write(data)
+ if not cmp(isfound,'not_found_lib'):
+ for lib_name in zfile.namelist():
+ lib = re.compile(r'\A(lib/armeabi/)+?')
+ find_name = 'lib/armeabi/'
+ if not cmp(lib_name,find_name):
+ continue
+ libfound = lib.search(lib_name)
+ if libfound:
+ data = zfile.read(lib_name)
+ string = lib_name.split(libfound.group())
+ libfile = include_apklib_path + '/' + string[1]
+ MY_LOCAL_PREBUILT_JNI_LIBS += '\t' + 'lib/arm' + '/' + string[1] + '\\' + '\n'
+ if(os.path.isdir(libfile)):
+ continue
+ else:
+ includelib = file(libfile,'w')
+ includelib.write(data)
+ tmp_jni_libs = '\\' + '\n'
+ if not cmp(MY_LOCAL_PREBUILT_JNI_LIBS,tmp_jni_libs):
+ nolibpath = preinstall_dir + '/' + found.group() + '/lib'
+ shutil.rmtree(nolibpath)
+ makefile.write(templet % (found.group(),argv[3],'None',MY_LOCAL_PREBUILT_JNI_LIBS,argv[3]))
+ else:
+ if argv[2]=='preinstall_del' or argv[2]=='preinstall_del_forever':
+ makefile.write(templet % (found.group(),argv[3],'None',MY_LOCAL_PREBUILT_JNI_LIBS,argv[3]))
+ else:
+ makefile.write(templet % (found.group(),argv[3],'arm',MY_LOCAL_PREBUILT_JNI_LIBS,argv[3]))
+ shutil.move(apk,apkpath)
+ isfound = 'not_found_lib'
+ MY_LOCAL_PREBUILT_JNI_LIBS = '\\' + '\n'
+ makefile.close()
+ break
+ for root, dirs,files in os.walk(preinstall_dir):
+ for dir_file in dirs:
+ includefile.write('PRODUCT_PACKAGES += %s\n' %dir_file)
+ break
+ includefile.close()
+
+if __name__=="__main__":
+ main(sys.argv)
diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h
new file mode 100644
index 0000000..bb22ce2
--- /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 "rksdk"
+#define BTA_DM_COD {0x1A, 0x01, 0x10}
+
+#endif
+
diff --git a/boot_boost/libboot_optimization.so b/boot_boost/libboot_optimization.so
new file mode 100755
index 0000000..0935d4d
--- /dev/null
+++ b/boot_boost/libboot_optimization.so
Binary files differ
diff --git a/boot_boost/prescan_packages.xml b/boot_boost/prescan_packages.xml
new file mode 100644
index 0000000..a78181c
--- /dev/null
+++ b/boot_boost/prescan_packages.xml
@@ -0,0 +1,23 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<prescan_packages>
+ <!--<package type="0" path="/system/priv-app/Settings/Settings.apk"/>
+ <package type="0" path="system/app/Provision/Provision.apk"/>
+ <package type="0" path="/system/app/Launcher3/Launcher3.apk"/>
+ <package type="0" path="/system/priv-app/SettingsProvider/SettingsProvider.apk"/>
+ <package type="0" path="/system/priv-app/MediaProvider/MediaProvider.apk"/>
+ <package type="1" path="/system/app/LatinIME/LatinIME.apk"/>
+ <package type="0" path="system/priv-app/FusedLocation/FusedLocation.apk"/>
+ <package type="0" path="/system/priv-app/DownloadProvider/DownloadProvider.apk"/>
+ <package type="0" path="/system/app/GoogleServicesFramework/GoogleServicesFramework.apk"/>
+ <package type="0" path="/system/app/PackageInstaller/PackageInstaller.apk"/>-->
+ <package type="0" path="/system/app/Launcher3"/>
+ <package type="0" path="/system/priv-app/Settings"/>
+ <package type="0" path="/system/priv-app/SystemUI"/>
+ <package type="0" path="/system/priv-app/SettingsProvider"/>
+ <package type="0" path="/system/priv-app/MediaProvider"/>
+ <package type="0" path="/system/priv-app/FusedLocation"/>
+ <!--<package type="1" path="/system/app/LatinIME"/>-->
+ <package type="0" path="/system/priv-app/GoogleServicesFramework"/>
+ <package type="0" path="/system/priv-app/GmsCore"/>
+ <package type="1" path="/system/app/LatinImeGoogle"/>
+</prescan_packages>
diff --git a/bootshutdown/bootshutdown.mk b/bootshutdown/bootshutdown.mk
new file mode 100755
index 0000000..d958925
--- /dev/null
+++ b/bootshutdown/bootshutdown.mk
@@ -0,0 +1,11 @@
+CUR_PATH := device/rockchip/common/bootshutdown
+
+HAVE_BOOT_ANIMATION := $(shell test -f $(CUR_PATH)/bootanimation.zip && echo yes)
+HAVE_SHUTDOWN_ANIMATION := $(shell test -f $(CUR_PATH)/shutdownanimation.zip && echo yes)
+
+ifeq ($(HAVE_BOOT_ANIMATION), yes)
+PRODUCT_COPY_FILES += $(CUR_PATH)/bootanimation.zip:system/media/bootanimation.zip
+endif
+ifeq ($(HAVE_SHUTDOWN_ANIMATION), yes)
+PRODUCT_COPY_FILES += $(CUR_PATH)/shutdownanimation.zip:system/media/shutdownanimation.zip
+endif
diff --git a/bugreport.sh b/bugreport.sh
new file mode 100755
index 0000000..1ac21a5
--- /dev/null
+++ b/bugreport.sh
@@ -0,0 +1,23 @@
+#!/system/bin/sh
+
+timestamp=`date +'%Y-%m-%d-%H-%M-%S'`
+storagePath="$EXTERNAL_STORAGE/bugreports"
+bugreport=$storagePath/bugreport-$timestamp
+screenshotPath="$EXTERNAL_STORAGE/bugreports"
+screenshot=$screenshotPath/screenshot-$timestamp.png
+
+# check screen shot folder
+if [ ! -e $screenshotPath ]; then
+ mkdir -p $screenshotPath
+fi
+
+# take screen shot
+# we run this as a bg job in case screencap is stuck
+/system/bin/screencap -p $screenshot &
+
+# run bugreport
+/system/bin/dumpstate -o $bugreport $@
+
+# make files readable
+chown root.sdcard_rw $bugreport.txt
+chown root.sdcard_rw $screenshot
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..53e87a0
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
+export PATH=$JAVA_HOME/bin:$PATH
+export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
+
+. build/envsetup.sh
diff --git a/build_wifi_ko.sh b/build_wifi_ko.sh
new file mode 100755
index 0000000..dbc2d94
--- /dev/null
+++ b/build_wifi_ko.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+. build/envsetup.sh >/dev/null && setpaths
+
+export PATH=$ANDROID_BUILD_PATHS:$PATH
+
+TARGET_PRODUCT=`get_build_var TARGET_PRODUCT`
+
+TARGET_ARCH=`get_build_var TARGET_ARCH`
+
+ANDROID_BUILD_TOP=`get_build_var ANDROID_BUILD_TOP`
+
+echo ANDROID_BUILD_TOP=$ANDROID_BUILD_TOP
+
+echo TARGET_PRODUCT=$TARGET_PRODUCT
+
+if [ "$TARGET_PRODUCT" == "rk3228h" ];then
+ TARGET_ARCH="arm64"
+fi
+echo TARGET_ARCH = $TARGET_ARCH
+echo "---- make wifi ko ----"
+
+make -C kernel ARCH=$TARGET_ARCH modules -j18
+find $ANDROID_BUILD_TOP/kernel/drivers/net/wireless/rockchip_wlan/* -name "*.ko" | \
+xargs -n1 -i cp {} $ANDROID_BUILD_TOP/vendor/rockchip/common/wifi/modules
diff --git a/buildspec-rk3036.mk b/buildspec-rk3036.mk
new file mode 100644
index 0000000..fdb2394
--- /dev/null
+++ b/buildspec-rk3036.mk
@@ -0,0 +1,115 @@
+#
+# 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 ?= rk3036
+TARGET_BOARD_PLATFORM_GPU ?= mali400
+BOARD_USE_LOW_MEM ?= true
+
+# Choose a product to build for. Look in the products directory for ones
+# that work.
+ifndef TARGET_PRODUCT
+TARGET_PRODUCT:=rk3036
+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-rk312x.mk b/buildspec-rk312x.mk
new file mode 100644
index 0000000..ffdfd18
--- /dev/null
+++ b/buildspec-rk312x.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 ?= rk312x
+TARGET_BOARD_PLATFORM_GPU ?= mali400
+
+# Choose a product to build for. Look in the products directory for ones
+# that work.
+ifndef TARGET_PRODUCT
+TARGET_PRODUCT:=rk312x
+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-rk3288.mk b/buildspec-rk3288.mk
new file mode 100644
index 0000000..8f4b9f8
--- /dev/null
+++ b/buildspec-rk3288.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 ?= rk3288
+TARGET_BOARD_PLATFORM_GPU ?= mali-t760
+
+# Choose a product to build for. Look in the products directory for ones
+# that work.
+ifndef TARGET_PRODUCT
+TARGET_PRODUCT:=rk3288
+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 100644
index 0000000..38a8025
--- /dev/null
+++ b/buildspec.mk
@@ -0,0 +1,111 @@
+#
+# 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.
+######################################################################
+
+# Choose a product to build for. Look in the products directory for ones
+# that work.
+ifndef TARGET_PRODUCT
+TARGET_PRODUCT:=common
+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/common.mk b/common.mk
new file mode 100644
index 0000000..45b35cd
--- /dev/null
+++ b/common.mk
@@ -0,0 +1,13 @@
+include device/rockchip/common/BoardConfig.mk
+$(call inherit-product, device/rockchip/common/device.mk)
+
+PRODUCT_BRAND := rockchip
+PRODUCT_DEVICE := rksdk
+PRODUCT_NAME := rksdk
+PRODUCT_MODEL := rksdk
+PRODUCT_MANUFACTURER := rockchip
+
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.product.version = 1.0.0 \
+ ro.product.ota.host = www.rockchip.com:2300
diff --git a/device.mk b/device.mk
new file mode 100755
index 0000000..3720bbb
--- /dev/null
+++ b/device.mk
@@ -0,0 +1,679 @@
+#
+# Copyright 2014 Rockchip Limited
+#
+# 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.
+#
+
+# Prebuild apps
+ifneq ($(strip $(TARGET_PRODUCT)), )
+ TARGET_DEVICE_DIR=$(shell test -d device && find device -maxdepth 4 -path '*/$(TARGET_PRODUCT)/BoardConfig.mk')
+ TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(TARGET_DEVICE_DIR)))
+ $(shell python $(LOCAL_PATH)/auto_generator.py $(TARGET_BOARD_PLATFORM) preinstall bundled_persist-app)
+ $(shell python $(LOCAL_PATH)/auto_generator.py $(TARGET_BOARD_PLATFORM) preinstall_del bundled_uninstall_back-app)
+ $(shell python $(LOCAL_PATH)/auto_generator.py $(TARGET_BOARD_PLATFORM) preinstall_del_forever bundled_uninstall_gone-app)
+ -include device/rockchip/$(TARGET_BOARD_PLATFORM)/preinstall/preinstall.mk
+ -include device/rockchip/$(TARGET_BOARD_PLATFORM)/preinstall_del/preinstall.mk
+ -include device/rockchip/$(TARGET_BOARD_PLATFORM)/preinstall_del_forever/preinstall.mk
+endif
+
+#add for Nougat Bring Up
+#$(call inherit-product, device/rockchip/common/copy.mk)
+
+# Box product use device/rockchip/common/tv/tv_base.mk instead
+ifneq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+endif
+
+PRODUCT_AAPT_CONFIG ?= normal large xlarge hdpi xhdpi xxhdpi
+PRODUCT_AAPT_PREF_CONFIG ?= xhdpi
+
+########################################################
+# Kernel
+########################################################
+PRODUCT_COPY_FILES += \
+ $(TARGET_PREBUILT_KERNEL):kernel
+
+#SDK Version
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.rksdk.version=RK30_ANDROID$(PLATFORM_VERSION)-SDK-v1.00.00
+
+# Filesystem management tools
+PRODUCT_PACKAGES += \
+ fsck.f2fs \
+ mkfs.f2fs \
+ fsck_f2fs
+
+# PCBA tools
+ifeq ($(strip $(TARGET_ROCKCHIP_PCBATEST)), true)
+PRODUCT_PACKAGES += \
+ pcba_core \
+ bdt
+endif
+
+ifeq ($(strip $(BOARD_USE_LCDC_COMPOSER)), true)
+# setup dalvik vm configs.
+$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.hwui.texture_cache_size=72 \
+ ro.hwui.layer_cache_size=48 \
+ ro.hwui.r_buffer_cache_size=8 \
+ ro.hwui.path_cache_size=32 \
+ ro.hwui.gradient_cache_size=1 \
+ ro.hwui.drop_shadow_cache_size=6 \
+ ro.hwui.texture_cache_flushrate=0.4 \
+ ro.hwui.text_small_cache_width=1024 \
+ ro.hwui.text_small_cache_height=1024 \
+ ro.hwui.text_large_cache_width=2048 \
+ ro.hwui.text_large_cache_height=1024 \
+ ro.hwui.disable_scissor_opt=true \
+ ro.rk.screenshot_enable=true \
+ ro.rk.hdmi_enable=true \
+ sys.status.hidebar_enable=false \
+ persist.sys.ui.hw=true
+
+else
+ifeq ($(strip $(BOARD_USE_LOW_MEM)), true)
+include frameworks/native/build/tablet-dalvik-heap.mk
+else
+include frameworks/native/build/tablet-7in-hdpi-1024-dalvik-heap.mk
+endif
+endif
+
+PRODUCT_COPY_FILES += \
+ device/rockchip/common/init.rockchip.rc:root/init.rockchip.rc \
+ device/rockchip/common/init.$(TARGET_BOARD_HARDWARE).rc:root/init.$(TARGET_BOARD_HARDWARE).rc \
+ device/rockchip/common/init.$(TARGET_BOARD_HARDWARE).usb.rc:root/init.$(TARGET_BOARD_HARDWARE).usb.rc \
+ $(call add-to-product-copy-files-if-exists,device/rockchip/common/init.$(TARGET_BOARD_HARDWARE).bootmode.emmc.rc:root/init.$(TARGET_BOARD_HARDWARE).bootmode.emmc.rc) \
+ $(call add-to-product-copy-files-if-exists,device/rockchip/common/init.$(TARGET_BOARD_HARDWARE).bootmode.unknown.rc:root/init.$(TARGET_BOARD_HARDWARE).bootmode.unknown.rc) \
+ $(call add-to-product-copy-files-if-exists,device/rockchip/common/init.$(TARGET_BOARD_HARDWARE).bootmode.nvme.rc:root/init.$(TARGET_BOARD_HARDWARE).bootmode.nvme.rc) \
+ device/rockchip/common/ueventd.rockchip.rc:root/ueventd.$(TARGET_BOARD_HARDWARE).rc \
+ device/rockchip/common/media_profiles_default.xml:system/etc/media_profiles_default.xml \
+ device/rockchip/common/rk29-keypad.kl:system/usr/keylayout/rk29-keypad.kl \
+ device/rockchip/common/20050030_pwm.kl:system/usr/keylayout/20050030_pwm.kl \
+ device/rockchip/common/ff680030_pwm.kl:system/usr/keylayout/ff680030_pwm.kl \
+ device/rockchip/common/alarm_filter.xml:system/etc/alarm_filter.xml \
+ device/rockchip/common/ff420030_pwm.kl:system/usr/keylayout/ff420030_pwm.kl
+
+PRODUCT_COPY_FILES += \
+ hardware/broadcom/wlan/bcmdhd/config/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf \
+ hardware/broadcom/wlan/bcmdhd/config/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf
+
+#for ssv6051
+PRODUCT_COPY_FILES += \
+ vendor/rockchip/common/wifi/ssv6xxx/p2p_supplicant.conf:system/etc/wifi/p2p_supplicant.conf \
+
+PRODUCT_PACKAGES += \
+ hostapd \
+ wpa_supplicant \
+ wpa_supplicant.conf \
+ dhcpcd.conf
+
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
+PRODUCT_PACKAGES += \
+ libpppoe-jni \
+ pppoe-service \
+ librp-pppoe
+
+PRODUCT_SYSTEM_SERVER_JARS += \
+ pppoe-service
+endif
+
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/init.box.samba.rc:root/init.box.samba.rc
+endif
+
+ifeq ($(filter MediaTek_mt7601 MediaTek RealTek Espressif, $(strip $(BOARD_CONNECTIVITY_VENDOR))), )
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/init.connectivity.rc:root/init.connectivity.rc
+endif
+
+ifeq ($(findstring car,$(PRODUCT_BUILD_MODULE)),car)
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/audio_policy_$(PRODUCT_BUILD_MODULE).conf:system/etc/audio_policy.conf
+else
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/audio_policy_$(TARGET_BOARD_HARDWARE).conf:system/etc/audio_policy.conf
+endif
+
+
+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
+
+# For audio-recoard
+PRODUCT_PACKAGES += \
+ libsrec_jni
+
+# For tts test
+PRODUCT_PACKAGES += \
+ libwebrtc_audio_coding
+
+#camera
+$(call inherit-product-if-exists, hardware/rockchip/camera/Config/rk32xx_camera.mk)
+$(call inherit-product-if-exists, hardware/rockchip/camera/Config/user.mk)
+
+
+ifeq ($(BOARD_NFC_SUPPORT),true)
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \
+ frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml
+endif
+
+ifeq ($(BOARD_HAS_GPS),true)
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml
+endif
+
+ifeq ($(BOARD_COMPASS_SENSOR_SUPPORT),true)
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml
+endif
+
+ifeq ($(BOARD_GYROSCOPE_SENSOR_SUPPORT),true)
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml
+endif
+
+ifeq ($(BOARD_PROXIMITY_SENSOR_SUPPORT),true)
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml
+endif
+
+ifeq ($(BOARD_LIGHT_SENSOR_SUPPORT),true)
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml
+endif
+
+# CAMERA
+ifeq ($(BOARD_CAMERA_SUPPORT),true)
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml
+endif
+
+# USB HOST
+ifeq ($(BOARD_USB_HOST_SUPPORT),true)
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml
+endif
+
+# USB ACCESSORY
+ifeq ($(BOARD_USB_ACCESSORY_SUPPORT),true)
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml
+endif
+
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
+ PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/box_core_hardware.xml:system/etc/permissions/box_core_hardware.xml
+else ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), vr)
+ PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/vr_core_hardware.xml:system/etc/permissions/vr_core_hardware.xml
+else ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), laptop)
+ PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/laptop_core_hardware.xml:system/etc/permissions/laptop_core_hardware.xml
+else # tablet
+ PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/tablet_core_hardware.xml:system/etc/permissions/tablet_core_hardware.xml
+endif
+
+# Live Wallpapers
+PRODUCT_PACKAGES += \
+ LiveWallpapersPicker \
+ NoiseField \
+ PhaseBeam \
+ librs_jni \
+ libjni_pinyinime
+
+# HAL
+ifneq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), vr)
+PRODUCT_PACKAGES += \
+ power.$(TARGET_BOARD_PLATFORM)
+endif
+PRODUCT_PACKAGES += \
+ sensors.$(TARGET_BOARD_HARDWARE) \
+ gralloc.$(TARGET_BOARD_HARDWARE) \
+ hwcomposer.$(TARGET_BOARD_HARDWARE) \
+ lights.$(TARGET_BOARD_PLATFORM) \
+ camera.$(TARGET_BOARD_HARDWARE) \
+ Camera \
+ libvpu \
+ libstagefrighthw \
+ libgralloc_priv_omx \
+ akmd
+
+# iep
+ifneq ($(filter rk3188 rk3190 rk3026 rk3288 rk312x rk3368 rk3328 rk3366 rk3399, $(strip $(TARGET_BOARD_PLATFORM))), )
+BUILD_IEP := true
+PRODUCT_PACKAGES += \
+ libiep
+else
+BUILD_IEP := false
+endif
+
+# charge
+PRODUCT_PACKAGES += \
+ charger \
+ charger_res_images
+
+# Allows healthd to boot directly from charger mode rather than initiating a reboot.
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
+ ro.enable_boot_charger_mode=0
+
+# Add board.platform default property to parsing related rc
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
+ ro.board.platform=$(strip $(TARGET_BOARD_PLATFORM))
+
+PRODUCT_CHARACTERISTICS := tablet
+
+# audio lib
+PRODUCT_PACKAGES += \
+ audio_policy.$(TARGET_BOARD_HARDWARE) \
+ audio.primary.$(TARGET_BOARD_HARDWARE) \
+ audio.alsa_usb.$(TARGET_BOARD_HARDWARE) \
+ audio.a2dp.default\
+ audio.r_submix.default\
+ libaudioroute\
+ audio.usb.default
+
+# Filesystem management tools
+# EXT3/4 support
+PRODUCT_PACKAGES += \
+ mke2fs \
+ e2fsck \
+ tune2fs \
+ resize2fs
+
+# audio lib
+PRODUCT_PACKAGES += \
+ libasound \
+ alsa.default \
+ acoustics.default \
+ libtinyalsa \
+ tinymix \
+ tinyplay \
+ tinypcminfo
+
+PRODUCT_PACKAGES += \
+ alsa.audio.primary.$(TARGET_BOARD_HARDWARE)\
+ alsa.audio_policy.$(TARGET_BOARD_HARDWARE)
+
+$(call inherit-product-if-exists, external/alsa-lib/copy.mk)
+$(call inherit-product-if-exists, external/alsa-utils/copy.mk)
+
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.sys.strictmode.visual=false
+
+ifeq ($(strip $(BOARD_HAVE_BLUETOOTH)),true)
+ PRODUCT_PROPERTY_OVERRIDES += ro.rk.bt_enable=true
+else
+ PRODUCT_PROPERTY_OVERRIDES += ro.rk.bt_enable=false
+endif
+
+ifeq ($(strip $(MT6622_BT_SUPPORT)),true)
+ PRODUCT_PROPERTY_OVERRIDES += ro.rk.btchip=mt6622
+endif
+
+ifeq ($(strip $(BLUETOOTH_USE_BPLUS)),true)
+ PRODUCT_PROPERTY_OVERRIDES += ro.rk.btchip=broadcom.bplus
+endif
+
+ifeq ($(strip $(BOARD_HAVE_FLASH)), true)
+ PRODUCT_PROPERTY_OVERRIDES += ro.rk.flash_enable=true
+else
+ PRODUCT_PROPERTY_OVERRIDES += ro.rk.flash_enable=false
+endif
+
+ifeq ($(strip $(MT7601U_WIFI_SUPPORT)),true)
+ PRODUCT_PROPERTY_OVERRIDES += ro.rk.wifichip=mt7601u
+endif
+
+
+PRODUCT_TAGS += dalvik.gc.type-precise
+
+
+########################################################
+# build with UMS? CDROM?
+########################################################
+ifeq ($(strip $(BUILD_WITH_UMS)),true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.factory.hasUMS=true \
+ persist.sys.usb.config=mass_storage,adb
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/init.rockchip.hasUMS.true.rc:root/init.$(TARGET_BOARD_HARDWARE).environment.rc
+else
+ifeq ($(strip $(BUILD_WITH_CDROM)),true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.factory.hasUMS=cdrom \
+ ro.factory.cdrom=$(BUILD_WITH_CDROM_PATH) \
+ persist.sys.usb.config=mass_storage,adb
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/init.rockchip.hasCDROM.true.rc:root/init.$(TARGET_BOARD_HARDWARE).environment.rc
+else
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.factory.hasUMS=false \
+ persist.sys.usb.config=mtp,adb \
+ testing.mediascanner.skiplist = /mnt/shell/emulated/Android/
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/init.rockchip.hasUMS.false.rc:root/init.$(TARGET_BOARD_HARDWARE).environment.rc
+endif
+endif
+
+#$_rbox_$_modify_$_zhengyang: add displayd
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
+PRODUCT_PACKAGES += \
+ displayd
+endif
+
+########################################################
+# build with drmservice
+########################################################
+ifeq ($(strip $(BUILD_WITH_DRMSERVICE)),true)
+PRODUCT_PACKAGES += drmservice
+endif
+
+########################################################
+# this product has GPS or not
+########################################################
+ifeq ($(strip $(BOARD_HAS_GPS)),true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.factory.hasGPS=true
+else
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.factory.hasGPS=false
+endif
+########################################################
+# this product has Ethernet or not
+########################################################
+ifneq ($(strip $(BOARD_HS_ETHERNET)),true)
+PRODUCT_PROPERTY_OVERRIDES += ro.rk.ethernet_enable=false
+endif
+
+#######################################################
+#build system support ntfs?
+########################################################
+ifeq ($(strip $(BOARD_IS_SUPPORT_NTFS)),true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.factory.storage_suppntfs=true
+else
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.factory.storage_suppntfs=false
+endif
+
+########################################################
+# build without barrery
+########################################################
+ifeq ($(strip $(BUILD_WITHOUT_BATTERY)), true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.factory.without_battery=true
+else
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.factory.without_battery=false
+endif
+
+# NTFS support
+PRODUCT_PACKAGES += \
+ ntfs-3g
+
+PRODUCT_PACKAGES += \
+ com.android.future.usb.accessory
+
+#device recovery ui
+#PRODUCT_PACKAGES += \
+ librecovery_ui_$(TARGET_PRODUCT)
+
+# for bugreport
+ifneq ($(TARGET_BUILD_VARIANT), user)
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/bugreport.sh:system/bin/bugreport.sh
+endif
+
+ifeq ($(strip $(BOARD_BOOT_READAHEAD)), true)
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/proprietary/readahead/readahead:root/sbin/readahead \
+ $(LOCAL_PATH)/proprietary/readahead/readahead_list.txt:root/readahead_list.txt
+endif
+
+#whtest for bin
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/whtest.sh:system/bin/whtest.sh
+
+# for preinstall
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/preinstall_cleanup.sh:system/bin/preinstall_cleanup.sh
+
+$(call inherit-product-if-exists, external/wlan_loader/wifi-firmware.mk)
+
+# Copy manifest to system/
+ifeq ($(strip $(SYSTEM_WITH_MANIFEST)),true)
+PRODUCT_COPY_FILES += \
+ manifest.xml:system/manifest.xml
+endif
+
+# Copy init.usbstorage.rc to root
+#ifeq ($(strip $(BUILD_WITH_MULTI_USB_PARTITIONS)),true)
+#PRODUCT_COPY_FILES += \
+# $(LOCAL_PATH)/init.usbstorage.rc:root/init.usbstorage.rc
+#endif
+
+ifeq ($(strip $(BOARD_CONNECTIVITY_MODULE)), ap6xxx_nfc)
+#NFC packages
+PRODUCT_PACKAGES += \
+ nfc_nci.$(TARGET_BOARD_HARDWARE) \
+ NfcNci \
+ Tag \
+ com.android.nfc_extras
+
+# NFCEE access control
+ifeq ($(TARGET_BUILD_VARIANT),user)
+NFCEE_ACCESS_PATH := $(LOCAL_PATH)/nfc/nfcee_access.xml
+else
+NFCEE_ACCESS_PATH := $(LOCAL_PATH)/nfc/nfcee_access_debug.xml
+endif
+
+copyNfcFirmware = $(subst XXXX,$(strip $(1)),hardware/broadcom/nfc/firmware/XXXX:/system/vendor/firmware/XXXX)
+# NFC access control + feature files + configuration
+PRODUCT_COPY_FILES += \
+ $(NFCEE_ACCESS_PATH):system/etc/nfcee_access.xml \
+ frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \
+ frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \
+ frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml \
+ $(LOCAL_PATH)/nfc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \
+ $(LOCAL_PATH)/nfc/libnfc-brcm-20791b03.conf:system/etc/libnfc-brcm-20791b03.conf \
+ $(LOCAL_PATH)/nfc/libnfc-brcm-20791b04.conf:system/etc/libnfc-brcm-20791b04.conf \
+ $(LOCAL_PATH)/nfc/libnfc-brcm-20791b05.conf:system/etc/libnfc-brcm-20791b05.conf \
+ $(LOCAL_PATH)/nfc/libnfc-brcm-43341b00.conf:system/etc/libnfc-brcm-43341b00.conf \
+ $(call copyNfcFirmware, BCM20791B3_002.004.010.0161.0000_Generic_I2CLite_NCD_Signed_configdata.ncd) \
+ $(call copyNfcFirmware, BCM20791B3_002.004.010.0161.0000_Generic_PreI2C_NCD_Signed_configdata.ncd) \
+ $(call copyNfcFirmware, BCM20791B5_002.006.013.0011.0000_Generic_I2C_NCD_Unsigned_configdata.ncd) \
+ $(call copyNfcFirmware, BCM43341NFCB0_002.001.009.0021.0000_Generic_I2C_NCD_Signed_configdata.ncd) \
+ $(call copyNfcFirmware, BCM43341NFCB0_002.001.009.0021.0000_Generic_PreI2C_NCD_Signed_configdata.ncd)
+endif
+
+# for realtek bluetooth
+#PRODUCT_PACKAGES += \
+# bluetooth_rtk.default \
+# libbt-vendor.so \
+# libbt-vendor_uart.so \
+# libbt-vendor_usb.so \
+# bt_vendor.conf
+# $(call inherit-product, hardware/realtek/rtkbt/rtkbt.mk)
+
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
+include device/rockchip/common/samba/rk31_samba.mk
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.rk.screenoff_time=2147483647
+else
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.rk.screenoff_time=60000
+endif
+
+# setup dm-verity configs.
+# uncomment the two lines if use verity
+#PRODUCT_SYSTEM_VERITY_PARTITION := /dev/block/platform/ff0f0000.rksdmmc/by-name/system
+#$(call inherit-product, build/target/product/verity.mk)
+
+ifeq ($(strip $(BUILD_BOX_WITH_GOOGLE_MARKET)), true)
+$(call inherit-product-if-exists, vendor/partner_gms/products/gms-mini-box.mk)
+$(call inherit-product-if-exists, vendor/widevine/widevine.mk)
+endif
+
+ifeq ($(strip $(BUILD_WITH_GOOGLE_MARKET)), true)
+ifeq ($(strip $(BUILD_WITH_GOOGLE_MARKET_ALL)), true)
+$(call inherit-product-if-exists, vendor/partner_gms/products/gms.mk)
+else
+$(call inherit-product-if-exists, vendor/partner_gms/products/gms-mandatory.mk)
+endif
+ifeq ($(strip $(BUILD_WITH_GOOGLE_FRP)), true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.frp.pst=/dev/block/platform/fe330000.sdhci/by-name/frp
+endif
+endif
+
+#ro.product.first_api_level indicates the first api level, device has been commercially launced on.
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.product.first_api_level=23
+
+$(call inherit-product-if-exists, vendor/rockchip/common/device-vendor.mk)
+
+########################################################
+# this product has support remotecontrol or not
+########################################################
+ifeq ($(strip $(BOARD_HAS_REMOTECONTROL)),true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.config.enable.remotecontrol=true
+else
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.config.enable.remotecontrol=false
+endif
+
+ifeq ($(strip $(BUILD_WITH_SKIPVERIFY)),true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.config.enable.skipverify=true
+endif
+
+ifneq ($(filter rk%, $(TARGET_BOARD_PLATFORM)), )
+PRODUCT_COPY_FILES += \
+ device/rockchip/common/performance_info.xml:system/etc/performance_info.xml
+endif
+
+# hdmi cec
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.hdmi.cec.xml:system/etc/permissions/android.hardware.hdmi.cec.xml
+PRODUCT_PROPERTY_OVERRIDES += ro.hdmi.device_type=4
+PRODUCT_PACKAGES += \
+ hdmi_cec.$(TARGET_BOARD_HARDWARE)
+endif
+PRODUCT_PACKAGES += \
+ abc
+# boot optimization
+PRODUCT_COPY_FILES += \
+ device/rockchip/common/boot_boost/libboot_optimization.so:system/lib/libboot_optimization.so
+ifeq ($(strip $(BOARD_WITH_BOOT_BOOST)),true)
+PRODUCT_COPY_FILES += \
+ device/rockchip/common/boot_boost/prescan_packages.xml:system/etc/prescan_packages.xml
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.boot_boost.enable=true
+endif
+
+# mem optimization
+ifeq ($(strip $(BOARD_WITH_MEM_OPTIMISE)),true)
+PRODUCT_COPY_FILES += \
+ device/rockchip/common/lowmem_package_filter.xml:system/etc/lowmem_package_filter.xml
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.mem_optimise.enable=true
+endif
+
+
+# lowmem mode
+ifeq ($(strip $(BOARD_USE_LOW_MEM)),true)
+PRODUCT_COPY_FILES += \
+ device/rockchip/common/lowmem_package_filter.xml:system/etc/lowmem_package_filter.xml
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.config.low_ram=true
+endif
+
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), vr)
+PRODUCT_COPY_FILES += \
+ device/rockchip/common/lowmem_package_filter.xml:system/etc/lowmem_package_filter.xml
+endif
+
+# neon transform library by djw
+PRODUCT_COPY_FILES += \
+ device/rockchip/common/neon_transform/lib/librockchipxxx.so:system/lib/librockchipxxx.so \
+ device/rockchip/common/neon_transform/lib64/librockchipxxx.so:system/lib64/librockchipxxx.so
+
+#if force app can see udisk
+ifeq ($(strip $(BOARD_FORCE_UDISK_VISIBLE)),true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.udisk.visible=true
+endif
+
+#if box platform force app can see udisk
+ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.udisk.visible=true
+endif
+
+#if disable safe mode to speed up booting time
+ifeq ($(strip $(BOARD_DISABLE_SAFE_MODE)),true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.safemode.disabled=true
+endif
+
+ifeq ($(strip $(BOARD_ENABLE_3G_DONGLE)),true)
+ifeq ($(strip $(PRODUCT_BUILD_MODULE)), px3car)
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.enable.3g.dongle=true \
+ rild.libpath=/system/lib/libril-rk29-dataonly.so
+else
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.enable.3g.dongle=true \
+ rild.libpath=/system/lib/libreference-ril.so
+endif
+endif
+
+#boot and shutdown animation, ringing
+ifeq ($(strip $(BOOT_SHUTDOWN_ANIMATION_RINGING)),true)
+include device/rockchip/common/bootshutdown/bootshutdown.mk
+endif
+
+ifeq ($(strip $(BOARD_ENABLE_PMS_MULTI_THREAD_SCAN)), true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.pms.multithreadscan=true
+endif
+
+#add for hwui property
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.hwui.texture_cache_size=72 \
+ ro.hwui.layer_cache_size=48 \
+ ro.hwui.r_buffer_cache_size=8 \
+ ro.hwui.path_cache_size=32 \
+ ro.hwui.gradient_cache_size=1 \
+ ro.hwui.drop_shadow_cache_size=6 \
+ ro.hwui.texture_cache_flushrate=0.4 \
+ ro.hwui.text_small_cache_width=1024 \
+ ro.hwui.text_small_cache_height=1024 \
+ ro.hwui.text_large_cache_width=2048 \
+ ro.hwui.text_large_cache_height=1024 \
+ ro.hwui.disable_scissor_opt=true \
+ ro.rk.screenshot_enable=true \
+ ro.rk.hdmi_enable=true \
+ sys.status.hidebar_enable=false \
+ persist.sys.ui.hw=true
diff --git a/dumpstate/Android.mk b/dumpstate/Android.mk
new file mode 100755
index 0000000..4f65b50
--- /dev/null
+++ b/dumpstate/Android.mk
@@ -0,0 +1,30 @@
+# 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.
+
+LOCAL_PATH:= $(call my-dir)
+ifeq (foo, )
+include $(CLEAR_VARS)
+
+LOCAL_C_INCLUDES := frameworks/native/cmds/dumpstate
+
+LOCAL_SRC_FILES := dumpstate.cpp
+
+LOCAL_MODULE := libdumpstate.$(TARGET_PRODUCT)
+ifeq ($(strip $(TARGET_BOARD_PLATFORM)),rk3399)
+LOCAL_CFLAGS += -DTARGET_BOARD_PLATFORM_RK3399
+endif
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_STATIC_LIBRARY)
+endif
diff --git a/dumpstate/NOTICE b/dumpstate/NOTICE
new file mode 100644
index 0000000..e2ca067
--- /dev/null
+++ b/dumpstate/NOTICE
@@ -0,0 +1,190 @@
+
+ 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.
+
+ 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.
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
diff --git a/dumpstate/dumpstate.cpp b/dumpstate/dumpstate.cpp
new file mode 100755
index 0000000..d56cbee
--- /dev/null
+++ b/dumpstate/dumpstate.cpp
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+#include <dumpstate.h>
+
+void dumpstate_board()
+{
+#ifdef TARGET_BOARD_PLATFORM_RK3399
+ dump_file("Battery Statistics", "/sys/class/power_supply/test_battery/uevent");
+ dump_file("touchscreen name", "/sys/class/input/input0/name");
+ dump_file("dma buf info", "/d/dma_buf/bufinfo");
+ dump_file("ION mali", "/d/mali/gpu_memory");
+ run_command("ION CLIENTS", 5, SU_PATH, "root", "/system/bin/sh", "-c", "for f in $(ls /d/ion/clients/*); do echo $f; cat $f; done", NULL);
+ run_command("ION HEAPS", 5, SU_PATH, "root", "/system/bin/sh", "-c", "for f in $(ls /d/ion/heaps/*); do echo $f; cat $f; done", NULL);
+
+#else
+ dump_file("ion CMA heaps", "/d/ion/heaps/cma");
+ dump_file("ion CMA bitmaps", "/d/ion/heaps/cma-bitmap");
+ dump_file("ion CMA vmalloc", "/d/ion/heaps/vmalloc");
+ dump_file("ion CMA ion_snapshot", "/d/ion/ion_snapshot");
+#endif
+};
diff --git a/ff420030_pwm.kl b/ff420030_pwm.kl
new file mode 100755
index 0000000..3409194
--- /dev/null
+++ b/ff420030_pwm.kl
@@ -0,0 +1,30 @@
+#$_FOR_ROCKCHIP_RBOX_$
+#$_rbox_$_modify_$_chenzhi_20120220: add for IR remote
+
+key 28 ENTER
+key 116 POWER
+key 158 BACK
+key 139 MENU
+key 217 SEARCH
+key 232 DPAD_CENTER
+key 108 DPAD_DOWN
+key 103 DPAD_UP
+key 102 HOME
+key 105 DPAD_LEFT
+key 106 DPAD_RIGHT
+key 115 VOLUME_UP
+key 114 VOLUME_DOWN
+key 143 NOTIFICATION
+key 113 VOLUME_MUTE
+key 388 TV_KEYMOUSE_MODE_SWITCH
+key 150 EXPLORER
+#key 400 TV_MEDIA_MULT_BACKWARD
+#key 401 TV_MEDIA_MULT_FORWARD
+#key 402 TV_MEDIA_PLAY_PAUSE
+#key 64 TV_MEDIA_PLAY
+#key 65 TV_MEDIA_PAUSE
+#key 66 TV_MEDIA_STOP
+#key 67 TV_MEDIA_REWIND
+#key 68 TV_MEDIA_FAST_FORWARD
+#key 87 TV_MEDIA_PREVIOUS
+#key 88 TV_MEDIA_NEXT
diff --git a/ff680030_pwm.kl b/ff680030_pwm.kl
new file mode 100755
index 0000000..65389d9
--- /dev/null
+++ b/ff680030_pwm.kl
@@ -0,0 +1,29 @@
+#$_FOR_ROCKCHIP_RBOX_$
+#$_rbox_$_modify_$_chenzhi_20120220: add for IR remote
+
+key 28 ENTER
+key 116 POWER
+key 158 BACK
+key 139 MENU
+key 217 SEARCH
+key 232 DPAD_CENTER
+key 108 DPAD_DOWN
+key 103 DPAD_UP
+key 102 HOME
+key 105 DPAD_LEFT
+key 106 DPAD_RIGHT
+key 115 VOLUME_UP
+key 114 VOLUME_DOWN
+key 143 NOTIFICATION
+key 113 VOLUME_MUTE
+key 388 TV_KEYMOUSE_MODE_SWITCH
+#key 400 TV_MEDIA_MULT_BACKWARD
+#key 401 TV_MEDIA_MULT_FORWARD
+#key 402 TV_MEDIA_PLAY_PAUSE
+#key 64 TV_MEDIA_PLAY
+#key 65 TV_MEDIA_PAUSE
+#key 66 TV_MEDIA_STOP
+#key 67 TV_MEDIA_REWIND
+#key 68 TV_MEDIA_FAST_FORWARD
+#key 87 TV_MEDIA_PREVIOUS
+#key 88 TV_MEDIA_NEXT
diff --git a/fstab.rk30board.bootmode.emmc b/fstab.rk30board.bootmode.emmc
new file mode 100644
index 0000000..62621b7
--- /dev/null
+++ b/fstab.rk30board.bootmode.emmc
@@ -0,0 +1,31 @@
+# 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/ff0f0000.rksdmmc/by-name/system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,resize,check
+# use this line below instead to enable verity
+#/dev/block/platform/ff0f0000.rksdmmc/by-name/system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,check,verify
+/dev/block/platform/ff0f0000.rksdmmc/by-name/cache /cache ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait
+/dev/block/platform/ff0f0000.rksdmmc/by-name/metadata /metadata ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check
+/dev/block/platform/ff0f0000.rksdmmc/by-name/userdata /data f2fs noatime,nodiratime,nosuid,nodev wait,check,encryptable=/metadata/key_file
+/dev/block/platform/ff0f0000.rksdmmc/by-name/userdata /data ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard,errors=panic wait,check,encryptable=/metadata/key_file
+# /dev/block/platform/ff0f0000.rksdmmc/by-name/radical_update /radical_update ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait
+
+/devices/ff0f0000.rksdmmc/mmc_host/mmc /mnt/internal_sd vfat defaults voldmanaged=internal_sd:15,noemulatedsd
+/devices/ff0c0000.rksdmmc/mmc_host/mmc /mnt/external_sd vfat defaults voldmanaged=external_sd:auto
+# Vold does not support multi device path yet
+# /devices/ff580000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+# /devices/ff500000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+#/devices/ff540000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+
+
+# non box product,configuration to the first item, will filter out left
+/devices/ff580000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+/devices/ff500000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+/devices/ff540000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+/devices/ff540000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+/devices/ff540000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+/devices/ff540000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+
+/dev/block/zram0 none swap defaults zramsize=533413200
diff --git a/fstab.rk30board.bootmode.unknown b/fstab.rk30board.bootmode.unknown
new file mode 100644
index 0000000..07319de
--- /dev/null
+++ b/fstab.rk30board.bootmode.unknown
@@ -0,0 +1,30 @@
+# 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,check
+# 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 f2fs noatime,nodiratime,nosuid,nodev,errors=recover wait,check,forceencrypt=/metadata/key_file
+/dev/block/rknand_userdata /data ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard,errors=panic wait,check,forceencrypt=/metadata/key_file
+# /dev/block/rknand_radical_update /radical_update ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait
+
+/devices/virtual/block/rknand_user /mnt/internal_sd vfat defaults voldmanaged=internal_sd:auto,noemulatedsd
+/devices/ff0c0000.rksdmmc/mmc_host/mmc /mnt/external_sd vfat defaults voldmanaged=external_sd:auto
+# Vold does not support multi device path yet
+# /devices/ff580000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+# /devices/ff500000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+#/devices/ff540000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+
+# non box product,configuration to the first item, will filter out left
+/devices/ff580000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+/devices/ff500000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+/devices/ff540000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+/devices/ff540000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+/devices/ff540000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+/devices/ff540000.usb /mnt/usb_storage vfat defaults voldmanaged=usb_storage:auto
+
+/dev/block/zram0 none swap defaults zramsize=533413200
diff --git a/health/Android.mk b/health/Android.mk
new file mode 100644
index 0000000..9f5cb4d
--- /dev/null
+++ b/health/Android.mk
@@ -0,0 +1,33 @@
+# 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.
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_C_INCLUDES := system/core/healthd/include/healthd
+ifeq ($(strip $(TARGET_BOARD_PLATFORM)), sofia3gr)
+LOCAL_SRC_FILES := \
+ healthd-rockchip.cpp
+else
+LOCAL_CFLAGS += -DFEATURE_SAVE_CAPACITY
+LOCAL_SRC_FILES := \
+ healthd-rockchip.cpp \
+ bat_cap.cpp
+endif
+
+LOCAL_MODULE := libhealthd.$(TARGET_PRODUCT)
+
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/health/bat_cap.cpp b/health/bat_cap.cpp
new file mode 100644
index 0000000..916e01c
--- /dev/null
+++ b/health/bat_cap.cpp
@@ -0,0 +1,140 @@
+#define CHARGER_KLOG_LEVEL 6
+
+#include <stdio.h>
+#include <string.h>
+#include <cutils/klog.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <dirent.h>
+
+#define LOGE(x...) do { KLOG_ERROR("bat_cap", x); } while (0)
+#define LOGI(x...) do { KLOG_INFO("bat_cap", x); } while (0)
+#define LOGV(x...) do { KLOG_DEBUG("bat_cap", x); } while (0)
+
+//#define CHARGER_SAVE_WHEN_RECOVERY 1
+#ifdef CHARGER_SAVE_WHEN_RECOVERY
+#define CAPACITY_PATH "/metadata/battery.bat"
+#else
+#define CAPACITY_PATH "/data/battery.bat"
+#endif
+
+char oldcap_path[PATH_MAX];
+
+int get_oldcap_path(void)
+{
+ const char *dirname = "/sys/devices";
+ DIR* dir = opendir(dirname);
+ oldcap_path[0] = '\n';
+
+ if (dir == NULL) {
+ LOGE("Could not open %s\n", dirname);
+ return -1;
+ }
+
+ struct dirent* entry;
+
+ while ((entry = readdir(dir))) {
+ const char* name = entry->d_name;
+ if (strstr(name, ".adc")){
+ sprintf(oldcap_path, "%s/%s", dirname, name);
+ LOGI("oldcap path is %s\n", oldcap_path);
+ break;
+ }
+ }
+ closedir(dir);
+ if (oldcap_path[0] == '\n')
+ return -1;
+
+
+ dir = opendir(oldcap_path);
+ if (dir == NULL) {
+ LOGE("Could not open %s\n", oldcap_path);
+ oldcap_path[0] = '\n';
+ return -1;
+ }
+
+ while ((entry = readdir(dir))) {
+ const char* name_adc = entry->d_name;
+ if (strstr(name_adc, "adc-battery.")){
+ sprintf(oldcap_path, "%s/%s/oldcap", oldcap_path, name_adc);
+ LOGI("oldcap path is %s\n", oldcap_path);
+ closedir(dir);
+ return 0;
+ }
+ }
+ closedir(dir);
+ oldcap_path[0] = '\n';
+ return -1;
+}
+
+
+int put_old_adc_cap(int bat_cap)
+{
+ // add by xhc
+ FILE* fd = NULL;
+ static int s_old_capacity = -1;
+ char cap_buf[8];
+
+ if(oldcap_path[0] == '\n') {
+ return -1;
+ }
+
+ if ((s_old_capacity != bat_cap) && (bat_cap >= 0 && bat_cap <= 100)) {
+
+ if (s_old_capacity == -1) {
+ s_old_capacity = bat_cap;
+ return 0;
+ }
+
+ LOGI("rk set new_capacity; new_capacity = %d, old_capacity = %d\n", bat_cap, s_old_capacity);
+ s_old_capacity = bat_cap;
+ fd = fopen(CAPACITY_PATH, "w");
+ if (fd == NULL) {
+ LOGE("write capacity fopen error\n");
+
+ } else {
+ sprintf(cap_buf, "%d\n", bat_cap);
+ fputs(cap_buf, fd);
+ fclose(fd);
+ }
+ }
+ return 0;
+}
+
+int load_old_adc_cap(void)
+{
+
+ FILE *fd = NULL;
+ char cap_buf[8];
+
+ get_oldcap_path();
+
+ if(oldcap_path[0] == '\n') {
+ LOGE("oldcap_path no exist\n");
+ return -1;
+ }
+
+
+ fd = fopen(CAPACITY_PATH, "r");
+ if (fd == NULL) {
+ LOGE("read capacity fopen error\n");
+ } else {
+ fgets(cap_buf, 6, fd);
+ //fread(cap_buf, 1, 6, fd);
+ fclose(fd);
+ LOGI("read_capacity is %s\n", cap_buf);
+
+
+ fd = fopen(oldcap_path, "w");
+ if (fd == NULL) {
+ LOGE("read oldcap fopen error\n");
+ } else {
+ LOGI("write oldcap is %s\n", cap_buf);
+ fputs(cap_buf, fd);
+ fclose(fd);
+ }
+ }
+ return 0;
+
+}
+
diff --git a/health/healthd-rockchip.cpp b/health/healthd-rockchip.cpp
new file mode 100644
index 0000000..e844029
--- /dev/null
+++ b/health/healthd-rockchip.cpp
@@ -0,0 +1,279 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "healthd-rk3288"
+#include <healthd.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <cutils/klog.h>
+#include <sys/types.h>
+#include <sys/sysinfo.h>
+
+/* Nominal voltage for ENERGY_COUNTER computation */
+#define VOLTAGE_NOMINAL 3.7
+
+#define POWER_SUPPLY_SUBSYSTEM "power_supply"
+#define POWER_SUPPLY_SYSFS_PATH "/sys/class/" POWER_SUPPLY_SUBSYSTEM
+
+#define BATTERY_PATH POWER_SUPPLY_SYSFS_PATH "/rk-bat"
+
+#define BATTERY_FULL 100
+#define BATTERY_LOW 15
+#define BATTERY_CRITICAL_LOW_MV (3000)
+#define BATTERY_DEAD_MV (2800)
+#define NORMAL_MAX_SOC_DEC (2)
+#define CRITICAL_LOW_FORCE_SOC_DROP (6)
+#define UPDATE_PERIOD_MINIMUM_S (55)
+
+#ifdef FEATURE_SAVE_CAPACITY
+extern int put_old_adc_cap(int bat_cap);
+extern int load_old_adc_cap(void);
+#endif
+
+using namespace android;
+static bool first_update_done;
+static int lasttime_soc;
+static unsigned int rk3288_monitor_voltage;
+static long last_update_time;
+static bool force_decrease;
+
+static int read_sysfs(const char *path, char *buf, size_t size) {
+ char *cp = NULL;
+
+ int fd = open(path, O_RDONLY, 0);
+ if (fd == -1) {
+ KLOG_ERROR(LOG_TAG, "Could not open '%s'\n", path);
+ return -1;
+ }
+
+ ssize_t count = TEMP_FAILURE_RETRY(read(fd, buf, size));
+ if (count > 0)
+ cp = (char *)memrchr(buf, '\n', count);
+
+ if (cp)
+ *cp = '\0';
+ else
+ buf[0] = '\0';
+
+ close(fd);
+ return count;
+}
+
+static void write_sysfs(const char *path, char *s)
+{
+ char buf[80];
+ int len;
+ int fd = open(path, O_WRONLY);
+
+ if (fd < 0) {
+ strerror_r(errno, buf, sizeof(buf));
+ KLOG_ERROR(LOG_TAG, "Error opening %s: %s\n", path, buf);
+ return;
+ }
+
+ len = write(fd, s, strlen(s));
+ if (len < 0) {
+ strerror_r(errno, buf, sizeof(buf));
+ KLOG_ERROR(LOG_TAG, "Error writing to %s: %s\n", path, buf);
+ }
+
+ close(fd);
+}
+
+static int64_t get_int64_field(const char *path) {
+ const int SIZE = 21;
+ char buf[SIZE];
+
+ int64_t value = 0;
+ if (read_sysfs(path, buf, SIZE) > 0) {
+ value = strtoll(buf, NULL, 0);
+ }
+ return value;
+}
+
+static void rk3288_status_check(struct BatteryProperties *props)
+{
+ if (props->batteryStatus == BATTERY_STATUS_UNKNOWN)
+ props->batteryStatus = BATTERY_STATUS_DISCHARGING;
+ else if (props->batteryStatus == BATTERY_STATUS_FULL &&
+ props->batteryLevel < BATTERY_FULL)
+ props->batteryStatus = BATTERY_STATUS_CHARGING;
+}
+
+static void rk3288_health_check(struct BatteryProperties *props)
+{
+ if (props->batteryLevel >= BATTERY_FULL)
+ props->batteryHealth = BATTERY_HEALTH_GOOD;
+ else if (props->batteryLevel < BATTERY_LOW)
+ props->batteryHealth = BATTERY_HEALTH_DEAD;
+ else
+ props->batteryHealth = BATTERY_HEALTH_GOOD;
+}
+
+#if 0
+static void rk3288_voltage_monitor_check(struct BatteryProperties *props)
+{
+ unsigned int monitor_voltage = 0;
+ int vcell_mv;
+ char voltage[10];
+
+ if (props->batteryStatus != BATTERY_STATUS_CHARGING &&
+ props->batteryStatus != BATTERY_STATUS_FULL && props->batteryLevel > 0) {
+ vcell_mv = props->batteryVoltage;
+ if (vcell_mv > BATTERY_CRITICAL_LOW_MV)
+ monitor_voltage = BATTERY_CRITICAL_LOW_MV;
+ else if (vcell_mv > BATTERY_DEAD_MV)
+ monitor_voltage = BATTERY_DEAD_MV;
+ }
+
+ if (monitor_voltage != rk3288_monitor_voltage) {
+ snprintf(voltage, sizeof(voltage), "%d", monitor_voltage);
+ write_sysfs(VOLTAGE_MONITOR_PATH, voltage);
+ rk3288_monitor_voltage = monitor_voltage;
+ }
+}
+#endif
+
+static void rk3288_soc_adjust(struct BatteryProperties *props)
+{
+ int soc_decrease;
+ int soc, vcell_mv;
+ struct sysinfo info;
+ long uptime = 0;
+ int ret;
+
+ ret = sysinfo(&info);
+ if (ret) {
+ KLOG_ERROR(LOG_TAG, "Fail to get sysinfo!!\n");
+ uptime = last_update_time;
+ } else
+ uptime = info.uptime;
+
+ if (!first_update_done) {
+ if (props->batteryLevel >= BATTERY_FULL) {
+ props->batteryLevel = BATTERY_FULL - 1;
+ lasttime_soc = BATTERY_FULL - 1;
+ } else {
+ lasttime_soc = props->batteryLevel;
+ }
+ last_update_time = uptime;
+ first_update_done = true;
+ }
+
+ if (props->batteryStatus == BATTERY_STATUS_FULL)
+ soc = BATTERY_FULL;
+ else if (props->batteryLevel >= BATTERY_FULL &&
+ lasttime_soc < BATTERY_FULL)
+ soc = BATTERY_FULL - 1;
+ else
+ soc = props->batteryLevel;
+
+ if (props->batteryLevel > BATTERY_FULL)
+ props->batteryLevel = BATTERY_FULL;
+ else if (props->batteryLevel < 0)
+ props->batteryLevel = 0;
+
+ vcell_mv = props->batteryVoltage;
+ if (props->batteryStatus == BATTERY_STATUS_DISCHARGING ||
+ props->batteryStatus == BATTERY_STATUS_NOT_CHARGING ||
+ props->batteryStatus == BATTERY_STATUS_UNKNOWN) {
+ if (vcell_mv >= BATTERY_CRITICAL_LOW_MV) {
+ force_decrease = false;
+ soc_decrease = lasttime_soc - soc;
+ if (soc_decrease < 0) {
+ soc = lasttime_soc;
+ goto done;
+ }
+
+ if (uptime > last_update_time &&
+ uptime - last_update_time <= UPDATE_PERIOD_MINIMUM_S) {
+ soc = lasttime_soc;
+ goto done;
+ }
+
+ if (soc_decrease < 0)
+ soc_decrease = 0;
+ else if (soc_decrease > NORMAL_MAX_SOC_DEC)
+ soc_decrease = NORMAL_MAX_SOC_DEC;
+
+ soc = lasttime_soc - soc_decrease;
+ } else if (vcell_mv < BATTERY_DEAD_MV) {
+ soc = 0;
+ } else {
+ if (force_decrease &&
+ uptime > last_update_time &&
+ uptime - last_update_time <= UPDATE_PERIOD_MINIMUM_S) {
+ soc = lasttime_soc;
+ goto done;
+ }
+
+ soc_decrease = CRITICAL_LOW_FORCE_SOC_DROP;
+ if (lasttime_soc <= soc_decrease)
+ soc = 0;
+ else
+ soc = lasttime_soc - soc_decrease;
+ force_decrease = true;
+ }
+ } else {
+ force_decrease = false;
+ if (soc > lasttime_soc)
+ soc = lasttime_soc + 1;
+ }
+ last_update_time = uptime;
+done:
+ props->batteryLevel = lasttime_soc = soc;
+}
+
+static void rk3288_bat_monitor(struct BatteryProperties *props)
+{
+ if (props->batteryPresent) {
+ //rk3288_soc_adjust(props);
+ rk3288_health_check(props);
+ rk3288_status_check(props);
+ } else {
+ // Fake to make android fun.
+ props->batteryLevel = BATTERY_FULL;
+ props->batteryStatus = BATTERY_STATUS_NOT_CHARGING;
+ }
+}
+
+int healthd_board_battery_update(struct BatteryProperties *props)
+{
+
+ rk3288_bat_monitor(props);
+#ifdef FEATURE_SAVE_CAPACITY
+ put_old_adc_cap(props->batteryLevel);
+#endif
+ // return 0 to log periodic polled battery status to kernel log
+ return 1;
+}
+
+#if 0
+// There is no energy counter implement in rk-bat
+static int rk3288_energy_counter(int64_t *energy)
+{
+ *energy = get_int64_field(CHARGE_COUNTER_EXT_PATH) * VOLTAGE_NOMINAL;
+ return 0;
+}
+#endif
+
+void healthd_board_init(struct healthd_config *config)
+{
+ //config->energyCounter = rk3288_energy_counter;
+#ifdef FEATURE_SAVE_CAPACITY
+ load_old_adc_cap();
+#endif
+}
diff --git a/init.box.samba.rc b/init.box.samba.rc
new file mode 100644
index 0000000..febf4e3
--- /dev/null
+++ b/init.box.samba.rc
@@ -0,0 +1,18 @@
+
+service cifsmanager /data/cifsmanager/cifsmanager.sh
+ disabled
+ oneshot
+
+service startsamba /system/bin/rksmbd
+ disabled
+ oneshot
+
+on property:sys.rksmbd.start=1
+ start startsamba
+
+service stopsamba /system/bin/stopsamba.sh
+ disabled
+ oneshot
+
+on property:sys.rksmbd.start=0
+ start stopsamba
diff --git a/init.connectivity.rc b/init.connectivity.rc
new file mode 100755
index 0000000..e322b87
--- /dev/null
+++ b/init.connectivity.rc
@@ -0,0 +1,175 @@
+
+on boot
+
+# for bluetooth
+ # change back to bluetooth from system
+ chown bluetooth net_bt_stack /data/misc/bluetooth
+ mkdir /data/misc/bluedroid 0770 bluetooth net_bt_stack
+ # bluetooth LPM
+ chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
+ chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
+
+# insmod /system/lib/modules/rtk_btusb.ko
+ chmod 0660 /dev/rtk_btusb
+ chown bluetooth net_bt_stack /dev/rtk_btusb
+
+ # bluetooth MAC address programming
+ chown bluetooth net_bt_stack ro.bt.bdaddr_path
+ chown bluetooth net_bt_stack /system/etc/bluetooth
+ chown bluetooth net_bt_stack /data/misc/bluetooth
+ setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr"
+
+ chmod 0660 /dev/ttyS0
+ chmod 0660 /dev/ttyS1
+ chmod 0660 /dev/vflash
+ chmod 0664 /dev/vendor_storage
+ chown bluetooth net_bt_stack /dev/vflash
+ chown bluetooth net_bt_stack /dev/vendor_storage
+ chown bluetooth net_bt_stack /dev/ttyS1
+ chown bluetooth net_bt_stack /dev/ttyS0
+ chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
+ chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
+ chmod 0664 /sys/class/rfkill/rfkill0/state
+
+# for wifi
+# mt7601u
+# chmod 0644 /system/lib/modules/mtprealloc7601Usta.ko
+
+ mkdir /data/misc/wifi 0770 wifi wifi
+ mkdir /data/misc/wifi/sockets 0770 wifi wifi
+ mkdir /data/misc/wifi/sockets/tmp 0440 wifi wifi
+ mkdir /data/misc/dhcp 0770 dhcp dhcp
+ chown dhcp dhcp /data/misc/dhcp
+
+ mkdir /data/misc/wifi 0770 wifi wifi
+ chmod 0660 /data/misc/wifi/wpa_supplicant.conf
+ chmod 0660 /data/misc/wifi/p2p_supplicant.conf
+ mkdir /data/misc/wifi 0770 wifi wifi
+ mkdir /data/misc/wifi/sockets 0770 wifi wifi
+ chmod 777 /data/misc/wifi/sockets
+ mkdir /data/misc/wpa_supplicant 0770 wifi wifi
+ chown wifi wifi /data/misc/wifi
+ chown system wifi /data/misc/wifi/entropy.bin
+ chown wifi wifi /data/misc/wifi/p2p_supplicant.conf
+ chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
+
+#for nfc
+ chmod 0660 /dev/bcm2079x
+ chown nfc nfc /dev/bcm2079x
+ mkdir /data/nfc
+ mkdir /data/nfc/param
+ chmod 0700 /data/nfc
+ chmod 0700 /data/nfc/param
+ chown nfc nfc /data/nfc
+ chown nfc nfc /data/nfc/param
+
+# for bcm wifi
+########## 3.0.x <= kernel version <= 3.4.x ##########
+service wpa_supplicant1 /system/bin/wpa_supplicant \
+ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
+ -I/system/etc/wifi/wpa_supplicant_overlay.conf \
+ -O/data/misc/wifi/sockets \
+ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
+ # we will start as root and wpa_supplicant will switch to user wifi
+ # after setting up the capabilities required for WEXT
+ # user wifi
+ # group wifi inet keystore
+ class main
+ socket wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+service p2p_supplicant1 /system/bin/wpa_supplicant \
+ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
+ -I/system/etc/wifi/wpa_supplicant_overlay.conf -N \
+ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
+ -I/system/etc/wifi/p2p_supplicant_overlay.conf \
+ -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \
+ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
+# we will start as root and wpa_supplicant will switch to user wifi
+# after setting up the capabilities required for WEXT
+# user wifi
+# group wifi inet keystore
+ class main
+ socket wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+########## 3.0.x <= kernel version <= 3.4.x ##########
+
+########## kernel version >= 3.10.x ##########
+service wpa_supplicant /system/bin/wpa_supplicant \
+ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
+ -I/system/etc/wifi/wpa_supplicant_overlay.conf \
+ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
+ class main
+ socket wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+service p2p_supplicant /system/bin/wpa_supplicant \
+ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
+ -I/system/etc/wifi/p2p_supplicant_overlay.conf \
+ -puse_p2p_group_interface=1p2p_device=1 \
+ -m/data/misc/wifi/p2p_supplicant.conf \
+ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
+ class main
+ socket wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+########## kernel version >= 3.10.x ##########
+
+# for rtl wifi
+service p2p_supp_rtl /system/bin/wpa_supplicant \
+ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
+ -e/data/misc/wifi/entropy.bin -N \
+ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
+ -O/data/misc/wifi/sockets \
+ -g@android:wpa_wlan0
+ class main
+ socket wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+# for esp wifi
+service p2p_supp_esp /system/bin/wpa_supplicant \
+ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
+ -I/system/etc/wifi/wpa_supplicant_overlay.conf -N \
+ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
+ -I/system/etc/wifi/p2p_supplicant_overlay.conf \
+ -O/data/misc/wifi/sockets \
+ -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \
+ -g@android:wpa_wlan0
+ class main
+ socket wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+#for ssv6051p wifi
+service ssv_p2p_supp /system/bin/wpa_supplicant \
+ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
+ -I/system/etc/wifi/p2p_supplicant.conf \
+ -e/data/misc/wifi/entropy.bin -N \
+ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
+ -O/data/misc/wifi/sockets \
+ -g@android:wpa_wlan0 -dd
+ class main
+ socket wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+service hostapd /system/bin/hostapd /data/misc/wifi/hostapd.conf
+ class main
+ disabled
+ oneshot
+
+service wifiservice /system/bin/wifiservice
+ class main
+ user root
+ disabled
+ oneshot
+
+service btservice /system/bin/btservice
+ class main
+ user root
+ disabled
+ oneshot
diff --git a/init.rk30board.bootmode.emmc.rc b/init.rk30board.bootmode.emmc.rc
new file mode 100644
index 0000000..8890de2
--- /dev/null
+++ b/init.rk30board.bootmode.emmc.rc
@@ -0,0 +1,7 @@
+on fs
+ write /sys/block/mmcblk0/bdi/read_ahead_kb 2048
+# mount ext4 /dev/block/platform/emmc/by-name/system /system wait ro noatime nodiratime
+# mount ext4 /dev/block/platform/emmc/by-name/metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc,discard
+# mount ext4 /dev/block/platform/emmc/by-name/userdata /data wait noatime nodiratime nosuid nodev noauto_da_alloc,discard
+# mount ext4 /dev/block/platform/emmc/by-name/cache /cache wait noatime nodiratime nosuid nodev noauto_da_alloc,discard
+ mount_all fstab.rk30board
diff --git a/init.rk30board.bootmode.nvme.rc b/init.rk30board.bootmode.nvme.rc
new file mode 100644
index 0000000..8890de2
--- /dev/null
+++ b/init.rk30board.bootmode.nvme.rc
@@ -0,0 +1,7 @@
+on fs
+ write /sys/block/mmcblk0/bdi/read_ahead_kb 2048
+# mount ext4 /dev/block/platform/emmc/by-name/system /system wait ro noatime nodiratime
+# mount ext4 /dev/block/platform/emmc/by-name/metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc,discard
+# mount ext4 /dev/block/platform/emmc/by-name/userdata /data wait noatime nodiratime nosuid nodev noauto_da_alloc,discard
+# mount ext4 /dev/block/platform/emmc/by-name/cache /cache wait noatime nodiratime nosuid nodev noauto_da_alloc,discard
+ mount_all fstab.rk30board
diff --git a/init.rk30board.bootmode.unknown.rc b/init.rk30board.bootmode.unknown.rc
new file mode 100644
index 0000000..b281883
--- /dev/null
+++ b/init.rk30board.bootmode.unknown.rc
@@ -0,0 +1,9 @@
+on fs
+ insmod /rk30xxnand_ko.ko
+# mount mtd partitions
+# mount ext4 mtd@system /system wait ro noatime nodiratime noauto_da_alloc
+# start readahead
+# mount ext4 mtd@metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc
+# mount ext4 mtd@userdata /data wait noatime nodiratime nosuid nodev noauto_da_alloc
+# mount ext4 mtd@cache /cache wait noatime nodiratime nosuid nodev noauto_da_alloc
+ mount_all fstab.rk30board
diff --git a/init.rk30board.rc b/init.rk30board.rc
new file mode 100755
index 0000000..c31bbed
--- /dev/null
+++ b/init.rk30board.rc
@@ -0,0 +1,304 @@
+import init.${ro.hardware}.bootmode.${ro.bootmode}.rc
+import init.rockchip.rc
+import init.connectivity.rc
+import init.box.samba.rc
+import init.${ro.board.platform}.rc
+import init.${ro.target.product}.rc
+import init.car.rc
+
+on post-fs
+ insmod /system/lib/modules/ump.ko
+ insmod /system/lib/modules/mali.ko
+ insmod /system/lib/modules/mali_kbase.ko
+ insmod /system/lib/modules/rk30_mirroring.ko
+ insmod /system/lib/modules/rk29-ipp.ko
+
+ # Turn on swap
+ swapon_all /fstab.rk30board
+
+on post-fs-data
+
+ # AP6476 GPS permission
+ chmod 755 /system/bin/glgps
+ chown root system /system/bin/glgps
+ chmod 644 /system/lib/hw/gps.default.so
+ chown root system /system/lib/hw/gps.default.so
+ mkdir /data/gps 0770 system net_bt_stack
+
+ chmod 666 /sys/class/display/HDMI/color
+
+ ##$_rbox_$_modify_$_chenzhi_20120309
+ ##$_rbox_$_modify_$_begin
+ mkdir /data/misc/ppp 777 system system
+ chmod 777 /data/misc/ppp
+ copy /etc/ppp/pap-secrets /data/misc/ppp/pap-secrets
+ copy /etc/ppp/pppoe.conf /data/misc/ppp/pppoe.conf
+ ##$_rbox_$_modify_$_end
+
+ mkdir /data/cifsmanager 777 system system
+
+on init
+ # set temperature control policy as normal mode
+ write /sys/module/rockchip_pm/parameters/policy 1
+
+on boot
+
+ restorecon_recursive /sys/devices/system/cpu/cpufreq/interactive
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+
+ # Assume SMP uses shared cpufreq policy for all CPUs
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown system system /sys/devices/ffa30000.gpu/dvfs
+ chmod 0777 /sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu/governor
+
+ chown system system /sys/devices/system/cpu/cpu1/online
+ chmod 0660 /sys/devices/system/cpu/cpu1/online
+
+ chown system system /sys/devices/system/cpu/cpu2/online
+ chmod 0660 /sys/devices/system/cpu/cpu2/online
+
+ chown system system /sys/devices/system/cpu/cpu3/online
+ chmod 0660 /sys/devices/system/cpu/cpu3/online
+
+ chown system system /sys/devices/system/cpu/cpu4/online
+ chmod 0660 /sys/devices/system/cpu/cpu4/online
+
+ chown system system /sys/devices/system/cpu/cpu5/online
+ chmod 0660 /sys/devices/system/cpu/cpu5/online
+
+ chown system system /sys/devices/system/cpu/cpu6/online
+ chmod 0660 /sys/devices/system/cpu/cpu6/online
+
+ chown system system /sys/devices/system/cpu/cpu7/online
+ chmod 0660 /sys/devices/system/cpu/cpu7/online
+
+ chown system system /sys/module/rockchip_pm/parameters/policy
+ chmod 0660 /sys/module/rockchip_pm/parameters/policy
+
+ # b/13568411: make lazy vfree flush thresholds match flush_tlb_range
+ write /proc/sys/vm/lazy_vfree_tlb_flush_all_threshold 524288
+
+ chown wifi wifi /sys/class/rkwifi/driver
+ chown wifi wifi /sys/class/rkwifi/power
+ chown wifi wifi /sys/class/rkwifi/chip
+ chown wifi wifi /sys/class/rkwifi/preload
+
+ write /proc/sys/net/core/rmem_max 1048576
+ write /proc/sys/net/core/wmem_max 1048576
+
+ # backlight
+ chown system system /sys/class/backlight/rk28_bl/brightness
+ chown system system /sys/class/backlight/backlight/brightness
+
+ # for hdmi
+ chown root system /sys/class/display/HDMI/enable
+ chown root system /sys/class/display/HDMI/mode
+ chown root system /sys/class/display/HDMI/scale
+ chown root system /sys/class/display/HDMI/3dmode
+ chmod 0666 /sys/class/display/HDMI/mode
+ chmod 0666 /sys/class/display/HDMI/3dmode
+
+ chown root system /sys/class/graphics/fb0/bcsh
+ chown root system /sys/class/graphics/fb0/dsp_lut
+ chmod 0664 /sys/class/graphics/fb0/bcsh
+ chmod 0664 /sys/class/graphics/fb0/dsp_lut
+
+ chown system graphics /sys/class/graphics/fb0/scale
+ chmod 0664 /sys/class/graphics/fb0/scale
+
+ chown system system /sys/mali400_utility/utility
+ chmod 0664 /sys/mali400_utility/utility
+
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
+ chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
+
+ chown system system /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ chmod 0664 /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+
+ chown system system /sys/devices/system/cpu/cpu4/cpufreq/scaling_setspeed
+ chmod 0664 /sys/devices/system/cpu/cpu4/cpufreq/scaling_setspeed
+
+ #add for usb otg by lly
+ chown system system /sys/bus/platform/drivers/usb20_otg/force_usb_mode
+ chmod 0664 /sys/bus/platform/drivers/usb20_otg/force_usb_mode
+
+ #add for wakeup to reboot by huangjc
+ chown system system /sys/devices/virtual/resume_reboot/resume_reboot/resume_reboot
+ chmod 0664 /sys/devices/virtual/resume_reboot/resume_reboot/resume_reboot
+
+ #add for leds by huangjc
+ chown system system /sys/class/leds/net-green/brightness
+ chmod 0664 /sys/class/leds/net-green/brightness
+ chown system system /sys/class/leds/net-red/brightness
+ chmod 0664 /sys/class/leds/net-red/brightness
+
+ chown root system /sys/class/graphics/fb0/map
+ chmod 0666 /sys/class/graphics/fb0/map
+
+ #add for mid change hdmi mode
+ chmod 0664 /sys/devices/virtual/display/HDMI/enable
+ chmod 0664 /sys/devices/virtual/display/HDMI/mode
+ chmod 0664 /sys/devices/virtual/display/HDMI/scale
+
+ #add for cts
+ chmod 0660 /sys/bus/platform/drivers/usb20_otg/dwc_otg_conn_en
+ chmod 0660 /sys/bus/platform/drivers/usb20_otg/force_usb_mode
+ chmod 0660 /sys/bus/platform/drivers/usb20_otg/vbus_status
+ chmod 0660 /sys/devices/platform/fb/graphics/fb5/enable
+ chmod 0660 /sys/devices/platform/fb/graphics/fb6/cursor
+ chmod 0660 /sys/devices/platform/fb/graphics/fb6/enable
+ chmod 0660 /sys/devices/platform/fb/graphics/fb7/enable
+ chmod 0660 /sys/devices/platform/fb/graphics/fb8/enable
+ chmod 0660 /sys/devices/platform/fb/graphics/fb9/enable
+ chmod 0660 /sys/devices/platform/fb/graphics/fb9/bits_per_pixel
+ chmod 0660 /sys/devices/platform/fb/graphics/fb9/win_property
+
+ restorecon_recursive /dev/block/platform/fe330000.sdhci/by-name/
+
+ # for bd
+ mkdir /mnt/iso 0660 system system
+
+# cpu min freq must change to 126M when boot completed
+on property:sys.boot_completed=1
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 0
+ write /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq 0
+ setprop persist.sys.first_booting false
+ # if data is encrypt, when start gps too early, gpsd crashed
+ start gpsd
+
+# for Internet adb
+on property:persist.internet.adb.enable=1
+ setprop service.adb.tcp.port 5555
+ restart adbd
+
+# for Internet adb
+on property:persist.internet.adb.enable=0
+ setprop service.adb.tcp.port 0
+ restart adbd
+
+# for telephony function
+on property:ro.boot.noril=true
+ setprop ro.radio.noril true
+ stop ril-daemon
+
+service vm_daemon /system/xbin/vm --daemon
+ seclabel u:r:sudaemon:s0
+ oneshot
+
+# set ro.serialno
+on property:sys.serialno=*
+ setprop ro.serialno ${sys.serialno}
+service klogd /system/bin/abc
+ class main
+ disabled
+ oneshot
+on property:persist.rk.abc_switch=1
+ start klogd
+on property:persist.rk.abc_switch=0
+ stop klogd
+
+#Rogue
+service pvrsrvctl /system/vendor/bin/pvrsrvctl --start
+ oneshot
+ class core
+ user root
+ group root
+
+service drmservice /system/bin/drmservice
+ class main
+ oneshot
+
+##$_rbox_$_modify_$_shenzhenyi_20160312
+##$_rbox_$_modify_$_begin
+service displayd /system/bin/displayd
+ class core
+ socket displayd stream 0760 system system
+##$_rbox_$_modify_$_end
+
+##$_rbox_$_modify_$_chenzhi_20120309
+##$_rbox_$_modify_$_begin
+service pppoe_setup /system/bin/pppoe-setup
+ disabled
+ oneshot
+
+service pppoe_start /system/bin/pppoe-start
+ disabled
+ oneshot
+
+service bplus_helper /system/bin/bplus_helper
+ class main
+ oneshot
+
+service pppoe_stop /system/bin/pppoe-stop
+ disabled
+ oneshot
+##$_rbox_$_modify_$_end
+
+on boot
+ start vm_daemon
+
+service up_eth0 /system/bin/busybox ifconfig eth0 up
+ class main
+ oneshot
+
+service shutdownanim /system/bin/bootanimation shutdown
+ class core
+ user graphics
+ group graphics audio
+ disabled
+ oneshot
+
+#for bd
+service iso_operate /system/bin/iso
+ class main
+ disabled
+ oneshot
+
+# su daemon
+service su_daemon /system/xbin/su --daemon
+ seclabel u:r:sudaemon:s0
+ oneshot
+
+on property:persist.sys.root_access=0
+ stop su_daemon
+
+on property:persist.sys.root_access=1
+ start su_daemon
+
+
+service clear_test /system/bin/systemconfig clear_test
+ class main
+ seclabel u:r:clear_test:s0
+ disabled
+ oneshot
+
+on property:app.firefly.config=1
+ start clear_test
diff --git a/init.rk30board.usb.rc b/init.rk30board.usb.rc
new file mode 100644
index 0000000..99633e2
--- /dev/null
+++ b/init.rk30board.usb.rc
@@ -0,0 +1,162 @@
+on init
+ # write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ # write /sys/class/android_usb/android0/f_rndis/manufacturer RockChip
+ # write /sys/class/android_usb/android0/f_rndis/vendorID 2207
+ # write /sys/class/android_usb/android0/f_rndis/wceis 1
+
+on boot
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/f_rndis/manufacturer RockChip
+ write /sys/class/android_usb/android0/f_rndis/vendorID 2207
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
+ write /sys/class/android_usb/android0/iProduct ${ro.product.model}
+ write /sys/class/android_usb/android0/f_mass_storage/inquiry_string $ro.product.usbfactory
+
+on fs
+ mkdir /dev/usb-ffs 0770 shell shell
+ mkdir /dev/usb-ffs/adb 0770 shell shell
+ mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
+ write /sys/class/android_usb/android0/f_ffs/aliases adb
+
+on property:sys.usb.config=adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0006
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0001
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0011
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0003
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/bDeviceClass 224
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0013
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/bDeviceClass 224
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# USB midi configuration
+on property:sys.usb.config=midi
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0004
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# USB midi configuration, with adb
+on property:sys.usb.config=midi,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0014
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ptp
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0002
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ptp,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0012
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mass_storage
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0000
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mass_storage,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0010
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=accessory
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 18D1
+ write /sys/class/android_usb/android0/idProduct 2D00
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=accessory,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 18D1
+ write /sys/class/android_usb/android0/idProduct 2D01
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=acm
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0005
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=acm,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0005
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,dm
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0003
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
diff --git a/init.rockchip.hasCDROM.true.rc b/init.rockchip.hasCDROM.true.rc
new file mode 100644
index 0000000..118dbc7
--- /dev/null
+++ b/init.rockchip.hasCDROM.true.rc
@@ -0,0 +1,9 @@
+on init
+ export EXTERNAL_STORAGE /sdcard
+
+on property:sys.usb.config=mass_storage
+ write /sys/class/android_usb/f_mass_storage/lun/file ${ro.factory.cdrom}
+
+on property:sys.usb.config=mass_storage,adb
+ write /sys/class/android_usb/f_mass_storage/lun/file ${ro.factory.cdrom}
+
diff --git a/init.rockchip.hasUMS.false.rc b/init.rockchip.hasUMS.false.rc
new file mode 100644
index 0000000..f8a1627
--- /dev/null
+++ b/init.rockchip.hasUMS.false.rc
@@ -0,0 +1,2 @@
+on init
+ export EXTERNAL_STORAGE /sdcard
diff --git a/init.rockchip.hasUMS.true.rc b/init.rockchip.hasUMS.true.rc
new file mode 100644
index 0000000..f8a1627
--- /dev/null
+++ b/init.rockchip.hasUMS.true.rc
@@ -0,0 +1,2 @@
+on init
+ export EXTERNAL_STORAGE /sdcard
diff --git a/init.rockchip.rc b/init.rockchip.rc
new file mode 100755
index 0000000..f26cfd3
--- /dev/null
+++ b/init.rockchip.rc
@@ -0,0 +1,194 @@
+import init.${ro.hardware}.usb.rc
+import init.${ro.hardware}.environment.rc
+import /init.debug.rc
+
+on init
+ # start watchdogd
+ mkdir /metadata 0770 root root
+
+ # for adobe reader mobile
+ export RK_ADOBE_DE_MOBILE 1
+ export EBOOK_PAGE_VISIBLE_NUMBER 2 
+ export RK_ADEPT_DEVICE_TYPE mobile
+ export RK_ADOBE_DE_DOC_FOLDER "/mnt/sdcard/Digital Editions"
+ export RK_ADEPT_ACTIVATION_FILE /mnt/sdcard/.adobe-digital-editions/activation.xml
+ export RK_ADEPT_DEVICE_FILE /mnt/sdcard/.adobe-digital-editions/device.xml
+ export RK_ADEPT_DEVICE_SALT_FILE /mnt/sdcard/.adobe-digital-editions/devicesalt
+ export ADOBE_FONTS_DIR /system/fonts/adobefonts/
+
+ # See storage config details at http://source.android.com/tech/storage/
+ mkdir /mnt/shell/emulated 0700 shell shell
+ symlink /sdcard /mnt/sdcard
+
+on post-fs
+ # Swap in only 1 page at a time
+ write /proc/sys/vm/page-cluster 0
+
+on post-fs-data
+ # Now that are booted all the way and out of mount panics, ensure that we panic on later errors.
+ # This is a hack to work around the fact that we can't recover from all errors that would lead to a panic
+ # during the initial mount (http://b/17382778), yet we need to panic on emmc errors (http://b/17640053)
+ # For a remount only the flags and the target mount point are relevant.
+ mount dummy dummy /data remount nosuid nodev noatime rw seclabel,background_gc=on,user_xattr,acl,errors=panic
+
+ # we will remap this as /mnt/sdcard with the sdcard fuse tool
+ mkdir /data/media 0770 media_rw media_rw
+ chown media_rw media_rw /data/media
+
+ mkdir /data/camera 0775 media camera
+
+ setprop vold.post_fs_data_done 1
+ mkdir /data/system/gps 0775 root system
+
+on boot
+ setprop UserVolumeLabel "RockChips"
+
+ # bluetooth
+ # change back to bluetooth from system
+ chown bluetooth net_bt_stack /data/misc/bluetooth
+
+ # power down interface
+ # write /sys/class/rfkill/rfkill0/state 0
+
+ mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755
+ mount tracefs /sys/kernel/debug/tracing /sys/kernel/debug/tracing mode=755
+ chown system root /sys/kernel/debug/tracing
+
+ # Set up kernel tracing, but disable it by default
+ chmod 0222 /sys/kernel/debug/tracing/trace_marker
+ write /sys/kernel/debug/tracing/tracing_on 0
+ restorecon /sys/kernel/debug/tracing/trace_marker
+
+service charger /charger
+ class charger
+ seclabel u:r:healthd:s0
+
+# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
+service watchdogd /sbin/watchdogd 10 20
+ class core
+ disabled
+ seclabel u:r:watchdogd:s0
+
+
+# bugreport is triggered by holding down volume down, volume up and power
+service bugreport /system/bin/dumpstate -d -p -B \
+ -o /data/data/com.android.shell/files/bugreports/bugreport
+ class late_start
+ disabled
+ oneshot
+ keycodes 114 115 116
+
+service wfd /system/bin/wfd
+ class main
+ disabled
+ oneshot
+
+service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
+ class main
+ disabled
+ oneshot
+
+service dhcpcd_p2p /system/bin/dhcpcd -aABKL
+ class main
+ disabled
+ oneshot
+
+service dhcpcd_bt-pan /system/bin/dhcpcd -aABDKL
+ class main
+ disabled
+ oneshot
+
+service dhcpcd_eth0 /system/bin/dhcpcd -aABDKL
+ class late_start
+ disabled
+ oneshot
+
+service iprenew_wlan0 /system/bin/dhcpcd -n
+ class main
+ disabled
+ oneshot
+
+service iprenew_eth0 /system/bin/dhcpcd -n
+ class late_start
+ disabled
+ oneshot
+
+service iprenew_p2p /system/bin/dhcpcd -n
+ class main
+ disabled
+ oneshot
+
+service iprenew_bt-pan /system/bin/dhcpcd -n
+ class main
+ disabled
+ oneshot
+
+on property:ro.factory.hasUMS=false
+ mount rootfs rootfs / ro remount
+
+on property:ro.factory.hasUMS=cdrom
+ mount rootfs rootfs / ro remount
+
+on property:ro.factory.hasUMS=true
+ mount rootfs rootfs / ro remount
+ stop sdcard
+
+on property:ro.boot.charger.emmc=1
+ mount ext4 /dev/block/platform/emmc/by-name/system /system wait ro noatime nodiratime
+ start console
+ mount ext4 /dev/block/platform/emmc/by-name/metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc,discard
+ start charger
+
+on property:ro.boot.charger.emmc=0
+ insmod /rk30xxnand_ko.ko
+ mount ext4 mtd@system /system wait ro noatime nodiratime noauto_da_alloc
+ start console
+ mount ext4 mtd@metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc
+ start charger
+
+on charger
+ setprop ro.boot.charger.emmc 0
+ export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
+ export LD_LIBRARY_PATH /vendor/lib:/system/lib
+ setprop sys.usb.config adb
+
+service akmd /system/bin/akmd
+ class main
+ user system
+ group system
+ oneshot
+ seclabel u:r:akmd:s0
+
+on property:sys.gmali.performance=ui
+ start pat_ui
+
+service pat_ui /system/bin/performance ui
+ disabled
+ oneshot
+
+on property:sys.gmali.performance=video
+ start pat_video
+
+service pat_video /system/bin/performance video
+ disabled
+ oneshot
+
+#factory
+on property:ro.factory.tool=1
+ write /sys/class/gsensor_class/orientation gsensor={-1,0,0,0,0,1,0,-1,0}
+ write /sys/devices/platform/rk29-keypad/rk29key {menu:MENU,home:HOME,vol+:VOLUP,vol-:VOLDOWN,play:PLAY,esc:ESC,sensor:CAMERA}
+ write /sys/devices/platform/rk29_backlight/rk29backlight 100
+
+#on property:ro.rk.btchip=broadcom.bplus
+# start gpsd
+
+service gpsd /system/bin/glgps -c /system/etc/gps/gpsconfig.xml
+ class main
+ disabled
+ user gps
+ group system
+
+#stresstest
+service getbootmode /system/bin/getbootmode.sh
+ disabled
+ oneshot
diff --git a/init.sofiaboard.rc b/init.sofiaboard.rc
new file mode 100644
index 0000000..3a364dc
--- /dev/null
+++ b/init.sofiaboard.rc
@@ -0,0 +1,360 @@
+import /init.rockchip.rc
+import /init.wifi.${ro.bootmode}.rc
+import /init.gnss.rc
+import /init.bluetooth.rc
+import /init.ksm.rc
+import /init.zram.rc
+import /init.${ro.hardware}.environment.rc
+
+on early-init
+ mount debugfs debugfs /sys/kernel/debug mode=0755
+ #setprop persist.tool_enable 0
+
+ #houdini
+ mount binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
+
+on property:ro.enable.native.bridge.exec=1
+ copy /system/etc/binfmt_misc/arm_exe /proc/sys/fs/binfmt_misc/register
+ copy /system/etc/binfmt_misc/arm_dyn /proc/sys/fs/binfmt_misc/register
+on property:ro.enable.native.bridge.exec=0
+ copy /system/etc/binfmt_misc/disable /proc/sys/fs/binfmt_misc/arm_exe
+ copy /system/etc/binfmt_misc/disable /proc/sys/fs/binfmt_misc/arm_dyn
+
+on init
+ # Need read permission to /proc/cmdline for audio
+ chmod 0444 /proc/cmdline
+ mkdir /nvm_fs_partition 0777 misc misc
+
+
+# Once nvm partition is setup, create directory structure and set permissions.
+# NVM dependent services are disabled by default; start them from here.
+on property:init.svc.setup_fs_nvm=stopped
+
+ mkdir /nvm_fs_partition/nvm 0777 misc misc
+ start nvm_uagent
+ start media
+ start init_wlan_nvm
+
+on property:persist.tool_enable=1
+ start ipcsd
+ start phonetool_btapp
+on post-fs-data
+ chown root root /sys/devices/3c000000.vmodem/modem_state
+ chmod 660 /sys/devices/3c000000.vmodem/modem_state
+ chown root root /sys/bus/platform/drivers/vmodem/3c000000.vmodem/modem_state
+ chmod 660 /sys/bus/platform/drivers/vmodem/3c000000.vmodem/modem_state
+ mkdir /data/rpcd
+ chmod 777 /data/rpcd
+ mkdir /data/media 0770 media_rw media_rw
+ mkdir /data/misc/dhcp 0770 dhcp dhcp
+ mkdir /data/fmd 0770 root root
+
+ chown dhcp dhcp /data/misc/dhcp
+ setprop vold.post_fs_data_done 1
+
+ # Set this property to enable Thermal service
+ setprop persist.service.thermal 1
+
+ # Properties for Thermal Service
+ setprop persist.thermal.debug.xml 0
+ setprop ro.thermal.ituxversion 2.5
+ setprop persist.thermal.shutdown.msg 1
+ setprop persist.thermal.shutdown.vibra 1
+ setprop persist.thermal.shutdown.tone 1
+ setprop persist.thermal.display.msg 1
+ setprop persist.thermal.display.vibra 1
+
+ # Permissions for Thermal Management
+ chown system system /sys/class/thermal/thermal_zone0/trip_point_0_temp
+ chown system system /sys/class/thermal/thermal_zone0/trip_point_1_temp
+ chown system system /sys/class/thermal/thermal_zone1/trip_point_0_temp
+ chown system system /sys/class/thermal/thermal_zone1/trip_point_1_temp
+ chown system system /sys/class/thermal/thermal_zone2/trip_point_0_temp
+ chown system system /sys/class/thermal/thermal_zone2/trip_point_1_temp
+ chown system system /sys/class/thermal/thermal_zone3/trip_point_0_temp
+ chown system system /sys/class/thermal/thermal_zone3/trip_point_1_temp
+ chown system system /sys/class/thermal/thermal_zone4/trip_point_0_temp
+ chown system system /sys/class/thermal/thermal_zone4/trip_point_1_temp
+ chown system system /sys/class/thermal/thermal_zone5/trip_point_0_temp
+ chown system system /sys/class/thermal/thermal_zone5/trip_point_1_temp
+ chown system system /sys/class/thermal/thermal_zone6/trip_point_0_temp
+ chown system system /sys/class/thermal/thermal_zone6/trip_point_1_temp
+ chown system system /sys/class/thermal/thermal_zone7/trip_point_0_temp
+ chown system system /sys/class/thermal/thermal_zone7/trip_point_1_temp
+ chown system system /sys/class/thermal/thermal_zone8/trip_point_0_temp
+ chown system system /sys/class/thermal/thermal_zone8/trip_point_1_temp
+ chown system system /sys/class/thermal/thermal_zone9/trip_point_0_temp
+ chown system system /sys/class/thermal/thermal_zone9/trip_point_1_temp
+ chown system system /sys/class/thermal/thermal_zone10/trip_point_0_temp
+ chown system system /sys/class/thermal/thermal_zone10/trip_point_1_temp
+ chown system system /sys/class/thermal/thermal_zone0/emul_temp
+ chown system system /sys/class/thermal/thermal_zone1/emul_temp
+ chown system system /sys/class/thermal/thermal_zone2/emul_temp
+ chown system system /sys/class/thermal/thermal_zone3/emul_temp
+ chown system system /sys/class/thermal/thermal_zone4/emul_temp
+ chown system system /sys/class/thermal/thermal_zone5/emul_temp
+ chown system system /sys/class/thermal/thermal_zone6/emul_temp
+ chown system system /sys/class/thermal/thermal_zone7/emul_temp
+ chown system system /sys/class/thermal/thermal_zone8/emul_temp
+ chown system system /sys/class/thermal/thermal_zone9/emul_temp
+ chown system system /sys/class/thermal/thermal_zone10/emul_temp
+
+ # TEE RPC
+ chown system system /dev/tee_rpc
+ chmod 0666 /dev/tee_rpc
+
+on boot
+# Define TCP buffer sizes for various networks
+# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
+ setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
+ setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576
+ setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576
+ setprop net.tcp.buffersize.hspap 32768,262144,1048576,4096,16384,262144
+ setprop net.tcp.buffersize.hspa 16384,87380,262144,4096,16384,262144
+ setprop net.tcp.buffersize.hsupa 16384,87380,262144,4096,16384,110208
+ setprop net.tcp.buffersize.hsdpa 16384,87380,262144,4096,16384,110208
+ setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
+ setprop net.tcp.buffersize.edge 4093,26280,110208,4096,16384,110208
+ setprop net.tcp.buffersize.gprs 4092,8760,65536,4096,8760,65536
+ setprop net.tcp.buffersize.evdo 4094,87380,262144,4096,16384,262144
+
+# sofia-3gr pwm-backlight node path
+ chown system system /sys/class/backlight/pwm-backlight/brightness
+
+# Change TCP Net-Core buffers sizes to improve cellular data throughput
+ write /proc/sys/net/core/rmem_default 1048576
+ write /proc/sys/net/core/wmem_default 524288
+ write /proc/sys/net/core/rmem_max 2097152
+ write /proc/sys/net/core/wmem_max 1048576
+ write /proc/sys/net/ipv4/tcp_mem "83520 111360 2097152"
+
+on charger
+ class_start charger
+ start console
+
+service batteryserver /charger
+ class charger
+ user root
+ console
+ oneshot
+
+on fs
+ mount_all ./fstab.sofiaboard
+#for sensors
+ chmod 0660 /dev/mma8452_daemon
+ chown system system /dev/mma8452_daemon
+ chmod 0660 /dev/akm8975_dev
+ chown system system /dev/akm8975_dev
+ chmod 0660 /dev/akm8975_aot
+ chown system system /dev/akm8975_aot
+ chmod 0660 /dev/akm8963_dev
+ chown system system /dev/akm8963_dev
+ chmod 0660 /dev/akm_dev
+ chown system system /dev/akm_dev
+ chmod 0660 /dev/gyrosensor
+ chown system system /dev/gyrosensor
+ chmod 0660 /dev/angle
+ chown system system /dev/angle
+ chmod 0660 /dev/accel
+ chown system system /dev/accel
+ chmod 0660 /dev/compass
+ chown system system /dev/compass
+ chmod 0660 /dev/lightsensor
+ chown system system /dev/lightsensor
+ chmod 0660 /dev/psensor
+ chown system system /dev/psensor
+ chmod 0660 /dev/temperature
+ chown system system /dev/temperature
+ chmod 0660 /dev/pressure
+ chown system system /dev/pressure
+
+#for mpu sensor
+chown system system /dev/iio:device0
+chown system system /sys/bus/iio/devices/trigger0/name
+chown system system /sys/bus/iio/devices/iio:device0/accl_bias
+chown system system /sys/bus/iio/devices/iio:device0/accl_enable
+chown system system /sys/bus/iio/devices/iio:device0/accl_matrix
+chown system system /sys/bus/iio/devices/iio:device0/buffer/length
+chown system system /sys/bus/iio/devices/iio:device0/buffer/enable
+chown system system /sys/bus/iio/devices/iio:device0/compass_enable
+chown system system /sys/bus/iio/devices/iio:device0/compass_matrix
+chown system system /sys/bus/iio/devices/iio:device0/dmp_event_int_on
+chown system system /sys/bus/iio/devices/iio:device0/dmp_firmware
+chown system system /sys/bus/iio/devices/iio:device0/dmp_int_on
+chown system system /sys/bus/iio/devices/iio:device0/dmp_on
+chown system system /sys/bus/iio/devices/iio:device0/dmp_output_rate
+chown system system /sys/bus/iio/devices/iio:device0/event_display_orientation
+chown system system /sys/bus/iio/devices/iio:device0/firmware_loaded
+chown system system /sys/bus/iio/devices/iio:device0/gyro_enable
+chown system system /sys/bus/iio/devices/iio:device0/gyro_matrix
+chown system system /sys/bus/iio/devices/iio:device0/in_accel_scale
+chown system system /sys/bus/iio/devices/iio:device0/in_anglvel_scale
+chown system system /sys/bus/iio/devices/iio:device0/in_magn_scale
+chown system system /sys/bus/iio/devices/iio:device0/key
+chown system system /sys/bus/iio/devices/iio:device0/power_state
+chown system system /sys/bus/iio/devices/iio:device0/quaternion_on
+chown system system /sys/bus/iio/devices/iio:device0/sampling_frequency
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_accel_x_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_accel_y_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_accel_z_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_anglvel_x_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_anglvel_y_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_anglvel_z_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_magn_x_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_magn_y_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_magn_z_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_r_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_x_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_y_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_z_en
+chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_timestamp_en
+chown system system /sys/bus/iio/devices/iio:device0/self_test
+chown system system /sys/bus/iio/devices/iio:device0/tap_on
+chown system system /sys/bus/iio/devices/iio:device0/temperature
+chown system system /sys/bus/iio/devices/iio:device0/trigger/current_trigger
+chmod 0666 /dev/iio:device0
+chmod 0666 /sys/bus/iio/devices/trigger0/name
+chmod 0666 /sys/bus/iio/devices/iio:device0/accl_bias
+chmod 0666 /sys/bus/iio/devices/iio:device0/accl_enable
+chmod 0666 /sys/bus/iio/devices/iio:device0/accl_matrix
+chmod 0666 /sys/bus/iio/devices/iio:device0/buffer/length
+chmod 0666 /sys/bus/iio/devices/iio:device0/buffer/enable
+chmod 0666 /sys/bus/iio/devices/iio:device0/compass_enable
+chmod 0666 /sys/bus/iio/devices/iio:device0/compass_matrix
+chmod 0666 /sys/bus/iio/devices/iio:device0/dmp_event_int_on
+chmod 0666 /sys/bus/iio/devices/iio:device0/dmp_firmware
+chmod 0666 /sys/bus/iio/devices/iio:device0/dmp_int_on
+chmod 0666 /sys/bus/iio/devices/iio:device0/dmp_on
+chmod 0666 /sys/bus/iio/devices/iio:device0/dmp_output_rate
+chmod 0666 /sys/bus/iio/devices/iio:device0/event_display_orientation
+chmod 0666 /sys/bus/iio/devices/iio:device0/firmware_loaded
+chmod 0666 /sys/bus/iio/devices/iio:device0/gyro_enable
+chmod 0666 /sys/bus/iio/devices/iio:device0/gyro_matrix
+chmod 0666 /sys/bus/iio/devices/iio:device0/in_accel_scale
+chmod 0666 /sys/bus/iio/devices/iio:device0/in_anglvel_scale
+chmod 0666 /sys/bus/iio/devices/iio:device0/in_magn_scale
+chmod 0666 /sys/bus/iio/devices/iio:device0/key
+chmod 0666 /sys/bus/iio/devices/iio:device0/power_state
+chmod 0666 /sys/bus/iio/devices/iio:device0/quaternion_on
+chmod 0666 /sys/bus/iio/devices/iio:device0/sampling_frequency
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_accel_x_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_accel_y_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_accel_z_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_anglvel_x_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_anglvel_y_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_anglvel_z_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_magn_x_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_magn_y_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_magn_z_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_r_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_x_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_y_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_z_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/scan_elements/in_timestamp_en
+chmod 0666 /sys/bus/iio/devices/iio:device0/self_test
+chmod 0666 /sys/bus/iio/devices/iio:device0/tap_on
+chmod 0666 /sys/bus/iio/devices/iio:device0/temperature
+chmod 0666 /sys/bus/iio/devices/iio:device0/trigger/current_trigger
+on charger
+ mount_all ./fstab.sofiaboard
+ start setup_fs_nvm
+
+# virtual sdcard daemon running as media_rw (1023)
+#service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
+# class late_start
+#
+#service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
+# class late_start
+# disabled
+#
+#service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbdisk /storage/usbdisk
+# class late_start
+# disabled
+
+service ipcsd /system/bin/ipcsd --apint=UDSOCKS_,gateway --ext=TTY,/dev/ttyGS2 --mex=TTY,/dev/mvpipe-GTI
+ class main
+ disabled
+ user root
+ group root
+
+service rpcServer /system/bin/rpcServer
+ class main
+ user root
+
+service setup_fs_nvm /system/bin/setup_fs_nvm /dev/block/platform/soc0/e0000000.noc/by-name/ImcPartID076 /nvm_fs_partition
+ class core
+ user root
+ group root
+ oneshot
+
+service nvm_uagent /system/bin/nvm_useragent
+ class main
+ disabled
+ user root
+ group root
+
+service rpcNotifier /system/bin/rpcNotifier
+ class main
+ user root
+
+service rpc-daemon /system/bin/rpc-daemon
+ class main
+ user root
+ disabled
+
+on property:rpcd.start=1
+ start rpc-daemon
+
+service ril-daemon2 /system/bin/rild -c 2
+ class main
+ socket rild2 stream 660 root radio
+ socket rild-debug2 stream 660 radio system
+ user root
+ group radio cache inet misc audio log root
+ disabled
+
+on property:persist.ril-daemon.disable=0
+ stop ril-daemon2
+
+on property:persist.ril-daemon.disable=dsds
+ start ril-daemon2
+
+service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL
+ class main
+ disabled
+ oneshot
+
+service iprenew_bt-pan /system/bin/dhcpcd -n
+ class main
+ disabled
+ oneshot
+
+service pekallfmrserver /system/bin/pekallfmrserver
+ class main
+ user audio
+ group system audio
+ onrestart restart root
+
+service init_wlan_nvm /system/bin/sh /system/etc/wifi/wlan_nvm_init.sh
+ class main
+ disabled
+ oneshot
+
+service fmd /system/bin/fmd -c /dev/fmdev_device -l /data/fmd/fmd.log -p /data/fmd/fmd.log.prev
+ class main
+ user root
+ oneshot
+
+#for aplog
+on early-boot
+ mkdir /data/logs
+ chown system log /data/logs
+ chmod 0770 /data/logs
+
+on property:ro.debuggable=1
+ start apk_logfs
+
+service apk_logfs /system/bin/logcat -b system -b events -b main -b radio -b kernel -n 20 -v threadtime -f /data/logs/aplog -r5000
+ class main
+ user root
+ disabled
diff --git a/init.sofiaboard.usb.rc b/init.sofiaboard.usb.rc
new file mode 100644
index 0000000..2414409
--- /dev/null
+++ b/init.sofiaboard.usb.rc
@@ -0,0 +1,170 @@
+# Copyright (C) 2012-2013 Intel Mobile Communications GmbH
+# Copyright (C) 2012 The Android Open Source Project
+#
+# USB configuration common for all android devices
+#
+# IMC Additions for VID/PID set using official 'Intel' identity
+
+on fs
+ mkdir /dev/usb-ffs 0770 shell shell
+ mkdir /dev/usb-ffs/adb 0770 shell shell
+ mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
+ write /sys/class/android_usb/android0/f_ffs/aliases adb
+
+# Initialisation, sets up the unique serial number
+# ================================================
+
+on init
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+on boot
+ write /sys/class/android_usb/android0/f_mass_storage/inquiry_string $ro.product.usbfactory
+
+# Configurations specifically added (or modified) for Intel Mobile Communications
+# ===============================================================================
+#
+# Used Synonyms (keywords for activation) together with applicable USB Class (if appropriate)
+# -------------------------------------------------------------------------------------------
+#
+# adb
+# acm (CDC-ACM) Serial Gadget (number of channels depends on PID)
+# mtp Media Transfer Protocol
+# ptp Photo Transfer Protocol
+# rndis USB Tethering (CDC-ECM, RNDIS)
+#
+# These are presented in ascending order of PID, which is restricted into the
+# range 0x08EB through 0x09EB
+#
+# 0x08EC .. 0x08F6 were devised from the XMM6181/XMM2231 projects
+#
+# 0x0920 .. 0x0930 were added for the XMM6321 project
+#
+# Note that the usage of "acm" is special since it has to support varying numbers
+# of CDC-ACM channels, and so the incoming string is expected to have a trailing
+# tag to show this: this is not copied into the function list.
+
+
+# 0x8087:0x08EF : ADB-only USB configuration
+# ------------------------------------------
+
+on property:sys.usb.config=adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 8087
+ write /sys/class/android_usb/android0/idProduct 08F4
+ write /sys/class/android_usb/android0/functions adb,acm
+ write /sys/class/android_usb/f_acm/instances 3
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# 0x8087:0x0928 : ADB plus 3xCDC plus MTP
+# ---------------------------------------
+
+on property:sys.usb.config=mtp,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 8087
+ write /sys/class/android_usb/android0/idProduct 0928
+ write /sys/class/android_usb/android0/functions mtp,adb,acm
+ write /sys/class/android_usb/f_acm/instances 3
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# 0x8087:0x0929 : ADB plus 3xCDC plus PTP
+# ---------------------------------------
+
+on property:sys.usb.config=ptp,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 8087
+ write /sys/class/android_usb/android0/idProduct 0929
+ write /sys/class/android_usb/android0/functions ptp,adb,acm
+ write /sys/class/android_usb/f_acm/instances 3
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# 0x8087:0x092A : 3xCDC plus MTP
+# ------------------------------
+
+on property:sys.usb.config=mtp
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 8087
+ write /sys/class/android_usb/android0/idProduct 092A
+ write /sys/class/android_usb/android0/functions mtp,acm
+ write /sys/class/android_usb/f_acm/instances 3
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# 0x8087:0x092B : 3xCDC plus PTP
+# ------------------------------
+
+on property:sys.usb.config=ptp
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 8087
+ write /sys/class/android_usb/android0/idProduct 092B
+ write /sys/class/android_usb/android0/functions ptp,acm
+ write /sys/class/android_usb/f_acm/instances 3
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# 0x8087:0x092D : ADB plus 3xCDC plus USB Tethering (ECM)
+# -------------------------------------------------------
+
+on property:sys.usb.config=rndis,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 8087
+ write /sys/class/android_usb/android0/idProduct 092D
+ write /sys/class/android_usb/android0/functions rndis,adb,acm
+ write /sys/class/android_usb/f_acm/instances 3
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# 0x8087:0x0930: 3xCDC plus USB Tethering (ECM)
+# ---------------------------------------------
+
+on property:sys.usb.config=rndis
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 8087
+ write /sys/class/android_usb/android0/idProduct 0930
+ write /sys/class/android_usb/android0/functions rndis,acm
+ write /sys/class/android_usb/f_acm/instances 3
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# 0x8087:0x093A
+# --------------------------------------------------
+
+on property:sys.usb.config=mass_storage
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 8087
+ write /sys/class/android_usb/android0/idProduct 093A
+ write /sys/class/android_usb/android0/functions mass_storage,acm
+ write /sys/class/android_usb/f_acm/instances 3
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# 0x8087:0x093B
+#---------------------------------------------------
+on property:sys.usb.config=mass_storage,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 8087
+ write /sys/class/android_usb/android0/idProduct 093B
+ write /sys/class/android_usb/android0/functions mass_storage,adb,acm
+ write /sys/class/android_usb/f_acm/instances 3
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+
+on charger
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 8087
+ write /sys/class/android_usb/android0/idProduct 08F4
+ write /sys/class/android_usb/android0/functions adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+
diff --git a/initlogo.rle b/initlogo.rle
new file mode 100755
index 0000000..9bf8bef
--- /dev/null
+++ b/initlogo.rle
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/loader/misc_loadercmd.img b/loader/misc_loadercmd.img
new file mode 100755
index 0000000..2d0320a
--- /dev/null
+++ b/loader/misc_loadercmd.img
Binary files differ
diff --git a/lowmem_package_filter.xml b/lowmem_package_filter.xml
new file mode 100644
index 0000000..a084484
--- /dev/null
+++ b/lowmem_package_filter.xml
@@ -0,0 +1,104 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<lowmem-filter-package>
+<app package="com.google.process.location"/>
+<app package="com.google.android.calendar"/>
+<app package="com.android.calendar"/>
+<!--
+<app package="com.google.android.googlequicksearchbox:search"/>
+-->
+<app package="com.google.android.talk"/>
+<app package="com.google.android.keep"/>
+<app package="com.google.android.gms.ui"/>
+<app package="com.google.android.apps.maps"/>
+<app package="com.google.android.gms.wearable"/>
+<app package="com.google.android.apps.magazines"/>
+<app package="com.google.android.apps.walletnfcrel"/>
+<app package="com.google.android.apps.plus"/>
+<app package="com.google.android.gms"/>
+<!--
+<app package="com.google.process.gapps"/>
+-->
+<app package="com.google.android.inputmethod.latin"/>
+<app package="com.android.printspooler"/>
+<app package="com.google.android.gms:car"/>
+<app package="com.google.android.partnersetup"/>
+<app package="com.google.android.music:main"/>
+<app package="com.google.android.apps.genie.geniewidget"/>
+<!--
+<app package="com.android.phone"/>
+-->
+<app package="com.phone.wolf.live"/>
+<app package="com.android.smspush"/>
+<app package="com.android.vending"/>
+<app package="com.android.gallery3d"/>
+<app package="android.rk.RockVideoPlayer"/>
+<app package="com.android.rk"/>
+<app package="com.google.android.gms.persistent"/>
+<app package="com.google.android.youtube"/>
+<app package="com.google.android.youtube.tv"/>
+<app package="com.android.email"/>
+<app package="com.netflix.ninja"/>
+<app package="com.android.rockchip"/>
+<app package="com.android.tv.settings"/>
+<app package="com.ktcp.video"/>
+<app package="com.rk_itvui.allapp"/>
+<app package="com.google.android.katniss"/>
+
+<service package="com.google.android.apps.docs.editors.slides"/>
+<service package="com.google.android.apps.docs"/>
+<service package="com.google.android.apps.docs.editors.docs"/>
+<service package="com.google.android.apps.plus"/>
+<service package="com.google.android.keep"/>
+
+<game package="com.imangi.templerun2"/>
+<game package="com.kiloo.subwaysurf"/>
+<game package="com.qiyi.video"/>
+<game package="com.qiyi.video.pad" />
+<game package="com.qiyi.video.pad.intel"/>
+<game package="com.sohu.tv"/>
+<game package="com.sohu.sohuvideo"/>
+<game package="com.youku.phone"/>
+<game package="com.letv.android.client.pad"/>
+<game package="com.letv.android.client"/>
+<game package="com.tudou.android"/>
+<game package="com.pplive.androidphone"/>
+<game package="com.baidu.video"/>
+<game package="tv.pps.mobile"/>
+<game package="com.tencent.qqlive"/>
+
+<prev package="com.android.launcher"/>
+<prev package="com.google.android.launcher"/>
+<prev package="com.rockchip.vr.home"/>
+<prev package="com.android.settings"/>
+<prev package="com.android.systemui"/>
+<prev package="com.android.rk"/>
+<prev package="com.antutu.ABenchMark"/>
+<prev package="com.google.android.setupwizard"/>
+<prev package="packageinstaller"/>
+<prev package="apkinstaller"/>
+<prev package="com.android.bluetooth"/>
+<prev package="com.android.music"/>
+<prev package="com.android.camera2"/>
+<prev package="com.google.android.GoogleCamera"/>
+<prev package="com.cghs.stresstest"/>
+<prev package="com.android.cts.verifier"/>
+<prev package="com.google.android.exoplayer.playbacktests"/>
+<prev package="com.rockchip.itvbox"/>
+
+<next package="com.qihoo"/>
+<next package="com.dragon.android.pandaspace"/>
+<next package=".auth.gsf.AccountIntroActivity"/>
+<next package=".auth.login."/>
+<next package="com.android.systemui"/>
+
+<empty package="com.android.phone"/>
+<empty package="android.process.media"/>
+<empty package="com.cghs.stresstest"/>
+<empty package="com.android.cts.verifier"/>
+<empty package="com.android.externalstorage"/>
+<empty package="com.google.android.gms"/>
+<empty package="com.google.process.gapps"/>
+<empty package="com.android.defcontainer"/>
+
+<hardware package="com.android.camera2"/>
+</lowmem-filter-package>
diff --git a/media_profiles_default.xml b/media_profiles_default.xml
new file mode 100644
index 0000000..95b8457
--- /dev/null
+++ b/media_profiles_default.xml
@@ -0,0 +1,679 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<!DOCTYPE MediaSettings [
+<!ELEMENT MediaSettings (CamcorderProfiles,
+ EncoderOutputFileFormat+,
+ VideoEncoderCap+,
+ AudioEncoderCap+,
+ VideoDecoderCap,
+ AudioDecoderCap)>
+<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
+<!ELEMENT EncoderProfile (Video, Audio)>
+<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
+<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
+<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
+<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED>
+<!ELEMENT Video EMPTY>
+<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
+<!ATTLIST Video bitRate CDATA #REQUIRED>
+<!ATTLIST Video width CDATA #REQUIRED>
+<!ATTLIST Video height CDATA #REQUIRED>
+<!ATTLIST Video frameRate CDATA #REQUIRED>
+<!ELEMENT Audio EMPTY>
+<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
+<!ATTLIST Audio bitRate CDATA #REQUIRED>
+<!ATTLIST Audio sampleRate CDATA #REQUIRED>
+<!ATTLIST Audio channels (1|2) #REQUIRED>
+<!ELEMENT ImageEncoding EMPTY>
+<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
+<!ELEMENT ImageDecoding EMPTY>
+<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
+<!ELEMENT Camera EMPTY>
+<!ELEMENT EncoderOutputFileFormat EMPTY>
+<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
+<!ELEMENT VideoEncoderCap EMPTY>
+<!ATTLIST VideoEncoderCap name (h264|h263|m4v|wmv) #REQUIRED>
+<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
+<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
+<!ELEMENT AudioEncoderCap EMPTY>
+<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED>
+<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
+<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
+<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
+<!ELEMENT VideoDecoderCap EMPTY>
+<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
+<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
+<!ELEMENT AudioDecoderCap EMPTY>
+<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
+<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
+<!ELEMENT VideoEditorCap EMPTY>
+<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED>
+<!ELEMENT ExportVideoProfile EMPTY>
+<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED>
+<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED>
+<!ATTLIST ExportVideoProfile level CDATA #REQUIRED>
+]>
+<!--
+ This file is used to declare the multimedia profiles and capabilities
+ on an android-powered device.
+-->
+<MediaSettings>
+ <!-- Each camcorder profile defines a set of predefined configuration parameters -->
+ <CamcorderProfiles cameraId="0">
+
+ <EncoderProfile quality="qcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="256000"
+ width="176"
+ height="144"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="128000"
+ width="320"
+ height="240"
+ frameRate="15" />
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="1200000"
+ width="352"
+ height="288"
+ frameRate="15" />
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 720p and 480p stream, Please fill this element according as
+ your sensor max resolution for preview(Not Capture resolution) -->
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="256000"
+ width="640"
+ height="480"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 480p stream, Please turn off this element -->
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="256000"
+ width="720"
+ height="480"
+ frameRate="12" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 480p stream, Please turn off this element -->
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="256000"
+ width="800"
+ height="600"
+ frameRate="12" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <!-- If your sensor driver don't support 576p stream, Please turn off this element -->
+
+ <EncoderProfile quality="576p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="256000"
+ width="720"
+ height="576"
+ frameRate="12" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 720p stream, Please turn off this element -->
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="3000000"
+ width="1280"
+ height="720"
+ frameRate="8" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 1080p stream, Please turn off this element -->
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="3000000"
+ width="1920"
+ height="1080"
+ frameRate="10" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="128000"
+ width="320"
+ height="240"
+ frameRate="15" />
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="1200000"
+ width="352"
+ height="288"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 720p and 480p stream, Please fill this element according as
+ your sensor max resolution for preview(Not Capture resolution) -->
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="1200000"
+ width="640"
+ height="480"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 480p stream, Please turn off this element -->
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="256000"
+ width="720"
+ height="480"
+ frameRate="12" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 480p stream, Please turn off this element -->
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="256000"
+ width="800"
+ height="600"
+ frameRate="12" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <!-- If your sensor driver don't support 720p and 480p stream, Please fill this element according as
+ your sensor max resolution for preview(Not Capture resolution) -->
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="1200000"
+ width="800"
+ height="600"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 576p stream, Please fill this element according as
+ your sensor max resolution for preview(Not Capture resolution) -->
+ <EncoderProfile quality="timelapse576p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="1200000"
+ width="720"
+ height="576"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 720p stream, Please turn off this element -->
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="3000000"
+ width="1280"
+ height="720"
+ frameRate="8" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 108p stream, Please turn off this element -->
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="3000000"
+ width="1920"
+ height="1080"
+ frameRate="10" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="90" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <CamcorderProfiles cameraId="1">
+
+ <EncoderProfile quality="qcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="256000"
+ width="176"
+ height="144"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="128000"
+ width="320"
+ height="240"
+ frameRate="15" />
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="1200000"
+ width="352"
+ height="288"
+ frameRate="15" />
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 720p and 480p stream, Please fill this element according as
+ your sensor max resolution for preview(Not Capture resolution) -->
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="256000"
+ width="640"
+ height="480"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 480p stream, Please turn on this element -->
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="256000"
+ width="720"
+ height="480"
+ frameRate="12" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 480p stream, Please turn off this element -->
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="256000"
+ width="800"
+ height="600"
+ frameRate="12" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 720p stream, Please turn off this element -->
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="3000000"
+ width="1280"
+ height="720"
+ frameRate="8" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+ <!-- If your sensor driver don't support 1080p stream, Please turn off this element -->
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="3000000"
+ width="1920"
+ height="1080"
+ frameRate="10" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="128000"
+ width="320"
+ height="240"
+ frameRate="15" />
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="1200000"
+ width="352"
+ height="288"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 720p and 480p stream, Please fill this element according as
+ your sensor max resolution for preview(Not Capture resolution) -->
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="1200000"
+ width="640"
+ height="480"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <!-- If your sensor driver don't support 480p stream, Please turn on this element -->
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="256000"
+ width="720"
+ height="480"
+ frameRate="12" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 720p and 480p stream, Please fill this element according as
+ your sensor max resolution for preview(Not Capture resolution) -->
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="1200000"
+ width="800"
+ height="600"
+ frameRate="15" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- If your sensor driver don't support 720p stream, Please turn off this element -->
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="3000000"
+ width="1280"
+ height="720"
+ frameRate="8" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+ <!-- If your sensor driver don't support 108p stream, Please turn off this element -->
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="3000000"
+ width="1920"
+ height="1080"
+ frameRate="10" />
+
+ <Audio codec="aac"
+ bitRate="61000"
+ sampleRate="44100"
+ channels="1" />
+ </EncoderProfile>
+ <ImageEncoding quality="90" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+
+ </CamcorderProfiles>
+
+
+ <EncoderOutputFileFormat name="3gp" />
+ <EncoderOutputFileFormat name="mp4" />
+
+ <!--
+ If a codec is not enabled, it is invisible to the applications
+ In other words, the applications won't be able to use the codec
+ or query the capabilities of the codec at all if it is disabled
+ -->
+ <VideoEncoderCap name="h264" enabled="true"
+ minBitRate="64000" maxBitRate="3000000"
+ minFrameWidth="176" maxFrameWidth="1920"
+ minFrameHeight="144" maxFrameHeight="1080"
+ minFrameRate="1" maxFrameRate="30" />
+
+ <VideoEncoderCap name="h263" enabled="true"
+ minBitRate="64000" maxBitRate="1000000"
+ minFrameWidth="176" maxFrameWidth="800"
+ minFrameHeight="144" maxFrameHeight="480"
+ minFrameRate="1" maxFrameRate="24" />
+
+ <VideoEncoderCap name="m4v" enabled="true"
+ minBitRate="64000" maxBitRate="2000000"
+ minFrameWidth="176" maxFrameWidth="800"
+ minFrameHeight="144" maxFrameHeight="480"
+ minFrameRate="1" maxFrameRate="24" />
+
+ <AudioEncoderCap name="aac" enabled="true"
+ minBitRate="8192" maxBitRate="96000"
+ minSampleRate="8000" maxSampleRate="44100"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="amrwb" enabled="true"
+ minBitRate="6600" maxBitRate="23050"
+ minSampleRate="16000" maxSampleRate="16000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="amrnb" enabled="true"
+ minBitRate="5525" maxBitRate="12200"
+ minSampleRate="8000" maxSampleRate="8000"
+ minChannels="1" maxChannels="1" />
+
+ <!--
+ FIXME:
+ We do not check decoder capabilities at present
+ At present, we only check whether windows media is visible
+ for TEST applications. For other applications, we do
+ not perform any checks at all.
+ -->
+ <VideoDecoderCap name="wmv" enabled="false"/>
+ <AudioDecoderCap name="wma" enabled="false"/>
+ <VideoEditorCap maxInputFrameWidth="1920"
+ maxInputFrameHeight="1080" maxOutputFrameWidth="1920"
+ maxOutputFrameHeight="1080" maxPrefetchYUVFrames="1"/>
+ <!--
+ The VideoEditor Export codec profile and level values
+ correspond to the values in OMX_Video.h.
+ E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
+ and level 4096 means OMX_VIDEO_AVCLevel41.
+ Please note that the values are in decimal.
+ These values are for video encoder.
+ -->
+ <!--
+ Codec = h.264, Hp-High profile, level 4.1
+ -->
+ <ExportVideoProfile name="h264" profile= "4" level="4096"/>
+ <!--
+ Codec = h.263, Baseline profile, level 0
+ -->
+ <ExportVideoProfile name="h263" profile= "1" level="1"/>
+ <!--
+ Codec = mpeg4, Simple profile, level 3
+ -->
+ <ExportVideoProfile name="m4v" profile= "1" level="16"/>
+</MediaSettings>
diff --git a/mkimage.sh b/mkimage.sh
new file mode 100755
index 0000000..8691943
--- /dev/null
+++ b/mkimage.sh
@@ -0,0 +1,233 @@
+#!/bin/bash
+set -e
+
+. build/envsetup.sh >/dev/null && setpaths
+
+export PATH=$ANDROID_BUILD_PATHS:$PATH
+TARGET_PRODUCT=`get_build_var TARGET_PRODUCT`
+TARGET_HARDWARE=`get_build_var TARGET_BOARD_HARDWARE`
+TARGET_BOARD_PLATFORM=`get_build_var TARGET_BOARD_PLATFORM`
+PLATFORM_VERSION=`get_build_var PLATFORM_VERSION`
+PLATFORM_SECURITY_PATCH=`get_build_var PLATFORM_SECURITY_PATCH`
+TARGET_BUILD_VARIANT=`get_build_var TARGET_BUILD_VARIANT`
+BOARD_SYSTEMIMAGE_PARTITION_SIZE=`get_build_var BOARD_SYSTEMIMAGE_PARTITION_SIZE`
+PRODUCT_SYSTEM_VERITY=`get_build_var PRODUCT_SYSTEM_VERITY`
+echo TARGET_BOARD_PLATFORM=$TARGET_BOARD_PLATFORM
+echo TARGET_PRODUCT=$TARGET_PRODUCT
+echo TARGET_HARDWARE=$TARGET_HARDWARE
+echo TARGET_BUILD_VARIANT=$TARGET_BUILD_VARIANT
+echo BOARD_SYSTEMIMAGE_PARTITION_SIZE=$BOARD_SYSTEMIMAGE_PARTITION_SIZE
+echo PRODUCT_SYSTEM_VERITY=$PRODUCT_SYSTEM_VERITY
+TARGET="withoutkernel"
+if [ "$1"x != ""x ]; then
+ TARGET=$1
+fi
+
+IMAGE_PATH=rockdev/Image-$TARGET_PRODUCT
+UBOOT_PATH=u-boot
+KERNEL_PATH=kernel
+rm -rf $IMAGE_PATH
+mkdir -p $IMAGE_PATH
+
+FSTYPE=ext4
+echo system filesysystem is $FSTYPE
+
+BOARD_CONFIG=device/rockchip/common/device.mk
+if [[ $TARGET_BOARD_PLATFORM = "rk3399" ]]; then
+ if [[ $BOARD_SYSTEMIMAGE_PARTITION_SIZE = "1610612736" ]]; then
+ PARAMETER=device/rockchip/$TARGET_BOARD_PLATFORM/$TARGET_PRODUCT/parameter_system_1.5G.txt
+ elif [[ $BOARD_SYSTEMIMAGE_PARTITION_SIZE = "3221225472" ]]; then
+ PARAMETER=device/rockchip/$TARGET_BOARD_PLATFORM/$TARGET_PRODUCT/parameter_system_3.0G.txt
+ elif [[ $BOARD_SYSTEMIMAGE_PARTITION_SIZE = "4294967296" ]]; then
+ PARAMETER=device/rockchip/$TARGET_BOARD_PLATFORM/$TARGET_PRODUCT/parameter_system_4.0G.txt
+ else
+ PARAMETER=device/rockchip/$TARGET_BOARD_PLATFORM/$TARGET_PRODUCT/parameter.txt
+ fi
+elif [[ $TARGET_BOARD_PLATFORM = "rk3368" ]]; then
+ if [[ $BOARD_SYSTEMIMAGE_PARTITION_SIZE = "1610612736" ]]; then
+ PARAMETER=device/rockchip/$TARGET_BOARD_PLATFORM/parameter_system_1.5G.txt
+ elif [[ $BOARD_SYSTEMIMAGE_PARTITION_SIZE = "3221225472" ]]; then
+ PARAMETER=device/rockchip/$TARGET_BOARD_PLATFORM/parameter_system_3.0G.txt
+ elif [[ $BOARD_SYSTEMIMAGE_PARTITION_SIZE = "4294967296" ]]; then
+ PARAMETER=device/rockchip/$TARGET_BOARD_PLATFORM/parameter_system_4.0G.txt
+ else
+ PARAMETER=device/rockchip/$TARGET_BOARD_PLATFORM/parameter.txt
+ fi
+else
+ if [[ $TARGET_PRODUCT = "px5" || $TARGET_PRODUCT = "px3" ]]; then
+ PARAMETER=device/rockchip/$TARGET_PRODUCT/parameter.txt
+ else
+ PARAMETER=device/rockchip/$TARGET_BOARD_PLATFORM/parameter.txt
+ fi
+fi
+
+KERNEL_SRC_PATH=`grep TARGET_PREBUILT_KERNEL ${BOARD_CONFIG} |grep "^\s*TARGET_PREBUILT_KERNEL *:= *[\w]*\s" |awk '{print $3}'`
+
+[ $(id -u) -eq 0 ] || FAKEROOT=fakeroot
+
+BOOT_OTA="ota"
+
+[ $TARGET != $BOOT_OTA -a $TARGET != "withoutkernel" ] && echo "unknow target[${TARGET}],exit!" && exit 0
+
+ if [ ! -f $OUT/kernel ]
+ then
+ echo "kernel image not fount![$OUT/kernel] "
+ read -p "copy kernel from TARGET_PREBUILT_KERNEL[$KERNEL_SRC_PATH] (y/n) n to exit?"
+ if [ "$REPLY" == "y" ]
+ then
+ [ -f $KERNEL_SRC_PATH ] || \
+ echo -n "fatal! TARGET_PREBUILT_KERNEL not eixit! " || \
+ echo -n "check you configuration in [${BOARD_CONFIG}] " || exit 0
+
+ cp ${KERNEL_SRC_PATH} $OUT/kernel
+
+ else
+ exit 0
+ fi
+ fi
+
+if [ $TARGET == $BOOT_OTA ]
+then
+ echo "make ota images... "
+ echo -n "create boot.img with kernel... "
+ [ -d $OUT/root ] && \
+ mkbootfs $OUT/root | minigzip > $OUT/ramdisk.img && \
+ truncate -s "%4" $OUT/ramdisk.img && \
+ mkbootimg --kernel $OUT/kernel --ramdisk $OUT/ramdisk.img --second kernel/resource.img --os_version $PLATFORM_VERSION --os_patch_level $PLATFORM_SECURITY_PATCH --cmdline buildvariant=$TARGET_BUILD_VARIANT --output $OUT/boot.img && \
+ cp -a $OUT/boot.img $IMAGE_PATH/
+ echo "done."
+else
+ echo -n "create boot.img without kernel... "
+ [ -d $OUT/root ] && \
+ mkbootfs $OUT/root | minigzip > $OUT/ramdisk.img && \
+ truncate -s "%4" $OUT/ramdisk.img && \
+ rkst/mkkrnlimg $OUT/ramdisk.img $IMAGE_PATH/boot.img >/dev/null
+ echo "done."
+fi
+if [ $TARGET == $BOOT_OTA ]
+then
+ echo -n "create recovery.img with kernel... "
+ [ -d $OUT/recovery/root ] && \
+ mkbootfs $OUT/recovery/root | minigzip > $OUT/ramdisk-recovery.img && \
+ truncate -s "%4" $OUT/ramdisk-recovery.img && \
+ mkbootimg --kernel $OUT/kernel --ramdisk $OUT/ramdisk-recovery.img --second kernel/resource.img --os_version $PLATFORM_VERSION --os_patch_level $PLATFORM_SECURITY_PATCH --cmdline buildvariant=$TARGET_BUILD_VARIANT --output $OUT/recovery.img && \
+ cp -a $OUT/recovery.img $IMAGE_PATH/
+ echo "done."
+else
+ echo -n "create recovery.img with kernel and with out resource... "
+ [ -d $OUT/recovery/root ] && \
+ mkbootfs $OUT/recovery/root | minigzip > $OUT/ramdisk-recovery.img && \
+ truncate -s "%4" $OUT/ramdisk-recovery.img && \
+ mkbootimg --kernel $OUT/kernel --ramdisk $OUT/ramdisk-recovery.img --os_version $PLATFORM_VERSION --os_patch_level $PLATFORM_SECURITY_PATCH --cmdline buildvariant=$TARGET_BUILD_VARIANT --output $OUT/recovery.img && \
+ cp -a $OUT/recovery.img $IMAGE_PATH/
+ echo "done."
+fi
+ echo -n "create misc.img.... "
+ cp -a rkst/Image/misc.img $IMAGE_PATH/misc.img
+ cp -a rkst/Image/pcba_small_misc.img $IMAGE_PATH/pcba_small_misc.img
+ cp -a rkst/Image/pcba_whole_misc.img $IMAGE_PATH/pcba_whole_misc.img
+ echo "done."
+
+if [ -d $OUT/system ]
+then
+ echo -n "create system.img... "
+ if [ "$FSTYPE" = "cramfs" ]
+ then
+ chmod -R 777 $OUT/system
+ $FAKEROOT mkfs.cramfs $OUT/system $IMAGE_PATH/system.img
+ elif [ "$FSTYPE" = "squashfs" ]
+ then
+ chmod -R 777 $OUT/system
+ mksquashfs $OUT/system $IMAGE_PATH/system.img -all-root >/dev/null
+ elif [ "$FSTYPE" = "ext3" ] || [ "$FSTYPE" = "ext4" ]
+ then
+ if [ "$PRODUCT_SYSTEM_VERITY" = "true" ]; then
+ python ./build/tools/releasetools/build_image.py \
+ $OUT/system $OUT/obj/PACKAGING/systemimage_intermediates/system_image_info.txt \
+ $OUT/system.img $OUT/system
+ echo -n "translate verified sparse image to raw image... "
+ simg2img $OUT/system.img $IMAGE_PATH/system.img
+ else
+ #system_size=`ls -l $OUT/system.img | awk '{print $5;}'`
+ system_size=$BOARD_SYSTEMIMAGE_PARTITION_SIZE
+ [ $system_size -gt "0" ] || { echo "Please make first!!!" && exit 1; }
+ MAKE_EXT4FS_ARGS=" -L system -S $OUT/root/file_contexts -a system $IMAGE_PATH/system.img $OUT/system"
+ ok=0
+ while [ "$ok" = "0" ]; do
+ make_ext4fs -l $system_size $MAKE_EXT4FS_ARGS >/dev/null 2>&1 &&
+ tune2fs -c -1 -i 0 $IMAGE_PATH/system.img >/dev/null 2>&1 &&
+ ok=1 || system_size=$(($system_size + 5242880))
+ done
+ e2fsck -fyD $IMAGE_PATH/system.img >/dev/null 2>&1 || true
+ fi
+ else
+ mkdir -p $IMAGE_PATH/2k $IMAGE_PATH/4k
+ mkyaffs2image -c 2032 -s 16 -f $OUT/system $IMAGE_PATH/2k/system.img
+ mkyaffs2image -c 4080 -s 16 -f $OUT/system $IMAGE_PATH/4k/system.img
+ fi
+ echo "done."
+fi
+if [ -f $UBOOT_PATH/uboot.img ]
+then
+ echo -n "create uboot.img..."
+ cp -a $UBOOT_PATH/uboot.img $IMAGE_PATH/uboot.img
+ echo "done."
+else
+ echo "$UBOOT_PATH/uboot.img not fount! Please make it from $UBOOT_PATH first!"
+fi
+
+if [ -f $UBOOT_PATH/trust.img ]
+then
+ echo -n "create trust.img..."
+ cp -a $UBOOT_PATH/trust.img $IMAGE_PATH/trust.img
+ echo "done."
+else
+ echo "$UBOOT_PATH/trust.img not fount! Please make it from $UBOOT_PATH first!"
+fi
+
+if [ -f $UBOOT_PATH/*_loader_*.bin ]
+then
+ echo -n "create loader..."
+ cp -a $UBOOT_PATH/*_loader_*.bin $IMAGE_PATH/MiniLoaderAll.bin
+ echo "done."
+else
+ if [ -f $UBOOT_PATH/*loader*.bin ]; then
+ echo -n "create loader..."
+ cp -a $UBOOT_PATH/*loader*.bin $IMAGE_PATH/MiniLoaderAll.bin
+ echo "done."
+ elif [ "$TARGET_PRODUCT" == "px3" -a -f $UBOOT_PATH/RKPX3Loader_miniall.bin ]; then
+ echo -n "create loader..."
+ cp -a $UBOOT_PATH/RKPX3Loader_miniall.bin $IMAGE_PATH/MiniLoaderAll.bin
+ echo "done."
+ else
+ echo "$UBOOT_PATH/*MiniLoaderAll_*.bin not fount! Please make it from $UBOOT_PATH first!"
+ fi
+fi
+
+if [ -f $KERNEL_PATH/resource.img ]
+then
+ echo -n "create resource.img..."
+ cp -a $KERNEL_PATH/resource.img $IMAGE_PATH/resource.img
+ echo "done."
+else
+ echo "$KERNEL_PATH/resource.img not fount!"
+fi
+
+if [ -f $KERNEL_PATH/kernel.img ]
+then
+ echo -n "create kernel.img..."
+ cp -a $KERNEL_PATH/kernel.img $IMAGE_PATH/kernel.img
+ echo "done."
+else
+ echo "$KERNEL_PATH/kernel.img not fount!"
+fi
+
+if [ -f $PARAMETER ]
+then
+ echo -n "create parameter..."
+ cp -a $PARAMETER $IMAGE_PATH/parameter.txt
+ echo "done."
+else
+ echo "$PARAMETER not fount!"
+fi
+chmod a+r -R $IMAGE_PATH/
diff --git a/mkimage_verity.sh b/mkimage_verity.sh
new file mode 100755
index 0000000..f2c5281
--- /dev/null
+++ b/mkimage_verity.sh
@@ -0,0 +1,112 @@
+#!/bin/bash
+set -e
+
+. build/envsetup.sh >/dev/null && setpaths
+
+export PATH=$ANDROID_BUILD_PATHS:$PATH
+TARGET_PRODUCT=`get_build_var TARGET_PRODUCT`
+TARGET_HARDWARE=`get_build_var TARGET_BOARD_HARDWARE`
+echo TARGET_PRODUCT=$TARGET_PRODUCT
+echo TARGET_HARDWARE=$TARGET_HARDWARE
+TARGET="withoutkernel"
+if [ "$1"x != ""x ]; then
+ TARGET=$1
+fi
+
+IMAGE_PATH=rockdev/Image-$TARGET_PRODUCT
+
+rm -rf $IMAGE_PATH
+mkdir -p $IMAGE_PATH
+
+FSTYPE=ext4
+echo system filesysystem is $FSTYPE
+
+BOARD_CONFIG=device/rockchip/common/device.mk
+
+KERNEL_SRC_PATH=`grep TARGET_PREBUILT_KERNEL ${BOARD_CONFIG} |grep "^\s*TARGET_PREBUILT_KERNEL *:= *[\w]*\s" |awk '{print $3}'`
+
+[ $(id -u) -eq 0 ] || FAKEROOT=fakeroot
+
+BOOT_OTA="ota"
+
+[ $TARGET != $BOOT_OTA -a $TARGET != "withoutkernel" ] && echo "unknow target[${TARGET}],exit!" && exit 0
+
+ if [ ! -f $OUT/kernel ]
+ then
+ echo "kernel image not fount![$OUT/kernel] "
+ read -p "copy kernel from TARGET_PREBUILT_KERNEL[$KERNEL_SRC_PATH] (y/n) n to exit?"
+ if [ "$REPLY" == "y" ]
+ then
+ [ -f $KERNEL_SRC_PATH ] || \
+ echo -n "fatal! TARGET_PREBUILT_KERNEL not eixit! " || \
+ echo -n "check you configuration in [${BOARD_CONFIG}] " || exit 0
+
+ cp ${KERNEL_SRC_PATH} $OUT/kernel
+
+ else
+ exit 0
+ fi
+ fi
+
+if [ $TARGET == $BOOT_OTA ]
+then
+ echo "make ota images... "
+ echo -n "create boot.img with kernel... "
+ [ -d $OUT/root ] && \
+ mkbootfs $OUT/root | minigzip > $OUT/ramdisk.img && \
+ mkbootimg --kernel $OUT/kernel --ramdisk $OUT/ramdisk.img --second kernel/resource.img --output $OUT/boot.img && \
+ cp -a $OUT/boot.img $IMAGE_PATH/
+ echo "done."
+else
+ echo -n "create boot.img without kernel... "
+ [ -d $OUT/root ] && \
+ mkbootfs $OUT/root | minigzip > $OUT/ramdisk.img && \
+ rkst/mkkrnlimg $OUT/ramdisk.img $IMAGE_PATH/boot.img >/dev/null
+ echo "done."
+fi
+if [ $TARGET == $BOOT_OTA ]
+then
+ echo -n "create recovery.img with kernel... "
+ [ -d $OUT/recovery/root ] && \
+ mkbootfs $OUT/recovery/root | minigzip > $OUT/ramdisk-recovery.img && \
+ mkbootimg --kernel $OUT/kernel --ramdisk $OUT/ramdisk-recovery.img --second kernel/resource.img --output $OUT/recovery.img && \
+ cp -a $OUT/recovery.img $IMAGE_PATH/
+ echo "done."
+else
+ echo -n "create recovery.img with kernel and with out resource... "
+ [ -d $OUT/recovery/root ] && \
+ mkbootfs $OUT/recovery/root | minigzip > $OUT/ramdisk-recovery.img && \
+ mkbootimg --kernel $OUT/kernel --ramdisk $OUT/ramdisk-recovery.img --output $OUT/recovery.img && \
+ cp -a $OUT/recovery.img $IMAGE_PATH/
+ echo "done."
+fi
+ echo -n "create misc.img.... "
+ cp -a rkst/Image/misc.img $IMAGE_PATH/misc.img
+ cp -a rkst/Image/pcba_small_misc.img $IMAGE_PATH/pcba_small_misc.img
+ cp -a rkst/Image/pcba_whole_misc.img $IMAGE_PATH/pcba_whole_misc.img
+ echo "done."
+
+if [ -d $OUT/system ]
+then
+ echo -n "create system.img... "
+ if [ "$FSTYPE" = "cramfs" ]
+ then
+ chmod -R 777 $OUT/system
+ $FAKEROOT mkfs.cramfs $OUT/system $IMAGE_PATH/system.img
+ elif [ "$FSTYPE" = "squashfs" ]
+ then
+ chmod -R 777 $OUT/system
+ mksquashfs $OUT/system $IMAGE_PATH/system.img -all-root >/dev/null
+ elif [ "$FSTYPE" = "ext3" ] || [ "$FSTYPE" = "ext4" ]
+ then
+ simg2img $OUT/system.img $IMAGE_PATH/system.img
+ else
+ mkdir -p $IMAGE_PATH/2k $IMAGE_PATH/4k
+ mkyaffs2image -c 2032 -s 16 -f $OUT/system $IMAGE_PATH/2k/system.img
+ mkyaffs2image -c 4080 -s 16 -f $OUT/system $IMAGE_PATH/4k/system.img
+ fi
+ echo "done."
+fi
+
+chmod a+r -R $IMAGE_PATH/
+
diff --git a/neon_transform/lib/librockchipxxx.so b/neon_transform/lib/librockchipxxx.so
new file mode 100755
index 0000000..a2d6955
--- /dev/null
+++ b/neon_transform/lib/librockchipxxx.so
Binary files differ
diff --git a/neon_transform/lib64/librockchipxxx.so b/neon_transform/lib64/librockchipxxx.so
new file mode 100755
index 0000000..d7357f0
--- /dev/null
+++ b/neon_transform/lib64/librockchipxxx.so
Binary files differ
diff --git a/nfc/libnfc-brcm-20791b03.conf b/nfc/libnfc-brcm-20791b03.conf
new file mode 100644
index 0000000..8501b79
--- /dev/null
+++ b/nfc/libnfc-brcm-20791b03.conf
@@ -0,0 +1,65 @@
+###############################################################################
+# Firmware patch file
+# If the value is not set then patch download is disabled.
+FW_PATCH="/vendor/firmware/BCM20791B3_002.004.010.0161.0000_Generic_I2CLite_NCD_Signed_configdata.ncd"
+
+###############################################################################
+# Firmware pre-patch file (sent before the above patch file)
+# If the value is not set then pre-patch is not used.
+FW_PRE_PATCH="/vendor/firmware/BCM20791B3_002.004.010.0161.0000_Generic_PreI2C_NCD_Signed_configdata.ncd"
+
+###############################################################################
+# LPTD mode configuration
+# byte[0] is the length of the remaining bytes in this value
+# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
+# byte[1] is the param id it should be set to B9.
+# byte[2] is the length of the LPTD parameters
+# byte[3] indicates if LPTD is enabled
+# if set to 0, LPTD will be disabled (parameters will still be sent).
+# byte[4-n] are the LPTD parameters.
+# By default, LPTD is enabled and default settings are used.
+# See nfc_hal_dm_cfg.c for defaults
+LPTD_CFG={23:B9:21:01:02:FF:FF:06:A0:0F:40:00:80:02:02:10:00:00:00:31:0E:30:00:00:01:00:00:00:00:00:00:00:00:00:00:00}
+
+###############################################################################
+# Startup Configuration (256 bytes maximum)
+#
+# This adjusts the configuration to set the C2 parameter byte[1] to 00 (to
+# discover all UICC).
+#
+NFA_DM_START_UP_CFG={2E:CB:01:01:A5:01:01:CA:14:00:00:00:00:06:E8:03:00:00:00:00:00:00:00:00:00:00:00:00:00:B5:03:01:03:FF:C2:08:61:00:82:04:80:C3:C9:01:80:01:01}
+
+###############################################################################
+# Antenna Configuration - This data is used when setting 0xC8 config item
+# at startup (before discovery is started). If not used, no value is sent.
+#
+# The settings for this value are documented here:
+# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
+# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
+#
+# The values marked as ?? should be tweaked per antenna or customer/app:
+# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
+# array[0] = 0x20 is length of the payload from array[1] to the end
+# array[1] = 0xC8 is PREINIT_DSP_CFG
+#PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0A:03:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:48:01:00:00:40:04}
+
+###############################################################################
+# Disable FW FSM on B3 for DTA
+NFA_DTA_START_UP_VSC_CFG={03:06:01:00}
+
+###############################################################################
+# Snooze Mode Settings
+#
+# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
+# to disable.
+#
+# If SNOOZE_MODE_CFG is not provided, the default settings are used:
+# They are as follows:
+# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
+# 0 Idle Threshold Host
+# 0 Idle Threshold HC
+# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
+# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
+#
+#SNOOZE_MODE_CFG={08:00:00:00:01}
+
diff --git a/nfc/libnfc-brcm-20791b04.conf b/nfc/libnfc-brcm-20791b04.conf
new file mode 100644
index 0000000..cd4e080
--- /dev/null
+++ b/nfc/libnfc-brcm-20791b04.conf
@@ -0,0 +1,73 @@
+###############################################################################
+# Firmware patch file
+# If the value is not set then patch download is disabled.
+# I2C (supports NVM=1, no UICC1)
+#FW_PATCH="/vendor/firmware/BCM20791B4_002.005.010.0121.0000_Generic_I2C_NCD_Unsigned_configdata.ncd"
+# NVM=EEPROM and no UICC1
+#FW_PATCH="/vendor/firmware/BCM20791B4_002.005.010.0121.0000_Generic_I2CNVM1NOUICC1_NCD_Unsigned_configdata.ncd"
+# NVM=UICC
+#FW_PATCH="/vendor/firmware/BCM20791B4_002.005.010.0121.0000_Generic_I2CNVM2_NCD_Unsigned_configdata.ncd"
+# GEDI2C (supports NVM=1, UICC1)
+#FW_PATCH="/vendor/firmware/BCM20791B4_002.005.010.0121.0000_Generic_I2CGED_NCD_Unsigned_configdata.ncd"
+
+###############################################################################
+# Firmware pre-patch file (sent before the above patch file)
+# If the value is not set then pre-patch is not used.
+#FW_PRE_PATCH="/vendor/firmware/BCM20791B4_002.005.010.0121.0000_Generic_PreI2C_NCD_Unsigned_configdata.ncd"
+
+###############################################################################
+# LPTD mode configuration
+# byte[0] is the length of the remaining bytes in this value
+# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
+# byte[1] is the param id it should be set to B9.
+# byte[2] is the length of the LPTD parameters
+# byte[3] indicates if LPTD is enabled
+# if set to 0, LPTD will be disabled (parameters will still be sent).
+# byte[4-n] are the LPTD parameters.
+# By default, LPTD is enabled and default settings are used.
+# See nfc_hal_dm_cfg.c for defaults
+#
+# NOTE: LPTD is not supported and should be disabled for I2CGCF & I2CLite of the B4 patch
+#
+LPTD_CFG={29:B9:27:01:00:FF:FF:08:A0:0F:40:00:80:12:02:10:00:00:00:31:0B:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00}
+# To disable LPTD, do the following
+#LPTD_CFG={03:B9:01:00}
+
+###############################################################################
+# Startup Configuration (256 bytes maximum)
+#
+# This adjusts the configuration to set the C2 parameter byte[1] to 00 (to
+# discover all UICC).
+#
+NFA_DM_START_UP_CFG={48:CB:01:01:A5:01:01:CA:14:00:00:00:00:0E:F0:55:00:00:0F:00:00:00:00:00:00:00:00:00:00:B5:03:01:03:FF:C2:08:61:08:00:04:80:C3:C9:01:80:01:01:C9:03:03:0F:AB:5B:01:02:B2:04:E8:03:00:00:CF:02:02:08:B1:06:00:20:00:00:00:12}
+
+###############################################################################
+# Antenna Configuration - This data is used when setting 0xC8 config item
+# at startup (before discovery is started). If not used, no value is sent.
+#
+# The settings for this value are documented here:
+# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
+# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
+#
+# The values marked as ?? should be tweaked per antenna or customer/app:
+# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
+# array[0] = 0x20 is length of the payload from array[1] to the end
+# array[1] = 0xC8 is PREINIT_DSP_CFG
+#PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0A:03:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:48:01:00:00:40:04}
+
+###############################################################################
+# Snooze Mode Settings
+#
+# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
+# to disable.
+#
+# If SNOOZE_MODE_CFG is not provided, the default settings are used:
+# They are as follows:
+# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
+# 0 Idle Threshold Host
+# 0 Idle Threshold HC
+# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
+# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
+#
+#SNOOZE_MODE_CFG={08:00:00:00:01}
+
diff --git a/nfc/libnfc-brcm-20791b05.conf b/nfc/libnfc-brcm-20791b05.conf
new file mode 100644
index 0000000..7cf9c21
--- /dev/null
+++ b/nfc/libnfc-brcm-20791b05.conf
@@ -0,0 +1,61 @@
+###############################################################################
+# Firmware patch file
+# If the value is not set then patch download is disabled.
+FW_PATCH="/vendor/firmware/BCM20791B5_002.006.013.0011.0000_Generic_I2C_NCD_Unsigned_configdata.ncd"
+
+###############################################################################
+# Firmware pre-patch file (sent before the above patch file)
+# If the value is not set then pre-patch is not used.
+FW_PRE_PATCH=""
+
+###############################################################################
+# LPTD mode configuration
+# byte[0] is the length of the remaining bytes in this value
+# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
+# byte[1] is the param id it should be set to B9.
+# byte[2] is the length of the LPTD parameters
+# byte[3] indicates if LPTD is enabled
+# if set to 0, LPTD will be disabled (parameters will still be sent).
+# byte[4-n] are the LPTD parameters.
+# By default, LPTD is enabled and default settings are used.
+# See nfc_hal_dm_cfg.c for defaults
+LPTD_CFG={38:B9:36:01:00:FF:FF:08:00:00:00:A0:0F:40:00:00:12:02:10:00:00:00:2D:0B:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:03:00:D0:07:00:00:08:07:00:00:C8:00:00:00:00:00:00:00}
+
+###############################################################################
+# Startup Configuration (256 bytes maximum)
+#
+# This adjusts the configuration to set the C2 parameter byte[1] to 00 (to
+# discover all UICC).
+#
+NFA_DM_START_UP_CFG={51:CB:01:01:A5:01:01:CA:14:00:00:00:00:0E:F0:55:00:00:0F:00:00:00:00:00:00:00:00:00:00:B5:03:01:03:FF:C2:08:01:08:00:04:80:C3:C9:01:80:01:01:C9:03:03:0F:AB:5B:01:02:B2:04:E8:03:00:00:CF:02:02:08:B1:06:00:20:00:00:00:12:18:01:01:28:01:01:54:01:02}
+
+###############################################################################
+# Antenna Configuration - This data is used when setting 0xC8 config item
+# at startup (before discovery is started). If not used, no value is sent.
+#
+# The settings for this value are documented here:
+# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
+# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
+#
+# The values marked as ?? should be tweaked per antenna or customer/app:
+# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
+# array[0] = 0x20 is length of the payload from array[1] to the end
+# array[1] = 0xC8 is PREINIT_DSP_CFG
+#PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0A:03:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:48:01:00:00:40:04}
+
+###############################################################################
+# Snooze Mode Settings
+#
+# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
+# to disable.
+#
+# If SNOOZE_MODE_CFG is not provided, the default settings are used:
+# They are as follows:
+# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
+# 0 Idle Threshold Host
+# 0 Idle Threshold HC
+# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
+# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
+#
+#SNOOZE_MODE_CFG={08:00:00:00:01}
+
diff --git a/nfc/libnfc-brcm-43341b00.conf b/nfc/libnfc-brcm-43341b00.conf
new file mode 100644
index 0000000..4210c74
--- /dev/null
+++ b/nfc/libnfc-brcm-43341b00.conf
@@ -0,0 +1,57 @@
+###############################################################################
+# LPTD mode configuration
+# byte[0] is the length of the remaining bytes in this value
+# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
+# byte[1] is the param id it should be set to B9.
+# byte[2] is the length of the LPTD parameters
+# byte[3] indicates if LPTD is enabled
+# if set to 0, LPTD will be disabled (parameters will still be sent).
+# byte[4-n] are the LPTD parameters.
+# By default, LPTD is enabled and default settings are used.
+# See nfc_hal_dm_cfg.c for defaults
+LPTD_CFG={35:B9:33:01:00:FF:FF:00:40:00:40:00:90:10:00:10:00:00:00:2F:0F:28:00:00:00:00:00:00:00:00:00:00:00:00:00:00:03:00:D0:07:00:00:C4:09:00:00:F9:01:00:00:00:80:00:00}
+
+###############################################################################
+# Startup Configuration (256 bytes maximum)
+NFA_DM_START_UP_CFG={3C:CB:01:01:A5:01:01:CA:14:00:00:00:00:06:E8:03:00:00:00:00:00:00:00:00:00:00:00:00:00:B5:03:01:03:FF:C2:08:01:08:00:04:80:C3:C9:01:80:01:01:A9:03:00:0B:00:18:01:01:28:01:01:54:01:02}
+
+###############################################################################
+# Firmware patch file
+# If the value is not set then patch download is disabled.
+#FW_PATCH="/vendor/firmware/BCM43341NFCB0_002.001.009.0021.0000_Generic_I2C_NCD_Unsigned_configdata.ncd"
+
+###############################################################################
+# Firmware pre-patch file (sent before the above patch file)
+# If the value is not set then pre-patch is not used.
+#FW_PRE_PATCH="/vendor/firmware/BCM43341NFCB0_002.001.009.0021.0000_Generic_PreI2C_NCD_Unsigned_configdata.ncd"
+
+###############################################################################
+# Antenna Configuration - This data is used when setting 0xC8 config item
+# at startup (before discovery is started). If not used, no value is sent.
+#
+# The settings for this value are documented here:
+# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
+# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
+#
+# The values marked as ?? should be tweaked per antenna or customer/app:
+# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
+# array[0] = 0x20 is length of the payload from array[1] to the end
+# array[1] = 0xC8 is PREINIT_DSP_CFG
+#PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0A:03:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:48:01:00:00:40:04}
+
+###############################################################################
+# Snooze Mode Settings
+#
+# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
+# to disable.
+#
+# If SNOOZE_MODE_CFG is not provided, the default settings are used:
+# They are as follows:
+# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
+# 0 Idle Threshold Host
+# 0 Idle Threshold HC
+# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
+# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
+#
+SNOOZE_MODE_CFG={08:02:02:00:01}
+
diff --git a/nfc/libnfc-brcm.conf b/nfc/libnfc-brcm.conf
new file mode 100644
index 0000000..561a63c
--- /dev/null
+++ b/nfc/libnfc-brcm.conf
@@ -0,0 +1,260 @@
+###############################################################################
+# Application options
+APPL_TRACE_LEVEL=0x00
+PROTOCOL_TRACE_LEVEL=0x00000000
+
+###############################################################################
+# Logging
+# Set USE_RAW_NCI_TRACE = 1 for protocol logging in a raw format
+# instead of decoded
+#USE_RAW_NCI_TRACE=0
+
+###############################################################################
+# performance measurement
+# Change this setting to control how often USERIAL log the performance (throughput)
+# data on read/write/poll
+# defailt is to log performance dara for every 100 read or write
+#REPORT_PERFORMANCE_MEASURE=100
+
+###############################################################################
+# File used for NFA storage
+NFA_STORAGE="/data/nfc"
+
+###############################################################################
+# Low Power Mode Settings
+#
+# If NFA_DM_LP_CFG is not provided, stack default settings are
+# used (see nfa_dm_brcm_cfg.c). They are as follows:
+# 1 Power cycle to full power mode from CEx
+# 5 Parameter for low power mode command
+# 0 Primary Threshold for battery monitor
+# 0-7 representing below voltages:
+# {2, 2.2, 2.7, 2.8, 2.9, 3, 3.1, 3.2}
+# 8 Secondary Threshold for battery monitor
+# 0-15 representing below voltages:
+# {5.2, 4.87, 4.54, 4.22, 3.9, 3.73, 3.57, 3.4,
+# 3.2, 3.1, 3.0, 2.9, 2.8, 2.7, 2.2, 2.0}
+#
+#NFA_DM_LP_CFG={01:05:00:08}
+
+###############################################################################
+# Insert a delay in milliseconds after NFC_WAKE and before write to NFCC
+NFC_WAKE_DELAY=20
+
+###############################################################################
+# Various Delay settings (in ms) used in USERIAL
+# POWER_ON_DELAY
+# Delay after turning on chip, before writing to transport (default 300)
+# PRE_POWER_OFF_DELAY
+# Delay after deasserting NFC-Wake before turn off chip (default 0)
+# POST_POWER_OFF_DELAY
+# Delay after turning off chip, before USERIAL_close returns (default 0)
+# CE3_PRE_POWER_OFF_DELAY
+# Delay after deasserting NFC-Wake before turn off chip (default 1000)
+# when going to CE3 Switch Off mode
+#
+POWER_ON_DELAY=50
+PRE_POWER_OFF_DELAY=10
+#POST_POWER_OFF_DELAY=0
+CE3_PRE_POWER_OFF_DELAY=1500
+
+###############################################################################
+# Maximum time (ms) to wait for RESET NTF after setting REG_PU to high
+# The default is 1000.
+NFCC_ENABLE_TIMEOUT=300
+
+###############################################################################
+# Device Manager Config
+#
+# If NFA_DM_CFG is not provided, stack default settings are
+# used (see nfa_dm_cfg.c). They are as follows:
+# 0 (FALSE) Automatic NDEF detection when background polling
+# 0 (FALSE) Automatic NDEF read when background polling
+#
+#NFA_DM_CFG={00:00}
+
+###############################################################################
+# Default poll duration (in ms)
+# The defualt is 1000ms if not set (see nfc_target.h)
+#NFA_DM_DISC_DURATION_POLL=1000
+
+###############################################################################
+# Startup Vendor Specific Configuration (100 bytes maximum);
+# byte[0] TLV total len = 0x5
+# byte[1] NCI_MTS_CMD|NCI_GID_PROP = 0x2f
+# byte[2] NCI_MSG_FRAME_LOG = 0x9
+# byte[3] 2
+# byte[4] 0=turn off RF frame logging; 1=turn on
+# byte[5] 0=turn off SWP frame logging; 1=turn on
+# NFA_DM_START_UP_VSC_CFG={05:2F:09:02:01:01}
+
+###############################################################################
+# Configure the default Destination Gate used by HCI (the default is 4, which
+# is the ETSI loopback gate.
+#NFA_HCI_DEFAULT_DEST_GATE=0x04
+
+###############################################################################
+# Override the stack default for NFA_EE_MAX_EE_SUPPORTED set in nfc_target.h.
+# The value is set to 3 by default as it assumes we will discover 0xF2,
+# 0xF3, and 0xF4. If a platform will exclude and SE, this value can be reduced
+# so that the stack will not wait any longer than necessary.
+#NFA_MAX_EE_SUPPORTED=3
+
+###############################################################################
+# Configure the single default SE to use. The default is to use the first
+# SE that is detected by the stack. This value might be used when the phone
+# supports multiple SE (e.g. 0xF3 and 0xF4) but you want to force it to use
+# one of them (e.g. 0xF4).
+#ACTIVE_SE=0xF3
+
+###############################################################################
+# Configure the NFC Extras to open and use a static pipe. If the value is
+# not set or set to 0, then the default is use a dynamic pipe based on a
+# destination gate (see NFA_HCI_DEFAULT_DEST_GATE). Note there is a value
+# for each UICC (where F3="UICC0" and F4="UICC1")
+#NFA_HCI_STATIC_PIPE_ID_F3=0x70
+NFA_HCI_STATIC_PIPE_ID_F4=0x71
+
+###############################################################################
+# When disconnecting from Oberthur secure element, perform a warm-reset of
+# the secure element to deselect the applet.
+# The default hex value of the command is 0x3. If this variable is undefined,
+# then this feature is not used.
+OBERTHUR_WARM_RESET_COMMAND=0x03
+
+###############################################################################
+# Force UICC to only listen to the following technology(s).
+# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
+# Default is to use technology that is discovered in UICC.
+# 0x01 = NFA_TECHNOLOGY_MASK_A
+UICC_LISTEN_TECH_MASK=0x01
+
+###############################################################################
+# AID for Empty Select command
+# If specified, this AID will be substituted when an Empty SELECT command is
+# detected. The first byte is the length of the AID. Maximum length is 16.
+AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00}
+
+###############################################################################
+# Force tag polling for the following technology(s).
+# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
+# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B |
+# NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 |
+# NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_A_ACTIVE |
+# NFA_TECHNOLOGY_MASK_F_ACTIVE.
+#
+# Notable bits:
+# NFA_TECHNOLOGY_MASK_KOVIO 0x20
+# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40
+# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80
+POLLING_TECH_MASK=0xFF
+
+###############################################################################
+# Force P2P to only listen for the following technology(s).
+# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
+# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F |
+# NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE
+P2P_LISTEN_TECH_MASK=0xC4
+
+###############################################################################
+# Maximum Number of Credits to be allowed by the NFCC
+# This value overrides what the NFCC specifices allowing the host to have
+# the control to work-around transport limitations. If this value does
+# not exist or is set to 0, the NFCC will provide the number of credits.
+MAX_RF_DATA_CREDITS=1
+
+###############################################################################
+# This setting allows you to disable registering the T4t Virtual SE that causes
+# the NFCC to send PPSE requests to the DH.
+# The default setting is enabled (i.e. T4t Virtual SE is registered).
+#REGISTER_VIRTUAL_SE=1
+
+###############################################################################
+# When screen is turned off, specify the desired power state of the controller.
+# 0: power-off-sleep state; DEFAULT
+# 1: full-power state
+# 2: screen-off card-emulation (CE4/CE3/CE1 modes are used)
+# 3: FPM CE in snooze mode, Switch Off, Battery Off still available.
+#SCREEN_OFF_POWER_STATE=0
+
+###############################################################################
+# SPD Debug mode
+# If set to 1, any failure of downloading a patch will trigger a hard-stop
+#SPD_DEBUG=0
+
+###############################################################################
+# SPD Max Retry Count
+# The number of attempts to download a patch before giving up (defualt is 3).
+# Note, this resets after a power-cycle.
+#SPD_MAX_RETRY_COUNT=3
+
+###############################################################################
+# Patch RAM Version Checking
+# By default the stack will reject any attempt to download a patch where major
+# version is < the one that is in NVM. If this config item is set to 1 then
+# this version check is skipped.
+#
+#SPD_IGNORE_VERSION=0
+
+###############################################################################
+# transport driver
+#
+# TRANSPORT_DRIVER=<driver>
+#
+# where <driver> can be, for example:
+# "/dev/ttyS" (UART)
+# "/dev/bcmi2cnfc" (I2C)
+# "hwtun" (HW Tunnel)
+# "/dev/bcmspinfc" (SPI)
+# "/dev/btusb0" (BT USB)
+TRANSPORT_DRIVER="/dev/bcm2079x"
+
+###############################################################################
+# power control driver
+# Specify a kernel driver that support ioctl commands to control NFC_EN and
+# NFC_WAKE gpio signals.
+#
+# POWER_CONTRL_DRIVER=<driver>
+# where <driver> can be, for example:
+# "/dev/nfcpower"
+# "/dev/bcmi2cnfc" (I2C)
+# "/dev/bcmspinfc" (SPI)
+# i2c and spi driver may be used to control NFC_EN and NFC_WAKE signal
+POWER_CONTROL_DRIVER="/dev/bcm2079x"
+
+###############################################################################
+# I2C transport driver options
+#
+BCMI2CNFC_ADDRESS=0
+
+###############################################################################
+# I2C transport driver try to read multiple packets in read() if data is available
+# remove the comment below to enable this feature
+#READ_MULTIPLE_PACKETS=1
+
+###############################################################################
+# SPI transport driver options
+#SPI_NEGOTIATION={0A:F0:00:01:00:00:00:FF:FF:00:00}
+
+###############################################################################
+# UART transport driver options
+#
+# PORT=1,2,3,...
+# BAUD=115200, 19200, 9600, 4800,
+# DATABITS=8, 7, 6, 5
+# PARITY="even" | "odd" | "none"
+# STOPBITS="0" | "1" | "1.5" | "2"
+
+#UART_PORT=2
+#UART_BAUD=115200
+#UART_DATABITS=8
+#UART_PARITY="none"
+#UART_STOPBITS="1"
+
+###############################################################################
+# Insert a delay in microseconds per byte after a write to NFCC.
+# after writing a block of data to the NFCC, delay this an amopunt of time before
+# writing next block of data. the delay is calculated as below
+# NFC_WRITE_DELAY * (number of byte written) / 1000 milliseconds
+# e.g. after 259 bytes is written, delay (259 * 20 / 1000) 5 ms before next write
+NFC_WRITE_DELAY=20
diff --git a/nfc/nfcee_access.xml b/nfc/nfcee_access.xml
new file mode 100644
index 0000000..02e12fd
--- /dev/null
+++ b/nfc/nfcee_access.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Applications granted NFCEE access on user builds
+
+ See packages/apps/Nfc/etc/sample_nfcee_access.xml for full documentation.
+ -->
+
+ <!-- Google wallet release signature -->
+ <signer android:signature="3082044c30820334a003020102020900a8cd17c93da5d990300d06092a864886f70d01010505003077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643301e170d3131303332343031303635335a170d3338303830393031303635335a3077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e464330820120300d06092a864886f70d01010105000382010d00308201080282010100c30f88add9b492096a2c586a5a9a80356bfa026958f8ff0c5dfaf59f49268ad870dee821a53e1f5b170fc96245a3c982a7cb4527053be35e34f396d24b2291ec0c528d6e26927465e06875ea621f7ff98c40e3345b204907cc9354743acdaace65565f48ba74cd4121cdc876df3522badb095c20d934c56a3e5c393ee5f0e02f8fe0621f918d1f35a82489252c6fa6b63392a7686b3e48612d06a9cf6f49bff11d5d96289c9dfe14ac5762439697dd29eafdb9810de3263513a905ac8e8eaf20907e46750a5ab7bf9a77262f47b03f5a3c6e6d7b51343f69c7f725f70bcc1b4ad592250b705a86e6e83ee2ae37fe5701bcbdb26feefdfff60f6a5bdfb5b64793020103a381dc3081d9301d0603551d0e041604141ccece0eea4dc1121fc7515f0d0a0c72e08cc96d3081a90603551d230481a130819e80141ccece0eea4dc1121fc7515f0d0a0c72e08cc96da17ba4793077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643820900a8cd17c93da5d990300c0603551d13040530030101ff300d06092a864886f70d01010505000382010100a470c728e1d31b06d9af6ae768b565046c57806b9843724931d75d4ca10c321520d33ccfed2aa65462234c9ef9b6f910cc676b99cb7f9895d6c06763574fbb78331275dc5cf38fbaa918d7938c051ffba2ade8f303cde8d9e68a048d1fdb9e7c9f2a49b222c68fff422bf15569b85eeeedb04aa30873dbe64b9c9e74f8f2c2f6c40124aaa8d1780d18512b540add28b3e9581971a4170dd868cf5f31e44712b2c23bb51037d7ef9f87a6e5bdb35e2ceb6bb022636c17a56a96bc7a50258c0bd2ed7b31555a18452e17321a0d52838c82f63f742d74ff79586a5cbb7faf7198a84bcf744310e9e927597f00a23dd00660800c2238d90b2fb372dfdbba75bd852e" />
+
+</resources>
diff --git a/nfc/nfcee_access_debug.xml b/nfc/nfcee_access_debug.xml
new file mode 100644
index 0000000..a96a2d1
--- /dev/null
+++ b/nfc/nfcee_access_debug.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Applications granted NFCEE access on userdebug/eng builds
+
+ See packages/apps/Nfc/etc/sample_nfcee_access.xml for full documentation.
+ -->
+
+ <!-- Google Wallet dev signature -->
+ <signer android:signature="3082044c30820334a003020102020900de7695041d7650c0300d06092a864886f70d01010505003077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643301e170d3131303332343031303332345a170d3338303830393031303332345a3077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e464330820120300d06092a864886f70d01010105000382010d00308201080282010100e6ff3defe92aa10d71eb0fa6408bc036b7e243eeed68a6a4763dc7a52a31757cdac61fe510bb73c716e4000104265b347fcecef4c42bf1e1379dd0a876f028227fbbc1f9bdd5d713b2f6a935a379d2cba9c96f92d2d0787c11f1eb19548008a6a072b34b91836cfa0ae1276780e9007530166986a11c9cef46cef7c704806dde9431fb60284d120ab0e7de1d633f07687d468c51139afffdc6bc9a207ca904b8be1da0aa7b4e97756f43606488be5cae3c68e8bb7942cdf51607c930a2fcda655b75d0759cba89ad06e739bd0ba29b1f404296c2c0a85a847f5ab0d067c6c3ec9c49212042ac63a7e53b546c65b46080b4e3e680e23e1f77cfe7f6de744b1a65020103a381dc3081d9301d0603551d0e04160414a2e89064b05d08865c34db930a9d840050117aec3081a90603551d230481a130819e8014a2e89064b05d08865c34db930a9d840050117aeca17ba4793077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643820900de7695041d7650c0300c0603551d13040530030101ff300d06092a864886f70d010105050003820101003771870ce87c3c52ea84899230c6e962d94b4d5f1293c25d88261541fd90b5555d1285cef3b8312c3f5df691a8aae04cb981b305e427fd1d2d9e1987e1d29078f13c8452990f1821980263d8d4bd36519348d8d8ba26d8b99fbf09f5fd3ebb0ea3c2f0c9376f1e1fca76f3a6a405429d081b752a7a90b756e9ab44da41abc8e1e8f88ac2758da743fb73e650719a57840ccb6b7add21b99fc681e456e1872c223d5c074adf55f6abda268c2d8b64ea0a8845eecd968f92b493127e75c753c3ff30cbc678b51c9f52961472f17da20a0dc6274aa2463434c1a9b614df697d8ff5ca8101e7a25c7db3fb055d65569c04b01d389cabba57b3a1703ec2e74a88d334" />
+
+ <!-- Google wallet release signature -->
+ <signer android:signature="3082044c30820334a003020102020900a8cd17c93da5d990300d06092a864886f70d01010505003077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643301e170d3131303332343031303635335a170d3338303830393031303635335a3077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e464330820120300d06092a864886f70d01010105000382010d00308201080282010100c30f88add9b492096a2c586a5a9a80356bfa026958f8ff0c5dfaf59f49268ad870dee821a53e1f5b170fc96245a3c982a7cb4527053be35e34f396d24b2291ec0c528d6e26927465e06875ea621f7ff98c40e3345b204907cc9354743acdaace65565f48ba74cd4121cdc876df3522badb095c20d934c56a3e5c393ee5f0e02f8fe0621f918d1f35a82489252c6fa6b63392a7686b3e48612d06a9cf6f49bff11d5d96289c9dfe14ac5762439697dd29eafdb9810de3263513a905ac8e8eaf20907e46750a5ab7bf9a77262f47b03f5a3c6e6d7b51343f69c7f725f70bcc1b4ad592250b705a86e6e83ee2ae37fe5701bcbdb26feefdfff60f6a5bdfb5b64793020103a381dc3081d9301d0603551d0e041604141ccece0eea4dc1121fc7515f0d0a0c72e08cc96d3081a90603551d230481a130819e80141ccece0eea4dc1121fc7515f0d0a0c72e08cc96da17ba4793077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643820900a8cd17c93da5d990300c0603551d13040530030101ff300d06092a864886f70d01010505000382010100a470c728e1d31b06d9af6ae768b565046c57806b9843724931d75d4ca10c321520d33ccfed2aa65462234c9ef9b6f910cc676b99cb7f9895d6c06763574fbb78331275dc5cf38fbaa918d7938c051ffba2ade8f303cde8d9e68a048d1fdb9e7c9f2a49b222c68fff422bf15569b85eeeedb04aa30873dbe64b9c9e74f8f2c2f6c40124aaa8d1780d18512b540add28b3e9581971a4170dd868cf5f31e44712b2c23bb51037d7ef9f87a6e5bdb35e2ceb6bb022636c17a56a96bc7a50258c0bd2ed7b31555a18452e17321a0d52838c82f63f742d74ff79586a5cbb7faf7198a84bcf744310e9e927597f00a23dd00660800c2238d90b2fb372dfdbba75bd852e" />
+
+ <!-- Platform dev-keys signature -->
+ <signer android:signature="308204a830820390a003020102020900bcdfe81405d5c69e300d06092a864886f70d0101050500308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d301e170d3131303931393230303634325a170d3339303230343230303634325a308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d30820120300d06092a864886f70d01010105000382010d00308201080282010100ef7a8a34d8151d0479a239903261fe5026c520d5d88cd65920c98e096d2770f49636da9ffc4e80c472b05bd62a435f8266912aa2a34a18f6f4856f9ef52c10b88c267627136726823e8f3389b051ba92920e10bbaae0e38879efbe681b05863b655d81a6f3b75a85eb230b38b23ea4ef56f2161ff01652ae2049881adbe60d3bf8b5386a81f7404c0cf0c111c0a35ab0a9760426e4af12add73327ec433e047e3517f47a2d3674c2b819354d56eb7fd6c9aa67dd05b4bb1ca8a7e1946c2494e9364ea677a25481ac81f434bff3dd56e93e59fccef0e24a753461cd1cf15f22b62251d07416057ac5ca3e03a24f7f4eca876bacc5a1828acbde04c5cfdb608c47020103a381fc3081f9301d0603551d0e0416041402f997668541fa74693bea699a5766893a362a5d3081c90603551d230481c13081be801402f997668541fa74693bea699a5766893a362a5da1819aa48197308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d820900bcdfe81405d5c69e300c0603551d13040530030101ff300d06092a864886f70d0101050500038201010047d6fb32cadeae4444c379b3441ff9ba10990c23d10472c54fb7ebd9c33b2a173836337e1c175c980847a8894f6a99782e9c2e2133629254295fe52749f93ec1e39d213dd06d0ba99de3b6b5d4d856fafe74e08113b7b23a1b56f4918ed41218a03b9564456480b665200267d3770a9463db413c6a47bd81d725cb7d39c9d0941693c59cbe727d40415f0815c3c8363fb8fa2e028ceeb3bbfbc6b119db5b72f0edb0bb417bfcbf74d9fa069de22afe56a50bcde7ea1078749bb9ec0adc0e6de045641ee3a82c576645160b4ab9710d3cb3201f23957da8de9084c0bec93ad1c8c2054195f13c926db07c8bdf15673acf6d791ec1d3a0d7e1b3470447acd95873" />
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml
new file mode 100644
index 0000000..87994d3
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+ <!-- If Voice Radio Technology is RIL_RADIO_TECHNOLOGY_LTE:14 this is the value
+ that should be used instead. A value of RIL_RADIO_TECHNOLOGY_UNKNOWN:0 means
+ there is no replacement value and VoLTE is assumed to be supported -->
+ <integer name="config_volte_replacement_rat">6</integer>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc005/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc005/config.xml
new file mode 100644
index 0000000..028f9f5
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc005/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc012/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc012/config.xml
new file mode 100644
index 0000000..028f9f5
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc012/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc026/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc026/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc026/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc030/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc030/config.xml
new file mode 100644
index 0000000..a713a71
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc030/config.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+
+ <!-- Set to true if we need to not prefer an APN.
+ This is being added to enable a simple scenario of pre-paid
+ provisioning on some carriers, working around a bug (7305641)
+ where if the preferred is used we don't try the others. -->
+ <bool name="config_dontPreferApn">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc070/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc070/config.xml
new file mode 100644
index 0000000..a713a71
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc070/config.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+
+ <!-- Set to true if we need to not prefer an APN.
+ This is being added to enable a simple scenario of pre-paid
+ provisioning on some carriers, working around a bug (7305641)
+ where if the preferred is used we don't try the others. -->
+ <bool name="config_dontPreferApn">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc090/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc090/config.xml
new file mode 100644
index 0000000..a713a71
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc090/config.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+
+ <!-- Set to true if we need to not prefer an APN.
+ This is being added to enable a simple scenario of pre-paid
+ provisioning on some carriers, working around a bug (7305641)
+ where if the preferred is used we don't try the others. -->
+ <bool name="config_dontPreferApn">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc150/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc150/config.xml
new file mode 100644
index 0000000..a713a71
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc150/config.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+
+ <!-- Set to true if we need to not prefer an APN.
+ This is being added to enable a simple scenario of pre-paid
+ provisioning on some carriers, working around a bug (7305641)
+ where if the preferred is used we don't try the others. -->
+ <bool name="config_dontPreferApn">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc160/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc160/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc160/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc170/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc170/config.xml
new file mode 100644
index 0000000..5ea1edb
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc170/config.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc200/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc200/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc200/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc210/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc210/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc210/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc220/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc220/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc220/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc230/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc230/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc230/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc240/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc240/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc240/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc250/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc250/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc250/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml
new file mode 100644
index 0000000..3371fa1
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+
+ <!-- If Voice Radio Technology is RIL_RADIO_TECHNOLOGY_LTE:14 this is the value
+ that should be used instead. A value of RIL_RADIO_TECHNOLOGY_UNKNOWN:0 means
+ there is no replacement value and VoLTE is assumed to be supported -->
+ <integer name="config_volte_replacement_rat">3</integer>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc270/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc270/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc270/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc280/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc280/config.xml
new file mode 100644
index 0000000..a713a71
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc280/config.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+
+ <!-- Set to true if we need to not prefer an APN.
+ This is being added to enable a simple scenario of pre-paid
+ provisioning on some carriers, working around a bug (7305641)
+ where if the preferred is used we don't try the others. -->
+ <bool name="config_dontPreferApn">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc290/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc290/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc290/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc310/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc310/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc310/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc330/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc330/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc330/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc380/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc380/config.xml
new file mode 100644
index 0000000..5ea1edb
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc380/config.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml
new file mode 100644
index 0000000..4044a83
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+ <!-- If Voice Radio Technology is RIL_RADIO_TECHNOLOGY_LTE:14 this is the value
+ that should be used instead. A value of RIL_RADIO_TECHNOLOGY_UNKNOWN:0 means
+ there is no replacement value and VoLTE is assumed to be supported -->
+ <integer name="config_volte_replacement_rat">3</integer>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+
+ <!-- Set to true if we need to not prefer an APN.
+ This is being added to enable a simple scenario of pre-paid
+ provisioning on some carriers, working around a bug (7305641)
+ where if the preferred is used we don't try the others. -->
+ <bool name="config_dontPreferApn">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc490/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc490/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc490/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc560/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc560/config.xml
new file mode 100644
index 0000000..a713a71
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc560/config.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+
+ <!-- Set to true if we need to not prefer an APN.
+ This is being added to enable a simple scenario of pre-paid
+ provisioning on some carriers, working around a bug (7305641)
+ where if the preferred is used we don't try the others. -->
+ <bool name="config_dontPreferApn">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc580/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc580/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc580/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc660/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc660/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc660/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc680/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc680/config.xml
new file mode 100644
index 0000000..a713a71
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc680/config.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+
+ <!-- Set to true if we need to not prefer an APN.
+ This is being added to enable a simple scenario of pre-paid
+ provisioning on some carriers, working around a bug (7305641)
+ where if the preferred is used we don't try the others. -->
+ <bool name="config_dontPreferApn">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc800/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc800/config.xml
new file mode 100644
index 0000000..2b09d6c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc800/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- T-Mobile -->
+
+ <string name="mobile_provisioning_url">
+ http://www.t-mobile.com/shop/Plans/ActivatePrepaidWeb.aspx
+ </string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc980/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc980/config.xml
new file mode 100644
index 0000000..a713a71
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc980/config.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+
+ <!-- Set to true if we need to not prefer an APN.
+ This is being added to enable a simple scenario of pre-paid
+ provisioning on some carriers, working around a bug (7305641)
+ where if the preferred is used we don't try the others. -->
+ <bool name="config_dontPreferApn">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc990/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc990/config.xml
new file mode 100644
index 0000000..a713a71
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc990/config.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+
+ <!-- Set to true if we need to not prefer an APN.
+ This is being added to enable a simple scenario of pre-paid
+ provisioning on some carriers, working around a bug (7305641)
+ where if the preferred is used we don't try the others. -->
+ <bool name="config_dontPreferApn">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc180/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc180/config.xml
new file mode 100644
index 0000000..a713a71
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc180/config.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- AT&T -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ </string-array>
+
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ </string-array>
+
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ </integer-array>
+
+ <string name="mobile_provisioning_apn">lwaactivate</string>
+
+ <string name="mobile_provisioning_url">
+ https://buyasession.att.com/sbd/unauth/InitiateSBD.action?ICCID=%1$s&amp;IMEI=%2$s&amp;version=3.0
+ </string>
+
+ <!-- Set to true if we need to not prefer an APN.
+ This is being added to enable a simple scenario of pre-paid
+ provisioning on some carriers, working around a bug (7305641)
+ where if the preferred is used we don't try the others. -->
+ <bool name="config_dontPreferApn">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml
new file mode 100644
index 0000000..87994d3
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+ <!-- If Voice Radio Technology is RIL_RADIO_TECHNOLOGY_LTE:14 this is the value
+ that should be used instead. A value of RIL_RADIO_TECHNOLOGY_UNKNOWN:0 means
+ there is no replacement value and VoLTE is assumed to be supported -->
+ <integer name="config_volte_replacement_rat">6</integer>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc481/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc481/config.xml
new file mode 100644
index 0000000..028f9f5
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc481/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc482/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc482/config.xml
new file mode 100644
index 0000000..028f9f5
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc482/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc483/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc483/config.xml
new file mode 100644
index 0000000..028f9f5
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc483/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc484/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc484/config.xml
new file mode 100644
index 0000000..028f9f5
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc484/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc485/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc485/config.xml
new file mode 100644
index 0000000..028f9f5
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc485/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc486/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc486/config.xml
new file mode 100644
index 0000000..028f9f5
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc486/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc487/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc487/config.xml
new file mode 100644
index 0000000..028f9f5
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc487/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc488/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc488/config.xml
new file mode 100644
index 0000000..028f9f5
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc488/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc489/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc489/config.xml
new file mode 100644
index 0000000..028f9f5
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc489/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Verizon -->
+
+ <string name="mobile_provisioning_url">data:text/html,&lt;html&gt;&lt;body onLoad=\&quot;document.getElementById(\&apos;form\&apos;).submit()\&quot;&gt;&lt;form id=\&quot;form\&quot; target=\&quot;_self\&quot; method=\&quot;POST\&quot; action=\&quot;https://quickaccess.verizonwireless.com/bbportal/oem/start.do\&quot;&gt;&lt;input id=\&quot;mdn\&quot; name=\&quot;MDN\&quot; type=\&quot;hidden\&quot; value=\&quot;%3$s\&quot;&gt;&lt;input id=\&quot;oem\&quot; name=\&quot;oem\&quot; type=\&quot;hidden\&quot; value=\&quot;NEXT\&quot;&gt;&lt;input id=\&quot;iccid\&quot; name=\&quot;iccid\&quot; type=\&quot;hidden\&quot; value=\&quot;%1$s\&quot;&gt;&lt;input id=\&quot;imei\&quot; name=\&quot;imei\&quot; type=\&quot;hidden\&quot; value=\&quot;%2$s\&quot;&gt;&lt;input type=\&quot;submit\&quot;&gt;&lt;/form&gt;&lt;/body&gt;&lt;html&gt;</string>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..4acfb3e
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, 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>
+
+ <!-- This device is not "voice capable"; it's data-only. -->
+ <bool name="config_voice_capable">false</bool>
+
+ <!-- Flag indicating whether we should enable the automatic brightness in Settings.
+ config_hardware_automatic_brightness_available is not set, so we will use software implementation -->
+ <bool name="config_automatic_brightness_available">false</bool>
+
+ <!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
+ The N entries of this array define N + 1 control points as follows:
+ (1-based arrays)
+
+ Point 1: (0, value[1]): lux <= 0
+ Point 2: (level[1], value[2]): 0 < lux <= level[1]
+ Point 3: (level[2], value[3]): level[2] < lux <= level[3]
+ ...
+ Point N+1: (level[N], value[N+1]): level[N] < lux
+
+ The control points must be strictly increasing. Each control point
+ corresponds to an entry in the brightness backlight values arrays.
+ For example, if LUX == level[1] (first element of the levels array)
+ then the brightness will be determined by value[2] (second element
+ of the brightness values array).
+
+ Spline interpolation is used to determine the auto-brightness
+ backlight values for LUX levels between these control points.
+
+ Must be overridden in platform specific overlays -->
+ <integer-array name="config_autoBrightnessLevels">
+ <item>11</item>
+ <item>41</item>
+ <item>91</item>
+ <item>161</item>
+ <item>226</item>
+ <item>321</item>
+ <item>641</item>
+ <item>1281</item>
+ <item>2601</item>
+ </integer-array>
+
+ <!-- Array of output values for LCD backlight corresponding to the LUX values
+ in the config_autoBrightnessLevels array. This array should have size one greater
+ than the size of the config_autoBrightnessLevels array.
+ The brightness values must be between 0 and 255 and be non-decreasing.
+ This must be overridden in platform specific overlays -->
+ <integer-array name="config_autoBrightnessLcdBacklightValues">
+ <item>10</item>
+ <item>48</item>
+ <item>48</item>
+ <item>77</item>
+ <item>106</item>
+ <item>133</item>
+ <item>164</item>
+ <item>194</item>
+ <item>225</item>
+ <item>255</item>
+ </integer-array>
+
+ <!-- Array of output values for button backlight corresponding to the LUX values
+ in the config_autoBrightnessLevels array. This array should have size one greater
+ than the size of the config_autoBrightnessLevels array.
+ The brightness values must be between 0 and 255 and be non-decreasing.
+ This must be overridden in platform specific overlays -->
+ <integer-array name="config_autoBrightnessButtonBacklightValues">
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ </integer-array>
+
+ <!-- Array of output values for keyboard backlight corresponding to the LUX values
+ in the config_autoBrightnessLevels array. This array should have size one greater
+ than the size of the config_autoBrightnessLevels array.
+ The brightness values must be between 0 and 255 and be non-decreasing.
+ This must be overridden in platform specific overlays -->
+ <integer-array name="config_autoBrightnessKeyboardBacklightValues">
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ <item>0</item>
+ </integer-array>
+
+ <!-- Screen brightness used to dim the screen when the user activity
+ timeout expires. May be less than the minimum allowed brightness setting
+ that can be set by the user. -->
+ <integer name="config_screenBrightnessDim">2</integer>
+
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
+ USB interfaces. If the device doesn't want to support tething over USB this should
+ be empty. An example would be "usb.*" -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ <item>"usb\\d"</item>
+ <item>"rndis\\d"</item>
+ </string-array>
+
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
+ Wifi interfaces. If the device doesn't want to support tethering over Wifi this
+ should be empty. An example would be "softap.*" -->
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ <item>"wlan0"</item>
+ <item>"softap.*"</item>
+ </string-array>
+
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
+ bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
+ should be empty. -->
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ <item>"bt-pan"</item>
+ </string-array>
+
+ <!-- Array of allowable ConnectivityManager network types for tethering -->
+ <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
+ [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ <item>0</item>
+ <item>1</item>
+ <item>5</item>
+ <item>7</item>
+ <item>9</item>
+ </integer-array>
+
+ <!-- If this is true, the screen will come on when you unplug usb/power/whatever. -->
+ <bool name="config_unplugTurnsOnScreen">true</bool>
+
+ <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
+ autodetected from the Configuration. -->
+ <bool name="config_showNavigationBar">true</bool>
+
+ <!-- Maximum number of supported users -->
+ <integer name="config_multiuserMaximumUsers">8</integer>
+ <!-- Whether UI for multi user should be shown -->
+ <bool name="config_enableMultiUserUI">true</bool>
+
+ <!-- This device allows sms service. -->
+ <bool name="config_sms_capable">false</bool>
+
+ <bool name="config_ui_enableFadingMarquee">true</bool>
+
+ <!-- XXXXX NOTE THE FOLLOWING RESOURCES USE THE WRONG NAMING CONVENTION.
+ Please don't copy them, copy anything else. -->
+
+ <!-- This string array should be overridden by the device to present a list of network
+ attributes. This is used by the connectivity manager to decide which networks can coexist
+ based on the hardware -->
+ <!-- An Array of "[Connection name],[ConnectivityManager connection type],
+ [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
+ <!-- the 5th element "resore-time" indicates the number of milliseconds to delay
+ before automatically restore the default connection. Set -1 if the connection
+ does not require auto-restore. -->
+ <!-- the 6th element indicates boot-time dependency-met value. -->
+ <string-array translatable="false" name="networkAttributes">
+ <item>"wifi,1,1,2,-1,true"</item>
+ <item>"mobile,0,0,0,-1,true"</item>
+ <item>"mobile_mms,2,0,2,60000,true"</item>
+ <item>"mobile_supl,3,0,2,60000,true"</item>
+ <item>"mobile_dun,4,0,2,60000,true"</item>
+ <item>"mobile_hipri,5,0,3,60000,true"</item>
+ <item>"mobile_fota,10,0,2,60000,true"</item>
+ <item>"mobile_ims,11,0,2,60000,true"</item>
+ <item>"mobile_cbs,12,0,2,60000,true"</item>
+ <item>"bluetooth,7,7,0,-1,true"</item>
+ <item>"ethernet,9,9,9,-1,true"</item>
+ </string-array>
+
+ <!-- This string array should be overridden by the device to present a list of radio
+ attributes. This is used by the connectivity manager to decide which networks can coexist
+ based on the hardware -->
+ <!-- An Array of "[ConnectivityManager connectionType],
+ [# simultaneous connection types]" -->
+ <string-array translatable="false" name="radioAttributes">
+ <item>"0,1"</item>
+ <item>"1,1"</item>
+ <item>"7,1"</item>
+ <item>"9,1"</item>
+ </string-array>
+
+ <!-- Boolean indicating whether the wifi chipset has dual frequency band support -->
+ <bool translatable="false" name="config_wifi_dual_band_support">false</bool>
+
+ <!-- Boolean indicating whether the wifi chipset has background scan support -->
+ <bool translatable="false" name="config_wifi_background_scan_support">true</bool>
+
+ <!-- Indicate whether closing the lid causes the device to go to sleep
+ and opening it causes the device to wake up. The default is false. -->
+ <bool name="config_lidControlsSleep">false</bool>
+
+ <!-- Is the device capable of hot swapping an UICC Card -->
+ <bool name="config_hotswapCapable">false</bool>
+
+ <string-array name="config_locationProviderPackageNames" translatable="false">
+ <!-- The standard AOSP fused location provider -->
+ <item>com.google.android.gms</item>
+ <item>com.android.location.fused</item>
+ </string-array>
+
+ <!-- Flag indicating which package name can access the persistent data partition -->
+ <string name="config_persistentDataPackageName" translatable="false">Google Play Services</string>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values/strings.xml b/overlay/frameworks/base/core/res/res/values/strings.xml
new file mode 100755
index 0000000..c2ccb8e
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="ext_media_checking_notification_title" >Preparing storage</string>
+ <string name="ext_media_unmountable_notification_title" >Damaged Storage</string>
+ <string name="ext_media_unmountable_notification_message" >Storage damaged. You may have to reformat it.</string>
+ <string name="ext_media_badremoval_notification_title" >Storage unexpectedly removed</string>
+ <string name="ext_media_badremoval_notification_message" >Unmount storage before removing to avoid data loss.</string>
+ <string name="ext_media_nomedia_notification_title" >Removed storage</string>
+ <string name="ext_media_nomedia_notification_message" >Storage removed. Insert a new one.</string>
+ <string name="progress_erasing" >Erasing storage...</string>
+
+ <add-resource type="string" name="flashmedia_format_title" />
+ <string name="flashmedia_format_title">Format NAND flash</string>
+ <add-resource type="string" name="flashmedia_format_message"/>
+ <string name="flashmedia_format_message">Are you sure you want to format the NAND flash? All data on your card will be lost.</string>
+
+ <add-resource type="string" name="storage_nand_flash" />
+ <string name="storage_nand_flash" >NAND FLASH</string>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
new file mode 100644
index 0000000..f6c3e01
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** 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.
+*/
+-->
+
+<device name="Android">
+ <item name="none">0</item>
+ <item name="screen.on">121</item>
+ <item name="screen.full">521</item>
+
+ <item name="bluetooth.active">35.4</item> <!-- In call -->
+ <item name="bluetooth.on">1.8</item>
+ <!-- CPU wakelock held for 830ms on bluetooth headset at command. 43mA * 830 -->
+ <item name="bluetooth.at">35.4</item>
+ <item name="wifi.on">1.14</item>
+ <item name="wifi.active">74</item>
+ <item name="wifi.scan">54</item>
+ <item name="dsp.audio">10.8</item>
+ <item name="dsp.video">39.6</item>
+ <item name="radio.active">191.16</item>
+ <item name="gps.on">50.4</item>
+ <item name="battery.capacity">6700</item>
+ <item name="radio.scanning">82.8</item>
+ <array name="radio.on"> <!-- Strength 0 to BINS-1 -->
+ <value>2.88</value>
+ <value>2.88</value>
+ </array>
+ <array name="cpu.speeds">
+ <value>204000</value>
+ <value>229500</value>
+ <value>255000</value>
+ <value>280500</value>
+ <value>306000</value>
+ <value>331500</value>
+ <value>357000</value>
+ <value>382500</value>
+ <value>408000</value>
+ <value>433500</value>
+ <value>459000</value>
+ <value>484500</value>
+ <value>510000</value>
+ <value>535500</value>
+ <value>561000</value>
+ <value>586500</value>
+ <value>612000</value>
+ <value>637500</value>
+ <value>663000</value>
+ <value>688500</value>
+ <value>714000</value>
+ <value>739500</value>
+ <value>765000</value>
+ <value>790500</value>
+ <value>816000</value>
+ <value>841500</value>
+ <value>867000</value>
+ <value>892500</value>
+ <value>918000</value>
+ <value>943500</value>
+ <value>969000</value>
+ <value>994500</value>
+ <value>1020000</value>
+ <value>1122000</value>
+ <value>1224000</value>
+ <value>1326000</value>
+ <value>1428000</value>
+ <value>1530000</value>
+ <value>1632000</value>
+ <value>1734000</value>
+ <value>1836000</value>
+ <value>1938000</value>
+ <value>2014500</value>
+ <value>2091000</value>
+ <value>2193000</value>
+ <value>2295000</value>
+ <value>2397000</value>
+ <value>2499000</value>
+ </array>
+ <!-- CPU Power consumption in suspend -->
+ <item name="cpu.idle">6.95</item>
+ <!-- CPU Power consumption at different speeds -->
+ <array name="cpu.active">
+ <value>92.06</value>
+ <value>103.56</value>
+ <value>115.07</value>
+ <value>126.58</value>
+ <value>138.08</value>
+ <value>149.59</value>
+ <value>161.10</value>
+ <value>172.60</value>
+ <value>184.11</value>
+ <value>195.62</value>
+ <value>207.12</value>
+ <value>218.63</value>
+ <value>230.14</value>
+ <value>241.64</value>
+ <value>253.15</value>
+ <value>264.66</value>
+ <value>276.17</value>
+ <value>287.67</value>
+ <value>299.18</value>
+ <value>310.69</value>
+ <value>322.19</value>
+ <value>333.70</value>
+ <value>345.21</value>
+ <value>356.71</value>
+ <value>377.36</value>
+ <value>389.15</value>
+ <value>400.95</value>
+ <value>412.74</value>
+ <value>441.64</value>
+ <value>453.91</value>
+ <value>466.18</value>
+ <value>478.44</value>
+ <value>511.52</value>
+ <value>587.62</value>
+ <value>670.62</value>
+ <value>761.25</value>
+ <value>860.27</value>
+ <value>968.51</value>
+ <value>1086.83</value>
+ <value>1215.57</value>
+ <value>1356.86</value>
+ <value>1511.20</value>
+ <value>1570.85</value>
+ <value>1769.65</value>
+ <value>1961.67</value>
+ <value>2170.95</value>
+ <value>2398.88</value>
+ <value>2646.91</value>
+ </array>
+ <array name="wifi.batchedscan"> <!-- mA -->
+ <value>0.0002</value> <!-- 1-8/hr -->
+ <value>0.002</value> <!-- 9-64/hr -->
+ <value>0.02</value> <!-- 65-512/hr -->
+ <value>0.2</value> <!-- 513-4,096/hr -->
+ <value>2</value> <!-- 4097-/hr -->
+ </array>
+</device>
diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
new file mode 100644
index 0000000..272ef5a
--- /dev/null
+++ b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Should "4G" be shown instead of "LTE" when the network is NETWORK_TYPE_LTE? -->
+ <bool name="config_show4GForLTE">false</bool>
+</resources>
+
diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml
new file mode 100644
index 0000000..029b26a
--- /dev/null
+++ b/overlay/packages/apps/Bluetooth/res/values/config.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009-2012 Broadcom Corporation
+ 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>
+ <bool name="profile_supported_a2dp">true</bool>
+ <bool name="profile_supported_a2dp_sink">false</bool>
+ <bool name="profile_supported_hdp">false</bool>
+ <bool name="profile_supported_hs_hfp">false</bool>
+ <bool name="profile_supported_hfpclient">false</bool>
+ <bool name="profile_supported_hid">true</bool>
+ <bool name="profile_supported_opp">true</bool>
+ <bool name="profile_supported_pan">true</bool>
+ <bool name="profile_supported_pbap">false</bool>
+ <bool name="profile_supported_gatt">true</bool>
+ <bool name="pbap_include_photos_in_vcard">false</bool>
+ <bool name="pbap_use_profile_for_owner_vcard">false</bool>
+ <bool name="profile_supported_map">false</bool>
+ <bool name="profile_supported_avrcp_controller">false</bool>
+ <bool name="profile_supported_sap">false</bool>
+ <bool name="profile_supported_pbapclient">false</bool>
+</resources>
diff --git a/overlay/packages/apps/Settings/res/values/bools.xml b/overlay/packages/apps/Settings/res/values/bools.xml
new file mode 100755
index 0000000..5bbffca
--- /dev/null
+++ b/overlay/packages/apps/Settings/res/values/bools.xml
@@ -0,0 +1,20 @@
+<?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>
+ <!-- Whether to show a preference item for regulatory information in About phone -->
+ <bool name="config_show_regulatory_info">true</bool>
+</resources>
diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml
new file mode 100644
index 0000000..7020e50
--- /dev/null
+++ b/overlay/packages/services/Telephony/res/values/config.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+
+<!-- Phone app resources that may need to be customized
+ for different hardware or product builds. -->
+<resources>
+ <!-- Show enabled lte option for lte device -->
+ <bool name="config_enabled_lte" translatable="false">true</bool>
+</resources>
diff --git a/overlay_screenoff/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay_screenoff/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
new file mode 100644
index 0000000..77499e6
--- /dev/null
+++ b/overlay_screenoff/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, 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>
+ <integer name="def_screen_off_timeout">0x7fffffff</integer>
+ <!-- Initial value for the Settings.Secure.IMMERSIVE_MODE_CONFIRMATIONS setting,
+ which is a comma separated list of packages that no longer need confirmation
+ for immersive mode.
+ Override to disable immersive mode confirmation for certain packages. -->
+ <string name="def_immersive_mode_confirmations" translatable="false">confirmed</string>
+</resources>
diff --git a/parameter/readme b/parameter/readme
new file mode 100755
index 0000000..bfc7d14
--- /dev/null
+++ b/parameter/readme
@@ -0,0 +1,14 @@
+一、目前谷歌标准ota包方式升级能支持parameter更新,但有一些限制:
+
+1. 更新parameter只能使用ota完整包升级,不支持差异升级parameter。
+2. 根据RK29 Parameter File Format Ver1.1.pdf 描述,backup区不能改大,只能改小。如果想改大backup区,必须擦除idb,所以本机升级不能去改大backup区。
+3. backup区以及之前的分区大小和位置不能改变。之后的分区能随意改变和增加分区。
+4. user区可能被改变,所以不支持升级包放在内部falsh的升级,只能放在外部sd卡升级。或者能保证其所在分区位置大小不变。
+5. recovery区的地址不能改变,否则重启后就找不到recovery了;
+
+二、parameter升级操作步骤
+
+1. 拷贝最新的parameter文件到device/rockchip/rk29sdk/parameter/目录下,以parameter名称开头即可,如parameter_sdk。该目录下只能存在一个parameter文件。
+2. make otapackage 编译ota完整包
+3. 拷贝到sd卡或flash根目录下重命名update.zip系统能自动检测到该升级包,能自动完成升级。升级过程中先烧写新的parameter,然后会重启一次,接着继续更新其他部分。
+
diff --git a/performance_info.xml b/performance_info.xml
new file mode 100755
index 0000000..9e4f07d
--- /dev/null
+++ b/performance_info.xml
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<performance-package>
+<app package="com.antutu.ABenchMark" mode="1"/>
+</performance-package>
diff --git a/prebuild.mk b/prebuild.mk
new file mode 100644
index 0000000..98e2d1d
--- /dev/null
+++ b/prebuild.mk
@@ -0,0 +1,5 @@
+#GENERATE MANIFEST
+$(shell test -d .repo && .repo/repo/repo manifest -r -o manifest.xml)
+
+-include $(TARGET_DEVICE_DIR)/prebuild.mk
+
diff --git a/preinstall.mk b/preinstall.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/preinstall.mk
diff --git a/preinstall_cleanup.sh b/preinstall_cleanup.sh
new file mode 100755
index 0000000..ed5c57a
--- /dev/null
+++ b/preinstall_cleanup.sh
@@ -0,0 +1,5 @@
+#!/system/bin/sh
+log -t PackageManager "Start to clean up /system/preinstall_del/"
+mount -o rw,remount -t ext4 /system
+rm system/preinstall_del/*.*
+mount -o ro,remount -t ext4 /system
diff --git a/prescan_packages.xml b/prescan_packages.xml
new file mode 100644
index 0000000..a78181c
--- /dev/null
+++ b/prescan_packages.xml
@@ -0,0 +1,23 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<prescan_packages>
+ <!--<package type="0" path="/system/priv-app/Settings/Settings.apk"/>
+ <package type="0" path="system/app/Provision/Provision.apk"/>
+ <package type="0" path="/system/app/Launcher3/Launcher3.apk"/>
+ <package type="0" path="/system/priv-app/SettingsProvider/SettingsProvider.apk"/>
+ <package type="0" path="/system/priv-app/MediaProvider/MediaProvider.apk"/>
+ <package type="1" path="/system/app/LatinIME/LatinIME.apk"/>
+ <package type="0" path="system/priv-app/FusedLocation/FusedLocation.apk"/>
+ <package type="0" path="/system/priv-app/DownloadProvider/DownloadProvider.apk"/>
+ <package type="0" path="/system/app/GoogleServicesFramework/GoogleServicesFramework.apk"/>
+ <package type="0" path="/system/app/PackageInstaller/PackageInstaller.apk"/>-->
+ <package type="0" path="/system/app/Launcher3"/>
+ <package type="0" path="/system/priv-app/Settings"/>
+ <package type="0" path="/system/priv-app/SystemUI"/>
+ <package type="0" path="/system/priv-app/SettingsProvider"/>
+ <package type="0" path="/system/priv-app/MediaProvider"/>
+ <package type="0" path="/system/priv-app/FusedLocation"/>
+ <!--<package type="1" path="/system/app/LatinIME"/>-->
+ <package type="0" path="/system/priv-app/GoogleServicesFramework"/>
+ <package type="0" path="/system/priv-app/GmsCore"/>
+ <package type="1" path="/system/app/LatinImeGoogle"/>
+</prescan_packages>
diff --git a/radical_update/certs/radical_update.x509.pem b/radical_update/certs/radical_update.x509.pem
new file mode 100644
index 0000000..0762d17
--- /dev/null
+++ b/radical_update/certs/radical_update.x509.pem
@@ -0,0 +1,27 @@
+-----BEGIN CERTIFICATE-----
+MIIEqDCCA5CgAwIBAgIJAOdLmDzkk3kxMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD
+VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g
+VmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UE
+AxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe
+Fw0xNDA2MTcwOTU2MjVaFw00MTExMDIwOTU2MjVaMIGUMQswCQYDVQQGEwJVUzET
+MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4G
+A1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9p
+ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZI
+hvcNAQEBBQADggENADCCAQgCggEBANEK5Rl710Y5qyH7CcTJZeTIYCWhG2kOWb/1
+OfsRlQfP62PDqRyI7pPOq8mqLDXCJowx2ZrL+Xu11f0ecBORBwGlstYqA2nfKqJJ
+G0KbTsc3oh6ehLpx7iiiiz6cNfGEl3GrMzELIN4+WBtO1Lm235zT9AbKPbYVhLV1
+RKxChypC3IZ39lgT2j5KpiqEbGvsp2GwOmKP2BZUQCHSSEHp6qOo98U3RVapk4RA
+u4IO8AeDqr1IrRPo70jcOr06wKyF9GlWw40iQ5z58A80EtkbxtG9JtQXCmdccD3H
+YsAGSaGkQZkVHa3ZXqorWhJtM59qpzDLD+RC7Z21f7cp5p0btEsCAQOjgfwwgfkw
+HQYDVR0OBBYEFHkfd/8aDU0b565n2q6X5RTeGORPMIHJBgNVHSMEgcEwgb6AFHkf
+d/8aDU0b565n2q6X5RTeGORPoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UE
+CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMH
+QW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAG
+CSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJAOdLmDzkk3kxMAwGA1Ud
+EwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAIlhVsNet+IudR7BRfSAKmgB5FSP
+FQuLNTAbuuEJYBChb065nDIvEltNjT9wv4hcA74t00VffMcHUSWGsFKcy5xFYxE5
+K2RkFYk+HYlPE1evnAYqcNe/h0HxB7ZA1QvAwcM2nFs1ScQ+XYIgUaFDPO3n1PpP
+0sXNJbeQMW7USnYrnidGRN7e4EhJ5RQ9T4kbuUolVun0ark4q2TbzNPluc5k2vhW
+5CQBihidpDoHNCDoeiiAYAbWPDtBM1i4Z7Inn55q5IHghu61MAkOukiw/DIgdvOC
+FL/yn5QjM2MlawY2MlcwwxK5/A/k3LVfHZwJbY/zvoiM0XnK5uNnctMMkZQ=
+-----END CERTIFICATE-----
diff --git a/recovery.emmc.fstab b/recovery.emmc.fstab
new file mode 100644
index 0000000..ffbdfea
--- /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/ff0f0000.rksdmmc/by-name/user /mnt/internal_sd vfat defaults defaults
+/dev/block/mmcblk1p1 /mnt/external_sd vfat /dev/block/mmcblk1 defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/system /system ext4 defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/cache /cache ext4 defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/metadata /metadata ext4 defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/userdata /data ext4 defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/cust /cust ext4 defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/custom /custom ext4 defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/radical_update /radical_update ext4 defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/misc /misc emmc defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/uboot /uboot emmc defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/charge /charge emmc defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/resource /resource emmc defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/parameter /parameter emmc defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/boot /boot emmc defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/recovery /recovery emmc defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/backup /backup emmc defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/trust /trust emmc defaults defaults
+/dev/block/platform/ff0f0000.rksdmmc/by-name/baseparamer /baseparamer emmc defaults defaults
diff --git a/recovery.fstab b/recovery.fstab
new file mode 100644
index 0000000..7521566
--- /dev/null
+++ b/recovery.fstab
@@ -0,0 +1,21 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+/dev/block/rknand_user /mnt/internal_sd vfat defaults defaults
+/dev/block/mmcblk0p1 /mnt/external_sd vfat /dev/block/mmcblk0 defaults
+/dev/block/rknand_system /system ext4 defaults defaults
+/dev/block/rknand_cache /cache ext4 defaults defaults
+/dev/block/rknand_metadata /metadata ext4 defaults defaults
+/dev/block/rknand_userdata /data ext4 defaults defaults
+/dev/block/rknand_cust /cust ext4 defaults defaults
+/dev/block/rknand_custom /custom ext4 defaults defaults
+/dev/block/rknand_radical_update /radical_update ext4 defaults defaults
+misc /misc mtd defaults defaults
+uboot /uboot mtd defaults defaults
+charge /charge mtd defaults defaults
+resource /resource mtd defaults defaults
+parameter /parameter mtd defaults defaults
+boot /boot mtd defaults defaults
+recovery /recovery mtd defaults defaults
+backup /backup mtd defaults defaults
+trust /trust mtd defaults defaults
+baseparamer /baseparamer mtd defaults defaults
diff --git a/recovery.nvme.fstab b/recovery.nvme.fstab
new file mode 100755
index 0000000..f56d1d6
--- /dev/null
+++ b/recovery.nvme.fstab
@@ -0,0 +1,21 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+/dev/block/platform/f8000000.pcie/by-name/user /mnt/internal_sd vfat defaults defaults
+/dev/block/mmcblk1p1 /mnt/external_sd vfat /dev/block/mmcblk1 defaults
+/dev/block/platform/f8000000.pcie/by-name/system /system ext4 defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/cache /cache ext4 defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/metadata /metadata ext4 defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/userdata /data f2fs defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/cust /cust ext4 defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/custom /custom ext4 defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/misc /misc emmc defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/uboot /uboot emmc defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/charge /charge emmc defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/resource /resource emmc defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/parameter /parameter emmc defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/boot /boot emmc defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/recovery /recovery emmc defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/backup /backup emmc defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/trust /trust emmc defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/baseparamer /baseparamer emmc defaults defaults
+/dev/block/platform/f8000000.pcie/by-name/frp /frp emmc defaults defaults
diff --git a/recovery/Android.mk b/recovery/Android.mk
new file mode 100644
index 0000000..4ae676e
--- /dev/null
+++ b/recovery/Android.mk
@@ -0,0 +1,13 @@
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := eng
+LOCAL_C_INCLUDES += bootable/recovery
+LOCAL_SRC_FILES := recovery_ui.cpp
+
+# should match TARGET_RECOVERY_UI_LIB set in BoardConfig.mk
+LOCAL_MODULE := librecovery_ui_$(TARGET_PRODUCT)
+
+include $(BUILD_STATIC_LIBRARY)
+
diff --git a/recovery/etc/init.bootmode.emmc.rc b/recovery/etc/init.bootmode.emmc.rc
new file mode 100644
index 0000000..2ff640e
--- /dev/null
+++ b/recovery/etc/init.bootmode.emmc.rc
@@ -0,0 +1,5 @@
+on fs
+ write /sys/block/mmcblk0/bdi/read_ahead_kb 2048
+ mount ext4 /dev/block/platform/emmc/by-name/cache /cache wait noatime nodiratime nosuid nodev noauto_da_alloc discard
+
+ insmod /drmboot.ko
diff --git a/recovery/etc/init.bootmode.unknown.rc b/recovery/etc/init.bootmode.unknown.rc
new file mode 100644
index 0000000..24003b9
--- /dev/null
+++ b/recovery/etc/init.bootmode.unknown.rc
@@ -0,0 +1,4 @@
+on fs
+ insmod /rk30xxnand_ko.ko
+ mount ext4 mtd@cache /cache wait noatime nodiratime nosuid nodev noauto_da_alloc discard
+ insmod /rk29-ipp.ko
diff --git a/recovery/etc/init.rc b/recovery/etc/init.rc
new file mode 100644
index 0000000..2ed0ea6
--- /dev/null
+++ b/recovery/etc/init.rc
@@ -0,0 +1,126 @@
+import /init.bootmode.${ro.bootmode}.rc
+import /init.recovery.${ro.hardware}.rc
+
+on early-init
+ # Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
+ #write /sys/fs/selinux/checkreqprot 0
+
+ # Set the security context for the init process.
+ # This should occur before anything else (e.g. ueventd) is started.
+ setcon u:r:init:s0
+
+ start ueventd
+ #start healthd
+
+on init
+ export PATH /sbin:/system/bin
+ export LD_LIBRARY_PATH /lib
+ export ANDROID_ROOT /system
+ export ANDROID_DATA /data
+ export EXTERNAL_STORAGE /sdcard
+
+ symlink /system/etc /etc
+# symlink /sbin/busybox /system/bin/sh
+
+ mkdir /mnt
+ mkdir /mnt/internal_sd
+ mkdir /mnt/external_sd
+ mkdir /mnt/usb_storage
+ mkdir /system
+ mkdir /metadata
+ mkdir /radical_update
+ mkdir /data
+ mkdir /cache
+ mkdir /sideload
+ mount tmpfs tmpfs /tmp
+
+ chown root shell /tmp
+ chmod 0775 /tmp
+
+ write /proc/sys/kernel/panic_on_oops 1
+
+on fs
+ mkdir /dev/usb-ffs 0770 shell shell
+ mkdir /dev/usb-ffs/adb 0770 shell shell
+ mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
+ write /sys/class/android_usb/android0/f_ffs/aliases adb
+
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0006
+ write /sys/class/android_usb/android0/functions adb
+ write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
+ write /sys/class/android_usb/android0/iProduct ${ro.product.model}
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+
+on boot
+ setprop UserVolumeLabel "RockChip"
+ setprop InternalSD_ROOT "/mnt/internal_sd"
+ setprop ExternalSD_ROOT "/mnt/external_sd"
+ ifup lo
+ hostname localhost
+ domainname localdomain
+
+ class_start default
+
+# Load properties from /system/ + /factory after fs mount.
+on load_all_props_action
+ load_all_props
+
+# Mount filesystems and start core system services.
+on late-init
+ trigger early-fs
+ trigger fs
+ trigger post-fs
+ trigger post-fs-data
+
+ # Load properties from /system/ + /factory after fs mount. Place
+ # this in another action so that the load will be scheduled after the prior
+ # issued fs triggers have completed.
+ trigger load_all_props_action
+
+ trigger early-boot
+ trigger boot
+
+on property:sys.powerctl=*
+ powerctl ${sys.powerctl}
+
+service ueventd /sbin/ueventd
+ critical
+ seclabel u:r:ueventd:s0
+
+service healthd /sbin/healthd -r
+ critical
+ seclabel u:r:healthd:s0
+
+service recovery /sbin/recovery
+ console
+ seclabel u:r:recovery:s0
+
+service console /sbin/sh
+ console
+ disabled
+
+service adbd /sbin/adbd --root_seclabel=u:r:su:s0 --device_banner=recovery
+ disabled
+ socket adbd stream 660 system system
+ seclabel u:r:adbd:s0
+
+# Always start adbd on userdebug and eng builds
+on property:ro.debuggable=1
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 2207
+ write /sys/class/android_usb/android0/idProduct 0006
+ write /sys/class/android_usb/android0/functions adb
+ write /sys/class/android_usb/android0/enable 1
+ write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer
+ write /sys/class/android_usb/android0/iProduct $ro.product.model
+ write /sys/class/android_usb/android0/iSerial $ro.serialno
+ start console
+ start adbd
+
+# Restart adbd so it can run as root
+on property:service.adb.root=1
+ write /sys/class/android_usb/android0/enable 0
+ restart adbd
+ write /sys/class/android_usb/android0/enable 1
diff --git a/recovery/recovery_ui.cpp b/recovery/recovery_ui.cpp
new file mode 100755
index 0000000..570e78e
--- /dev/null
+++ b/recovery/recovery_ui.cpp
@@ -0,0 +1,118 @@
+/*
+ * 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.
+ */
+
+#include <linux/input.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <string.h>
+
+#include "common.h"
+#include "device.h"
+#include "screen_ui.h"
+
+const char* HEADERS[] = { "Volume up/down to move highlight;",
+ "power button to select.",
+ "",
+ NULL };
+
+const char* ITEMS[] ={ "reboot system now",
+ "apply update from ADB",
+ "apply update from external storage",
+ "update rkimage from external storage",
+ "apply update from cache",
+ "wipe data/factory reset",
+ "wipe cache partition",
+ "recovery system from backup",
+ NULL };
+
+class RkUI : public ScreenRecoveryUI {
+ public:
+ RkUI() :
+ consecutive_power_keys(0) {
+ }
+
+ virtual KeyAction CheckKey(int key) {
+ if (IsKeyPressed(KEY_POWER) && key == KEY_VOLUMEUP) {
+ return TOGGLE;
+ }
+ if (key == KEY_POWER) {
+ ++consecutive_power_keys;
+ if (consecutive_power_keys >= 7) {
+ return REBOOT;
+ }
+ } else {
+ consecutive_power_keys = 0;
+ }
+ return ENQUEUE;
+ }
+
+ private:
+ int consecutive_power_keys;
+};
+
+
+class RkDevice : public Device {
+ public:
+ RkDevice() :
+ ui(new RkUI) {
+ }
+
+ RecoveryUI* GetUI() { return ui; }
+
+ int HandleMenuKey(int key_code, int visible) {
+ if (visible) {
+ switch (key_code) {
+ case KEY_DOWN:
+ case KEY_VOLUMEDOWN:
+ return kHighlightDown;
+
+ case KEY_UP:
+ case KEY_VOLUMEUP:
+ return kHighlightUp;
+
+ case KEY_ENTER:
+ case KEY_POWER:
+ return kInvokeItem;
+ }
+ }
+
+ return kNoAction;
+ }
+
+ BuiltinAction InvokeMenuItem(int menu_position) {
+ switch (menu_position) {
+ case 0: return REBOOT;
+ case 1: return APPLY_ADB_SIDELOAD;
+ case 2: return APPLY_EXT;
+ //case 3: return APPLY_INT_RKIMG;
+ case 4: return APPLY_CACHE;
+ case 5: return WIPE_DATA;
+ case 6: return WIPE_CACHE;
+ //case 7: return RECOVER_SYSTEM;
+ default: return NO_ACTION;
+ }
+ }
+
+ const char* const* GetMenuHeaders() { return HEADERS; }
+ const char* const* GetMenuItems() { return ITEMS; }
+
+ private:
+ RecoveryUI* ui;
+};
+
+Device* make_device() {
+ return new RkDevice;
+}
diff --git a/recovery/res/README b/recovery/res/README
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/recovery/res/README
diff --git a/recovery_contents.sh b/recovery_contents.sh
new file mode 100755
index 0000000..f2da926
--- /dev/null
+++ b/recovery_contents.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+echo "$1 $2 $3 $4 $5"
+TARGET_PRODUCT=$1
+PRODUCT_OUT=$2
+TARGET_BOARD_PLATFORM=$3
+TARGET_ROCKCHIP_PCBATEST=$4
+TARGET_ARCH=$5
+
+PCBA_PATH=external/rk-pcba-test
+
+############################################################################################
+#rk recovery contents
+############################################################################################
+mkdir -p $PRODUCT_OUT/recovery/root/system/bin/
+cp -f vendor/rockchip/common/bin/$TARGET_ARCH/sh $PRODUCT_OUT/recovery/root/system/bin/
+cp -f vendor/rockchip/common/bin/$TARGET_ARCH/busybox $PRODUCT_OUT/recovery/root/system/bin/
+
+cp -f vendor/rockchip/common/bin/$TARGET_ARCH/busybox $PRODUCT_OUT/recovery/root/sbin/
+cp -f vendor/rockchip/common/bin/$TARGET_ARCH/newfs_msdos $PRODUCT_OUT/recovery/root/sbin/
+cp -f vendor/rockchip/common/bin/$TARGET_ARCH/sh $PRODUCT_OUT/recovery/root/sbin/
+cp -f vendor/rockchip/common/bin/$TARGET_ARCH/e2fsck $PRODUCT_OUT/recovery/root/sbin/
+cp -f vendor/rockchip/common/bin/$TARGET_ARCH/resize2fs $PRODUCT_OUT/recovery/root/sbin/
+
+if [ $TARGET_ROCKCHIP_PCBATEST = "true" ];then
+cp -f $PRODUCT_OUT/obj/EXECUTABLES/codec_test_intermediates/codec_test $PRODUCT_OUT/recovery/root/sbin/
+cp -f $PRODUCT_OUT/obj/EXECUTABLES/pcba_core_intermediates/pcba_core $PRODUCT_OUT/recovery/root/sbin/
+
+cp -rf $PCBA_PATH/bin/* $PRODUCT_OUT/recovery/root/sbin/
+cp -rf $PCBA_PATH/res/* $PRODUCT_OUT/recovery/root/res/
+
+echo "rk-pcba-test/res.sh $TARGET_PRODUCT $PRODUCT_OUT $TARGET_BOARD_PLATFORM $TARGET_ARCH"
+$PCBA_PATH/res.sh $TARGET_PRODUCT $PRODUCT_OUT $TARGET_BOARD_PLATFORM $TARGET_ARCH
+fi
+
diff --git a/releasetools.py b/releasetools.py
new file mode 100755
index 0000000..f7e7fc2
--- /dev/null
+++ b/releasetools.py
@@ -0,0 +1,214 @@
+# Copyright (C) 2009 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.
+
+"""Emit commands needed for Rockchip devices during OTA installation
+(installing the RK30xxLoader.bin)."""
+
+import common
+import re
+
+
+def FullOTA_Assertions(info):
+ Install_Parameter(info)
+ AddBootloaderAssertion(info, info.input_zip)
+
+def IncrementalOTA_Assertions(info):
+ AddBootloaderAssertion(info, info.target_zip)
+
+def AddBootloaderAssertion(info, input_zip):
+ android_info = input_zip.read("OTA/android-info.txt")
+ m = re.search(r"require\s+version-bootloader\s*=\s*(\S+)", android_info)
+ if m:
+ bootloaders = m.group(1).split("|")
+ if "*" not in bootloaders:
+ info.script.AssertSomeBootloader(*bootloaders)
+ info.metadata["pre-bootloader"] = m.group(1)
+
+def Install_Parameter(info):
+ try:
+ parameter_bin = info.input_zip.read("PARAMETER/parameter");
+ except KeyError:
+ print "warning: no parameter in input target_files; not flashing parameter"
+ return
+
+ print "find parameter, should add to package"
+ common.ZipWriteStr(info.output_zip, "parameter", parameter_bin)
+ info.script.Print("start update parameter...")
+ info.script.WriteRawParameterImage("/parameter", "parameter")
+ info.script.Print("end update parameter")
+
+def InstallRKLoader(loader_bin, input_zip, info):
+ common.ZipWriteStr(info.output_zip, "RKLoader.img", loader_bin)
+ info.script.Print("Writing rk loader bin...")
+ info.script.WriteRawImage("/misc", "RKLoader.img")
+
+def InstallUboot(loader_bin, input_zip, info):
+ common.ZipWriteStr(info.output_zip, "uboot.img", loader_bin)
+ info.script.Print("Writing uboot loader img...")
+ info.script.WriteRawImage("/uboot", "uboot.img")
+
+def InstallTrust(trust_bin, input_zip, info):
+ common.ZipWriteStr(info.output_zip, "trust.img", trust_bin)
+ info.script.Print("Writing trust img...")
+ info.script.WriteRawImage("/trust", "trust.img")
+
+def InstallCharge(charge_bin, input_zip, info):
+ common.ZipWriteStr(info.output_zip, "charge.img", charge_bin)
+ info.script.Print("Writing charge img..")
+ info.script.WriteRawImage("/charge", "charge.img")
+
+def InstallResource(resource_bin, input_zip, info):
+ common.ZipWriteStr(info.output_zip, "resource.img", resource_bin)
+ info.script.Print("Writing resource image..")
+ info.script.WriteRawImage("/resource", "resource.img")
+
+def FullOTA_InstallEnd(info):
+ try:
+ trust = info.input_zip.read("trust.img")
+ print "write trust now..."
+ InstallTrust(trust, info.input_zip, info)
+ except KeyError:
+ print "warning: no trust.img in input target_files; not flashing trust"
+
+ try:
+ uboot = info.input_zip.read("uboot.img")
+ print "write uboot now..."
+ InstallUboot(uboot, info.input_zip, info)
+ except KeyError:
+ print "warning: no uboot.img in input target_files; not flashing uboot"
+
+ try:
+ charge = info.input_zip.read("charge.img")
+ print "wirte charge now..."
+ InstallCharge(charge, info.input_zip, info)
+ except KeyError:
+ # print "info: no charge img; ignore it."
+ print "no charge img; ignore it."
+
+#**************************************************************************************************
+#resource package in the boot.img and recovery.img,so we suggest not to update alone resource.img
+#**************************************************************************************************
+#
+# try:
+# resource = info.input_zip.read("resource.img")
+# print "wirte resource now..."
+# InstallResource(resource, info.input_zip, info)
+# except KeyError:
+# print "info: no resource image; ignore it."
+
+# try:
+# loader_bin = info.input_zip.read("LOADER/RKLoader.img")
+# except KeyError:
+# # print "warning: no rk loader bin in input target_files; not flashing loader"
+# print "no rk loader bin in input target_files; not flashing loader"
+# print "to add clear misc command"
+# info.script.ClearMiscCommand()
+# return
+
+# InstallRKLoader(loader_bin, info.input_zip, info)
+ try:
+ loader_bin = info.input_zip.read("RKLoader.bin")
+ print "wirte RKLoader.bin now..."
+ common.ZipWriteStr(info.output_zip, "RKLoader.bin", loader_bin)
+ except KeyError:
+ print "no RKLoader.bin, ignore it."
+
+def IncrementalOTA_InstallEnd(info):
+ try:
+ trust_target = info.target_zip.read("trust.img")
+ except KeyError:
+ trust_target = None
+
+ try:
+ trust_source = info.source_zip.read("trust.img")
+ except KeyError:
+ trust_source = None
+
+ if (trust_target != None) and (trust_target != trust_source):
+ print "write trust now..."
+ InstallTrust(trust_target, info.target_zip, info)
+ else:
+ print "trust unchanged; skipping"
+
+ try:
+ loader_uboot_target = info.target_zip.read("uboot.img")
+ except KeyError:
+ loader_uboot_target = None
+
+ try:
+ loader_uboot_source = info.source_zip.read("uboot.img")
+ except KeyError:
+ loader_uboot_source = None
+
+ if (loader_uboot_target != None) and (loader_uboot_target != loader_uboot_source):
+ print "write uboot now..."
+ InstallUboot(loader_uboot_target, info.target_zip, info)
+ else:
+ print "uboot unchanged; skipping"
+
+ try:
+ charge_target = info.target_zip.read("charge.img")
+ except KeyError:
+ charge_target = None
+
+ try:
+ charge_source = info.source_zip.read("charge.img")
+ except KeyError:
+ charge_source = None
+
+ if (charge_target != None) and (charge_target != charge_source):
+ print "write charge now..."
+ InstallCharge(charge_target, info.target_zip, info)
+ else:
+ print "charge unchanged; skipping"
+
+#**************************************************************************************************
+#resource package in the boot.img and recovery.img,so we suggest not to update alone resource.img
+#**************************************************************************************************
+# try:
+# resource_target = info.target_zip.read("resource.img")
+# except KeyError:
+# resource_target = None
+
+# try:
+# resource_source = info.source_zip.read("resource.img")
+# except KeyError:
+# resource_source = None
+
+# if (resource_target != None) and (resource_target != resource_source):
+# print "write resource now..."
+# InstallResource(resource_target, info.target_zip, info)
+# else:
+# print "resource unchanged; skipping"
+
+ try:
+ target_loader = info.target_zip.read("RKLoader.bin")
+ except KeyError:
+ print "warning: rk loader bin missing from target; not flashing loader"
+ print "clear misc command"
+ info.script.ClearMiscCommand()
+ return
+
+ try:
+ source_loader = info.source_zip.read("RKLoader.bin")
+ except KeyError:
+ source_loader = None
+
+ if source_loader == target_loader:
+ print "RK loader bin unchanged; skipping"
+ print "clear misc command"
+ info.script.ClearMiscCommand()
+ return
+
+ InstallRKLoader(target_loader, info.target_zip, info)
diff --git a/rk29-keypad.kl b/rk29-keypad.kl
new file mode 100644
index 0000000..d941e53
--- /dev/null
+++ b/rk29-keypad.kl
@@ -0,0 +1,10 @@
+key 59 MENU
+key 102 HOME
+key 114 VOLUME_DOWN
+key 115 VOLUME_UP
+key 116 POWER
+key 143 NOTIFICATION
+key 158 BACK
+key 212 CAMERA
+key 217 SEARCH
+key 113 F12
diff --git a/samba/bin/rksmbd b/samba/bin/rksmbd
new file mode 100755
index 0000000..fa9b90b
--- /dev/null
+++ b/samba/bin/rksmbd
Binary files differ
diff --git a/samba/bin/rksmbpasswd b/samba/bin/rksmbpasswd
new file mode 100755
index 0000000..db05370
--- /dev/null
+++ b/samba/bin/rksmbpasswd
Binary files differ
diff --git a/samba/bin/stopsamba.sh b/samba/bin/stopsamba.sh
new file mode 100755
index 0000000..935a5e6
--- /dev/null
+++ b/samba/bin/stopsamba.sh
@@ -0,0 +1,6 @@
+#!/system/bin/sh
+
+smb_processid=$(ps | busybox awk '$9=="/sbin/rksmbd" {print $2;exit;}')
+echo "get smb process id = ${smb_processid}"
+kill $smb_processid
+
diff --git a/samba/etc/smb.conf b/samba/etc/smb.conf
new file mode 100755
index 0000000..ee8a160
--- /dev/null
+++ b/samba/etc/smb.conf
@@ -0,0 +1,48 @@
+[global]
+ netbios name = Android
+ workgroup = WORKGROUP
+ display charset =UTF-8
+ unix charset=UTF-8
+ doc charset = cp936
+ client lanman auth = yes
+ lanman auth = yes
+ server string = Rockchip Android
+ dns proxy = no
+ interfaces = lo wlan0 rndis0
+ #bind interfaces only = yes
+
+ security = user
+ username map =/etc/smbusers
+ encrypt passwords = true
+ passdb backend = smbpasswd
+ smb passwd file = /system/etc/smbpasswd
+
+ #load printers = no
+ #printcap name = /dev/null
+ #map to guest = bad user
+ usershare allow guests = yes
+
+[INTERNAL STORAGE]
+ comment=Internal Storages
+ path=/mnt/sdcard
+ browseable=yes
+ writeable=yes
+ public = yes
+ available = yes
+
+[EXTERNAL SD]
+ comment=External SD
+ path=/mnt/external_sd
+ browseable=yes
+ writeable=yes
+ public = yes
+ available = yes
+
+[USB STORAGES]
+ comment=USB Storages
+ path=/mnt/usb_storage
+ browseable=yes
+ writeable=yes
+ public = yes
+ available = yes
+
diff --git a/samba/etc/smbpasswd b/samba/etc/smbpasswd
new file mode 100755
index 0000000..a4fc36b
--- /dev/null
+++ b/samba/etc/smbpasswd
@@ -0,0 +1 @@
+root:1000:44EFCE164AB921CAAAD3B435B51404EE:32ED87BDB5FDC5E9CBA88547376818D4:[U ]:LCT-543C9B90:
diff --git a/samba/etc/smbusers b/samba/etc/smbusers
new file mode 100755
index 0000000..f256987
--- /dev/null
+++ b/samba/etc/smbusers
@@ -0,0 +1 @@
+root = rockchip guest admin administrator
diff --git a/samba/rk31_samba.mk b/samba/rk31_samba.mk
new file mode 100755
index 0000000..fe6de2d
--- /dev/null
+++ b/samba/rk31_samba.mk
@@ -0,0 +1,8 @@
+CUR_PATH := device/rockchip/common/samba
+PRODUCT_COPY_FILES += \
+ $(CUR_PATH)/bin/rksmbd:/system/bin/rksmbd \
+ $(CUR_PATH)/bin/rksmbpasswd:/system/bin/rksmbpasswd \
+ $(CUR_PATH)/bin/stopsamba.sh:/system/bin/stopsamba.sh \
+ $(CUR_PATH)/etc/smb.conf:/system/etc/smb.conf \
+ $(CUR_PATH)/etc/smbusers:/system/etc/smbusers \
+ $(CUR_PATH)/etc/smbpasswd:/system/etc/smbpasswd
diff --git a/sepolicy/abc.te b/sepolicy/abc.te
new file mode 100755
index 0000000..d8d3233
--- /dev/null
+++ b/sepolicy/abc.te
@@ -0,0 +1,7 @@
+type abc, domain, mlstrustedsubject;
+type abc_exec, exec_type, file_type;
+
+init_daemon_domain(abc)
+
+allow abc abc:capability { sys_module sys_admin };
+allow abc adb_data_file:chr_file rw_file_perms; \ No newline at end of file
diff --git a/sepolicy/adbd.te b/sepolicy/adbd.te
new file mode 100644
index 0000000..057cf7a
--- /dev/null
+++ b/sepolicy/adbd.te
@@ -0,0 +1,4 @@
+allow adbd graphics_device:dir { search };
+allow adbd surfaceflinger:fifo_file rw_file_perms;
+allow adbd debugfs_tracing:file { rw_file_perms };
+allow adbd gpu_device:dir { search };
diff --git a/sepolicy/akmd.te b/sepolicy/akmd.te
new file mode 100644
index 0000000..1865bcb
--- /dev/null
+++ b/sepolicy/akmd.te
@@ -0,0 +1,12 @@
+type akmd, domain;
+type akmd_exec, exec_type, file_type;
+
+init_daemon_domain(akmd)
+
+allow akmd system_file:file rx_file_perms;
+allow akmd akmd_device:chr_file rw_file_perms;
+allow akmd sensor_device:chr_file { rw_file_perms setattr };
+allow akmd system_data_file:dir rw_dir_perms;
+allow akmd akmd_file:file { rw_file_perms setattr create };
+allow akmd akmd_file:dir rw_dir_perms;
+allow akmd rootfs:lnk_file getattr;
diff --git a/sepolicy/ap_log_srv.te b/sepolicy/ap_log_srv.te
new file mode 100644
index 0000000..5b08279
--- /dev/null
+++ b/sepolicy/ap_log_srv.te
@@ -0,0 +1,14 @@
+type ap_log_srv_script, domain;
+type ap_log_srv_script_exec, exec_type, file_type;
+
+userdebug_or_eng(`
+init_daemon_domain(ap_log_srv_script)
+allow ap_log_srv_script ctl_default_prop:property_service set;
+allow ap_log_srv_script init:unix_stream_socket connectto;
+allow ap_log_srv_script property_socket:sock_file write;
+allow ap_log_srv_script rootfs:lnk_file getattr;
+allow ap_log_srv_script shell_exec:file { read getattr };
+allow ap_log_srv_script toolbox_exec:file { read getattr open execute execute_no_trans };
+set_prop(ap_log_srv_script,system_prop)
+')
+
diff --git a/sepolicy/apk_logfs.te b/sepolicy/apk_logfs.te
new file mode 100644
index 0000000..a613865
--- /dev/null
+++ b/sepolicy/apk_logfs.te
@@ -0,0 +1,16 @@
+type apk_logfs, domain;
+type apk_logfs_exec, exec_type, file_type;
+userdebug_or_eng(`
+ init_daemon_domain(apk_logfs)
+ allow apk_logfs kernel:system syslog_read;
+ allow apk_logfs kmsg_device:chr_file { read open };
+ allow apk_logfs logd:unix_stream_socket connectto;
+ allow apk_logfs logdr_socket:sock_file write;
+ allow apk_logfs rootfs:lnk_file getattr;
+ allow apk_logfs self:capability dac_override;
+ allow apk_logfs shell_exec:file { read getattr };
+ allow apk_logfs aplog_data_file:dir { write add_name remove_name search };
+ allow apk_logfs aplog_data_file:file { create open getattr append rename unlink };
+ allow apk_logfs system_file:file execute_no_trans;
+ allow apk_logfs toolbox_exec:file { read getattr open execute execute_no_trans };
+')
diff --git a/sepolicy/app.te b/sepolicy/app.te
new file mode 100644
index 0000000..c1a3031
--- /dev/null
+++ b/sepolicy/app.te
@@ -0,0 +1,3 @@
+get_prop(appdomain,system_prop)
+allow appdomain app_data_file:dir getattr;
+
diff --git a/sepolicy/audioserver.te b/sepolicy/audioserver.te
new file mode 100644
index 0000000..e365f44
--- /dev/null
+++ b/sepolicy/audioserver.te
@@ -0,0 +1,3 @@
+allow audioserver debugfs_tracing:file rw_file_perms;
+allow audioserver rootfs:lnk_file getattr;
+set_prop(audioserver,media_prop)
diff --git a/sepolicy/bluetooth.te b/sepolicy/bluetooth.te
new file mode 100644
index 0000000..f4a1431
--- /dev/null
+++ b/sepolicy/bluetooth.te
@@ -0,0 +1,9 @@
+# /sys/class/rfkill/rfkill0/state
+allow bluetooth sysfs:file write;
+allow bluetooth serial_device:chr_file rw_file_perms;
+allow bluetooth vflash_device:chr_file rw_file_perms;
+allow bluetooth rtkbt_device:chr_file rw_file_perms;
+allow bluetooth surfaceflinger:fifo_file rw_file_perms;
+allow bluetooth storage_device:chr_file rw_file_perms;
+allow bluetooth gpu_device:dir search;
+allow bluetooth gpu_device:chr_file { rw_file_perms ioctl };
diff --git a/sepolicy/bootanim.te b/sepolicy/bootanim.te
new file mode 100644
index 0000000..7c3d09c
--- /dev/null
+++ b/sepolicy/bootanim.te
@@ -0,0 +1,8 @@
+allow bootanim surfaceflinger:fifo_file rw_file_perms;
+allow bootanim property_socket:sock_file { write };
+allow bootanim init:unix_stream_socket { connectto };
+allow bootanim system_prop:property_service { set };
+allow bootanim debugfs_tracing:file rw_file_perms;
+allow bootanim gpu_device:dir { search };
+allow bootanim rootfs:lnk_file getattr;
+allow bootanim drm_prop:file { read open getattr };
diff --git a/sepolicy/bootstat.te b/sepolicy/bootstat.te
new file mode 100644
index 0000000..415fd76
--- /dev/null
+++ b/sepolicy/bootstat.te
@@ -0,0 +1 @@
+allow bootstat rootfs:lnk_file getattr;
diff --git a/sepolicy/cameraserver.te b/sepolicy/cameraserver.te
new file mode 100644
index 0000000..c9b4d75
--- /dev/null
+++ b/sepolicy/cameraserver.te
@@ -0,0 +1,17 @@
+allow cameraserver debugfs_tracing:file rw_file_perms;
+allow cameraserver camdata_file:file { rw_file_perms unlink setattr create };
+allow cameraserver camdata_file:dir { search write add_name remove_name };
+allow cameraserver camera_device:chr_file { rw_file_perms ioctl };
+allow cameraserver gpu_device:chr_file { rw_file_perms ioctl };
+allow cameraserver gpu_device:dir search;
+allow cameraserver platform_app:dir search;
+allow cameraserver platform_app:file { read open };
+allow cameraserver sensorservice_service:service_manager find;
+allow cameraserver system_file:dir { read open };
+allow cameraserver system_server:unix_stream_socket { read write };
+allow cameraserver rga_device:chr_file { read write open ioctl };
+allow cameraserver rootfs:lnk_file getattr;
+set_prop(cameraserver,graphic_prop)
+set_prop(cameraserver,system_prop)
+set_prop(cameraserver,ctsgts_prop)
+get_prop(cameraserver,ctsgts_prop)
diff --git a/sepolicy/cifsmanager.te b/sepolicy/cifsmanager.te
new file mode 100755
index 0000000..c51c4d2
--- /dev/null
+++ b/sepolicy/cifsmanager.te
@@ -0,0 +1,5 @@
+type cifsmanager, domain, mlstrustedsubject;
+type cifsmanager_exec, exec_type, file_type;
+
+init_daemon_domain(cifsmanager)
+
diff --git a/sepolicy/clear_test.te b/sepolicy/clear_test.te
new file mode 100644
index 0000000..e9b3b2f
--- /dev/null
+++ b/sepolicy/clear_test.te
@@ -0,0 +1,2 @@
+type clear_test, domain;
+type clear_test_exec, exec_type, file_type;
diff --git a/sepolicy/crashlogd.te b/sepolicy/crashlogd.te
new file mode 100644
index 0000000..fe056cd
--- /dev/null
+++ b/sepolicy/crashlogd.te
@@ -0,0 +1,38 @@
+ # Rules for crashlogd
+ type crashlogd, domain;
+ type crashlogd_exec, exec_type, file_type;
+userdebug_or_eng(`
+ init_daemon_domain(crashlogd)
+ permissive crashlogd;
+
+ typeattribute crashlogd mlstrustedsubject;
+
+ #For silence only
+ dontaudit crashlogd self:capability_class_set *;
+ dontaudit crashlogd kernel:security *;
+ dontaudit crashlogd kernel:system *;
+ dontaudit crashlogd self:memprotect *;
+ dontaudit crashlogd domain:process *;
+ dontaudit crashlogd domain:fd *;
+ dontaudit crashlogd domain:dir r_dir_perms;
+ dontaudit crashlogd domain:lnk_file r_file_perms;
+ dontaudit crashlogd domain:{ fifo_file file } rw_file_perms;
+ dontaudit crashlogd domain:socket_class_set *;
+ dontaudit crashlogd domain:ipc_class_set *;
+ dontaudit crashlogd domain:key *;
+ dontaudit crashlogd fs_type:filesystem *;
+ dontaudit crashlogd fs_type:dir_file_class_set *;
+ dontaudit crashlogd dev_type:dir_file_class_set *;
+ dontaudit crashlogd file_type:dir_file_class_set *;
+ dontaudit crashlogd node_type:node *;
+ dontaudit crashlogd node_type:{ tcp_socket udp_socket } node_bind;
+ dontaudit crashlogd netif_type:netif *;
+ dontaudit crashlogd port_type:socket_class_set name_bind;
+ dontaudit crashlogd port_type:{ tcp_socket dccp_socket } name_connect;
+ dontaudit crashlogd domain:peer recv;
+ dontaudit crashlogd domain:binder *;
+ dontaudit crashlogd property_type:property_service set;
+ dontaudit crashlogd domain:debuggerd *;
+ dontaudit crashlogd service_manager_type:service_manager *;
+ binder_use(crashlogd);
+')
diff --git a/sepolicy/device.te b/sepolicy/device.te
new file mode 100644
index 0000000..0140060
--- /dev/null
+++ b/sepolicy/device.te
@@ -0,0 +1,17 @@
+type ddr_device, dev_type;
+type rga_device, dev_type;
+type vflash_device, dev_type;
+type timer_device, dev_type;
+type vpu_device, dev_type;
+type hevc_device, dev_type;
+type rtkbt_device, dev_type;
+type nvm_block_device, dev_type;
+# for rknand device
+type rknand_device, dev_type;
+
+#for displayd
+type baseparameter_block_device, dev_type;
+type sensor_device, dev_type;
+type e2fsck_cache_block_device, dev_type;
+type e2fsck_metadata_block_device, dev_type;
+type e2fsck_frp_block_device, dev_type;
diff --git a/sepolicy/dex2oat.te b/sepolicy/dex2oat.te
new file mode 100644
index 0000000..811efe7
--- /dev/null
+++ b/sepolicy/dex2oat.te
@@ -0,0 +1 @@
+allow dex2oat debugfs_tracing:file { write open };
diff --git a/sepolicy/displayd.te b/sepolicy/displayd.te
new file mode 100644
index 0000000..b8cac94
--- /dev/null
+++ b/sepolicy/displayd.te
@@ -0,0 +1,24 @@
+
+type displayd, domain, mlstrustedsubject;
+type displayd_exec, exec_type, file_type;
+
+init_daemon_domain(displayd)
+
+allow displayd displayd:capability { dac_override net_admin };
+allow displayd system_prop:property_service { set };
+allow displayd media_prop:property_service { set };
+allow displayd sysfs_lcdc:file rw_file_perms;
+allow displayd property_socket:sock_file { write };
+allow displayd init:unix_stream_socket { connectto };
+allow displayd displayd:unix_stream_socket { connectto };
+allow displayd sysfs_hdmi:file rw_file_perms;
+allow displayd cache_file:file { rw_file_perms create };
+allow displayd cache_file:dir rw_dir_perms;
+allow displayd baseparameter_block_device:blk_file rw_file_perms;
+allow displayd displayd:netlink_kobject_uevent_socket { create setopt bind getopt read };
+allow displayd displayd:netlink_route_socket { create setopt bind getopt read };
+allow displayd displayd:netlink_nflog_socket { create setopt bind getopt read };
+allow displayd displayd:unix_stream_socket { connectto };
+allow displayd shell_exec:file { execute read open execute_no_trans };
+allow displayd block_device:dir { search };
+allow displayd sysfs:file { write };
diff --git a/sepolicy/drmserver.te b/sepolicy/drmserver.te
new file mode 100644
index 0000000..275b9c6
--- /dev/null
+++ b/sepolicy/drmserver.te
@@ -0,0 +1,5 @@
+allow drmserver gpu_device:chr_file rw_file_perms;
+allow drmserver video_device:chr_file rw_file_perms;
+
+# for xts to get device id
+allow drmserver rknand_device:chr_file { open getattr read write ioctl };
diff --git a/sepolicy/drmservice.te b/sepolicy/drmservice.te
new file mode 100644
index 0000000..6aadb87
--- /dev/null
+++ b/sepolicy/drmservice.te
@@ -0,0 +1,24 @@
+type drmservice, domain, mlstrustedsubject;
+type drmservice_exec, exec_type, file_type;
+
+init_daemon_domain(drmservice)
+
+allow drmservice drmservice:capability { dac_override dac_read_search net_raw net_admin sys_module };
+allow drmservice drmservice:udp_socket { create };
+allow drmservice property_socket:sock_file { write };
+allow drmservice sysfs:file { write };
+allow drmservice wifi_data_file:dir { search write read add_name };
+allow drmservice init:unix_stream_socket { connectto };
+allow drmservice drmservice:udp_socket { ioctl };
+allow drmservice system_prop:property_service { set };
+allow drmservice wifi_data_file:file { create read write ioctl open getattr };
+allow drmservice serialno_prop:property_service { set };
+allow drmservice drm_prop:property_service { set };
+allow drmservice rknand_device:chr_file rw_file_perms;
+allow drmservice configfs:file rw_file_perms;
+allow drmservice configfs:dir { rw_dir_perms search };
+allow drmservice rootfs:lnk_file getattr;
+allow drmservice sysfs:file { read getattr open };
+allow drmservice storage_device:chr_file rw_file_perms;
+allow drmservice proc:file { read open };
+set_prop(drmservice,secureboot_prop)
diff --git a/sepolicy/earlylogs.te b/sepolicy/earlylogs.te
new file mode 100644
index 0000000..c5dc057
--- /dev/null
+++ b/sepolicy/earlylogs.te
@@ -0,0 +1,10 @@
+type earlylogs, domain;
+type earlylogs_exec, exec_type, file_type;
+
+userdebug_or_eng(`
+ init_daemon_domain(earlylogs)
+ allow earlylogs rootfs:lnk_file getattr;
+ allow earlylogs self:capability dac_override;
+ allow earlylogs shell_exec:file { read getattr };
+')
+
diff --git a/sepolicy/execmod/mediadrmserver.te b/sepolicy/execmod/mediadrmserver.te
new file mode 100644
index 0000000..446662f
--- /dev/null
+++ b/sepolicy/execmod/mediadrmserver.te
@@ -0,0 +1 @@
+allow mediadrmserver system_file:file { execmod };
diff --git a/sepolicy/execmod/mediaserver.te b/sepolicy/execmod/mediaserver.te
new file mode 100644
index 0000000..db439c1
--- /dev/null
+++ b/sepolicy/execmod/mediaserver.te
@@ -0,0 +1 @@
+allow mediaserver system_file:file { execmod };
diff --git a/sepolicy/file.te b/sepolicy/file.te
new file mode 100644
index 0000000..274816c
--- /dev/null
+++ b/sepolicy/file.te
@@ -0,0 +1,13 @@
+type metadata_file, file_type;
+type camdata_file, file_type;
+type ru_file, file_type;
+type ext4_exec, exec_type, file_type;
+type zram_device, dev_type;
+type sysfs_lcdc, fs_type, sysfs_type, mlstrustedobject;
+type sysfs_hdmi, fs_type, sysfs_type, mlstrustedobject;
+type akmd_device, dev_type;
+type akmd_file, file_type, data_file_type;
+type pppoe_data_file, file_type, data_file_type;
+type sysfs_fb, fs_type, sysfs_type;
+type storage_device, dev_type;
+type aplog_data_file, file_type, data_file_type;
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
new file mode 100755
index 0000000..ad4c7d7
--- /dev/null
+++ b/sepolicy/file_contexts
@@ -0,0 +1,112 @@
+/dev/ttyFIQ[0-9]* u:object_r:serial_device:s0
+/dev/ttyUSB[0-9]* u:object_r:tty_device:s0
+/dev/mali[0-9] u:object_r:gpu_device:s0
+/dev/mali u:object_r:gpu_device:s0
+/dev/ddr_freq u:object_r:ddr_device:s0
+/dev/rga u:object_r:rga_device:s0
+/dev/pvr_sync u:object_r:gpu_device:s0
+/dev/block/dm-[0-9]* u:object_r:dm_device:s0
+/dev/vflash u:object_r:vflash_device:s0
+/dev/timerirq u:object_r:timer_device:s0
+/dev/vpu_service u:object_r:video_device:s0
+/dev/vpu-service u:object_r:video_device:s0
+/dev/hevc_service u:object_r:video_device:s0
+/dev/hevc-service u:object_r:video_device:s0
+/dev/video_state u:object_r:video_device:s0
+/dev/iep u:object_r:video_device:s0
+/dev/camsys_marvin[0-9]* u:object_r:camera_device:s0
+/dev/camsys_marvin u:object_r:camera_device:s0
+/dev/block/zram0 u:object_r:zram_device:s0
+/dev/sw_sync u:object_r:gpu_device:s0
+
+#akmd
+/dev/akm8963_dev u:object_r:akmd_device:s0
+/system/bin/akmd u:object_r:akmd_exec:s0
+/data/misc/akmd(/.*)? u:object_r:akmd_file:s0
+
+/metadata(/.*)? u:object_r:metadata_file:s0
+/dev/mma8452_daemon u:object_r:sensor_device:s0
+/data/camera(/.*)? u:object_r:camdata_file:s0
+
+/radical_update(/.*)? u:object_r:ru_file:s0
+/dev/rtk_btusb u:object_r:rtkbt_device:s0
+/dev/rknand_sys_storage u:object_r:rknand_device:s0
+/system/vendor/bin/pvrsrvctl u:object_r:pvrsrvctl_exec:s0
+/system/bin/drmservice u:object_r:drmservice_exec:s0
+/system/bin/iso u:object_r:iso_exec:s0
+/data/cifsmanager(/.*)? u:object_r:cifsmanager_exec:s0
+#/system/bin/e2fsck u:object_r:ext4_exec:s0
+#/sbin/resize2fs u:object_r:resize2fs_exec:s0
+
+
+/sys/devices/virtual/android_usb/android0/(/.*)? -- u:object_r:sysfs_usb:s0
+
+#add for glgps
+/system/bin/glgps u:object_r:gpsd_exec:s0
+
+#lcdcscale
+/sys/devices/fb.11/graphics/fb0/scale -- u:object_r:sysfs_lcdc:s0
+
+#for support ntfs
+/system/bin/ntfs-3g u:object_r:ntfs3g_exec:s0
+
+#hdmi
+/sys/devices/virtual/display/HDMI(/.*)? -- u:object_r:sysfs_hdmi:s0
+
+#for displayd
+/system/bin/displayd u:object_r:displayd_exec:s0
+
+#for glgps
+/data/system/gps(/.*)? u:object_r:gps_data_file:s0
+
+#for frp funtions
+/dev/block/platform/fe330000\.sdhci/by-name/frp u:object_r:frp_block_device:s0
+/dev/block/platform/fe330000\.sdhci/by-name/system u:object_r:resize_block_device:s0
+/dev/block/platform/fe330000\.sdhci/by-name/cache u:object_r:e2fsck_cache_block_device:s0
+/dev/block/platform/fe330000\.sdhci/by-name/metadata u:object_r:e2fsck_metadata_block_device:s0
+/dev/block/platform/fe330000\.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
+
+# sensor
+/dev/lightsensor u:object_r:sensor_device:s0
+/dev/psensor u:object_r:sensor_device:s0
+/dev/compass u:object_r:sensor_device:s0
+/dev/gyrosensor u:object_r:sensor_device:s0
+/dev/pressure u:object_r:sensor_device:s0
+
+/sys/devices/platform/fb/graphics/fb[0-9]/cabc u:object_r:sysfs_fb:s0
+
+#for vpu
+/dev/rkvdec u:object_r:video_device:s0
+/dev/dri(/.*)? u:object_r:gpu_device:s0
+
+#for aplog
+(/system)?/vendor/bin/start_log_srv.sh u:object_r:ap_log_srv_script_exec:s0
+(/system)?/vendor/bin/logcat_ep.sh u:object_r:apk_logfs_exec:s0
+(/system)?/vendor/bin/log-watch u:object_r:log-watch_exec:s0
+(/system)?/vendor/etc/log-watch-kmsg.cfg u:object_r:log-watch-cnf:s0
+# Crashlogd executable
+(/system)?/vendor/bin/crashlogd u:object_r:crashlogd_exec:s0
+(/system)?/vendor/bin/elogs.sh u:object_r:earlylogs_exec:s0
+
+# pppoe
+/system/bin/pppoe-setup u:object_r:pppoe_exec:s0
+/system/bin/pppoe-start u:object_r:pppoe_exec:s0
+/system/bin/pppoe-stop u:object_r:pppoe_exec:s0
+/system/bin/pppoe-connect u:object_r:pppoe_exec:s0
+/system/bin/pppoe-status u:object_r:pppoe_exec:s0
+
+/data/misc/ppp(/.*)? u:object_r:pppoe_data_file:s0
+
+/system/bin/wfd u:object_r:wfd_exec:s0
+
+/dev/vendor_storage u:object_r:storage_device:s0
+
+/data/logs(/.*)? u:object_r:aplog_data_file:s0
+
+#for tee
+/system/bin/tee-supplican u:object_r:tee-supplicant_exec:s0
+#for abc
+/system/bin/abc u:object_r:abc_exec:s0
+
+/system/bin/systemconfig u:object_r:clear_test_exec:s0
+/system/etc/ppp/init.gprs-pppd u:object_r:clear_test_exec:s0
diff --git a/sepolicy/fsck.te b/sepolicy/fsck.te
new file mode 100644
index 0000000..cdb477a
--- /dev/null
+++ b/sepolicy/fsck.te
@@ -0,0 +1,7 @@
+#type e2fsck_block_device, dev_type;
+#type metadata_block_device, dev_type;
+#type frp_block_device, dev_type;
+
+allow fsck e2fsck_cache_block_device:blk_file rw_file_perms;
+allow fsck e2fsck_frp_block_device:blk_file rw_file_perms;
+allow fsck e2fsck_metadata_block_device:blk_file rw_file_perms;
diff --git a/sepolicy/genfs_contexts b/sepolicy/genfs_contexts
new file mode 100644
index 0000000..51f0c78
--- /dev/null
+++ b/sepolicy/genfs_contexts
@@ -0,0 +1,2 @@
+genfscon proc /bluetooth/sleep/lpm u:object_r:proc_bluetooth_writable:s0
+genfscon proc /bluetooth/sleep/btwrite u:object_r:proc_bluetooth_writable:s0
diff --git a/sepolicy/gpsd.te b/sepolicy/gpsd.te
new file mode 100644
index 0000000..1d730d2
--- /dev/null
+++ b/sepolicy/gpsd.te
@@ -0,0 +1,6 @@
+wakelock_use(gpsd)
+#allow gpsd gpsd:capability { dac_override dac_read_search };
+allow gpsd serial_device:chr_file { read write open ioctl };
+allow gpsd gps_data_file:dir { create };
+allow gpsd gps_data_file:file rw_file_perms;
+
diff --git a/sepolicy/healthd.te b/sepolicy/healthd.te
new file mode 100644
index 0000000..fb77596
--- /dev/null
+++ b/sepolicy/healthd.te
@@ -0,0 +1,6 @@
+allow healthd device:dir { read open write add_name remove_name };
+allow healthd device:chr_file { create };
+allow healthd gpu_device:dir { search };
+allow healthd gpu_device:chr_file { read write open ioctl };
+#allow healthd device:chr_file { write open };
+#allow healthd self:capability { mknod };
diff --git a/sepolicy/init.te b/sepolicy/init.te
new file mode 100755
index 0000000..319fd05
--- /dev/null
+++ b/sepolicy/init.te
@@ -0,0 +1,59 @@
+# Additional rules for init
+#allow init self:capability sys_module;
+#recovery_only(`
+# domain_trans(init, rootfs, busybox)
+#')
+
+domain_trans(init, pvrsrvctl_exec, pvrsrvctl)
+domain_trans(init, drmservice_exec, drmservice)
+domain_trans(init, displayd_exec, displayd)
+domain_auto_trans(init, rootfs, resize2fs)
+domain_auto_trans(init, gpsd_exec, gpsd)
+domain_trans(init, iso_exec, iso)
+domain_trans(init, cifsmanager_exec, cifsmanager)
+domain_trans(init, abc_exec, abc)
+
+allow init serial_device:chr_file { write ioctl };
+allow init kernel:system { module_request };
+
+allow init tmpfs:lnk_file { create };
+allow init devpts:chr_file { ioctl };
+allow init block_device:blk_file { getattr read write };
+
+allow init init:capability { sys_module };
+allow init nvm_block_device:blk_file { write };
+allow init gpu_device:chr_file { write ioctl };
+allow init property_socket:sock_file { write };
+allow init zram_device:blk_file { write open read };
+
+#allow init ext4_exec:file { execute_no_trans };
+
+allow init socket_device:sock_file { create setattr };
+allow init sysfs_hdmi:file rw_file_perms;
+allow init init:netlink_kobject_uevent_socket { create setopt bind getopt read };
+#allow init kernel:security { setcheckreqprot };
+allow init cache_file:dir { mounton };
+allow init metadata_file:dir { mounton };
+allow init storage_file:dir mounton;
+allow init baseparameter_block_device:blk_file { write };
+allow init configfs:dir { write remove_name add_name create };
+allow init configfs:file { write };
+allow init configfs:lnk_file { unlink create };
+allow init frp_block_device:blk_file { write };
+#allow init rootfs:file { execute_no_trans };
+allow init devpts:chr_file { getattr };
+allow init debugfs:dir mounton;
+
+allow init block_device:lnk_file { relabelfrom };
+allow init userdata_block_device:lnk_file { relabelto };
+allow init frp_block_device:lnk_file { relabelto };
+allow init e2fsck_metadata_block_device:lnk_file { relabelto };
+allow init resize_block_device:lnk_file { relabelto };
+allow init e2fsck_cache_block_device:lnk_file { relabelto };
+allow init system_file:system { module_load };
+allow init debugfs:dir mounton;
+allow init configfs:file rw_file_perms;
+allow init configfs:lnk_file create_file_perms;
+allow init perfprofd_exec:file getattr;
+allow init rootfs:system { module_load };
+allow init sysfs:dir write;
diff --git a/sepolicy/iso.te b/sepolicy/iso.te
new file mode 100755
index 0000000..2339d9a
--- /dev/null
+++ b/sepolicy/iso.te
@@ -0,0 +1,5 @@
+type iso, domain, mlstrustedsubject;
+type iso_exec, exec_type, file_type;
+
+init_daemon_domain(iso)
+
diff --git a/sepolicy/kernel.te b/sepolicy/kernel.te
new file mode 100644
index 0000000..99b5c14
--- /dev/null
+++ b/sepolicy/kernel.te
@@ -0,0 +1,15 @@
+# Additional rules for kernel
+allow kernel block_device:blk_file { read write open };
+
+# mr1
+allow kernel self:capability { mknod mknod };
+allow kernel device:blk_file { create_file_perms };
+allow kernel block_device:blk_file rw_file_perms;
+allow kernel device:blk_file { create setattr };
+
+allow kernel device:dir { write add_name };
+allow kernel device:chr_file { create setattr getattr unlink };
+allow kernel kernel:system { module_request };
+allow kernel metadata_file:dir rw_dir_perms;
+allow kernel metadata_file:file rw_file_perms;
+allow kernel device:dir { remove_name write add_name };
diff --git a/sepolicy/log-watch.te b/sepolicy/log-watch.te
new file mode 100644
index 0000000..7baa237
--- /dev/null
+++ b/sepolicy/log-watch.te
@@ -0,0 +1,13 @@
+type log-watch, domain;
+type log-watch_exec, exec_type, file_type;
+type log-watch-cnf, file_type;
+
+userdebug_or_eng(`
+ init_daemon_domain(log-watch)
+ allow log-watch log-watch-cnf:file read;
+ allow log-watch rootfs:lnk_file getattr;
+ allow log-watch kernel:system syslog_read;
+ allow log-watch kmsg_device:chr_file { read open };
+ allow log-watch log-watch-cnf:file { getattr open };
+')
+
diff --git a/sepolicy/mediacodec.te b/sepolicy/mediacodec.te
new file mode 100644
index 0000000..06a6a5b
--- /dev/null
+++ b/sepolicy/mediacodec.te
@@ -0,0 +1,3 @@
+allow mediacodec rootfs:lnk_file getattr;
+allow mediacodec rga_device:chr_file { ioctl rw_file_perms };
+allow mediacodec gpu_device:dir search;
diff --git a/sepolicy/mediadrmserver.te b/sepolicy/mediadrmserver.te
new file mode 100644
index 0000000..924d55d
--- /dev/null
+++ b/sepolicy/mediadrmserver.te
@@ -0,0 +1,3 @@
+allow mediadrmserver proc_net:file r_file_perms;
+allow mediadrmserver rootfs:lnk_file getattr;
+set_prop(mediadrmserver,graphic_prop)
diff --git a/sepolicy/mediaextractor.te b/sepolicy/mediaextractor.te
new file mode 100644
index 0000000..5dc79fa
--- /dev/null
+++ b/sepolicy/mediaextractor.te
@@ -0,0 +1,2 @@
+set_prop(mediaextractor,drm_prop)
+set_prop(mediaextractor,media_prop)
diff --git a/sepolicy/mediaserver.te b/sepolicy/mediaserver.te
new file mode 100644
index 0000000..268b40e
--- /dev/null
+++ b/sepolicy/mediaserver.te
@@ -0,0 +1,31 @@
+allow mediaserver system_server:unix_stream_socket { read write };
+allow mediaserver surfaceflinger:unix_stream_socket { read write };
+allow mediaserver self:netlink_kobject_uevent_socket create_socket_perms;
+allow mediaserver system_prop:property_service set;
+#allow mediaserver default_prop:property_service set;
+allow mediaserver video_device:chr_file rw_file_perms;
+allow mediaserver rga_device:chr_file rw_file_perms;
+allow mediaserver camdata_file:dir create_dir_perms;
+allow mediaserver camdata_file:file create_file_perms;
+allow mediaserver untrusted_app:dir search;
+allow mediaserver untrusted_app:file { open read };
+
+
+allow mediaserver storage_file:dir { search };
+allow mediaserver storage_file:lnk_file { read };
+allow mediaserver mnt_user_file:dir { search };
+allow mediaserver mnt_user_file:lnk_file { read };
+allow mediaserver sensorservice_service:service_manager { find };
+allow mediaserver graphic_prop:property_service { set };
+allow mediaserver media_prop:property_service { set };
+allow mediaserver surfaceflinger:fifo_file rw_file_perms;
+
+allow mediaserver sysfs_hdmi:file rw_file_perms;
+allow mediaserver camera_device:chr_file rw_file_perms;
+allow mediaserver debugfs_tracing:file rw_file_perms;
+allow mediaserver gpu_device:dir { search };
+allow mediaserver graphic_prop:file { read getattr open };
+set_prop(mediaserver,media_prop)
+set_prop(mediaserver,drm_prop)
+set_prop(mediaserver,ctsgts_prop)
+get_prop(mediaserver,ctsgts_prop)
diff --git a/sepolicy/netd.te b/sepolicy/netd.te
new file mode 100644
index 0000000..3acb9a6
--- /dev/null
+++ b/sepolicy/netd.te
@@ -0,0 +1,11 @@
+# Triggers a sys_module denial, but kernel has CONFIG_MODULES=n.
+dontaudit netd self:capability sys_module;
+allow netd kernel:system module_request;
+
+# map with latest kernel security/selinux/include/classmap.h
+allow netd netd:netlink_netfilter_socket { create setopt bind write read getopt };
+allow netd netd:netlink_generic_socket { create setopt bind write read getopt getattr };
+allow netd netd:netlink_scsitransport_socket { create setopt bind write read getopt getattr };
+allow netd netd:netlink_rdma_socket { create setopt bind write read getopt getattr };
+allow netd netd:netlink_crypto_socket { create setopt bind write read getopt getattr };
+
diff --git a/sepolicy/ntfs3g.te b/sepolicy/ntfs3g.te
new file mode 100644
index 0000000..28bc81a
--- /dev/null
+++ b/sepolicy/ntfs3g.te
@@ -0,0 +1,18 @@
+type ntfs3g, domain, mlstrustedsubject;
+type ntfs3g_exec, exec_type, file_type;
+
+#init_daemon_domain(ntfs3g)
+
+
+allow ntfs3g vold:fd { use };
+allow ntfs3g fuse_device:blk_file { open read write getattr };
+allow ntfs3g unlabeled:dir { mounton };
+allow ntfs3g devpts:chr_file rw_file_perms;
+allow ntfs3g vold:fifo_file rw_file_perms;
+allow ntfs3g ntfs3g:capability { setgid setuid sys_admin };
+allow ntfs3g block_device:dir { getattr search };
+allow ntfs3g vold_device:blk_file rw_file_perms;
+allow ntfs3g block_device:blk_file { lock getattr };
+allow ntfs3g mnt_media_rw_stub_file:dir { getattr search mounton };
+allow ntfs3g unlabeled:filesystem { mount };
+allow ntfs3g mnt_media_rw_file:dir { getattr search };
diff --git a/sepolicy/platform_app.te b/sepolicy/platform_app.te
new file mode 100755
index 0000000..f58798d
--- /dev/null
+++ b/sepolicy/platform_app.te
@@ -0,0 +1,21 @@
+# Additional rules for platform_app
+allow platform_app surfaceflinger_tmpfs:file { read write };
+# Write to /cache.
+allow platform_app vfat:dir create_dir_perms;
+allow platform_app vfat:file create_file_perms;
+allow platform_app init:unix_stream_socket { connectto };
+allow platform_app surfaceflinger:fifo_file rw_file_perms;
+#allow platform_app property_socket:sock_file { write };
+allow platform_app unlabeled:filesystem { getattr };
+allow platform_app unlabeled:dir rw_dir_perms;
+allow platform_app unlabeled:file rw_file_perms;
+allow platform_app devicemanager_service:service_manager { find };
+allow platform_app gpu_device:dir { search };
+#allow platform_app property_socket:sock_file { write }
+allow platform_app vfat:dir create_dir_perms;
+allow platform_app vfat:file create_file_perms;
+allow platform_app property_socket:sock_file write;
+set_prop(platform_app,system_prop)
+set_prop(platform_app,media_prop)
+set_prop(platform_app,drm_prop)
+get_prop(platform_app,ctsgts_prop)
diff --git a/sepolicy/pppoe.te b/sepolicy/pppoe.te
new file mode 100644
index 0000000..64357ff
--- /dev/null
+++ b/sepolicy/pppoe.te
@@ -0,0 +1,24 @@
+type pppoe, domain, domain_deprecated;
+type pppoe_exec, exec_type, file_type;
+
+init_daemon_domain(pppoe)
+
+allow pppoe shell_exec:file { getattr read execute open };
+allow pppoe toolbox_exec:file { getattr execute read open execute_no_trans };
+allow pppoe property_socket:sock_file { write };
+allow pppoe init:unix_stream_socket { connectto };
+allow pppoe pppoe:udp_socket { create ioctl };
+allow pppoe pppoe:capability { net_raw net_admin dac_override setuid setgid };
+allow pppoe pppoe:packet_socket { create ioctl read setopt bind write };
+allow pppoe pppoe:socket { create connect ioctl };
+allow pppoe pppoe_exec:file { execute_no_trans };
+allow pppoe ppp_exec:file { execute getattr read open execute_no_trans };
+allow pppoe ppp_device:chr_file { read write open ioctl };
+allow pppoe pppoe_data_file:file { open write create setattr append read getattr unlink };
+allow pppoe pppoe_data_file:dir { write add_name read open read open search remove_name };
+allow pppoe system_file:file { execute_no_trans };
+allow pppoe net_radio_prop:property_service { set };
+allow pppoe pppoe_prop:property_service { set };
+allow pppoe pppoe_prop:file { read open getattr };
+allow pppoe system_prop:property_service { set };
+
diff --git a/sepolicy/priv_app.te b/sepolicy/priv_app.te
new file mode 100644
index 0000000..36d682d
--- /dev/null
+++ b/sepolicy/priv_app.te
@@ -0,0 +1,5 @@
+allow priv_app drm_prop:file read;
+allow priv_app system_prop:file read;
+allow priv_app gpu_device:dir { search };
+allow priv_app vfat:dir create_dir_perms;
+allow priv_app vfat:file create_file_perms;
diff --git a/sepolicy/procrank.te b/sepolicy/procrank.te
new file mode 100644
index 0000000..c95bf7d
--- /dev/null
+++ b/sepolicy/procrank.te
@@ -0,0 +1,3 @@
+userdebug_or_eng(`
+ #allow procrank procrank:capability { sys_admin };
+')
diff --git a/sepolicy/property.te b/sepolicy/property.te
new file mode 100644
index 0000000..ddfe5be
--- /dev/null
+++ b/sepolicy/property.te
@@ -0,0 +1,7 @@
+type graphic_prop, property_type;
+type serialno_prop, property_type;
+type drm_prop, property_type;
+type media_prop, property_type;
+type ctsgts_prop, property_type;
+type pppoe_prop, property_type;
+type secureboot_prop, property_type;
diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts
new file mode 100644
index 0000000..7b227a0
--- /dev/null
+++ b/sepolicy/property_contexts
@@ -0,0 +1,11 @@
+sys_graphic. u:object_r:graphic_prop:s0
+#can not label ro.*
+#ro.serialno u:object_r:serialno_prop:s0
+drm. u:object_r:drm_prop:s0
+media. u:object_r:media_prop:s0
+mediaplayer. u:object_r:media_prop:s0
+cts_gts. u:object_r:ctsgts_prop:s0
+persist.cts_gts. u:object_r:ctsgts_prop:s0
+pppoe. u:object_r:pppoe_prop:s0
+persist.ppp u:object_r:pppoe_prop:s0
+ro.secureboot u:object_r:secureboot_prop:s0
diff --git a/sepolicy/pvrsrvctl.te b/sepolicy/pvrsrvctl.te
new file mode 100644
index 0000000..54fc624
--- /dev/null
+++ b/sepolicy/pvrsrvctl.te
@@ -0,0 +1,7 @@
+type pvrsrvctl, domain, mlstrustedsubject;
+type pvrsrvctl_exec, exec_type, file_type;
+
+init_daemon_domain(pvrsrvctl)
+
+allow pvrsrvctl pvrsrvctl:capability { sys_module sys_admin };
+allow pvrsrvctl gpu_device:chr_file rw_file_perms;
diff --git a/sepolicy/radio.te b/sepolicy/radio.te
new file mode 100644
index 0000000..1f043f0
--- /dev/null
+++ b/sepolicy/radio.te
@@ -0,0 +1,4 @@
+allow radio surfaceflinger:fifo_file rw_file_perms;
+allow radio system_prop:property_service { set };
+allow radio gpu_device:dir search;
+allow radio gpu_device:chr_file { rw_file_perms ioctl };
diff --git a/sepolicy/recovery.te b/sepolicy/recovery.te
new file mode 100644
index 0000000..623da4a
--- /dev/null
+++ b/sepolicy/recovery.te
@@ -0,0 +1,40 @@
+
+recovery_only(`
+ allow recovery ctl_rildaemon_prop:property_service set;
+ allow recovery rootfs:dir { rw_dir_perms create };
+ #allow recovery rootfs:file create_file_perms;
+ #allow recovery rootfs:file rx_file_perms;
+ allow recovery sysfs_devices_system_cpu:file rw_file_perms;
+ #allow recovery self:capability mknod;
+ allow recovery usbfs:dir rw_dir_perms;
+ allow recovery kernel:system module_request;
+ allow recovery serial_device:chr_file rw_file_perms;
+ allow recovery vfat:file r_file_perms;
+ allow recovery device:file rw_file_perms;
+ allow recovery device:dir rw_dir_perms;
+ #allow recovery device:chr_file create_file_perms;
+ allow recovery console_device:chr_file create_file_perms;
+ allow recovery cache_file:dir { mounton };
+ allow recovery proc_sysrq:file rw_file_perms;
+ allow recovery media_rw_data_file:dir { search open read };
+ allow recovery vfat:dir rw_dir_perms;
+ allow recovery media_rw_data_file:file { open read };
+
+ allow recovery ru_file:file execute_no_trans;
+ allow recovery ru_file:{ file lnk_file } { create_file_perms relabelfrom relabelto };
+ allow recovery ru_file:dir { create_dir_perms relabelfrom relabelto };
+
+ allow recovery vfat:file {create append};
+ allow recovery rknand_device:chr_file {read write open ioctl};
+ allow recovery metadata_file:dir { mounton };
+ allow recovery gpu_device:chr_file rw_file_perms;
+ allow recovery gpu_device:dir { search };
+ allow recovery kmsg_device:chr_file rw_file_perms;
+ allow recovery drm_prop:file { getattr open };
+ allow recovery graphic_prop:file { getattr open };
+ allow recovery media_prop:file { getattr open };
+ allow recovery mmc_prop:file { getattr open };
+ allow recovery safemode_prop:file { getattr open };
+ allow recovery device_logging_prop:file { getattr open };
+ allow recovery logpersistd_logging_prop:file { getattr open };
+')
diff --git a/sepolicy/resize2fs.te b/sepolicy/resize2fs.te
new file mode 100644
index 0000000..9fc52d9
--- /dev/null
+++ b/sepolicy/resize2fs.te
@@ -0,0 +1,8 @@
+type resize2fs, domain;
+type resize_block_device, dev_type;
+allow resize2fs devpts:chr_file rw_file_perms;
+allow resize2fs resize_block_device:blk_file { getattr ioctl };
+allow resize2fs resize_block_device:blk_file rw_file_perms;
+allow resize2fs block_device:dir { search };
+allow resize2fs serial_device:chr_file { read write getattr ioctl };
+
diff --git a/sepolicy/rild.te b/sepolicy/rild.te
new file mode 100644
index 0000000..2725f6a
--- /dev/null
+++ b/sepolicy/rild.te
@@ -0,0 +1,11 @@
+# ppp for 3G dongle
+allow rild ppp_device:chr_file rw_file_perms;
+allow rild net_radio_prop:property_service set;
+allow rild ppp_exec:file {execute execute_no_trans open};
+allow rild ppp_exec:file getattr;
+allow rild ppp_exec:file { read };
+allow rild self:capability { setuid setgid dac_override };
+# 3G dongle in userdubg mode
+allow rild system_data_file:dir {write add_name};
+#allow rild system_data_file:file {create write};
+allow rild self:capability { sys_admin };
diff --git a/sepolicy/sdcardd.te b/sepolicy/sdcardd.te
new file mode 100644
index 0000000..8fdff19
--- /dev/null
+++ b/sepolicy/sdcardd.te
@@ -0,0 +1,4 @@
+allow sdcardd mnt_media_rw_stub_file:dir { getattr };
+allow sdcardd unlabeled:dir rw_dir_perms;
+allow sdcardd unlabeled:filesystem { getattr };
+allow sdcardd unlabeled:file rw_file_perms;
diff --git a/sepolicy/service.te b/sepolicy/service.te
new file mode 100644
index 0000000..e086601
--- /dev/null
+++ b/sepolicy/service.te
@@ -0,0 +1,2 @@
+type devicemanager_service, service_manager_type;
+type pppoe_service, service_manager_type;
diff --git a/sepolicy/service_contexts b/sepolicy/service_contexts
new file mode 100644
index 0000000..d826dbc
--- /dev/null
+++ b/sepolicy/service_contexts
@@ -0,0 +1,2 @@
+device u:object_r:devicemanager_service:s0
+pppoe u:object_r:pppoe_service:s0
diff --git a/sepolicy/shell.te b/sepolicy/shell.te
new file mode 100644
index 0000000..d0d00eb
--- /dev/null
+++ b/sepolicy/shell.te
@@ -0,0 +1,19 @@
+allow shell serial_device:chr_file rw_file_perms;
+allow shell surfaceflinger:fifo_file rw_file_perms;
+allow shell gpsd_exec:file { getattr execute read open execute_no_trans };
+allow shell gps_data_file:dir { getattr read open };
+allow shell proc_cpuinfo:file mounton;
+allow shell gpu_device:dir { search };
+allow shell gatekeeper_service:service_manager { find };
+#allow shell device:chr_file rw_file_perms;
+allow shell init_exec:file getattr;
+allow shell metadata_file:dir getattr;
+allow shell rootfs:file getattr;
+
+get_prop(shell,media_prop)
+get_prop(shell,drm_prop)
+get_prop(shell,graphic_prop)
+get_prop(shell,safemode_prop)
+get_prop(shell,mmc_prop)
+get_prop(shell,device_logging_prop)
+get_prop(shell,ctsgts_prop)
diff --git a/sepolicy/slideshow.te b/sepolicy/slideshow.te
new file mode 100644
index 0000000..a27c85b
--- /dev/null
+++ b/sepolicy/slideshow.te
@@ -0,0 +1,5 @@
+allow slideshow gpu_device:dir search;
+allow slideshow gpu_device:chr_file { read write };
+allow slideshow gpu_device:chr_file open;
+allow slideshow gpu_device:chr_file ioctl;
+allow slideshow self:capability sys_admin;
diff --git a/sepolicy/surfaceflinger.te b/sepolicy/surfaceflinger.te
new file mode 100644
index 0000000..013742b
--- /dev/null
+++ b/sepolicy/surfaceflinger.te
@@ -0,0 +1,18 @@
+allow surfaceflinger device:dir r_dir_perms;
+allow surfaceflinger ddr_device:chr_file rw_file_perms;
+allow surfaceflinger rga_device:chr_file rw_file_perms;
+allow surfaceflinger sysfs_lcdc:file rw_file_perms;
+
+#for hdmi
+allow surfaceflinger sysfs_hdmi:file rw_file_perms;
+allow surfaceflinger surfaceflinger:unix_stream_socket { ioctl };
+
+allow surfaceflinger sysfs:file rw_file_perms;
+allow surfaceflinger system_data_file:dir create_dir_perms;
+allow surfaceflinger gpu_device:chr_file { ioctl };
+allow surfaceflinger gpu_device:dir { search rw_dir_perms };
+allow surfaceflinger debugfs_tracing:file rw_file_perms;
+allow surfaceflinger self:capability { sys_nice };
+
+set_prop(surfaceflinger,ctsgts_prop)
+get_prop(surfaceflinger,ctsgts_prop)
diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te
new file mode 100644
index 0000000..d4dd3d8
--- /dev/null
+++ b/sepolicy/system_app.te
@@ -0,0 +1,25 @@
+allow system_app media_rw_data_file:file rw_file_perms;
+allow system_app media_rw_data_file:dir rw_dir_perms;
+allow system_app cache_file:dir w_dir_perms;
+allow system_app cache_file:file create_file_perms;
+allow system_app surfaceflinger:fifo_file rw_file_perms;
+allow system_app sysfs_lcdc:file rw_file_perms;
+
+#for hdmi
+allow system_app sysfs_hdmi:file rw_file_perms;
+allow system_app sysfs_fb:file rw_file_perms;
+
+allow system_app devicemanager_service:service_manager { find };
+allow system_app cache_file:file { ioctl rw_file_perms };
+allow system_app cache_file:dir { remove_name rw_dir_perms };
+allow system_app gpu_device:dir { search };
+allow system_app radio_data_file:dir { getattr };
+allow system_app vfat:dir create_dir_perms;
+allow system_app vfat:file create_file_perms;
+#allow system_app system_data_file:dir { rw_dir_perms };
+allow system_app cache_recovery_file:dir { search };
+
+get_prop(system_app,drm_prop)
+get_prop(system_app,media_prop)
+set_prop(system_app,system_prop)
+get_prop(system_app,ctsgts_prop)
diff --git a/sepolicy/system_server.te b/sepolicy/system_server.te
new file mode 100644
index 0000000..1b5adfe
--- /dev/null
+++ b/sepolicy/system_server.te
@@ -0,0 +1,50 @@
+# allow power hal to adjust max frequency
+allow system_server sysfs_devices_system_cpu:file w_file_perms;
+allow system_server timer_device:chr_file rw_file_perms;
+
+allow system_server surfaceflinger:fifo_file rw_file_perms;
+allow system_server serial_device:chr_file rw_file_perms;
+
+allow system_server gps_data_file:dir { search write read open add_name };
+allow system_server gps_data_file:fifo_file { write open read };
+allow system_server dumpstate:unix_stream_socket { ioctl };
+
+allow system_server socket_device:sock_file { write };
+
+allow system_server displayd:unix_stream_socket { connectto };
+allow system_server gps_data_file:fifo_file { create rw_file_perms setattr };
+
+allow system_server system_server:capability { sys_module };
+allow system_server sensor_device:chr_file rw_file_perms;
+allow system_server system_server:unix_stream_socket { ioctl };
+
+allow system_server pppoe_service:service_manager { add find };
+allow system_server pppoe_data_file:file { read open getattr };
+
+# map with latest kernel security/selinux/include/classmap.h
+allow system_server system_server:netlink_netfilter_socket { create setopt bind write read getopt };
+allow system_server system_server:netlink_generic_socket { create setopt bind write read getopt getattr };
+allow system_server system_server:netlink_scsitransport_socket { create setopt bind write read getopt getattr };
+allow system_server system_server:netlink_rdma_socket { create setopt bind write read getopt getattr };
+allow system_server system_server:netlink_crypto_socket { create setopt bind write read getopt getattr };
+
+#Fix android.atrace.cts.AtraceHostTest#testTracingContent
+allow system_server debugfs_tracing:file { rw_file_perms };
+
+allow system_server storage_stub_file:dir rw_dir_perms;
+allow system_server storage_stub_file:file rw_file_perms;
+allow system_server devicemanager_service:service_manager { find add };
+allow system_server gpu_device:dir { search };
+allow system_server platform_app:file { write };
+allow system_server system_app:file { write };
+allow system_server priv_app:file { write };
+allow system_server audioserver:file { write };
+allow system_server untrusted_app:file { write };
+allow system_server bluetooth:file rw_file_perms;
+allow system_server radio:file write;
+allow system_server isolated_app:file write;
+set_prop(system_server,wifi_log_prop)
+set_prop(system_server,media_prop)
+set_prop(system_server,drm_prop)
+set_prop(system_server,ctsgts_prop)
+get_prop(system_server,ctsgts_prop)
diff --git a/sepolicy/tee-supplicant.te b/sepolicy/tee-supplicant.te
new file mode 100644
index 0000000..3bebfe7
--- /dev/null
+++ b/sepolicy/tee-supplicant.te
@@ -0,0 +1,3 @@
+type tee-supplicant, domain;
+type tee-supplicant_exec, exec_type, file_type;
+init_daemon_domain(tee-supplicant)
diff --git a/sepolicy/toolbox.te b/sepolicy/toolbox.te
new file mode 100644
index 0000000..371e4e6
--- /dev/null
+++ b/sepolicy/toolbox.te
@@ -0,0 +1 @@
+allow toolbox zram_device:blk_file { open read write getattr };
diff --git a/sepolicy/ueventd.te b/sepolicy/ueventd.te
new file mode 100644
index 0000000..19c3ad9
--- /dev/null
+++ b/sepolicy/ueventd.te
@@ -0,0 +1,9 @@
+allow ueventd sysfs_hdmi:file rw_file_perms;
+allow ueventd kmsg_device:chr_file rw_file_perms;
+allow ueventd device:chr_file relabelfrom;
+allow ueventd usb_device:chr_file relabelfrom;
+allow ueventd usb_device:chr_file { relabelfrom relabelto };
+allow ueventd device:chr_file relabelto;
+allow ueventd usb_device:chr_file relabelfrom;
+allow ueventd storage_device:chr_file { relabelfrom relabelto };
+
diff --git a/sepolicy/uncrypt.te b/sepolicy/uncrypt.te
new file mode 100644
index 0000000..f63422e
--- /dev/null
+++ b/sepolicy/uncrypt.te
@@ -0,0 +1,6 @@
+allow uncrypt media_rw_data_file:dir { getattr search};
+allow uncrypt media_rw_data_file:file r_file_perms;
+
+allow uncrypt storage_file:dir { getattr rw_dir_perms };
+allow uncrypt storage_file:file { getattr rw_file_perms };
+allow uncrypt kmsg_device:chr_file { write open };
diff --git a/sepolicy/untrusted_app.te b/sepolicy/untrusted_app.te
new file mode 100644
index 0000000..bd0fd63
--- /dev/null
+++ b/sepolicy/untrusted_app.te
@@ -0,0 +1,17 @@
+allow untrusted_app surfaceflinger:fifo_file rw_file_perms;
+allow untrusted_app gpu_device:chr_file rw_file_perms;
+allow untrusted_app app_data_file:dir { search };
+
+allow untrusted_app storage_stub_file:dir { getattr };
+allow untrusted_app unlabeled:filesystem { getattr };
+allow untrusted_app unlabeled:dir rw_dir_perms;
+allow untrusted_app unlabeled:file rw_file_perms;
+allow untrusted_app devicemanager_service:service_manager { find };
+allow untrusted_app sysfs_zram:dir { search };
+allow untrusted_app gpu_device:dir { search };
+allow untrusted_app dm_device:blk_file { getattr };
+allow untrusted_app block_device:dir { getattr };
+
+allow untrusted_app { domain -init -kernel}:dir { getattr search };
+allow untrusted_app { domain -init -kernel}:file { read getattr open };
+get_prop(untrusted_app,ctsgts_prop)
diff --git a/sepolicy/vold.te b/sepolicy/vold.te
new file mode 100755
index 0000000..2f8da73
--- /dev/null
+++ b/sepolicy/vold.te
@@ -0,0 +1,22 @@
+
+domain_auto_trans(vold, ntfs3g_exec, ntfs3g);
+
+allow vold unlabeled:file rw_file_perms;
+allow vold kernel:system module_request;
+allow vold rootfs:file { execute execute_no_trans };
+allow vold dm_device:blk_file rw_file_perms;
+allow vold system_prop:property_service set;
+allow vold self:capability { setuid setgid };
+allow vold fuse_device:chr_file getattr;
+allow vold proc:file rw_file_perms;
+allow vold usb_device:dir r_dir_perms;
+allow vold usb_device:chr_file rw_file_perms;
+allow vold metadata_file:dir rw_dir_perms;
+allow vold metadata_file:file create_file_perms;
+allow vold zram_device:blk_file { open read write getattr };
+
+allow vold ntfs3g_exec:file { execute execute_no_trans r_file_perms };
+allow vold unlabeled:filesystem { unmount };
+allow vold block_device:blk_file { getattr };
+allow vold unlabeled:dir { mounton write };
+allow vold mnt_media_rw_stub_file:dir { search };
diff --git a/sepolicy/wfd.te b/sepolicy/wfd.te
new file mode 100644
index 0000000..c4747c5
--- /dev/null
+++ b/sepolicy/wfd.te
@@ -0,0 +1,5 @@
+type wfd, domain, domain_deprecated;
+type wfd_exec, exec_type, file_type;
+
+init_daemon_domain(wfd)
+
diff --git a/sepolicy/wpa.te b/sepolicy/wpa.te
new file mode 100644
index 0000000..5144613
--- /dev/null
+++ b/sepolicy/wpa.te
@@ -0,0 +1,6 @@
+# map with latest kernel security/selinux/include/classmap.h
+allow wpa wpa:netlink_netfilter_socket { create setopt bind write read getopt };
+allow wpa wpa:netlink_generic_socket { create setopt bind write read getopt getattr };
+allow wpa wpa:netlink_scsitransport_socket { create setopt bind write read getopt getattr };
+allow wpa wpa:netlink_rdma_socket { create setopt bind write read getopt getattr };
+allow wpa wpa:netlink_crypto_socket { create setopt bind write read getopt getattr };
diff --git a/sepolicy/zygote.te b/sepolicy/zygote.te
new file mode 100644
index 0000000..70eb890
--- /dev/null
+++ b/sepolicy/zygote.te
@@ -0,0 +1,7 @@
+allow zygote camdata_file:dir r_dir_perms;
+allow zygote camdata_file:file r_file_perms;
+allow zygote debugfs_tracing:file rw_file_perms;
+
+set_prop(zygote, media_prop)
+set_prop(zygote, drm_prop)
+set_prop(zygote, graphic_prop)
diff --git a/system.prop b/system.prop
new file mode 100644
index 0000000..3f4e435
--- /dev/null
+++ b/system.prop
@@ -0,0 +1,50 @@
+#
+# system.prop
+#
+
+#rild.libpath=/system/lib/libreference-ril.so
+#rild.libargs=-d /dev/ttyUSB2
+# Default ecclist
+ro.ril.ecclist=112,911
+ro.opengles.version = 131072
+wifi.interface=wlan0
+rild.libpath=/system/lib/libril-rk29-dataonly.so
+rild.libargs=-d /dev/ttyACM0
+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=2073600
+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=false
+wifi.interface=wlan0
+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
+ro.kernel.android.checkjni=0
+#set default lcd density to Rockchip tablet
+ro.sf.lcd_density=160
+ro.adb.secure =0
+#force camera API 1
+camera2.portability.force_api=1
+#set wifi contry code
+ro.boot.wificountrycode=CN
diff --git a/tv/overlay/frameworks/base/core/res/res/anim/atv_fade_in_bottom.xml b/tv/overlay/frameworks/base/core/res/res/anim/atv_fade_in_bottom.xml
new file mode 100644
index 0000000..10b8840
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/anim/atv_fade_in_bottom.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<alpha xmlns:android="http://schemas.android.com/apk/res/android"
+ android:zAdjustment="normal"
+ android:interpolator="@android:interpolator/decelerate_quad"
+ android:fromAlpha="1.0"
+ android:toAlpha="1.0"
+ android:duration="@android:integer/config_mediumAnimTime" />
diff --git a/tv/overlay/frameworks/base/core/res/res/anim/atv_fade_in_top.xml b/tv/overlay/frameworks/base/core/res/res/anim/atv_fade_in_top.xml
new file mode 100644
index 0000000..f414dbd
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/anim/atv_fade_in_top.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<alpha xmlns:android="http://schemas.android.com/apk/res/android"
+ android:zAdjustment="top"
+ android:interpolator="@android:interpolator/decelerate_quad"
+ android:fromAlpha="0.0"
+ android:toAlpha="1.0"
+ android:duration="@android:integer/config_mediumAnimTime" />
diff --git a/tv/overlay/frameworks/base/core/res/res/anim/atv_fade_out_bottom.xml b/tv/overlay/frameworks/base/core/res/res/anim/atv_fade_out_bottom.xml
new file mode 100644
index 0000000..4a0d201
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/anim/atv_fade_out_bottom.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<alpha xmlns:android="http://schemas.android.com/apk/res/android"
+ android:zAdjustment="normal"
+ android:interpolator="@android:interpolator/accelerate_quad"
+ android:fromAlpha="1.0"
+ android:toAlpha="1.0"
+ android:duration="@android:integer/config_mediumAnimTime" />
diff --git a/tv/overlay/frameworks/base/core/res/res/anim/atv_fade_out_top.xml b/tv/overlay/frameworks/base/core/res/res/anim/atv_fade_out_top.xml
new file mode 100644
index 0000000..d0a733f
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/anim/atv_fade_out_top.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<alpha xmlns:android="http://schemas.android.com/apk/res/android"
+ android:zAdjustment="top"
+ android:interpolator="@android:interpolator/accelerate_quad"
+ android:fromAlpha="1.0"
+ android:toAlpha="0.0"
+ android:duration="@android:integer/config_mediumAnimTime" />
diff --git a/tv/overlay/frameworks/base/core/res/res/anim/atv_wallpaper_enter.xml b/tv/overlay/frameworks/base/core/res/res/anim/atv_wallpaper_enter.xml
new file mode 100644
index 0000000..b29104e
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/anim/atv_wallpaper_enter.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*\
+** Copyright 2009, 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.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@interpolator/decelerate_quad">
+ <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
+ android:duration="@android:integer/config_mediumAnimTime" />
+</set> \ No newline at end of file
diff --git a/tv/overlay/frameworks/base/core/res/res/anim/atv_wallpaper_exit.xml b/tv/overlay/frameworks/base/core/res/res/anim/atv_wallpaper_exit.xml
new file mode 100644
index 0000000..fb6a252
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/anim/atv_wallpaper_exit.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, 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.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@interpolator/accelerate_quad">
+ <alpha android:fromAlpha="1.0" android:toAlpha="0.0"
+ android:duration="@android:integer/config_mediumAnimTime"/>
+</set> \ No newline at end of file
diff --git a/tv/overlay/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.png b/tv/overlay/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.png
new file mode 100644
index 0000000..8ed1509
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.png
Binary files differ
diff --git a/tv/overlay/frameworks/base/core/res/res/drawable/progress_volume.xml b/tv/overlay/frameworks/base/core/res/res/drawable/progress_volume.xml
new file mode 100644
index 0000000..cdf3308
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/drawable/progress_volume.xml
@@ -0,0 +1,41 @@
+<?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.
+-->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:id="@android:id/background">
+ <shape>
+ <solid android:color="#44ffffff" />
+ </shape>
+ </item>
+
+ <item android:id="@android:id/secondaryProgress">
+ <clip>
+ <shape>
+ <solid android:color="#44ffffff" />
+ </shape>
+ </clip>
+ </item>
+
+ <item android:id="@android:id/progress">
+ <clip>
+ <shape>
+ <solid android:color="#ff33b5e5" />
+ </shape>
+ </clip>
+ </item>
+
+</layer-list>
diff --git a/tv/overlay/frameworks/base/core/res/res/layout/volume_adjust.xml b/tv/overlay/frameworks/base/core/res/res/layout/volume_adjust.xml
new file mode 100644
index 0000000..be73a70
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/layout/volume_adjust.xml
@@ -0,0 +1,49 @@
+<?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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/visible_panel"
+ android:layout_width="480dp"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ <LinearLayout
+ android:id="@+id/slider_group"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical" />
+
+ <ImageView
+ android:id="@+id/expand_button_divider"
+ android:layout_width="wrap_content"
+ android:layout_height="32dp"
+ android:layout_gravity="top"
+ android:layout_marginBottom="16dp"
+ android:layout_marginTop="16dp"
+ android:scaleType="fitXY"
+ android:src="?attr/dividerVertical" />
+
+ <ImageView
+ android:id="@+id/expand_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top"
+ android:background="?attr/selectableItemBackground"
+ android:padding="16dp"
+ android:src="@drawable/ic_sysbar_quicksettings" />
+
+</LinearLayout>
diff --git a/tv/overlay/frameworks/base/core/res/res/layout/volume_adjust_item.xml b/tv/overlay/frameworks/base/core/res/res/layout/volume_adjust_item.xml
new file mode 100644
index 0000000..484d449
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/layout/volume_adjust_item.xml
@@ -0,0 +1,44 @@
+<?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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="80dp"
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="8dp"
+ android:gravity="left|center_vertical"
+ android:orientation="horizontal" >
+
+ <ImageView
+ android:id="@+id/stream_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="?attr/selectableItemBackground"
+ android:padding="16dp" />
+
+ <SeekBar
+ android:id="@+id/seekbar"
+ style="?android:attr/seekBarStyle"
+ android:layout_width="0dp"
+ android:layout_height="48dp"
+ android:layout_marginRight="16dp"
+ android:layout_weight="1"
+ android:background="@android:color/transparent"
+ android:padding="16dp"
+ android:progressDrawable="@android:drawable/progress_volume"
+ android:thumb="@null" />
+
+</LinearLayout>
diff --git a/tv/overlay/frameworks/base/core/res/res/values-sw600dp/config.xml b/tv/overlay/frameworks/base/core/res/res/values-sw600dp/config.xml
new file mode 100644
index 0000000..9700154
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/values-sw600dp/config.xml
@@ -0,0 +1,20 @@
+<?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>
+ <!-- see comment in values/config.xml -->
+ <integer name="config_longPressOnHomeBehavior">1</integer>
+</resources>
diff --git a/tv/overlay/frameworks/base/core/res/res/values-television/config.xml b/tv/overlay/frameworks/base/core/res/res/values-television/config.xml
new file mode 100644
index 0000000..8e72a91
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/values-television/config.xml
@@ -0,0 +1,20 @@
+<?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>
+ <!-- Default bounds [left top right bottom] on screen for picture-in-picture windows. -->
+ <string translatable="false" name="config_defaultPictureInPictureBounds">"662 54 1142 324"</string>
+</resources>
diff --git a/tv/overlay/frameworks/base/core/res/res/values/config.xml b/tv/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..1674cc1
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,63 @@
+<?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>
+ <!-- Flag indicating that the media framework should support playing of sounds on volume
+ key usage. This adds noticeable additional overhead to volume key processing, so
+ is disableable for products for which it is irrelevant. -->
+ <bool name="config_useVolumeKeySounds">false</bool>
+
+ <!-- Disable AUDIO_BECOMING_NOISY notifications. -->
+ <bool name="config_sendAudioBecomingNoisy">false</bool>
+
+ <!-- This device is data-only. -->
+ <bool name="config_voice_capable">false</bool>
+
+ <!-- This device does not allow sms service. -->
+ <bool name="config_sms_capable">false</bool>
+
+ <!-- Control the default UI mode type to use when there is no other type override
+ happening. One of the following values (See Configuration.java):
+ 1 UI_MODE_TYPE_NORMAL
+ 4 UI_MODE_TYPE_TELEVISION
+ 5 UI_MODE_TYPE_APPLIANCE
+ Any other values will have surprising consequences. -->
+ <integer name="config_defaultUiModeType">1</integer>
+
+ <!-- Control the behavior when the user long presses the home button.
+ 0 - Nothing
+ 1 - Recent apps view in SystemUI
+ 2 - Launch assist intent
+ This needs to match the constants in
+ policy/src/com/android/internal/policy/impl/PhoneWindowManager.java-->
+ <integer name="config_longPressOnHomeBehavior">1</integer>
+
+ <!-- Override configuration check for dpad so that we always appear to have one -->
+ <bool name="config_hasPermanentDpad">true</bool>
+
+ <bool name="config_defaultInTouchMode">true</bool>
+
+ <!-- Launcher customization requires AppWidgetService, but otherwise
+ home screen widgets are not supported on TV -->
+ <bool name="config_enableAppWidgetService">true</bool>
+
+ <!-- Package of the unbundled tv remote service which can connect to tv remote provider -->
+ <string translatable="false" name="config_tvRemoteServicePackage">com.google.android.tv.remote.service</string>
+
+ <!-- True if WallpaperService is enabled -->
+ <bool name="config_enableWallpaperService">true</bool>
+
+</resources>
diff --git a/tv/overlay/frameworks/base/core/res/res/values/styles.xml b/tv/overlay/frameworks/base/core/res/res/values/styles.xml
new file mode 100644
index 0000000..23d480e
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/values/styles.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2006 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>
+
+ <!-- Standard animations for wallpapers. -->
+ <style name="Animation.Wallpaper">
+ <item name="windowEnterAnimation">@anim/atv_wallpaper_enter</item>
+ <item name="windowExitAnimation">@anim/atv_wallpaper_exit</item>
+ </style>
+
+ <!-- Standard animations for a full-screen window or activity. -->
+ <style name="Animation.Activity">
+ <item name="activityOpenEnterAnimation">@anim/atv_fade_in_top</item>
+ <item name="activityOpenExitAnimation">@anim/atv_fade_in_bottom</item>
+ <item name="activityCloseEnterAnimation">@anim/atv_fade_out_bottom</item>
+ <item name="activityCloseExitAnimation">@anim/atv_fade_out_top</item>
+
+ <item name="taskOpenEnterAnimation">@anim/atv_fade_in_top</item>
+ <item name="taskOpenExitAnimation">@anim/atv_fade_in_bottom</item>
+ <item name="taskCloseEnterAnimation">@anim/atv_fade_out_bottom</item>
+ <item name="taskCloseExitAnimation">@anim/atv_fade_out_top</item>
+
+ <item name="taskToFrontEnterAnimation">@anim/atv_fade_in_top</item>
+ <item name="taskToFrontExitAnimation">@anim/atv_fade_in_bottom</item>
+ <item name="taskToBackEnterAnimation">@anim/atv_fade_out_bottom</item>
+ <item name="taskToBackExitAnimation">@anim/atv_fade_out_top</item>
+
+ <item name="wallpaperOpenEnterAnimation">@anim/atv_fade_out_bottom</item>
+ <item name="wallpaperOpenExitAnimation">@anim/atv_fade_out_top</item>
+ <item name="wallpaperCloseEnterAnimation">@anim/atv_fade_in_top</item>
+ <item name="wallpaperCloseExitAnimation">@anim/atv_fade_in_bottom</item>
+
+ <item name="wallpaperIntraOpenEnterAnimation">@anim/atv_fade_in_top</item>
+ <item name="wallpaperIntraOpenExitAnimation">@anim/atv_fade_in_bottom</item>
+ <item name="wallpaperIntraCloseEnterAnimation">@anim/atv_fade_out_bottom</item>
+ <item name="wallpaperIntraCloseExitAnimation">@anim/atv_fade_out_top</item>
+ </style>
+
+</resources>
diff --git a/tv/overlay/frameworks/base/core/res/res/xml/global_keys.xml b/tv/overlay/frameworks/base/core/res/res/xml/global_keys.xml
new file mode 100644
index 0000000..f6142dc
--- /dev/null
+++ b/tv/overlay/frameworks/base/core/res/res/xml/global_keys.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- Mapping of keycodes to components which will be handled globally.
+ Modify this file to add global keys.
+ The key will NOT go to the foreground application and instead only ever be sent via targeted
+ broadcast to the specified component. The action of the intent will be
+ android.intent.action.GLOBAL_BUTTON and the KeyEvent will be included in the intent as
+ android.intent.extra.KEY_EVENT.
+-->
+
+<global_keys version="1">
+ <!-- Example format: id = keycode to handle globally. component = component which will handle
+ this key. -->
+ <key keyCode="KEYCODE_GUIDE" component="com.google.android.tv/.receiver.GlobalKeyReceiver" />
+ <key keyCode="KEYCODE_TV" component="com.google.android.tv/.receiver.GlobalKeyReceiver" />
+ <key keyCode="KEYCODE_TV_INPUT" component="com.google.android.tv/.receiver.GlobalKeyReceiver" />
+
+ <!-- OEMs might want to add more custom global key handlings for TV specific key codes. -->
+</global_keys>
diff --git a/tv/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/tv/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
new file mode 100644
index 0000000..40021f7
--- /dev/null
+++ b/tv/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -0,0 +1,34 @@
+<?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">false</bool>
+
+ <!-- Disable the lockscreen -->
+ <bool name="def_lockscreen_disabled">true</bool>
+
+ <!-- No setup wizard -->
+ <bool name="def_device_provisioned">true</bool>
+
+ <!-- Keep screen on at all times by default -->
+ <bool name="def_stay_on_while_plugged_in">true</bool>
+
+ <!-- Do not give up on DHCP -->
+ <integer name="def_max_dhcp_retries">0</integer>
+
+</resources>
diff --git a/tv/permissions/tv_core_hardware.xml b/tv/permissions/tv_core_hardware.xml
new file mode 100644
index 0000000..4b9eee6
--- /dev/null
+++ b/tv/permissions/tv_core_hardware.xml
@@ -0,0 +1,36 @@
+<?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.
+-->
+
+<permissions>
+
+ <!-- These are the hardware components that all television devices must
+ include. Devices with optional hardware must also include extra hardware
+ files.
+ -->
+ <feature name="android.hardware.audio.output" />
+ <feature name="android.hardware.location" />
+ <feature name="android.hardware.location.network" />
+ <feature name="android.hardware.screen.landscape" />
+ <feature name="android.hardware.type.television" />
+
+ <feature name="android.software.backup" />
+ <!--feature name="android.software.leanback" /-->
+ <feature name="android.software.leanback_only" />
+ <feature name="android.software.live_tv" />
+ <feature name="android.software.picture_in_picture" />
+ <feature name="android.software.voice_recognizers" />
+
+</permissions>
diff --git a/tv/tv_base.mk b/tv/tv_base.mk
new file mode 100644
index 0000000..e0e4074
--- /dev/null
+++ b/tv/tv_base.mk
@@ -0,0 +1,116 @@
+#
+# 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.
+#
+
+PRODUCT_PACKAGES := \
+ Settings
+# TvProvider \
+# TvSettings \
+# tv_input.default
+
+PRODUCT_COPY_FILES := \
+ device/rockchip/common/tv/permissions/tv_core_hardware.xml:system/etc/permissions/tv_core_hardware.xml
+
+DEVICE_PACKAGE_OVERLAYS := \
+ device/rockchip/common/tv/overlay
+
+# From build/target/product/core_base.mk
+PRODUCT_PACKAGES += \
+ ContactsProvider \
+ DefaultContainerService \
+ UserDictionaryProvider \
+ libaudiopreprocessing \
+ libfilterpack_imageproc \
+ libgabi++ \
+ libkeystore \
+ libstagefright_soft_aacdec \
+ libstagefright_soft_aacenc \
+ libstagefright_soft_amrdec \
+ libstagefright_soft_amrnbenc \
+ libstagefright_soft_amrwbenc \
+ libstagefright_soft_avcdec \
+ libstagefright_soft_avcenc \
+ libstagefright_soft_flacenc \
+ libstagefright_soft_g711dec \
+ libstagefright_soft_gsmdec \
+ libstagefright_soft_hevcdec \
+ libstagefright_soft_mp3dec \
+ libstagefright_soft_mpeg2dec \
+ libstagefright_soft_mpeg4dec \
+ libstagefright_soft_mpeg4enc \
+ libstagefright_soft_opusdec \
+ libstagefright_soft_rawdec \
+ libstagefright_soft_vorbisdec \
+ libstagefright_soft_vpxdec \
+ libstagefright_soft_vpxenc \
+ mdnsd \
+ requestsync
+
+# From build/target/product/core.mk
+PRODUCT_PACKAGES += \
+ BasicDreams \
+ Browser \
+ CalendarProvider \
+ ExactCalculator \
+ CaptivePortalLogin \
+ CertInstaller \
+ ExternalStorageProvider \
+ FusedLocation \
+ InputDevices \
+ KeyChain \
+ LatinIME \
+ PicoTts \
+ PacProcessor \
+ PrintSpooler \
+ ProxyHandler \
+ SharedStorageBackup \
+ VpnDialogs \
+ com.android.media.tv.remoteprovider \
+ com.android.media.tv.remoteprovider.xml
+
+# From build/target/product/generic_no_telephony.mk
+PRODUCT_PACKAGES += \
+ Bluetooth \
+ SystemUI \
+ librs_jni \
+ audio.primary.default \
+ audio_policy.default \
+ clatd \
+ clatd.conf \
+ local_time.default \
+ screenrecord \
+ Camera2 \
+ Provision
+
+PRODUCT_COPY_FILES += \
+ frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf
+
+# Enable frame-exact AV sync
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.sys.media.avsync=true
+
+$(call inherit-product-if-exists, frameworks/base/data/sounds/AllAudio.mk)
+$(call inherit-product-if-exists, external/svox/pico/lang/all_pico_languages.mk)
+$(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk)
+$(call inherit-product-if-exists, external/google-fonts/dancing-script/fonts.mk)
+$(call inherit-product-if-exists, external/google-fonts/carrois-gothic-sc/fonts.mk)
+$(call inherit-product-if-exists, external/google-fonts/coming-soon/fonts.mk)
+$(call inherit-product-if-exists, external/google-fonts/cutive-mono/fonts.mk)
+$(call inherit-product-if-exists, external/noto-fonts/fonts.mk)
+$(call inherit-product-if-exists, external/roboto-fonts/fonts.mk)
+$(call inherit-product-if-exists, external/hyphenation-patterns/patterns.mk)
+$(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
+$(call inherit-product-if-exists, frameworks/webview/chromium/chromium.mk)
+$(call inherit-product-if-exists, $(SRC_TARGET_DIR)/product/core_minimal.mk)
diff --git a/ueventd.rockchip.rc b/ueventd.rockchip.rc
new file mode 100755
index 0000000..e6418dc
--- /dev/null
+++ b/ueventd.rockchip.rc
@@ -0,0 +1,267 @@
+#for sensors
+/dev/mma8452_daemon 0660 system system
+/dev/akm8975_dev 0660 system system
+/dev/akm8975_aot 0660 system system
+/dev/akm8963_dev 0660 system system
+/dev/akm_dev 0660 system system
+/dev/gyrosensor 0660 system system
+/dev/angle 0660 system system
+/dev/accel 0660 system system
+/dev/compass 0660 system system
+/dev/lightsensor 0660 system system
+/dev/psensor 0660 system system
+/dev/temperature 0660 system system
+/dev/pressure 0660 system system
+
+/dev/ion 0666 system system
+/dev/galcore 0666 system graphics
+/dev/video0 0660 media camera
+/dev/video1 0660 media camera
+/dev/video2 0660 media camera
+/dev/video3 0660 media camera
+/dev/pmem_cam 0660 system camera
+/dev/vpu 0660 system system
+/dev/vpu_service 0666 media media
+/dev/vpu-service 0666 media media
+/dev/hevc_service 0666 media media
+/dev/hevc-service 0666 media media
+/dev/rkvdec 0666 media media
+/dev/vpu_mem 0666 system system
+/dev/rk29-ipp 0666 system system
+/dev/rga 0666 system system
+/dev/video_state 0666 system system
+/dev/sys_state 0660 system system
+/dev/mirroring 0664 media media
+/dev/iep 0666 media media
+/dev/vepu 0666 system system
+/dev/h265e 0666 system system
+/dev/avsd 0666 system system
+
+# for Sensor HAL
+/dev/akm8973 0660 system system
+/dev/accelerometer 0660 system system
+
+# for mpu gyroscope
+/dev/mpu 0660 system system
+/dev/mpuirq 0660 system system
+/dev/timerirq 0660 system system
+/dev/accelirq 0660 system system
+/dev/compassirq 0660 system system
+
+#for GPS u-blox
+/dev/ttyS4 0666 gps gps
+
+# for GPS
+#/dev/ttyS3 0600 gps gps
+/dev/gps 0660 gps gps
+
+# for BT
+/dev/vflash 0660 bluetooth net_bt_stack
+/dev/ttyS0 0660 bluetooth net_bt_stack
+/dev/ttyS1 0660 bluetooth net_bt_stack
+#/dev/ttyS2 0660 bluetooth net_bt_stack
+/dev/rtk_btusb 0660 bluetooth net_bt_stack
+
+# for radio
+/dev/ttyUSB0 0660 radio radio
+/dev/ttyUSB1 0660 radio radio
+/dev/ttyUSB2 0660 radio radio
+/dev/ttyUSB3 0660 radio radio
+/dev/ttyUSB4 0660 radio radio
+/dev/ttyUSB5 0660 radio radio
+/dev/ttyUSB6 0660 radio radio
+/dev/ttyUSB7 0660 radio radio
+/dev/ttyUSB8 0660 radio radio
+/dev/ttyUSB9 0660 radio radio
+
+# for mali-t764
+/dev/mali0 0666 system system
+
+# for mali
+/dev/mali 0666 system graphics
+/dev/ump 0666 system system
+
+# for sgx
+/dev/pvrsrvkm 0666 system system
+/dev/pvr_sync 0666 system system
+
+/dev/sw_sync 0666 system system
+
+#for DRM
+/dev/rknand_sys_storage 0660 system system
+
+# for Camera
+/dev/camsys_marvin 0664 media camera
+/dev/camsys_marvin1 0664 media camera
+
+#for ddr freq
+/dev/ddr_freq 0664 system graphics
+
+#for hdmi cec
+/dev/cec 0666 system system
+#sofia
+/dev/dcc 0666 system system
+/dev/pmem_gfx 0666 system system
+/dev/mvpipe-vpu 0660 media graphics
+/dev/mvpipe-oec_dat 0660 media media
+/dev/vpu-enc 0600 media media
+/dev/vpu-dec 0660 media graphics
+/dev/mem 0600 media media
+/dev/ttyBT0 0660 bluetooth bluetooth
+/dev/ttyGNSS0 0600 gps gps
+/dev/radio0 0660 audio audio
+/dev/tadi 0660 system trace
+/dev/voemcrypto 0660 media media
+/dev/tee_rpc 0666 system system
+
+#for invensence mpu
+/dev/iio:device* 0660 system system
+
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* key 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* buffer/enable 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* buffer/length 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* power_state 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* scan_elements/in_timestamp_en 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* name 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* trigger/current_trigger 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* dmp_firmware 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* firmware_loaded 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* dmp_on 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* dmp_int_on 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* dmp_event_int_on 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* dmp_output_rate 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* tap_on 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* self_test 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* temperature 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* gyro_enable 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* sampling_frequency 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* gyro_matrix 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* scan_elements/in_anglvel_x_en 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* scan_elements/in_anglvel_y_en 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* scan_elements/in_anglvel_z_en 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* in_anglvel_scale 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* accl_enable 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* sampling_frequency 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* accl_matrix 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* in_accel_scale 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* accl_bias 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* in_accel_x_offset 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* in_accel_y_offset 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* in_accel_z_offset 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* scan_elements/in_accel_x_en 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* scan_elements/in_accel_y_en 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* scan_elements/in_accel_z_en 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* quaternion_on 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* scan_elements/in_quaternion_r_en 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* scan_elements/in_quaternion_x_en 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* scan_elements/in_quaternion_y_en 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* scan_elements/in_quaternion_z_en 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* display_orientation_on 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* event_display_orientation 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* event_smd 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* smd_enable 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* smd_delay_threshold 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* smd_delay_threshold2 0660 system system
+/sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/iio:device* smd_threshold 0660 system system
+
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* key 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* buffer/enable 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* buffer/length 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* power_state 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* scan_elements/in_timestamp_en 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* name 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* trigger/current_trigger 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* dmp_firmware 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* firmware_loaded 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* dmp_on 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* dmp_int_on 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* dmp_event_int_on 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* dmp_output_rate 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* tap_on 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* self_test 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* temperature 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* gyro_enable 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* sampling_frequency 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* gyro_matrix 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* scan_elements/in_anglvel_x_en 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* scan_elements/in_anglvel_y_en 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* scan_elements/in_anglvel_z_en 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* in_anglvel_scale 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* accl_enable 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* sampling_frequency 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* accl_matrix 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* in_accel_scale 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* accl_bias 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* in_accel_x_offset 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* in_accel_y_offset 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* in_accel_z_offset 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* scan_elements/in_accel_x_en 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* scan_elements/in_accel_y_en 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* scan_elements/in_accel_z_en 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* quaternion_on 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* scan_elements/in_quaternion_r_en 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* scan_elements/in_quaternion_x_en 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* scan_elements/in_quaternion_y_en 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* scan_elements/in_quaternion_z_en 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* display_orientation_on 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* event_display_orientation 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* event_smd 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* smd_enable 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* smd_delay_threshold 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* smd_delay_threshold2 0660 system system
+/sys/devices/platform/ff1d0000.spi/spi_master/spi32766/spi32766.0/iio:device* smd_threshold 0660 system system
+
+# for nanoc mpu sensor
+/dev/iio:device* 0660 system system
+/sys/devices/platform/mpu6500_hid/trigger* name 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* accl_bias 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* accl_enable 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* accl_matrix 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* buffer/length 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* buffer/enable 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* compass_enable 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* compass_matrix 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* dmp_event_int_on 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* dmp_firmware 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* dmp_int_on 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* dmp_on 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* dmp_output_rate 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* event_display_orientation 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* firmware_loaded 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* gyro_enable 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* gyro_matrix 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* in_accel_scale 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* in_anglvel_scale 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* in_magn_scale 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* key 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* power_state 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* quaternion_on 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* sampling_frequency 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_accel_x_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_accel_y_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_accel_z_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_anglvel_x_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_anglvel_y_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_anglvel_z_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_magn_x_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_magn_y_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_magn_z_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_quaternion_r_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_quaternion_x_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_quaternion_y_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_quaternion_z_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* scan_elements/in_timestamp_en 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* self_test 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* tap_on 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* temperature 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* sync 0660 system system
+/sys/devices/platform/mpu6500_hid/iio:device* trigger/current_trigger 0660 system system
+
+#for frp function
+/dev/block/platform/fe330000.sdhci/by-name/frp 0660 system system
+
+/dev/cpu_state 0666 system system
+/dev/chip_state 0666 system system
+/dev/i2c-1 0660 system system
+#for ovr
+/dev/ovr0 0664 system system
diff --git a/whtest.sh b/whtest.sh
new file mode 100755
index 0000000..bebddc8
--- /dev/null
+++ b/whtest.sh
@@ -0,0 +1,10 @@
+#!/system/bin/sh
+
+mount -o rw,remount -t ext3 /dev/block/mtdblock8 /system
+
+#sleep 2
+
+echo "*******************************"
+echo "wh do begin"
+echo "*******************************"
+rm system/app/*.nm
diff --git a/wifi_bt_build.sh b/wifi_bt_build.sh
new file mode 100755
index 0000000..50cfa82
--- /dev/null
+++ b/wifi_bt_build.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+source ../../../build/envsetup.sh
+
+croot
+
+echo "---- make installclean ----"
+make installclean
+
+echo "---- mmm ----"
+mmm external/bluetooth/bluedroid/ -B -j4
+mmm external/bluetooth_bplus/bluedroid/ -B -j4
+mmm external/broadcom/ -B -j4
+mmm device/common/bluetooth/libbt/ -B -j4
+mmm device/common/bluetooth/libbt_beken/ -B -j4
+mmm device/common/bluetooth/libbt_rda/ -B -j4
+mmm device/common/bluetooth/libbt_rtk/ -B -j4
+mmm device/common/bluetooth/libbt_rtk8723bs/ -B -j4
+mmm device/common/bluetooth/libbt_rtk_usb/ -B -j4
+mmm hardware/libhardware_legacy/ -B -j4
+mmm hardware/realtek/wlan/ -B -j4
+mmm hardware/mediatek/ -B -j4
+mmm hardware/broadcom/wlan/bcmdhd/ -B -j4
+mmm hardware/esp/wlan/ -B -j4
+mmm system/netd/ -B -j4
+#mmm frameworks/base/core/jni/ -B -j4
+#mmm frameworks/base/core/res -B -j4
+#mmm frameworks/base/ -B -j4
+mmm packages/apps/Bluetooth -B -j4
+mmm packages/apps/Bluetooth_bplus/ -B -j4
+
+echo "---- make -j4 ----"
+make -j4
+
+mmm external/wpa_supplicant_8/ -B -j4
diff --git a/wifi_bt_common.mk b/wifi_bt_common.mk
new file mode 100644
index 0000000..2ae4636
--- /dev/null
+++ b/wifi_bt_common.mk
@@ -0,0 +1,42 @@
+
+ifneq ($(strip $(TARGET_BOARD_PLATFORM)), sofia3gr)
+BOARD_CONNECTIVITY_VENDOR := Broadcom
+BOARD_CONNECTIVITY_MODULE := ap6xxx
+endif
+
+ifeq ($(strip $(BOARD_CONNECTIVITY_VENDOR)), Broadcom)
+BOARD_WPA_SUPPLICANT_DRIVER := NL80211
+WPA_SUPPLICANT_VERSION := VER_0_8_X
+BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
+BOARD_HOSTAPD_DRIVER := NL80211
+BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
+BOARD_WLAN_DEVICE := bcmdhd
+WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path"
+WIFI_DRIVER_FW_PATH_STA := "/system/etc/firmware/fw_bcm4329.bin"
+WIFI_DRIVER_FW_PATH_P2P := "/system/etc/firmware/fw_bcm4329_p2p.bin"
+WIFI_DRIVER_FW_PATH_AP := "/system/etc/firmware/fw_bcm4329_apsta.bin"
+endif
+
+# bluetooth support
+ifeq ($(strip $(BOARD_CONNECTIVITY_VENDOR)), Broadcom)
+BOARD_HAVE_BLUETOOTH := true
+BOARD_HAVE_BLUETOOTH_BCM := true
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/rockchip/$(TARGET_BOARD_PLATFORM)/bluetooth
+
+ifeq ($(strip $(PRODUCT_BUILD_MODULE)), px5car)
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/rockchip/px5/bluetooth
+endif
+
+ifeq ($(strip $(PRODUCT_BUILD_MODULE)), px3car)
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/rockchip/px3/bluetooth
+endif
+
+ifeq ($(strip $(BOARD_CONNECTIVITY_MODULE)), ap6xxx_gps)
+BLUETOOTH_USE_BPLUS := true
+BLUETOOTH_ENABLE_FM := false
+endif
+endif
+
+# BOARD_HAVE_BLUETOOTH_RTK := true
+# BOARD_HAVE_BLUETOOTH_RTK_COEX := true
+