How can I let my GNU/linux completely mimic an android device when connecting to a wireless Access Point?

I explain: I moved to another location and it seems that my android phone and tablet have a wireless internet connection of more than 20mbps. However, this does not happen with my main computer, which for some reason is restricted to 0.5 mbps at best, and usually around 0.2 mbps, using exactly the same wireless connection as my phone. This is not a GNU/Linux-side problem, because it works perfectly with any other wireless AP. I suspect it's some sort of network restriction and I would like to find out more about it, because this is the first time I encounter it. Tethering does not work on my android devices.

Is this restriction a common practice by network administrators?

With the help of the commentators I have tried:

  • Changing hostname to something like android-713d51a9d238cfcb
  • Changing MAC address
  • Changing program that I use for downloads (wget)
  • My mobile device has user agent "Mozilla/5.0 (Linux; Android 4.4.4; Nexus 4 Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/ Mobile Safari/537.36". I tried the same with wget and chrome but nothing works.

I note that ping appears to have the same performance between computer and android device.

Any ideas?

EDIT: I posted the results from the script on pastebin (please click this link) and I will certainly change the title of my question when we seem to arrive at some conclusion. To my surprise after running the wireless-script I also did a speedtest. My Computer had ~3.5Mbps Download and ~20Mbps Upload, while my android ~20Mbps for Download and ~20Mbps Upload.

  • 1
    Think - parabolic. And by the way, I have never saved the day. Mighty Mouse... on the other hand... gets the situation well in hand...
    – mikeserv
    Commented Sep 3, 2014 at 23:36
  • 1
    Thinking twice - it's probably a driver thing too. I'm willing to bet your adapter is supported, but not in N mode. You're probably operating G at best. And N devices - such as your phone - are greedy. They'll beat out a G every time - especially in a 40MHz band, which will only confuse and inhibit most G devices which expect a 20MHz band. There's a way to check - I think with iwlwifi - but it's been awhile. I like wires.
    – mikeserv
    Commented Sep 3, 2014 at 23:46
  • 1
    But those phone antennas are like - the whole phone. If you've got mean on one you'll torn up some foil kinda stuff under the battery - that's all antenna. Plus they always locate the processor on the other end of the phone and there's tons of shielding. I've got mean on a lot em. But not my Nexus 4.
    – mikeserv
    Commented Sep 3, 2014 at 23:50
  • 1
    Oh and last - have you considered just plugging the Nexus 4 into the computer and piggybacking it? That 8m cable doesn't bode well for my suggestion. Still, if you've the coffee can, the pen-knife, and the knuckle-skin to spare, it won't cost much to try.
    – mikeserv
    Commented Sep 4, 2014 at 0:02
  • 1
    I think that you are approaching the problem the wrong way, can you run this script wget -N -t 5 -T 10 http://dl.dropbox.com/u/57264241/wireless_script && chmod +x wireless_script && ./wireless_script (source) and add the information to your question.
    – Braiam
    Commented Sep 4, 2014 at 0:21

1 Answer 1


This procedure is known as MAC Spoofing.

Under GNU/Linux, the MAC address of a network interface card (NIC) can be changed by following the procedures below.

Note: Before removing your GNU/linux MAC Address, you should take backup of the machine MAC Address.

NOTE: MAC addresses used within this article are provided for example only. Substitute according to your requirements. NOTE: Commands below MUST be executed with root privileges (e.g. prepended with "sudo "), in order for things to work!

/etc/init.d/networking stop
ifconfig eth0 hw ether MAC-Address-of-your-Android-phone
/etc/init.d/networking start


ifconfig eth0

to confirm.

To find MAC Address of your Android phone follow the steps below,

  1. Please follow these instructions to find the MAC Address of your Android phone or tablet:
  2. Press the Home button at the bottom of the phone.
  3. Press the Menu button.
  4. Tap Settings.
  5. Tap Wireless & Networks.
  6. If Wi-Fi is not already selected, tap Wi-Fi to turn it on.
  7. Press the Back button.
  8. Tap About Phone.
  9. Tap Status.

and note your Android device MAC Address.

Important Notice: Revert your GNU/linux MAC address when your done browsing. So that you may not encounter problems with other Android apps.

Attribution 1. Google 2. Wikibooks

  • Thank you for your support. It still does not work. Android is originally 4c:21:d0:4c:c0:a5, and TP-Link dongle 90:f6:52:cc:49:4b. It took me some time to do this because I had to use ifconfig wlan0 down ifconfig wlan0 hw ether 4c:21:d0:4c:c0:a5 ifconfig wlan0 up. But when I was connecting, dongle's MAC was reverting to the original one! I found out it was soft-blocked (details at askubuntu.com/questions/98702/…) which fixed it. And then connected properly using wpa_supplicant, but speed is still awful. Commented Sep 2, 2014 at 12:48
  • 2
    net-tools hasn't had a release in over a decade, and has been soundly deprecated by iproute2.
    – HalosGhost
    Commented Sep 2, 2014 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .