Hi,
i edited /system/etc/hosts file but it looks that my edit is ignored by Android.
In "hosts" file i added line with text "1.1.1.1 customdomain"
And then i used "ping customdomain" command in Terminal Emulator but i got error "unknown host am".
I doesn't ignore the hosts file, did you edit it with r/w permissions?
That's how some AdBlock apps on market are working.
They just download huge (700K) host file and most of ads are history. (also in ads based applications)
PS: try something with your local host 127.0.0.1 first... you have to reboot your device after modification.
evilkorn said:
I doesn't ignore the hosts file, did you edit it with r/w permissions?
Click to expand...
Click to collapse
AFAIK, i did. I edited it using "FS File Explorer" with r/w turned on... Then i restarted phone and my change is still there.
Vlad_z said:
That's how some AdBlock apps on market are working.
They just download huge (700K) host file and most of ads are history. (also in ads based applications)
PS: try something with your local host 127.0.0.1 first... you have to reboot your device after modification.
Click to expand...
Click to collapse
Yes, i found posts about these ad blocks when i read all these forums about this...
I can ping "localhost", but i cant ping this host i added there...
EDIT:
I added record "127.0.0.1 bbb", then i restarted phone and i tried to run "ping bbb", but i got error msg about unresolved hostname aswell...
I have Nexus S and latest CyanogenMod 7.0.3 if it can help...
I got it!
I was playing etc... And i found that i need to put 1 empty line at end of file to make system to reload file!
No need to restart phone at all, i can ping new hostname immediatelly.
Now i can ping new hostname. But when i open it in Android browser, i get new exciting error msg:
Sorry The requested server does not have a DNS entry!
Any ideas now?
mathdotrandom: Block ads on PC & Android with an uber HOSTS file!
oktam said:
AFAIK, i did. I edited it using "FS File Explorer" with r/w turned on... Then i restarted phone and my change is still there.
Yes, i found posts about these ad blocks when i read all these forums about this...
I can ping "localhost", but i cant ping this host i added there...
EDIT:
I added record "127.0.0.1 bbb", then i restarted phone and i tried to run "ping bbb", but i got error msg about unresolved hostname aswell...
I have Nexus S and latest CyanogenMod 7.0.3 if it can help...
Click to expand...
Click to collapse
This approach and file "Block ads on PC & Android with an uber HOSTS file!" has work flawlessly on multiple device all with various firmwares and versions of Android.
Hi, I've included some domains I want blocked in my hosts file so as to redirect them to "127.0.0.1" I've made sure the permissions are set correctly. I've made sure there is an extra linebreak at the end of the file. I've rebooted. In the terminal a PING request to the domain returns from the localhost. And yet I can still access the domain through the web browser.
What gives?
PS: I have a Nexus One 2.3.6 retail that I rooted using the DoomLord zerg rush exploit without unlocking the bootloader
And I have cleared the browser cache
Please use the Q&A Forum for questions Thanks
Moving to Q&A
have the same issue.
added an entry to etc/hosts (after remounting rw) rebooted. open a terminal... ping x.com goes to correct IP... browser (stock and others) goes to real dns resolved one.
android is full of brain [email protected]%
I can still access websites listed in the hosts file. Permission is -rw-r--r--
I'm using chrome beta for android.
This issue hasn't been fixed yet. Chrome still ignores the HOSTS file in \system\etc
Apparently the HOSTS file must be in UNIX file format. One way to do this is use Notepad++ and convert the file by going to EDIT --> EOL Conversion --> Unix.
If you ping a domain in the hosts file and it goes to 127.0.0.1 or 0.0.0.0 then your hosts file is formatted correctly.
But Chrome will ignore the domains in the hosts even if it's formatted correctly. Perhaps Google intentionally does this to prevent anyone from blocking their tracking tools?
I would bet there are millions of Android devices that have a hosts file but it's not working as everyone thinks it should be.
EDIT - Solution found: turn off "Reduce data usage" in Chrome
shizat63 said:
turn off "Reduce data usage" in Chrome
Click to expand...
Click to collapse
Wow. Any idea what does it trigger that affect that?
My problem is with stock browser on cyanogenmod gingerbread.
Sent from my Nexus One using xda app-developers app
chrome local domain fail
shizat63 said:
EDIT - Solution found: turn off "Reduce data usage" in Chrome
Click to expand...
Click to collapse
Unfortunately it does not work for me on my GT-I9305 (I9305XXUEML5).
For the record here is what I did:
Added domain.local to /system/etc/hosts:
Code:
[email protected]:/ # mount -o rw,remount -t ext4 /dev/block/mmcblk0p13 /system
[email protected]:/ # echo "127.0.0.1 domain.local" >> /system/etc/hosts
[email protected]:/ # mount -o ro,remount -t ext4 /dev/block/mmcblk0p13 /system
[email protected]:/ # grep domain.local /system/etc/hosts
127.0.0.1 domain.local
I can now ping domain.local:
Code:
[email protected]:/ # ping domain.local
PING domain.local (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.220 ms
64 bytes from 127.0.0.1: seq=1 ttl=64 time=0.186 ms
64 bytes from 127.0.0.1: seq=2 ttl=64 time=0.242 ms
^C
--- domain.local ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.186/0.216/0.242 ms
Then I set up port forwarding in chrome: chrome://inspect/#devices -> Port forwarding... -> 8080 x.x.x.x:8080
After this I can telnet into domain.local from my GT-I9305:
Code:
[email protected]:/ # telnet domain.local 8080
GET / HTTP/1.0
HTTP/1.0 200 OK
Date: Mon, 28 Apr 2014 11:47:42 GMT
Server: openresty
X-Powered-By: PHP/5.4.12
Connection: close
Content-Type: text/html; charset=UTF-8
<!DOCTYPE html>
<html>
...
</html>
Connection closed by foreign host
So far so good.
Unfortunately if I open chrome on my mobile and enter domain.local:8080/ I get "Oops! Google Chrome could not connect to domain.local"
shizat63 said:
EDIT - Solution found: turn off "Reduce data usage" in Chrome
Click to expand...
Click to collapse
Worked! Thanks a lot. The fact, that adaware has stopped working was driving me crazy.
Howgie
shizat63 said:
turn off "Reduce data usage" in Chrome
Click to expand...
Click to collapse
It was turned on and turbo-mode in Opera was turned on. I've been sure hosts file is ignored!
The extra line was what I needed to fix my problem with my hosts file. As soon as I saved and refreshed it went to the site I needed it to.
oktam said:
I got it!
I was playing etc... And i found that i need to put 1 empty line at end of file to make system to reload file!
No need to restart phone at all, i can ping new hostname immediatelly.
Now i can ping new hostname. But when i open it in Android browser, i get new exciting error msg:
Sorry The requested server does not have a DNS entry!
Any ideas now?
Click to expand...
Click to collapse
Hosts file is working when i use directly from chrome and default browser, but when i use google app and then it is showing to choose chrome or internet browser it is not blocking site in hosts file after my chrome selection.
Plz.....i need help....
Was anyone able to get Android to read your hosts file? I can't even ping the site properly using the terminal emulator.
I've turned off Chrome data saver, made sure the file was saved with Unix line endings and left a blank line at the end of the /system/etc/hosts file.
I did. I copied the hosts file to my computer, edited it then pushed it back to android with rw permission.
It didn't work though until I added the blank line below my last entry (why?), just hit enter after adding your last/only domain name entry and then save.
How to change r/w permissions with Es file explorer.
Related
I have compiled tun.ko for the Nook color.
Here are the instructions to get OpenVPN up and running.
I dont have a fully working OpenVPN server to test this completely but I was able to connect and get authenticated. If someone can test this out and report whether this works that would be useful.
Download tun.ko module from here
http://dl.dropbox.com/u/16190398/tun.ko
Type the following from your windows or linux console
adb shell
#mount -o remount,rw /dev/block/mmcblk0p5 /system
#su
#cd /system/lib
#mkdir modules (if it doesnt exist)
#exit
#exit
Now you are back at your windows or linux prompt
adb push tun.ko /system/lib/modules
adb shell
#su
#insmod /system/lib/modules/tun.ko
If everything works fine you should see no errors
#lsmod
You should see something like this
tun 11416 0 - Live 0xbf153000
#exit
#exit
So far so good.
Now go to the Android Market and download
1. busybox (if not already installed)
2. OpenVPN Installer
3. OpenVPN Settings
Run the OpenVPN Installer first. It will detect that OpenVPN binary is not installed and ask permission to install. You can choose to install it in /system/xbin or /system/bin (I installed it under /system/bin).
OpenVPN also needs the path to ifconfig and route which is provided by busybox. It will ask for the path and create symlinks. I created mine under /system/xbin/bb.
Next copy your openvpn config files and .crt files under /sdcard/openvpn.
Finally, run OpenVPN settings. If you have a valid config file under /sdcard/openvpn you should see those connections listed.
From the advanced menu you can set the path to your tunnel module as /system/lib/modules/tun.ko and load the module using modprobe.
Set the path to your configuration files (default is /sdcard/openvpn).
If everything looks fine then go back to main screen and click the checkbox next to your listed connection.
You should get a login icon in the notification bar if your connection requires username/password.
Thats it. Browse your internal network to check if everything is working as desired.
I just had a baby a few weeks ago and dont have time to troubleshoot this.
If someone can take over and post better/detailed instructions on making this work that would be great.
---------- 05/06/2011 Update -------------
Updated version of tun.ko for the 1.2 update. This for for kernel version 2.6.32.9.
In order to connect to Cisco/Freeswan VPN concentrators you can download VPNconnections from here. The instructions are quite straightforward and listed on the project page. http://code.google.com/p/get-a-robot-vpnc/
You will need to load tun.ko for both openvpn and VPNConnections.
http://dl.dropbox.com/u/16190398/Nook Color 1.2/tun.ko
Thanks for the step-by-step guide on this, I can confirm that it does work as expected. I was able to connect to an OpenVPN server and route traffic properly over it. One more damn device that ties me to work now, wooh!
At my work we use a Cisco VPN. On my phone I use an app called VPN Connections. I loaded the module and instead of using the open vpn I used the apk mentioned above. But it didn't work. Does the OpenVPN support Cisco vpns?
has anyone gotten this to work with alwaysVPN??
after i enter my username and password
I get
connecting
Auth
get config
then a popup window saying
fatal: cannot allocate Tun/Tap dev dynamically
iandixo said:
has anyone gotten this to work with alwaysVPN??
after i enter my username and password
I get
connecting
Auth
get config
then a popup window saying
fatal: cannot allocate Tun/Tap dev dynamically
Click to expand...
Click to collapse
Probably your tun.ko module is not loaded.
Did you set the path to tun.ko from OpenVPN settings ?
Can you use adb shell and
type
#insmod /system/lib/modules/tun.ko
then
#lsmod
and report what you see.
likearaptor said:
At my work we use a Cisco VPN. On my phone I use an app called VPN Connections. I loaded the module and instead of using the open vpn I used the apk mentioned above. But it didn't work. Does the OpenVPN support Cisco vpns?
Click to expand...
Click to collapse
OpenVPN client wont work with Cisco's VPN. They use different protocols.
However, VPN Connections is supposed to be compatible with Cisco/FreeSwan and other IPSec VPNs.
I havent used VPNConnections but if there is any option to load the tun module then you can try setting the path and loading the module.
I would suggest that you first try loading the tun.ko module manually using adb shell. Then run VPN Connections and maybe it will work
dascud said:
Probably your tun.ko module is not loaded.
Did you set the path to tun.ko from OpenVPN settings ?
Can you use adb shell and
type
#insmod /system/lib/modules/tun.ko
then
#lsmod
and report what you see.
Click to expand...
Click to collapse
I get
tun 11416 0 - Live 0xbf113000
tiwlan_drv 862084 0 - Live 0xbf03b000
bc_example 6460 0 - Live 0xbf034000
omaplfb 16584 0 - Live 0xbf02a000
pvrsrvkm 150196 56 bc_example,omaplfb, Live 0xbf000000
and the path is set in settings
what should I see in /system/xbin/bb ?? as there is nothing there at all. Reason I asked is for some unknown reason and without me changing anything, the error has now changed to something about "ifconfig unable to load external program" it flashes to fast to read
iandixo said:
I get
tun 11416 0 - Live 0xbf113000
tiwlan_drv 862084 0 - Live 0xbf03b000
bc_example 6460 0 - Live 0xbf034000
omaplfb 16584 0 - Live 0xbf02a000
pvrsrvkm 150196 56 bc_example,omaplfb, Live 0xbf000000
and the path is set in settings
what should I see in /system/xbin/bb ?? as there is nothing there at all. Reason I asked is for some unknown reason and without me changing anything, the error has now changed to something about "ifconfig unable to load external program" it flashes to fast to read
Click to expand...
Click to collapse
This is good. Make sure that you set the path as the full path to the module as
/system/lib/modules/tun.ko in OpenVPN settings. (Yea path is a little misleading)
The error is due to openvpn not finding the path to ifconfig and route which is required to set the IP address for the tun device and push the default routes.
Did you install busybox ?. If not then you should install that.
If you already installed busybox then do this
adb shell
#mount -o remount,rw /dev/block/mmcblk0p5 /system
#su
#which busybox
This should return /system/bin/busybox
Under /system/bin you should also find ifconfig and route which are essentially symlinks to busybox
Now navigate to the /system/xbin directory
#cd /system/xbin
#mkdir bb (if it doesnt exist)
#cd /system/bin
#cp ifconfig /system/xbin/bb
#cp route /system/xbin/bb
#cd /system/xbin/bb
# ./ifconfig
This should return some details about the tiwlan0 interface.
#exit
#exit
Try again and see if this works. If not you can run the OpenVPN installer again.
Shouldnt matter if you already ran it once before.
Set the path for the openvpn binary as /system/bin &
the path for ifconfig as /system/xbin/bb
Hopefully this should do the trick.
Hmm. I can't get this to work with VPN Connections either. lsmod says the module is loaded, but VPN Connections fails. I won't have time to look at this for a week or so, but if anyone has VPN Connections working with this tun.ko, that would be good to know.
well I'm getting somewhere it now connects and it seems to be passing data ...but I'm only getting a connection of 0.09kBps up and 0.06kBps down
FletchF said:
Hmm. I can't get this to work with VPN Connections either.
Click to expand...
Click to collapse
Just to clarify, "VPN Connections" is an Android VPN client that can connect to a Cisco IPSEC VPN concentrator. It works well for me on my DROID.
link down? -nm
Hi. This sounds awesome. I am trying to get vpn since i left my laptop at home and my captivate is too small to do basic work.
I can't seem to dload the above but no go for dolphin or google browser.
Can someone post a mirror?
Edit: got it... couldn't get w the browsers and rockplayer seemed to want to play it. Used ie and got it ok.
I would love to hear if anyone else has had any success with alwaysVPN. I can connect but just can't seem to get any data ...
iandixo said:
well I'm getting somewhere it now connects and it seems to be passing data ...but I'm only getting a connection of 0.09kBps up and 0.06kBps down
Click to expand...
Click to collapse
I recall that I had the same issue initially. I was able to get connected but not browse the internal network. The monitor would show a connection of 0.09Kbps.
I think this means that the initial handshake went through but the server was not able to push the ip address or the default routes.
When you get connected you should see a status which progresses as
Auth - > Get Config -> and finally connected to "server IP" as "your new IP address". If you dont see your new IP address then the connection is not fully functional.
A rather unscientific method to fix it which worked for me was
1.) Uninstall busybox
2.) Reinstall busybox
3.) Run OpenVPN Installer again
set path to Openvpn binary as /system/bin
set path to ifconfig as /system/xbin/bb
adb to /system/xbin/bb and check if ifconfig and route exists.
Reboot, do a minor rain dance and pray to the God of your choice while the Nook is rebooting.
So just to let everyone know I got VPN Connections working for my work's Cisco VPN. I did the steps outlined at first, downloaded the file, insmod the file, added openvpn and settings apps, then tried my vpn connections app but it wouldn't work. So I gave up. Two days later I tried it for fun after I had rebooted it many times and it worked! I haven't done a insmod command and I have uninstalled the two OpenVPN commands
likearaptor said:
So just to let everyone know I got VPN Connections working for my work's Cisco VPN. I did the steps outlined at first, downloaded the file, insmod the file, added openvpn and settings apps, then tried my vpn connections app but it wouldn't work. So I gave up. Two days later I tried it for fun after I had rebooted it many times and it worked! I haven't done a insmod command and I have uninstalled the two OpenVPN commands
Click to expand...
Click to collapse
I was also able to get "VPN Connections" aka vpnc, working using this method.
Am now able to connect to my Cisco ASA, thanks for the great post.
My NookColor has been all of the sudden playing a load static noise when it is off and the only way to stop it is to turn it off. So I reset everything back to stock 1.0.1 and I will wait and see if it does it without it being rooted. If so I will get a different unit. But in the next week or two I will root it again and see if I need to install OpenVPN or not.
acomiskey said:
I was also able to get "VPN Connections" aka vpnc, working using this method.
Click to expand...
Click to collapse
Hmm. Still trying here. How many reboots did it take?
FletchF said:
Hmm. Still trying here. How many reboots did it take?
Click to expand...
Click to collapse
Just one for me, I did a lot of little things trying to get it to work, once I re-root later this week or next week I will post step by step directions to get it to work unless someone else beats me to it
FletchF said:
Hmm. Still trying here. How many reboots did it take?
Click to expand...
Click to collapse
I think just 1.
I had "vpn connections" installed. I then follow the instructions at the beginning of this thread. I stopped at "Next copy your openvpn config files and .crt files under /sdcard/openvpn" since I wasn't interested in using openvpn.
I then rebooted, launched "vpn connections" and it connected.
I cannot however get the vpnc widget to work.
I have used adfree for a long time and never had any issues until the TB. For some reason the ads are still all over the place. I have updated host files and all I know to do... any suggestions?
i'm assuming that you're rooted, right? i'd verify that your hosts file in /etc has entries other than for the local host.
alternatively, you could try using dolphin hd with the ad-blocker add-on.
open the /system/etc/hosts file on your android phone via the command line or with a file explorer (must be rooted and have write permissions for /etc/system/hosts)
add the ad server list from http://pgl.yoyo.org/adservers/ to the file
(if you change the IPs to 0.0.0.0 instead of 127.0.0.1, the ads will be killed faster, since they wont die in the loopback with 127.0.0.1, since 0.0.0.0 is an invalid address)
If you find ad server lists from elsewhere, add it to the file and filter out extras doing a unique sort on it. I normally keep the same list on my desktop/laptop and phone and add to it as I go using something like live http headers in firefox to find new ad servers
On a linux box you can do a unique sort with:
sort -u oldFileName > newFileName
Here is my list of adservers I block from found lists and ones I added myself.
http://pastebin.com/pF1QNEm2
I've been looking for this for a while finally I got it, this is what I did:
- Connect your android device to your linux PC
- Enable USB tethering
- On your linux box as root (I'm using Fedora 16)
Code:
iptables -A POSTROUTING -t nat -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
ifconfig usb0 12.12.10.1
With this you will enabled internet sharing between network interfaces and assign an IP to the usb interface.
- Enable mobile data access (3G) on your android
- On your Android using adb or terminal emulator
Code:
ifconfig rmnet0 0.0.0.0
ifconfig usb0 12.12.10.2
route add default gw 12.12.10.1 dev usb0
setprop net.dns1 8.8.8.8
The first line will disable the data traffic through your 3G connection so all the traffic wiil go through the USB
- Enjoy
All apps works because they see a vaild 3G connection!!!
WARNING: If during you are USB connected, the 3g connection is reset, the system will restore its IP and DNS so
the traffic will go through this interface you must reset again the IP to 0.0.0.0 and the dns to 8.8.8.8. Maybe
one of the devs here could help us to prevent this happened. You can always check the IP values of all interfaces by typing "netcfg"
Press Thanks if I help you
everytime,
bash: /proc/sys/net/ipv4/ip_forward: Permission denied
yes i tried with sudo, same output.
using ubuntu12.04 64 bit. all other commands are fine,
gandhar said:
everytime,
bash: /proc/sys/net/ipv4/ip_forward: Permission denied
yes i tried with sudo, same output.
using ubuntu12.04 64 bit. all other commands are fine,
Click to expand...
Click to collapse
In Ubuntu you can re-direct to files you own as the user calling sudo, such as files in your home directory, but not system files
so try this:
sudo bash -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
or you can edit /etc/sysctl.conf and then run sysctl -p
secondary problem
Thank you very much for your post, this is what I was looking for.
I have configured correctly, ubuntu 12.10 and android 2.3.7 (Huawei U8650) but there is a problem.
Only works a few seconds, the first moments. In the browser takes more time, but when I open "play store" internet is disconnected. It seems they check applications and stop working, it's strange. Configuration is successful because it works, but only a few seconds ...
Seems to prove that internet applications not from the 3g and crashes ...
I have broken the wireless on my huawei U8650 and this is the only way I can access the internet
Thanks in advance
PS: I'm Spanish, sorry for my bad English.
wideru said:
Thank you very much for your post, this is what I was looking for.
I have configured correctly, ubuntu 12.10 and android 2.3.7 (Huawei U8650) but there is a problem.
Only works a few seconds, the first moments. In the browser takes more time, but when I open "play store" internet is disconnected. It seems they check applications and stop working, it's strange. Configuration is successful because it works, but only a few seconds ...
Seems to prove that internet applications not from the 3g and crashes ...
I have broken the wireless on my huawei U8650 and this is the only way I can access the internet
Thanks in advance
PS: I'm Spanish, sorry for my bad English.
Click to expand...
Click to collapse
Yes sometimes it happen to me too but normally takes several minutes even hours not seconds, READ the WARNING.
Hope it help.
rply plx
what about windows 7 ?
how can i let my all apps including vpn to be worked with reverse tethering
Qutub Uddin said:
what about windows 7 ?
how can i let my all apps including vpn to be worked with reverse tethering
Click to expand...
Click to collapse
check this http://forum.xda-developers.com/showthread.php?t=1371345
Want to save power when WiFi Tethering... try WiFi TXpower. You can find it here:
https://play.google.com/store/apps/details?id=rubberbibpepper.WiFiTxPower
Solution for missing IWCONFIG file:
1. Download the first attachment "iwconfig.txt" (default save location is '/mnt/sdcard/download')
3. Open 'File Manager'
a. Select: 'Menu' -> 'More' -> 'Settings' -> scroll down paste 'donate' (which you should do!)
b. Select: Mark Yes for both checkbox options of "Root Explorer" & "Mount System Folders"
3. Navigate your path over to '/mnt/sdcard/download' and find & rename the file "iwconfig.txt" to 'iwconfig'
4. COPY the file, and navigate your path over to '/system/xbin' and PASTE the file. It may say it wasn't pasted, but scroll down and the file will be there.
5. Launch busybox 'terminal emulator' and type these two commands:
# su
# chmod 755 /system/xbin/iwconfig
6. Boot up WiFi TXpower and verify that the iwconfig error message is gone, and that you do not get a 'iwconfig' permissions error. You should see "iwconfig" and "eth0" titles and all the signal and power stats listed in the app. Lower numbers, less range, and greater batter life.
7. Enjoy! If this has helped you, please hit the "Thanks" button below.
Backstory:
Problem is, this app needs a file 'iwconfig' to be installed in '/system/xbin' and this directory is R/O (read-only, write protected). There are a few ways to do this;
adb push to install the file
Find an APP that will install iwconfig for you
Symlink the file if its somewhere else
Copy & Paste File yourself
I'm old school, so I like to have a hard copy of the file anywhere its needed, and at 30.4 KB, who cares. So following the 80% help link below, I downloaded the 'iwconfig.tar' file, extracted the internal file, and started trying to copy it into '/system/xbin'. From this same site, I used fragments of commands in the busybox 'terminal emulator' to finish the install after the file was copied into the directory. I used '# chmod 755' to set the permissions on the new file, so WiFi TXpower could use it.
"Quoted from:
# su
# cd /mnt/sdcard/download — (this assumes the download location of the file)
# tar –xf iwconfig.tar — (this was to extract the single file from inside the tar file)
# mount –o rw,remount /system — (I couldn't get this command to work, but you can try next line below instead)
# mount -o remount,rw -t yaffs2 /system /system — ccdreadcc line of code, that looks like it would work, I received no terminal emulator errors when attempting.
# cp iwconfig /system/xbin — (Above didn't work, so I copy & paste this file in 'File Manager' as I couldn't get 'Root Explorer' to do it, it wouldn't R/W '/system')
# chmod 755 /system/xbin/iwconfig — (You will need this later to correctly set permissions on 'iwconfig', if you don't you will get a "permission denied" error in the WiFi TXpower App)
"
Helpful Links:
80% Help to figure this out, and will be quoting useful parts to solution:
http://jhanford.wordpress.com/2011/10/03/lowering-wi-fi-transmit-power-in-android/
20% Starting and finishing information for solution:
http://forum.xda-developers.com/showthread.php?t=1209251
Attached Files
Does anyone have this working on ICS or on an HTC Glacier MT4G?
My rom has the file needed, but I could not get it to show any type of config, then I tried this method and still nothing.
RUN IT
Working on VZW GS3! Thanks buddy for the help! BEEN LOOKING EVERYWHERE!
---------- Post added at 01:34 PM ---------- Previous post was at 01:11 PM ----------
What does iwmulticall do exactly? Would it benefit Galaxy S3 Wi-Fi or battery?
deep thoughts
zwieringa said:
Working on VZW GS3! Thanks buddy for the help! BEEN LOOKING EVERYWHERE!
---------- Post added at 01:34 PM ---------- Previous post was at 01:11 PM ----------
What does iwmulticall do exactly? Would it benefit Galaxy S3 Wi-Fi or battery?
Click to expand...
Click to collapse
I am running on a rooted sprint samsung S3, the app continues to show::
iwconfig:
Unknown id: wlan0.
when I select 4dBm, there is no indication it worked. In terminal I run iwconfig, and it shows that the setting took effect! My stock power is 1496, which seems to be my max. Selecting 11dbm works, but 18, 25 and 32 do not. I am guessing my wifi adapter will not allow anything over 1496.
If I had iw and ifconfig on my device I could try this to force a higher speed:
ifconfig wlan0 down
iw reg set BO<--------------is an o not a 0
ifconfig wlan0 up
iwconfig wlan0 channel 13
iwconfig wlan0 txpower 30
any suggestions how to pull this off.. I can install this on a debian destro, but there's no point to that... if I can get the iw and ifconfig on my andriod OS, maybe I can force it higher than 1496...
Tried this.. Surprisingly, it's also working on my Nexus 7 (2012) too..
Not that is requires wireless extensions.
Code:
[email protected]:/data/data/bcmon/misc $ ./iwconfig
lo no wireless extensions.
svnet0 no wireless extensions.
ifb0 no wireless extensions.
ifb1 no wireless extensions.
sit0 no wireless extensions.
ip6tnl0 no wireless extensions.
wlan0 no wireless extensions.
In last Samsung Aries kernel, it's one of these:
Code:
CONFIG_WIRELESS=y
CONFIG_WIRELESS_EXT=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_WEXT_SPY=y
CONFIG_WEXT_PRIV=y
CONFIG_CFG80211_WEXT=y
CONFIG_WIRELESS_EXT_SYSFS=y
iwconfig has no effect on tx-power
This is great, thank you.
Unfortunately, when I followed all the instructions, got the iwconfig file from this thread, renamed it, successfully put it into system/xbin/, and then ran "iwconfig wlan0 txpower 2dBm" and then "iwconfig wlan0" the tx-power level is unchanged. It is still listed as 19 dBm. There's no error message.
Any ideas?
Does the "iwconfig [interface] txpower" command need to be run in a certain manner for it to have effect?
(I'm running a nightly build of Cyanogenmod 11 on a Moto G 4G.)
Yes, it's works on SGS4 i9506 4.4.2 after install iwconfig/iwmulticall. The signal is really changing, I see it when checking with other devices.
"iwconfig" shows txpower=31dbm for wlan0 (on other devices - S3, S5 and Tab - it shows 1496dbm)
I send command "iwconfig wlan0 txpower %%" with different values, but only 4, 11, 18, 25 and 31 works (yes, the last is not 32).
How can i increase it for better signal?
sorry for my english!
Thanks
Also I tried this:
iwconfig wlan0 sens -90
but
SET failed on device wlan0 ; Operation not supported on transport endpoint.
Is it needs orher diriver for wifi?
it doesn't work on lollipop
any ideas how to make it work on lollipop
Same here. Any solutions for Lollipop iwconfig?
error: only position independent executables (PIE) are supported.
how to fix this problem?
---------- Post added at 11:06 AM ---------- Previous post was at 10:46 AM ----------
kotaries said:
error: only position independent executables (PIE) are supported.
how to fix this problem?
Click to expand...
Click to collapse
Answering my own question:
You see this error because android doesnt want you to run old binaries on new version of system (as google explains, if I got the idea correctly)
To rebuild the binaries for new system is pretty complicated, so you can just fool the system by changing 17th byte in current (not working) binary file
Open some hex editor (online version for example: hexed.it), find the 17th byte (counting from 1, as humans do) and change it from 02 to 03
This byte (as I now see) is the first byte on 2nd string in the hex editor
Good luck
Try to edit, but the result "Segmentation Fault" :3
Hi All
I recently updated my Nexus 6 to the most recent 7.0 patch (NBD91U). I also then updated twrp and superSU as well. My problem is now with AdAway. I created the right symlink from /system/etc/hosts to /data/hosts with the right permissions on /data/hosts (644) and AdAway updates the hosts file fine. Problem is, I still get ads. After much futzing, I found that nslookup sees the entries in the hosts file, but ping does not. So, consequently, I am still seeing ads! It looks like only nslookup uses the hosts file, while everything else does not? I've rebooted and wiped the cache several times.
Ex.
Code:
shamu:/etc # grep sfgate hosts
127.0.0.1 oascentral.sfgate.com
127.0.0.1 om.sfgate.com
shamu:/etc # ping om.sfgate.com
PING sfgate.com.112.2o7.net (66.235.139.206) 56(84) bytes of data.
64 bytes from 66.235.139.206: icmp_seq=1 ttl=246 time=85.7 ms
64 bytes from 66.235.139.206: icmp_seq=2 ttl=246 time=85.2 ms
64 bytes from 66.235.139.206: icmp_seq=3 ttl=246 time=735 ms
|shamu:/etc # nslookup om.sfgate.com
Server: 0.0.0.0
Address 1: 0.0.0.0
Name: om.sfgate.com
Address 1: 127.0.0.1 localhost
What's going on?
Thanks,
scot