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

android-tools: clean up and fix fastboot patches #10561

Merged
merged 2 commits into from May 12, 2022
Merged

android-tools: clean up and fix fastboot patches #10561

merged 2 commits into from May 12, 2022

Conversation

ghost
Copy link

@ghost ghost commented May 8, 2022

I'm really sorry to disturb again

I found that if I switch to the global struct, I can make the fastboot patch only modify 2 files

Also, when the usb is disconnected, the fd is still valid,
thus causing LinuxUsbTransport::WaitForDisconnect to wait until the 3s timeout.

I now check if the fd's fstat->st_nlink is less than 1 to solve this problem

Before After

Then, I made a few more changes,
now you can use fastboot with Termux-usb even with root (although it may be useless xddd)

Before After

Actual flashing

@xtkoba
Copy link
Contributor

xtkoba commented May 9, 2022

I suggest that the clean-up part and the fix part be separated and be made into two commits, unless they are inseparable from each other. Also add an appropriate comment to each commit (it should be OK to just copy and paste the current description in this PR).

@ghost ghost changed the title android-tools: clean up fastboot patches android-tools: clean up and fix fastboot patches May 12, 2022
@ghost
Copy link
Author

ghost commented May 12, 2022

I suggest that the clean-up part and the fix part be separated and be made into two commits, unless they are inseparable from each other. Also add an appropriate comment to each commit (it should be OK to just copy and paste the current description in this PR).

thank you sir, done

Ookiineko added 2 commits May 12, 2022 19:50
* switch to global struct for managing libusb_context

Signed-off-by: Ookiineko <[email protected]>
* when the usb is disconnected, the fd is still valid,
* thus causing LinuxUsbTransport::WaitForDisconnect to wait until the 3s timeout

* now we check if the fd's fstat->st_nlink is less than 1 to detect a disconnection

Signed-off-by: Ookiineko <[email protected]>

android-tools: bump TERMUX_PKG_REVISION

Signed-off-by: Ookiineko <[email protected]>
@MrAdityaAlok MrAdityaAlok merged commit e0032c0 into termux:master May 12, 2022
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

Successfully merging this pull request may close these issues.

2 participants