Skip to content

Always run snapshot_hook_* as root - #2860

Merged
Databean merged 1 commit into
google:mainfrom
Databean:snapshot_hook_root
Jul 16, 2026
Merged

Always run snapshot_hook_* as root#2860
Databean merged 1 commit into
google:mainfrom
Databean:snapshot_hook_root

Conversation

@Databean

Copy link
Copy Markdown
Member

When not run as root, this produces errors like

+ /system/bin/cmd nfc status
+ grep -q disabled
/vendor/bin/snapshot_hook_pre_suspend[40]: grep: inaccessible or not found
+ sleep 0.1
/vendor/bin/snapshot_hook_pre_suspend[40]: sleep: inaccessible or not found

This may have worked intermittently before depending on whether the runtime environment was also using adb root.

Bug: b/534832487

When not run as root, this produces errors like
```
+ /system/bin/cmd nfc status
+ grep -q disabled
/vendor/bin/snapshot_hook_pre_suspend[40]: grep: inaccessible or not found
+ sleep 0.1
/vendor/bin/snapshot_hook_pre_suspend[40]: sleep: inaccessible or not found
```

This may have worked intermittently before depending on whether the
runtime environment was also using `adb root`.

Bug: b/534832487
@Databean
Databean requested review from cjreynol and rmuthiah July 15, 2026 23:36
@Databean
Databean enabled auto-merge July 16, 2026 00:06
@Databean
Databean added this pull request to the merge queue Jul 16, 2026
Merged via the queue into google:main with commit f1adc0b Jul 16, 2026
52 of 53 checks passed
jrguzman-ms pushed a commit to msft-mirror-aosp/device.google.cuttlefish that referenced this pull request Jul 29, 2026
When not run as root, this produces errors like
```
+ /system/bin/cmd nfc status
+ grep -q disabled
/vendor/bin/snapshot_hook_pre_suspend[40]: grep: inaccessible or not found
+ sleep 0.1
/vendor/bin/snapshot_hook_pre_suspend[40]: sleep: inaccessible or not found
```

This may have worked intermittently before depending on whether the
runtime environment was also using `adb root`.

Bug: b/534832487
Change-Id: Ifea02f299d85e389c637b9470a5d0895284d08a4
Flag: EXEMPT cuttlefish host code
Test: google/android-cuttlefish#2860
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants