Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaBs authored Sep 7, 2024
1 parent bc41c16 commit 7274b2a
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
# Tethering from Android to Android via USB cable

## Requirements
- Tethering device: The device sharing its internet connection.
- Tethered deivce: The device want to connect to the Internet via 'tethering device'.

- [Termux](https://wiki.termux.com/wiki/Installation): Install from F-Droid.
- [Termux-API](https://wiki.termux.com/wiki/Termux:API)
## Install for tethering device

## Usage

1. Download file from [release](https://github.com/AlphaBs/termux-gnirehtet/releases) and extract it.
2. Run `./install.sh`.
3. [Connect to device](#USB-ADB-Connecting).
4. Run `./gnirehtet run`.
- [Termux](https://github.com/termux/termux-app/releases/latest): Install from Github.
- [Termux-API](https://wiki.termux.com/wiki/Termux:API): Install from [Github](https://github.com/termux/termux-api/actions)

## USB ADB Connecting
1. Clone the repository `git clone https://github.com/AlphaBs/termux-gnirehtet`
2. Run `pkg update && ./install.sh`.

Tethering device: The device sharing its internet connection.

Tethered deivce: The device want to connect to internet through 'tethering device'.
## Usage

1. Make sure to turn on USB debugging on tethered device.
2. Run `adb start-server` on tethering deivce.
3. Connect two android device via USB cable.
4. Set USB controlling mode:
1. Make sure USB debugging is enabled on the tethered device.
2. Connect two Android devices with USB cable.
3. Set USB control mode:
- Tethering device: USB controlled by connected device
- Tethered device: USB controlled by this device
5. Allow permission to access file system and USB debugging.
6. Running `adb devices` on tethering device should print connected device.
4. Allow file system access and USB debugging authorization.
<img src="https://github.com/user-attachments/assets/dc9b37b7-104e-4da8-8f13-2294a749ae6a" width="256">

5. Run `adb devices` on the tethering device to check the tethered device is connected. (it may take 1-2 minutes)
<img src="https://github.com/user-attachments/assets/cda5cbf1-c31d-4791-83d3-5253c866078c" width="256">
<img src="https://github.com/user-attachments/assets/d992c57e-cee8-4177-8678-17937b557004" width="256">

6. Run `./gnirehtet run` on the tethering device.
<img src="https://github.com/user-attachments/assets/dcba643b-60cf-4335-92a9-b558e973e65f" width="256">


## How it works

Expand All @@ -44,13 +46,13 @@ To build relay server:
1. Install [cargo](https://rustup.rs/) to build Rust.
2. Run `build-gnirehtet.sh` script.

Compiled binary (named `gnirehtet`) will be located in the same directory where the script is executed.
The compiled binary (named `gnirehtet`) will be located in the same directory where the script is executed.

### gnirehtet android app

Normally gnirehtet android app would works on most device so you don't need to build it yourself. The apk file in this repository is from [official gnirehtet release](https://github.com/Genymobile/gnirehtet/releases).
gnirehtet app would work on most devices so you don't need to build it yourself. The apk file in this repository is from [official gnirehtet release](https://github.com/Genymobile/gnirehtet/releases).

To build android app: [gnirehtet/DEVELOP.md](https://github.com/Genymobile/gnirehtet/blob/master/DEVELOP.md)
To build the Android app: [gnirehtet/DEVELOP.md](https://github.com/Genymobile/gnirehtet/blob/master/DEVELOP.md)

## Related projects

Expand Down

0 comments on commit 7274b2a

Please sign in to comment.