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

Unknown command: 1397511251 = 'b'STLS'' with ADB over Wi-Fi #596

Closed
Shulyaka opened this issue Jan 9, 2025 · 3 comments
Closed

Unknown command: 1397511251 = 'b'STLS'' with ADB over Wi-Fi #596

Shulyaka opened this issue Jan 9, 2025 · 3 comments

Comments

@Shulyaka
Copy link

Shulyaka commented Jan 9, 2025

Hi! I have the following error on mvt-android with download-apks:

denis@denis:~/mvt$ mvt-android download-apks -s 192.168.1.233:45877 -V -o .


        MVT - Mobile Verification Toolkit
                https://mvt.re
                Version: 2.5.4
                Indicators updates checked recently, next automatic check in 12 hours


15:59:25 INFO     [mvt.android.cmd_download_apks] Retrieving list of installed packages...                                                                                   
Traceback (most recent call last):
  File "/home/denis/.local/bin/mvt-android", line 8, in <module>
    sys.exit(cli())
             ~~~^^
  File "/usr/lib/python3.13/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.13/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.13/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/denis/.local/lib/python3.13/site-packages/mvt/android/cli.py", line 106, in download_apks
    download.run()
    ~~~~~~~~~~~~^^
  File "/home/denis/.local/lib/python3.13/site-packages/mvt/android/cmd_download_apks.py", line 178, in run
    self.get_packages()
    ~~~~~~~~~~~~~~~~~^^
  File "/home/denis/.local/lib/python3.13/site-packages/mvt/android/cmd_download_apks.py", line 108, in get_packages
    m.run()
    ~~~~~^^
  File "/home/denis/.local/lib/python3.13/site-packages/mvt/android/modules/adb/packages.py", line 215, in run
    self._adb_connect()
    ~~~~~~~~~~~~~~~~~^^
  File "/home/denis/.local/lib/python3.13/site-packages/mvt/android/modules/adb/base.py", line 111, in _adb_connect
    self.device.connect(rsa_keys=[signer], auth_timeout_s=5)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/denis/.local/lib/python3.13/site-packages/adb_shell/adb_device.py", line 675, in connect
    self._available, self._maxdata = self._io_manager.connect(self._banner, rsa_keys, auth_timeout_s, auth_callback, adb_info)
                                     ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/denis/.local/lib/python3.13/site-packages/adb_shell/adb_device.py", line 228, in connect
    cmd, arg0, maxdata, banner2 = self._read_expected_packet_from_device([constants.AUTH, constants.CNXN], adb_info)
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/denis/.local/lib/python3.13/site-packages/adb_shell/adb_device.py", line 408, in _read_expected_packet_from_device
    cmd, arg0, arg1, data = self._read_packet_from_device(adb_info)
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/denis/.local/lib/python3.13/site-packages/adb_shell/adb_device.py", line 491, in _read_packet_from_device
    raise exceptions.InvalidCommandError("Unknown command: %d = '%s' (arg0 = %d, arg1 = %d, msg = '%s')" % (cmd, int_to_cmd(cmd), arg0, arg1, msg))
adb_shell.exceptions.InvalidCommandError: Unknown command: 1397511251 = 'b'STLS'' (arg0 = 16777216, arg1 = 0, msg = 'b'STLS\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\xab\xb3\xac'')

Similar error with check-adb command.
The device is Samsung Galaxy S23+ and I have just installed the latest version from pypi.

I have reasons to believe that the authorities hacked into my device by installing an application masking as android battery status (or stats) app (they had physical access to the device). It looks like they already uninstalled the app itself, but I want to check for any traces and leftovers before using the phone again.

@roaree
Copy link
Contributor

roaree commented Jan 9, 2025

Would check that you have the latest adb version installed, or otherwise try again with ADB over USB

@Shulyaka
Copy link
Author

Shulyaka commented Jan 9, 2025

The wired connection works, thanks!
Should I close the issue?

@Shulyaka Shulyaka changed the title Unknown command: 1397511251 = 'b'STLS'' Unknown command: 1397511251 = 'b'STLS'' with ADB over Wi-Fi Jan 9, 2025
@roaree
Copy link
Contributor

roaree commented Jan 9, 2025

Thanks!

@roaree roaree closed this as completed Jan 9, 2025
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

2 participants