{"id":21962998,"url":"https://github.com/alphabs/termux-gnirehtet","last_synced_at":"2025-07-29T23:35:07.586Z","repository":{"id":255818583,"uuid":"616414717","full_name":"AlphaBs/termux-gnirehtet","owner":"AlphaBs","description":"USB Tethering from Android to Android, non-root","archived":false,"fork":false,"pushed_at":"2024-09-07T09:57:43.000Z","size":390,"stargazers_count":19,"open_issues_count":6,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T22:31:51.910Z","etag":null,"topics":["adb","android","gnirehtet","non-root","reverse-tethering","termux","tethering","usb","usb-tethering","vpn"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlphaBs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-20T10:48:39.000Z","updated_at":"2025-02-20T00:44:42.000Z","dependencies_parsed_at":"2024-11-29T10:58:52.140Z","dependency_job_id":"956df2fd-d5ed-45b1-b5ae-0e9db64a0e16","html_url":"https://github.com/AlphaBs/termux-gnirehtet","commit_stats":null,"previous_names":["alphabs/termux-gnirehtet"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/AlphaBs/termux-gnirehtet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaBs%2Ftermux-gnirehtet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaBs%2Ftermux-gnirehtet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaBs%2Ftermux-gnirehtet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaBs%2Ftermux-gnirehtet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlphaBs","download_url":"https://codeload.github.com/AlphaBs/termux-gnirehtet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaBs%2Ftermux-gnirehtet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267780334,"owners_count":24143202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adb","android","gnirehtet","non-root","reverse-tethering","termux","tethering","usb","usb-tethering","vpn"],"created_at":"2024-11-29T10:58:40.044Z","updated_at":"2025-07-29T23:35:07.564Z","avatar_url":"https://github.com/AlphaBs.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tethering from Android to Android via USB cable\n\n- Tethering device: The device sharing its internet connection.\n- Tethered deivce: The device want to connect to the Internet via 'tethering device'.\n\n## Install for tethering device\n\n- [Termux](https://github.com/termux/termux-app/releases/latest): Install from Github.\n- [Termux-API](https://wiki.termux.com/wiki/Termux:API): Install from [Github](https://github.com/termux/termux-api/actions)\n\n1. Clone the repository `git clone https://github.com/AlphaBs/termux-gnirehtet`\n2. Run `pkg update \u0026\u0026 ./install.sh`.\n\n## Usage\n\n1. Make sure USB debugging is enabled on the tethered device.\n2. Connect two Android devices with USB cable.\n3. Set USB control mode: \n   - Tethering device: USB controlled by connected device\n   - Tethered device: USB controlled by this device\n4. Allow file system access and USB debugging authorization.\n\u003cimg src=\"https://github.com/user-attachments/assets/dc9b37b7-104e-4da8-8f13-2294a749ae6a\" width=\"256\"\u003e\n\n5. Run `adb devices` on the tethering device to check the tethered device is connected. (it may take 1-2 minutes)\n\u003cimg src=\"https://github.com/user-attachments/assets/cda5cbf1-c31d-4791-83d3-5253c866078c\" width=\"256\"\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/d992c57e-cee8-4177-8678-17937b557004\" width=\"256\"\u003e\n\n6. Run `./gnirehtet run` on the tethering device.\n\u003cimg src=\"https://github.com/user-attachments/assets/dcba643b-60cf-4335-92a9-b558e973e65f\" width=\"256\"\u003e\n\n\n## How it works\n\n`gnirehtet` was originally for reverse-tethering, sharing PC's internet connection to Android device, using `adb`. I recompiled `gnirehtet` to make it executable on aarch64 Termux.\n\nTo run `adb` and connect to another device on Android, I used `termux-adb`.\n\n## Build\n\n### gnirehtet relay server\n\nThe binary of relay server (`gnirehtet`) in this repository was built for Termux, `aarch64`. However, you may want to build relay server yourself to run on difference environment.\n\nTo build relay server:\n\n1. Install [cargo](https://rustup.rs/) to build Rust.\n2. Run `build-gnirehtet.sh` script.\n\nThe compiled binary (named `gnirehtet`) will be located in the same directory where the script is executed.\n\n### gnirehtet android app\n\ngnirehtet 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).\n\nTo build the Android app: [gnirehtet/DEVELOP.md](https://github.com/Genymobile/gnirehtet/blob/master/DEVELOP.md)\n\n## Related projects\n\n- [termux-adb](https://github.com/nohajc/termux-adb)\n- [gnirehtet](https://github.com/Genymobile/gnirehtet)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphabs%2Ftermux-gnirehtet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphabs%2Ftermux-gnirehtet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphabs%2Ftermux-gnirehtet/lists"}