init zumapro from zuma sha 4daedb8feb4d4

Bug: 272725898
Change-Id: I1e1ab5d15e7f4b2b59e28f2e52e07cd7e12f25b3
This commit is contained in:
Robin Peng 2023-03-28 10:19:48 +00:00
parent 30795fccb8
commit dec234f475
264 changed files with 17032 additions and 0 deletions

84
conf/Android.bp Normal file
View file

@ -0,0 +1,84 @@
/*
* Copyright (C) 2021 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.
*/
// By default this device uses hardware-wrapped keys for storage encryption,
// which is intended to offer increased security over the traditional method
// (software keys). However, hardware-wrapped keys aren't compatible with
// FIPS-140 certification of the encryption hardware, and hence we have to
// disable the use of them in FIPS mode. This requires having two fstab files:
// one for the default mode, and one for FIPS mode selectable via
// androidboot.fstab_suffix on the kernel command line. These fstabs should be
// identical with the exception of the encryption settings, so to keep them in
// sync the rules below generate them from a template file.
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "device_google_zumapro_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["device_google_zumapro_license"],
}
genrule {
name: "gen_fstab.zumapro-hw-encrypt",
srcs: ["fstab.zumapro.in"],
out: ["fstab.zumapro"],
cmd: "sed -e s/@fileencryption@/fileencryption=:aes-256-hctr2:inlinecrypt_optimized+wrappedkey_v0/" +
" -e s/@inlinecrypt@/inlinecrypt/ " +
" -e s/@metadata_encryption@/metadata_encryption=:wrappedkey_v0/ $(in) > $(out)",
}
genrule {
name: "gen_fstab.zumapro-sw-encrypt",
srcs: ["fstab.zumapro.in"],
out: ["fstab.zumapro"],
cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts:aes-256-hctr2/" +
" -e s/@inlinecrypt@// " +
" -e s/@metadata_encryption@/metadata_encryption=/ $(in) > $(out)",
}
genrule {
name: "gen_fstab.zumapro-no-encrypt",
srcs: ["fstab.zumapro.in"],
out: ["fstab.zumapro"],
cmd: "sed -e s/@fileencryption@//" +
" -e s/@inlinecrypt@// " +
" -e s/@metadata_encryption@// $(in) > $(out)",
}
genrule {
name: "gen_fstab.zumapro-fips",
srcs: ["fstab.zumapro.in"],
out: ["fstab.zumapro-fips"],
cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts/" +
" -e s/@inlinecrypt@/inlinecrypt/ " +
" -e s/@metadata_encryption@/metadata_encryption=aes-256-xts/ $(in) > $(out)",
}
prebuilt_etc {
name: "fstab.zumapro",
src: ":gen_fstab.zumapro-hw-encrypt",
vendor: true,
vendor_ramdisk_available: true,
}
prebuilt_etc {
name: "fstab.zumapro-fips",
src: ":gen_fstab.zumapro-fips",
vendor: true,
vendor_ramdisk_available: true,
}

1
conf/egl.cfg Normal file
View file

@ -0,0 +1 @@
0 1 mali

4
conf/fstab.modem Normal file
View file

@ -0,0 +1,4 @@
# Android fstab file.
# <src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# Create the specific fstab file for modem partition as flexibility
/dev/block/platform/13200000.ufs/by-name/modem /mnt/vendor/modem_img ext4 ro,defaults,context=u:object_r:modem_img_file:s0,barrier=1 wait,slotselect

5
conf/fstab.persist Normal file
View file

@ -0,0 +1,5 @@
# Android fstab file.
# <src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# Keep persist in an fstab file, since we need to run fsck on it after abnormal shutdown.
/dev/block/platform/13200000.ufs/by-name/persist /mnt/vendor/persist f2fs noatime,nosuid,nodev,sync wait,check,formattable
/dev/block/platform/13200000.ufs/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,data=journal,commit=1 wait,check,formattable,metadata_csum

4
conf/fstab.postinstall Normal file
View file

@ -0,0 +1,4 @@
# Android fstab file.
#
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
system /postinstall ext4 ro,nosuid,nodev,noexec slotselect_other,logical,avb_keys=/product/etc/security/avb/system_other.avbpubkey

25
conf/fstab.zumapro.in Normal file
View file

