Skip to content

Commit

Permalink
Hide adbd service state since DroidGuard looks at it
Browse files Browse the repository at this point in the history
- not currently enforced, but play it safe and spoof it by default like with USB state
  • Loading branch information
osm0sis authored Jan 21, 2024
1 parent bdcfd28 commit 63e4c57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/src/main/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ static void modify_callback(void *cookie, const char *name, const char *value, u
std::string prop(name);

// Spoof specific property values
if (prop == "sys.usb.state") {
value = "mtp"; // Hide USB Debugging
if (prop == "init.svc.adbd") {
value = "stopped";
} else if (prop == "sys.usb.state") {
value = "mtp";
}

if (jsonProps.count(prop)) {
Expand Down

4 comments on commit 63e4c57

@HuskyDG
Copy link

Choose a reason for hiding this comment

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

🤔

@osm0sis
Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes?

@amteza
Copy link

@amteza amteza commented on 63e4c57 Jan 22, 2024

Choose a reason for hiding this comment

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

This might be why v6 never allows me to get a fingerprint working. v5 always works on my Pixel 8 Pro, but v6 fails with the same fingerprint. It is the only thing I can think of.

@osm0sis
Copy link
Owner Author

@osm0sis osm0sis commented on 63e4c57 Jan 22, 2024

Choose a reason for hiding this comment

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

This isn't even in v6, so no. Feel free to PM me on xda and I'm certain I can get it working for you (I also use a Pixel 8 Pro) if it isn't already working in my latest CI builds. Commit comments aren't for troubleshooting. 👍

Please sign in to comment.