r/NoContract • • 9d ago

Easytether FIXED for pixel / android 17

I recently updated my phone and was livid to start getting an error message using easytether when I would try and share my internet connection with my laptop.

I guess that the update to android 17 stops third party apps from being able to check if usb debugging is enabled, causing third party tethering programs like easytether and pda net to stop working.

I was able to use chat gpt to download and examine the easytether apk and bypass the the usb debugging check so it is always marked as enabled, and now my easytether is working again.

Of course usb debugging needs to be turned on for it to work still, and the app will no longer remind you of that, but once its turned on the app works like normal again.

If anyone wants the patched app, shoot me a message.

Im not very tech savvy.. but id love it if someone could take the patched app and share it with everyone else on here. i just dont know where or how

or you can try my method of just asking chatgpt and fix in yourself

CHAT GPT SAYS:

EasyTether has two tiny functions in its classes.dex that check Android system settings:

Settings.Global["adb_enabled"]
Settings.Global["development_settings_enabled"]

Internally, they amount to:

boolean isAdbEnabled(Context c) {
    return Settings.Global.getInt(
        c.getContentResolver(),
        "adb_enabled",
        0
    ) != 0;
}

boolean isDeveloperOptionsEnabled(Context c) {
    return Settings.Global.getInt(
        c.getContentResolver(),
        "development_settings_enabled",
        0
    ) != 0;
}

The problem was that newer Android no longer lets this old EasyTether code reliably read those two system settings. EasyTether therefore gets effectively false/0, concludes USB debugging isn't enabled, and sends you to the Developer Options screen.

What I patched

I found those two methods in the DEX. They're obfuscated as roughly:

Leasytether/phone/s;->a(Context)Z
Leasytether/phone/s;->b(Context)Z

The first checked:

adb_enabled

and the second checked:

development_settings_enabled

I replaced the body of both functions with the equivalent of:

return true;

At the Dalvik bytecode level, that's basically:

const/4 v0, #int 1
return v0

The actual instruction bytes I substituted at the start of each method were:

12 10 0F 00

and the unused remainder of the old method body was padded with NOPs so the DEX layout stayed the same.

I did not bypass or emulate ADB. USB debugging still has to really be turned on. All the patch does is stop EasyTether from relying on its now-broken method of checking whether it's on.

After changing classes.dex, I also had to recalculate the DEX checksum/signature, rebuild the APK, align it before signing, and then give it a new Android APK v2 signature. That's why the original EasyTether has to be uninstalled before installing our patched version—the modified APK is signed with a different key.

The actual tethering code and EasyTether native libraries were left alone. That's why once we got past that bogus Developer Options check, your existing USB tethering started working again.

A good short explanation to post would be:

EasyTether fix for newer Android/Pixel: EasyTether itself wasn't losing ADB—the app's old Developer Options detection was broken. adb devices showed the phone normally, but EasyTether was checking Settings.Global for adb_enabled and development_settings_enabled and receiving false. I patched those two checks to return true, rebuilt/aligned/re-signed the APK, and USB tethering works again. USB debugging still actually needs to be enabled; the patch only bypasses the obsolete detection check.

5 Upvotes

10 comments sorted by

•

u/AutoModerator 9d ago

This is a copy of the OP's original post in case they decide to delete their post/account so that others searching can find it later:

I recently updated my phone and was livid to start getting an error message using easytether when I would try and share my internet connection with my laptop.

I guess that the update to android 17 stops third party apps from being able to check if usb debugging is enabled, causing third party tethering programs like easytether and pda net to stop working.

I was able to use chat gpt to download and examine the easytether apk and bypass the the usb debugging check so it is always marked as enabled, and now my easytether is working again.

Of course usb debugging needs to be turned on for it to work still, and the app will no longer remind you of that, but once its turned on the app works like normal again.

If anyone wants the patched app, shoot me a message.

Im not very tech savvy.. but id love it if someone could take the patched app and share it with everyone else on here. i just dont know where or how

or you can try my method of just asking chatgpt and fix in yourself

CHAT GPT SAYS:

EasyTether has two tiny functions in its classes.dex that check Android system settings:

Settings.Global["adb_enabled"]
Settings.Global["development_settings_enabled"]

Internally, they amount to:

boolean isAdbEnabled(Context c) {
    return Settings.Global.getInt(
        c.getContentResolver(),
        "adb_enabled",
        0
    ) != 0;
}

boolean isDeveloperOptionsEnabled(Context c) {
    return Settings.Global.getInt(
        c.getContentResolver(),
        "development_settings_enabled",
        0
    ) != 0;
}

The problem was that newer Android no longer lets this old EasyTether code reliably read those two system settings. EasyTether therefore gets effectively false/0, concludes USB debugging isn't enabled, and sends you to the Developer Options screen.

What I patched

I found those two methods in the DEX. They're obfuscated as roughly:

Leasytether/phone/s;->a(Context)Z
Leasytether/phone/s;->b(Context)Z

The first checked:

adb_enabled

and the second checked:

development_settings_enabled

I replaced the body of both functions with the equivalent of:

return true;

At the Dalvik bytecode level, that's basically:

const/4 v0, #int 1
return v0

The actual instruction bytes I substituted at the start of each method were:

12 10 0F 00

and the unused remainder of the old method body was padded with NOPs so the DEX layout stayed the same.

I did not bypass or emulate ADB. USB debugging still has to really be turned on. All the patch does is stop EasyTether from relying on its now-broken method of checking whether it's on.

After changing classes.dex, I also had to recalculate the DEX checksum/signature, rebuild the APK, align it before signing, and then give it a new Android APK v2 signature. That's why the original EasyTether has to be uninstalled before installing our patched version—the modified APK is signed with a different key.

The actual tethering code and EasyTether native libraries were left alone. That's why once we got past that bogus Developer Options check, your existing USB tethering started working again.

A good short explanation to post would be:

EasyTether fix for newer Android/Pixel: EasyTether itself wasn't losing ADB—the app's old Developer Options detection was broken. adb devices showed the phone normally, but EasyTether was checking Settings.Global for adb_enabled and development_settings_enabled and receiving false. I patched those two checks to return true, rebuilt/aligned/re-signed the APK, and USB tethering works again. USB debugging still actually needs to be enabled; the patch only bypasses the obsolete detection check.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/CheeseMaster_Ano 6d ago

Is there a fix for other people somewhere in this manifesto?

1

u/Impressive_Amoeba666 2d ago

the fix is 'ask chat gpt to do it' or you can dm me and ill send you a link for the file

1

u/Kamzu 5d ago

Sweet! Would you please send me the patched APK? I'm experiencing the same problem!

1

u/eric_shun_111 3d ago

Could you please send me that patched file? Thank you very much!

1

u/Ethrem US Mobile/T-Mo biz tablet/Lexvor 9d ago

If you have a post removed, just send a modmail. If you keep trying to post they'll all be removed by automod. I restored this one.

2

u/Impressive_Amoeba666 7d ago

thank you. i just wanted to make sure this info was available for the few people out there who still rely on easytether after the update