@ -0,0 +1,25 @@
# 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
#
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
system /system ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
# During compliance testing, the previous line would fail (because GSI is ext4), and the next line would be used to mount GSI.
system /system ext4 ro,barrier=1 wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
system_dlkm /system_dlkm ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
system_ext /system_ext ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
product /product ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
vendor /vendor ext4 ro wait,slotselect,avb=vbmeta_vendor,logical,first_stage_mount,readahead_size_kb=128
vendor_dlkm /vendor_dlkm ext4 ro wait,slotselect,avb=vbmeta,logical,first_stage_mount
/dev/block/platform/13200000.ufs/by-name/boot /boot emmc defaults slotselect,avb=boot,first_stage_mount
/dev/block/platform/13200000.ufs/by-name/init_boot /init_boot emmc defaults slotselect,avb=init_boot,first_stage_mount
/dev/block/platform/13200000.ufs/by-name/efs /mnt/vendor/efs f2fs noatime,sync wait,check,formattable
/dev/block/platform/13200000.ufs/by-name/efs_backup /mnt/vendor/efs_backup f2fs noatime,sync wait,check,formattable
/dev/block/platform/13200000.ufs/by-name/modem_userdata /mnt/vendor/modem_userdata f2fs noatime,sync wait,check,formattable
/dev/block/platform/13200000.ufs/by-name/misc /misc emmc defaults wait
/dev/block/platform/13200000.ufs/by-name/metadata /metadata f2fs noatime,nosuid,nodev,sync wait,check,formattable,first_stage_mount
#/dev/block/platform/13200000.ufs/by-name/pvmfw /pvmfw emmc defaults wait,slotselect,avb=pvmfw,first_stage_mount
/dev/block/platform/13200000.ufs/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,compress_extension=apk,compress_extension=apex,compress_extension=so,compress_extension=vdex,compress_extension=odex,@inlinecrypt@,atgc,checkpoint_merge,compress_cache latemount,wait,check,quota,formattable,sysfs_path=/dev/sys/block/bootdevice,checkpoint=fs,reservedsize=128M,fscompress,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption,zoned_device
/dev/block/platform/13200000.ufs/by-name/vbmeta /vbmeta emmc defaults slotselect,first_stage_mount
/devices/platform/11210000.usb* auto vfat defaults voldmanaged=usb:auto

55
conf/init.debug.rc Normal file
View file

@ -0,0 +1,55 @@
on early-init
mount debugfs /sys/kernel/debug /sys/kernel/debug
# SJTAG
on init
chown system system /sys/devices/platform/sjtag_ap/interface/access_lvl
chown system system /sys/devices/platform/sjtag_ap/interface/auth
chown system system /sys/devices/platform/sjtag_ap/interface/begin
chown system system /sys/devices/platform/sjtag_ap/interface/dbg_domain
chown system system /sys/devices/platform/sjtag_ap/interface/dbg_itvl
chown system system /sys/devices/platform/sjtag_ap/interface/end
chown system system /sys/devices/platform/sjtag_ap/interface/pubkey
chown system system /sys/devices/platform/sjtag_gsa/interface/access_lvl
chown system system /sys/devices/platform/sjtag_gsa/interface/auth
chown system system /sys/devices/platform/sjtag_gsa/interface/begin
chown system system /sys/devices/platform/sjtag_gsa/interface/dbg_domain
chown system system /sys/devices/platform/sjtag_gsa/interface/dbg_itvl
chown system system /sys/devices/platform/sjtag_gsa/interface/end
chown system system /sys/devices/platform/sjtag_gsa/interface/pubkey
on property:vendor.debug.ramdump.force_crash=true
write /sys/kernel/pixel_debug/trigger "null"
on property:power.battery_input.suspended=true
write /sys/kernel/debug/google_charger/input_suspend 1
on property:power.battery_input.suspended=false
write /sys/kernel/debug/google_charger/input_suspend 0
# Bluetooth
on post-fs-data
chown bluetooth system /dev/logbuffer_btlpm
chown bluetooth system /dev/logbuffer_tty18
# pKVM performance is different on A0 and B0 chips.
# Add extra tag to metrics collected on A0 to separate the results.
on property:ro.revision=PROTO1.0
setprop debug.hypervisor.metrics_tag "hwrev_a0"
on property:ro.revision=PROTO1.1
setprop debug.hypervisor.metrics_tag "hwrev_a0"
on property:ro.revision=EVT1.0
setprop debug.hypervisor.metrics_tag "hwrev_a0"
# A0 chips require pKVM for a hardware issue workaround. Set pKVM to 'enabled'
# in /misc partition on first boot to signal to tests that this device should
# not be booted with pKVM disabled.
service vendor.force_pkvm /vendor/bin/misc_writer --set-enable-pkvm
disabled
oneshot
on property:persist.sys.device_provisioned=1 && property:ro.revision=PROTO1.0
start vendor.force_pkvm
on property:persist.sys.device_provisioned=1 && property:ro.revision=PROTO1.1
start vendor.force_pkvm
on property:persist.sys.device_provisioned=1 && property:ro.revision=EVT1.0
start vendor.force_pkvm

View file

