Skip to main content

[Android] USB Reverse Tethering

USB Tethering pada Android biasanya digunakan untuk membuat smartphone Android kita menjadi seperti modem untuk koneksi ke internet. Pada hal ini merupakan kebalikanya, suplai koneksi internet disediakan oleh PC yang kemudian dipakai oleh Android. Hal ini sering saya gunakan, karena saya jarang sekali memakai paket internet untuk smartphone saya, daripada membuat tethering lewat WiFi dari laptop ke smartphone, saya lebih memilih metode ini karena juga bisa sambil charging dan smartphone tidak cepat panas dibanding ketika mengaktifkan koneksi WiFi.

Alat dan bahan yang dibutuhkan :

  • Smartphone Android yang sudah di ROOT
  • Terminal emulator
  • Kabel USB
  • BusyBox (optional)


Tutorial ini saya buat bagi pengguna Linux ya. Namun hal yang sama dapat dilakukan pada sistem operasi lainya, asal mengerti konsepnya.

  1. Device yang saya coba merupakan smartphone Android yang sudah Rooted. Kemudian aktifkan USB Tethering yang berada pada menu Settings pada bagian Tethering & portable hotspot yang jadi satu dengan konfigurasi WiFi Tethering. Aktifkan juga USB Debugging yang ada pada menu Development pada Settings. Pada umumnya, NetworkManager pada Linux akan mengenali device anda secara otomatis dan langsung terkoneksi.
  2. Langkah kedua adalah melakukan setting IP Address koneksi usb smartphone pada PC yang kita gunakan. Silahkan ketik manual pada terminal, jika anda tidak menggunakan NetworkManager. ifconfig usb0 10.42.0.1 netmask 255.255.255.0
  3. Aktifkan IP Forwarding pada PC, sudo 'echo 1 > /proc/sys/net/ipv4/ip_forward'
  4. Setting tabel IP rules, iptables -t nat -F dan iptables -t nat -A POSTROUTING -j MASQUERADE
  5. Masuk ke applet NetworkManager anda, dan buka konfigurasi pada bagian Wired, dan pilih adapter milik smartphone anda, bukan adapter LAN.
  6. Masuk ke bagian tab IPv4, dan ganti Method menjadi Shared to other computer dan klik Save.
  7. Sekarang pindah ke bagian smartphone anda !
  8. Buka terminal emulator ataupun sejenisnya, dan ketikkan su untuk masuk ke root
  9. Pastikan symbol $ berganti menjadi # yang artinya anda sudah masuk menjadi root
  10. Ketikkan netcfg usb0 dhcp, jika terjadi error, kemungkinan nama adapter salah, coba diganti rndis0 atau bisa dicek sendiri dengan mengetikkan busybox ifconfig.
  11. Cek dengan melakukan ping 8.8.8.8 apakah ada respon ? Jika ada maka anda sudah terkoneksi ke Internet. Selamat! Jika belum, lanjutkan ke langkah berikutnya.
  12. Jika belum terkoneksi, kemungkinan dhcpnya tidak berfungsi, maka harus melakukan routing secara manual. Ketikkan pada terminal smartphone anda, busybox route add default gw 10.42.0.1 dev rndis0 (rndis0 tergantung nama adapter anda)
  13. Coba lakukan PING kembali dan pastikan internet sudah terkoneksi.
Referensi XDA-developers


Good Luck !

Comments

Popular posts from this blog

HackRF Mayhem Failed to Update - M0 Guru Meditation Hard

I was on Mayhem Portapack v2.0.1 and want to upgrade to the latest stable release v2.1.0. The update went okay using the web upgrade https://hackrf.app/. But then I saw the latest nightly update and want to try it, since it has many new tools that are not yet included in the stable release. But then the update failed :( Disclaimer: I didn't take any photos of the errors, since I was focused on googling the solution. So the error was " Bad Firmware or Failed W/R error" during the upgrade process, and it was stuck. So I had to restart the device, and it was booting to the Mayhem menu, but on the bottom left, which should show the current firmware version, it was showing a  "FLASH ERR"  message. I think I should go back to the stable release, but I can't. Every time I want to flash the stable release version, the portapack will shows an error M0 Guru Meditation - Hard Fault.  There's an issue that was closed on the Mayhem GIT repo that has the same issue a...

Macintosh Classic II Brightness Issue

The Problem My Macintosh Classic II suffers from an issue where the display CRT goes dim after a few minutes on a cold boot. Every time it happens, I need to crank up the cut-off and brightness  pot behind the machine to show the image. The Analyze At first, I thought it must be the brightness issue, so I searched for the Macintosh Classic analog board schematic to check the brightness line. I found the schematic from Bomarc, and the schematic is suitable with my board, since there are two analog board versions.  I started to suspect the resistors and potentiometer on the brightness line. This Macintosh version has software-controlled brightness, so the analog board will get a 22.25 kHz square wave PBM signal from the logic board to control the brightness. I checked and replaced some resistors and cleaned the potentiometer, but nothing seems to work. The signal is there, and no sign of degradation that makes the screen dim after a few minutes.  Brightness Line So I suspec...

Fiberhome HG6145D2 Superadmin Login

Maybe some of you are using In**ehome ISP as your home internet and found out that using the provided login has minimal options to configure the router: user  user1234 I know it’s not the admin login, and that must be a full-control user account that can be used to control this router fully. So I searched and found some posts on the net and most of them are telling me to use: admin %0|F?H@f!berhO3e I tested it and it doesn’t work! But there’s more to it, you need to reset the router first by pressing the reset button on the side of the router. Then after resetting, you can log in using the admin superaccount! But keep in mind, never use the user log in again, because it will lock the super admin login until you reset the router again. Cheers 🍺