All Projects → medvid → android-tether

medvid / android-tether

Licence: other
Autostart Android USB tethering with udev + systemd + adb

Programming Languages

shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to android-tether

linux-android-backup
Back up your device without vendor lock-ins, using insecure software or root. Supports encryption and compression out of the box. Works cross-platform.
Stars: ✭ 119 (+296.67%)
Mutual labels:  adb
sysz
An fzf terminal UI for systemctl
Stars: ✭ 1,258 (+4093.33%)
Mutual labels:  systemd
systemdspawner
Spawn JupyterHub single-user notebook servers with systemd
Stars: ✭ 79 (+163.33%)
Mutual labels:  systemd
node-systemd-journald
Native bindings to journald
Stars: ✭ 26 (-13.33%)
Mutual labels:  systemd
go-systemd-time
📅 Go implementation of systemd relative time adjustments
Stars: ✭ 21 (-30%)
Mutual labels:  systemd
fuck systemd
A library to bring the joys of non-systemd users to systemd users
Stars: ✭ 19 (-36.67%)
Mutual labels:  systemd
erlang-systemd
systemd utilities for Erlang applications
Stars: ✭ 140 (+366.67%)
Mutual labels:  systemd
JumpJump
微信小游戏 跳一跳 kotlin PC破解
Stars: ✭ 70 (+133.33%)
Mutual labels:  adb
service-systemd
Setup a node.js app as systemd service.
Stars: ✭ 35 (+16.67%)
Mutual labels:  systemd
logback-journal
systemd journal appender for Logback
Stars: ✭ 25 (-16.67%)
Mutual labels:  systemd
Wristkey
A free and open-source offline authenticator app for Wear OS.
Stars: ✭ 65 (+116.67%)
Mutual labels:  adb
wimpy.deploy
Ansible role to automate immutable infrastructure scheduling one docker container on one EC2 instance
Stars: ✭ 21 (-30%)
Mutual labels:  systemd
Latest-adb-fastboot-installer-for-windows
A Simple Android Driver installer tool for windows (Always installs the latest version). Sponsored by https://sendletter.org, the Cheapest way to Send Letters
Stars: ✭ 242 (+706.67%)
Mutual labels:  adb
ruzzle-solver
A python script that solves ruzzle boards
Stars: ✭ 46 (+53.33%)
Mutual labels:  adb
gilfoyle
A CLI to interactively remove useless apps from your Android device.
Stars: ✭ 23 (-23.33%)
Mutual labels:  adb
systemd-formula
No description or website provided.
Stars: ✭ 24 (-20%)
Mutual labels:  systemd
gentoo-project-gnome-without-systemd
GNOME Without Systemd
Stars: ✭ 89 (+196.67%)
Mutual labels:  systemd
buddy-linux
Do you remember "Wubi Ubuntu Installer"? This project is both a replacement and an improvement of Wubi. You will be able to install your Debian (or derived) distribution on a PC without repartitioning it, simply by using a secondary/external boot device (like a USB drive).
Stars: ✭ 17 (-43.33%)
Mutual labels:  systemd
alfred-adb-workflow
an alfred workflow that wraps the adb command to avoid the "more than one device/emulator" error.
Stars: ✭ 22 (-26.67%)
Mutual labels:  adb
one-script-wsl2-systemd
The one-script variant of the systemd hack for WSL2
Stars: ✭ 196 (+553.33%)
Mutual labels:  systemd

Android USB tethering

Files

  • tether - script to start USB tethering
  • 49-android.rules - udev rule to start tethering on device hotplug
  • tether.service - systemd service launched by udev
  • usb0.link - systemd-networkd link configuration
  • usb0.network - systemd-networkd interface configuration

Prerequisites

Linux machine running systemd+udev+networkd+resolved

Usage

  • Install Android SDK and set path to adb binary in tether script.

  • Attach your Android device.

  • Get major and minor of your device with lsusb command:

      $ lsusb | grep HTC
      Bus 001 Device 088: ID 0bb4:0004 HTC (High Tech Computer Corp.)
    
  • Get product attribute for your device:

      $ udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/001/088) | grep ATTR{product}
          ATTR{product}=="ZP900S"
    
  • Set product attribute in 49-android.rules.

  • Configure DNS.

    You can get DNS servers used by your device with:

      $ adb shell getprop net.dns{1-4}
    

    Alternatively, use public DNS servers:

      $ cat >> tether.network <<EOF
      # Google Public DNS
      DNS 8.8.8.8
      DNS 8.8.4.4
      EOF
    
  • Install script, systemd service and udev rules:

      $ sudo make install
    
  • Use systemd-networkd DNS configuration:

      # ln -sf ../run/systemd/network/resolv.conf /etc/resolv.conf
    
  • Re-attach device.

  • Internet should work now.

Related work

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].