- Android tethering
- Contents
- Wi-Fi access point
- USB tethering
- Using systemd-networkd with udev
- USB tethering with AziLink
- Tools needed
- Configuring the phone connection in Arch Linux
- Procedure
- USB tethering with EasyTether
- Tethering via Bluetooth
- Tethering with SOCKS proxy
- Tools needed
- Instructions
- Tetherbot
- Proxoid
- Android tethering (Русский)
- Contents
- Точка доступа Wi-Fi
- USB модем
- Использование systemd-networkd с udev
- USB-модем с AziLink
- Необходимые инструменты
- Настройка соединения с телефоном в Arch Linux
- Процедура
- USB-модем с EasyTether
- Модем через Bluetooth
- Подключение через прокси-сервер SOCKS
- Необходимые инструменты
- Инструкция
- Tetherbot
- Proxoid
- How to access to internet on Linux using Android Tethering
- What is Tethering?
- Tethering on Linux
- USB Tethering
- Wifi Tethering
- Bluetooth Tethering
Android tethering
Tethering is a way to have internet access on your PC through your smartphone using its network connection. USB tethering and Wi-Fi access point tethering are natively supported since Android 2.2 «Froyo».
Contents
Wi-Fi access point
Using an Android phone as a Wi-Fi access point (to a 3G/4G mobile internet connection) is available for devices running Android 2.2 «Froyo» or newer.
Enable it via one of the following:
- Settings > Wireless & networks > Internet tethering > Wi-Fi access point
- Settings > More. > Tethering & mobile hotspot > Mobile Wi-Fi hotspot
USB tethering
USB tethering is available since Android 2.2 «Froyo».
- Connect the phone to your computer via USB (the USB connection mode — Phone Portal, Memory Card or Charge only — is not important, but please note that you will not be able to change the USB mode during tethering)
- Enable the tethering option from your phone. This is usually done from one of:
- Settings -> Wireless & networks -> Internet tethering (or Tethering & portable hotspot, for more recent versions)
- Settings -> More. -> Tethering & mobile hotspot -> USB tethering
- Install the usb_modeswitch package. See Mobile broadband modem#Mode switching for more information.
- Follow Network configuration.
- If you are using a cellular data plan and you have recently entered a new billing period, you may need to restart your phone.
Using systemd-networkd with udev
This article or section needs expansion.
Using systemd-networkd you can automatically adjust the networking to use the phone as the gateway when plugged in.
You may have to adjust the idVendor attribute depending on your phone. You can check using udevadm:
Then create the corresponding systemd-networkd file:
USB tethering with AziLink
AziLink is an application that allows USB tethering for Android-based phones, without requiring root access. It is very useful for Android older than version 2.2, when there was no stock USB tethering feature implemented. It also does not require changes to your browser, and all network traffic is transparently handled (except ICMP pings). It may be somewhat CPU intensive on the phone at high usage rates (a 500 kBytes/sec data transfer rate may take more than 50% of phone CPU).
Tools needed
For Arch, you need to install the openvpn package. You will also need to install the android-tools package for the adb tool and android-udev which sets up the correct /usr/lib/udev/rules.d/51-android.rules file for your device to be recognized. On the phone, you need the azilink.apk (azilink homepage). The android application acts as a NAT, adb forwards the ports to your phone, and your openvnp setup will connect to it.
Configuring the phone connection in Arch Linux
So that you do not have to run adb as root, we are going to grant your user permissions to your usb device. Make sure you have turned on USB debugging on the phone (usually in Settings -> Applications -> Development -> USB debugging) so that it will be shown as a device, and that it is plugged in to your computer via the USB cable. You should see it with you run the lsusb command. Original azi link instructions are here
The device should be listed. Example output for the Acer Liquid phone:
Then, create the following file, replacing ciri by your own Linux user name, and 0502 by the vendor ID of your own phone:
As root run the udevadm control —reload command to make the change effective. To make sure the change took effect, run adb devices and it should say device instead of unauthorized . Another way to make it take effect is to reboot. Another test is to run adb shell to get to your phones unix prompt.
Procedure
Run the AziLink application in the phone and select About at the bottom to receive instructions, which basically are:
- You will have to enable USB debugging on the phone if it was not already enabled (usually in Settings -> Applications -> Development -> USB debugging).
- Connect the phone with the USB cable to the PC.
- Run AziLink and make sure that the Service active option at the top is checked.
- Run the following commands in your Linux PC:
azilink.ovpn source from here
You may need to manually update the contents of resolv.conf to
If you are running NetworkManager, you may need to stop it before running OpenVPN.
USB tethering with EasyTether
Get the easytether linux client software. The commands to set it up and run it are as follows.
Make sure you have the EasyTether android app installed on your phone for it to connect to. Note: The Lite app disables some connections and you must have the paid app for full functionality. For this reason, using the AziLink setup is recommended instead.
Tethering via Bluetooth
Android (from at least 4.0 onwards, possibly earlier) can provide a Bluetooth personal-area network (PAN) in access point mode.
NetworkManager can perform this action and handle the network initialisation itself; consult its documentation for more details.
Alternatively: pair and ensure you can connect your computer and Android device, as described on Bluetooth, then, substituting the address of the device (here given as AA_BB_CC_DD_EE_FF ), do:
This will create a network interface bnep0 . Finally, configure a network connection on this interface; Android offers DHCP by default.
Tethering with SOCKS proxy
With this method tethering is achieved by port forwarding from the phone to the PC. This is suitable only for browsing. For Firefox, you should set network.proxy.socks_remote_dns to true in about:config ( address bar )
Tools needed
- The android-tools and android-udev packages
- USB connection cable from your phone to PC
- Either Tetherbot or Proxoid
Instructions
Tetherbot
Tetherbot is an experimental SOCKS proxy and Port Bouncer that should allow you to connect your laptop to the internet using the internet connection (EDGE, 3G or Wifi) of your T-Mobile G1 Cellphone. It is discontinued and its website is down, but still can be accessed from Wayback Machine[1] where its APK can also be downloaded from.
In order to do SOCKS proxy via Tetherbot to connect your browser to the Internet, do:
- For your phone, open the application Tetherbot and press the Start Socks button
- Start your SOCKS proxy by running:
- Now go to your web browser’s proxy settings, set a manual proxy configuration with the proxy host address localhost and port 1080 , leaving the rest blank.
Proxoid
Follow the instructions demonstrated in the following link.
Источник
Android tethering (Русский)
Тетеринг — это раздача интернета на компьютер со смартфона с помощью его сетевого подключения. USB-модем и точка доступа Wi-Fi точки доступа поддерживаются изначально с Android Froyo (2.2). В более старых версиях ОС Android большинство неофициальных ПЗУ имеют эту функцию.
Contents
Точка доступа Wi-Fi
Использование телефона Android в качестве точки доступа Wi-Fi (с использованием мобильного интернета 3G/4G) стало доступно с версии Froyo (Android 2.2) без необходимости иметь root права на телефоне.
Включается одним из следующих способов:
- Настройки > Сеть и Интернет > Точка доступа и модем > Точка доступа Wi-Fi
- Настройки > Ещё. > Режим модема > Точка доступа Wi-Fi
USB модем
USB-тетеринг доступен с Android 2.2 «Froyo».
- Подключите телефон к компьютеру с помощью USB кабеля (режим подключения USB — Медиа устройство, Монтирование SD карты или Только зарядка — это не важно, но обратите внимание, что вы не сможете поменять режим подключения USB во время тетеринга)
- Включите режим USB-модем на телефоне. Обычно эта настройка находится одним из следующих способов:
- Настройки -> Сеть и Интернет -> Точка доступа и модем
- Настройки -> Ещё. -> Режим модема -> USB-модем
- После этого проведите стандартную настройку сети.
- Если вы используете мобильный интернет и недавно начался новый расчетный период, вам может потребоваться перезагрузить телефон.
Использование systemd-networkd с udev
This article or section needs expansion.
Используя systemd-networkd, вы можете автоматически перенастроить сеть на использование телефона в качестве шлюза при его подключении.
Вам может понадобиться изменить атрибут idVendor под ваш телефон. Можно проверить с помощью udevadm:
Затем создайте соответствующий файл systemd-networkd:
USB-модем с AziLink
AziLink — это приложение, которое позволяет сделать USB-тетеринг на Android-устройствах без прав root. Это очень полезно для версий Android старее чем 2.2, когда ещё не было встроенной функции USB-тетеринга. Он не требует изменений в вашем браузере. На самом деле, весь сетевой трафик прозрачно обрабатывается для любого приложения ПК (кроме пингов ICMP). Он несколько интенсивно потребляет процессор при высоких нагрузках (скорость передачи данных 500 кбайт/с может занимать более 50% телефонного процессора).
Необходимые инструменты
На Arch установите пакет openvpn . Также необходимо установить android-tools для команды adb и android-udev для установки корректного /usr/lib/udev/rules.d/51-android.rules , чтобы ваш телефон был распознан. На телефоне вам нужно приложение azilink.apk (домашняя страница azilink), которое представляет собой NAT на базе Java, который будет взаимодействовать с OpenVPN на вашем компьютере.
Настройка соединения с телефоном в Arch Linux
После того, как вы установили Android SDK, чтобы использовать предоставленные инструменты, ваш телефон должен быть правильно настроен в udev, и вы должны предоставить пользователю Linux права. В противном случае вам могут потребоваться привилегии root для использования Android SDK, что не рекомендуется. Чтобы выполнить эту настройку, включите отладку USB на телефоне (обычно в меню «Настройки» -> «Приложения -> Разработка -> USB-отладка»), подключите его к ПК с помощью USB-кабеля и выполните команду lsusb . Устройство должно быть в списке. Пример вывода для телефона Acer Liquid:
Затем создайте следующий файл, заменив ciri на ваше собственное имя пользователя Linux, и 0502 на Vendor ID вашего телефона:
Как root выполните команду udevadm control —reload (или перезагрузите компьютер), чтобы применить изменения.
Чтобы убедиться, что изменения применились, выполните adb devices , и она должна отобразить device вместо unauthorized .
Также можно попробовать выполнить на вашем Linux-ПК команду adb shell из Android SDK в качестве обычного (не root) пользователя: вы должны получить приглашение unix «на телефоне».
Процедура
Запустите приложение AziLink в телефоне и выберите «О программе» внизу, чтобы получить инструкции, которые в основном:
- Вам нужно будет включить отладку USB на телефоне, если она еще не была включена (обычно в меню «Настройки» -> «Приложения» -> «Разработка» -> «Отладка USB»).
- Подключите телефон с помощью кабеля USB к ПК.
- Запустите AziLink и убедитесь, что в верхней части окна отмечена опция Активная служба.
- Выполните на своем ПК Linux следующие команды:
Вам может потребоваться вручную обновить содержимое resolv.conf до
Если вы используете NetworkManager, вам может потребоваться остановить его перед запуском OpenVPN.
USB-модем с EasyTether
Скачайте клиент easytether. Устанавливается так:
Убедитесь, что Android-приложение EasyTether установлено на телефоне, к которому будет производиться приключение. Примечание: Lite-версия приложения отключает некоторые соединения, и вам нужно купить полную версию для полной функциональности. По этой причине рекомендуется использовать AziLink.
Модем через Bluetooth
Android (по крайней мере, начиная с 4.0, возможно, ранее) может предоставить персональную сеть Bluetooth (PAN) в режиме точки доступа.
NetworkManager может выполнить это действие и самостоятельно обработать инициализацию сети; Обратитесь к его документации для получения более подробной информации.
В качестве альтернативы: убедитесь, что вы можете подключить свой компьютер и устройство Android, как описано в Bluetooth (Русский), затем, заменяя адрес устройства (здесь задан как AA_BB_CC_DD_EE_FF ), выполните:
Это создаст сетевой интерфейс bnep0 . В заключение, настройте сетевое соединение на этом интерфейсе; Android по умолчанию предлагает DHCP.
Подключение через прокси-сервер SOCKS
С этим методом привязка достигается путем переадресации порта с телефона на ПК. Это подходит только для браузеров. Для Firefox вам следует установить параметру network.proxy.socks_remote_dns значение true в about:config ( адресная строка )
Необходимые инструменты
- Пакеты android-tools и android-udev
- Кабель USB для подключения вашего телефона к ПК
- Один из двух: Tetherbot или Proxoid
Инструкция
Tetherbot
Tetherbot is an experimental SOCKS proxy and Port Bouncer that should allow you to connect your laptop to the internet using the internet connection (EDGE, 3G or Wifi) of your T-Mobile G1 Cellphone.
Проект закрыт и веб-сайт уже не работает, но его архив доступен в Wayback Machine[1], откуда можно скачать APK.
Чтобы использовать SOCKS-прокси от Tetherbot для подключения браузера к интернету, выполните следующие действия:
- На телефоне запустите приложение Tetherbot и нажмите кнопку Start Socks
- На компьютере пробросьте порт до SOCKS-прокси следующей командой:
- Теперь перейдите в настройки вашего браузера и пропишите ручную настроку прокси с адресом localhost и 1080 , оставив остальные поля пустыми.
Proxoid
Следуйте инструкциям, приведенным в следующих разделах link
Источник
How to access to internet on Linux using Android Tethering
What is Tethering?
It’s been over 30 years since the World Wide Web was introduced to the world. Over time, the internet took its toll and now has roughly around 45 million web pages compared to 10,000 websites earlier. We really do have come a long way.
Emerging from the primitive world of 2G signals we are now living in the era where mostly every device has an internet connection and if not of its own, gets one from another system. The technical term for sharing your phone’s internet connection to another phone or system is known as Tethering.
Tethering on Linux
Tethering the internet through your phone to your Linux desktop can be done mainly via three simple ways.
Let’s check them out!
USB Tethering
Connection over USB is just as simple as connecting your phone to a charger point. However, just like electricity is essential to charge your phone, internet connection in your phone is necessary to share it with others. Rare is the case when your charging cable is not suitable to be used as a data-transfer wire and you need to buy an apt one separately.
The connection is automatically established by plugging in your USB cable to both your computer and phone. A dialog box of confirmation highlighting the name of your device pops up.
Now, Under the Settings in your phone select Wireless and Network (or Network and Internet ). Click on the More tab and choose Tethering & Portable Hotspot and Enable USB Tethering . On the top right corner of your Linux machine, bring down the Network Connections toolbar as shown, where a tab Ethernet Connected is visible.
Your system’s internet connection is ready!
However, in a few cases you might have to further enable the Wired Settings window, where you can add a new connection and also view the IP address of your attached device. Here in this case, it is named Profile 1 .
Click on Profile 1
Wifi Tethering
Following the same process as mentioned above, in your Android phone, open Settings and go to Network & Internet . Next, select Mobile Hotspot and Tethering and turn on the Mobile Hotspot . In your Linux system, again under the Network Connections , turn Wifi On
and go to Wifi Settings .
Here you can view all the available networks and connect with anyone by just entering the password available in your phone under Mobile Hotspot .
The Wi-Fi symbol in the top panel will now indicate that it’s connected.
Bluetooth Tethering
Yes! The bluetooth connection can be used not only to transfer data files but for passing on your phone’s internet connection to your Linux machine. Navigating through the Network Connections tab, switch on the Bluetooth on your Linux distro and go to Bluetooth Settings .
Make sure you have turned on Bluetooth in your phone too. Both of your devices will discover each other so click on the device’s name and a confirmation pin message will show up on both of the devices. If the pin matches, click confirm and Bluetooth pairing will be established.
Now, again go to the Network Connections tab and under the paired device, here e9b7c69c , select the option to Connect to Internet .
The Bluetooth symbol in the top panel will now indicate that it’s connected.
Go ahead and explore the unlimited boundaries of the internet on your Linux system! Thanks to the unimaginable scope of technology, without a doubt, your cellphone will always be at your rescue whenever a sudden need of an internet connection is required to your system.
Help us improve this content by editing this page on GitHub
Источник