Skip to content

Commit

Permalink
X01BD: Update for Pie
Browse files Browse the repository at this point in the history
Change-Id: Ie91f483eb4b7fea29eb6a68657d654b3459e6ced
  • Loading branch information
justks committed Jul 11, 2019
1 parent 9a9b53b commit 67a651f
Show file tree
Hide file tree
Showing 32 changed files with 1,396 additions and 535 deletions.
4 changes: 3 additions & 1 deletion BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ TARGET_BOARD_PLATFORM := sdm660
TARGET_BOARD_PLATFORM_GPU := qcom-adreno512

# Crypto
TW_INCLUDE_CRYPTO := true
TARGET_HW_DISK_ENCRYPTION := true
TARGET_CRYPTFS_HW_PATH := vendor/qcom/opensource/commonsys/cryptfs_hw

Expand Down Expand Up @@ -74,11 +75,12 @@ TARGET_RECOVERY_QCOM_RTC_FIX := true
TW_BRIGHTNESS_PATH := /sys/class/leds/lcd-backlight/brightness
TW_EXCLUDE_DEFAULT_USB_INIT := true
TW_EXTRA_LANGUAGES := true
TW_INCLUDE_CRYPTO := true
TW_INCLUDE_NTFS_3G := true
TW_IGNORE_MISC_WIPE_DATA := true
TW_INPUT_BLACKLIST := "hbtp_vm"
TW_SCREEN_BLANK_ON_BOOT := true
TW_USE_TOOLBOX := true
TWRP_INCLUDE_LOGCAT := true
TARGET_USES_LOGD := true

TARGET_SYSTEM_PROP := device/asus/X01BD/system.prop
6 changes: 5 additions & 1 deletion omni_X01BD.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ TARGET_VENDOR_DEVICE_NAME := X01BD

PRODUCT_PROPERTY_OVERRIDES += \
ro.hardware.keystore=sdm660 \
ro.hardware.gatekeeper=sdm660 \
sys.usb.controller=a800000.dwc3 \
sys.usb.rndis.func.name=rndis_bam \
sys.usb.rmnet.func.name=rmnet_bam

PRODUCT_BUILD_PROP_OVERRIDES += TARGET_DEVICE=X01BD PRODUCT_NAME=X01BD
PRODUCT_BUILD_PROP_OVERRIDES += \
PRIVATE_BUILD_DESC="sdm660_64-user 9 PKQ1 1162 release-keys"

BUILD_FINGERPRINT := asus/WW_X01BD/ASUS_X01BD_1:9/PKQ1/16.2017.1905.065-20190507:user/release-keys
39 changes: 22 additions & 17 deletions recovery.fstab
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@
# 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

# mount point fstype device flags
/boot emmc /dev/block/bootdevice/by-name/boot
/cache ext4 /dev/block/bootdevice/by-name/cache
/data ext4 /dev/block/bootdevice/by-name/userdata flags=encryptable=footer
/misc emmc /dev/block/bootdevice/by-name/misc
/persist ext4 /dev/block/bootdevice/by-name/persist flags=display="Persist";backup=1
/recovery emmc /dev/block/bootdevice/by-name/recovery flags=backup=1
/system ext4 /dev/block/bootdevice/by-name/system
/system_image emmc /dev/block/bootdevice/by-name/system
/vendor ext4 /dev/block/bootdevice/by-name/vendor flags=backup=1;wipeingui
/vendor_image emmc /dev/block/bootdevice/by-name/vendor flags=backup=1
/efs1 emmc /dev/block/bootdevice/by-name/modemst1 flags=backup=1;display=EFS
/efs2 emmc /dev/block/bootdevice/by-name/modemst2 flags=backup=1;subpartitionof=/efs1
/efsg emmc /dev/block/bootdevice/by-name/fsg flags=backup=1;subpartitionof=/efs1
/efsc emmc /dev/block/bootdevice/by-name/fsc flags=backup=1;subpartitionof=/efs1
# mount point fstype device device2 flags
/boot emmc /dev/block/bootdevice/by-name/boot
/cache ext4 /dev/block/bootdevice/by-name/cache
/data ext4 /dev/block/bootdevice/by-name/userdata flags=encryptable=footer
/recovery emmc /dev/block/bootdevice/by-name/recovery flags=backup=1
/system ext4 /dev/block/bootdevice/by-name/system
/system_image emmc /dev/block/bootdevice/by-name/system
/vendor ext4 /dev/block/bootdevice/by-name/vendor flags=display="Vendor";backup=1;wipeingui
/vendor_image emmc /dev/block/bootdevice/by-name/vendor
/firmware vfat /dev/block/bootdevice/by-name/modem flags=display="Firmware";mounttodecrypt;fsflags=ro
/misc emmc /dev/block/bootdevice/by-name/misc
/modem emmc /dev/block/bootdevice/by-name/modem flags=backup=1;display="Modem"
/bluetooth emmc /dev/block/bootdevice/by-name/bluetooth flags=backup=1;subpartitionof=/modem
/dsp emmc /dev/block/bootdevice/by-name/dsp flags=backup=1;subpartitionof=/modem
/efs1 emmc /dev/block/bootdevice/by-name/modemst1 flags=backup=1;display=EFS
/efs2 emmc /dev/block/bootdevice/by-name/modemst2 flags=backup=1;subpartitionof=/efs1
/efsc emmc /dev/block/bootdevice/by-name/fsc flags=backup=1;subpartitionof=/efs1
/efsg emmc /dev/block/bootdevice/by-name/fsg flags=backup=1;subpartitionof=/efs1
/persist ext4 /dev/block/bootdevice/by-name/persist flags=display="Persist";

