Dump F2FS disk_map and UFS phy version
[ 91.358748] type=1400 audit(1737771651.492:274): avc: denied { search } for comm="dump_storage" name="f2fs" dev="proc" ino=4026532053 scontext=u:r:dump_storage:s0 tcontext=u:object_r:proc_f2fs:s0 tclass=dir permissive=0 [ 49.564560] type=1400 audit(1737778106.496:153): avc: denied { read } for comm="dump_storage" name="f2fs" dev="proc" ino=4026532053 scontext=u:r:dump_storage:s0 tcontext=u:object_r:proc_f2fs:s0 tclass=dir permissive=0 [ 91.358930] type=1400 audit(1737771651.492:275): avc: denied { read } for comm="dump_storage" name="phy_version" dev="sysfs" ino=109125 scontext=u:r:dump_storage:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 [ 91.359249] type=1400 audit(1737771651.492:276): avc: denied { read } for comm="dump_storage" name="phy_release_date" dev="sysfs" ino=109126 scontext=u:r:dump_storage:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 Bug: 392193452 Flag: EXEMPT bugfix Change-Id: I8e174e378064a94681f74a88ee13b4461527076a Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
This commit is contained in:
parent
6151bff500
commit
7bd70d06d7
2 changed files with 24 additions and 0 deletions
|
@ -67,11 +67,31 @@ int main() {
|
|||
int mnt_time = android::base::GetIntProperty(F2FS_MNT_TIME_PROPERTY, 0);
|
||||
printf("--- F2FS - checkpoint=disable time (ms) ---\n%d\n\n", mnt_time);
|
||||
|
||||
const std::string f2fs_proc_path("/proc/fs/f2fs/");
|
||||
std::unique_ptr<DIR, decltype(&closedir)> procdir(
|
||||
opendir(f2fs_proc_path.c_str()), closedir);
|
||||
if (procdir) {
|
||||
dirent *proc_entry;
|
||||
while ((proc_entry = readdir(procdir.get())) != nullptr) {
|
||||
std::string proc_name(proc_entry->d_name);
|
||||
if (proc_name == "." || proc_name == ".." ||
|
||||
strncmp(proc_name.c_str(), "dm-", 3))
|
||||
continue;
|
||||
dumpFileContent(("F2FS - " + proc_name).c_str(),
|
||||
(f2fs_proc_path + proc_name + "/disk_map").c_str());
|
||||
}
|
||||
}
|
||||
|
||||
//UFS
|
||||
dumpFileContent("UFS model", "/sys/block/sda/device/model");
|
||||
dumpFileContent("UFS rev", "/sys/block/sda/device/rev");
|
||||
dumpFileContent("UFS size", "/sys/block/sda/size");
|
||||
|
||||
dumpFileContent("UFS phy version",
|
||||
"/dev/sys/block/bootdevice/pixel/phy_version");
|
||||
dumpFileContent("UFS phy release_date",
|
||||
"/dev/sys/block/bootdevice/pixel/phy_release_date");
|
||||
|
||||
dumpFileContent("UFS Slow IO Read",
|
||||
"/dev/sys/block/bootdevice/slowio_read_cnt");
|
||||
dumpFileContent("UFS Slow IO Write",
|
||||
|
|
|
@ -4,6 +4,10 @@ pixel_bugreport(dump_storage)
|
|||
# adb bugreport
|
||||
allow dump_storage sysfs_scsi_devices_0000:dir r_dir_perms;
|
||||
allow dump_storage sysfs_scsi_devices_0000:file r_file_perms;
|
||||
allow dump_storage sysfs:file r_file_perms;
|
||||
|
||||
allow dump_storage proc_f2fs:dir r_dir_perms;
|
||||
allow dump_storage proc_f2fs:file r_file_perms;
|
||||
|
||||
# adb bugreport
|
||||
userdebug_or_eng(`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue