HyperSploit icon indicating copy to clipboard operation
HyperSploit copied to clipboard

AdbClient fails to install the patched APK because of an unknown error

Open JxJxxJxJ opened this issue 7 months ago • 11 comments

Image

Just tried it and got this error, any ideas?

JxJxxJxJ avatar Jun 27 '25 16:06 JxJxxJxJ

You probably disconnected your device midway.

TheAirBlow avatar Jun 28 '25 06:06 TheAirBlow

I didn't, you mean the USB?

JxJxxJxJ avatar Jun 28 '25 07:06 JxJxxJxJ

I'm also having error:

./HyperSploit-Linux
  _   _                                 ____            _           _   _   
 | | | |  _   _   _ __     ___   _ __  / ___|   _ __   | |   ___   (_) | |_ 
 | |_| | | | | | | '_ \   / _ \ | '__| \___ \  | '_ \  | |  / _ \  | | | __|
 |  _  | | |_| | | |_) | |  __/ | |     ___) | | |_) | | | | (_) | | | | |_ 
 |_| |_|  \__, | | .__/   \___| |_|    |____/  | .__/  |_|  \___/  |_|  \__|
          |___/  |_|                           |_|                          
Welcome to HyperSploit v1.1 by TheAirBlow!
No ADB server is running, trying to start...
You chose 23122PCD1G codename garnet!
Is this device from Mainland China? [y/n] (n): n
Make sure you have a cellular connection with internet access!
Open Mi Unlock Status and attempt to bind account
Disabling mobile internet, taking over!
Failed to decrypt arguments and headers!
This probably means you have a patched Settings app.
Try downgrading to an unpatched version? [y/n] (n): y
Decompressing Settings.apk bundled within HyperSploit...
Installing unpatched Settings APK to the device...
Unhandled exception caught, can't continue!
System.Net.Sockets.SocketException (32): Broken pipe
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError, CancellationToken) + 0x3e
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16) + 0x5c
   at AdvancedSharpAdbClient.AdbSocket.<SendAsync>d__17.MoveNext() + 0x279
--- End of stack trace from previous location ---
   at AdvancedSharpAdbClient.AdbClient.<InstallAsync>d__30.MoveNext() + 0xa69
--- End of stack trace from previous location ---
   at HyperSploit.Program.<Downgrade>d__7.MoveNext() + 0x740
--- End of stack trace from previous location ---
   at HyperSploit.Program.<Downgrade>d__7.MoveNext() + 0xd2f
--- End of stack trace from previous location ---
   at HyperSploit.Program.<Downgrade>d__7.MoveNext() + 0xe47
--- End of stack trace from previous location ---
   at HyperSploit.Program.<Bypass>d__4.MoveNext() + 0x37c
--- End of stack trace from previous location ---
   at HyperSploit.Program.<Main>d__3.MoveNext() + 0x8d8
Would you like to run HyperSploit on another device? [y/n] (n): n

AndreiBiziuk avatar Jun 30 '25 15:06 AndreiBiziuk

Same, I get similar error trying to downgrade to an unpatched version. Xiaomi 15 Ultra HyperOS 2.0.106

./HyperSploit-Linux
  _   _                                 ____            _           _   _   
 | | | |  _   _   _ __     ___   _ __  / ___|   _ __   | |   ___   (_) | |_ 
 | |_| | | | | | | '_ \   / _ \ | '__| \___ \  | '_ \  | |  / _ \  | | | __|
 |  _  | | |_| | | |_) | |  __/ | |     ___) | | |_) | | | | (_) | | | | |_ 
 |_| |_|  \__, | | .__/   \___| |_|    |____/  | .__/  |_|  \___/  |_|  \__|
          |___/  |_|                           |_|                          
Welcome to HyperSploit v1.1 by TheAirBlow!
No ADB server is running, trying to start...
You chose 25010PN30G codename xuanyuan!
Is this device from Mainland China? [y/n] (n): n
Make sure you have a cellular connection with internet access!
Open Mi Unlock Status and attempt to bind account
Disabling mobile internet, taking over!
Failed to decrypt arguments and headers!
This probably means you have a patched Settings app.
Try downgrading to an unpatched version? [y/n] (n): y
Decompressing Settings.apk bundled within HyperSploit...
Installing unpatched Settings APK to the device...
Unhandled exception caught, can't continue!
System.Net.Sockets.SocketException (32): Broken pipe
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError, CancellationToken) + 0x3e
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16) + 0x5c
   at AdvancedSharpAdbClient.AdbSocket.<SendAsync>d__17.MoveNext() + 0x279
--- End of stack trace from previous location ---
   at AdvancedSharpAdbClient.AdbClient.<InstallAsync>d__30.MoveNext() + 0xa69
--- End of stack trace from previous location ---
   at HyperSploit.Program.<Downgrade>d__7.MoveNext() + 0x740
--- End of stack trace from previous location ---
   at HyperSploit.Program.<Downgrade>d__7.MoveNext() + 0xd2f
--- End of stack trace from previous location ---
   at HyperSploit.Program.<Downgrade>d__7.MoveNext() + 0xe47
--- End of stack trace from previous location ---
   at HyperSploit.Program.<Bypass>d__4.MoveNext() + 0x37c
--- End of stack trace from previous location ---
   at HyperSploit.Program.<Main>d__3.MoveNext() + 0x8d8
Would you like to run HyperSploit on another device? [y/n] (n): n

syfox0 avatar Jun 30 '25 19:06 syfox0

Seems like HyperOS refusing to downgrade system apps. I tried to downgrade with adb and Shizuku. No luck.

AndreiBiziuk avatar Jul 01 '25 07:07 AndreiBiziuk

Can y'all check if it works when you try to install it manually via adb install Settings.apk, you can download the APK from here.

TheAirBlow avatar Jul 01 '25 07:07 TheAirBlow

Not working

┌[andrei☮x230]-(~/src/hypersploit)
└> adb install ./Settings.apk 
Performing Streamed Install
adb: failed to install ./Settings.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade detected: Update version code 34 is older than current 35]
┌[andrei☮x230]-(~/src/hypersploit)
└> adb install -t -d -r ./Settings.apk
Performing Streamed Install
adb: failed to install ./Settings.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade detected: Update version code 34 is older than current 35]

AndreiBiziuk avatar Jul 01 '25 10:07 AndreiBiziuk

Can y'all check if it works when you try to install it manually via adb install Settings.apk, you can download the APK from here.

adb gives a "Failed to install" unfortunately.

syfox0 avatar Jul 13 '25 21:07 syfox0

Android 14+ doesn't allow app downgrades without root. Shizuku also doesn't work.

2shrestha22 avatar Jul 14 '25 03:07 2shrestha22

Is there anyway to fix this? I've Xiaomi 15 Ultra (China device) and I've no clue how we can switch it to a global or eu rom :/

turantoprakbilge avatar Jul 24 '25 23:07 turantoprakbilge

I'm guessing that this is still a problem...? :)

Jorilx avatar Nov 27 '25 21:11 Jorilx