nohajc / termux-adb

Run adb in Termux without root permissions!
MIT License
391 stars 37 forks source link

Fastboot work tooooo slooow #30

Open Prythomn opened 2 months ago

Prythomn commented 2 months ago

Fastboot work too slowly (The command takes 5 minutes to execute.)

nohajc commented 2 months ago

I’m sorry to hear that. I’ve heard other reports that the initial USB device access is too slow. Unfortunately this boils down to how Termux:API works. Could be their bug or a problem with the particular Android device.

With the devices I was able to test, it was always in the order of seconds. There’s also a current limitation which makes fastboot perceivably slower than adb due to the fact that fastboot doesn’t maintain connection to the device in background. So the connection “initialisation” has to be done on every run.

Prythomn commented 2 months ago

I’m sorry to hear that. I’ve heard other reports that the initial USB device access is too slow. Unfortunately this boils down to how Termux:API works. Could be their bug or a problem with the particular Android device.

With the devices I was able to test, it was always in the order of seconds. There’s also a current limitation which makes fastboot perceivably slower than adb due to the fact that fastboot doesn’t maintain connection to the device in background. So the connection “initialisation” has to be done on every run.

Im always allow my phone to termux api, im so idk how to fix i need to flash fastboot rom but bugjaeger app cant work with .bat or .sh scripts

Damglador commented 2 months ago

I have the same thing, fastboot just indefinitely thinks even if command is nothing to think about, just devices without devices connected.

Is there any logs I can send?

nohajc commented 2 months ago

I can double check the case when no device is connected but otherwise it looks like the same problem with slow Termux:API which I can't really solve. It would be interesting to know what Termux devs have to say about this.

Damglador commented 2 months ago

Termux:API is likely.

I rechecked. It doesn't delay without anything in USB, it hangs if there's a device in USB iven if it's not in fastboot and even if I unplug it and cancel/run again the command it looks like it still hangs from the last command, after it finally proceeds it works as it should without anything plugged, giving no output in no time. So yes, its probably Termux:API that hangs in the background doing some kind of nothing, not allowing commands to work properly. For fastboot it happens after every fastboot command and for adb it seems like it hangs only some time after device was plugged in and works fine(?) after that.

nohajc commented 2 months ago

Yes, fastboot hangs on every command because unlike adb, there isn't any "server" running in the background handling the device connections as they happen.

This is a limitation of how the original fastboot was designed.

Damglador commented 2 months ago

I think this might be relevant https://github.com/termux/termux-api/issues/466

Damglador commented 2 months ago

It hangs for literally one minute, precisely.

Damglador commented 2 months ago

https://github.com/termux/termux-api/issues/714

termux-location and termux-toast have the same exact issue.

nohajc commented 2 months ago

@Prythomn Can you check if you have a delay with the other termux commands @Damglador mentioned above?

nohajc commented 2 months ago

@Damglador Thanks for investigating btw!

offici5l commented 2 months ago

Fastboot work too slowly (The command takes 5 minutes to execute.)

@Prythomn

have you tried with termux-monet ?

termux-monet

termux-monet-api

Damglador commented 2 months ago

have you tried with termux-monet ?

termux-monet

termux-monet-api

Damn, it looks awesome, even has Ukrainian localization. Sad that it didn't get attention it deserves and was discussed 21 days ago (idk if these things related). And yes, seems like it doesn't have this issue. There is delays on some commands, but they are reasonable (~1 second).

Prythomn commented 1 month ago

Fastboot work too slowly (The command takes 5 minutes to execute.)

@Prythomn

have you tried with termux-monet ?

termux-monet

termux-monet-api

I can try later, thanks!

Prythomn commented 1 month ago

@Prythomn Can you check if you have a delay with the other termux commands @Damglador mentioned above?

I don't have another device right now

Prythomn commented 1 month ago

Fastboot commands work fine IMG_20241007_231952_645

offici5l commented 1 month ago

@Damglador @Prythomn

tks 🙏 for checking and confirming... while waiting for the termux team to fix the issue, so it is recommended that users(who is facing the same problem) currently use termux-mount .