2

I'm trying to use pstore logs on my Poco M3. I tried everything. PSTORE configs are activated on the kernel, pstore module is loaded on the phone, phone is rooted, /sys/fs/pstore is mounted automatically but never contains anything.

130|citrus:/ # dmesg | grep pstore
[    0.094327] console [pstore-1] enabled
[    0.094468] pstore: Registered ramoops as persistent store backend
[    1.065975] pstore: Using compression: deflate
[   98.052156] type=1400 audit(1654268897.690:3752): avc: denied { read } for comm="ls" name="/" dev="pstore" ino=1197 scontext=u:r:shell:s0 tcontext=u:object_r:pstorefs:s0 tclass=dir permissive=1
[   98.052450] type=1400 audit(1654268897.690:3753): avc: denied { open } for comm="ls" path="/sys/fs/pstore" dev="pstore" ino=1197 scontext=u:r:shell:s0 tcontext=u:object_r:pstorefs:s0 tclass=dir permissive=1

it looks like selinux is blocking ls on /sys/fs/pstore. Is there a way to make it always allow ls on /sys/fs/pstore, even after reboot?

I already added androidboot.selinux=permissive to my boot command line and it's recognized on the phone:

130|citrus:/ # getenforce
Permissive 

Of course, doing

citrus:/ # ls /sys/fs/pstore                                                                    
citrus:/ # 

shows nothing

UPDATE: I just learned that permissive means just logging without blocking, so this is not blocking, my pstore is indeed empty. Am I right?

10
  • not sure what you mean i.stack.imgur.com/hHp7g.jpg
    – alecxs
    Jun 3, 2022 at 16:07
  • @alecxs my ls-la /sys/fs/pstore is empty. Is your phone a Poco M3? On mine I can't make it work
    – Rafaelo
    Jun 3, 2022 at 16:14
  • could be you're in wrong mount namespace, try su -mm
    – alecxs
    Jun 3, 2022 at 17:36
  • @alecxs citrus:/ $ su -mm citrus:/ # ls /sys/fs/pstore/ citrus:/ # ls -la /sys/fs/pstore/ total 0
    – Rafaelo
    Jun 3, 2022 at 17:49
  • I am using Poco M3 Android 10 with Magisk 24304 Zygisk + LSPosed not sure why it should make any difference?
    – alecxs
    Jun 4, 2022 at 7:29

0

You must log in to answer this question.

Browse other questions tagged .