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

TRWP fails with ADB push and sideload of large file when using the latest ADB client from Google #1607

Open
4 tasks done
hselasky opened this issue Apr 30, 2021 · 1 comment

Comments

@hselasky
Copy link

  • I am running an official build of TWRP, downloaded from https://twrp.me/Devices/
  • I am running the latest version of TWRP
  • I have read the FAQ (https://twrp.me/FAQ/)
  • I have searched for my issue and it does not already exist

Device codename: a5y17lte
TWRP version: 3.5.2

WHAT STEPS WILL REPRODUCE THE PROBLEM?

adb push and adb sideload of large file will fail, due to short data received.

WHAT IS THE EXPECTED RESULT?

The ADB server in TWRP must ignore so-called Zero Length Packets, ZLPs, received via USB.
Google updated their ADB client to send ZLPs to flush data buffers regularly, due to a change in RX buffering in their ADB server.

Refer to the function should_perform_zero_transfer() at:
https://github.com/aosp-mirror/platform_system_core/blob/platform-tools-29.0.6/adb/client/usb_libusb.cpp#L188

I can probably make a patch if someone can point out the USB code used for ADB in TWRP.

WHAT HAPPENS INSTEAD?

Transfer aborted. Google has confirmed this is a new feature and not a bug.

@bigbiff
Copy link
Member

bigbiff commented Apr 30, 2021

Hello, we use ADB from system_core for each build tree. This patch would need to be ported to all build trees we use starting with Lollipop.

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