MasterDevX / Termux-ADB

Install ADB & FastBoot Tools in Termux!
1.59k stars 275 forks source link

Pls Specify This Clearly In Readme File! #37

Open Xeek3y opened 3 years ago

Xeek3y commented 3 years ago

I came here from this termux issue: https://github.com/termux/termux-packages/issues/478 And i wanna tell you that you should specify about this tool clearly because after reading issues of this script/tool, i get to know that this tool is for running the server and connecting to the external device not the internal where turmux is installed, i also mistaken it as the tool that runs the adb commands for the same device where this turmux is running. you should specify that if you turn on the tcp connection on other device via pc/mobile(termux) then you will be able to control that and this tool doesn't turns on adb tcp connection where termux is installed means you can not use this script/tool to turn on the adb tcp bridge on the same device where you are using the termux app!

ghost commented 3 years ago

I did not understand this clearly, could you summarise that?

teou1 commented 3 years ago

On the homepage of Termux stays: its not a terminal emulator. It is kind of isolated from the rest of the system.

That said, i whant to achieve exactly what you want (adb to self). It is possible on Android 11 and 10 i think, because they support wireless adb with pin (older versions do this only with certificates and the dialog window to accept it does not show on android). However, we need the latest version of the binaries here (and no you cannot use the binaries from your pc, its not arm64 architecture). I wrote Osm0sis and a Termux package request, maybe somebody would be nice enough to compile them.

ghost commented 3 years ago

Oops, I experienced this also. For mistaken users, the script doesn't turn tcpip, you need to turn it on in the computer and run the script. Although I do not know how to set tcpip default without root.

teou1 commented 3 years ago

You cannot, after reboot it reverts to usb. BUT:

Thanks to osm0sis and surge 1223 we now have a solution to that problem. So, download adb.bin somewhere on your phone from here https://github.com/Magisk-Modules-Repo/adb-ndk/tree/master/bin Then use fx file explorer - connect to - left menu, termux, to authorize fx to see part of termux filesystem and transfer adb.bin there. Do not try to do it from termux itself: you'll be greeted with an error later on, because of the enforced no execution policy on Android 11 (good for virus protection, bad for power users, see here https://github.com/termux/termux-app/issues/1072 ). As next step you run termux and chmod +x adb.bin just to be sure. Now you can ./adb.bin and read the help how to pair and then connect. Remember there are different ports for pairing and connecting.

It would be nice if masterX updates the binary here. Note that -armabi binaries seem to be the old version 39.

ghost commented 3 years ago

@teou1 Nice going. Probably going to check it out. But it is not only FX, any file explorer with SAF can do this. ~But, will it still work on other versions?~ Going to test this in a Virtual Machine ( Because I am paranoid )

teou1 commented 3 years ago

File manager does not matter, as long as it circumvents "write xor execute". It's just that some file managers cannot mount /data on unrooted devices. Actually google files mounts on app request. The build in google files would also do but it is just awful.

Alternatively, somebody updates the script here.

Just do not copy the file from termux with cp or wget or similar, that won't work.

and101 commented 3 years ago

I have forked this project and updated the binaries if you'd like to use them. You can use the adb pair command and achieve what you need.