Use target.list_directory(as_root=target.is_rooted) instead of doing it
as a normal user for paths in /sys/kernel/debug. Since this
list_directory() call can be used with multiple path, we do not force
as_root=True but we increase the chance of it working.
Use target.list_directory(as_root=target.is_rooted) instead of doing it as a normal user for paths in /sys/kernel/debug. Since this list_directory() call can be used with multiple path, we do not force as_root=True but we increase the chance of it working.