Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,11 @@ class CvdBootStateMachine : public SetupFeature, public KernelLogPipeConsumer {
instance_.adb_ip_and_port());
adb_command.AddParameter("wait-for-device");
adb_command.AddParameter("shell");
adb_command.AddParameter("/vendor/bin/snapshot_hook_post_resume");
adb_command.AddParameter(
"su root /vendor/bin/snapshot_hook_post_resume");
CHECK_EQ(adb_command.Start().Wait(), 0)
<< "Failed to run /vendor/bin/snapshot_hook_post_resume";
<< "Failed to run su root "
"/vendor/bin/snapshot_hook_post_resume";
// Done last so that adb is more likely to be ready.
CHECK(cuttlefish::WriteAll(restore_complete_pipe_write, "1") == 1)
<< "Error writing to restore complete pipe: "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ static Result<void> RunAdbShellCommand(
Result<void> ServerLoopImpl::HandleSuspend(ProcessMonitor& process_monitor) {
// right order: guest -> host
VLOG(0) << "Suspending the guest..";
CF_EXPECT(
RunAdbShellCommand(instance_, {"/vendor/bin/snapshot_hook_pre_suspend"}));
CF_EXPECT(RunAdbShellCommand(
instance_, {"su", "root", "/vendor/bin/snapshot_hook_pre_suspend"}));
CF_EXPECT(SuspendGuest());
VLOG(0) << "The guest is suspended.";
CF_EXPECT(process_monitor.SuspendMonitoredProcesses(),
Expand All @@ -207,8 +207,8 @@ Result<void> ServerLoopImpl::HandleResume(ProcessMonitor& process_monitor) {
VLOG(0) << "The host processes are resumed.";
VLOG(0) << "Resuming the guest..";
CF_EXPECT(ResumeGuest());
CF_EXPECT(
RunAdbShellCommand(instance_, {"/vendor/bin/snapshot_hook_post_resume"}));
CF_EXPECT(RunAdbShellCommand(
instance_, {"su", "root", "/vendor/bin/snapshot_hook_post_resume"}));
VLOG(0) << "The guest resumed.";
return {};
}
Expand Down
2 changes: 1 addition & 1 deletion tools/buildutils/installbazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -e
function install_bazel_x86_64() {
echo "Installing bazel"
apt install apt-transport-https curl gnupg -y
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
curl -fsSL https://releases.bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
mv bazel-archive-keyring.gpg /usr/share/keyrings
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
# bazel needs the zip command to gather test outputs but doesn't depend on it
Expand Down
Loading