Merge "Pregrant RECEIVE_SMS permission to Verizon MVS app" into oc-mr1-dev am: 0d10392db2
am: b756df046b
Change-Id: I7a2bb909472f7696de8f416a27f8b04ffe06e29c
diff --git a/CleanSpec.mk b/CleanSpec.mk
index af32e90..8e6689f 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -143,3 +143,6 @@
# Remove eSIM OTA image
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/EuiccGoogle/esim.img)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/EuiccGoogle/esim2.img)
+
+# Remove init.recovery.*.rc file in root directory (only needed in recovery root).
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/init.recovery.$(PRODUCT_HARDWARE).rc)
diff --git a/device.mk b/device.mk
index 0625da7..e5c015e 100755
--- a/device.mk
+++ b/device.mk
@@ -59,7 +59,7 @@
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel \
- $(LOCAL_PATH)/init.recovery.hardware.rc:root/init.recovery.$(PRODUCT_HARDWARE).rc \
+ $(LOCAL_PATH)/init.recovery.hardware.rc:recovery/root/init.recovery.$(PRODUCT_HARDWARE).rc \
$(LOCAL_PATH)/init.hardware.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_HARDWARE).rc \
$(LOCAL_PATH)/init.hardware.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.wahoo.usb.rc \
$(LOCAL_PATH)/ueventd.hardware.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
@@ -152,6 +152,7 @@
frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
frameworks/native/data/etc/android.hardware.wifi.aware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.aware.xml \
frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
+ frameworks/native/data/etc/android.hardware.wifi.rtt.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.rtt.xml \
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp
index efcf8bc..7bab6be 100755
--- a/dumpstate/DumpstateDevice.cpp
+++ b/dumpstate/DumpstateDevice.cpp
@@ -21,10 +21,11 @@
#include <android-base/properties.h>
#include <android-base/unique_fd.h>
#include <cutils/properties.h>
-#include <libgen.h>
#include <log/log.h>
-#include <stdlib.h>
-#include <string>
+#include <string.h>
+
+#define _SVID_SOURCE
+#include <dirent.h>
#include "DumpstateUtil.h"
@@ -35,6 +36,8 @@
#define DIAG_MDLOG_PROPERTY "sys.modem.diag.mdlog"
#define DIAG_MDLOG_STATUS_PROPERTY "sys.modem.diag.mdlog_on"
+#define DIAG_MDLOG_NUMBER_BUGREPORT "persist.sys.modem.diag.mdlog_br_num"
+
using android::os::dumpstate::CommandOptions;
using android::os::dumpstate::DumpFileToFd;
using android::os::dumpstate::PropertiesHelper;
@@ -46,6 +49,54 @@
namespace V1_0 {
namespace implementation {
+#define DIAG_LOG_PREFIX "diag_log_"
+
+void DumpstateDevice::dumpDiagLogs(int fd, std::string srcDir, std::string destDir) {
+ struct dirent **dirent_list = NULL;
+ int num_entries = scandir(srcDir.c_str(),
+ &dirent_list,
+ 0,
+ (int (*)(const struct dirent **, const struct dirent **)) alphasort);
+ if (!dirent_list) {
+ return;
+ } else if (num_entries <= 0) {
+ return;
+ }
+
+ int maxFileNum = android::base::GetIntProperty(DIAG_MDLOG_NUMBER_BUGREPORT, 100);
+ int copiedFiles = 0;
+
+ for (int i = num_entries - 1; i >= 0; i--) {
+ ALOGD("Found %s\n", dirent_list[i]->d_name);
+
+ if (0 != strncmp(dirent_list[i]->d_name, DIAG_LOG_PREFIX, strlen(DIAG_LOG_PREFIX))) {
+ continue;
+ }
+
+ if ((copiedFiles >= maxFileNum) && (maxFileNum != -1)) {
+ ALOGD("Skipped %s\n", dirent_list[i]->d_name);
+ continue;
+ }
+
+ copiedFiles++;
+
+ CommandOptions options = CommandOptions::WithTimeout(120).Build();
+ std::string srcLogFile = srcDir + "/" + dirent_list[i]->d_name;
+ std::string destLogFile = destDir + "/" + dirent_list[i]->d_name;
+
+ std::string copyCmd= "/vendor/bin/cp " + srcLogFile + " " + destLogFile;
+
+ ALOGD("Copying %s to %s\n", srcLogFile.c_str(), destLogFile.c_str());
+ RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options);
+ }
+
+ while (num_entries--) {
+ free(dirent_list[num_entries]);
+ }
+
+ free(dirent_list);
+}
+
void DumpstateDevice::dumpModem(int fd, int fdModem)
{
std::string modemLogDir = android::base::GetProperty(MODEM_LOG_LOC_PROPERTY, "");
@@ -77,8 +128,6 @@
if (smlogEnabled) {
RunCommandToFd(fd, "SMLOG DUMP", { "smlog_dump", "-d", "-o", modemLogAllDir.c_str() }, options);
} else if (diagLogEnabled) {
- std::string copyCmd= "/vendor/bin/cp -rf " + diagLogDir + " " + modemLogAllDir;
-
android::base::SetProperty(DIAG_MDLOG_PROPERTY, "false");
ALOGD("Waiting for diag log to exit\n");
@@ -92,7 +141,7 @@
sleep(1);
}
- RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str()}, options);
+ dumpDiagLogs(fd, diagLogDir, modemLogAllDir);
android::base::SetProperty(DIAG_MDLOG_PROPERTY, "true");
}
diff --git a/dumpstate/DumpstateDevice.h b/dumpstate/DumpstateDevice.h
index 650c0cd..0a1d023 100644
--- a/dumpstate/DumpstateDevice.h
+++ b/dumpstate/DumpstateDevice.h
@@ -19,6 +19,7 @@
#include <android/hardware/dumpstate/1.0/IDumpstateDevice.h>
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
+#include <string>
namespace android {
namespace hardware {
@@ -39,6 +40,7 @@
// Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow.
Return<void> dumpstateBoard(const hidl_handle& h) override;
+ void dumpDiagLogs(int fd, std::string srcDir, std::string destDir);
void dumpModem(int fd, int fdModem);
};
diff --git a/dumpstate/android.hardware.dumpstate@1.0-service.wahoo.rc b/dumpstate/android.hardware.dumpstate@1.0-service.wahoo.rc
index 924782f..39a9618 100644
--- a/dumpstate/android.hardware.dumpstate@1.0-service.wahoo.rc
+++ b/dumpstate/android.hardware.dumpstate@1.0-service.wahoo.rc
@@ -1,4 +1,4 @@
-service dumpstate-1-0 /vendor/bin/hw/android.hardware.dumpstate@1.0-service.wahoo
+service vendor.dumpstate-1-0 /vendor/bin/hw/android.hardware.dumpstate@1.0-service.wahoo
class hal
user system
group system
diff --git a/init.hardware.diag.rc.userdebug b/init.hardware.diag.rc.userdebug
index a283556..0041b98 100644
--- a/init.hardware.diag.rc.userdebug
+++ b/init.hardware.diag.rc.userdebug
@@ -58,7 +58,7 @@
on property:sys.usb.config=diag,serial_cdev,rmnet_gsi,adb && property:sys.usb.configfs=1
start adbd
- start port-bridge
+ start vendor.port-bridge
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet_gsi,adb && property:sys.usb.configfs=1
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Default composition"
@@ -92,7 +92,7 @@
symlink /config/usb_gadget/g1/functions/gsi.rmnet /config/usb_gadget/g1/configs/b.1/f3
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
- start port-bridge
+ start vendor.port-bridge
on property:sys.usb.config=rndis,diag && property:sys.usb.configfs=1
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag"
@@ -140,11 +140,11 @@
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f3
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
- start port-bridge
+ start vendor.port-bridge
on property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=1
start adbd
- start port-bridge
+ start vendor.port-bridge
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=1
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_diag"
@@ -313,11 +313,11 @@
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
- start port-bridge
+ start vendor.port-bridge
on property:sys.usb.config=diag,adb,serial_cdev && property:sys.usb.configfs=1
start adbd
- start port-bridge
+ start vendor.port-bridge
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,adb,serial_cdev && property:sys.usb.configfs=1
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_adb_dun"
@@ -334,14 +334,14 @@
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
-service diag_mdlog_start /vendor/bin/diag_mdlog
+service vendor.diag_mdlog_start /vendor/bin/diag_mdlog
class late_start
user shell
group system diag media_rw
disabled
oneshot
-service diag_mdlog_stop /vendor/bin/diag_mdlog -k
+service vendor.diag_mdlog_stop /vendor/bin/diag_mdlog -k
class late_start
user shell
group system diag media_rw
@@ -352,30 +352,30 @@
setprop sys.modem.diag.mdlog ${persist.sys.modem.diag.mdlog}
on property:sys.modem.diag.mdlog=true
- start diag_mdlog_start
+ start vendor.diag_mdlog_start
on property:sys.modem.diag.mdlog=false
- start diag_mdlog_stop
+ start vendor.diag_mdlog_stop
on property:persist.sys.cnss.diag_qxdm=true
- start cnss_diag
+ start vendor.cnss_diag
on property:persist.sys.cnss.diag_qxdm=false
- stop cnss_diag
+ stop vendor.cnss_diag
on property:persist.sys.cnss.diag_txt=true
- start cnss_diag_txt
+ start vendor.cnss_diag_txt
on property:persist.sys.cnss.diag_txt=false
- stop cnss_diag_txt
+ stop vendor.cnss_diag_txt
-service cnss_diag /vendor/bin/cnss_diag -q -u -w
+service vendor.cnss_diag /vendor/bin/cnss_diag -q -u -w
class late_start
user system
group system
oneshot
-service cnss_diag_txt /vendor/bin/cnss_diag -s -f -m /data/vendor/wifi/cnss_diag/cnss_diag.conf
+service vendor.cnss_diag_txt /vendor/bin/cnss_diag -s -f -m /data/vendor/wifi/cnss_diag/cnss_diag.conf
class late_start
user system
group system
diff --git a/init.hardware.rc b/init.hardware.rc
index 8ab2ba2..1b12119 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -31,7 +31,7 @@
write /sys/class/typec/port0/port_type sink
write /sys/module/lpm_levels/parameters/sleep_disabled N
-service charger /charger
+service vendor.charger /charger
class charger
seclabel u:r:charger:s0
@@ -39,7 +39,7 @@
mount debugfs debugfs /sys/kernel/debug
chmod 0755 /sys/kernel/debug
# Loading kernel modules in background
- start insmod_sh
+ start vendor.insmod_sh
on init
# Disable UFS powersaving
@@ -54,7 +54,7 @@
# start qseecomd early as we mount system/ vendor/ early
# vold needs keymaster that needs qseecomd
- start qseecomd
+ start vendor.qseecomd
# Support legacy paths
symlink /sdcard /mnt/sdcard
@@ -196,13 +196,13 @@
on late-fs
# Start devices by sysfs trigger
- start devstart_sh
+ start vendor.devstart_sh
# Start services for bootanim
start surfaceflinger
start bootanim
- start hwcomposer-2-1
- start configstore-hal-1-0
- start gralloc-2-0
+ start vendor.hwcomposer-2-1
+ start vendor.configstore-hal
+ start vendor.gralloc-2-0
# Mount RW partitions which need run fsck
mount_all /vendor/etc/fstab.${ro.hardware} --late
@@ -211,7 +211,7 @@
mkdir /persist/time 0770 system system
# Start time daemon early so that the system time can be set early
- start time_daemon
+ start vendor.time_daemon
on post-fs
# set RLIMIT_MEMLOCK to 64MB
@@ -226,7 +226,7 @@
on property:sys.user.0.ce_available=true
mkdir /data/misc_ce/0/ramoops
- start ramoops_sh
+ start vendor.ramoops_sh
on property:sys.ramoops.decrypted=true
mount pstore pstore /sys/fs/pstore
@@ -240,7 +240,7 @@
on property:sys.listeners.registered=true
# load IPA FWs
- start ipastart_sh
+ start vendor.ipastart_sh
on post-fs-data
# We can start netd here before in is launched in common init.rc on zygote-start
@@ -485,31 +485,31 @@
# ftm4 VR mode
chown system system /sys/devices/virtual/input/ftm4_touch/vrmode
-service init-elabel-sh /system/bin/init.elabel.sh
+service vendor.init-elabel-sh /system/bin/init.elabel.sh
class late_start
user system
group system
oneshot
-service init-radio-sh /vendor/bin/init.radio.sh
+service vendor.init-radio-sh /vendor/bin/init.radio.sh
class late_start
user radio
group root radio
oneshot
-service folio_daemon /system/bin/folio_daemon
+service vendor.folio_daemon /system/bin/folio_daemon
class late_start
user system
group system
-service perfd /vendor/bin/perfd
+service vendor.perfd /vendor/bin/perfd
class main
user root
group root readproc system
socket perfd seqpacket 0666 root system
disabled
-service thermal-engine /vendor/bin/thermal-engine -c ${sys.qcom.thermalcfg:-/vendor/etc/thermal-engine.conf}
+service vendor.thermal-engine /vendor/bin/thermal-engine -c ${sys.qcom.thermalcfg:-/vendor/etc/thermal-engine.conf}
class main
user root
group root system
@@ -517,7 +517,7 @@
socket thermal-recv-client stream 0660 system system
socket thermal-recv-passive-client stream 0666 system system
-service msm_irqbalance /vendor/bin/msm_irqbalance -f /vendor/etc/msm_irqbalance.conf
+service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /vendor/etc/msm_irqbalance.conf
socket msm_irqbalance seqpacket 660 root system
class core
user root
@@ -525,38 +525,38 @@
writepid /dev/cpuset/system-background/tasks
on property:persist.sys.ssr.restart_level=*
- start ssr_setup
+ start vendor.ssr_setup
-service ssr_setup /vendor/bin/ssr_setup
+service vendor.ssr_setup /vendor/bin/ssr_setup
oneshot
disabled
-service ssr_diag /vendor/bin/ssr_diag
+service vendor.ssr_diag /vendor/bin/ssr_diag
class late_start
user system
group system
disabled
-service per_mgr /vendor/bin/pm-service
+service vendor.per_mgr /vendor/bin/pm-service
class core
user system
group system
ioprio rt 4
shutdown critical
-service per_proxy /vendor/bin/pm-proxy
+service vendor.per_proxy /vendor/bin/pm-proxy
class core
user system
group system
disabled
on property:sys.post_boot.parsed=1
- start perfd
+ start vendor.perfd
on property:sys.boot_completed=1
# Enable power setting and set sys.post_boot.parsed to 1
# to start perfd
- start power_sh
+ start vendor.power_sh
# Enable UFS powersaving
write /sys/devices/soc/${ro.boot.bootdevice}/clkscale_enable 1
@@ -596,26 +596,26 @@
chmod 644 /sys/kernel/debug/ufshcd0/stats/query_stats
chmod 644 /sys/kernel/debug/ufshcd0/stats/err_stats
-on property:init.svc.per_mgr=running
- start per_proxy
+on property:init.svc.vendor.per_mgr=running
+ start vendor.per_proxy
on shutdown
- stop per_proxy
+ stop vendor.per_proxy
# Disable subsystem restart
write /sys/module/subsystem_restart/parameters/disable_restart_work 0x9889deed
-service qseecomd /vendor/bin/qseecomd
+service vendor.qseecomd /vendor/bin/qseecomd
class core
user root
group root
shutdown critical
-service time_daemon /vendor/bin/time_daemon
+service vendor.time_daemon /vendor/bin/time_daemon
class core
user root
group root
-service ss_ramdump /vendor/bin/subsystem_ramdump
+service vendor.ss_ramdump /vendor/bin/subsystem_ramdump
class main
user root
group root system
@@ -625,12 +625,12 @@
write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
mkdir /data/vendor/ssrdump 771 root system
mkdir /data/vendor/ramdump 771 root system
- start ss_ramdump
+ start vendor.ss_ramdump
on property:persist.sys.ssr.enable_ramdumps=0
write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
-service sensors /vendor/bin/sensors.qcom
+service vendor.sensors /vendor/bin/sensors.qcom
class core
user system
group system
@@ -638,23 +638,23 @@
# register QMI services
capabilities NET_BIND_SERVICE
-service adsprpcd /vendor/bin/adsprpcd
+service vendor.adsprpcd /vendor/bin/adsprpcd
class main
user media
group media
-service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
+service vendor.irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
class core
user root
oneshot
-service rmt_storage /vendor/bin/rmt_storage
+service vendor.rmt_storage /vendor/bin/rmt_storage
class core
user root
ioprio rt 0
shutdown critical
-service tftp_server /vendor/bin/tftp_server
+service vendor.tftp_server /vendor/bin/tftp_server
class core
user root
group root system
@@ -675,18 +675,18 @@
disabled
oneshot
-service cnss-daemon /vendor/bin/cnss-daemon -n -l
+service vendor.cnss-daemon /vendor/bin/cnss-daemon -n -l
class late_start
user system
group system inet wifi
-service imsqmidaemon /vendor/bin/imsqmidaemon
+service vendor.imsqmidaemon /vendor/bin/imsqmidaemon
class main
user system
socket ims_qmid stream 0660 system radio
group radio log diag
-service imsdatadaemon /vendor/bin/imsdatadaemon
+service vendor.imsdatadaemon /vendor/bin/imsdatadaemon
class main
user system
socket ims_datad stream 0660 system radio
@@ -694,86 +694,85 @@
disabled
on property:vendor.ims.QMI_DAEMON_STATUS=1
- start imsdatadaemon
+ start vendor.imsdatadaemon
-service ims_rtp_daemon /vendor/bin/ims_rtp_daemon
+service vendor.ims_rtp_daemon /vendor/bin/ims_rtp_daemon
class main
user system
group radio diag inet log
disabled
-service imsrcsservice /vendor/bin/imsrcsd
+service vendor.imsrcsservice /vendor/bin/imsrcsd
class hal
user system
group radio diag inet log
disabled
on property:vendor.ims.DATA_DAEMON_STATUS=1
- start ims_rtp_daemon
- start imsrcsservice
+ start vendor.ims_rtp_daemon
+ start vendor.imsrcsservice
-service qmuxd /vendor/bin/qmuxd
+service vendor.qmuxd /vendor/bin/qmuxd
class main
user root
group radio audio bluetooth gps nfc qcom_diag
-#TODO evaluate group system once b/62571088 is resolved
-service cnd /vendor/bin/cnd
+service vendor.cnd /vendor/bin/cnd
class main
- user system
+ user radio
group inet system wifi radio wakelock
-service netmgrd /vendor/bin/netmgrd
+service vendor.netmgrd /vendor/bin/netmgrd
class main
user root
group root wifi wakelock radio inet
-service port-bridge /vendor/bin/port-bridge
+service vendor.port-bridge /vendor/bin/port-bridge
class main
user radio
group radio system inet
oneshot
-service ipacm /vendor/bin/ipacm
+service vendor.ipacm /vendor/bin/ipacm
class main
user radio
group radio inet
-service qti /vendor/bin/qti
+service vendor.qti /vendor/bin/qti
class main
user radio
group radio net_raw diag usb net_admin
on property:wc_transport.start_hci=true
- start hci_filter
+ start vendor.hci_filter
on property:wc_transport.start_hci=false
- stop hci_filter
+ stop vendor.hci_filter
-service hci_filter /vendor/bin/wcnss_filter
+service vendor.hci_filter /vendor/bin/wcnss_filter
class late_start
user bluetooth
group bluetooth diag system wakelock
disabled
-service loc_launcher /vendor/bin/loc_launcher
+service vendor.loc_launcher /vendor/bin/loc_launcher
class late_start
group gps inet diag wifi
-service pd_mapper /vendor/bin/pd-mapper
+service vendor.pd_mapper /vendor/bin/pd-mapper
class core
-service atfwd /vendor/bin/ATFWD-daemon
+service vendor.atfwd /vendor/bin/ATFWD-daemon
class late_start
user system
group system radio
disabled
on property:persist.radio.atfwd.start=true
- start atfwd
+ start vendor.atfwd
on property:persist.radio.atfwd.start=false
- stop atfwd
+ stop vendor.atfwd
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/dumpstate -d -p -B -z \
@@ -783,42 +782,42 @@
oneshot
keycodes 114 115 116
-service chre /vendor/bin/chre
+service vendor.chre /vendor/bin/chre
class late_start
user system
group system
socket chre seqpacket 0660 root system
shutdown critical
-service power_sh /vendor/bin/init.power.sh
+service vendor.power_sh /vendor/bin/init.power.sh
class main
user root
group root system
disabled
oneshot
-service devstart_sh /vendor/bin/init.qcom.devstart.sh
+service vendor.devstart_sh /vendor/bin/init.qcom.devstart.sh
class main
user root
group root system
disabled
oneshot
-service ipastart_sh /vendor/bin/init.qcom.ipastart.sh
+service vendor.ipastart_sh /vendor/bin/init.qcom.ipastart.sh
class main
user system
group net_admin
disabled
oneshot
-service insmod_sh /vendor/bin/init.insmod.sh
+service vendor.insmod_sh /vendor/bin/init.insmod.sh
class main
user root
group root system
disabled
oneshot
-service ramoops_sh /system/bin/init.ramoops.sh
+service vendor.ramoops_sh /system/bin/init.ramoops.sh
class main
user root
group root system
diff --git a/lisa/board.json b/lisa/board.json
new file mode 100644
index 0000000..65d7777
--- /dev/null
+++ b/lisa/board.json
@@ -0,0 +1,41 @@
+{
+ "board" : {
+ "cores" : [
+ "a53", "a53", "a53", "a53",
+ "a72", "a72", "a72", "a72"
+ ],
+ "big_core" : "a72",
+ "modules" : ["bl", "cpufreq"]
+ },
+ "nrg_model" : {
+ "little" : {
+ "cpu" : {
+ "nrg_max" : 201,
+ "cap_max" : 438
+ },
+ "cluster" : {
+ "nrg_max" : 66
+ }
+ },
+ "big": {
+ "cpu" : {
+ "nrg_max" : 1138,
+ "cap_max" : 1024
+ },
+ "cluster" : {
+ "nrg_max" : 203
+ }
+ }
+ },
+
+ "update-config" : {
+ "kernel" : {
+ "build-script" : "update-script.sh kernel build",
+ "flash-script" : "update-script.sh kernel flash"
+ },
+ "all" : {
+ "build-script" : "update-script.sh all build",
+ "flash-script" : "update-script.sh all flash"
+ }
+ }
+}
diff --git a/lisa/update-script.sh b/lisa/update-script.sh
new file mode 100755
index 0000000..6255dae
--- /dev/null
+++ b/lisa/update-script.sh
@@ -0,0 +1,111 @@
+#!/bin/bash
+
+build_kernel() {
+ echo "==========Building kernel image=========="
+ cd $ANDROID_BUILD_TOP
+ source build/envsetup.sh
+ lunch walleye-userdebug
+ cd $LOCAL_KERNEL_HOME
+ . ./build.config
+ make ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} ${DEFCONFIG}
+ make ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} -j32
+ cp $LOCAL_KERNEL_HOME/arch/arm64/boot/Image.lz4-dtb arch/arm64/boot/dtbo.img `find . -name '*.ko'` $ANDROID_BUILD_TOP/device/google/wahoo-kernel
+}
+
+build_image() {
+ cd $ANDROID_BUILD_TOP
+ source build/envsetup.sh
+ lunch walleye-userdebug
+ if [ "$1" = "bootimage" ]; then
+ echo "==========Building bootimage=========="
+ make -j32 vendorimage-nodeps
+ make -j32 vbmetaimage-nodeps
+ make -j32 bootimage
+ else
+ echo "==========Building complete image=========="
+ make -j32
+ fi
+}
+
+wait_for_fastboot() {
+ # wait for device to enter fastboot, max wait is 200secs
+ local i=0
+ while [ $i -lt 100 ]
+ do
+ if [ -n "`fastboot devices`" ]; then
+ break
+ else
+ sleep 2
+ i=$((i+1))
+ fi
+ done
+}
+
+flash_android() {
+ # reboot the device if it's online
+ if [ "`adb devices`" != "List of devices attached" ]; then
+ echo "==========Rebooting the device into fastboot=========="
+ adb reboot bootloader
+ fi
+
+ echo "==========Waiting for device to enter fastboot=========="
+ wait_for_fastboot
+
+ if [ -z "`fastboot devices`" ]; then
+ echo "==========Device failed to enter fastboot=========="
+ exit
+ fi
+
+ # flash the device
+ if [ "$1" = "bootimage" ]; then
+ echo "==========Flashing bootimage=========="
+ fastboot flash vbmeta
+ fastboot flash vendor
+ fastboot flash boot
+ fastboot reboot
+ else
+ echo "==========Flashing complete image=========="
+ fastboot flashall
+ fi
+
+ echo "==========Waiting for device to come online=========="
+ # wait for device to boot
+ adb wait-for-device
+}
+
+# check input parameters
+if [ "$1" != "kernel" ] && [ "$1" != "all" ]; then
+ echo "First parameter \"$1\" is invalid. Should be \"kernel\" or \"all\"."
+ exit
+fi
+
+if [ "$2" != "build" ] && [ "$2" != "flash" ]; then
+ echo "Second parameter \"$2\" is invalid. Should be \"build\" or \"flash\"."
+ exit
+fi
+
+if [ -z "$ANDROID_BUILD_TOP" ]; then
+ echo "ANDROID_BUILD_TOP environment variable is not set."
+ exit
+fi
+
+if [ -z "$LOCAL_KERNEL_HOME" ]; then
+ echo "LOCAL_KERNEL_HOME environment variable is not set."
+ exit
+fi
+
+if [ "$2" = "build" ]; then
+ build_kernel
+ if [ "$1" = "kernel" ]; then
+ build_image bootimage
+ else
+ build_image
+ fi
+else
+ if [ "$1" = "kernel" ]; then
+ flash_android bootimage
+ else
+ flash_android
+ fi
+fi
+
diff --git a/manifest.xml b/manifest.xml
index 204bd58..72559d6 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -65,7 +65,7 @@
<hal format="hidl">
<name>android.hardware.configstore</name>
<transport>hwbinder</transport>
- <version>1.0</version>
+ <version>1.1</version>
<interface>
<name>ISurfaceFlingerConfigs</name>
<instance>default</instance>
@@ -340,7 +340,7 @@
<hal format="hidl">
<name>android.hardware.wifi</name>
<transport>hwbinder</transport>
- <version>1.1</version>
+ <version>1.2</version>
<interface>
<name>IWifi</name>
<instance>default</instance>
@@ -407,7 +407,6 @@
<interface>
<name>IQcRilAudio</name>
<instance>slot1</instance>
- <instance>slot2</instance>
</interface>
</hal>
<hal format="hidl">
diff --git a/power/Power.cpp b/power/Power.cpp
index c74cb57..81f5db9 100644
--- a/power/Power.cpp
+++ b/power/Power.cpp
@@ -60,7 +60,7 @@
}
Return<void> Power::powerHint(PowerHint hint, int32_t data) {
- if (android::base::GetProperty("init.svc.perfd", "") != "running") {
+ if (android::base::GetProperty("init.svc.vendor.perfd", "") != "running") {
ALOGW("perfd is not started");
return Void();
}
diff --git a/power/android.hardware.power@1.1-service.wahoo.rc b/power/android.hardware.power@1.1-service.wahoo.rc
index 064cf35..cb31655 100644
--- a/power/android.hardware.power@1.1-service.wahoo.rc
+++ b/power/android.hardware.power@1.1-service.wahoo.rc
@@ -1,4 +1,4 @@
-service power-hal-1-1 /vendor/bin/hw/android.hardware.power@1.1-service.wahoo
+service vendor.power-hal-1-1 /vendor/bin/hw/android.hardware.power@1.1-service.wahoo
class hal
user system
group system
diff --git a/sepolicy/OWNERS b/sepolicy/OWNERS
new file mode 100644
index 0000000..4bd7e34
--- /dev/null
+++ b/sepolicy/OWNERS
@@ -0,0 +1,6 @@
+nnk@google.com
+jeffv@google.com
+klyubin@google.com
+dcashman@google.com
+jbires@google.com
+sspatil@google.com
diff --git a/sepolicy/vendor/domain.te b/sepolicy/vendor/domain.te
index fdbac32..eedf87f 100644
--- a/sepolicy/vendor/domain.te
+++ b/sepolicy/vendor/domain.te
@@ -1,7 +1,3 @@
-userdebug_or_eng(`
- allow domain diag_device:chr_file rw_file_perms;
-')
-
# In order for /sys/kernel/debug/kgsl/proc/<pid>/mem
# to be created for memory tracking, the domain of
# the tracked process must have permission to search
diff --git a/sepolicy/vendor/property_contexts b/sepolicy/vendor/property_contexts
index 9094079..5c559a0 100644
--- a/sepolicy/vendor/property_contexts
+++ b/sepolicy/vendor/property_contexts
@@ -18,7 +18,7 @@
sys.listeners.registered u:object_r:tee_listener_prop:s0
wc_transport. u:object_r:wc_prop:s0
sys.qcom.thermalcfg u:object_r:thermal_prop:s0
-ctl.thermal-engine u:object_r:thermal_prop:s0
+ctl.vendor.thermal-engine u:object_r:thermal_prop:s0
persist.sys.modem.diag. u:object_r:modem_diag_prop:s0
sys.modem.diag. u:object_r:modem_diag_prop:s0
persist.radio.enable_tel_mon u:object_r:tel_mon_prop:s0
diff --git a/sepolicy/vendor/radio.te b/sepolicy/vendor/radio.te
index bd704c2..83fcbae 100644
--- a/sepolicy/vendor/radio.te
+++ b/sepolicy/vendor/radio.te
@@ -24,3 +24,6 @@
allow radio avtimer_device:chr_file r_file_perms;
binder_call(radio, hal_imsrtp)
+
+# read /proc/cmdline
+allow radio proc:file r_file_perms;
diff --git a/sepolicy/vendor/ramdump.te b/sepolicy/vendor/ramdump.te
index caa0158..d150fbf 100644
--- a/sepolicy/vendor/ramdump.te
+++ b/sepolicy/vendor/ramdump.te
@@ -10,7 +10,10 @@
allow ramdump ramdump_vendor_data_file:dir create_dir_perms;
allow ramdump ramdump_vendor_data_file:file create_file_perms;
- allow ramdump proc:file r_file_perms;
+ allow ramdump {
+ proc
+ proc_cmdline
+ }:file r_file_perms;
allow ramdump block_device:dir search;
allow ramdump misc_block_device:blk_file rw_file_perms;
diff --git a/sepolicy/vendor/seapp_contexts b/sepolicy/vendor/seapp_contexts
index d13ddad..f74dbf9 100644
--- a/sepolicy/vendor/seapp_contexts
+++ b/sepolicy/vendor/seapp_contexts
@@ -1,5 +1,5 @@
user=system seinfo=platform name=com.google.SSRestartDetector domain=ssr_detector_app type=system_app_data_file
-user=_app seinfo=platform name=com.android.nexuslogger domain=logger_app type=app_data_file levelFrom=all
+user=_app seinfo=platform name=com.android.pixellogger domain=logger_app type=app_data_file levelFrom=all
user=_app seinfo=platform name=com.android.ramdump domain=ramdump_app type=app_data_file levelFrom=all
user=_app seinfo=platform name=com.google.mds domain=mds_app type=app_data_file levelFrom=all
diff --git a/usb/android.hardware.usb@1.1-service.wahoo.rc b/usb/android.hardware.usb@1.1-service.wahoo.rc
index 1451519..1bb4977 100644
--- a/usb/android.hardware.usb@1.1-service.wahoo.rc
+++ b/usb/android.hardware.usb@1.1-service.wahoo.rc
@@ -1,4 +1,4 @@
-service usb-hal-1-1 /vendor/bin/hw/android.hardware.usb@1.1-service.wahoo
+service vendor.usb-hal-1-1 /vendor/bin/hw/android.hardware.usb@1.1-service.wahoo
class hal
user root
group root system
diff --git a/vibrator/android.hardware.vibrator@1.1-service.wahoo.rc b/vibrator/android.hardware.vibrator@1.1-service.wahoo.rc
index f9db6b0..be266ba 100644
--- a/vibrator/android.hardware.vibrator@1.1-service.wahoo.rc
+++ b/vibrator/android.hardware.vibrator@1.1-service.wahoo.rc
@@ -1,4 +1,4 @@
-service vibrator-1-1 /vendor/bin/hw/android.hardware.vibrator@1.1-service.wahoo
+service vendor.vibrator-1-1 /vendor/bin/hw/android.hardware.vibrator@1.1-service.wahoo
class hal
user system
group system
diff --git a/vndk/Android.mk b/vndk/Android.mk
deleted file mode 100644
index 7be018e..0000000
--- a/vndk/Android.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-ifneq ($(filter muskie walleye taimen, $(TARGET_DEVICE)),)
-LOCAL_PATH := $(call my-dir)
-
-ifndef BOARD_VNDK_VERSION
-VNDK_SP_LIBRARIES += \
- android.hardware.renderscript@1.0\
- android.hardware.graphics.allocator@2.0\
- android.hardware.graphics.mapper@2.0\
- android.hardware.graphics.common@1.0\
- libhwbinder\
- libbase\
- libcutils\
- libhardware\
- libutils\
- libc++\
- libbacktrace\
- libunwind\
- libunwindstack\
- liblzma\
- libhidlbase\
- libhidltransport\
- libz\
- libbcinfo\
- libblas\
- libcompiler_rt\
- libRS_internal\
- libRSDriver\
- libRSCpuRef\
- libft2\
- libpng\
-
-endif
-
-define add-vndk-sp-lib
-include $$(CLEAR_VARS)
-LOCAL_MODULE := $1.vndk-sp
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-LOCAL_PREBUILT_MODULE_FILE := $$(TARGET_OUT)/lib/$1.so
-LOCAL_MULTILIB := 32
-LOCAL_MODULE_TAGS := optional
-LOCAL_INSTALLED_MODULE_STEM := $1.so
-LOCAL_MODULE_SUFFIX := .so
-LOCAL_MODULE_RELATIVE_PATH := vndk-sp
-include $$(BUILD_PREBUILT)
-
-include $$(CLEAR_VARS)
-LOCAL_MODULE := $1.vndk-sp
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-LOCAL_PREBUILT_MODULE_FILE := $$(TARGET_OUT)/lib64/$1.so
-LOCAL_MULTILIB := 64
-LOCAL_MODULE_TAGS := optional
-LOCAL_INSTALLED_MODULE_STEM := $1.so
-LOCAL_MODULE_SUFFIX := .so
-LOCAL_MODULE_RELATIVE_PATH := vndk-sp
-include $$(BUILD_PREBUILT)
-endef
-
-$(foreach lib,$(VNDK_SP_LIBRARIES),\
- $(eval $(call add-vndk-sp-lib,$(lib))))
-endif # if TARGET_DEVICE is muskie or walleye
diff --git a/vr/VrDevice.cpp b/vr/VrDevice.cpp
index c9966ab..75ac436 100644
--- a/vr/VrDevice.cpp
+++ b/vr/VrDevice.cpp
@@ -45,7 +45,7 @@
return Void();
}
}
- if (!android::base::SetProperty("ctl.restart", "thermal-engine")) {
+ if (!android::base::SetProperty("ctl.restart", "vendor.thermal-engine")) {
LOG(ERROR) << "Couldn't set thermal_engine restart property";
}
if (!access("/sys/devices/virtual/input/ftm4_touch/vrmode", W_OK)) {
diff --git a/vr/android.hardware.vr@1.0-service.wahoo.rc b/vr/android.hardware.vr@1.0-service.wahoo.rc
index 7a66e90..3f34675 100644
--- a/vr/android.hardware.vr@1.0-service.wahoo.rc
+++ b/vr/android.hardware.vr@1.0-service.wahoo.rc
@@ -1,4 +1,4 @@
-service vr-wahoo-1-0 /vendor/bin/hw/android.hardware.vr@1.0-service.wahoo
+service vendor.vr-wahoo-1-0 /vendor/bin/hw/android.hardware.vr@1.0-service.wahoo
class hal
user system
group system
diff --git a/wifi_offload/android.hardware.wifi.offload@1.0-service.rc b/wifi_offload/android.hardware.wifi.offload@1.0-service.rc
index 84e0391..58b4560 100644
--- a/wifi_offload/android.hardware.wifi.offload@1.0-service.rc
+++ b/wifi_offload/android.hardware.wifi.offload@1.0-service.rc
@@ -1,4 +1,4 @@
-service offload-hal-1-0 /vendor/bin/hw/android.hardware.wifi.offload@1.0-service
+service vendor.offload-hal-1-0 /vendor/bin/hw/android.hardware.wifi.offload@1.0-service
class hal
user wifi
group wifi system