@ -0,0 +1,20 @@
on post-fs
## ensure correct calibration file permissions
chown root system /mnt/vendor/persist/sensorcal.json
chmod 0640 /mnt/vendor/persist/sensorcal.json
start vendor.flash-nanohub-fw
on post-fs-data
mkdir /data/vendor/sensor
chown root system /data/vendor/sensor
chmod 0770 /data/vendor/sensor
service vendor.flash-nanohub-fw /vendor/bin/nanoapp_cmd download
oneshot
disabled
user root
group system
on post-fs-data
mkdir /data/system/nanohub_lock/
restorecon /data/system/nanohub_lock

19
conf/init.factory.rc Normal file
View file

@ -0,0 +1,19 @@
# Factory specific init.rc
on early-init
mount debugfs /sys/kernel/debug /sys/kernel/debug
on init
export PATH /product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin:/vendor/bin/factory
on boot
# FTM log folder
mkdir /data/ftmlog 0775 system system
# Audio test folder
mkdir /data/AudioTest 0775 system system
on property:sys.boot_completed=1
# Bump nnapi min clamp & add adbd to it for factory (b/222226268)
write /proc/vendor_sched/nnapi_uclamp_min 512
exec - root root -- /vendor/bin/factory/factory_post_boot

View file

@ -0,0 +1,69 @@
# Non Persistent Soft Max Freq
on property:vendor.softmaxfreq.cl0=*
write /sys/devices/platform/exynos-acme/freq_qos_max "0 ${vendor.softmaxfreq.cl0}"
on property:vendor.softmaxfreq.cl1=*
write /sys/devices/platform/exynos-acme/freq_qos_max "4 ${vendor.softmaxfreq.cl1}"
on property:vendor.softmaxfreq.cl2=*
write /sys/devices/platform/exynos-acme/freq_qos_max "8 ${vendor.softmaxfreq.cl2}"
on property:vendor.softmaxfreq.bci=*
write /sys/devices/platform/170000a0.devfreq_bci/devfreq/170000a0.devfreq_bci/exynos_data/soft_max_freq "${vendor.softmaxfreq.bci}"
on property:vendor.softmaxfreq.dsu=*
write /sys/devices/platform/17000090.devfreq_dsu/devfreq/17000090.devfreq_dsu/exynos_data/soft_max_freq "${vendor.softmaxfreq.dsu}"
on property:vendor.softmaxfreq.mif=*
write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/soft_max_freq "${vendor.softmaxfreq.mif}"
# Persistent Soft Max Freq overrides
on property:persist.vendor.softmaxfreq.cl0=*
setprop vendor.softmaxfreq.cl0 "${persist.vendor.softmaxfreq.cl0}"
on property:persist.vendor.softmaxfreq.cl1=*
setprop vendor.softmaxfreq.cl1 "${persist.vendor.softmaxfreq.cl1}"
on property:persist.vendor.softmaxfreq.cl2=*
setprop vendor.softmaxfreq.cl2 "${persist.vendor.softmaxfreq.cl2}"
on property:persist.vendor.softmaxfreq.bci=*
setprop vendor.softmaxfreq.bci "${persist.vendor.softmaxfreq.bci}"
on property:persist.vendor.softmaxfreq.dsu=*
setprop vendor.softmaxfreq.dsu "${persist.vendor.softmaxfreq.dsu}"
on property:persist.vendor.softmaxfreq.mif=*
setprop vendor.softmaxfreq.mif "${persist.vendor.softmaxfreq.mif}"
on property:vendor.softmaxfreq.all=*
setprop vendor.softmaxfreq.cl0 "9999999"
setprop vendor.softmaxfreq.cl1 "9999999"
setprop vendor.softmaxfreq.cl2 "9999999"
setprop vendor.softmaxfreq.bci "9999999"
setprop vendor.softmaxfreq.dsu "9999999"
setprop vendor.softmaxfreq.mif "9999999"
on property:vendor.lockfreq.max=*
write /sys/devices/platform/exynos-acme/freq_qos_min "0 9999999"
write /sys/devices/platform/exynos-acme/freq_qos_max "0 9999999"
write /sys/devices/platform/exynos-acme/freq_qos_min "0 9999999"
write /sys/devices/platform/exynos-acme/freq_qos_min "4 9999999"
write /sys/devices/platform/exynos-acme/freq_qos_max "4 9999999"
write /sys/devices/platform/exynos-acme/freq_qos_min "4 9999999"
write /sys/devices/platform/exynos-acme/freq_qos_min "8 9999999"
write /sys/devices/platform/exynos-acme/freq_qos_max "8 9999999"
write /sys/devices/platform/exynos-acme/freq_qos_min "8 9999999"
write /sys/devices/platform/170000a0.devfreq_bci/devfreq/170000a0.devfreq_bci/exynos_data/soft_max_freq "9999999"
write /sys/devices/platform/170000a0.devfreq_bci/devfreq/170000a0.devfreq_bci/exynos_data/debug_scaling_devfreq_min "9999999"
write /sys/devices/platform/170000a0.devfreq_bci/devfreq/170000a0.devfreq_bci/exynos_data/debug_scaling_devfreq_max "9999999"
write /sys/devices/platform/170000a0.devfreq_bci/devfreq/170000a0.devfreq_bci/exynos_data/debug_scaling_devfreq_min "9999999"
write /sys/devices/platform/17000090.devfreq_dsu/devfreq/17000090.devfreq_dsu/exynos_data/soft_max_freq "9999999"
write /sys/devices/platform/17000090.devfreq_dsu/devfreq/17000090.devfreq_dsu/exynos_data/debug_scaling_devfreq_min "9999999"
write /sys/devices/platform/17000090.devfreq_dsu/devfreq/17000090.devfreq_dsu/exynos_data/debug_scaling_devfreq_max "9999999"
write /sys/devices/platform/17000090.devfreq_dsu/devfreq/17000090.devfreq_dsu/exynos_data/debug_scaling_devfreq_min "9999999"
write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/soft_max_freq "9999999"
write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/debug_scaling_devfreq_min "9999999"
write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/debug_scaling_devfreq_max "9999999"
write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/debug_scaling_devfreq_min "9999999"

