Hot answers tagged

16

Summary: getprop net.hostname (Android System Hostname, likely android_24412414 type name) echo $HOSTNAME (shell/terminal/env hostname, likely ro.product.device from build.prop) cat /proc/sys/kernel/hostname (Linux System Hostname, likely localhost) head /etc/hosts (Linux System Hostname, likely localhost) hostname (Command not always installed, if ...


10

I found a way to do this on my rooted Nexus 7 with 4.2.2. The setting is saved persistently and works throughout reboots. Source: http://nileshgr.com/2012/10/13/how-to-change-wifi-host-name-of-your-android-device Note that the device must be rooted to use adb Run adb pull /system/build.prop Edit the build.prop file and append net.hostname=...


9

This works on CyanogenMod and probably other modified ROMs but not stock AOSP ROMs: Go to Settings > Developer Options and scroll down to Device Hostname. Root is not needed. (Click image to enlarge)


5

Go to Google Play Store. Search for "hostname", and download hostname changer app. Must be rooted.


5

As of version 1.2.5, tethering has been included in AFWall+, you should only need to enable (Tethering) - DHCP+DNS services


4

I had the same problem with wifi tethering after I installed Droidwall. Though the wifi connection was successful but I got no internet access. I got it working simply by adding the DNS in my laptop. Hope, it works for you or anyone facing the same problem. Change/Add DNS 4.2.2.2 and 8.8.8.8 in your PC/Laptop. That's it.


4

NOTE: Root is required. Default DHCP IP address range is hard-coded (1), you can't change it without rebuilding ROM with modified source code. Or use a little hack. When you switch on tethering, what happens (at least): hostapd - the daemon which manages access points - is started. Network interfaces are set up, IP address is added to Wi-Fi interface (...


3

What you wish to change is the device's hostname. On certain ROMs such as LineageOS, you may do so via the Device hostname setting, located inside the Developer options. You can access them by typically tapping the Build number information, placed inside the About phone setting, seven or more times. If the Device hostname setting is missing, you may achieve ...


3

If you have USB debugging turned on, you can see the DHCP activity in the logcat. Unfortunately, without a working DHCP server, you're not going to see anything. And the logcat doesn't stick around long enough for you to see the previous day's successful negotiation. You can also see the currently-assigned IP address in Wi-Fi settings under the advanced ...


3

If net.hostname was not preset by device manufacturer during production then Android would use ANDROID_ID to generate the unique android-XXXXXXXXXXXXXXXX host name: // setup our unique device name if (TextUtils.isEmpty(SystemProperties.get("net.hostname"))) { String id = Settings.Secure.getString(context.getContentResolver(), ...


3

After much searching, I came across this thread on the xda-developers forum where people seem to be having much of the same issue with a Nexus 4. After trying several of the proposed solutions in that thread, I came across one that worked! It turns out that Android keeps a permanent record of the MAC in /persist/wifi/.macaddr. For some reason, it insists on ...


2

It is normal to disable Droidwall, for the reason that it blocks any incoming packets for port 67, to allow Wifi Tethering to work. Or quite simply, allow a custom script that matches the port number 67 which is dhcp to pass through. FYI about Droidwall - the functionality and development efforts have been discontinued and the author sold it off to Avast. ...


2

ICS has issues on some devices with Wireless-N. My Acer A500 works properly, but my 2 Xperia phones kill my router instantly if I use the N-draft protocol. So, try deactivating N-draft mode in your Android device or your router, then it sohuld work.


2

On my stock Android 4.2.1, I don't need to allow (Tethering) - DNS+DHCP service, let alone (root) - Applications running as root for DHCP/DNS over Wifi hostpot in AFwall+. My system can get the IP easily but would not connect to internet unless I change my system's DNS setting to some public DNS like 8.8.8.8. It is a fix that I once saw on a forum. That ...


2

dhcpcd is not used in Android 6+, it was deprecated in favor of Java DHCP client. "Legacy DHCP client" option was available during transition phase but was removed in Android 7 (1, 2). Quoted from source: The legacy DHCP client has been removed from the platform. The only DHCP client that the platform supports is the DHCP client introduced in M. net....


2

It's hard-coded in Java DhcpClient: ... private String getVendorId() { if (testOverrideVendorId != null) return testOverrideVendorId; return "android-dhcp-" + Build.VERSION.RELEASE; } ... So the only way is to rebuild your ROM with modified source code. Or use a different DHCP client from command-line. For reference: Connecting to ...


2

Have a look at this thread about using open VPN. Here you can give public IPs to devices using Open VPN, I think. Or you could find another tethering app which supports this such as PdaNet+ which may have more control.


2

Ok. I have figured it out. I've learned quite a bit trying to figure this out, I don't have all the details but here is my Hypothesis: I believe it is a bug in my router. The router performs a search on the IEEE Standards website to look up the manufacturer of each device based on the first three "octets" of the MAC address WIKI. The first three octets (xx:...


1

Solution without root privileges: Disable wifi Run: adb shell put global wifi_connected_mac_randomization_enabled 1 Enable wifi and connect to your network You should have a new IP


1

While the feature has never been part of stock Android (not sure if some custom ROM provides this), it's possible on rooted devices. I recently answered to How to make Ethernet work on Android over OTG? which may help you make Ethernet work on your device. Once done, there are two more things required: Run a DHCP server (we already have dnsmasq on device up ...


1

For documentation purposes here is an expanded version of the comments. Option 1: SimpleRT does work and the device gets an IP on the local network which is a plus. On the downside, it supports a single android device and doesn't support hot-plugging at the moment, however, the software is free and open-source (another plus) Option 2: Reverse Tethering ...


1

At the moment (Marshmallow) it's not possible. I usually get it using apps which require root permissions. Another way could be to use an iptables trick, but it requires root, too.


1

I faced the same problem when using my Asus MemoPad HD7. For home connection a static IP worked fine, however this was not acceptable. I did a bit of research and found out it should be possible after gaining root access to the device to delete the corresponding cache file. As I needed a fast solution I just did a factory reset of the Pad, which resolved ...


1

Jon's answer about the hidden .macaddr gave me enough hint to temporarily change the mac address on my rooted LG VS450PP (it has Software version of VS450PP1). The mac address for wlan is hardcoded in a file (make a note of the file's ownership and permission info) /data/misc/wifi/WCNSS_qcom_wlan_nv.bin It will be obvious once you do a hexdump. I scp ...


1

We had similar issues in our office router which had expired security certificate resulting in denial of HTTPS URLs. When we updated our certificate this issue was solved. I guess your issue should be similar. I stumbled on a web page that claims the solution. But looking at the solution I very much doubt its worth.


1

This solution should work for all firewalls, on root or no root. Initially I tried both kinds of devices and neither worked and after I found this info both worked. So I'm fairly sure this will work for you. To make it into a complete answer, as I'm sure it would be unclear how/where to change DNS for most users. Basically no change is done on the app side, ...


1

In my case allowing user id 9999 (nobody) to connect through WiFi fixed the problem. So I added this line as a custom script to DroidWall: $IPTABLES -A droidwall-wifi -j RETURN -m owner --uid-owner 9999


1

Hostname is used to easily identify and remember hosts connected to a network. It's set on boot, e.g. from /etc/hostname on Linux based systems. Hostname is also a part of DHCPREQUEST (standardized as code 12 by IETF) which a DHCP client (Android device in our case) makes to DHCP server (WiFi router) to get an IP address assigned. DHCP server stores the ...


Only top voted, non community-wiki answers of a minimum length are eligible