GithubHelp home page GithubHelp logo

gtajisan / termux-adb Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 139 KB

Using mobile phone and termux flash twrp. Orange fox recovery flash modified fork πŸ’–

License: MIT License

Shell 100.00%
farhan-muh-tasim termux-adb termux-api custom-recovery-flash custom-rom-users orange-fox-flash twrp-flasher

termux-adb's Introduction

termux-adb

Run adb and fastboot in Termux without root permissions!

Description

This is a modified version of adb and fastboot which enables debugging of one Android device from another via USB cable. It should work with any USB-C male-to-male cable or the corresponding OTG adapter + cable in case of micro USB.

Installation

  • install Termux from mediafire termux🌚 click the image πŸ™ˆ
  • install Termux:API from F-Droid termux api click the image πŸ™ˆ
  • in Termux:

watch thesis video πŸ™‹β€β™‚οΈ

https://youtu.be/uYIxucVW1Xw?si=k16dl0M5IqCYM1W9

termux link πŸ™ˆ

https://www.mediafire.com/file/ol1bgomiymum5yu/Termux_0.118.0%252Bbe66cff.apk/file

termux api link πŸ™ˆ

https://f-droid.org/repo/com.termux.api_51.apk

using setup

pkg update
curl -s https://raw.githubusercontent.com/Gtajisan/termux-adb/master/install.sh | bash

check YouTube video and step follow

intsall these file https://github.com/Gtajisan/termux-adb/archive/refs/tags/0.2.0.zip

ls
unzip termux-adb-0.2.0.zip
ls
cd termux-adb-0.2.0
ls
./install.sh

check

termux-adb version

run flash cmd

termux-adb devices

aging

termux-adb devices
termux-adb reboot bootloader

check device aging

termux-adb devices

follow YouTube video step exist on termux open aging termux

termux-adb devices

termux-adb flash recovery [ past you're file location ]

termux-adb flash recovery

boot recovery and aging you're recovery located

termux-fastboot boot
  • this will add termux-adb apt repository and install the corresponding public gpg key
  • latest version of termux-adb and termux-fastboot will be installed
  • any future upgrades will be done as part of pkg upgrade

Usage

Both termux-adb and termux-fastboot are drop-in replacements for the original commands so the usage is exactly the same. The commands were only renamed to avoid collision with the official android-tools Termux package (which contains more tools beside these two).

Build instructions

The official termux-packages build environment is used (forked to add the termux-adb package).

For more information, please refer to the Termux documentation:

Current limitations

Using termux-usb and querying device serial number with libusb tends to be slow. That's not a problem for adb which runs as a daemon and scans USB devices periodically. However, it is quite noticable for termux-fastboot commands because fastboot doesn't use any background service. This can potentially be improved in a future release.

How it actually works

Termux has the android-tools package which contains adb and fastboot but it normally works on rooted devices only. This is mainly due to filesystem permissions required by adb when enumerating USB devices (traversing /dev/bus/usb/*).

There is, however, Android API exposed by termux-usb utility which gives you a raw file descriptor of any connected USB device after manual approval by the user.

Of course, adb by itself doesn't know anything about termux-usb nor it can take raw file descriptors from command-line or environment. If it cannot access /dev/bus/usb, it just won't detect any connected devices. This is where termux-adb comes in.

Both adb and fastboot are patched to scan for USB devices using the termux-usb command. Furhtermore a Unix Domain Socket is used to transfer the obtained file descriptors from child process to the parent (i.e. termux-adb runs termux-usb for every detected device which in turn runs termux-adb in a special mode that will only send USB file descriptor to the UDS file descriptor provided by environment variable).

This way we don't complicate the user experience and we can work with any number of devices connected at once (e.g. if you have a USB hub connected to the OTG adapter).

termux-adb's People

Contributors

gtajisan avatar nohajc avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

izamkarim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.