diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..b3c5253 --- /dev/null +++ b/Android.mk @@ -0,0 +1,21 @@ +# +# Copyright (C) 2017 OpenKirin, OldDroid +# +# 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. +# + +ifeq ($(TARGET_DEVICE), hi6250) + +include $(call all-makefiles-under, $(call my-dir)) + +endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..cda2482 --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2017 OpenKirin, OldDroid +# +# 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)/omni_hi6250.mk \ No newline at end of file diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..16dd4be --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,69 @@ +# +# Copyright (C) 2017 OpenKirin, OldDroid +# +# 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 := device/honor/berlin + +# Platform +TARGET_BOARD_PLATFORM := hi6250 + +# Bootloader +TARGET_BOOTLOADER_BOARD_NAME := hi6250 +TARGET_NO_BOOTLOADER := true + +# Architecture +TARGET_ARCH := arm64 +TARGET_ARCH_VARIANT := armv8-a +TARGET_CPU_ABI := arm64-v8a +TARGET_CPU_ABI2 := +TARGET_CPU_VARIANT := generic + +TARGET_2ND_ARCH := arm +TARGET_2ND_ARCH_VARIANT := armv7-a-neon +TARGET_2ND_CPU_ABI := armeabi-v7a +TARGET_2ND_CPU_ABI2 := armeabi +TARGET_2ND_CPU_VARIANT := cortex-a15 + +TARGET_CPU_SMP := true +ARCH_ARM_HAVE_TLS_REGISTER := true + +# Kernel +BOARD_KERNEL_BASE := 0x00478000 +BOARD_KERNEL_PAGESIZE := 2048 +BOARD_KERNEL_CMDLINE := loglevel=4 coherent_pool=512K page_tracker=on slub_min_objects=12 androidboot.selinux=permissive +BOARD_MKBOOTIMG_ARGS := --kernel_offset 0x00008000 --ramdisk_offset 0x07b88000 --tags_offset 0x07588000 +TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel + +# Partitions +TARGET_USERIMAGES_USE_EXT4 := true +TARGET_USERIMAGES_USE_F2FS := true +BOARD_BOOTIMAGE_PARTITION_SIZE := 33554432 +BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864 +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3758096384 +BOARD_USERDATAIMAGE_PARTITION_SIZE := 25983713280 +BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456 +BOARD_FLASH_BLOCK_SIZE := 131072 + +# TWRP +RECOVERY_VARIANT := twrp +TW_THEME := portrait_hdpi + +BOARD_SUPPRESS_SECURE_ERASE := true +RECOVERY_SDCARD_ON_DATA := true +RECOVERY_GRAPHICS_USE_LINELENGTH := true +TARGET_RECOVERY_PIXEL_FORMAT := BGRA_8888 +TW_BRIGHTNESS_PATH := /sys/class/leds/lcd_backlight0/brightness +TW_CUSTOM_BATTERY_PATH := /sys/class/power_supply/Battery +TW_EXCLUDE_SUPERSU := true \ No newline at end of file diff --git a/kernel b/kernel new file mode 100644 index 0000000..b6250d8 Binary files /dev/null and b/kernel differ diff --git a/omni_hi6250.mk b/omni_hi6250.mk new file mode 100644 index 0000000..bd35d4c --- /dev/null +++ b/omni_hi6250.mk @@ -0,0 +1,49 @@ +# +# Copyright (C) 2017 OpenKirin, OldDroid +# +# 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. +# + +## Specify phone tech before including full_phone +$(call inherit-product, vendor/omni/config/gsm.mk) + +# Inherit from the common Open Source product configuration +$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) + +# Inherit some common Omni stuff. +$(call inherit-product, vendor/omni/config/common.mk) + +PRODUCT_COPY_FILES += \ + bionic/libc/zoneinfo/tzdata:root/system/usr/share/zoneinfo/tzdata + +PRODUCT_PACKAGES += \ + charger_res_images \ + charger + +ADDITIONAL_DEFAULT_PROPERTIES += \ + ro.secure=0 \ + ro.adb.secure=0 \ + security.perf_harden=0 \ + ro.allow.mock.location=1 + +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ + sys.usb.configfs=1 \ + sys.usb.config=mtp,adb \ + persist.sys.usb.config=manufacture,adb \ + sys.usb.controller=hisi-usb-otg + +PRODUCT_NAME := omni_hi6250 +PRODUCT_DEVICE := hi6250 +PRODUCT_BRAND := Huawei +PRODUCT_MODEL := HUAWEI-P9-LITE +PRODUCT_MANUFACTURER := HUAWEI diff --git a/recovery.fstab b/recovery.fstab new file mode 100644 index 0000000..fbf0bbc --- /dev/null +++ b/recovery.fstab @@ -0,0 +1,13 @@ +/boot emmc /dev/block/bootdevice/by-name/boot +/recovery emmc /dev/block/bootdevice/by-name/recovery +/cache ext4 /dev/block/bootdevice/by-name/cache +/cust emmc /dev/block/bootdevice/by-name/cust flags=display="Cust";backup=1;wipeingui +/misc emmc /dev/block/bootdevice/by-name/misc flags=display="Misc";backup=0 +/oeminfo emmc /dev/block/bootdevice/by-name/oeminfo flags=display="OEMinfo";backup=1 +/data f2fs /dev/block/dm-0 +/system ext4 /dev/block/bootdevice/by-name/system +/vendor ext4 /dev/block/bootdevice/by-name/vendor flags=display="Vendor";backup=1;wipeingui +/product ext4 /dev/block/bootdevice/by-name/product flags=display="Product";backup=1;wipeingui +/version emmc /dev/block/bootdevice/by-name/version flags=display="Version";backup=1;wipeingui +/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="MicroSD Card";storage;wipeingui;removable +/usbotg auto /dev/block/sda1 /dev/block/sda flags=display="USB OTG";storage;removable;backup=0 diff --git a/recovery/root/fstab.hi6250 b/recovery/root/fstab.hi6250 new file mode 100644 index 0000000..44e61f1 --- /dev/null +++ b/recovery/root/fstab.hi6250 @@ -0,0 +1,18 @@ +# 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 +/dev/block/bootdevice/by-name/system /system ext4:squashfs ro,barrier=1 wait,verify +/dev/block/bootdevice/by-name/vendor /vendor ext4:squashfs ro,barrier=1 wait,verify +/dev/block/bootdevice/by-name/product /product ext4:squashfs ro,barrier=1 wait,verify +/dev/block/bootdevice/by-name/version /version ext4:squashfs ro,barrier=1 wait,verify +/dev/block/bootdevice/by-name/cust /cust ext4:squashfs ro,barrier=1 wait,verify +/dev/block/bootdevice/by-name/patch /patch_hw ext4 ro wait,verify +/devices/hi_mci.1/mmc_host/mmc1/* auto auto defaults voldmanaged=sdcard:auto,noemulatedsd +/devices/platform/hi_mci.1/mmc_host/mmc1/* auto auto defaults voldmanaged=sdcard:auto,noemulatedsd +/devices/hisi-usb-otg/usb1/* auto auto defaults voldmanaged=usbotg:auto +/dev/block/bootdevice/by-name/userdata /data f2fs nosuid,nodev,noatime,discard,inline_data,inline_xattr wait,forceencrypt=footer,check +/dev/block/bootdevice/by-name/cache /cache ext4 rw,nosuid,nodev,noatime,data=ordered wait,check +/dev/block/bootdevice/by-name/splash2 /splash2 ext4 rw,nosuid,nodev,noatime,data=ordered,context=u:object_r:splash2_data_file:s0 wait,check +/dev/block/bootdevice/by-name/secure_storage /sec_storage ext4 rw,nosuid,nodev,noatime,discard,auto_da_alloc,mblk_io_submit,data=journal,context=u:object_r:teecd_data_file:s0 wait,check +/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults \ No newline at end of file diff --git a/recovery/root/init.rc b/recovery/root/init.rc new file mode 100644 index 0000000..0867a0d --- /dev/null +++ b/recovery/root/init.rc @@ -0,0 +1,127 @@ +import /init.recovery.logd.rc +import /init.recovery.usb.rc +import /init.recovery.service.rc +import /init.recovery.vold_decrypt.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 + + # Set the security context of /postinstall if present. + restorecon /postinstall + + start ueventd + start healthd + +service set_permissive /sbin/permissive.sh + oneshot + seclabel u:r:recovery:s0 + +on init + export PATH /sbin:/system/bin + export LD_LIBRARY_PATH .:/sbin + + export ANDROID_ROOT /system + export ANDROID_DATA /data + export EXTERNAL_STORAGE /sdcard + + mkdir /boot + mkdir /recovery + mkdir /system + 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 + write /proc/sys/vm/max_map_count 1000000 + +on fs + mount pstore pstore /sys/fs/pstore + + 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 + +on boot + ifup lo + hostname localhost + domainname localdomain + + class_start default + +# Load properties, pre-Android 6.0 +on load_all_props_action + load_all_props + +# Load properties, Android 6.0+ +on load_system_props_action + load_system_props + +# Load properties, Android 6.0+, vendor init lives here +on load_persist_props_action + load_persist_props + +on firmware_mounts_complete + rm /dev/.booting + +# Mount filesystems and start core system services. +on late-init + trigger early-fs + trigger fs + trigger post-fs + trigger post-fs-data + + # Load properties, pre-Android 6.0 + trigger load_all_props_action + + # 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_system_props_action + + # Load properties, Android 6.0+, vendor init lives here + trigger load_persist_props_action + + # Remove a file to wake up anything waiting for firmware + trigger firmware_mounts_complete + +on property:init.svc.volisnotd=stopped + 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 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 1 + #start adbd + setprop service.adb.root 1 + +# 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/root/init.recovery.hi6250.rc b/recovery/root/init.recovery.hi6250.rc new file mode 100644 index 0000000..ca422ce --- /dev/null +++ b/recovery/root/init.recovery.hi6250.rc @@ -0,0 +1,38 @@ +import /init.recovery.hi6250.usb.rc + +on init + symlink /dev/block/platform/hi_mci.0 /dev/block/bootdevice + +on property:ro.board.platform=hi6250 + start teecd + +on fs + start volisnotd + +service teecd /sbin/teecd + user root + group root + disabled + seclabel u:r:tee:s0 + +service volisnotd /sbin/volisnotd -m + oneshot + user root + group root + disabled + seclabel u:r:tee:s0 + +on property:vold.decrypt=trigger_shutdown_framework + class_reset server + +on property:vold.decrypt=trigger_load_persist_props + load_persist_props + +on property:vold.decrypt=trigger_post_fs_data + trigger post-fs-data + +on post-fs-data + trigger post-fs-data_hw + +on post-fs-data_hw + setprop vold.post_fs_data_done 1 diff --git a/recovery/root/init.recovery.hi6250.usb.rc b/recovery/root/init.recovery.hi6250.usb.rc new file mode 100644 index 0000000..4ef5f4c --- /dev/null +++ b/recovery/root/init.recovery.hi6250.usb.rc @@ -0,0 +1,569 @@ +on init && property:sys.usb.configfs=1 + mount configfs none /config + mkdir /config/usb_gadget/g1 + write /config/usb_gadget/g1/bcdDevice 0x0299 + mkdir /config/usb_gadget/g1/strings/0x409 + write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno} + mkdir /config/usb_gadget/g1/configs/b.1 + write /config/usb_gadget/g1/configs/b.1/MaxPower 0x1f4 + write /config/usb_gadget/g1/configs/b.1/bmAttributes 0xc0 + mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 + mkdir /config/usb_gadget/g1/functions/ffs.adb + mkdir /config/usb_gadget/g1/functions/ffs.hdb + mkdir /config/usb_gadget/g1/functions/mtp.gs0 + mkdir /config/usb_gadget/g1/functions/ptp.gs1 + mkdir /config/usb_gadget/g1/functions/accessory.gs2 + mkdir /config/usb_gadget/g1/functions/audio_source.gs3 + mkdir /config/usb_gadget/g1/functions/rndis.gs4 + mkdir /config/usb_gadget/g1/functions/midi.gs5 + mkdir /config/usb_gadget/g1/functions/mass_storage.gs6 + mkdir /config/usb_gadget/g1/functions/ncm.gs7 + write /config/usb_gadget/g1/functions/ncm.gs7/host_addr ${ro.serialno} + write /config/usb_gadget/g1/functions/ncm.gs7/qmult 64 + mkdir /config/usb_gadget/g1/functions/balong_acm.a_at + mkdir /config/usb_gadget/g1/functions/balong_acm.acm_3g_diag + mkdir /config/usb_gadget/g1/functions/balong_acm.acm_a_shell + mkdir /config/usb_gadget/g1/functions/balong_acm.acm_c_shell + mkdir /config/usb_gadget/g1/functions/balong_acm.acm_ctrl + mkdir /config/usb_gadget/g1/functions/balong_acm.acm_4g_diag + mkdir /config/usb_gadget/g1/functions/balong_acm.acm_gps + mkdir /config/usb_gadget/g1/functions/balong_acm.acm_cdma_log + mkdir /config/usb_gadget/g1/functions/balong_acm.acm_skytone + mkdir /config/usb_gadget/g1/functions/balong_acm.acm_modem + mkdir /config/usb_gadget/g1/functions/hw_acm.hw_acm_modem + mkdir /config/usb_gadget/g1/functions/hw_acm.hw_acm_PCUI + mkdir /config/usb_gadget/g1/functions/hw_acm.hw_acm_DIAG + write /config/usb_gadget/g1/os_desc/use 1 + write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1 + write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100" + symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 + + chown system system /sys/class/android_usb/android0/f_rndis/ethaddr + chmod 0660 /sys/class/android_usb/android0/f_rndis/ethaddr + chown system system /sys/class/android_usb/android0/switch_request + chmod 0664 /sys/class/android_usb/android0/switch_request + + 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 + mkdir /dev/usb-ffs/hdb 0770 shell shell + mount functionfs hdb /dev/usb-ffs/hdb uid=2000,gid=2000 + +on post-fs-data && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer} + write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model} + +on charger-config-usb_gadget && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer} + write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model} + +on property:sys.usb.config=none && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + stop hdbd + setprop sys.usb.ffs.ready 0 + setprop sys.usb.ffs_hdb.ready 0 + write /config/usb_gadget/g1/bDeviceClass 0 + write /config/usb_gadget/g1/bDeviceSubClass 0 + write /config/usb_gadget/g1/bDeviceProtocol 0 + write /sys/devices/virtual/android_usb/android0/port_mode 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x103A + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 + write /sys/devices/virtual/android_usb/android0/port_mode 2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 + write /sys/devices/virtual/android_usb/android0/port_mode 3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_adb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1 + symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + write /sys/devices/virtual/android_usb/android0/port_mode 4 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_hdb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start hdbd + +on property:sys.usb.ffs_hdb.ready=1 && property:sys.usb.config=mtp,hdb && property:sys.usb.configfs=1 + symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.hdb /config/usb_gadget/g1/configs/b.1/f2 + write /sys/devices/virtual/android_usb/android0/port_mode 25 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,adb,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_adb_hdb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start adbd + start hdbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.ffs_hdb.ready=1 && property:sys.usb.config=mtp,adb,hdb && property:sys.usb.configfs=1 + symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.hdb /config/usb_gadget/g1/configs/b.1/f3 + write /sys/devices/virtual/android_usb/android0/port_mode 26 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file ${ro.cust.cdrom} + symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f2 + write /sys/devices/virtual/android_usb/android0/port_mode 5 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp_adb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file ${ro.cust.cdrom} + symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 + write /sys/devices/virtual/android_usb/android0/port_mode 6 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp_hdb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start hdbd + +on property:sys.usb.ffs_hdb.ready=1 && property:sys.usb.config=ptp,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file ${ro.cust.cdrom} + symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.hdb /config/usb_gadget/g1/configs/b.1/f3 + write /sys/devices/virtual/android_usb/android0/port_mode 29 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp,adb,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp_adb_hdb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start adbd + start hdbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.ffs_hdb.ready=1 && property:sys.usb.config=ptp,adb,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file ${ro.cust.cdrom} + symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/ffs.hdb /config/usb_gadget/g1/configs/b.1/f4 + + write /sys/devices/virtual/android_usb/android0/port_mode 30 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=manufacture && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + stop hdbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "manufacture" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + symlink /config/usb_gadget/g1/functions/hw_acm.hw_acm_modem /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/hw_acm.hw_acm_PCUI /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/hw_acm.hw_acm_DIAG /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file none + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f4 + write /sys/devices/virtual/android_usb/android0/port_mode 14 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.start_atdiag 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=manufacture,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "manufacture_adb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start adbd + start hdbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.ffs_hdb.ready=1 && property:sys.usb.config=manufacture,adb && property:sys.usb.configfs=1 + symlink /config/usb_gadget/g1/functions/hw_acm.hw_acm_modem /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/hw_acm.hw_acm_PCUI /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/hw_acm.hw_acm_DIAG /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file none + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f5 + symlink /config/usb_gadget/g1/functions/ffs.hdb /config/usb_gadget/g1/configs/b.1/f6 + write /sys/devices/virtual/android_usb/android0/port_mode 14 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.start_atdiag 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=accessory && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory" + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x2d00 + symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1 + write /sys/devices/virtual/android_usb/android0/port_mode 11 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_adb" + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x2d01 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1 + symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + write /sys/devices/virtual/android_usb/android0/port_mode 12 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=audio_source && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "audiosource" + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x2d02 + symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f1 + write /sys/devices/virtual/android_usb/android0/port_mode 21 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "audiosource_adb" + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x2d03 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1 + symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + write /sys/devices/virtual/android_usb/android0/port_mode 22 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_audiosource" + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x2d04 + symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f2 + write /sys/devices/virtual/android_usb/android0/port_mode 23 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_audiosource_adb" + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x2d05 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1 + symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 + write /sys/devices/virtual/android_usb/android0/port_mode 24 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=midi && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi" + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x4ee9 + symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi_adb" + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x4ee9 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=midi,adb && property:sys.usb.configfs=1 + symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x108a + write /sys/class/android_usb/android0/f_rndis/wceis 1 + symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1 + write /sys/devices/virtual/android_usb/android0/port_mode 9 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + write /sys/class/net/rndis0/queues/rx-0/rps_cpus f + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x108a + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + write /sys/devices/virtual/android_usb/android0/port_mode 10 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + write /sys/class/net/rndis0/queues/rx-0/rps_cpus f + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_hdb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x108a + start hdbd + +on property:sys.usb.ffs_hdb.ready=1 && property:sys.usb.config=rndis,hdb && property:sys.usb.configfs=1 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.hdb /config/usb_gadget/g1/configs/b.1/f2 + write /sys/devices/virtual/android_usb/android0/port_mode 27 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + write /sys/class/net/rndis0/queues/rx-0/rps_cpus f + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,adb,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb_hdb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x108a + start adbd + start hdbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.ffs_hdb.ready=1 && property:sys.usb.config=rndis,adb,hdb && property:sys.usb.configfs=1 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.hdb /config/usb_gadget/g1/configs/b.1/f3 + write /sys/devices/virtual/android_usb/android0/port_mode 28 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + write /sys/class/net/rndis0/queues/rx-0/rps_cpus f + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mass_storage && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mass_storage" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file none + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f1 + write /sys/devices/virtual/android_usb/android0/port_mode 7 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mass_storage_adb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file none + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + write /sys/devices/virtual/android_usb/android0/port_mode 8 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mass_storage,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mass_storage_hdb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start hdbd + +on property:sys.usb.ffs_hdb.ready=1 && property:sys.usb.config=mass_storage,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file none + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.hdb /config/usb_gadget/g1/configs/b.1/f2 + write /sys/devices/virtual/android_usb/android0/port_mode 31 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mass_storage,adb,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mass_storage_adb_hdb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start adbd + start hdbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.ffs_hdb.ready=1 && property:sys.usb.config=mass_storage,adb,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file none + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.hdb /config/usb_gadget/g1/configs/b.1/f2 + write /sys/devices/virtual/android_usb/android0/port_mode 32 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=hisuite,mtp,mass_storage && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "hisuite_mtp_mass_storage" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file ${ro.cust.cdrom} + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f2 + write /sys/devices/virtual/android_usb/android0/port_mode 35 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=hisuite,mtp,mass_storage,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "hisuite_mtp_mass_storage_adb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=hisuite,mtp,mass_storage,adb && property:sys.usb.configfs=1 + symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file ${ro.cust.cdrom} + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 + write /sys/devices/virtual/android_usb/android0/port_mode 15 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=hisuite,mtp,mass_storage,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "hisuite_mtp_mass_storage_hdb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start hdbd + +on property:sys.usb.ffs_hdb.ready=1 && property:sys.usb.config=hisuite,mtp,mass_storage,hdb && property:sys.usb.configfs=1 + symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file ${ro.cust.cdrom} + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.hdb /config/usb_gadget/g1/configs/b.1/f3 + write /sys/devices/virtual/android_usb/android0/port_mode 33 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=hisuite,mtp,mass_storage,adb,hdb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "hisuite_mtp_mass_storage_adb_hdb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start adbd + start hdbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.ffs_hdb.ready=1 && property:sys.usb.config=hisuite,mtp,mass_storage,adb,hdb && property:sys.usb.configfs=1 + symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/functions/mass_storage.gs6/lun.0/file ${ro.cust.cdrom} + symlink /config/usb_gadget/g1/functions/mass_storage.gs6 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/ffs.hdb /config/usb_gadget/g1/configs/b.1/f4 + write /sys/devices/virtual/android_usb/android0/port_mode 34 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,serial && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + stop adbd + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_serial" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + write /sys/class/android_usb/android0/f_rndis/wceis 1 + symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/hw_acm.hw_acm_modem /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/hw_acm.hw_acm_PCUI /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/hw_acm.hw_acm_DIAG /config/usb_gadget/g1/configs/b.1/f4 + write /sys/devices/virtual/android_usb/android0/port_mode 36 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.start_atdiag 1 + setprop sys.usb.start_modempcui 0 + write /sys/class/net/rndis0/queues/rx-0/rps_cpus f + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,serial,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_serial_adb" + write /config/usb_gadget/g1/idVendor 0x12d1 + write /config/usb_gadget/g1/idProduct 0x107e + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,serial,adb && property:sys.usb.configfs=1 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/hw_acm.hw_acm_modem /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/hw_acm.hw_acm_PCUI /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/hw_acm.hw_acm_DIAG /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f5 + write /sys/devices/virtual/android_usb/android0/port_mode 37 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.start_atdiag 1 + setprop sys.usb.start_modempcui 0 + write /sys/class/net/rndis0/queues/rx-0/rps_cpus f + setprop sys.usb.state ${sys.usb.config} \ No newline at end of file diff --git a/recovery/root/res/native_packages.xml b/recovery/root/res/native_packages.xml new file mode 100644 index 0000000..9047f06 Binary files /dev/null and b/recovery/root/res/native_packages.xml differ diff --git a/recovery/root/sbin/e2fsck_s b/recovery/root/sbin/e2fsck_s new file mode 100644 index 0000000..9a61ae5 Binary files /dev/null and b/recovery/root/sbin/e2fsck_s differ diff --git a/recovery/root/sbin/fsck.f2fs_s b/recovery/root/sbin/fsck.f2fs_s new file mode 100644 index 0000000..ca8eae1 Binary files /dev/null and b/recovery/root/sbin/fsck.f2fs_s differ diff --git a/recovery/root/sbin/mkfs.f2fs b/recovery/root/sbin/mkfs.f2fs new file mode 100644 index 0000000..a1863c3 Binary files /dev/null and b/recovery/root/sbin/mkfs.f2fs differ diff --git a/recovery/root/sbin/teecd b/recovery/root/sbin/teecd new file mode 100644 index 0000000..700b771 Binary files /dev/null and b/recovery/root/sbin/teecd differ diff --git a/recovery/root/sbin/volisnotd b/recovery/root/sbin/volisnotd new file mode 100644 index 0000000..188ffb3 Binary files /dev/null and b/recovery/root/sbin/volisnotd differ diff --git a/recovery/root/system/bin/fsck.f2fs b/recovery/root/system/bin/fsck.f2fs new file mode 100644 index 0000000..10a7968 Binary files /dev/null and b/recovery/root/system/bin/fsck.f2fs differ diff --git a/recovery/root/system/bin/linker64 b/recovery/root/system/bin/linker64 new file mode 100644 index 0000000..cc91277 Binary files /dev/null and b/recovery/root/system/bin/linker64 differ diff --git a/recovery/root/system/lib64/hw/keystore.default.so b/recovery/root/system/lib64/hw/keystore.default.so new file mode 100644 index 0000000..6401f31 Binary files /dev/null and b/recovery/root/system/lib64/hw/keystore.default.so differ diff --git a/recovery/root/system/lib64/hw/keystore.hi6250.so b/recovery/root/system/lib64/hw/keystore.hi6250.so new file mode 100644 index 0000000..a67b474 Binary files /dev/null and b/recovery/root/system/lib64/hw/keystore.hi6250.so differ diff --git a/recovery/root/system/lib64/libHwedkmgr.so b/recovery/root/system/lib64/libHwedkmgr.so new file mode 100644 index 0000000..e0b2396 Binary files /dev/null and b/recovery/root/system/lib64/libHwedkmgr.so differ diff --git a/recovery/root/system/lib64/libart.so b/recovery/root/system/lib64/libart.so new file mode 100644 index 0000000..55aec60 Binary files /dev/null and b/recovery/root/system/lib64/libart.so differ diff --git a/recovery/root/system/lib64/libbacktrace.so b/recovery/root/system/lib64/libbacktrace.so new file mode 100644 index 0000000..4afed96 Binary files /dev/null and b/recovery/root/system/lib64/libbacktrace.so differ diff --git a/recovery/root/system/lib64/libbase.so b/recovery/root/system/lib64/libbase.so new file mode 100644 index 0000000..f5207f1 Binary files /dev/null and b/recovery/root/system/lib64/libbase.so differ diff --git a/recovery/root/system/lib64/libbinder.so b/recovery/root/system/lib64/libbinder.so new file mode 100644 index 0000000..c2bb23c Binary files /dev/null and b/recovery/root/system/lib64/libbinder.so differ diff --git a/recovery/root/system/lib64/libc++.so b/recovery/root/system/lib64/libc++.so new file mode 100644 index 0000000..7880b38 Binary files /dev/null and b/recovery/root/system/lib64/libc++.so differ diff --git a/recovery/root/system/lib64/libc.so b/recovery/root/system/lib64/libc.so new file mode 100644 index 0000000..f2f1d78 Binary files /dev/null and b/recovery/root/system/lib64/libc.so differ diff --git a/recovery/root/system/lib64/libc_sec_hisi_connectivity.so b/recovery/root/system/lib64/libc_sec_hisi_connectivity.so new file mode 100644 index 0000000..1e52844 Binary files /dev/null and b/recovery/root/system/lib64/libc_sec_hisi_connectivity.so differ diff --git a/recovery/root/system/lib64/libchrlog.so b/recovery/root/system/lib64/libchrlog.so new file mode 100644 index 0000000..819d48e Binary files /dev/null and b/recovery/root/system/lib64/libchrlog.so differ diff --git a/recovery/root/system/lib64/libcrypto.so b/recovery/root/system/lib64/libcrypto.so new file mode 100644 index 0000000..8d0bc86 Binary files /dev/null and b/recovery/root/system/lib64/libcrypto.so differ diff --git a/recovery/root/system/lib64/libcutils.so b/recovery/root/system/lib64/libcutils.so new file mode 100644 index 0000000..b060a59 Binary files /dev/null and b/recovery/root/system/lib64/libcutils.so differ diff --git a/recovery/root/system/lib64/libdiskconfig.so b/recovery/root/system/lib64/libdiskconfig.so new file mode 100644 index 0000000..0304ea3 Binary files /dev/null and b/recovery/root/system/lib64/libdiskconfig.so differ diff --git a/recovery/root/system/lib64/libdl.so b/recovery/root/system/lib64/libdl.so new file mode 100644 index 0000000..c36924b Binary files /dev/null and b/recovery/root/system/lib64/libdl.so differ diff --git a/recovery/root/system/lib64/libext4_utils.so b/recovery/root/system/lib64/libext4_utils.so new file mode 100644 index 0000000..b7f20da Binary files /dev/null and b/recovery/root/system/lib64/libext4_utils.so differ diff --git a/recovery/root/system/lib64/libf2fs_sparseblock.so b/recovery/root/system/lib64/libf2fs_sparseblock.so new file mode 100644 index 0000000..67e95bd Binary files /dev/null and b/recovery/root/system/lib64/libf2fs_sparseblock.so differ diff --git a/recovery/root/system/lib64/libhardware.so b/recovery/root/system/lib64/libhardware.so new file mode 100644 index 0000000..01c82e6 Binary files /dev/null and b/recovery/root/system/lib64/libhardware.so differ diff --git a/recovery/root/system/lib64/libhardware_legacy.so b/recovery/root/system/lib64/libhardware_legacy.so new file mode 100644 index 0000000..8233a50 Binary files /dev/null and b/recovery/root/system/lib64/libhardware_legacy.so differ diff --git a/recovery/root/system/lib64/libhwlog.so b/recovery/root/system/lib64/libhwlog.so new file mode 100644 index 0000000..8f299d6 Binary files /dev/null and b/recovery/root/system/lib64/libhwlog.so differ diff --git a/recovery/root/system/lib64/libkeymaster1.so b/recovery/root/system/lib64/libkeymaster1.so new file mode 100644 index 0000000..ccb5a2f Binary files /dev/null and b/recovery/root/system/lib64/libkeymaster1.so differ diff --git a/recovery/root/system/lib64/libkeymaster_messages.so b/recovery/root/system/lib64/libkeymaster_messages.so new file mode 100644 index 0000000..0a421c4 Binary files /dev/null and b/recovery/root/system/lib64/libkeymaster_messages.so differ diff --git a/recovery/root/system/lib64/libkeystore-engine.so b/recovery/root/system/lib64/libkeystore-engine.so new file mode 100644 index 0000000..33411a9 Binary files /dev/null and b/recovery/root/system/lib64/libkeystore-engine.so differ diff --git a/recovery/root/system/lib64/libkeystore_binder.so b/recovery/root/system/lib64/libkeystore_binder.so new file mode 100644 index 0000000..1b9827b Binary files /dev/null and b/recovery/root/system/lib64/libkeystore_binder.so differ diff --git a/recovery/root/system/lib64/liblog.so b/recovery/root/system/lib64/liblog.so new file mode 100644 index 0000000..f53537d Binary files /dev/null and b/recovery/root/system/lib64/liblog.so differ diff --git a/recovery/root/system/lib64/liblogwrap.so b/recovery/root/system/lib64/liblogwrap.so new file mode 100644 index 0000000..c0849bd Binary files /dev/null and b/recovery/root/system/lib64/liblogwrap.so differ diff --git a/recovery/root/system/lib64/liblz4.so b/recovery/root/system/lib64/liblz4.so new file mode 100644 index 0000000..c5147a5 Binary files /dev/null and b/recovery/root/system/lib64/liblz4.so differ diff --git a/recovery/root/system/lib64/liblzma.so b/recovery/root/system/lib64/liblzma.so new file mode 100644 index 0000000..875c31a Binary files /dev/null and b/recovery/root/system/lib64/liblzma.so differ diff --git a/recovery/root/system/lib64/libm.so b/recovery/root/system/lib64/libm.so new file mode 100644 index 0000000..232ca63 Binary files /dev/null and b/recovery/root/system/lib64/libm.so differ diff --git a/recovery/root/system/lib64/libmini_md5.so b/recovery/root/system/lib64/libmini_md5.so new file mode 100644 index 0000000..bd85e7c Binary files /dev/null and b/recovery/root/system/lib64/libmini_md5.so differ diff --git a/recovery/root/system/lib64/libnativebridge.so b/recovery/root/system/lib64/libnativebridge.so new file mode 100644 index 0000000..1447388 Binary files /dev/null and b/recovery/root/system/lib64/libnativebridge.so differ diff --git a/recovery/root/system/lib64/libnativehelper.so b/recovery/root/system/lib64/libnativehelper.so new file mode 100644 index 0000000..9021afb Binary files /dev/null and b/recovery/root/system/lib64/libnativehelper.so differ diff --git a/recovery/root/system/lib64/libnativeloader.so b/recovery/root/system/lib64/libnativeloader.so new file mode 100644 index 0000000..edc3093 Binary files /dev/null and b/recovery/root/system/lib64/libnativeloader.so differ diff --git a/recovery/root/system/lib64/libnetutils.so b/recovery/root/system/lib64/libnetutils.so new file mode 100644 index 0000000..5176c16 Binary files /dev/null and b/recovery/root/system/lib64/libnetutils.so differ diff --git a/recovery/root/system/lib64/libnl.so b/recovery/root/system/lib64/libnl.so new file mode 100644 index 0000000..84fd323 Binary files /dev/null and b/recovery/root/system/lib64/libnl.so differ diff --git a/recovery/root/system/lib64/libpackagelistparser.so b/recovery/root/system/lib64/libpackagelistparser.so new file mode 100644 index 0000000..0a3252a Binary files /dev/null and b/recovery/root/system/lib64/libpackagelistparser.so differ diff --git a/recovery/root/system/lib64/libpcre.so b/recovery/root/system/lib64/libpcre.so new file mode 100644 index 0000000..6495e8c Binary files /dev/null and b/recovery/root/system/lib64/libpcre.so differ diff --git a/recovery/root/system/lib64/libprotobuf-cpp-lite.so b/recovery/root/system/lib64/libprotobuf-cpp-lite.so new file mode 100644 index 0000000..a86f9a4 Binary files /dev/null and b/recovery/root/system/lib64/libprotobuf-cpp-lite.so differ diff --git a/recovery/root/system/lib64/libselinux.so b/recovery/root/system/lib64/libselinux.so new file mode 100644 index 0000000..74c043f Binary files /dev/null and b/recovery/root/system/lib64/libselinux.so differ diff --git a/recovery/root/system/lib64/libsigchain.so b/recovery/root/system/lib64/libsigchain.so new file mode 100644 index 0000000..14f9308 Binary files /dev/null and b/recovery/root/system/lib64/libsigchain.so differ diff --git a/recovery/root/system/lib64/libsoftkeymaster.so b/recovery/root/system/lib64/libsoftkeymaster.so new file mode 100644 index 0000000..2a4aff6 Binary files /dev/null and b/recovery/root/system/lib64/libsoftkeymaster.so differ diff --git a/recovery/root/system/lib64/libsoftkeymasterdevice.so b/recovery/root/system/lib64/libsoftkeymasterdevice.so new file mode 100644 index 0000000..611baa3 Binary files /dev/null and b/recovery/root/system/lib64/libsoftkeymasterdevice.so differ diff --git a/recovery/root/system/lib64/libsparse.so b/recovery/root/system/lib64/libsparse.so new file mode 100644 index 0000000..28bead4 Binary files /dev/null and b/recovery/root/system/lib64/libsparse.so differ diff --git a/recovery/root/system/lib64/libssl.so b/recovery/root/system/lib64/libssl.so new file mode 100644 index 0000000..47f4652 Binary files /dev/null and b/recovery/root/system/lib64/libssl.so differ diff --git a/recovery/root/system/lib64/libstdc++.so b/recovery/root/system/lib64/libstdc++.so new file mode 100644 index 0000000..6776002 Binary files /dev/null and b/recovery/root/system/lib64/libstdc++.so differ diff --git a/recovery/root/system/lib64/libsysutils.so b/recovery/root/system/lib64/libsysutils.so new file mode 100644 index 0000000..8692ec6 Binary files /dev/null and b/recovery/root/system/lib64/libsysutils.so differ diff --git a/recovery/root/system/lib64/libteec.so b/recovery/root/system/lib64/libteec.so new file mode 100644 index 0000000..0e758f2 Binary files /dev/null and b/recovery/root/system/lib64/libteec.so differ diff --git a/recovery/root/system/lib64/libunwind.so b/recovery/root/system/lib64/libunwind.so new file mode 100644 index 0000000..2437169 Binary files /dev/null and b/recovery/root/system/lib64/libunwind.so differ diff --git a/recovery/root/system/lib64/libutils.so b/recovery/root/system/lib64/libutils.so new file mode 100644 index 0000000..8935a0f Binary files /dev/null and b/recovery/root/system/lib64/libutils.so differ diff --git a/recovery/root/system/lib64/libwifi_wapi_hisi.so b/recovery/root/system/lib64/libwifi_wapi_hisi.so new file mode 100644 index 0000000..a3965d8 Binary files /dev/null and b/recovery/root/system/lib64/libwifi_wapi_hisi.so differ diff --git a/recovery/root/system/lib64/libwpa_client.so b/recovery/root/system/lib64/libwpa_client.so new file mode 100644 index 0000000..d14ca5e Binary files /dev/null and b/recovery/root/system/lib64/libwpa_client.so differ diff --git a/recovery/root/system/lib64/libz.so b/recovery/root/system/lib64/libz.so new file mode 100644 index 0000000..f94854c Binary files /dev/null and b/recovery/root/system/lib64/libz.so differ diff --git a/recovery/root/system/vendor/lib64/libc_secshared.so b/recovery/root/system/vendor/lib64/libc_secshared.so new file mode 100644 index 0000000..2e00fd1 Binary files /dev/null and b/recovery/root/system/vendor/lib64/libc_secshared.so differ diff --git a/recovery/root/system/vendor/lib64/libext2_uuid.so b/recovery/root/system/vendor/lib64/libext2_uuid.so new file mode 100644 index 0000000..d0aa954 Binary files /dev/null and b/recovery/root/system/vendor/lib64/libext2_uuid.so differ diff --git a/recovery/root/system/vendor/lib64/libwifi_wapi_hisi.so b/recovery/root/system/vendor/lib64/libwifi_wapi_hisi.so new file mode 100644 index 0000000..a3965d8 Binary files /dev/null and b/recovery/root/system/vendor/lib64/libwifi_wapi_hisi.so differ diff --git a/vendorsetup.sh b/vendorsetup.sh new file mode 100644 index 0000000..6aa96f5 --- /dev/null +++ b/vendorsetup.sh @@ -0,0 +1 @@ +add_lunch_combo omni_hi6250-userdebug \ No newline at end of file