1. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

Tether capability with android-wifi-tether (Wireless Tether for Root Users)

Discussion in 'Android Hacks and Help' started by webacoustics, Dec 20, 2009.

  1. webacoustics
    Offline

    webacoustics New Member

    Joined:
    Dec 20, 2009
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Brooklyn, NY
    Verizon DROID WiFi Tether with android-wifi-tether (Wireless Tether for Root Users)

    1: Rooting your phone:

    Follow any of the many tutorials available (this one for instance)

    2: Installing the updated kernel:
    Install SirPsychoS' recovery image (droid devs tutorial)
    Use the latest version of the image from Sholes
    For some details that aren't covered in the droid-devs wiki, see this thread

    2.a: Use SirPsychoS' recovery image to back up your phone
    • Boot in to recovery mode.. hold down Power and X while your phone boots
    • Select the Nandroid submenu, and choose the "Default Nandroid Backup" option
    • Reboot the phone to regular mode

    2.b: Copy the new kernel, and driver to your phone
    New kernel and driver: here. If you're unfamiliar with the adb tool in the Android SDK, check this post
    • This URL contains two files, the updated boot image (boot-wifi.img), and the updated tiwlan_drv.ko (the WiFi kernel module). These are necessary to enable support for iptables (which allows your phone to act as a router)
    • Copy the new files to your sdcard using your favorite method. USB mount or:
      Code:
      adb push <sourcefilepath> <destfilepath>
    • Disable USB Storage Mode; unmount the drive on your computer, and turn off USB Storage from the phone (very important, since your files will not be accessible from the phone until you do)

    2.c: Install the updated tiwlan_drv.ko file to /system (this assumes that the new driver is at /sdcard/tiwlan_drv.ko)
    • Make sure you're in root mode:
      Code:
      su
    • Put your /system partition into read/write mode:
      Code:
      mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
    • Back up the old driver:
      Code:
      cat /system/lib/modules/tiwlan_drv.ko > /sdcard/tiwlan_drv.ko.old
    • Copy the new driver to the system:
      Code:
      cat /sdcard/tiwlan_drv.ko > /system/lib/modules/tiwlan_drv.ko
    • Sync the /system mount, and remount as read only:
      Code:
      sync && mount -o remount,ro -t yaffs2 /dev/block/mtdblock4 /system

    2.d: Install the updated kernel
    • Boot in to recovery mode by holding X while powering up
    • From the mount menu, mount the /sdcard partition
    • From your computer, run adb shell (part of the Android SDK, you'll need to download that and look for adb in the tools directory):
      Code:
      adb shell
    • Flash the kernel partition by running:
      Code:
      flash_image boot /sdcard/boot-wifi.img
    • Hold the power button, select power off
    • Hit the power button to turn your phone back on
    2.e: How to tell if it worked (and fix your phone if it didn't)
    • If your phone stays at the white Motorola logo for longer than a minute or two, you probably bricked your phone.
    • Simply turn the phone off (you may need to remove the battery)
    • Boot in to recovery mode (hold x while you power the phone up)
    • And restore the backup you made by selecting the restore option from the nandroid menu

    Assuming you got this far, on to the the fun part.

    3: Installing the latest android-wifi-tether
    Install the latest DROID release from the Google code project
    • Wireless Tether for Root Users 2.0-pre3-eclair
    • This is an unsigned program, so you'll need to enable the installation of unsigned applications in the Application settings menu (Settings>Applications)
    • Install the app using the Android SDK tool, adb (specify the actual path to the adb tool and the application):
      Code:
      adb install wireless_tether_2_0-pre3_eclair.apk

    Enjoy!

    --

    Update 1/9: ChevyNo1 has created a "one click" windows installer for the faint of heart. You can find it here. Don't forget to run a backup first!
    Update 1/6: Network connection timeout issue (network disappears within 30 seconds) has been fixed!! Thank you crdnilfan at google code for the research and fix. New users, simply follow the instructions below. Existing users, simply apply tether-2.txt to /data/data/android.tether/bin/tether to upgrade your installation (don't forget to chroot 700!).
    Update 12/26: THE EASY WAY: Just download this backup of 2.0.1 (torrent, or http please use Torrent if you can), and restore it to your phone after rooting and installing the Sholes recovery image 0.15.0 or later. Perform the backup in 2a, then restore using this file by unzipping the file and copying the resulting folder to /sdcard/nandroid. You can skip the rest of the tutorial, WiFi tether will work after you reboot into normal mode. I'll update the instructions with more detail tomorrow, and add a backup image. NOTE: this update will effectively reset your phone to factory defaults, so you'll want to make sure your apps and settings are being backed up to Google).
    Update 12/26: updated tether-2.txt to improve settings detection (should eliminate the need to go in to the settings screen before the tethering will work)
    Update 12/25: added link to adb (Android Debug Bridge) information thread.
    Update 12/24: clarify kernel install instructions (using recovery mode)
    Update 12/24: in case you're having problems with the latest tether-2.txt script, you can find he latest tether-1.txt file here (in comment 120): Issue 205 - android-wifi-tether - Motorola Droid - Developing & Testing - Project Hosting on Google Code, or download tether-1-old.txt from this thread.
    Update 12/23: Uploaded a new tether-2.txt that will set yhttp://thepiratebay.org/torrent/5243438our SSID and Channel from the GUI's settings. The only additional requirement is busybox be installed at the same time as the new wifi driver. I've updated the HOWTO below. If you want to upgrade your setup, simply follow steps 2.b, 2.c, and 4--the changes are in bold
    Update 12/23: Updated tether-1.txt to get rid of the pesky error message when you start tethering
    Update 12/23: Credit and thanks to Michael Purcell at sholes.info for compiling the updated kernel and wifi driver!
    Last edited: Jan 27, 2010
  2. webacoustics
    Offline

    webacoustics New Member

    Joined:
    Dec 20, 2009
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Brooklyn, NY
    Screenshots

    Woohoo! 2.6Mbps/.5Mbps
  3. sonofskywalker3
    Offline

    sonofskywalker3 New Member

    Joined:
    Dec 21, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    followed the instructions and it works perfectly! thanks for this easy walkthrough.:motdroidhoriz:
  4. wardo5757
    Offline

    wardo5757 New Member

    Joined:
    Dec 1, 2009
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    i will pay 20 bucs for some phone walk-thru support!! lol, no BS..... I've never messed with linux before and this hack appears to have many places for me to brick my phone... anybody?
  5. SwordOfWar
    Offline

    SwordOfWar New Member

    Joined:
    Nov 11, 2009
    Messages:
    392
    Likes Received:
    0
    Trophy Points:
    0
    Isn't the correct path mtdblock4 and if in recovery mode its mtdblock6? You should correct that!
  6. webacoustics
    Offline

    webacoustics New Member

    Joined:
    Dec 20, 2009
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Brooklyn, NY
    The command will work no matter what path you specify because `mount` will not change the device or mount point (mount(8): mount file system - Linux man page).

    However, I believe you're correct about the path--I'll confirm and make the appropriate changes.
  7. SwordOfWar
    Offline

    SwordOfWar New Member

    Joined:
    Nov 11, 2009
    Messages:
    392
    Likes Received:
    0
    Trophy Points:
    0
    There were some possible ways to brick the phone by using block3 since its commonly misquoted from the g1. Just think everyone should start correctly saying block4 to correct this common mistake for newbies who don't know this (I didn't).
  8. webacoustics
    Offline

    webacoustics New Member

    Joined:
    Dec 20, 2009
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Brooklyn, NY
    Completely agree-- as a person fairly new to Android development, I found more than a few references to the incorrect block online. Hopefully this will help set the record straight (see corrected text above). Thanks
  9. bitbuster
    Offline

    bitbuster New Member

    Joined:
    Nov 12, 2009
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    Followed your steps! Thanks for the great tutorial! I also had the issue that flash_image was not able to write the boot image. I booted into the recovery image and then it let me do it.
    I installed the tether software, ran it once, updated the shell script and when I now run it, it all starts up without an error. however, tether did not work until I rebooted!

    Now it works :)

    THANKS!!!!
  10. webacoustics
    Offline

    webacoustics New Member

    Joined:
    Dec 20, 2009
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Brooklyn, NY
    Thanks for the comment. I've updated the instructions to add a note about the reboot, and several other improvements.
  11. cheeseybulb01
    Offline

    cheeseybulb01 New Member

    Joined:
    Dec 21, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi all,
    Okay I've followed the instructions several times (nandroid restoring after each time it fails to work). After running the wireless tether app, patching the tether script, and then trying to tether, the app reports that it has failed. The interface doesn't change to reflect any tethering, though, and nothing seems to be happening. However, if i run the tether script manually, (sh terminal start), and then try to start tethering, it DOES look like it has started, i.e. the interface changed and it looks like its in tether mode, BUT I could not find the wireless network and I don't think its being broadcasted (I tried connecting directly to the SSID "android" and it timed out). Also, to stop tethering i had to run the script manually and then hit stop tethering with the tethering app. Anyone have any idea whats going on here?
  12. saifshaya
    Offline

    saifshaya New Member

    Joined:
    Dec 21, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    2.1?

    does anyone have this working on 2.1?
  13. tghockey07
    Offline

    tghockey07 New Member

    Joined:
    Dec 2, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    The app is not working for me either, how do you manually do it?
  14. mitchellsm
    Offline

    mitchellsm New Member

    Joined:
    Dec 21, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    It worked for me on 2.1 if you manually start it through adb shell.

    cd /data/data/android.tether/bin/
    sh tether start
  15. tghockey07
    Offline

    tghockey07 New Member

    Joined:
    Dec 2, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Thank you so much! That worked right away!
  16. webacoustics
    Offline

    webacoustics New Member

    Joined:
    Dec 20, 2009
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Brooklyn, NY
    I'm testing out 2.1 right now, so I'll post an updated script when I get one that works for 2.1.
  17. nothing0
    Offline

    nothing0 New Member

    Joined:
    Nov 5, 2009
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    IN
    I did the steps above, but when I get to step 4 to copy the file from the sd card, it reads "no such file or directory". Is the file supposed to have a extension? I have it as just 'tether'.
    Thanks
  18. webacoustics
    Offline

    webacoustics New Member

    Joined:
    Dec 20, 2009
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Brooklyn, NY
    better make sure that you unmounted the USB.
  19. nothing0
    Offline

    nothing0 New Member

    Joined:
    Nov 5, 2009
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    IN
    :) Yeah I did. I can't figure out what I'm doing wrong.
  20. webacoustics
    Offline

    webacoustics New Member

    Joined:
    Dec 20, 2009
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Brooklyn, NY
    I updated the tether-1.txt file to try and get rid of the error message when starting tethering.

    UPDATE: 2.1 support will be delayed until the application can be updated to support some changes in the 2.1 application API. If you must have wifi tethering with 2.1, you'll need to run the tether start/stop script by hand. There's an app out there that will run your root scripts for you from the gui, which would make this easier. If someone knows the name of this app, please post it.

    Thanks!
Search tags for this page
android root wifi thether
,

droid wifi tether

,

error for wireless request set frequency (8b04) :too few arg

,

error for wireless request set frequency 8b04

,
the clever engineer rooted android wifi tethering
,

url/www.android.com/tether

,

wifi tether

,

wifi tether for root users not working

,

wifi tether for root users settings

,

wifi tether unable to open log file

,
wifi tether using root commands on droid
,

wifi tethering droid

,

wifi tethering kubuntu

,

wireless tether unable to open log file

,
wlan.ko android 4.2.2