I have Samsung S10 5G with root via instructions given by Magisk. I am trying to modify system.img
to patch my SELinux policies in the AP file of ROM. When I flashed the AP file with other files using Odin then it fails with a boot loop. To debug the cause I am using pstore
which is configured on the device as follows:
- In
init.rc
thepstore
is mounted at/sys/fs/pstore
as follows:
314: # pstore/ramoops previous console log
315: mount pstore pstore /sys/fs/pstore nodev noexec nosuid
316: chown system log /sys/fs/pstore/console-ramoops
317: chmod 0440 /sys/fs/pstore/console-ramoops
318: chown system log /sys/fs/pstore/console-ramoops-0
319: chmod 0440 /sys/fs/pstore/console-ramoops-0
320: chown system log /sys/fs/pstore/pmsg-ramoops-0
321: chmod 0440 /sys/fs/pstore/pmsg-ramoops-0
- The Kernel config options is as follows:
$ cat config | grep PSTORE
CONFIG_PSTORE=y
CONFIG_PSTORE_ZLIB_COMPRESS=y
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
CONFIG_PSTORE_PMSG_SSPLOG=y
CONFIG_PSTORE_RAM=y
- Ramoops configurations is as follows:
./sys/module/ramoops/parameters/console_size 262144
./sys/module/ramoops/parameters/dump_oops 1
./sys/module/ramoops/parameters/ecc 0
./sys/module/ramoops/parameters/ftrace_size 262144
./sys/module/ramoops/parameters/mem_address 3241148416
./sys/module/ramoops/parameters/mem_size 1048576
./sys/module/ramoops/parameters/mem_type 0
./sys/module/ramoops/parameters/pmsg_size 262144
./sys/module/ramoops/parameters/record_size 262144
Now, I am following the tutorial: Reading kernel logs
but there are no logs in /sys/fs/pstore
directory. When I have tried the same step on another device(OnePlus 6T) then I can see the logs.
Also, I have tried to check logs for the real cause of flashing ROM with the following instructions:
- Flash ROM that causes a boot loop.
- Flash ROM that has root access.
- Check the logs within
/sys/fs/pstore
directory.
This is also not working.
Along with check /sys/fs/pstore
directory, I have also tried to mount the pstore at some other location with mount -t pstore - /dev/pstore
but there are no logs.
I need a favor in
- Any way to debug the
pstore
problem? - Any other way to find the kernel logs?