Snap for 9250775 from d59bc448e2 to udc-release

Change-Id: Ib09acc5450c553ced3af17f817f2c594af97f906
This commit is contained in:
Android Build Coastguard Worker 2022-11-03 03:29:40 +00:00
commit a57ca63b64
2 changed files with 19 additions and 42 deletions

View file

@ -593,38 +593,6 @@ service abox /vendor/bin/main_abox 17c50000.abox
group audioserver group audioserver
seclabel u:r:abox:s0 seclabel u:r:abox:s0
# GPS
service lhd /vendor/bin/hw/lhd /vendor/etc/gnss/lhd.conf
class main
user gps
group system inet net_raw sdcard_rw
ioprio be 0
service gpsd /vendor/bin/hw/gpsd -c /vendor/etc/gnss/gps.xml
class main
user gps
group system gps radio inet wakelock sdcard_rw net_raw
ioprio be 0
service scd /vendor/bin/hw/scd /vendor/etc/gnss/scd.conf
class main
user gps
group system inet net_raw wakelock
ioprio be 0
service gnss_service /vendor/bin/hw/android.hardware.gnss@2.1-service-brcm
class hal
user gps
group system gps radio
ioprio be 0
priority -1
# disable gps service if no gps h/w
on property:vendor.ril.cbd.svc=0
stop gpsd
stop lhd
stop scd
# on userdebug and eng builds, enable kgdb on the serial console # on userdebug and eng builds, enable kgdb on the serial console
on property:ro.debuggable=1 on property:ro.debuggable=1
write /sys/module/kgdboc/parameters/kgdboc ttyFIQ1 write /sys/module/kgdboc/parameters/kgdboc ttyFIQ1

View file

@ -246,6 +246,7 @@ Dumpstate::Dumpstate()
// if the specified section is not supported. // if the specified section is not supported.
void Dumpstate::dumpTextSection(int fd, const std::string &sectionName) { void Dumpstate::dumpTextSection(int fd, const std::string &sectionName) {
bool dumpAll = (sectionName == kAllSections); bool dumpAll = (sectionName == kAllSections);
std::string dumpFiles;
for (const auto &section : mTextSections) { for (const auto &section : mTextSections) {
if (dumpAll || sectionName == section.first) { if (dumpAll || sectionName == section.first) {
@ -259,22 +260,29 @@ void Dumpstate::dumpTextSection(int fd, const std::string &sectionName) {
} }
} }
// Execute all programs under vendor/bin/dump/ // Execute all or designated programs under vendor/bin/dump/
std::unique_ptr<DIR, decltype(&closedir)> dir(opendir("/vendor/bin/dump"), closedir); std::unique_ptr<DIR, decltype(&closedir)> dir(opendir("/vendor/bin/dump"), closedir);
if (!dir) { if (!dir) {
ALOGE("Fail To Open Dir vendor/bin/dump/"); ALOGE("Fail To Open Dir vendor/bin/dump/");
} else { ::android::base::WriteStringToFd("Fail To Open Dir vendor/bin/dump/\n", fd);
dirent *entry; return;
while ((entry = readdir(dir.get())) != nullptr) { }
dirent *entry;
while ((entry = readdir(dir.get())) != nullptr) {
// Skip '.', '..' // Skip '.', '..'
if (entry->d_name[0] == '.') { if (entry->d_name[0] == '.') {
continue; continue;
} }
std::string bin(entry->d_name); std::string bin(entry->d_name);
auto startTime = startSection(fd, "/vendor/bin/dump/"+bin); dumpFiles = dumpFiles + " " + bin;
RunCommandToFd(fd, "/vendor/bin/dump/"+bin, {"/vendor/bin/dump/"+bin}); if (dumpAll || sectionName == bin) {
endSection(fd, "/vendor/bin/dump/"+bin, startTime); auto startTime = startSection(fd, bin);
} RunCommandToFd(fd, "/vendor/bin/dump/"+bin, {"/vendor/bin/dump/"+bin});
endSection(fd, bin, startTime);
if (!dumpAll) {
return;
}
}
} }
if (dumpAll) { if (dumpAll) {
@ -287,6 +295,7 @@ void Dumpstate::dumpTextSection(int fd, const std::string &sectionName) {
for (const auto &section : mTextSections) { for (const auto &section : mTextSections) {
::android::base::WriteStringToFd(" " + section.first, fd); ::android::base::WriteStringToFd(" " + section.first, fd);
} }
::android::base::WriteStringToFd(dumpFiles, fd);
::android::base::WriteStringToFd("\nNote: sections with attachments (e.g. modem) are" ::android::base::WriteStringToFd("\nNote: sections with attachments (e.g. modem) are"
"not avalable from the command line.\n", fd); "not avalable from the command line.\n", fd);
} }