Feb 17, 2013

make it simple "Bash Script for Reverse Tethering android on linux mint "

-- alibi--
just make it  simple as possible
base on this post

-- prepare--
* make sure your device connected to PC
* make sure adb command running properly
* and make usb tethering active on android

--1--
download script from here

--2--
you can disable data connection on your android first,or script will delete default gateway on android
extract and run it


--checking--
akses internet via your android

--note--
if data connection on android active, network service will auto reconect to provider internet and it will replace default gateway with provider gateway.
throught provider gateway mean reverse tethering fail

Feb 2, 2013

reverse tethering android on linux mint "Nadia"

--why--
if you want to connect your android to internet even if you doesn't have Data Package.

 --info--
tested on linux mint 14 and maybe,  it will be work on other linux distribution.

*note : kalo kopi sudah di bikin maka mari di lanjutkan.. :D

-- persiapan--
plug you phone's usb and  enable usb tethering android in setting menu. This will assign an IP automatically when the device is added. bow check the IP address on both
PC/laptop
Android
-- on linux mint --
share your PC/laptop's internet connection, and make it as router with :
>$ sudo iptables -A POSTROUTING -t nat -j MASQUERADE
>$ sudo echo 1 > /proc/sys/net/ipv4/ip_forward

-- on android --
 run this command to pass the data internet via PC/laptop
># route add default gw 192.168.42.105 dev usb0
then set you DNS to google dns
># setprop net.dns1 8.8.8.8
-- testing --

open browser and enjoy the show...

*note : this methode can download/install app from android market. if you want to install app, use other market app ( black market )



adb no permissions error on linux mint 14 "nadia"

when this happen :

Create a file named /etc/udev/rules.d/99-android.rules with the following contents (hex vendor numbers were taken from the vendor list page):
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="24e3", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2116", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="17ef", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0409", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2257", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d4d", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04da", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1f53", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0930", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0666"

or you can add "idVendor" with lsusb command

Bus 001 Device 005: ID 12d1:1021 Huawei Technologies Co., Ltd. 
Bus 001 Device 004: ID 14cd:6600 Super Top USB 2.0 IDE DEVICE


Run the following commands (without the leading $):
$ sudo vi /etc/udev/rules.d/99-android.rules
$ sudo chmod 644   /etc/udev/rules.d/51-android.rules
$ sudo chown root. /etc/udev/rules.d/51-android.rules
$ sudo service udev restart
$ sudo killall adb

Disconnect the USB cable between the phone and the computer.
Reconnect the phone.
Run adb devices to confirm that now it has permission to access the phone.


Please note that it's possible to use , USER="$LOGINNAME" instead of , MODE="0666" in the .rules file, substituting $LOGINNAME for your login name, i.e. what id -nu prints.