Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8a3653cf authored by luwei9's avatar luwei9 Committed by 陆伟
Browse files

[Bugfix]Fix userspace-reboot failure when backing_dev exists but zram not swapped on



'/sys/block/zram0/backing_dev' will exist even if zram is not swapped on in some devices. And there is no reason to ensure that zram is swapped on if '/sys/block/zram0/backing_dev' exists. So, if we want to kill backing_dev during userspace reboot, we should check if zram is swapped on first.

TEST: as follow
 - adb root
 - adb shell swapoff /dev/block/zram0
 - adb shell echo 1 > /sys/block/zram0/reset
 - adb shell setprop test.userspace.reboot.flag 1
 - adb reboot userspace
 - (wait reboot ending) adb shell getprop test.userspace.reboot.flag (1 will be show if successful)

Signed-off-by: default avatarluwei9 <luwei9@xiaomi.com>
Change-Id: Icca569cf8d64bc024b867dae2ab789fc9e76445a
parent d8d97365
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment