have a website that i use often and they had some domain issues recently - used to be able to get it on my mobile browser but not anymore (and the work pc's ban this site!) so it's a pain in the arse.
the site themselves mention editing hosts file names on the computer (i did this with the laptops at home and no problem now) but i can't seem to work out how to do this on my i9000. It's rooted and I have root explorer but under system/etc/hosts i'm not sure where to go from there (or even if that is the right place to be to edit the hosts files!)
any words of wisdom please?
I was just trying the same thing for similar reasons. did a 'mount' and it says / is a read-only system. I remember someone mentioning it here. Aha: http://forum.xda-developers.com/showthread.php?t=514698
cheers for the link - looks like some useful tips there though still a bit confused as never done any adb pushing from my computer so will have to read up about it.
trying to find a way to edit the hosts file from within the handset itself - not sure if i can do this with the terminal app?
An easier way to do this, on a rooted phone, is to use root explorer (remember to enable r/w) and go to /etc/hosts and edit it there. Or you can use es file explorer and enable root in settings.
thanks, i was also looking for a way to view and edit the hosts files. just tried a new ROM and it sort of block some popups that i wanted to appear.
beardedwonder said:
An easier way to do this, on a rooted phone, is to use root explorer (remember to enable r/w) and go to /etc/hosts and edit it there. Or you can use es file explorer and enable root in settings.
Click to expand...
Click to collapse
thanks - tried root explorer in the past but couldn't find way to edit the hosts - didn't notice the 'mount as r/w'! - alas i'm still stuck - added hosts as per the website's instructions and still can't load the webpage, either by the www name or by ip address.
dang!
doktorV said:
thanks - tried root explorer in the past but couldn't find way to edit the hosts - didn't notice the 'mount as r/w'! - alas i'm still stuck - added hosts as per the website's instructions and still can't load the webpage, either by the www name or by ip address.
dang!
Click to expand...
Click to collapse
Have you restarted the phone and made sure it's not commented out and there's only one space between the addresses?
doktorV said:
thanks - tried root explorer in the past but couldn't find way to edit the hosts - didn't notice the 'mount as r/w'! - alas i'm still stuck - added hosts as per the website's instructions and still can't load the webpage, either by the www name or by ip address.
dang!
Click to expand...
Click to collapse
Um, if you can't get the website via the ip address, you have a problem routing. Ensure you have the correct ip address. If that is the correct ip address, and you can get to it from another computer, you may have to use a proxy to get to the site.
A
Related
You can find the latest version of this app on the slideme app store.
http://slideme.org/application/adfree
This is the old thread, I started a new thread in the general section => http://forum.xda-developers.com/showthread.php?p=40759351
================================================================================================================================================
Spoiled by ad free browsing on my normal desktop computer it became increasingly annoying seeing all the ads on my phone. However it's really easy to make them disappear, although you most likely will need root on the phone.
Download the hosts.txt file from http://www.mvps.org/winhelp2002/hosts.txt, you may need to run dos2unix over the file to remote \r characters, rename the file hosts and copy it to /system/etc on your phone and say goodbye to most ads.
You may find the list to be imperfect, for example some feedburner URLs are "blocked" as a result which can screw with RSS feeds, although it's annoying giving too much info to Google but like everything else in life some things are a trade off.
If you want to root your phone, try this article.
Thanks for this!
As soon as I read the topic title I realised what you were doing and I never thought of it myself.
My hosts file was /etc/hosts though, not /system/etc/hosts
Dark X Dragon said:
As soon as I read the topic title I realised what you were doing and I never thought of it myself.
Click to expand...
Click to collapse
I've been using this technique for a bit, just didn't think to post about it before did a quick search and noticed no one else had so thought I might as well
My hosts file was /etc/hosts though, not /system/etc/hosts
Click to expand...
Click to collapse
Doesn't seem to matter, I just checked the /etc dir and it has the same hosts file.
Actually, /etc is a symbolic link to /system/etc, so your hosts file is really at /system/etc -- however, accessing the file through either path is equivalent.
Ha ha hosts exists on android!? I had no idea. I'm also a spoiled ad-less pc user. This is great. Thanks.
If you can't download the file above (it appears as text in browser), replace .txt with .zip at the end of the url. This will download the zip file which u can later unzip with an unzip app in the market.
Ok. I can't paste over the original hosts file using the phone? Astro and lynda file managers don't do it for me. And yes I am rooted, running 1.5 dudes build. Can this be done only from a PC?
ShatBag1105 said:
Ok. I can't paste over the original hosts file using the phone? Astro and lynda file managers don't do it for me. And yes I am rooted, running 1.5 dudes build. Can this be done only from a PC?
Click to expand...
Click to collapse
You have a couple of options, you can download the terminal app from the market and use it, or you can use ADB to shell into the phone, or wait for someone to code an app to do it all for you.
For the time being go with installing terminal, then type 'su' to become root. That is unless you have a copy of adb handy, if you can 'adb shell' the following commands are the same, except you can copy and paste.
Then remount the system partition read-write.
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
Then you go into the etc dir
Code:
cd /system/etc
Then you can rm the hosts file
Code:
rm hosts
Then grab the hosts.txt file
Code:
wget http://www.mvps.org/winhelp2002/hosts.txt -O hosts
Always more than one way to skin a cat, but the above works for me(tm)
lbcoder said:
Actually, /etc is a symbolic link to /system/etc, so your hosts file is really at /system/etc -- however, accessing the file through either path is equivalent.
Click to expand...
Click to collapse
Ugghh, I read that ages ago but really didn't commit it to memory. It is now. =)
There's a fair chance I won't get around to it but I'm tempted to take this ad blocking further. Namely an automatic app but there might be more to add to it.
Thanks for the help delta. I figured it had to be done in terminal. And you know, this would definitely become very popular as an app.
I'm a dummy its etc not ect
delta_foxtrot2 said:
Then grab the hosts.txt file
Code:
wget http://www.mvps.org/winhelp2002/hosts.txt -O hosts
Always more than one way to skin a cat, but the above works for me(tm)
Click to expand...
Click to collapse
(I am using the terminal program on the phone)
Until the above step, no problems
After typing in the above I get the following message:
"bad address "www.mvps.org"
I checked for typing errors, tried it 3 times but get the same error message
Any suggestions please?
thanks
nyayo99 said:
(I am using the terminal program on the phone)
Until the above step, no problems
After typing in the above I get the following message:
"bad address "www.mvps.org"
I checked for typing errors, tried it 3 times but get the same error message
Any suggestions please?
thanks
Click to expand...
Click to collapse
Try it without the http://www. It might work like that. This is a lot harder than it should be lol. The g1 is putting up a fight!
ShatBag1105 said:
Try it without the http://www. It might work like that. This is a lot harder than it should be lol. The g1 is putting up a fight!
Click to expand...
Click to collapse
Thanks, but this didn't work either.
Some googling indicated a possible DNS issue.
So I looked up the IP address (209.68.48.119), substituted that into your instructions and presto, everything worked!
Many thanks for the ad killer option for the G1
Aah beautiful work. Just to clarify for newbs like me. The last line is (# wget http://209.68.48.119/winhelp2002/hosts.txt -O hosts). Make sure that -O hosts is a captialized O.
ShatBag1105 said:
Aah beautiful work. Just to clarify for newbs like me. The last line is (# wget http://209.68.48.119/winhelp2002/hosts.txt -O hosts). Make sure that -O hosts is a captialized O.
Click to expand...
Click to collapse
Yes, capital letter o, lower case o stores the output of wget into the file which isn't the desired outcome
I plan on suggesting the following URLs to the hosts.txt guy to block admob ads in apps
p.admob.com
analytics.admob.com
r.admob.com
In the mean time you can manually add it to the hosts file yourself, just copy and past from another line.
After updating the hosts file you may need to reboot or wait for the hostname to expire from the internal lookup cache, unless someone knows a quick way to flush the cache to speed up the process that is.
Thanks for this. Worked great for me. Very helpful tutorial.
Just uploaded "AdFree" to android market, this does all the steps I laid out manually at the touch of a button.
Its funny how
127.0.0.1 localhost
is the only thing blocked in the /system/etc/hosts file. lol.
andonnguyen said:
Its funny how
127.0.0.1 localhost
is the only thing blocked in the /system/etc/hosts file. lol.
Click to expand...
Click to collapse
That isn't "blocked" and in fact nothing gets blocked by the hosts file it just points hostnames to the local system, which usually has no web server running so the connection fails immediately.
However you MUST have localhost listed or various things will fail and cause all sorts of issues.
New version of AdFree is now up, I have the app adding the admob hostnames to the bottom of the list.
Hello,
i dont have enough posts to post on the development side yet. And i was attempting to follow this post to block OTA's. http://forum.xda-developers.com/showthread.php?t=933291
I downloaded the sqlite3 binary, then used rootexplorer (mount R/W) to copy into /system/bin. From there do i just use Root Explorer to do the following?
/data/data/com.bn.devicemanager/databases/devicemanager.db
long press on devicemanger.bd
select edit with text
change "auto" to "manual"
save changes
reboot
this is what i tried but when i rebooted it didnt save. reverted back to auto. plus the code looked a bit different, instead of having a comma after "auto" it now has a capital "A". some of the other code looked different also. I deleted it and restored the original for now. but does anyone know what went wrong, im thinking its something to do with the sqlite3 binary.
JF-WS6 said:
Hello,
i dont have enough posts to post on the development side yet. And i was attempting to follow this post to block OTA's. http://forum.xda-developers.com/showthread.php?t=933291
I downloaded the sqlite3 binary, then used rootexplorer (mount R/W) to copy into /system/bin. From there do i just use Root Explorer to do the following?
/data/data/com.bn.devicemanager/databases/devicemanager.db
long press on devicemanger.bd
select edit with text
change "auto" to "manual"
save changes
reboot
this is what i tried but when i rebooted it didnt save. reverted back to auto. plus the code looked a bit different, instead of having a comma after "auto" it now has a capital "A". some of the other code looked different also. I deleted it and restored the original for now. but does anyone know what went wrong, im thinking its something to do with the sqlite3 binary.
Click to expand...
Click to collapse
I've yet to do this but from what I can gather you don't long press on devicemanager.bd You go into terminal (which if i remember correctly is under nook tools, I'm on froyo so i can't say exactly where it is) and then type the commands he listed.
You should be able to download a terminal from the market (just search terminal) if you can't find it
adb shell, sqllite, build prop...Any other non-tech major people around here a little lost?
I'm rooted. I don't want the new update. I can follow directions but would be more comfortable if some basic instruction were written. Treat me like I'm 10.
It looks like the best way to do this is as follows:
"From this thread:
http://forum.xda-developers.com/showthread.php?t=874871
Attached is a working sqlite3 binary.
Copy it to /system/bin
(I transfered it to my SD, then used rootexplorer (mount R/W) to copy into /system/bin))
you will now be able to edit sqlite databases on the nook itself.
--------------------------------------------------------------------------------
Attached Files sqlite3.7z (11.9 KB, 56 views)
--------------------------------------------------------------------------------
In your terminal:
$ adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
$ sqlite3 devicemanager.db
sqlite> update registry set value='manual' where name='com.bn.device.fota.mode';
sqlite> .q
$ adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
$ adb reboot
"
Do I unzip the attached binary and paste that into the location or the .zip as a whole? What do I use as a terminal?
I've been flashing my DROID since day one but the NC development circle has been far from entry level user-friendly. Any help would be appreciated.
you can do it on windows too.
1) pull/get/copy the.db file from your phone to your pc
2) update the database file using sqlitebrowser. I.e run the sql command "update ......". Close sqlitebrowser.
3)push/put/copy the updated .db file to the same location overwriting the original.
britoso said:
you can do it on windows too.
1) pull/get/copy the.db file from your phone to your pc
2) update the database file using sqlitebrowser. I.e run the sql command "update ......". Close sqlitebrowser.
3)push/put/copy the updated .db file to the same location overwriting the original.
Click to expand...
Click to collapse
Progress. However...
I got SQLite on my PC. I found the devicemanager file on my NC, pasted it to my SD card for transfer over to my PC for editing. I trasnferred the file over to my PC for editing. I open SQLite but have no idea how to use it.
I just did this today using sqlite editor only!!! Its a GUI so it real simple to use.
1.Install the apk
2.reboot
3.go to extras and launch sqlite editor
4.allow it, give it the permision it needs
5.look for DeviceManagerService
6.click on devicemanager.db
7.click on registry
8.look for _id 7, name>>>> "com.bn.device.fota.mode"
9.scroll to the right and click and hold value field "auto", until a little pop up shows and select edit field
10. Change the value from auto to manual
11. Save
Done!!!
If you need the apk here is a link I just made
?d=LTSQDZ65 for megaupload (sure u guys can piece it together!)
Let me know if it helped anyone!
Yes, we totally need another thread on this. I must note that pushing the build.prop in my thread and my two Nook Colors have not updated. Dunno about this method or others. Caveat emptor!
This is exactly what I was looking for. Thank you. Very simple.
Sent from my NC using XDA App
Thanks for breaking it down for us, nookme.
Do we need to do this if we are operating from an SD bootable Froyo or CM7 ROM?
tablo said:
Thanks for breaking it down for us, nookme.
Do we need to do this if we are operating from an SD bootable Froyo or CM7 ROM?
Click to expand...
Click to collapse
In theory it should work for both, whether its a soft root mod or simply a bootable sd card that emulates froyo... It's a matter of just having root access and changing a registry setting on the device itself. Hope this shines some light! happy rooting ppl
Not noobie enough for me, sigh
So, if I have followed these directions from an earlier post have I messed something up? Not blocked updates at all? I don't understand the directions in this thread. What happens if I don't block the update? There must be a lot of people like me who had the technical skills to manage the root process but don't understand all of your coded instructions. I read in another thread that I should do a Titanium backup. How does that help after an update? Will market aps that have already been downloaded still work? Will everything revert to stock? Could someone explain what we should expect? Thanks!
To disable OTA (over the air) updates:
Change the name of this file: otacerts.zip to anything else
To do this, get root explorer ($3) from the market
Run root explorer
Go to etc/security/otacerts.zip
Hit the little mount button near the top to change r/w to r/o
Rename the file otacerts.zip to otacerts.zip_DISABLED_OTA_UPDATES
Hit the little mount button again to change r/o back to r/w
Droiddict said:
So, if I have followed these directions from an earlier post have I messed something up? Not blocked updates at all? I don't understand the directions in this thread. What happens if I don't block the update? There must be a lot of people like me who had the technical skills to manage the root process but don't understand all of your coded instructions. I read in another thread that I should do a Titanium backup. How does that help after an update? Will market aps that have already been downloaded still work? Will everything revert to stock? Could someone explain what we should expect? Thanks!
To disable OTA (over the air) updates:
Change the name of this file: otacerts.zip to anything else
To do this, get root explorer ($3) from the market
Run root explorer
Go to etc/security/otacerts.zip
Hit the little mount button near the top to change r/w to r/o
Rename the file otacerts.zip to otacerts.zip_DISABLED_OTA_UPDATES
Hit the little mount button again to change r/o back to r/w
Click to expand...
Click to collapse
If you read this >> http://forum.xda-developers.com/showthread.php?t=1007551
you will see that the sqlite method is used by many and is the simplest way too, again this is a GUI, so no shell command line... How can this be difficult??
Just follow my steps... it works
I have had nothing but problems with my rooted NOOK Color due to B&N auto updates. I followed your instructions and now I hope my problems are resolved and my NOOK Color will never update again.
Thank you
I've been trying to work on this and still can't figure out how to do this can somebody give me a step by step
So far I've tried to inStall an ash server to go in and edit it but I cannot get it to work somebody to help
maxgohan said:
I've been trying to work on this and still can't figure out how to do this can somebody give me a step by step
So far I've tried to inStall an ash server to go in and edit it but I cannot get it to work somebody to help
Click to expand...
Click to collapse
two ways to change your hostname
1. open edit /system/etc/dhcpcd/dhcpcd.conf with your favorite text editor. under "interface eth0", type: hostname yourdesiredhostname
2. open your favorit terminal emulator, type: vi /system/etc/dhcpcd/dhcpcd.conf
make above mentioned changes.
-> reboot and it should be working. try to ping your device from another piece of hardware in your home network
if you want to change your hosts file - do the same with /etc/hosts ^^
I keep getting this line...
mv: can't remove '/etc/hosts': Read-only file system
is your device rooted? if yes, you have either so mount your root file system as writeable in your file explorer (if it supports root access, like ES File Explorer), or you have to type "su root" at the beginning of your terminal emulator operations.
same problem with a rooted and unlocked device
two_handed said:
is your device rooted? if yes, you have either so mount your root file system as writeable in your file explorer (if it supports root access, like ES File Explorer), or you have to type "su root" at the beginning of your terminal emulator operations.
Click to expand...
Click to collapse
my device is rooted with kingroot I have installed root explorer and ES file explorer too with giving them root permission as well , but when ever I tried to delete or edit hosts file nothing gets change (with root explorer) and with ES file explorer it says " read only file " I tried to change the permission in properties but failed to save the check boxes result. oh man I forget to mention my problem here my cell is infected by a "freedom" app when finally I found it useless I changed the freedom app setting to "freecore" my device got reboot after that I uninstalled the app , now I am unable to connect with google servers , can't use play store , I also tried hosts file Editor but got no result I know my problem is to delete the hosts file , but something is not letting me to take control over hosts file , my android is 5.1 and model is huawei honor 4c ?
Hi,
As the thread title suggest, I present here with small tutorial to retrieve saved Wifi Passwords on rooted android devices. This may be useful when you forgot or want to know the password of your buddy's house or workplace or any other wireless network password.
Download Root Explorer or OI File Manager or any other file explorer which gives access to /data partition from Google Play Store.
Navigate to the following location:
/data/misc/wifi
Click to expand...
Click to collapse
Once inside you should few files present.
Open the file labeled "wpa_suppliciant.conf"
When prompted, select Open With and then select one of the basic text editors from the list or any third party apps if you have installed.
Once the file opens up, look at the following saved lines of data for your network information:
network={ ssid="NETWORK_NAME_HERE" psk="PASSWORD_HERE" key_mgmt=WPA-PSK priority=1 }
Click to expand...
Click to collapse
Each network that you've saved on your device should have a network bracket like above that accounts for it.
ssid= represents network name and psk= (or wep_key0= if the network is WEP based) represents password for the network you are looking at.
Optionally, you can open a Terminal Emulator and save the result in a text file by typing following code :
Code:
su
cat /data/misc/wifi/wpa_supplicant.conf | egrep '(ssid|psk)' > /storage/sdcard0/wifi_password.txt
That's it You are a so called "Hacker" now :laugh:
Hit thanks if you find this useful
Nice share bookmarked it for future use:good:
Always wondered, is there a way to retrieve the authentication username/ID and password, not the Wireless SSID's password?
Lethargy said:
Always wondered, is there a way to retrieve the authentication username/ID and password, not the Wireless SSID's password?
Click to expand...
Click to collapse
Hi mate,
If I find that way of generating the credentials, I'll surely make one tutorial for it
Regards,
Mr hOaX
Sent from my Nexus 5 using Tapatalk
Just an additional information
I tried this path (\data\misc\wifi) and I couldn't find anything, but I find in another path: \system\etc\wifi, which have the same file WPA_supplicant.conf – if someone has the same problem I had.
My cell phone is a Nexus 5.
holemoon said:
I tried this path (\data\misc\wifi) and I couldn't find anything, but I find in another path: \system\etc\wifi, which have the same file WPA_supplicant.conf – if someone has the same problem I had.
My cell phone is a Nexus 5.
Click to expand...
Click to collapse
I had a WPA_supplicant.conf in both locations on my Nexus 5
but the (\data\misc\wifi) is the one that contained the passwords.