initial brax3 device makefiles
* boots and works fine Signed-off-by: erascape <erascape@proton.me>
This commit is contained in:
commit
59281ccd87
67 changed files with 3271 additions and 0 deletions
1
overlay/system/etc/default/aethercast
Normal file
1
overlay/system/etc/default/aethercast
Normal file
|
@ -0,0 +1 @@
|
|||
AETHERCAST_I_FRAME_INTERVAL=-1
|
|
@ -0,0 +1 @@
|
|||
export MIR_ANDROID_FORCE_HWC2=1
|
|
@ -0,0 +1,7 @@
|
|||
IDVENDOR=0E8D
|
||||
IDPRODUCT_MTP=2008
|
||||
IDPRODUCT_MTP_ADB=201D
|
||||
IDPRODUCT_RNDIS=2004
|
||||
IDPRODUCT_RNDIS_ADB=2005
|
||||
# Disable usb-moded's rescue mode.
|
||||
USB_MODED_ARGS=
|
12
overlay/system/etc/deviceinfo/devices/prithvi.yaml
Normal file
12
overlay/system/etc/deviceinfo/devices/prithvi.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
prithvi:
|
||||
Vendor: BraX
|
||||
PrettyName: BraX3
|
||||
DeviceType: phone
|
||||
GridUnit: 14
|
||||
SupportedOrientations:
|
||||
- Portrait
|
||||
- Landscape
|
||||
- InvertedLandscape
|
||||
OfonoPlugin: binder
|
||||
OfonoImplementsIms: true
|
||||
VibrateDurationExtraMs: 40
|
2
overlay/system/etc/gbinder.conf
Normal file
2
overlay/system/etc/gbinder.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
[General]
|
||||
ApiLevel = 33
|
25
overlay/system/etc/ofono/binder.d/mtk.conf
Normal file
25
overlay/system/etc/ofono/binder.d/mtk.conf
Normal file
|
@ -0,0 +1,25 @@
|
|||
# ofono binder driver configuration for MTK devices
|
||||
|
||||
[Settings]
|
||||
ExpectSlots = slot1,slot2
|
||||
3GLTEHandover = false
|
||||
MaxNonDataMode = none
|
||||
|
||||
Device=/dev/binder
|
||||
InterfaceType = aidl
|
||||
#radioInterface = aidl
|
||||
emptyPinQuery = false
|
||||
useDataProfiles = true
|
||||
mmsDataProfileId = 1001
|
||||
# RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
|
||||
rilRequestOnSetUdub = 13
|
||||
#extPlugin = mtk
|
||||
|
||||
[slot1]
|
||||
path = /ril_0
|
||||
slot = 0
|
||||
|
||||
[slot2]
|
||||
path = /ril_1
|
||||
slot = 1
|
||||
|
26
overlay/system/etc/ofono/ril_subscription.d/mtk.conf
Normal file
26
overlay/system/etc/ofono/ril_subscription.d/mtk.conf
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Ofono configuration for MTK devices
|
||||
|
||||
[Settings]
|
||||
#EmptyConfig=false
|
||||
#Identity=radio:radio
|
||||
#3GLTEHandover=true
|
||||
Device=/dev/binder
|
||||
InterfaceType = aidl
|
||||
emptyPinQuery=false
|
||||
radioPowerCycle=false
|
||||
confirmRadioPowerOn=false
|
||||
networkSelectionManual0=false
|
||||
cellInfoIntervalShortMs=0
|
||||
useDataProfiles=true
|
||||
mmsDataProfileId=1001
|
||||
# RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
|
||||
rilRequestOnSetUdub=13
|
||||
|
||||
[ril_0]
|
||||
transport=binder:name=slot1;interface=android.hardware.radio.modem.IRadioModem
|
||||
name=slot1
|
||||
|
||||
[ril_1]
|
||||
transport=binder:name=slot2;interface=android.hardware.radio.modem.IRadioModem
|
||||
#;interface=radio
|
||||
name=slot2
|
2
overlay/system/etc/pulse/droid_card_custom.pa
Normal file
2
overlay/system/etc/pulse/droid_card_custom.pa
Normal file
|
@ -0,0 +1,2 @@
|
|||
### Load Pulseaudio Droid module built for API 30
|
||||
load-module module-droid-card-30 output_deep_buffer=false hw_volume=false rate=48000
|
1
overlay/system/etc/systemd/system/biometryd.service
Symbolic link
1
overlay/system/etc/systemd/system/biometryd.service
Symbolic link
|
@ -0,0 +1 @@
|
|||
/dev/null
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/user/umtprd-manager.service
|
|
@ -0,0 +1 @@
|
|||
/dev/null
|
46
overlay/system/etc/umtprd/umtprd.conf
Normal file
46
overlay/system/etc/umtprd/umtprd.conf
Normal file
|
@ -0,0 +1,46 @@
|
|||
#
|
||||
# uMTP Responder config file
|
||||
#
|
||||
|
||||
# UBports: Don't show hidden files
|
||||
show_hidden_files 0
|
||||
|
||||
# UBports: Use phablet user as default for all storage file operations
|
||||
default_uid 32011
|
||||
default_gid 32011
|
||||
|
||||
# Add home folder as default "internal storage" entry
|
||||
storage "/home/phablet" "Internal Storage" "rw,locked"
|
||||
|
||||
# Set the USB strings visible to host systems
|
||||
manufacturer "BraX"
|
||||
product "BraX3"
|
||||
# FIXME: set to something proper!
|
||||
serial "UT2004"
|
||||
|
||||
# Set the MTP firmware version
|
||||
firmware_version "Rev A"
|
||||
|
||||
# Set the USB interface string. Should be always "MTP"
|
||||
interface "MTP"
|
||||
|
||||
# Set the USB Vendor ID, Product ID and class
|
||||
# FIXME: set to something proper!
|
||||
usb_vendor_id 0x1D6B # Linux Foundation
|
||||
usb_product_id 0x0100 # PTP Gadget
|
||||
usb_class 0x6 # Image
|
||||
usb_subclass 0x1 # Still Imaging device
|
||||
usb_protocol 0x1 #
|
||||
|
||||
# Device version
|
||||
usb_dev_version 0x3008
|
||||
|
||||
# Generic FunctionFS Mode
|
||||
usb_functionfs_mode 0x1
|
||||
|
||||
usb_dev_path "/dev/usb-ffs/mtp/ep0"
|
||||
usb_epin_path "/dev/usb-ffs/mtp/ep1"
|
||||
usb_epout_path "/dev/usb-ffs/mtp/ep2"
|
||||
usb_epint_path "/dev/usb-ffs/mtp/ep3"
|
||||
|
||||
usb_max_packet_size 0x200
|
|
@ -0,0 +1,6 @@
|
|||
[configfs]
|
||||
function_mtp = ffs.mtp
|
||||
gadget_udc_device = musb-hdrc
|
||||
|
||||
[udev]
|
||||
extcon_tracking = 1
|
9
overlay/system/etc/usb-moded/dyn-modes/mtp.ini.in
Normal file
9
overlay/system/etc/usb-moded/dyn-modes/mtp.ini.in
Normal file
|
@ -0,0 +1,9 @@
|
|||
[mode]
|
||||
name = mtp
|
||||
module = none
|
||||
appsync = 1 # Launches uMTP-Responder as needed
|
||||
|
||||
[options]
|
||||
# sysfs_value = comma separated list of functions to enable in this mode
|
||||
sysfs_value = mtp
|
||||
idProduct = $IDPRODUCT_MTP
|
13
overlay/system/etc/usb-moded/dyn-modes/mtp_adb.ini.in
Normal file
13
overlay/system/etc/usb-moded/dyn-modes/mtp_adb.ini.in
Normal file
|
@ -0,0 +1,13 @@
|
|||
[mode]
|
||||
name = mtp_adb
|
||||
module = none
|
||||
# Launches ADBD
|
||||
# Launches uMTP-Responder as needed
|
||||
appsync = 1
|
||||
|
||||
[options]
|
||||
# sysfs_value = comma separated list of functions to enable in this mode
|
||||
sysfs_value = mtp,adb
|
||||
android_extra_sysfs_path = /sys/class/android_usb/android0/f_ffs/aliases
|
||||
android_extra_sysfs_value = adb
|
||||
idProduct = $IDPRODUCT_MTP_ADB
|
5
overlay/system/etc/usb-moded/run/mtp-umtprd.ini
Normal file
5
overlay/system/etc/usb-moded/run/mtp-umtprd.ini
Normal file
|
@ -0,0 +1,5 @@
|
|||
[info]
|
||||
mode = mtp
|
||||
systemd = 1
|
||||
name = umtprd.service
|
||||
systemd_wait = 1
|
5
overlay/system/etc/usb-moded/run/mtp_adb-umtprd.ini
Normal file
5
overlay/system/etc/usb-moded/run/mtp_adb-umtprd.ini
Normal file
|
@ -0,0 +1,5 @@
|
|||
[info]
|
||||
mode = mtp_adb
|
||||
systemd = 1
|
||||
name = umtprd.service
|
||||
systemd_wait = 1
|
BIN
overlay/system/usr/bin/umtprd
Executable file
BIN
overlay/system/usr/bin/umtprd
Executable file
Binary file not shown.
136
overlay/system/usr/bin/usb-tethering
Executable file
136
overlay/system/usr/bin/usb-tethering
Executable file
|
@ -0,0 +1,136 @@
|
|||
#!/bin/bash
|
||||
|
||||
####
|
||||
# Default profile
|
||||
USB_IDVENDOR=0FCE
|
||||
USB_IDPRODUCT=7169
|
||||
USB_IPRODUCT="Unknown"
|
||||
USB_ISERIAL="Unknown"
|
||||
USB_IMANUFACTURER="GNU/Linux Device"
|
||||
USB_IFACE=""
|
||||
|
||||
####
|
||||
# Override profile
|
||||
if [ -f /etc/default/hybris-device ]; then
|
||||
source /etc/default/hybris-device
|
||||
fi
|
||||
|
||||
ANDROID_USB=/sys/class/android_usb/android0
|
||||
USB_FUNCTIONS=rndis
|
||||
LOCAL_IP=10.15.19.82
|
||||
GADGET_DIR=/sys/kernel/config/usb_gadget
|
||||
|
||||
write() {
|
||||
echo -n "$2" > "$1"
|
||||
}
|
||||
|
||||
# This sets up the USB with whatever USB_FUNCTIONS are set to via configfs
|
||||
usb_setup_configfs() {
|
||||
G_USB_ISERIAL=$GADGET_DIR/g1/strings/0x409/serialnumber
|
||||
|
||||
mkdir $GADGET_DIR/g1
|
||||
write $GADGET_DIR/g1/idVendor "0x$USB_IDVENDOR"
|
||||
write $GADGET_DIR/g1/idProduct "0x$USB_IDPRODUCT"
|
||||
mkdir $GADGET_DIR/g1/strings/0x409
|
||||
write $GADGET_DIR/g1/strings/0x409/serialnumber "$USB_ISERIAL"
|
||||
write $GADGET_DIR/g1/strings/0x409/manufacturer "$USB_IMANUFACTURER"
|
||||
write $GADGET_DIR/g1/strings/0x409/product "$USB_IPRODUCT"
|
||||
|
||||
if echo $USB_FUNCTIONS | grep -q "rndis"; then
|
||||
mkdir $GADGET_DIR/g1/functions/rndis.usb0
|
||||
mkdir $GADGET_DIR/g1/functions/rndis_bam.rndis
|
||||
fi
|
||||
echo $USB_FUNCTIONS | grep -q "mass_storage" && mkdir $GADGET_DIR/g1/functions/storage.0
|
||||
|
||||
mkdir $GADGET_DIR/g1/configs/c.1
|
||||
mkdir $GADGET_DIR/g1/configs/c.1/strings/0x409
|
||||
write $GADGET_DIR/g1/configs/c.1/strings/0x409/configuration "$USB_FUNCTIONS"
|
||||
|
||||
if echo $USB_FUNCTIONS | grep -q "rndis"; then
|
||||
ln -s $GADGET_DIR/g1/functions/rndis.usb0 $GADGET_DIR/g1/configs/c.1
|
||||
ln -s $GADGET_DIR/g1/functions/rndis_bam.rndis $GADGET_DIR/g1/configs/c.1
|
||||
fi
|
||||
echo $USB_FUNCTIONS | grep -q "mass_storage" && ln -s $GADGET_DIR/g1/functions/storage.0 $GADGET_DIR/g1/configs/c.1
|
||||
|
||||
# ls /sys/class/udc > $GADGET_DIR/g1/UDC
|
||||
ls /sys/class/udc | grep -v dummy | head -1 > $GADGET_DIR/g1/UDC
|
||||
}
|
||||
|
||||
# This sets up the USB with whatever USB_FUNCTIONS are set to via android_usb
|
||||
usb_setup_android_usb() {
|
||||
G_USB_ISERIAL=$ANDROID_USB/iSerial
|
||||
write $ANDROID_USB/enable 0
|
||||
write $ANDROID_USB/functions ""
|
||||
write $ANDROID_USB/enable 1
|
||||
usleep 500000 # 0.5 delay to attempt to remove rndis function
|
||||
write $ANDROID_USB/enable 0
|
||||
write $ANDROID_USB/idVendor $USB_IDVENDOR
|
||||
write $ANDROID_USB/idProduct $USB_IDPRODUCT
|
||||
write $ANDROID_USB/iManufacturer "$USB_IMANUFACTURER"
|
||||
write $ANDROID_USB/iProduct "$USB_IPRODUCT"
|
||||
write $ANDROID_USB/iSerial "$USB_ISERIAL"
|
||||
write $ANDROID_USB/functions $USB_FUNCTIONS
|
||||
write $ANDROID_USB/enable 1
|
||||
}
|
||||
|
||||
# This determines which USB setup method is going to be used
|
||||
usb_setup() {
|
||||
mount -t configfs none /sys/kernel/config || true
|
||||
|
||||
if [ -d $ANDROID_USB ]; then
|
||||
usb_setup_android_usb
|
||||
elif [ -d $GADGET_DIR ]; then
|
||||
usb_setup_configfs
|
||||
fi
|
||||
}
|
||||
|
||||
usb_info() {
|
||||
sleep 1
|
||||
write $G_USB_ISERIAL "$1"
|
||||
echo "$1" >> /var/log/usb_info.log
|
||||
}
|
||||
|
||||
ip_setup() {
|
||||
local candidate
|
||||
|
||||
if [ -n "$USB_IFACE" ]; then
|
||||
# If the specified interface fails, fallback to auto-detection.
|
||||
ip link set dev "$USB_IFACE" up || USB_IFACE=""
|
||||
fi
|
||||
|
||||
if [ -z "$USB_IFACE" ]; then
|
||||
# Prioritise usb0 over rndis0. On some devices (e.g. Sony Xperia X),
|
||||
# both would show up but only usb0 is usable. If, on some device, the
|
||||
# opposite happens, then I don't know what to do.
|
||||
for candidate in usb0 rndis0; do
|
||||
if ip link set dev "$candidate" up; then
|
||||
USB_IFACE="$candidate"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -z "$USB_IFACE" ]; then
|
||||
usb_info "could not setup USB tethering!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
ip address add "${LOCAL_IP}/24" dev "$USB_IFACE"
|
||||
|
||||
usb_info "$USB_IMANUFACTURER on $USB_IFACE $LOCAL_IP"
|
||||
}
|
||||
|
||||
dhcpd_start() {
|
||||
mkdir -p /run/hybris-usb
|
||||
touch /run/hybris-usb/dhcpd4.leases
|
||||
/usr/sbin/dhcpd -4 -q \
|
||||
-cf /etc/hybris-usb/dhcpd.conf \
|
||||
-pf /run/hybris-usb/dhcpd4.pid \
|
||||
-lf /run/hybris-usb/dhcpd4.leases \
|
||||
"$USB_IFACE"
|
||||
}
|
||||
|
||||
usb_setup
|
||||
ip_setup && dhcpd_start
|
||||
|
||||
exit $?
|
11
overlay/system/usr/lib/systemd/system/umtprd.service
Normal file
11
overlay/system/usr/lib/systemd/system/umtprd.service
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=uMTP-Responder
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
ExecStartPre=/usr/libexec/usb-moded/umtprd-functionfs.sh
|
||||
ExecStart=/usr/bin/umtprd
|
||||
ExecStopPost=/bin/umount mtp
|
||||
Restart=on-failure
|
||||
|
||||
# No WantedBy; should be triggered by usb-moded.
|
20
overlay/system/usr/lib/systemd/user/umtprd-manager.service
Normal file
20
overlay/system/usr/lib/systemd/user/umtprd-manager.service
Normal file
|
@ -0,0 +1,20 @@
|
|||
[Unit]
|
||||
Description=Manages uMTP-Responder storages at runtime
|
||||
|
||||
After=lomiri-full-greeter.service
|
||||
After=lomiri-full-shell.service
|
||||
After=lomiri-greeter.service
|
||||
After=lomiri-shell.service
|
||||
|
||||
After=umtprd.service
|
||||
|
||||
Before=ubuntu-touch-session.target
|
||||
PartOf=ubuntu-touch-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
ExecStart=/usr/libexec/umtprd-manager
|
||||
|
||||
[Install]
|
||||
WantedBy=ubuntu-touch-session.target
|
144
overlay/system/usr/lib/udev/rules.d/70-mtk-common.rules
Normal file
144
overlay/system/usr/lib/udev/rules.d/70-mtk-common.rules
Normal file
|
@ -0,0 +1,144 @@
|
|||
ACTION=="add", KERNEL=="null", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="zero", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="full", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="ptmx", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="tty", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="random", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="urandom", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="ashmem*", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="binder", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="hwbinder", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="vndbinder", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="pmsg0", OWNER="root", GROUP="log", MODE="0222"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="system", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="system-uncached", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="system-secure", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", KERNEL=="dri/*", OWNER="root", GROUP="android_graphics", MODE="0666"
|
||||
ACTION=="add", KERNEL=="uhid", OWNER="uhid", GROUP="uhid", MODE="0660"
|
||||
ACTION=="add", KERNEL=="uinput", OWNER="root", GROUP="plugdev", MODE="0660"
|
||||
ACTION=="add", KERNEL=="rtc0", OWNER="system", GROUP="system", MODE="0640"
|
||||
ACTION=="add", KERNEL=="tty0", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="graphics/*", OWNER="root", GROUP="android_graphics", MODE="0660"
|
||||
ACTION=="add", KERNEL=="input/*", OWNER="root", GROUP="input", MODE="0660"
|
||||
ACTION=="add", KERNEL=="v4l-touch*", OWNER="root", GROUP="input", MODE="0660"
|
||||
ACTION=="add", KERNEL=="snd/*", OWNER="system", GROUP="audio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="bus/usb/*", OWNER="root", GROUP="usb", MODE="0660"
|
||||
ACTION=="add", KERNEL=="mtp_usb", OWNER="root", GROUP="plugdev", MODE="0660"
|
||||
ACTION=="add", KERNEL=="usb_accessory", OWNER="root", GROUP="usb", MODE="0660"
|
||||
ACTION=="add", KERNEL=="tun", OWNER="system", GROUP="vpn", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ppp", OWNER="radio", GROUP="vpn", MODE="0660"
|
||||
ACTION=="add", KERNEL=="kvm", OWNER="virtmanager", GROUP="root", MODE="0600"
|
||||
ACTION=="add", KERNEL=="vhost-vsock", OWNER="virtmanager", GROUP="root", MODE="0600"
|
||||
ACTION=="add", KERNEL=="block/mmcblk0", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/mmcblk0boot0", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/mmcblk0boot1", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="misc-sd", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/sda", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/sdb", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/sdc", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/by-name/misc2", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/by-name/boot", OWNER="root", GROUP="system", MODE="0640"
|
||||
ACTION=="add", KERNEL=="block/by-name/recovery", OWNER="root", GROUP="system", MODE="0640"
|
||||
ACTION=="add", KERNEL=="block/by-name/secro", OWNER="root", GROUP="system", MODE="0640"
|
||||
ACTION=="add", KERNEL=="block/by-name/seccfg", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/by-name/proinfo", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/by-name/nvram", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/by-name/para", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/by-name/logo", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/by-name/frp", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/by-name/md1img", OWNER="root", GROUP="system", MODE="0640"
|
||||
ACTION=="add", KERNEL=="block/by-name/md1img_a", OWNER="root", GROUP="system", MODE="0640"
|
||||
ACTION=="add", KERNEL=="block/by-name/md1img_b", OWNER="root", GROUP="system", MODE="0640"
|
||||
ACTION=="add", KERNEL=="block/by-name/md1dsp", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/by-name/boot_para", OWNER="root", GROUP="system", MODE="0640"
|
||||
ACTION=="add", KERNEL=="otp", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/by-name/otp", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="stpwmt", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="wmtdetect", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="fw_log_wmt", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="conninfra_dev", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="conn_pwr_dev", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="stpbt", OWNER="bluetooth", GROUP="bluetooth", MODE="0660"
|
||||
ACTION=="add", KERNEL=="fw_log_bt", OWNER="bluetooth", GROUP="bluetooth", MODE="0660"
|
||||
ACTION=="add", KERNEL=="gpsdl0", OWNER="gps", GROUP="gps", MODE="0660"
|
||||
ACTION=="add", KERNEL=="gpsdl1", OWNER="gps", GROUP="gps", MODE="0660"
|
||||
ACTION=="add", KERNEL=="stpgps", OWNER="gps", GROUP="gps", MODE="0660"
|
||||
ACTION=="add", KERNEL=="gps", OWNER="gps", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="gps_emi", OWNER="gps", GROUP="gps", MODE="0660"
|
||||
ACTION=="add", KERNEL=="gps2scp", OWNER="gps", GROUP="gps", MODE="0660"
|
||||
ACTION=="add", KERNEL=="gps_pwr", OWNER="gps", GROUP="gps", MODE="0660"
|
||||
ACTION=="add", KERNEL=="fw_log_gps", OWNER="gps", GROUP="gps", MODE="0660"
|
||||
ACTION=="add", KERNEL=="stpant", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="wmtWifi", OWNER="radio", GROUP="radio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="fw_log_wifi", OWNER="wifi", GROUP="wifi", MODE="0660"
|
||||
ACTION=="add", KERNEL=="fm", OWNER="media", GROUP="media", MODE="0660"
|
||||
ACTION=="add", KERNEL=="spidev1.0", OWNER="system", GROUP="system", MODE="0666"
|
||||
ACTION=="add", KERNEL=="st21nfc", OWNER="nfc", GROUP="radio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="st54spi", OWNER="secure_element", GROUP="secure_element", MODE="0660"
|
||||
ACTION=="add", KERNEL=="btif", OWNER="system", GROUP="system", MODE="0600"
|
||||
ACTION=="add", KERNEL=="trusty-ipc-dev0", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="nebula-ipc-dev0", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="block/mmcblk0rpmb", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="mobicore", OWNER="system", GROUP="system", MODE="0600"
|
||||
ACTION=="add", KERNEL=="mobicore-user", OWNER="system", GROUP="system", MODE="0666"
|
||||
ACTION=="add", KERNEL=="t-base-tui", OWNER="system", GROUP="system", MODE="0666"
|
||||
ACTION=="add", KERNEL=="teeperf", OWNER="system", GROUP="system", MODE="0666"
|
||||
ACTION=="add", KERNEL=="video*", OWNER="camera", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="media*", OWNER="camera", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="v4l-subdev*", OWNER="camera", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="vcu", OWNER="camera", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="mtk_hcp", OWNER="camera", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="dri/card0", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="mddp", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="bus/usb/*", OWNER="root", GROUP="usb", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ttyUSB0", OWNER="radio", GROUP="radio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ttyUSB1", OWNER="radio", GROUP="radio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ttyUSB2", OWNER="radio", GROUP="radio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ttyUSB3", OWNER="radio", GROUP="radio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ttyUSB4", OWNER="radio", GROUP="radio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="log/ksystem", OWNER="root", GROUP="log", MODE="0600"
|
||||
ACTION=="add", KERNEL=="ccci*", OWNER="radio", GROUP="radio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ttyC*", OWNER="radio", GROUP="radio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="eemcs*", OWNER="radio", GROUP="radio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="emd*", OWNER="radio", GROUP="radio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ccci_pcm_rx", OWNER="audio", GROUP="audio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ccci_pcm_tx", OWNER="audio", GROUP="audio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ccci_aud", OWNER="audio", GROUP="audio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ccci2_aud", OWNER="audio", GROUP="audio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ccci3_aud", OWNER="audio", GROUP="audio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ccci_raw_audio", OWNER="audio", GROUP="audio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ccci3_raw_audio", OWNER="audio", GROUP="audio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="eemcs_aud", OWNER="audio", GROUP="audio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="irtx", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="lirc*", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ir-learning", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="pvrsrvkm", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="pvr_sync", OWNER="root", GROUP="root", MODE="0666"
|
||||
ACTION=="add", KERNEL=="mtgpio", OWNER="radio", GROUP="root", MODE="0600"
|
||||
ACTION=="add", KERNEL=="camera_eeprom*", OWNER="system", GROUP="camera", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ttySDIO*", OWNER="radio", GROUP="sdcard_rw", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ttyRB*", OWNER="radio", GROUP="radio", MODE="0660"
|
||||
ACTION=="add", KERNEL=="mali0", OWNER="system", GROUP="android_graphics", MODE="0666"
|
||||
ACTION=="add", KERNEL=="ion", OWNER="system", GROUP="android_graphics", MODE="0666"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_mm", OWNER="system", GROUP="android_graphics", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_mm-uncached", OWNER="system", GROUP="android_graphics", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_svp_page-uncached", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_prot_page-uncached", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_svp_region", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_svp_region-aligned", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_prot_region", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_prot_region-aligned", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_2d_fr_region", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_2d_fr_region-aligned", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_wfd_region", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_wfd_region-aligned", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_wfd_page-uncached", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_sapu_data_shm_region", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_sapu_data_shm_region-aligned", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_sapu_engine_shm_region", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="mtk_sapu_engine_shm_region-aligned", OWNER="system", GROUP="system", MODE="0444"
|
||||
ACTION=="add", KERNEL=="touch", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="hotknot", OWNER="root", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="RT_Monitor", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="kick_powerkey", OWNER="system", GROUP="system", MODE="0660"
|
||||
ACTION=="add", KERNEL=="ttyACM0", OWNER="radio", GROUP="radio", MODE="0660"
|
|
@ -0,0 +1,2 @@
|
|||
# ignore second Wi-Fi interface in NetworkManager
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wlan1", ENV{NM_UNMANAGED}="1"
|
2
overlay/system/usr/lib/udev/rules.d/99-z-android.rules
Normal file
2
overlay/system/usr/lib/udev/rules.d/99-z-android.rules
Normal file
|
@ -0,0 +1,2 @@
|
|||
# mmcblk0 is the SD card, not internal storage (unlike /usr/lib/udev/rules.d/99-android.rules specifies)
|
||||
ACTION=="add|change", KERNEL=="mmcblk0*", ENV{UDISKS_SYSTEM}=""
|
112
overlay/system/usr/libexec/umtprd-manager
Executable file
112
overlay/system/usr/libexec/umtprd-manager
Executable file
|
@ -0,0 +1,112 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
# Copyright (C) 2022 UBports Foundation.
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# This Python script exists because there's no convienient way for usb-moded, a
|
||||
# system service, to tell a user's systemd to start something. So, the control
|
||||
# is inverted: this script sits in user systemd & listen for a signal that emits
|
||||
# from usb-moded, and then start or stop the service as needed.
|
||||
|
||||
# This was further modified from /usr/libexec/mtp-server-usb-moded-watcher to
|
||||
# unlock access to MTP storage devices if/when the device gets unlocked itself.
|
||||
|
||||
from gi.repository import GLib, Gio
|
||||
from subprocess import run
|
||||
|
||||
is_greeter_active = True
|
||||
already_unlocked_storage = False
|
||||
mtp_enabled = False
|
||||
old_usb_mode = "undefined"
|
||||
|
||||
def handle_unlock():
|
||||
global already_unlocked_storage
|
||||
print(f"handle_unlock(): mtp_enabled={mtp_enabled}, already_unlocked_storage={already_unlocked_storage}, is_greeter_active={is_greeter_active}")
|
||||
if not mtp_enabled or already_unlocked_storage or is_greeter_active:
|
||||
# We only care about unlocking locked storage when MTP is enabled and not on lockscreen.
|
||||
return
|
||||
|
||||
run(["umtprd", "-cmd:unlock"])
|
||||
already_unlocked_storage = True
|
||||
|
||||
def handle_current_mode(mode: str):
|
||||
global mtp_enabled, old_usb_mode, already_unlocked_storage
|
||||
if mode == "busy":
|
||||
# This mode is transient, and a signal should be sent when the final
|
||||
# mode is reached.
|
||||
return
|
||||
|
||||
if mode != old_usb_mode:
|
||||
# Act like MTP wasn't enabled as it won't be when switching between
|
||||
# "mtp" and "mtp_adb" for example.
|
||||
already_unlocked_storage = False
|
||||
print(f"handle_current_mode(): {old_usb_mode} -> {mode}")
|
||||
old_usb_mode = mode
|
||||
|
||||
mtp_enabled = mode in ("mtp", "mtp_adb") # FIXME: better way for this list?
|
||||
handle_unlock()
|
||||
|
||||
def handle_dbus_properties_signal(
|
||||
obj, sender_name: str, signal_name: str, parameters: GLib.Variant
|
||||
):
|
||||
global is_greeter_active
|
||||
if signal_name != "PropertiesChanged":
|
||||
return
|
||||
|
||||
is_greeter_active = bool(parameters.get_child_value(1).get_child_value(0).get_child_value(1))
|
||||
handle_unlock()
|
||||
|
||||
def handle_usb_moded_signal(
|
||||
obj, sender_name: str, signal_name: str, parameters: GLib.Variant
|
||||
):
|
||||
if signal_name != "sig_usb_current_state_ind":
|
||||
return
|
||||
|
||||
mode = parameters.get_child_value(0).get_string()
|
||||
handle_current_mode(mode)
|
||||
|
||||
dbus_properties = Gio.DBusProxy.new_for_bus_sync(
|
||||
Gio.BusType.SESSION,
|
||||
Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES,
|
||||
None, # DBusInterfaceInfo
|
||||
"com.lomiri.LomiriGreeter",
|
||||
"/com/lomiri/LomiriGreeter",
|
||||
"org.freedesktop.DBus.Properties",
|
||||
None, # Cancellable
|
||||
)
|
||||
is_greeter_active = bool(dbus_properties.call_sync(
|
||||
"Get",
|
||||
GLib.Variant("(ss)", ("com.lomiri.LomiriGreeter", "IsActive")), # interface_name, property_name
|
||||
Gio.DBusCallFlags.NONE,
|
||||
500, # TimeoutMsec
|
||||
None, # Cancellable
|
||||
).get_child_value(0))
|
||||
# TODO: don't track locked state when cable unplugged?
|
||||
dbus_properties.connect("g-signal", handle_dbus_properties_signal)
|
||||
|
||||
usb_moded = Gio.DBusProxy.new_for_bus_sync(
|
||||
Gio.BusType.SYSTEM,
|
||||
Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES,
|
||||
None, # DBusInterfaceInfo
|
||||
"com.meego.usb_moded",
|
||||
"/com/meego/usb_moded",
|
||||
"com.meego.usb_moded",
|
||||
None, # Cancellable
|
||||
)
|
||||
usb_moded.connect("g-signal", handle_usb_moded_signal)
|
||||
current_mode = usb_moded.call_sync(
|
||||
"mode_request",
|
||||
None, # Parameters
|
||||
Gio.DBusCallFlags.NONE,
|
||||
500, # TimeoutMsec
|
||||
None, # Cancellable
|
||||
).get_child_value(0).get_string()
|
||||
handle_current_mode(current_mode)
|
||||
|
||||
# TODO: keep track of removable disks via UDisks2 (HintSystem=false) with MountPoints[0]
|
||||
# and IdLabel/IdUUID used for e.g.
|
||||
# - umtprd '-cmd:addstorage:"/media/phablet/1234-5678" "1234-5678" rw'
|
||||
# - umtprd '-cmd:rmstorage:"1234-5678"'
|
||||
|
||||
loop = GLib.MainLoop(None)
|
||||
loop.run()
|
18
overlay/system/usr/libexec/usb-moded/umtprd-functionfs.sh
Executable file
18
overlay/system/usr/libexec/usb-moded/umtprd-functionfs.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
USB_GADGET=/sys/kernel/config/usb_gadget
|
||||
|
||||
if [ -d "${USB_GADGET}/g1" ]; then
|
||||
# The USB function must exists for functionfs to be available for mounting.
|
||||
mkdir -p "${USB_GADGET}/g1/functions/ffs.mtp"
|
||||
fi
|
||||
|
||||
mkdir -p /dev/usb-ffs
|
||||
chmod 0770 /dev/usb-ffs
|
||||
chown phablet:phablet /dev/usb-ffs
|
||||
mkdir -p /dev/usb-ffs/mtp
|
||||
chmod 0770 /dev/usb-ffs/mtp
|
||||
chown phablet:phablet /dev/usb-ffs/mtp
|
||||
/bin/mount -t functionfs mtp /dev/usb-ffs/mtp -o uid=phablet,gid=phablet
|
||||
exit 0
|
BIN
overlay/system/usr/sbin/aethercast
Normal file
BIN
overlay/system/usr/sbin/aethercast
Normal file
Binary file not shown.
BIN
overlay/system/usr/sbin/usb_moded
Executable file
BIN
overlay/system/usr/sbin/usb_moded
Executable file
Binary file not shown.
|
@ -0,0 +1,2 @@
|
|||
# Video decoding
|
||||
/dev/dma_heap/mtk_mm r,
|
141
overlay/system/usr/share/halium-overlay/etc/pulse/touch.pa
Normal file
141
overlay/system/usr/share/halium-overlay/etc/pulse/touch.pa
Normal file
|
@ -0,0 +1,141 @@
|
|||
#!/usr/bin/pulseaudio -nF
|
||||
#
|
||||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# PulseAudio is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
# This startup script is used only if PulseAudio is started per-user
|
||||
# (i.e. not in system mode)
|
||||
|
||||
# This script is specific to Ubuntu Touch
|
||||
# Needed to avoid conflicting policies with desktop
|
||||
|
||||
.fail
|
||||
|
||||
### Automatically restore the volume of streams
|
||||
load-module module-stream-restore restore_device=false restore_muted=false fallback_table=/etc/pulse/touch-stream-restore.table
|
||||
|
||||
### Automatically augment property information from .desktop files
|
||||
### stored in /usr/share/application
|
||||
load-module module-augment-properties
|
||||
|
||||
### Should be after module-*-restore but before module-*-detect
|
||||
load-module module-switch-on-port-available
|
||||
|
||||
### Switch when connected by default
|
||||
load-module module-switch-on-connect
|
||||
|
||||
### Fake sink and source used by HSP
|
||||
### (loaded before Droid to avoid automatically switching to these sink/source)
|
||||
load-module module-null-sink sink_name=sink.fake.sco rate=8000 channels=1
|
||||
load-module module-null-source source_name=source.fake.sco rate=8000 channels=1
|
||||
|
||||
### Allow PulseAudio Droid configuration part to be customized per-device
|
||||
.ifexists /etc/pulse/droid_card_custom.pa
|
||||
.include /etc/pulse/droid_card_custom.pa
|
||||
.else
|
||||
### Automatically load the Pulseaudio Droid
|
||||
load-module module-droid-discover voice_virtual_stream=true hidl_args='helper=false'
|
||||
.endif
|
||||
|
||||
### Automatically load the trust-store module
|
||||
.ifexists module-trust-store.so
|
||||
load-module module-trust-store
|
||||
.endif
|
||||
|
||||
### Automatically load driver modules depending on the hardware available
|
||||
#.ifexists module-udev-detect.so
|
||||
#load-module module-udev-detect
|
||||
#.endif
|
||||
|
||||
### Automatically connect sink and source if JACK server is present
|
||||
.ifexists module-jackdbus-detect.so
|
||||
.nofail
|
||||
load-module module-jackdbus-detect channels=2
|
||||
.fail
|
||||
.endif
|
||||
|
||||
### Automatically load driver modules for Bluetooth hardware
|
||||
.ifexists module-bluetooth-policy.so
|
||||
load-module module-bluetooth-policy
|
||||
.endif
|
||||
|
||||
.ifexists module-bluez5-discover.so
|
||||
load-module module-bluez5-discover profile=a2dp_sink sco_sink=sink.fake.sco sco_source=source.fake.sco
|
||||
.endif
|
||||
|
||||
### Load several protocols
|
||||
.ifexists module-esound-protocol-unix.so
|
||||
load-module module-esound-protocol-unix
|
||||
.endif
|
||||
load-module module-native-protocol-unix
|
||||
|
||||
### Network access (may be configured with paprefs, so leave this commented
|
||||
### here if you plan to use paprefs)
|
||||
#load-module module-esound-protocol-tcp
|
||||
#load-module module-native-protocol-tcp
|
||||
#load-module module-zeroconf-publish
|
||||
|
||||
### Load the RTP receiver module (also configured via paprefs, see above)
|
||||
#load-module module-rtp-recv
|
||||
|
||||
### Load the RTP sender module (also configured via paprefs, see above)
|
||||
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
|
||||
#load-module module-rtp-send source=rtp.monitor
|
||||
|
||||
### Load additional modules from GConf settings. This can be configured with the paprefs tool.
|
||||
### Please keep in mind that the modules configured by paprefs might conflict with manually
|
||||
### loaded modules.
|
||||
.ifexists module-gconf.so
|
||||
.nofail
|
||||
load-module module-gconf
|
||||
.fail
|
||||
.endif
|
||||
|
||||
### Make sure we always have a sink around, even if it is a null sink.
|
||||
load-module module-always-sink
|
||||
|
||||
### Automatically suspend sinks/sources that become idle for too long
|
||||
load-module module-suspend-on-idle
|
||||
|
||||
### If autoexit on idle is enabled we want to make sure we only quit
|
||||
### when no local session needs us anymore.
|
||||
.ifexists module-console-kit.so
|
||||
load-module module-console-kit
|
||||
.endif
|
||||
.ifexists module-systemd-login.so
|
||||
load-module module-systemd-login
|
||||
.endif
|
||||
|
||||
### Enable positioned event sounds
|
||||
load-module module-position-event-sounds
|
||||
|
||||
### Cork music/video streams when a phone stream is active
|
||||
load-module module-role-cork trigger_roles=phone,alarm cork_roles=alarm,multimedia global=true
|
||||
|
||||
### Ducking streams when certain roles are active
|
||||
load-module module-role-ducking trigger_roles=alert ducking_roles=multimedia volume=-20dB
|
||||
|
||||
### Load DBus protocol
|
||||
.ifexists module-dbus-protocol.so
|
||||
load-module module-dbus-protocol
|
||||
.endif
|
||||
|
||||
### Modules to allow autoloading of filters (such as echo cancellation)
|
||||
### on demand. module-filter-heuristics tries to determine what filters
|
||||
### make sense, and module-filter-apply does the heavy-lifting of
|
||||
### loading modules and rerouting streams.
|
||||
load-module module-filter-heuristics
|
||||
load-module module-filter-apply
|
|
@ -0,0 +1,10 @@
|
|||
# Model for libdeviceinfo
|
||||
ro.product.vendor.device=prithvi
|
||||
# Camera model for taken pictures
|
||||
ro.product.model=BraX3
|
||||
# MTP device name
|
||||
ro.product.vendor.model=BraX3
|
||||
# Manufacturer in host dmesg
|
||||
ro.product.vendor.manufacturer=BraX
|
||||
# Use Mali GLES directly instead of hacky/semi-broken MediaTek MEOW wrapper
|
||||
ro.hardware.egl=mali
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Allow ayatana-indicator-power to toggle torchlight
|
||||
chmod g+w /sys/class/flashlight_core/flashlight/flashlight_torch
|
||||
chgrp phablet /sys/class/flashlight_core/flashlight/flashlight_torch
|
||||
|
||||
# Wait for the property system to be up.
|
||||
while [ ! -e /dev/socket/property_service ]; do sleep 0.1; done
|
||||
|
||||
# Wait for nvram to be loaded.
|
||||
while [ "$(getprop vendor.service.nvram_init)" != "Ready" ]; do sleep 0.2; done
|
||||
while [ "$(getprop vendor.mtk.nvram.ready)" != "1" ]; do sleep 0.2; done
|
||||
|
||||
# set wifi.interface property since urfkill.conf expects that
|
||||
setprop wifi.interface wlan0
|
||||
|
||||
|
||||
# Wait for /dev/wmtWifi to exist..
|
||||
while [ ! -c /dev/wmtWifi ]; do sleep 0.2; done
|
||||
|
||||
# Silence all wlan debug logging down to just errors/warnings
|
||||
printf '0xFF:0x03' > /proc/net/wlan/dbgLevel
|
||||
|
||||
# Finally enable the adapter in P2P mode
|
||||
echo P > /dev/wmtWifi
|
||||
|
||||
# enables wireless display support
|
||||
setprop debug.stagefright.c2inputsurface 1
|
||||
setprop ubuntu.widi.supported 1
|
||||
|
||||
# Enable WoWLAN to avoid network disconnect before suspend
|
||||
while [ ! -e /sys/class/ieee80211/phy0 ]; do sleep 1; done
|
||||
iw phy phy0 wowlan enable magic-packet
|
||||
|
||||
# Disable graphics.allocator service in Waydroid as it should use the host one
|
||||
if [ ! -e /var/lib/waydroid/overlay/vendor/etc/init/android.hardware.graphics.allocator@2.0-service.rc ]; then
|
||||
mkdir -p /var/lib/waydroid/overlay/vendor/etc/init
|
||||
ln -sf /dev/null /var/lib/waydroid/overlay/vendor/etc/init/android.hardware.graphics.allocator@2.0-service.rc
|
||||
fi
|
296
overlay/system/usr/share/halium-overlay/vendor/etc/audio_policy_configuration.xml
vendored
Normal file
296
overlay/system/usr/share/halium-overlay/vendor/etc/audio_policy_configuration.xml
vendored
Normal file
|
@ -0,0 +1,296 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!-- Copyright (C) 2015 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.
|
||||
-->
|
||||
|
||||
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
|
||||
|
||||
<!-- Global configuration Decalaration -->
|
||||
<globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true"/>
|
||||
|
||||
<!-- Modules section:
|
||||
There is one section per audio HW module present on the platform.
|
||||
Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”.
|
||||
The module names are the same as in current .conf file:
|
||||
“primary”, “A2DP”, “remote_submix”, “USB”
|
||||
Each module will contain the following sections:
|
||||
“devicePorts”: a list of device descriptors for all input and output devices accessible via this
|
||||
module.
|
||||
This contains both permanently attached devices and removable devices.
|
||||
“mixPorts”: listing all output and input streams exposed by the audio HAL
|
||||
“routes”: list of possible connections between input and output devices or between stream and
|
||||
devices.
|
||||
"route": is defined by an attribute:
|
||||
-"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix)
|
||||
-"sink": the sink involved in this route
|
||||
-"sources": all the sources than can be connected to the sink via vis route
|
||||
“attachedDevices”: permanently attached devices.
|
||||
The attachedDevices section is a list of devices names. The names correspond to device names
|
||||
defined in <devicePorts> section.
|
||||
“defaultOutputDevice”: device to be used by default when no policy rule applies
|
||||
-->
|
||||
<modules>
|
||||
<!-- Primary Audio HAL -->
|
||||
<module name="primary" halVersion="3.0">
|
||||
<attachedDevices>
|
||||
<item>Speaker</item>
|
||||
<item>Earpiece</item>
|
||||
<item>Built-In Mic</item>
|
||||
<item>Built-In Back Mic</item>
|
||||
<item>FM Tuner In</item>
|
||||
<item>Voice Call In</item>
|
||||
<item>Echo Ref In</item>
|
||||
<item>Telephony Tx</item>
|
||||
</attachedDevices>
|
||||
<defaultOutputDevice>Speaker</defaultOutputDevice>
|
||||
<mixPorts>
|
||||
<mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="deep_buffer" role="source" flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="voip_rx" role="source" flags="AUDIO_OUTPUT_FLAG_VOIP_RX">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="16000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="16000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="incall_music_uplink" role="source" flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="primary input" role="sink" maxOpenCount="1" maxActiveCount="1">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="voice tx" role="sink" maxOpenCount="1" maxActiveCount="1">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="FM Tuner input" role="sink" maxOpenCount="1" maxActiveCount="1">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="voip_tx" role="sink" flags="AUDIO_INPUT_FLAG_VOIP_TX" maxOpenCount="1" maxActiveCount="1">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_FAST" maxOpenCount="1" maxActiveCount="1">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="hifi_playback" role="source"/>
|
||||
<mixPort name="hifi_input" role="sink"/>
|
||||
</mixPorts>
|
||||
<devicePorts>
|
||||
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
|
||||
<devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Analog Dock Headset" type="AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Digital Dock Headset" type="AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="FM Tuner Out" type="AUDIO_DEVICE_OUT_FM" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
|
||||
<devicePort tagName="USB Primary Out" type="AUDIO_DEVICE_OUT_BUS" role="sink" address="usb_phone_call">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="AUX Digital In" type="AUDIO_DEVICE_IN_AUX_DIGITAL" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="FM Tuner In" type="AUDIO_DEVICE_IN_FM_TUNER" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Echo Ref In" type="AUDIO_DEVICE_IN_ECHO_REFERENCE" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Primary In" type="AUDIO_DEVICE_IN_BUS" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Voice Call In" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
<gains>
|
||||
<gain name="gain_1" mode="AUDIO_GAIN_MODE_JOINT"
|
||||
minValueMB="-8400"
|
||||
maxValueMB="4000"
|
||||
defaultValueMB="0"
|
||||
stepValueMB="100"/>
|
||||
</gains>
|
||||
</devicePort>
|
||||
</devicePorts>
|
||||
<!-- route declaration, i.e. list all available sources for a given sink -->
|
||||
<routes>
|
||||
<route type="mix" sink="Earpiece"
|
||||
sources="primary output,deep_buffer,voip_rx,Voice Call In"/>
|
||||
<route type="mix" sink="Speaker"
|
||||
sources="primary output,deep_buffer,FM Tuner In,voip_rx,Voice Call In"/>
|
||||
<route type="mix" sink="Wired Headset"
|
||||
sources="primary output,deep_buffer,FM Tuner In,voip_rx,Voice Call In"/>
|
||||
<route type="mix" sink="Wired Headphones"
|
||||
sources="primary output,deep_buffer,FM Tuner In,voip_rx,Voice Call In"/>
|
||||
<route type="mix" sink="BT SCO"
|
||||
sources="primary output,deep_buffer,voip_rx,Voice Call In"/>
|
||||
<route type="mix" sink="BT SCO Headset"
|
||||
sources="primary output,deep_buffer,voip_rx,Voice Call In"/>
|
||||
<route type="mix" sink="BT SCO Car Kit"
|
||||
sources="primary output,deep_buffer,voip_rx,Voice Call In"/>
|
||||
<route type="mix" sink="Analog Dock Headset"
|
||||
sources="primary output"/>
|
||||
<route type="mix" sink="Digital Dock Headset"
|
||||
sources="primary output"/>
|
||||
<route type="mix" sink="FM Tuner Out"
|
||||
sources="primary output"/>
|
||||
<route type="mix" sink="USB Primary Out"
|
||||
sources="primary output,Voice Call In"/>
|
||||
<route type="mix" sink="Telephony Tx"
|
||||
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,USB Primary In,incall_music_uplink"/>
|
||||
<route type="mix" sink="primary input"
|
||||
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,AUX Digital In,USB Primary In"/>
|
||||
<route type="mix" sink="voice tx"
|
||||
sources="Voice Call In"/>
|
||||
<route type="mix" sink="FM Tuner input"
|
||||
sources="FM Tuner In,Echo Ref In"/>
|
||||
<route type="mix" sink="hifi_input"
|
||||
sources="USB Primary In"/>
|
||||
<route type="mix" sink="voip_tx"
|
||||
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,AUX Digital In,USB Primary In"/>
|
||||
<route type="mix" sink="fast input"
|
||||
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,AUX Digital In,USB Primary In"/>
|
||||
</routes>
|
||||
|
||||
</module>
|
||||
|
||||
<!-- BT Audio HAL -->
|
||||
<xi:include href="bluetooth_audio_policy_configuration.xml"/>
|
||||
|
||||
<!-- A2dp Input Audio HAL -->
|
||||
<xi:include href="a2dp_in_audio_policy_configuration.xml"/>
|
||||
|
||||
<!-- Usb Audio HAL -->
|
||||
<xi:include href="usb_audio_accessory_only_policy_configuration.xml"/>
|
||||
|
||||
<!-- Remote Submix Audio HAL -->
|
||||
<xi:include href="r_submix_audio_policy_configuration.xml"/>
|
||||
|
||||
</modules>
|
||||
<!-- End of Modules section -->
|
||||
|
||||
<!-- Volume section -->
|
||||
|
||||
<xi:include href="audio_policy_volumes.xml"/>
|
||||
<xi:include href="default_volume_tables.xml"/>
|
||||
|
||||
<!-- End of Volume section -->
|
||||
|
||||
</audioPolicyConfiguration>
|
10
overlay/system/usr/share/halium-overlay/vendor/etc/init/vndservicemanager.rc
vendored
Normal file
10
overlay/system/usr/share/halium-overlay/vendor/etc/init/vndservicemanager.rc
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
service vndservicemanager /vendor/bin/vndservicemanager /dev/vndbinder
|
||||
setenv LD_PRELOAD libselinux_stubs.so
|
||||
class core
|
||||
user system
|
||||
group system readproc
|
||||
writepid /dev/cpuset/system-background/tasks
|
||||
onrestart class_restart main
|
||||
onrestart class_restart hal
|
||||
onrestart class_restart early_hal
|
||||
shutdown critical
|
1
overlay/system/usr/share/halium-overlay/vendor/lib64/hw/gralloc.common.so
vendored
Symbolic link
1
overlay/system/usr/share/halium-overlay/vendor/lib64/hw/gralloc.common.so
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
/dev/null
|
1
overlay/system/usr/share/halium-overlay/vendor/lib64/hw/gralloc.default.so
vendored
Symbolic link
1
overlay/system/usr/share/halium-overlay/vendor/lib64/hw/gralloc.default.so
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
/dev/null
|
|
@ -0,0 +1,381 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright (c) 2009, The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<!-- These resources are around just to allow their values to be customized
|
||||
for different hardware and product builds. Do not translate. -->
|
||||
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
|
||||
<!-- Controls the navigation bar interaction mode:
|
||||
0: 3 button mode (back, home, overview buttons)
|
||||
1: 2 button mode (back, home buttons + swipe up for overview)
|
||||
2: gestures only for back, home and overview -->
|
||||
<integer name="config_navBarInteractionMode">0</integer>
|
||||
|
||||
<!-- If true, the screen can be rotated via the accelerometer in all 4
|
||||
rotations as the default behavior. -->
|
||||
<bool name="config_allowAllRotations">true</bool>
|
||||
|
||||
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
|
||||
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
|
||||
<bool name="config_automatic_brightness_available">true</bool>
|
||||
|
||||
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
|
||||
carrier provisioning. If false: hard disabled. If true: then depends on carrier
|
||||
provisioning, availability etc -->
|
||||
<bool name="config_carrier_volte_available">true</bool>
|
||||
<bool name="config_carrier_volte_tty_supported">true</bool>
|
||||
|
||||
<!-- Flag specifying whether WFC over IMS should be available for carrier: independent of
|
||||
carrier provisioning. If false: hard disabled. If true: then depends on carrier
|
||||
provisioning, availability etc -->
|
||||
<bool name="config_carrier_wfc_ims_available">true</bool>
|
||||
|
||||
<!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. -->
|
||||
<bool name="config_cellBroadcastAppLinks">true</bool>
|
||||
|
||||
<!-- Flag specifying whether VoLTE is available on device -->
|
||||
<bool name="config_device_volte_available">true</bool>
|
||||
|
||||
<!-- Flag specifying whether VT is available on device -->
|
||||
<bool name="config_device_vt_available">true</bool>
|
||||
|
||||
<!-- Flag specifying whether WFC over IMS is available on device -->
|
||||
<bool name="config_device_wfc_ims_available">true</bool>
|
||||
|
||||
<!-- Is the notification LED intrusive? Used to decide if there should be a disable option -->
|
||||
<bool name="config_intrusiveNotificationLed">true</bool>
|
||||
|
||||
<!-- Default files to pin via Pinner Service -->
|
||||
<string-array name="config_defaultPinnerServiceFiles">
|
||||
<item>/system/framework/framework.jar</item>
|
||||
<item>/system/framework/services.jar</item>
|
||||
<item>/apex/com.android.media/javalib/updatable-media.jar</item>
|
||||
<item>/apex/com.android.art/javalib/core-oj.jar</item>
|
||||
<item>/apex/com.android.art/javalib/core-libart.jar</item>
|
||||
<item>/system_ext/priv-app/SystemUI/SystemUI.apk</item>
|
||||
<item>/system/bin/surfaceflinger</item>
|
||||
<item>/system/lib64/libRS.so</item>
|
||||
<item>/system/lib64/libRSCpuRef.so</item>
|
||||
<item>/system/lib64/libRSDriver.so</item>
|
||||
<item>/system/lib64/libRS_internal.so</item>
|
||||
<item>/system/lib64/libRScpp.so</item>
|
||||
<item>/system/lib64/libbcinfo.so</item>
|
||||
<item>/system/lib64/libblas.so</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Enable Zram writeback feature to allow unused pages in zram be written to flash. -->
|
||||
<bool name="config_zramWriteback">true</bool>
|
||||
|
||||
<!-- These are system packages exempted from privacy indicator -->
|
||||
<string-array name="config_locationExtraPackageNames" translatable="false">
|
||||
<!-- ImsService -->
|
||||
<item>com.mediatek.ims</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Should the pinner service pin the Camera application? -->
|
||||
<bool name="config_pinnerCameraApp">true</bool>
|
||||
|
||||
<!-- Should the pinner service pin the Home application? -->
|
||||
<bool name="config_pinnerHomeApp">true</bool>
|
||||
|
||||
<!-- Power Management: Specifies whether to decouple the auto-suspend state of the
|
||||
device from the display on/off state.
|
||||
When false, autosuspend_disable() will be called before the display is turned on
|
||||
and autosuspend_enable() will be called after the display is turned off.
|
||||
This mode provides best compatibility for devices using legacy power management
|
||||
features such as early suspend / late resume.
|
||||
When true, autosuspend_display() and autosuspend_enable() will be called
|
||||
independently of whether the display is being turned on or off. This mode
|
||||
enables the power manager to suspend the application processor while the
|
||||
display is on.
|
||||
This resource should be set to "true" when a doze component has been specified
|
||||
to maximize power savings but not all devices support it.
|
||||
Refer to autosuspend.h for details.
|
||||
-->
|
||||
<bool name="config_powerDecoupleAutoSuspendModeFromDisplay">false</bool>
|
||||
|
||||
<!-- Power Management: Specifies whether to decouple the interactive state of the
|
||||
device from the display on/off state.
|
||||
When false, setInteractive(..., true) will be called before the display is turned on
|
||||
and setInteractive(..., false) will be called after the display is turned off.
|
||||
This mode provides best compatibility for devices that expect the interactive
|
||||
state to be tied to the display state.
|
||||
When true, setInteractive(...) will be called independently of whether the display
|
||||
is being turned on or off. This mode enables the power manager to reduce
|
||||
clocks and disable the touch controller while the display is on.
|
||||
This resource should be set to "true" when a doze component has been specified
|
||||
to maximize power savings but not all devices support it.
|
||||
Refer to power.h for details.
|
||||
-->
|
||||
<bool name="config_powerDecoupleInteractiveModeFromDisplay">false</bool>
|
||||
|
||||
<!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently in hardware. -->
|
||||
<bool name="config_setColorTransformAccelerated">true</bool>
|
||||
|
||||
<!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
|
||||
autodetected from the Configuration. -->
|
||||
<bool name="config_showNavigationBar">true</bool>
|
||||
|
||||
<!-- Indicate whether to allow the device to suspend when the screen is off
|
||||
due to the proximity sensor. This resource should only be set to true
|
||||
if the sensor HAL correctly handles the proximity sensor as a wake-up source.
|
||||
Otherwise, the device may fail to wake out of suspend reliably.
|
||||
The default is false. -->
|
||||
<bool name="config_suspendWhenScreenOffDueToProximity">false</bool>
|
||||
|
||||
<!-- Is the device capable of hot swapping an UICC Card -->
|
||||
<bool name="config_hotswapCapable">true</bool>
|
||||
|
||||
<!-- Configure mobile tcp buffer sizes in the form:
|
||||
rat-name:rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max
|
||||
If no value is found for the rat-name in use, the system default will be applied.
|
||||
-->
|
||||
<string-array name="config_mobile_tcp_buffers">
|
||||
<item>gprs:4092,8760,48000,4096,8760,48000</item>
|
||||
<item>edge:4093,26280,70800,4096,16384,70800</item>
|
||||
<item>umts:58254,1398100,4194304,58254,1398100,4194304</item>
|
||||
<item>1xrtt:16384,32768,131072,4096,16384,102400</item>
|
||||
<item>evdo:4094,87380,262144,4096,16384,262144</item>
|
||||
<item>ehrpd:131072,262144,1048576,4096,16384,524288</item>
|
||||
<item>hsdpa:58254,1398100,4194304,58254,1398100,4194304</item>
|
||||
<item>hspa:58254,1398100,4194304,58254,1398100,4194304</item>
|
||||
<item>lte:2097152,4194304,8388608,262144,524288,1048576</item>
|
||||
<item>hspap:58254,1398100,4194304,58254,1398100,4194304</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Amount of time it takes for the light sensor to warm up in milliseconds.
|
||||
For this time after the screen turns on, the Power Manager
|
||||
will not debounce light sensor readings -->
|
||||
<integer name="config_lightSensorWarmupTime">200</integer>
|
||||
|
||||
<!-- Config determines whether to update phone object when voice registration
|
||||
state changes. Voice radio tech change will always trigger an update of
|
||||
phone object irrespective of this config -->
|
||||
<bool name="config_switch_phone_on_voice_reg_state_change">false</bool>
|
||||
|
||||
<!-- If this is true, the screen will come on when you unplug usb/power/whatever. -->
|
||||
<bool name="config_unplugTurnsOnScreen">true</bool>
|
||||
|
||||
<!-- Indicate whether closing the lid causes the device to go to sleep and opening
|
||||
it causes the device to wake up.
|
||||
The default is false. -->
|
||||
<bool name="config_lidControlsSleep">true</bool>
|
||||
|
||||
<!-- When true use the linux /dev/input/event subsystem to detect the switch changes
|
||||
on the headphone/microphone jack. When false use the older uevent framework. -->
|
||||
<bool name="config_useDevInputEventForAudioJack">true</bool>
|
||||
|
||||
<!-- The maximum range of gamma adjustment possible using the screen
|
||||
auto-brightness adjustment setting. -->
|
||||
<fraction name="config_autoBrightnessAdjustmentMaxGamma">300.0%</fraction>
|
||||
|
||||
<!-- User activity timeout: Maximum screen dim duration as a percentage of screen off timeout.
|
||||
|
||||
This resource is similar to config_maximumScreenDimDuration but the maximum
|
||||
screen dim duration is defined as a ratio of the overall screen off timeout
|
||||
instead of as an absolute value in milliseconds. This is useful for reducing
|
||||
the dim duration when the screen off timeout is very short.
|
||||
|
||||
When computing the screen dim duration, the power manager uses the lesser
|
||||
of the effective durations expressed by config_maximumScreenDimDuration and
|
||||
config_maximumScreenDimRatio.
|
||||
|
||||
This value must be between 0% and 100%. If the value is zero, the screen will not
|
||||
dim before the device goes to sleep.
|
||||
-->
|
||||
<fraction name="config_maximumScreenDimRatio">20.000004%</fraction>
|
||||
|
||||
<!-- Stability requirements in milliseconds for accepting a new brightness level. This is used
|
||||
for debouncing the light sensor. Different constants are used to debounce the light sensor
|
||||
when adapting to brighter or darker environments. This parameter controls how quickly
|
||||
brightness changes occur in response to an observed change in light level that exceeds the
|
||||
hysteresis threshold. -->
|
||||
<integer name="config_autoBrightnessBrighteningLightDebounce">4000</integer>
|
||||
<integer name="config_autoBrightnessDarkeningLightDebounce">8000</integer>
|
||||
|
||||
<!-- Light sensor event rate in milliseconds for automatic brightness control. -->
|
||||
<integer name="config_autoBrightnessLightSensorRate">250</integer>
|
||||
|
||||
<!-- Operating volatage for bluetooth controller. 0 by default-->
|
||||
<integer name="config_bluetooth_operating_voltage_mv">0</integer>
|
||||
|
||||
<!-- Fast brightness animation ramp rate in brightness units per second-->
|
||||
<integer name="config_brightness_ramp_rate_fast">180</integer>
|
||||
|
||||
<!-- Slow brightness animation ramp rate in brightness units per second-->
|
||||
<integer name="config_brightness_ramp_rate_slow">60</integer>
|
||||
|
||||
<!-- Maximum color temperature, in Kelvin, supported by display white balance. -->
|
||||
<integer name="config_displayWhiteBalanceColorTemperatureMax">8000</integer>
|
||||
|
||||
<!-- Minimum color temperature, in Kelvin, supported by display white balance. -->
|
||||
<integer name="config_displayWhiteBalanceColorTemperatureMin">4000</integer>
|
||||
|
||||
<!-- Number of physical SIM slots on the device. This includes both eSIM and pSIM slots, and
|
||||
is not necessarily the same as the number of phones/logical modems supported by the device.
|
||||
For example, a multi-sim device can have 2 phones/logical modems, but 3 physical slots,
|
||||
or a single SIM device can have 1 phones/logical modems, but 2 physical slots (one eSIM
|
||||
and one pSIM) -->
|
||||
<integer name="config_num_physical_slots">2</integer>
|
||||
|
||||
<!-- Whether WiFi display is supported by this device.
|
||||
There are many prerequisites for this feature to work correctly.
|
||||
Here are a few of them:
|
||||
* The WiFi radio must support WiFi P2P.
|
||||
* The WiFi radio must support concurrent connections to the WiFi display and
|
||||
to an access point.
|
||||
* The Audio Flinger audio_policy.conf file must specify a rule for the "r_submix"
|
||||
remote submix module. This module is used to record and stream system
|
||||
audio output to the WiFi display encoder in the media server.
|
||||
* The remote submix module "audio.r_submix.default" must be installed on the device.
|
||||
* The device must be provisioned with HDCP keys (for protected content).
|
||||
-->
|
||||
<bool name="config_enableWifiDisplay">true</bool>
|
||||
|
||||
<!-- Screen brightness used to dim the screen when the user activity
|
||||
timeout expires. May be less than the minimum allowed brightness setting
|
||||
that can be set by the user. -->
|
||||
<integer name="config_screenBrightnessDim">10</integer>
|
||||
|
||||
<!-- Screen brightness used to dim the screen while dozing in a very low power state.
|
||||
May be less than the minimum allowed brightness setting
|
||||
that can be set by the user. -->
|
||||
<integer name="config_screenBrightnessDoze">5</integer>
|
||||
|
||||
<!-- Default screen brightness setting.
|
||||
Must be in the range specified by minimum and maximum. -->
|
||||
<item name="config_screenBrightnessSettingDefaultFloat" format="float" type="dimen">0.51</item>
|
||||
|
||||
<!-- Maximum screen brightness allowed by the power manager.
|
||||
-2 is invalid so setting will resort to int value specified above.
|
||||
Set this to 1.0 for maximum brightness range.
|
||||
The user is forbidden from setting the brightness above this level. -->
|
||||
<item name="config_screenBrightnessSettingMaximumFloat" format="float" type="dimen">1.0</item>
|
||||
|
||||
<!-- Minimum screen brightness setting allowed by the power manager.
|
||||
The user is forbidden from setting the brightness below this level. -->
|
||||
<item name="config_screenBrightnessSettingMinimumFloat" format="float" type="dimen">0.03</item>
|
||||
|
||||
<integer-array name="config_autoBrightnessLcdBacklightValues">
|
||||
<item>8</item>
|
||||
<item>64</item>
|
||||
<item>98</item>
|
||||
<item>104</item>
|
||||
<item>110</item>
|
||||
<item>116</item>
|
||||
<item>122</item>
|
||||
<item>128</item>
|
||||
<item>134</item>
|
||||
<item>182</item>
|
||||
<item>255</item>
|
||||
<item>255</item>
|
||||
<item>255</item>
|
||||
<item>255</item>
|
||||
<item>255</item>
|
||||
<item>255</item>
|
||||
<item>255</item>
|
||||
<item>255</item>
|
||||
</integer-array>
|
||||
|
||||
<integer-array name="config_autoBrightnessLevels">
|
||||
<item>128</item>
|
||||
<item>256</item>
|
||||
<item>384</item>
|
||||
<item>512</item>
|
||||
<item>640</item>
|
||||
<item>768</item>
|
||||
<item>896</item>
|
||||
<item>1024</item>
|
||||
<item>2048</item>
|
||||
<item>4096</item>
|
||||
<item>6144</item>
|
||||
<item>8192</item>
|
||||
<item>10240</item>
|
||||
<item>12288</item>
|
||||
<item>14336</item>
|
||||
<item>16384</item>
|
||||
<item>18432</item>
|
||||
</integer-array>
|
||||
|
||||
<!-- Vibrator pattern for feedback about a long screen/key press -->
|
||||
<integer-array name="config_longPressVibePattern">
|
||||
<item>0</item>
|
||||
<item>30</item>
|
||||
</integer-array>
|
||||
|
||||
<!-- Vibrator pattern for feedback about touching a virtual key -->
|
||||
<integer-array name="config_virtualKeyVibePattern">
|
||||
<item>0</item>
|
||||
<item>20</item>
|
||||
</integer-array>
|
||||
|
||||
<!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx],
|
||||
[associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
|
||||
<!-- the 5th element "resore-time" indicates the number of milliseconds to delay
|
||||
before automatically restore the default connection. Set -1 if the connection
|
||||
does not require auto-restore. -->
|
||||
<!-- the 6th element indicates boot-time dependency-met value. -->
|
||||
<string-array name="networkAttributes">
|
||||
<item>wifi,1,1,1,-1,true</item>
|
||||
<item>mobile,0,0,0,-1,true</item>
|
||||
<item>mobile_mms,2,0,2,300000,true</item>
|
||||
<item>mobile_supl,3,0,2,60000,true</item>
|
||||
<item>mobile_dun,4,0,2,60000,true</item>
|
||||
<item>mobile_hipri,5,0,3,60000,true</item>
|
||||
<item>mobile_fota,10,0,2,60000,true</item>
|
||||
<item>mobile_ims,11,0,-1,-1,true</item>
|
||||
<item>mobile_cbs,12,0,2,60000,true</item>
|
||||
<item>bluetooth,7,7,2,-1,true</item>
|
||||
<item>ethernet,9,9,4,-1,true</item>
|
||||
<item>wifi_p2p,13,1,0,-1,true</item>
|
||||
<item>mobile_ia,14,0,2,-1,true</item>
|
||||
<item>mobile_emergency,15,0,2,-1,true</item>
|
||||
<item>mobile_dm,20,0,3,60000,true</item>
|
||||
<item>mobile_wap,21,0,3,60000,true</item>
|
||||
<item>mobile_net,22,0,3,60000,true</item>
|
||||
<item>mobile_cmmail,23,0,3,60000,true</item>
|
||||
<item>mobile_rcse,24,0,3,60000,true</item>
|
||||
<item>mobile_xcap,25,0,3,60000,true</item>
|
||||
<item>mobile_rcs,26,0,3,60000,true</item>
|
||||
<item>mobile_bip,27,0,3,60000,true</item>
|
||||
<item>mobile_vsim,28,0,-1,60000,true</item>
|
||||
<item>mobile_preempt,29,0,9,60000,true</item>
|
||||
<item>wifi_slave,40,1,0,-1,true</item>
|
||||
</string-array>
|
||||
|
||||
<!-- This string array should be overridden by the device to present a list of radio
|
||||
attributes. This is used by the connectivity manager to decide which networks can coexist
|
||||
based on the hardware -->
|
||||
<!-- An Array of "[ConnectivityManager connectionType],
|
||||
[# simultaneous connection types]" -->
|
||||
<string-array name="radioAttributes">
|
||||
<item>1,1</item>
|
||||
<item>0,1</item>
|
||||
<item>7,1</item>
|
||||
<item>9,1</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Vertical position of a center of the letterboxed app window.
|
||||
0 corresponds to the upper side of the screen and 1 to the lower side. If given value < 0
|
||||
or > 1 it is ignored and for non-tabletop mode central position is used (0.5); for
|
||||
tabletop mode top (0.0) is used. -->
|
||||
<item name="config_letterboxVerticalPositionMultiplier" format="float" type="dimen">0.5</item>
|
||||
|
||||
</resources>
|
Loading…
Add table
Add a link
Reference in a new issue