# Removable storage
/usb_otg vfat /dev/block/sda1 /dev/block/sda flags=fsflags=utf8;display="USB-OTG";storage;wipeingui;removable
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=fsflags=utf8;display="SD-Card";storage;wipeingui;removable
/usb_otg vfat /dev/block/sda1 /dev/block/sda flags=fsflags=utf8;display="USB-OTG";storage;wipeingui;removable
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=fsflags=utf8;display="SDcard";storage;wipeingui;removable

21 changes: 21 additions & 0 deletions recovery/root/fstab.qcom
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Android fstab file.
# 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

#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.

# Non-A/B fstab.qcom variant
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# Huaiqn modify by liunianliang for non-A/B system, 2018/12/10 begin
# /dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,verify
# Huaiqn modify by liunianliang for non-A/B system, 2018/12/10 end
/dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard,noatime,lazytime wait,check,forceencrypt=footer,quota,reservedsize=128M
/devices/soc/c084000.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
/dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait
/devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,barrier=1 wait
/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait
73 changes: 24 additions & 49 deletions recovery/root/init.recovery.qcom.rc
Original file line number Diff line number Diff line change
@@ -1,60 +1,26 @@
# Copyright (c) 2009-2012, 2014-2015, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
on early-init
mkdir /firmware 0771 system system

on fs
wait /dev/block/platform/soc/${ro.boot.bootdevice}
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
on init
chmod 0660 /dev/qseecom
chown system drmrpc /dev/qseecom
chmod 0664 /dev/ion
chown system system /dev/ion
install_keyring

# Needed to make qseecomd work in recovery
chmod 0777 /dev/qseecom
chmod 0664 /dev/ion
chown system system /dev/ion

setprop crypto.ready 0
on fs
wait /dev/block/platform/soc/${ro.boot.bootdevice}
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
install_keyring
mount vfat /dev/block/bootdevice/by-name/modem /firmware ro shortname=lower uid=1000 gid=1000 dmask=227 fmask=337
setprop crypto.ready 1

# Separate copy needed to use /sbin/linker64 instead of /system/bin/linker64
# separate copy needed to use /sbin/linker64 instead of /system/bin/linker64
service sbinqseecomd /sbin/qseecomd
user root
group root
disabled
seclabel u:r:recovery:s0

service prepdecrypt /sbin/prepdecrypt.sh
oneshot
disabled
user root
group root
seclabel u:r:recovery:s0

service hwservicemanager /sbin/hwservicemanager
user root
group root
Expand All @@ -75,8 +41,7 @@ service keystore_auth /sbin/keystore_auth
disabled
seclabel u:r:recovery:s0

# keystore is started and stopped on demand by TWRP
service keystore /sbin/keystore /tmp/misc/keystore
service keystore /sbin/keystore /data/misc/keystore
user root
group root drmrpc readproc
disabled
Expand All @@ -94,19 +59,29 @@ service keymaster-3-0 /sbin/[email protected]
disabled
seclabel u:r:recovery:s0

on init
on boot
# Workaround for adb not coming up
setprop sys.usb.config mtp,adb
setprop sys.usb.config adb
start hwservicemanager
start prepdecrypt

# Double tap to wake
chown system system /proc/tpd_gesture
chmod 644 /proc/tpd_gesture
write /proc/tpd_gesture 1

on property:crypto.ready=0
stop sbinqseecomd
stop keymaster-3-0
stop gatekeeper-1-0
stop hwservicemanager
stop keystore
stop servicemanager

on property:crypto.ready=1
start sbinqseecomd

on property:vendor.sys.listeners.registered=true
start hwservicemanager
start keymaster-3-0
start gatekeeper-1-0
start servicemanager
27 changes: 27 additions & 0 deletions recovery/root/init.recovery.usb.rc
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

on init
write /sys/class/android_usb/android0/f_midi/vendorID 18D1

Expand Down
Binary file added recovery/root/sbin/[email protected]
Binary file not shown.
Binary file added recovery/root/sbin/[email protected]
Binary file not shown.
Binary file added recovery/root/sbin/[email protected]
Binary file not shown.
Binary file added recovery/root/sbin/[email protected]
Binary file not shown.
Binary file added recovery/root/sbin/[email protected]
Binary file not shown.
Binary file added recovery/root/sbin/[email protected]
Binary file not shown.
Binary file added recovery/root/sbin/libicuuc.so
Binary file not shown.
File renamed without changes.
Binary file added recovery/root/sbin/libxml2.so
Binary file not shown.
15 changes: 0 additions & 15 deletions recovery/root/sbin/prepdecrypt.sh

This file was deleted.

Binary file modified recovery/root/sbin/qseecomd
Binary file not shown.
Loading

0 comments on commit 67a651f

Please sign in to comment.