diff --git a/init/reboot.cpp b/init/reboot.cpp index ab0e48e9e..0e788e495 100644 --- a/init/reboot.cpp +++ b/init/reboot.cpp @@ -478,6 +478,11 @@ static Result KillZramBackingDevice() { // cut the last "\n" backing_dev.erase(backing_dev.length() - 1); + if (android::base::StartsWith(backing_dev, "none")) { + LOG(INFO) << "No zram backing device configured"; + return {}; + } + // shutdown zram handle Timer swap_timer; LOG(INFO) << "swapoff() start...";