Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it a bit more secure #20

Open
BienGudBoy opened this issue Aug 3, 2023 · 0 comments
Open

Make it a bit more secure #20

BienGudBoy opened this issue Aug 3, 2023 · 0 comments

Comments

@BienGudBoy
Copy link

The idea is to make this module more secure by design, while still allow root debugging for developers/users.

Instead of:

int adbd_main(int server_port) {
     // descriptor will always be open.
     adbd_cloexec_auth_socket();

     auth_required = false;
 
     adbd_auth_init();

We can modify the original function's prop to something different, like:

int adbd_main(int server_port) {
     // descriptor will always be open.
     adbd_cloexec_auth_socket();
 
    if (android::base::GetBoolProperty("ro.adb.insecure", true)) {
        auth_required = false;
    }
 
     adbd_auth_init();

Then, adbd will check for ro.adb.insecure instead of ro.adb.secure. This also avoid SafetyNet detection.
By default, ro.adb.insecure should be false, so that if the phone gets connected to a new/unknown PC, it won't just trust and give all root permissions. The user can revert to the old behavior with ro.adb.insecure=true if they need (like for example a dead phone display).

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

No branches or pull requests

1 participant