Snap for 9899401 from 7be874469a
to udc-release
Change-Id: I415ea55c287de62b3c57da9422612634817758a7
This commit is contained in:
commit
28813902a3
11 changed files with 72 additions and 1 deletions
|
@ -154,7 +154,11 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile
|
|||
int64_t in_timeoutMillis) {
|
||||
// Unused arguments.
|
||||
(void) in_timeoutMillis;
|
||||
(void) in_mode;
|
||||
|
||||
if (in_mode < IDumpstateDevice::DumpstateMode::FULL || in_mode > IDumpstateDevice::DumpstateMode::PROTO) {
|
||||
ALOGE("Invalid mode: %d\n", in_mode);
|
||||
return ndk::ScopedAStatus::fromExceptionCodeWithMessage(EX_ILLEGAL_ARGUMENT, "Invalid mode");
|
||||
}
|
||||
|
||||
if (in_fds.size() < 1) {
|
||||
ALOGE("no FDs\n");
|
||||
|
@ -171,6 +175,7 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile
|
|||
|
||||
if (in_fds.size() < 2) {
|
||||
ALOGE("no FD for dumpstate_board binary\n");
|
||||
dumpTextSection(fd, "");
|
||||
} else {
|
||||
int fd_bin = in_fds[1].get();
|
||||
dumpLogSection(fd, fd_bin);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# dumpstate packing directory
|
||||
type radio_vendor_data_file, file_type, data_file_type;
|
||||
userdebug_or_eng(`
|
||||
typeattribute radio_vendor_data_file mlstrustedobject;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# generic dumpstate for pixel
|
||||
/vendor/bin/hw/android\.hardware\.dumpstate-service u:object_r:hal_dumpstate_default_exec:s0
|
||||
|
||||
/data/vendor/radio(/.*)? u:object_r:radio_vendor_data_file:s0
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# required permission to use tar to pack dumpsate_board.bin
|
||||
allow hal_dumpstate_default vendor_toolbox_exec:file execute_no_trans;
|
||||
allow hal_dumpstate_default radio_vendor_data_file:dir create_dir_perms;
|
||||
allow hal_dumpstate_default radio_vendor_data_file:file create_file_perms;
|
||||
allow hal_dumpstate_default shell_data_file:file getattr;
|
||||
set_prop(hal_dumpstate_default, vendor_logger_prop)
|
||||
|
||||
|
|
3
gear/dumpstate/sepolicy/property.te
Normal file
3
gear/dumpstate/sepolicy/property.te
Normal file
|
@ -0,0 +1,3 @@
|
|||
# verbose property
|
||||
vendor_internal_prop(vendor_logger_prop)
|
||||
|
3
gear/dumpstate/sepolicy/property_contexts
Normal file
3
gear/dumpstate/sepolicy/property_contexts
Normal file
|
@ -0,0 +1,3 @@
|
|||
# verbose property name
|
||||
persist.vendor.verbose_logging_enabled u:object_r:vendor_logger_prop:s0
|
||||
|
18
wlan/Android.bp
Normal file
18
wlan/Android.bp
Normal file
|
@ -0,0 +1,18 @@
|
|||
package {
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "dump_wlan",
|
||||
srcs: ["dump_wlan.cpp"],
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
],
|
||||
shared_libs: [
|
||||
"libdump",
|
||||
],
|
||||
vendor: true,
|
||||
relative_install_path: "dump",
|
||||
}
|
4
wlan/dump.mk
Normal file
4
wlan/dump.mk
Normal file
|
@ -0,0 +1,4 @@
|
|||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/wlan/sepolicy/
|
||||
|
||||
PRODUCT_PACKAGES_DEBUG += dump_wlan
|
||||
|
27
wlan/dump_wlan.cpp
Normal file
27
wlan/dump_wlan.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright 2023 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.
|
||||
*/
|
||||
|
||||
//#include <stdio.h>
|
||||
#include <dump/pixel_dump.h>
|
||||
|
||||
int main() {
|
||||
//This line is required to avoid output out of order
|
||||
//setbuf(stdout, NULL);
|
||||
dumpFileContent("WLAN FW Log Symbol Table", "/vendor/firmware/Data.msc");
|
||||
//runCommand("WLAN TWT Dump", "cat /sys/wlan_ptracker/twt/*");
|
||||
return 0;
|
||||
}
|
||||
|
4
wlan/sepolicy/dump_wlan.te
Normal file
4
wlan/sepolicy/dump_wlan.te
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
pixel_bugreport(dump_wlan)
|
||||
|
||||
|
3
wlan/sepolicy/file_contexts
Normal file
3
wlan/sepolicy/file_contexts
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
/vendor/bin/dump/dump_wlan u:object_r:dump_wlan_exec:s0
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue