Author Topic: Tethering in Ubuntu 16.04-64 bit  (Read 367 times)

Offline Saturn

  • Global Moderator
  • Hero Member
  • *
  • Posts: 3011
  • Country: us
  • Karma: 21
    • View Profile
    • http://jaysmith2000.ipbhost.com/index.php?s=c827a7b611daaaf555722b332b1b9a2c&act=idx
Tethering in Ubuntu 16.04-64 bit
« on: September 09, 2017, 17:09:04 PM »
Tethering in Ubuntu 16.04
Just a quick update since there were a few changes in the process since 2014. Also, using a 64 bit version now so some other differences to note 8)

Tether Android to Ubuntu
Spoiler: show
Ref

Install Java: REF
Installing Java with apt-get is easy. First, update the package index:
sudo apt-get update
Then, check if Java is not already installed:
java -version
If it returns "The program java can be found in the following packages", Java hasn't been installed yet, so execute the following command:
sudo apt-get install default-jre

If dependencies not met:
sudo apt-get -f install -y
sudo apt-get install default-jre
or
sudo apt-get install oracle-java8-installer -y

Accept agreement: [Enter], left arrow-[Enter]
wait for install to finish..


Attach phone to computer via USB
Enable 'USB Debugging' (Settings-More-Developer options-USB debugging)
Download the setup script (also added as attachment at bottom of this post in case the original link breaks again)
Move the tar file to Home folder
Open Terminal (ctrl+Alt+T) and type
ls
Something similar to the following will appear:
Desktop    Droid-Tether-SV.tar.gz  Music     Templates       wget-log
Documents  DVDFab9                 Pictures  Videos          Win7
Downloads  examples.desktop        Public    VirtualBox VMs


Type in:
tar xvf Droid-Tether-SV.tar.gz
**Can delete the tar ball**
Open a new Terminal and type:
apt-get install lib32stdc++6    REF
cd Droid-Tether-SV/
sudo ./install_droidtethersv.py
**Enter password, if applicable**

The process will take a few seconds and at the end, a message will (probably) say:
**Everything is setup on Computer-side at this point. Now for adding azilink to the phone..
* daemon not running. starting it now on port 5037 *
* daemon started successfully *

 |Failure! Android phone DOES NOT appear to be Connected! Can't install azilink.
 |Please enable USB debugging on your Droid phone, connect it via the USB cable,
 |then re-run this script to finish the setup. Alternatively: Enable USB
 |debugging on your Android phone. Then, from the phone, navigate to:
 |http://code.google.com/p/azilink, then download/install azilink app directly
 |from there. Script will now exit.


No worries, download Android SDK r07 from tucows or Mega
Move the tar file to Home folder
In a new Terminal type:
tar xvf android-sdk_r07-linux_x86.tgz
cd android-sdk-linux_x86
tools/android


In the Android SDK and AVD Manager window click Available Packages
Put a check in the available entry (https://dl-ssl.google.com/android/repository/repository.xml)
Put another check in This repository requires a more recent version of the Tools. Please update.
Click Install Selected
Tick Accept All
Click Install
When complete, click Yes to restart ADB and OK to attempt a reopen of Android SDK
Click Close in the last box
Back in Terminal press the up arrow to input tools/android again

When Android SDK and AVD Manager opens, this time put a check in Android SDK Platform-tools, revision ?? (Rev 20 as of 11/05/2015), if it's not there already. Can uncheck items below it.
Click Install ? packages
Tick Accept License & click Install
Close when complete

Back in Terminal type:
cd platform-tools
sudo cp adb /usr/bin/adb
sudo gedit /etc/udev/rules.d/91-android.rules

Paste the following into the document, overwriting anything already there:
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME"
If you have an HTC Android phone - use this rule instead of the one above:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME"
If you have the Samsung Galaxy Android phone, use this rule instead of the one above:
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME" 
If you have the Sony Ericsson X11 Android phone, use this rule instead of the one above (Thanks to Steven from the comments):
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME"If you have the LG Optimus V(Virgin Mobile) Android phone, use this rule instead of the one above:
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME"

Replace all instances of USERNAME with your name
Quick Save and Exit

Back in Terminal:
sudo chmod a+r /etc/udev/rules.d/91-android.rules
sudo restart udev
sudo systemctl restart udev.service     REF
Enable USB Debugging on your phone and connect it if it isn't already
Back in Terminal type:
adb devices
You should see something resembling:
$ adb devices
List of devices attached
8a996b0e    device


If you see similar to the following, revoke USB Debugging on phone, disable USB Debugging, re-enable USB Debugging and accept "always trust this computer" when prompted. Run adb devices again in Terminal to check if the phone is now authorized. Ref
$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
8a996b0e    unauthorized


Type in:
sudo apt-get install openvpn /y
sudo /etc/init.d/networking restart
sudo /etc/init.d/network-manager restart
(won't work if you don't have network manager installed)

Install OpenVPN/Azilink on Android phone by clicking here with it (attachment)

From a new Terminal type:
mkdir azilink
cd azilink


Download Azilink-debug.apk (attachment) and move it to the azilink folder
Back in Terminal type:
adb install -r Azilink-debug.apk
wget http://lfx.org/azilink/azilink.ovpn
or download from here (attachment) and move into azilink folder
gedit resolv.conf

Paste the following into the empty document:
domain lan
search lan
nameserver 192.168.56.1

Quick Save and Exit

Back in Terminal:
gedit start_modem

Paste the following into the empty document:
adb forward tcp:41927 tcp:41927
sudo cp resolv.conf /etc/
sudo openvpn --config azilink.ovpn

Quick Save and Exit

Back in Terminal type:
chmod 755 start_modem

On your phone, launch Azilink and put a check by Service active
With wireless disabled and no wired internet connection go back to Terminal and type:
/home/azilink/start_modem or /home/yourname/azilink/start_modem (however you have it set up)

You should now be able to freely use the internet.
!Important! When ending use with Azilink, press ctrl+c in Terminal to exit the process properly. Exiting out of Terminal will leave you unable to connect to the internet even if the wireless says you are.
You can use the Desktop Azilink to connect from here on.
« Last Edit: September 10, 2017, 06:17:48 AM by Saturn »

 

SimplePortal 2.3.7 © 2008-2020, SimplePortal