Block ads on your Android phone (2010-04-15) - Hero, G2 Touch General

AdFree is a fantastic program created by XDA user delta_foxtrot2 (see this thread in the G1 forum) to facilitate using your hosts file to block ad servers. This makes it extremely easy. Of course you will need root access!
Unfortunately I found some ads still weren't blocked and the last update to the AdFree hosts file happened 2010-02-27. So I decided to update the hosts file myself. I merged the hosts files from adfree/mvps/yoyo and added a bunch of mobile ad providers I've found myself. The list is free of duplicates and comments, so as to keep it as small as possible (it still amounts to about 635 kB).
To install this hosts file, you still need root access obviously:
download the zip
unpack it to the directory where adb.exe is located (if you don't know what adb is or how to get it running, please use the search)
open a command prompt
Code:
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
adb push hosts.for.mobile.txt /etc/hosts
adb shell mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
You might need to restart your phone. Also clearing the Android browser cache will apparently help in getting rid of already cached ads (worked for me, ymmv).
As for ethical discussions on blocking ads for free apps, blah. I don't so much have a problem with ads, as I do with the personal data that gets send to the ad providers. I'm talking about location data and whatever else they might want to know about my device and what I'm running ("analytics" is a fancy name for "we want to find out as much about you as we possibly can get away with").
Anyway.. use it, don't use it, up to you.
Last updated
15-4-2010 23:23 (20808 hosts blocked)
.

Thanks a bunch!

Thanks for the updated hosts. So should we even bother with the program, especially if it doesn't get updated hardly at all?

You're welcome!
If you push my hosts file, you don't need the AdFree app, but I wanted to acknowledge his work and give people a simpler alternative to using adb.
Best choice right now is my hosts file as it's simply more comprehensive.
Sent from my HTC Hero using the XDA mobile application powered by Tapatalk

phaelox said:
You're welcome!
If you push my hosts file, you don't need the AdFree app, but I wanted to acknowledge his work and give people a simpler alternative to using adb.
Best choice right now is my hosts file as it's simply more comprehensive.
Sent from my HTC Hero using the XDA mobile application powered by Tapatalk
Click to expand...
Click to collapse
Understood. Yeah, it was a great start/beginning to blocking ads, but no updates. Thanks again.

Thanks! I've been looking for something like this for awhile. Real quick question: is getting "Data connectivity errors" in browser normal with this? It didn't start till I pushed this on my phone.

tmayne said:
Real quick question: is getting "Data connectivity errors" in browser normal with this? It didn't start till I pushed this on my phone.
Click to expand...
Click to collapse
Short answer: Yes.
Long answer:
You may know this, but I'll explain anyway. The way this works is as follows. The loopback address for any network interface is 127.0.0.1 -- this is the address for the device, but only from the device itself, it loops back on itself. We don't want to waste bandwidth with ads, or have ad providers collect all sorts of data on us, so we don't want to connect to them. Any FQDN -Fully Qualified Domain Name- (for example: analytics.admob.com) needs to be converted into an IP address to be able to connect to it. Here's where the 'hosts' file comes in. It's a simple text file with a record on each line that says redirect 'hostname' to 'ip-address'. So we put a line in that reads '127.0.0.1 analytics.admob.com'. This tells our device that any connection made to 'analytics.admob.com' needs to be redirected to '127.0.0.1', which is your device. Basically a dead-end, as you are not running their webserver serving ads on your device, so this results in a data connection error.
Now, usually you will surf to a site that loads images (advertisements) from a server that is listed in this hosts file, and as a result the ads will not load. That shouldn't popup any error windows. But if you try to visit http://analytics.admob.com in your browser, then yes, you will see an error.
If the latter happens with a site you do wish to visit, just open the hosts file in a text editor (one that supports UNIX-style line ends) and remove the line in question, or put a '#' in front of the line to comment it out.
Hope that made it clearer.

Yeah it did. No worries though since it seems that after pressing "Ok" everything works fine! Small trade off for blocked ads! Thanks!

Thanks for this How-TO!
So basicaly that mean we can restrict acces to certain websites from our phone?
eg: adding this line
Code:
127.0.0.1 forum.xda-developers.com
and I'll no longer be able to browse XDA from my phone?
Keep writing such How-To, like this one and the one to sign update.zip, I found this interessant and usefull

tmayne said:
Yeah it did. No worries though since it seems that after pressing "Ok" everything works fine! Small trade off for blocked ads! Thanks!
Click to expand...
Click to collapse
You're welcome, glad I could help.
carbonyle said:
Thanks for this How-TO!
So basicaly that mean we can restrict acces to certain websites from our phone?
eg: adding this line
Code:
127.0.0.1 forum.xda-developers.com
and I'll no longer be able to browse XDA from my phone?
Keep writing such How-To, like this one and the one to sign update.zip, I found this interessant and usefull
Click to expand...
Click to collapse
Cheers. And yes, that's exactly right. Just remember the hosts file takes FQDN's, so you can block a domain (or subdomain) this way, but not a directory or page on a domain. Also, blocking a domain does not also block its subdomains.
PS. this method of using the hosts file is not unique to your android phone, it works on most operating systems on PC as well. See this Wikipedia entry for more info.

what about non rooted phones? I just got myself a htc desire, I'm happy with it but would be happier if I wouldn't be required to see all those ads.

Unfortunately root is required to remount /system as writable to be able to overwrite the hosts file.
Without root you could use another free app found in Market called "AdBlock", which functions as a localhost proxy. Just set localhost as proxy in APN/wifi settings. It doesn't come with a prefilled list of keywords to block though, but it works on a URL level, not FQDN, so you can specify a url or part of it to block.

Just one more quick concern about the Data Connectivity issues: Certain areas of my university require a redirect page login in order to connect to wifi. However, it seems that at certain locations, I get the Data Connectivity error pop up repeatedly and my phone never makes it to the redirect page.
Actually it seems my phone only likes the wifi in my dorm. As stepping outside (to a library or classroom) and attempting to connect to the same wifi produces the error.
Is this an issue with the hosts file or with the phone itself??
Thanks!

If you DO see the wifi redirect page at SOME locations, then the hosts file is not blocking it (wouldn't make sense as it's likely an intranet page anyway). Sounds like wifi reception is unstable on your phone.
This is getting off-topic, but..... Have you already updated your radio? (the part of the ROM that handles everything related to GSM/3G/WiFi/Bluetooth connections). If not, here for the latest radio update.zip - flash through recovery.

phaelox said:
If you DO see the wifi redirect page at SOME locations, then the hosts file is not blocking it (wouldn't make sense as it's likely an intranet page anyway). Sounds like wifi reception is unstable on your phone.
This is getting off-topic, but..... Have you already updated your radio? (the part of the ROM that handles everything related to GSM/3G/WiFi/Bluetooth connections). If not, or the latest radio update.zip - flash through recovery.
Click to expand...
Click to collapse
I should note that I'm using a Motorola Cliq...Handler 1.5 ROM. There is a radio update available for the Motorola Cliq (I'm currently using 1.3.18 and 1.4.8 has been released) but there are some apk incompatibilities with it (particularly Swype which I love...since it's in closed beta right now, there are no accessible updates for it unfortunately).
Since I bought my phone off of ebay, I can't send it back for a new one. The essential things work but it is a bit frustrating that it has some problems.

tmayne said:
I should note that I'm using a Motorola Cliq...Handler 1.5 ROM. There is a radio update available for the Motorola Cliq (I'm currently using 1.3.18 and 1.4.8 has been released) but there are some apk incompatibilities with it (particularly Swype which I love...since it's in closed beta right now, there are no accessible updates for it unfortunately).
Since I bought my phone off of ebay, I can't send it back for a new one. The essential things work but it is a bit frustrating that it has some problems.
Click to expand...
Click to collapse
I'm pretty sure that updating radio won't affect other softwares since "radio" is *just* the piece of code that can handle GSM/Wifi/BT/3G, ... signals

I'll always keep an open mind, but from what I know, I'm with carbonyle on this.
Back on topic:
if you come across an app that still displays ad, regardless of my hosts file, please reply in this topic with the app/version (and a logcat output would be nice if you know how) and I'll see if I can find the ad provider domain and update the hosts file.

I'm confused... This is for blocking apps adds???

:No-Frost: said:
I'm confused... This is for blocking apps adds???
Click to expand...
Click to collapse
Yes it is. See it like a firewall wich blocks mobile ads. Because the app wont recieve any response from the ad url it tries to reach, it'll simply not display the ad (like when you use the app without wifi or data connextion on)

Wooooooo thanks... worked like a charm in glympse shazam and others =D...
PS: Air Control still have adds... Mmm how can we know what's the host for the add in the apps so we can contribute into blocking them???

Related

Android Privacy

Hi all, I have a major concern about privacy and all the 3rd party data collectors...
A lot of apps are uploading user info and stats to companies like Flurry, pinch media etc.
I'm about to make the move from iphone OS to android, and i'm looking for a opt out to keep my privacy intact.
Saurik creaded PrivaCy for the jailbreak community that enabled on\off toggles for the 4 major companies.
My issue on iphone was that Pinch Media alone gathered the following information without my knowledge :
* iPhone’s unique ID (imei)
* iPhone model
* OS version
* Application version (in this case, camera zoom 1.x)
* If the application is cracked/pirated
* If the iPhone is jailbroken
* Time & date I start the application
* Time & date I close the application
* My current latitude & longitude
* My gender (if Facebook enabled)
* My birth month (if Facebook enabled)
* My birth year (if Facebook enabled)
I want the option to chose weither or not this kind of info gets collected and distributed.
I've looked into this issue on the android platform, and it seems like there's no option other than not to install the app.
Take for instance Locale. To my knowledge it uploads my imei nr (+lot of other info) to Flurry, whilst i do see the developers need to gather info, and I do not see why my imei number should be uploaded at all.
When I get my android phone I can only chose NOT to install locale, but I just want to prevent it from uploading such info..
Can anybody create a toggle, preferably one that doesn't aquire root, or some guide as to hosts file editing, or a firewall app that will give me this control over my device?
regards
-e
just add a line in hosts file like the following for each website you want to block:
127.0.0.1 some.company.com
Fantastic, thanks mate.
Unfortunately I will have to have root permissions to edit the hosts file.
(it might take time before the htc desire gets root)
(edit: unless theres another way to get write permissions for that file..?)
If I do mess with the hosts file I'd be keen on adding a fair few entries to block ads too..
Since the hosts file gets loaded in ram at bootup, will there be any noticably difference in speed due to the size increase?
regards
-e
could you please post the host-file or the addresses/ip's of the companies your gonna block?
they should be of interest for everybody here
1. You will need root access.
2. The change shouldn't impact the performance in the least. Any local host lookup is always faster than DNS lookup. Meaning that it should increase performance in cases where it finds the match in hosts file, although I doubt if you will notice it.
3. I wouldn't worry about RAM. The host file, even if you add a hundred entries, given that each line consumes 100 bytes, should still be under 10kb.
Great to hear. Thanks for the replies.
@fabsn: I'll post my hosts file as soon as I get this working.. (gimme a few weeks to get my phone, move to android and root
Although: I'd be keen on using the adblock app in androidstore (the one that modifies the hosts file), but my manual changes will break every time I update the app.
I'll try to get hold of the dev to se if he/she might add these info collectors (like Flurry) in another version so that people can get "the best of both worlds"
By the way: I wish all devs that utilizes info collection in their apps could just provide users with an opt out, then my problem would be solved...
-e
http://textbin.com/x6430
Here is a complete "phone home" list for the iPhone. A lot of this will directly apply to android as well, so perhaps a nice soul here at the forum could compile the most useful adresses for me (I'm writing on my phone and it's a b**** to do this on)
the list is taken from: i-phone-home.blogspot(dot)com/
so credit goes to that community.
I really want to combine this with the hosts file that jamesisbored/droid has for adblock..
I will test this once desire hits my mailbox and someone finds root.
-e
This sounds like a great idea. Once a comprehensive list is compiled it should be passed on to "bigtincan". I know myself and a lot of other people use their "ad free" app to block ads using the same method mentioned by Ady above. Although they may be blocking them already and I don't know. I've never looked closely at the host file.
http://bigtincan.com/downloads/android.html
Any progress made on this end?
ady said:
1. You will need root access.
2. The change shouldn't impact the performance in the least. Any local host lookup is always faster than DNS lookup. Meaning that it should increase performance in cases where it finds the match in hosts file, although I doubt if you will notice it.
3. I wouldn't worry about RAM. The host file, even if you add a hundred entries, given that each line consumes 100 bytes, should still be under 10kb.
Click to expand...
Click to collapse
I am new to modding my phone, would you be so kind as to go into more detail how to do this. Specifically, what is this "Hosts file" you speak of? I do have root access and searched my entire phone for a file like that with no joy.
Also, the links provided to possible host data do not work, can somebody update that?
Thanks!!!:laugh:
You may be interested in the MOAB (mother of all adblockers) thread here on xda. Best ad blocker out there, imo, if you haven't already. Sorry, I can't link it now.
Sent from my SCH-I545 using Tapatalk

can anyone help with adfree

my last mytouch4 worked out just fine... this ine however is pissing me off
I have done everything i can think of
uninstall-reinstall-wipe cache in recovery and still wont work right. dont get it.. last one worked right out the gate.
nlarge said:
my last mytouch4 worked out just fine... this ine however is pissing me off
I have done everything i can think of
uninstall-reinstall-wipe cache in recovery and still wont work right. dont get it.. last one worked right out the gate.
Click to expand...
Click to collapse
All that ranting, but no information as to what is actually going on. Are you getting an error message? FC?
Still getting ads.....
AFAIK, adfree simply adds a hosts file with the add servers in it, in which case you are seeing adds because either the servers changed or there are new ad servers that haven't been added yet. Devs need incentive to do the work they do, so just be happy that you can even get good apps for free and deal with it.
jdkoren said:
AFAIK, adfree simply adds a hosts file with the add servers in it, in which case you are seeing adds because either the servers changed or there are new ad servers that haven't been added yet. Devs need icnentive to do the work they do, so just be happy that you can even get good apps for free and deal with it.
Click to expand...
Click to collapse
An app is only as good as it works. I have run into the same issue as the op recently. Also I'm getting real tired of reading these smart ass remarks at the end of posts here to just like yours. Its unnecessary!
hey.. try this:
http://forum.xda-developers.com/showthread.php?t=919040
The above methods seem to work for me. I've never used adfree btw...
There is something odd going on with hosts. I have the same problem as you that ads continue. I have traced mine to the fact that the hosts file is continually overlaid by the default blank one. It appears there is some component that continually scans this and wipes it.
I posted this problem a couple months ago but never got a response. The best I did was install GScript Lite and create a script to copy my saved off version of the ad-free hosts file back over the real one. It is not a good solution but the only one I have. I suppose the ultimate solution would be a different ROM. But that would just trade the problem I understand for an unknown number of ones I don't.
ethutch said:
There is something odd going on with hosts. I have the same problem as you that ads continue. I have traced mine to the fact that the hosts file is continually overlaid by the default blank one. It appears there is some component that continually scans this and wipes it.
I posted this problem a couple months ago but never got a response. The best I did was install GScript Lite and create a script to copy my saved off version of the ad-free hosts file back over the real one. It is not a good solution but the only one I have. I suppose the ultimate solution would be a different ROM. But that would just trade the problem I understand for an unknown number of ones I don't.
Click to expand...
Click to collapse
i dont use adfree
ive never had an ad using this hosts file
extract it from the zip, and put it in system/etc
enjoy
Has anyone tried enabling the AdFree option to symlink to /local/data (I think? forgot the exact path it gives in the app). I use that and have never experienced any problems with this on Ice Glacier.
It works for me, perhaps its a device specific problem.
SE7EN- said:
An app is only as good as it works. I have run into the same issue as the op recently. Also I'm getting real tired of reading these smart ass remarks at the end of posts here to just like yours. Its unnecessary!
Click to expand...
Click to collapse
While I somewhat agree with your post, I agree with jdkoren's more. All of the apps you are blocking ads for were free, free because of the ads that help fund the development of the apps. So I think he's just saying, if you can't block the ads, accept it, you have all those apps at no cost... Everything we experience, this forum, these custom ROMs, market apps, all took great amounts of time and effort, I think sometimes we lose sight of that when we think about open source projects.

[Q] usb reverse tether to feature phone

I have a basic samsung feature phone. Id like to use this as a modem for my Acer if possible. This phone works fine on all my ubuntu systems - just plug it in for the first time, click next-next in the wizard and I'm online. On the tablet, I see that it shows up as a /dev/ttyACM0. I belive this means that its a matter of getting the correct chat commands and associating pppd with the android layer. I imagine the process must be similar as to getting a USB 3G dongle working. Does anyone have any thoughts on how to do this?
There are already some threads about tethering the tablet to your phone, as well as 3G dongles.
http://forum.xda-developers.com/showthread.php?t=1152869
But yeah, no solution yet.
got it working
I thought I'd post the info on how I got this working for my specific situation. I have not read many other threads about this so maybe this type of info is already out there.
My phone is a basic samsung feature phone on AT&T that I called up and got unlimited data for $10/mo extra. This phone is practically unusable for browsing on itself. I plugged it into my ubuntu laptop and basically the tethering worked right away. I thought then that it should be able to work on the tablet. I wanted to make sure that "unlimited data" also applied to tethering to a computer. They said yes, if you can get tethering working - still no limit. I get 1-2Mbit rate over it.
This is on a rooted tablet, of course.
When I plug it into my tablet I get a single /dev/ttyACM0. If your phone is similar, you maybe able to use this info.
I went to At+t website and found this:
Then I read the man pages for pppd "man pppd". From this information, I understood how to modify the sample scripts "gprs", "gprs-connect-chat" and "gprs-disconnect-chat".
I then came up with a suitable "ip-up" script, based on ones found in the Huawei 3G modem example code. This is called when a ppp0 connection is made. Some of the lines in there I am not sure of, but it works, regardless.
I was surprised to find the standard "chat" program was not present in any of the roms I'd tried. Currently I am using virtuous Xoom. Somewhere, I found "chat-ril" which did the trick.
I've attached "modem.zip" which contains all the mentioned files.
From a root shell, you type:
pppd call gprs &
(This is kind of a pain but I'd like to find a way to automatically do that when the phone is plugged in)
If you do ifconfig ppp0, you should have an address, then try to browse.
Now I'm watching Netflix on my A500 as I drive! Also google navigation is absolutely great on a tablet, once you have the data connection.
willyampz said:
I've attached "modem.zip" which contains all the mentioned files.
From a root shell, you type:
pppd call gprs &
(This is kind of a pain but I'd like to find a way to automatically do that when the phone is plugged in)
If you do ifconfig ppp0, you should have an address, then try to browse.
Now I'm watching Netflix on my A500 as I drive!
Click to expand...
Click to collapse
Thanks for the work, but what are we to do with the modem.zip file you provided?
Modem zip contains the scripts and the chat-ril utility that need to be copied to your tablet. There's two ways to copy the files to your tablet:
1)
first unzip the files on your PC
use adb and push the files over to your tablet in the corresponding locations under /system.
2)
unzip the files to a micro SD or USB stick
remount the /system partition as read/write
copy them to the corresponding locations in the tablet filesystem from the SD or USB stick.
Copying files to your /system partition is described elsewhere in the forum but I can give more detail if needed.
I'm admittedly a noob on many levels. I think I followed your instructions but I get:
# pppd call gprs &
# /system/bin/chat-ril: permission denied
Any suggestions?
make sure you do it as root by typing 'su' first. Also check the permissions of chat-ril binary to be executable.
Thanks, it was the chat-ril with incorrect permissions.
So going with what you provided and much help from Google, I was able to make my own set of scripts for my phone and carrier (a Nokia 5230 and T-mobile). It looks like it's connecting both in my shell on the tablet (all "got it"s and OKs) and on the phone side which shows it with the 3G connection in use. Executing that ifconfig ppp0 gives me an ip address with a [up point-to-point running multicast].
My problem is I can't seem to access anything on the tablet. I can ping google from within the shell but the default browser, Dolphin, and the rest of my internet accessing apps don't work. I did change a line in the ip-up file from /system/bin/setprop "net.interfaces.defaultroute" "gprs" to "3g", which is what I named my connection script. Is there something else I'm missing?
Thank you for all the help.
Well, the good news is you can ping which probably means it can work and you are just about there.
The stuff in ip-up I don't completely understand myself, but that's probably where the issue is. By that point I was so close and anxious, that I just manually did some 'setprop's and experiment until it worked. I had exactly the same issue where I could ping but not browse at one point. Also, make sure the dns setprop's are set. Are you sure the "3g" should not be "gprs". I'm not sure that has to do with the script name. But maybe just the fact that you can ping means that's ok. I'm just not sure. Good luck.

[ROOT][HOWTO] Disable Lockscreen Ads

WARNING: I am not responsible for any bricked devices caused by attempting this howto. If you haven't read this how to twice, and fully understand the requirements, then please don't attempt it.
Introduction (not important):
First, this may not be the best way to do this, and if someone knows a better way, I'll be happy to listen.
I kinda stumbled across this solution after trying the many other ways to solve the problem, but all the other ways seemed to have something incomplete with them and ended with no ADS, but no something else, like rotating lock screens or something.
I started with the assumption that the ADS program (dtcp) can be disabled through a flag somewhere on the system, for if you pay the extra $20 you get a kindle with no ADS, but same Android build. After looking through lots of sqlite databases I found it in the com.android.providers.settings/settings.db file.
Prerequisites:
Basic knowledge of databases
SQLite Editor Pro (Free on 1Mobile Market)
DroidWall
Steps:
Open SQLite Editor
Open "Settings Storage" (com.android.providers.settings)
Open settings.db
open "global" table
Highlight entry "IS_DTCP_ENABLED"
Click the Edit Record button at the top
Change the value from a 1 to a 0
Click Save
Go back
Make same change on the "secure" table
Reboot kindle for new options to take effect.
Other Thoughts:
This just changes the value temporarily until the device checks back in with Amazon and then the value will get overridden again with the correct value. To prevent that install DroidWall and whitelist only the applications you need to access the internet. DroidWall requires root, which is why root is in the subject. But you should be doing this anyways to prevent OTA updates.
cool
Does this mean that you will now get the rotating native wallpapers that you would have if you paid for the dismissal of the ads? Currently I use adaway on my s4 hotspot and the only one I blacklist is (spectrum.s3.amazonaws.com) this has blocked updates because I am still on old software with no other blocking in place and I have noticed it also has blocked rotateing ads accept I have the same 1 at all times.
Edit: YAY !!!! and yes I now have rotating native wallpapers
Btw thank you for sharing and it is quite refreshing to see a new member join to share useful information in a well thought out and presented OP and not just join to start a thread with a question that is the heading of so many other threads that has been beat to death already..burying perfectly good information..thank you for joining us at XDA!
Awesome!!!! have been looking for a way to do this without factory reset for a while! You da man! Gonna spam that thanks button for a while lol
Thanks so much, that was easy!
Mind after a few days .2 went straight black lock screen
Anyone know what exactly I need to enable in droidwall to have internet but no ota updates or Amazon changing the lock screen back to ads?
Uhg
This mod works fine. No ads, rotating wallpapers appear every time. No reversion to black screen. No need for Droidwall. Use of Droidwall is impractical for this purpose. Who knows what not to include in some giant white list?
It appears that the wallpapers will continue to appear without reversion if you have blocked updates using the root kit.
earlgrey_44 said:
This mod works fine. No ads, rotating wallpapers appear every time. No reversion to black screen. No need for Droidwall. Use of Droidwall is impractical for this purpose. Who knows what not to include in some giant white list?
It appears that the wallpapers will continue to appear without reversion if you have blocked updates using the root kit.
Click to expand...
Click to collapse
Sorry, what's the root kit?
dras99 said:
Sorry, what's the root kit?
Click to expand...
Click to collapse
First link in this post:
http://forum.xda-developers.com/showpost.php?p=53451623&postcount=3
I assume the block update action from the rootkit is responsible for the lack of reversion to ads since I haven't done anything else except the steps I outlined in the post and the data base tweaks explained above. My kindle has been running for 5 days now without ads and with the startup wallpaper.
earlgrey_44 said:
First link in this post:
http://forum.xda-developers.com/showpost.php?p=53451623&postcount=3
I assume the block update action from the rootkit is responsible for the lack of reversion to ads since I haven't done anything else except the steps I outlined in the post and the data base tweaks explained above. My kindle has been running for 5 days now without ads and with the startup wallpaper.
Click to expand...
Click to collapse
I also blocked updates with the root kit. Then I followed this tutorial and it worked great however it did revert back to adds after a reboot or 2.
conan1600 said:
I also blocked updates with the root kit. Then I followed this tutorial and it worked great however it did revert back to adds after a reboot or 2.
Click to expand...
Click to collapse
Strange! What's different about my install I wonder?
earlgrey_44 said:
Strange! What's different about my install I wonder?
Click to expand...
Click to collapse
I'm left scratching my head over that as well. Tomorrow I will re run the ota block script as I'm now concerned that it perhaps did not do something correctly. I did check for updates and it says last update failed but better safe than sorry. I DO NOT want to end up getting updated again. I finally have this tablet running rather nicely and am quite satisfied with most aspects. Still need much more customization options but it's serviceable now. And this tablet has always had the best touch input response of any I've ever used. I'd hate to have to throw it back in the closet.
I am getting now BLACK SCREENS. Any way to change this?
Script
For anyone who wants to run this from command line (e.g. on reboot or network change event) you can create a script like below and use SManager to run it periodically. You will first need to install sqlite3 binary (google "SQLite Installer for Root").
Here is the script that needs to be executed as root:
Code:
#!/system/bin/sh
sqlite3 -batch /data/data/com.android.providers.settings/databases/settings.db "update global SET value='0' where name='IS_DTCP_ENABLED'";
sqlite3 -batch /data/data/com.android.providers.settings/databases/settings.db "update secure SET value='0' where name='IS_DTCP_ENABLED'";

[DEV][WIP]Permanently change wireless MAC address

Heya guys;
Alpha Terminal script attached (randomizes mac) Reboot after you run it as root
I've been working on changing the mac address for a bit, and as of 30 minutes ago, I seemed to have successfully accomplished it.
Survives reboot
Accepts any OUI
Completes 4-way WPA handshake
However, while I have been successful on my phone, I don't have another device to confirm repeatability.
For the brave souls who wish to try, please note that this is a -permanent- change. Your original MAC is not copied somewhere automatically, so don't blame me for not remembering your original MAC, or if you get eaten by the dragons that may lie ahead.
For this test, I'm going to start with the basics of what I did. As I get feedback, I'll respond with questions and hopefully narrow down potential system variability. I was running these commands as root, though.
Open your terminal emulator of choice and follow along (replace the ×''s with the mac of your choosing
Code:
netcfg wlan0 hwaddr ××:××:××:××:××:××
Enjoy your new permanent mac. (Could it be this simple?)
confirm the change
Code:
ip link show wlan0
Make the change permanent
Code:
echo "××:××:××:××:××:××" > /efs/wifi/.mac.info
Reboot, then check to see if the MAC took
Code:
ip link show wlan0
Try connecting to an AP with WPA on, and report back.
Very interesting, could you put this all into an app? So perhaps Mac addresses could be spoofed? A GUI would make things a lot easier. I'll try this out later on my oneplus one. [emoji3]
-Sent from my BR0K3N ON3.
[DEV][WIP]Permanently change wireless MAC address (WORKS!)
evilpotatoman said:
Heya guys;
Alpha Terminal script attached (randomizes mac) Reboot after you run it as root
<< snip >>
Try connecting to an AP with WPA on, and report back.
Click to expand...
Click to collapse
Works on Samsung Centura SCH-S738C running Ice Cream Sandwich ( 4.0.4 ), and rooted with stock
ROM. Verified after reboot! The phone reconnected immediately to wifi network.
Also works on Samsung Tab 3 SM-T217S running KitKat ( 4.4.2 ), and rooted with stock ROM. Verified after reboot! The phone reconnected immediately to wifi network.
I skipped the commands, and simply edited both the ' .mac.info ' and ' .mac.cob ' (backup?) files (after backing up both!).
So simple. Works where MacChanger failed. May I tell you that I love you?
forid200 said:
Very interesting, could you put this all into an app? So perhaps Mac addresses could be spoofed? A GUI would make things a lot easier. I'll try this out later on my oneplus one. [emoji3]
-Sent from my BR0K3N ON3.
Click to expand...
Click to collapse
Yepper, spoofing works, but since that may an indication of nefariousness , the script doesn't spoof the oui, just mods the last 3 octets. Interested modders may mod my script as they see fit
evilpotatoman said:
Yepper, spoofing works, but since that may an indication of nefariousness , the script doesn't spoof the oui, just mods the last 3 octets. Interested modders may mod my script as they see fit
Click to expand...
Click to collapse
Privacy is hardly nefarious.
"This Android app turns off Wi-Fi tracking without turning off Wi-Fi"
"'Retailers, crooks, the government, and others shady individuals are tracking your movements. Even when your Wi-Fi is turned off, your phone may be broadcasting information to whomever is in range which can be used both to track repeated visits to as well as your exact movements in an area under surveillance,' Chainfire wrote on Google+."
100% agree with CFs implementation, which is why my script (rudely) emulates it. The nefarious acts I hinted at consist of things like manually setting your MAC to aide in the hacking of APs with MAC authentication. I'm sure you can agree with that being an invasion of privacy.
evilpotatoman said:
100% agree with CFs implementation, which is why my script (rudely) emulates it. The nefarious acts I hinted at consist of things like manually setting your MAC to aide in the hacking of APs with MAC authentication. I'm sure you can agree with that being an invasion of privacy.
Click to expand...
Click to collapse
Agreed. Though, I believe the good of personal privacy outweighs the potential evils.
evilpotatoman said:
Yepper, spoofing works, but since that may an indication of nefariousness , the script doesn't spoof the oui, just mods the last 3 octets. Interested modders may mod my script as they see fit
Click to expand...
Click to collapse
It's handy in a lot of cases, but the tools to do something shouldn't be restricted in my opinion. About the spoofing a particular MAC, there's many legitimate reasons why you may wanna do this too. So flagging it off as just for malicious usage is sort of invalid. For example, if you go to a mall, and they have free Wi-Fi, however they require you to create an account and login, via this they will log your usage and collect data. For privacy reasons, you may wanna spoof MACs. Or if you go to a hotel and want to setup your chromecast but it has a login landing page, you're stuck. Unless you can spoof the MAC with your phone.
-Sent from my BR0K3N ON3.
HoytK said:
I skipped the commands, and simply edited both the ' .mac.info ' and ' .mac.cob ' (backup?) files (after backing up both!).
Click to expand...
Click to collapse
It may be that the time stamp on the '.mac.info' file must be earlier than the time stamp on the '.mac.cob' file. Can anyone confirm this?
Can anyone make a script to reverse what Pry-Fi did to my device, so that it stops rebooting randomly.
I will happily pay for your time. I just cannot believe this and Pry-Fi are there only viable options? Surely someone can build a script to run via terminal to fix issues?
Let me know if you are action donations?
I would be forever in your debt!

Categories

Resources