Skip to content

Conversation

@SomaticIT
Copy link
Contributor

@SomaticIT SomaticIT commented Dec 8, 2025

Hello,

This PR introduces 3 new methods:

  • remount() -> Result<Vec<RemountInfo>>: Remount the device partitions as read-write
  • disable_verity() -> Result<()>: Disable verity on the device
  • enable_verity() -> Result<()>: Enable verity on the device

on following structs:

  • ADBTcpDevice
  • ADBUSBDevice
  • ADBServerDevice (i did not have the opportunity to test this one)

This PR partially fixes #109, it still misses support for adb root.
I did not found a correct way to apply the root command when looking at the source code of adb. Any idea?

Does this implementation match your guidelines?

Thanks,

@SomaticIT SomaticIT force-pushed the @feat/remount-verity branch 4 times, most recently from 7e49387 to 6b7a397 Compare December 8, 2025 15:01
@cocool97
Copy link
Owner

Hey !
Thanks for your PR, I haven't tested it yet but found you're using direct index slicing on an array, could you rather use more "rusty" semantics ? (Even if your code is fine as you're checking length before)

Apart from that I haven't seen anything else, I need to take time to test it before merging :)

impl RemountInfo {
pub(crate) fn from_str(s: &str) -> Result<Self> {
let parts: Vec<&str> = s.split_whitespace().collect();
if parts.len() == 4 && parts[0] == "Using" && parts[2] == "for" {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it here?
I'm not sure about how to implement this in a more rusty way.
Any suggestion?

@cocool97 cocool97 force-pushed the @feat/remount-verity branch from 54bdb85 to 266565d Compare December 28, 2025 21:26
@cocool97 cocool97 merged commit 02a27ff into cocool97:main Dec 28, 2025
11 checks passed
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.

Feature Request: Add Support for adb root, adb remount, and adb disable-verity Commands

2 participants