View file

@ -0,0 +1,16 @@
on init
wait /sys/devices/platform/11210000.usb/11210000.dwc3/driver 10
setprop sys.usb.controller "11210000.dwc3"
setprop sys.usb.configfs 1
on init && property:ro.debuggable=1 && property:ro.boot.mode=recovery
start recovery-console
service recovery-console /system/bin/sh
class core
console
disabled
user root
group root shell log readproc
seclabel u:r:su:s0
setenv HOSTNAME console

1065
conf/init.zumapro.rc Normal file

File diff suppressed because it is too large Load diff

194
conf/init.zumapro.usb.rc Normal file
View file

@ -0,0 +1,194 @@
on early-boot
mkdir /config/usb_gadget/g1
mkdir /config/usb_gadget/g1/strings/0x409
mkdir /config/usb_gadget/g1/configs/b.1
write /config/usb_gadget/g1/idVendor 0x18d1
write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
write /config/usb_gadget/g1/configs/b.1/MaxPower 0x384
write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
# ffs function
mkdir /config/usb_gadget/g1/functions/ffs.adb 0770 shell shell
mkdir /config/usb_gadget/g1/functions/ffs.mtp
mkdir /config/usb_gadget/g1/functions/ffs.ptp
mkdir /dev/usb-ffs 0775 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
mkdir /dev/usb-ffs/mtp 0770 mtp mtp
mkdir /dev/usb-ffs/ptp 0770 mtp mtp
mount functionfs adb /dev/usb-ffs/adb rmode=0770,fmode=0660,uid=2000,gid=2000,no_disconnect=1
mount functionfs mtp /dev/usb-ffs/mtp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
mount functionfs ptp /dev/usb-ffs/ptp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
setprop sys.usb.mtp.device_type 3
setprop sys.usb.mtp.batchcancel true
symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
# mtp function
mkdir /config/usb_gadget/g1/functions/mtp.gs0
# ptp function
mkdir /config/usb_gadget/g1/functions/ptp.gs1
# accessory function
mkdir /config/usb_gadget/g1/functions/accessory.gs2
# audio_source function
mkdir /config/usb_gadget/g1/functions/audio_source.gs3
# rndis function
mkdir /config/usb_gadget/g1/functions/rndis.gs4
# Modify class/subclass/protocol for rndis.gs4
# Remote NDIS: Class: Wireless Controller (0xe0), Subclass: 0x1, Protocol: 0x3
write /config/usb_gadget/g1/functions/rndis.gs4/class e0
write /config/usb_gadget/g1/functions/rndis.gs4/subclass 01
write /config/usb_gadget/g1/functions/rndis.gs4/protocol 03
write /config/usb_gadget/g1/functions/rndis.gs4/os_desc/interface.ncm/compatible_id RNDIS
write /config/usb_gadget/g1/functions/rndis.gs4/ifname rndis%d
setprop vendor.usb.rndis.config rndis.gs4
# midi function
mkdir /config/usb_gadget/g1/functions/midi.gs5
# acm function
mkdir /config/usb_gadget/g1/functions/acm.gs6
# dm function
mkdir /config/usb_gadget/g1/functions/dm.gs7
# uts function
mkdir /config/usb_gadget/g1/functions/uts.gs8
# ncm function
mkdir /config/usb_gadget/g1/functions/ncm.gs9
write /config/usb_gadget/g1/functions/ncm.gs9/os_desc/interface.ncm/compatible_id WINNCM
write /config/usb_gadget/g1/functions/ncm.gs9/ifname ncm%d
# etr_miu function
mkdir /config/usb_gadget/g1/functions/etr_miu.gs11
# acm function for uwb
mkdir /config/usb_gadget/g1/functions/acm.uwb0
# chown file/folder permission
chown system system /config/usb_gadget/
chown system system /config/usb_gadget/g1
chown system system /config/usb_gadget/g1/UDC
chown system system /config/usb_gadget/g1/bDeviceClass
chown system system /config/usb_gadget/g1/bDeviceProtocol
chown system system /config/usb_gadget/g1/bDeviceSubClass
chown system system /config/usb_gadget/g1/bMaxPacketSize0
chown system system /config/usb_gadget/g1/bcdDevice
chown system system /config/usb_gadget/g1/bcdUSB
chown system system /config/usb_gadget/g1/configs
chown system system /config/usb_gadget/g1/configs/b.1
chown system system /config/usb_gadget/g1/configs/b.1/MaxPower
chown system system /config/usb_gadget/g1/configs/b.1/bmAttributes
chown system system /config/usb_gadget/g1/configs/b.1/strings
chown system system /config/usb_gadget/g1/functions
chown system system /config/usb_gadget/g1/functions/accessory.gs2
chown system system /config/usb_gadget/g1/functions/acm.gs6
chown system system /config/usb_gadget/g1/functions/acm.gs6/port_num
chown system system /config/usb_gadget/g1/functions/acm.uwb0
chown system system /config/usb_gadget/g1/functions/acm.uwb0/port_num
chown system system /config/usb_gadget/g1/functions/audio_source.gs3
chown system system /config/usb_gadget/g1/functions/dm.gs7
chown system system /config/usb_gadget/g1/functions/ffs.adb
chown system system /config/usb_gadget/g1/functions/ffs.mtp
chown system system /config/usb_gadget/g1/functions/ffs.ptp
chown system system /config/usb_gadget/g1/functions/midi.gs5
chown system system /config/usb_gadget/g1/functions/midi.gs5/buflen
chown system system /config/usb_gadget/g1/functions/midi.gs5/id
chown system system /config/usb_gadget/g1/functions/midi.gs5/in_ports
chown system system /config/usb_gadget/g1/functions/midi.gs5/index
chown system system /config/usb_gadget/g1/functions/midi.gs5/out_ports
chown system system /config/usb_gadget/g1/functions/midi.gs5/qlen
chown system system /config/usb_gadget/g1/functions/mtp.gs0
chown system system /config/usb_gadget/g1/functions/mtp.gs0/os_desc
chown system system /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP
chown system system /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id
chown system system /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/sub_compatible_id
chown system system /config/usb_gadget/g1/functions/ncm.gs9
chown system system /config/usb_gadget/g1/functions/ncm.gs9/dev_addr
chown system system /config/usb_gadget/g1/functions/ncm.gs9/host_addr
chown system system /config/usb_gadget/g1/functions/ncm.gs9/ifname
chown system system /config/usb_gadget/g1/functions/ncm.gs9/os_desc
chown system system /config/usb_gadget/g1/functions/ncm.gs9/os_desc/interface.ncm
chown system system /config/usb_gadget/g1/functions/ncm.gs9/os_desc/interface.ncm/compatible_id
chown system system /config/usb_gadget/g1/functions/ncm.gs9/os_desc/interface.ncm/sub_compatible_id
chown system system /config/usb_gadget/g1/functions/ncm.gs9/qmult
chown system system /config/usb_gadget/g1/functions/ptp.gs1
chown system system /config/usb_gadget/g1/functions/ptp.gs1/os_desc
chown system system /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP
chown system system /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/compatible_id
chown system system /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/sub_compatible_id
chown system system /config/usb_gadget/g1/functions/rndis.gs4
chown system system /config/usb_gadget/g1/functions/rndis.gs4/class
chown system system /config/usb_gadget/g1/functions/rndis.gs4/dev_addr
chown system system /config/usb_gadget/g1/functions/rndis.gs4/host_addr
chown system system /config/usb_gadget/g1/functions/rndis.gs4/ifname
chown system system /config/usb_gadget/g1/functions/rndis.gs4/os_desc
chown system system /config/usb_gadget/g1/functions/rndis.gs4/os_desc/interface.rndis
chown system system /config/usb_gadget/g1/functions/rndis.gs4/os_desc/interface.rndis/compatible_id
chown system system /config/usb_gadget/g1/functions/rndis.gs4/os_desc/interface.rndis/sub_compatible_id
chown system system /config/usb_gadget/g1/functions/rndis.gs4/protocol
chown system system /config/usb_gadget/g1/functions/rndis.gs4/qmult
chown system system /config/usb_gadget/g1/functions/rndis.gs4/subclass
chown system system /config/usb_gadget/g1/idProduct
chown system system /config/usb_gadget/g1/idVendor
chown system system /config/usb_gadget/g1/max_speed
chown system system /config/usb_gadget/g1/os_desc
chown system system /config/usb_gadget/g1/os_desc/b.1
chown system system /config/usb_gadget/g1/os_desc/b_vendor_code
chown system system /config/usb_gadget/g1/os_desc/qw_sign
chown system system /config/usb_gadget/g1/os_desc/use
chown system system /config/usb_gadget/g1/strings
chown system system /config/usb_gadget/g1/strings/0x409
chown system system /config/usb_gadget/g1/strings/0x409/manufacturer
chown system system /config/usb_gadget/g1/strings/0x409/product
chown system system /config/usb_gadget/g1/strings/0x409/serialnumber
setprop vendor.usb.functions.ready 1
on boot
# Use USB Gadget HAL
setprop sys.usb.configfs 2
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
write /config/usb_gadget/g1/idProduct 0x4EE7
write /config/usb_gadget/g1/idVendor 0x18D1
on property:vendor.usb.config=*
start usbd
on property:persist.vendor.usb.usbradio.config=*
start usbd
on charger
mkdir /config/usb_gadget/g1
mkdir /config/usb_gadget/g1/strings/0x409
mkdir /config/usb_gadget/g1/configs/b.1
write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
write /config/usb_gadget/g1/configs/b.1/MaxPower 0x384
write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
mkdir /config/usb_gadget/g1/functions/midi.gs5
symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
setprop sys.usb.controller "11210000.dwc3"
setprop sys.usb.configfs 1
on property:ro.bootmode=charger
setprop sys.usb.config charger
on property:sys.usb.config=charger && property:sys.usb.configfs=1
write /config/usb_gadget/g1/idVendor 0x18d1
write /config/usb_gadget/g1/idProduct 0x4eea
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi"
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:ro.bootmode=usbuwb
setprop persist.vendor.usb.usbradio.config uwb_acm

3
conf/recovery.wipe Normal file
View file

@ -0,0 +1,3 @@
# All the partitions to be wiped (in order) under recovery.
/dev/block/by-name/userdata
/dev/block/by-name/metadata

109
conf/soundtrigger_conf.h Normal file
View file

@ -0,0 +1,109 @@
/*
* Copyright (C) 2017 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 __EXYNOS_SOUNDTRIGGERCONF_H__
#define __EXYNOS_SOUNDTRIGGERCONF_H__
/********************************************************************/
/** ALSA Framework Sound Card & Sound Device Information */
/** */
/** You can find Sound Device Name from /dev/snd. */
/** Sound Device Name consist of Card Number & Device Number. */
/** */
/********************************************************************/
/* Sound Card and Mixer card Numbers based on Target Device */
/* You have to match this number with real kernel information */
#define VTS_SOUND_CARD 0
#define VTS_MIXER_CARD 0
/* PCM Nodes number for seamless and normal recording*/
#define VTS_TRICAP_DEVICE_NODE 13
#define VTS_RECORD_DEVICE_NODE 14
/* sysfs file paths for loading model binaries into VTS kernel driver */
#define VTS_HOTWORD_MODEL "/sys/devices/platform/13810000.vts/vts_google_model"
#define VTS_SVOICE_MODEL "/sys/devices/platform/13810000.vts/vts_svoice_model"
#define AUDIO_PRIMARY_HAL_LIBRARY_PATH "/vendor/lib/libaudioproxy.so"
// VTS Capture(Input) PCM Configuration
#define DEFAULT_VTS_CHANNELS 1 // Mono
#define DEFAULT_VTS_SAMPLING_RATE 16000 // 16KHz
#define PRIMARY_VTS_PERIOD_SIZE 160 // 160 frames, 10ms in case of 16KHz Stream
#define PRIMARY_VTS_PERIOD_COUNT 1024 // Buffer count => Total 327680 Bytes = 160 * 1(Mono) * 2(16bit PCM) * 1024(Buffer count)
/* VTS mixer controls */
#define VTS_ACTIVE_KEYPHRASE_CTL_NAME "VTS Active Keyphrase" /* default: 0-"SVOICE", 1-"GOOGLE", 2-"SENSORY" */
#define VTS_EXECUTION_MODE_CTL_NAME "VTS Execution Mode" /* 0-"OFF-MODE", 1-"VOICE-TRIG-MODE", 2-"SOUND-DECTECT-MODE", 3-"VT-ALWAYS-MODE" 4-"GOOGLE-TRI-MODE */
#define VTS_VOICERECOGNIZE_START_CTL_NAME "VTS VoiceRecognize Start" /* 0-"Off", 1-On" */
#define VTS_VOICETRIGGER_VALUE_CTL_NAME "VTS VoiceTrigger Value" /* 0 ~ 2000 ms*/
#define MAIN_MIC_CONTROL_COUNT 8
#define HEADSET_MIC_CONTROL_COUNT 8
#define MODEL_RECOGNIZE_CONTROL_COUNT 4
/* MIC Mixer controls for VTS */
char *main_mic_ctlname[] = {
"VTS DMIC SEL",
"VTS DMIC IF RCH EN",
"VTS DMIC IF LCH EN",
"VTS SYS SEL",
"VTS HPF EN",
"VTS HPF SEL",
"DMIC1 Switch",
"VTS Virtual Output Mux",
};
char *headset_mic_ctlname[] = {
"AUXPDM1 Rate",
"AUXPDM1 Input",
"AUXPDM1 Output Switch",
"AUXPDM Switch",
"VTS DMIC SEL",
"VTS DMIC IF RCH EN",
"VTS DMIC IF LCH EN",
"VTS SYS SEL",
"VTS HPF EN",
"VTS HPF SEL",
};
/* MIC Mixer control values */
/* FIXME : Double check this values */
int main_mic_ctlvalue[] = {
0, //"VTS DMIC SEL",
1, //"VTS DMIC IF RCH EN",
1, //"VTS DMIC IF LCH EN",
1, //"VTS SYS SEL",
1, //"VTS HPF EN",
1, //"VTS HPF SEL",
1, //"DMIC1 Switch",
1, //"VTS Virtual Output Mux",
};
int headset_mic_ctlvalue[] = {
3, //"AUXPDM1 Rate",
0, //"AUXPDM1 Input",
1, //"AUXPDM1 Output Switch",
1, //"AUXPDM Switch",
1, //"VTS DMIC SEL",
1, //"VTS DMIC IF RCH EN",
1, //"VTS DMIC IF LCH EN",
1, //"VTS SYS SEL",
1, //"VTS HPF EN",
1, //"VTS HPF SEL",
};
#endif // __EXYNOS_SOUNDTRIGGERCONF_H__

225
conf/ueventd.zumapro.rc Normal file
View file

@ -0,0 +1,225 @@
/dev/mali0 0666 system system
/dev/ion 0666 system system
/dev/ump 0666 system graphics
/dev/exynos-mem 0660 system graphics
/dev/video0 0660 system camera
/dev/video1 0660 system camera
/dev/video2 0660 system camera
/dev/video3 0660 system camera
/dev/video20 0660 system system
# media0 is used for GSC, DECON, etc
/dev/media0 0660 system camera
# media1 is used for DECON Ext WB
/dev/media1 0660 system graphics
# Various devices use the v4l-subdev interface
# We declare all such nodes simultaneously here
/dev/v4l-subdev0 0660 system camera
/dev/v4l-subdev1 0660 system camera
/dev/v4l-subdev2 0660 system camera
/dev/v4l-subdev3 0660 system camera
/dev/v4l-subdev4 0660 system camera
/dev/v4l-subdev5 0660 system camera
/dev/v4l-subdev6 0660 system camera
/dev/v4l-subdev7 0660 system camera
/dev/v4l-subdev8 0660 system camera
/dev/v4l-subdev9 0660 system camera
/dev/v4l-subdev10 0660 system camera
/dev/v4l-subdev11 0660 system camera
/dev/v4l-subdev12 0660 system camera
/dev/v4l-subdev13 0660 system camera
/dev/v4l-subdev14 0660 system camera
/dev/v4l-subdev15 0660 system camera
/dev/v4l-subdev16 0660 system camera
/dev/v4l-subdev17 0660 system camera
/dev/v4l-subdev18 0660 system camera
/dev/v4l-subdev19 0660 system camera
# v4l-subdev20 is used for DECON Ext WB
/dev/v4l-subdev20 0660 system graphics
/dev/v4l-subdev21 0660 system graphics
/dev/v4l-subdev32 0660 system graphics
# gscalers
/dev/video23 0660 media graphics
/dev/video26 0660 media graphics
/dev/video24 0660 media graphics
/dev/video27 0660 media graphics
/dev/video29 0660 media graphics
/dev/video30 0660 media graphics
# video31 is used for DECON Ext WB
/dev/video31 0660 media graphics
# mscalers
/dev/video50 0660 mediacodec drmrpc
/dev/m2m1shot_scaler0 0660 mediacodec drmrpc
/dev/video55 0666 system graphics
/dev/g2d 0660 system graphics
/dev/fimg2d 0666 system graphics
/dev/i2c-2 0660 system system
/dev/HPD 0660 system system
# wfd
/dev/tsmux 0660 media graphics
/dev/repeater 0660 media graphics
# mfc
/dev/video6 0660 mediacodec mediadrm
/dev/video7 0660 mediacodec mediadrm
/dev/video8 0660 mediacodec mediadrm
/dev/video9 0660 mediacodec mediadrm
/dev/video10 0660 mediacodec mediadrm
/dev/video11 0660 mediacodec mediadrm
# camera
/dev/media2 0660 media media
/dev/hdcp2 0660 media media
# jpeg
/dev/m2m1shot_jpeg 0660 media media
/dev/video12 0660 system system
# audio
/dev/seiren 0660 system audio
/dev/acd-audio_output_tuning 0660 system audio
/dev/acd-audio_bulk_tx 0660 system audio
/dev/acd-audio_bulk_rx 0660 system audio
/dev/acd-audio_input_tuning 0660 system audio
/dev/acd-audio_input_bulk_tx 0660 system audio
/dev/acd-audio_input_bulk_rx 0660 system audio
/dev/acd-sound_trigger 0660 system audio
/dev/acd-hotword_notification 0660 system audio
/dev/acd-hotword_pcm 0660 system audio
/dev/acd-ambient_pcm 0660 system audio
/dev/acd-model_data 0660 system audio
/dev/acd-debug 0660 system audio
/dev/acd-audio_tap* 0660 system audio
/dev/acd-audio_dcdoff_ref 0660 system audio
/dev/amcs 0660 system audio
/dev/acd-audio_rtp_* 0660 system radio
# Secure MEM driver
/dev/s5p-smem 0660 drm drmrpc
# cbd
/dev/block/by-name/modem 0640 root radio
/dev/block/by-name/modem_a 0640 root radio
/dev/block/by-name/modem_b 0640 root radio
# DM tools
/dev/umts_dm0 0660 system system
/dev/umts_router 0660 system system
/dev/ttyGS0 0660 system system
/dev/ttyGS1 0660 system system
/dev/ttyGS2 0660 system system
# IPC RIL
/dev/umts_boot0 0660 radio system
/dev/umts_ipc0 0660 radio radio
/dev/umts_ipc1 0660 radio radio
/dev/umts_rfs0 0660 radio radio
# IPC OEM
/dev/oem_ipc* 0660 radio radio
/dev/oem_test 0660 radio radio
# interactive governor parameters
/sys/devices/system/cpu/cpu* cpufreq/interactive/timer_rate 0660 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/timer_slack 0660 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/min_sample_time 0660 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/hispeed_freq 0660 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/target_loads 0660 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/go_hispeed_load 0660 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/above_hispeed_delay 0660 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/boost 0660 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/boostpulse 0200 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/input_boost 0660 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/boostpulse_duration 0660 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/io_is_busy 0660 system system
# Vision (VPU, SCORE)
/dev/vertex0 0660 media media
/dev/vertex1 0660 media media
# AoC
/dev/aoc 0660 system system
# Sensors (USF)
/dev/acd-com.google.usf 0660 system system
/dev/acd-com.google.usf.non_wake_up 0660 system system
# LWIS
/dev/lwis* 0660 system system
# NFC
/dev/st21nfc 0660 nfc nfc
# UWB
/dev/uci 0660 uwb uwb
# SecureElement
/dev/st54spi 0660 secure_element secure_element
#bigwave
/dev/bigwave 0660 mediacodec mediadrm
# Trusty
/dev/trusty-ipc-dev0 0660 system drmrpc
/dev/trusty-log0 0660 system system
/dev/block/platform/13200000\.ufs/by-name/trusty_persist 0660 system system
# RPMB
/dev/sg1 0660 system system
# Citadel
/dev/gsc0 0660 hsm hsm
# Storage: for factory reset protection feature
/dev/block/by-name/frp 0660 system system
# Storage: for UDFPS calibration data sideload feature
/dev/block/by-name/mfg_data 0660 system system
# TPU
/dev/edgetpu-soc 0660 system system
# DSP
/dev/gxp 0666 system camera
# TOE
/dev/dit2 0660 radio radio
# Bluetooth
/dev/ttySAC18 0660 bluetooth system
/dev/btpower 0660 bluetooth system
# BT Wifi Coexistence
/dev/wbrc 0660 system system
# TUI
/dev/tui-driver 0660 system system
# DMA-BUF heaps
/dev/dma_heap/crypto 0444 system graphics
/dev/dma_heap/crypto-uncached 0444 system graphics
/dev/dma_heap/faceauth_dsp-secure 0444 system graphics
/dev/dma_heap/faceauth_tpu-secure 0444 system graphics
/dev/dma_heap/faimg-secure 0444 system graphics
/dev/dma_heap/famodel-secure 0444 system graphics
/dev/dma_heap/faprev-secure 0444 system graphics
/dev/dma_heap/farawimg-secure 0444 system graphics
/dev/dma_heap/tui-secure 0444 system graphics
/dev/dma_heap/vframe-secure 0444 system drmrpc
/dev/dma_heap/vscaler-secure 0444 system graphics
/dev/dma_heap/vstream-secure 0444 system drmrpc
/dev/dma_heap/sensor_direct_heap 0444 system graphics
/dev/dma_heap/aaudio_playback_heap 0444 system audio
/dev/dma_heap/aaudio_capture_heap 0444 system audio
# Direct Charging
/dev/logbuffer_pca9468_tcpm 0600 system system
# Raw HID devices
/dev/hidraw* 0660 system system
# Wlan
/dev/wlan 0660 wifi wifi