Easy Ad-Blocking - EVO 4G General

First a special thanks to kushdeck for the updated signed hosts
I know many people want to support the devs, if you do then don't apply this little trick.
Many ads are ill placed on videos or other free apps, by following the instructions below, it will eliminate those annoying ads.
Tested on android 2.2 (Phone must be rooted!!!!)
1. Download signed-hosts file below.
2. Place file on root of SD card
3. Reboot into recovery
4. select option to install zip from sdcard
5. Select choose zip from sdcard
6. Find and highlight Signed-hosts.zip
7. install and reboot.
8. Once phone has rebooted go to your favorite app that has ads and enjoy.

Even easier: Download AdFree from the Market.

Just removed ad-free and installed this host file.
EDIT: Seems to be working fine. Good post, thanks.

Will that block ads for the internet to or just apps

internet and apps

Is Ad-free supposed to block app ads as well or is it just less efficient in doing so?
I've noticed Ad-free does fine blocking internet ads, but it's not as great for app adds.
Basically, is this a better alternative to using Ad-free?

I never liked Ad blocking from Apps.

Will this work on 2.1? Has anyone tested it on 2.1?

Android 17 said:
Is Ad-free supposed to block app ads as well or is it just less efficient in doing so?
I've noticed Ad-free does fine blocking internet ads, but it's not as great for app adds.
Basically, is this a better alternative to using Ad-free?
Click to expand...
Click to collapse
AdFree does the exact same thing. It downloads a host file and replaces your current one.
MSmith1 said:
Will this work on 2.1? Has anyone tested it on 2.1?
Click to expand...
Click to collapse
It should, but so does AdFree.

Does ad-free not work on froyo or is it just not available in the ap store for it?
Sent from my PC36100 using XDA App

SharkUW said:
Does ad-free not work on froyo or is it just not available in the ap store for it?
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
Not only is it in the Market, but it works flawlessly. Search for "AdFree Android."

Neat trick! Before the days of firefox and adblock (plus) for firefox, we used to do the same thing in windows!
Is there a more recent hosts file available than 7/31/2010?

gpz1100 said:
Neat trick! Before the days of firefox and adblock (plus) for firefox, we used to do the same thing in windows!
Is there a more recent hosts file available than 7/31/2010?
Click to expand...
Click to collapse
This is why you should just use Ad Free, lol. It will constantly keep the hosts file up to date. THIS fix is simply a one time manual way to do it, and of course is not self updating lol.

Agreed, but as part of the learning process, I try to do simple things like this manually.
From several threads on here, I compiled enough information to generate a simple dos batch file which makes use of adb. Should be run from a command prompt containing the adb executable.
It's operation is very simple, permit writing to the /system, renames existing hosts to hosts.bak, downloads new one, then change /system permissions to read only.
I called the file hosts.bat
Code:
@echo off
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
adb shell mv /system/etc/hosts /system/etc/hosts.bak
adb shell wget http://209.68.48.119/winhelp2002/hosts.txt -O /system/etc/hosts
adb shell mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
Edit: the ip address above is just the resolved numeric equivalent of http://www.mvps.org/

Adfree is great but I have had problems with adfree and 4g. When I have adfree enabled and I try to browse webpages on a 4g connection, most pages won't load properly it will just hand there for a long time and then load the page.... when I disable adfree web browsing on 4g is fine....

DarkManX4lf , I thought adfree was just a front end for something similar to my post above (#14)?
I realize it's a bit more complicated with update checking, but is it doing anything more than that?

Reference post #14 above.
I believe on the evo's with the 3.7 software, the file system should be
/dev/block/mtdblock4, not /dev/block/mtdblock3 .
However, even with this change, something isn't right after changing the hosts file. I get identical results replacing the file in recovery mode vs fully booted.
Epst, debug no longer works (##data#, or ##debug# from the phone screen). It shows loading, but never comes up.
I don't think see how copying the file over can break something. I suspect something else needs to be done to the file system to prevent these functions from breaking. They work properly with adfree, so it must be doing more than the above lines do.
Thoughts?

DarkManX4lf said:
Adfree is great but I have had problems with adfree and 4g. When I have adfree enabled and I try to browse webpages on a 4g connection, most pages won't load properly it will just hand there for a long time and then load the page.... when I disable adfree web browsing on 4g is fine....
Click to expand...
Click to collapse
Same situation here.

Can you provide some specific sites you're having issues with?
I tried 4g here with adfree and didn't run into issues with any of the sites I tried, including several banking ssl sites.

Me too i have issues with adblocking and this mod when i use 4G. Pages do not load fully or correctly. Literally any site.
evo 3.70
running fresh 3.5.0.1

Related

Tested cifs.ko and nls_utf8.ko (from factory kernel)

Just for interested people, I have compiled cifs.ko and nls_utf8.ko from US version SGHI897 kernel (from samsung opensource website). This package has been tested under JF6, (out-of-box settings, but rooted). Key notes:
0. mount with -o iocharset=utf8, -t cifs
1. use "busybox" to do "mv or cp or mount or umount"
2. use direct "#" prompt to do "insmod"
3. better use GScript after you have tested these ko's
hiway123 said:
Just for interested people, I have compiled cifs.ko and nls_utf8.ko from US version SGHI897 kernel (from samsung opensource website). This package has been tested under JF6, (out-of-box settings, but rooted). Key notes:
0. mount with -o iocharset=utf8, -t cifs
1. use "busybox" to do "mv or cp or mount or umount"
2. use direct "#" prompt to do "insmod"
3. better use GScript after you have tested these ko's
Click to expand...
Click to collapse
I have absolutely no idea what you are talking about, other than it means someone's gonna come up with SOMETHING new to play with here....... =)
techmik67 said:
I have absolutely no idea what you are talking about, other than it means someone's gonna come up with SOMETHING new to play with here....... =)
Click to expand...
Click to collapse
coz, from searching the forum, there is no cifs and utf8 support for captivate. The first is used when using captivate to mount remote windows share folders. In other words, you can use rockplayer on captivate to browser media files on windows desktop. For some reasons, there could be encoding problem to view these media files' names, such as asian characters. Then the second one is needed.
hiway123 said:
coz, from searching the forum, there is no cifs and utf8 support for captivate. The first is used when using captivate to mount remote windows share folders. In other words, you can use rockplayer on captivate to browser media files on windows desktop. For some reasons, there could be encoding problem to view these media files, such as asian characters. Then the second one is needed.
Click to expand...
Click to collapse
I can definitely see why UTF8 is important, though I have no idea what to do with these files to be honest. also, linux-based system that doesn't support UTF8, really?
Kaik541 said:
I can definitely see why UTF8 is important, though I have no idea what to do with these files to be honest. also, linux-based system that doesn't support UTF8, really?
Click to expand...
Click to collapse
Don't quite understand your meaning, sorry. But anyway, just for interested people...
the module works great thanks for your effort.
network pimp... android novice.
hiway123, i pulled down your make of cifs.ko; loaded it in a network folder on my ext sdcard, but am not sure what to do now. (insmod, etc)
I attempted a few mount commands, and a few other linux norm paths, but I think I am lost here. Can you give a 1, 2, step of how to run the mount command? your post was rather cryptic. (i know i know, for the interested only! well definitely interested...)
*Note* I downloaded this nifty app: CIFSmanager app from the market, and it is open enough that it allows for the user to direct path for the cifs module (insmod path) to the file you compiled (again which is now on my sdcard) it seemed to be happy with it, but gave me some other error I believe had something to do with it not being root. (phone is rooted, have several apps with root level access... however haven't yet figured out how to run certain individual apps as root, that don't automatically try to obtain root access. blah blah blah, another project.)
anyhoot - i would love to be able to mount a vfs on this bird! had the captivate for about a month and love'n it! I got tons of media I'd like to stream over the network and found a few nice apps (ARCmedia / rocket, etc.) that i tested (direct copy to sd) and played my .flv files just fine! :-D
now all i need to do it trick the system into thinking my network paths are mounted resources. (Everything else works well, I can access network shares, view pictures, docs, standard video that the default video player can play fine.) So next step is to learn what YOU know.
sorry for the long post! - th x
tucxforever said:
hiway123, i pulled down your make of cifs.ko; loaded it in a network folder on my ext sdcard, but am not sure what to do now. (insmod, etc)
I attempted a few mount commands, and a few other linux norm paths, but I think I am lost here. Can you give a 1, 2, step of how to run the mount command? your post was rather cryptic. (i know i know, for the interested only! well definitely interested...)
*Note* I downloaded this nifty app: CIFSmanager app from the market, and it is open enough that it allows for the user to direct path for the cifs module (insmod path) to the file you compiled (again which is now on my sdcard) it seemed to be happy with it, but gave me some other error I believe had something to do with it not being root. (phone is rooted, have several apps with root level access... however haven't yet figured out how to run certain individual apps as root, that don't automatically try to obtain root access. blah blah blah, another project.)
anyhoot - i would love to be able to mount a vfs on this bird! had the captivate for about a month and love'n it! I got tons of media I'd like to stream over the network and found a few nice apps (ARCmedia / rocket, etc.) that i tested (direct copy to sd) and played my .flv files just fine! :-D
now all i need to do it trick the system into thinking my network paths are mounted resources. (Everything else works well, I can access network shares, view pictures, docs, standard video that the default video player can play fine.) So next step is to learn what YOU know.
sorry for the long post! - th x
Click to expand...
Click to collapse
I have a samba server in LAN, say at 192.168.1.1. So, I do these steps:
1. unzip my package to your computer, there are two ko files. Then use USB cable to transfer these two files to your phone in /sdcard folder.
2. on the phone, I used "terminal emulator", run "su" into root mode, make new folders like "busybox mkdir /system/lib/modules", you may try other directory name, I don't think that does a matter. Move the two ko files from /sdcard to this newly created folder, remember to use "busybox mv" command.
3. create a mount point on your phone, "mkdir /sdcard/smb" for example. or "busybox mkdir" I cannot remember.
4. insert modules, using "insmod /system/lib/modules/cifs.ko" and "insmod /system/lib/modules/nls_utf8.ko", remember these commands must be run everytime after you reboot your phone, so I use Gscript to create a shortcut, it's very convenient.
5. mount server's samba share folder in the phone, using "busybox mount -t cifs //192.168.1.1/your_share_folder /sdcard/smb -v -o user=yourusername,pass=yourpasswd,iocharset=utf8".
6. now, you can use rockplayer to browse into /sdcard/smb on your phone to view what is shared.
7. It is better to umount your folder once you finish transferring files. Then simply do "busybox umount /sdcard/smb".
Actually, only commands 5-7 are needed after your first attempt. Of course, if you have not done step 4 after a reboot, you need to do that step as well. I use Gscript in market to create shortcuts to these 4-7 commands. That's more convenient instead of typing on such small screen.
Have you tried this with any of the Custom ROMs in this section? If so, which ones work? Can you tell me how to compile a CIFS.KO?
Can it be compiled against the ROMs supplied here?
Thanks in advance,
Freaking brilliant, was exactly what I was looking for...thanks OP!
*edit*
Should mention, I used the posted .KO with stock rogers rom (i896) and it seems to be working flawlessly from my testing so far. I've even been able to stream some lower bitrate HD video and have it run smoothly and consistantly
insmod: init_module '/system/lib/modules/cifs.ko' failed (Exec format error)
something wrong?
i use SetiroN's kernel... and I9000 Froyo - maybe that is the reason?
Id assume that the kernel you are using isn't compatible and the module will have to be compiled for it.
Sent from my SAMSUNG-SGH-I896
love the rom just wish had few diff tweaks

God Mode? (solved)

How can I activate God Mode on a rooted XOOM? I want to nullify some stock apps, but Root Explorer is saying they are read only.
Thanks.
[edit] Changed the thread question.
LOL. I didn't know we were playing Quake.
What do you mean by god mode. You already have root. That's all you should need.
Sent from my Nexus One using XDA App
lol.
That might not be the correct term, and it may require a custom rom. Not sure, but on Project Elite for the OG Droid, there's an option under General>System called God Mode that gives you full access to files on the system. That may just be what Actngrezy calls it in PE.
I just want to rename some of the apps that were included on the XOOM. Specifically, I want to nullify the Quick Office apk so I can install the NI Adam version. When I navigate to the apk in Root Explorer, I get an error telling me it's a read only file. I never got that error with the Droid. I can change whatever I want to on that device.
Did you click on mount r/w in root explorer
arrtoodeetoo said:
How can I activate God Mode on a rooted XOOM? I want to nullify some stock apps, but Root Explorer is saying they are read only.
Thanks.
Click to expand...
Click to collapse
Did you install superuser? if so make sure you have allowed root explorer in it. Then on the top left hand side in root explorer hit mount r/w
arrtoodeetoo said:
lol.
That might not be the correct term, and it may require a custom rom. Not sure, but on Project Elite for the OG Droid, there's an option under General>System called God Mode that gives you full access to files on the system. That may just be what Actngrezy calls it in PE.
I just want to rename some of the apps that were included on the XOOM. Specifically, I want to nullify the Quick Office apk so I can install the NI Adam version. When I navigate to the apk in Root Explorer, I get an error telling me it's a read only file. I never got that error with the Droid. I can change whatever I want to on that device.
Click to expand...
Click to collapse
Im just visiting the forum to steal a few files to compare with atrix , how ever if i read your cleverly phrased question correctly and you are trying to remove/freeze some apps that came on the Xoom and you are getting read only error its because to modify anything in the /system dir you need to
1. back up anything you might remove via adb pull or via adb shell cp
2. adb shell
3.su
4. mount -o rw,remount (what ever the path to zoom block is i dont know cause i dont have one ) exp /dev/block/mmcblk0p12 /system
from there you can remove what ever you want out of system dir
5. exp. rm /system/app/quickoffice.apk
Thanks! I never noticed that button before. lol.
you can also get a system uninstaller in the market that will do it for you just the same, I usually use that in case there is more included than just the apk file
PaulG1488 said:
Did you click on mount r/w in root explorer
Click to expand...
Click to collapse
x 2
Sent from my Xoom using XDA Premium App
I thought about the uninstaller thing, but I'd rather not uninstall anything that came on the XOOM just in case. I just add an extra .null at the end of the apk (and associated files, which are easy to find) in case I need to restore them.
For instance, the NI Quick Office app force closes when you just breathe on the freaking tablet, so I had to restore the default one.

[Q] No video chat support in Android 2.3.4

I have installed the new Samsung 2.3.4 rom on my Samsung Galaxy S, but there doesn't seem to be any video chat support in Google Talk.
Can anybody confirm that? Do I need maybe to enable some option somewhere in the settings?
you have to install gtalk 1.3, there are some links over XDA, or use the one in the Rom Kitchen
Anyone tried the gtalk audio? How is it compared to tango, viber or skype?
duffymm said:
you have to install gtalk 1.3, there are some links over XDA, or use the one in the Rom Kitchen
Click to expand...
Click to collapse
Ok, I have downloaded it, uninstalled the old Talk and started the procedure to install the new one. When I reach the point where I need to move libtalk_jni.so into /system/lib/ it tells me:
Code:
# mv /sdcard/libtalk_jni.so /system/lib/
mv: write error: No space left on device
df produces the following output:
Code:
# df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 168512 32 168480 0% /dev
tmpfs 168512 0 168512 0% /mnt/asec
tmpfs 168512 0 168512 0% /mnt/obb
/dev/block/stl9 282432 282432 0 100% /system
/dev/block/stl3 6064 5134 930 85% /efs
/dev/block/mmcblk0p2 1963952 244672 1719280 12% /data
/dev/block/stl10 130280 17372 112908 13% /dbdata
/dev/block/stl11 30792 1940 28852 6% /cache
df: /mnt/.lfs: Function not implemented
/dev/block/vold/179:1
5913120 2423584 3489536 41% /mnt/sdcard
If you're out of space on /system you'll have to delete some bloat. Aldiko, Layer, Flipfonts, etc are all decent candidates.
Save yourself time and search he market for "1.3 installer"
Does it for you. choose the top option. Fixed!
Make sure you enable video chat in the app after installing it (click your display pick then tick enable video/audio chat). Log out and in. Done. Works both ways too happy days.
Sent from my GT-I9000 using XDA App
1.3 installer is great - so simple to use.......... but cannot complete the process because of lack of space for me too probably....
yetep said:
Save yourself time and search he market for "1.3 installer"
Does it for you. choose the top option. Fixed!
Click to expand...
Click to collapse
Thanks a lot! I have installed the app and chose the option "RECOMMENDED - Latest xiliad's n...". I pressed install and passed the following steps:
Code:
Initialising http download...
Downloading...
Unziping download...
Mounting/system...
Copying files...
Talk 1.3 has been been granted superuser etc...
but in the end I get the following error:
Code:
ERROR!! Could not copy the Talk.apk!
Could it be because I had previously uninstalled Talk?
sargorn said:
If you're out of space on /system you'll have to delete some bloat. Aldiko, Layer, Flipfonts, etc are all decent candidates.
Click to expand...
Click to collapse
Thanks! Can you tell me where I can find instructions on how to do that?
Absolutely could be the fact talk was deleted cause what it does is action a replace rather than just a copy to the folder. Nothing to replace will give you that error. Just copy this attached apk to system/app and then try again
Sent from my GT-I9000 using XDA App
ah damn forgot to attach and then realised I can't on the xda app lol will do on my computer in 10 min aalong with a how-to
Sent from my GT-I9000 using XDA App
Righty,
Download "1.3 Installer" from the market.
Install. Ensure you have both Superuser & Busybox (root goes without saying, if you don't know how to do that then don't read any further and go find out!)
Before trying use the installer, make sure you actually have Talk installed on your phone. If you don't, use any talk.apk or flashable .zip to get it on (search gapps.zip on google).
Now, if you have enough space (5-10mb in /system/app recommended), continue. If you don't, use Root explorer to navigate to system/app and delete any .apk you don't use. As said before in this very same thread, Aldiko and various other ones are popular. I don't use swype, so that's gone. Once you've got 5-10mb free minimum, continue.
Use the installer and select the top option. It'll download, install and so on so forth. Restart your phone.
Go to Talk and click your display picture. Tick the box that says "Allow video and voice chats". Restart your phone (or simply log out of Talk, kill the process then log back in!).
DONE. Orientation is a bit wierd (video might only send if, for example, your phone is sideways) but it does work very well and uses the Front Camera).
Hit thanks, eh?
Managed to get it installed after using nitrality to remove some apps I don't use that were preinstalled.
So is it normal for this to delete all my accounts? I have to go back in and put it all my accounts again. Minor issue.
eightace said:
Managed to get it installed after using nitrality to remove some apps I don't use that were preinstalled.
Click to expand...
Click to collapse
Which apps did you remove? I tried using Nitrality to remove/uninstall Aldiko, completed the operation but Aldiko is still there.
yetep said:
Install. Ensure you have both Superuser & Busybox (root goes without saying, if you don't know how to do that then don't read any further and go find out!)
Before trying use the installer, make sure you actually have Talk installed on your phone. If you don't, use any talk.apk or flashable .zip to get it on (search gapps.zip on google).
Now, if you have enough space (5-10mb in /system/app recommended), continue. If you don't, use Root explorer to navigate to system/app and delete any .apk you don't use. As said before in this very same thread, Aldiko and various other ones are popular. I don't use swype, so that's gone. Once you've got 5-10mb free minimum, continue.
Click to expand...
Click to collapse
To gain root access I used CF-Root v3.7, didn't need to install superuser nor busybox (maybe I had them installed with CF-Root).
About the error I got earlier with Talk it was because there was a Talk.apk file in /system/app/ of 0.0KB, not because there wasn't any Talk.apk to replace.
I used "Super Manager", enabled root function in the options and deleted that 0.0KB Talk.apk. Then I deleted the Aldiko apk to free some space, that was enough to let me install the new Talk using "1.3 Installer".
Talk didn't work right away, it asked to be "force closed". I rebooted the phone then it worked. It asked me my Google account username and password.
Video call doesn't seem to work. I tried to video call a friend at a computer: the screen becomes black for a few seconds then it goes back to Talk.
it is working for me but with the back cam.. never used front cam with jvp maybe it doesnt work but how do you fix it please?
thanks
le baron
I reformatted, rooted, removed Aldiko and Layar, installed "1.3 Installer" and now it works like a charm with front cam and back cam!!!
Thank you all guys :-D
le baron said:
it is working for me but with the back cam.. never used front cam with jvp maybe it doesnt work but how do you fix it please?
Click to expand...
Click to collapse
After you start a video conversation tap in the upper left corner of the screen: there will see a button to switch from one camera to the other.
I am able to start a video chat with people at a computer and they are able to start one with me, but I could not start a video chat with another Android phone (same brand, model, Android version and Talk 1.3 installed). The problem is that we don't know how to initiate the video conversation as we both don't see the cam icon on the other's contact.
Have anyone succeeded in doing that?

[SCRIPT] Adblock Script and Updater

I put together a small shell script to make it easy for anyone rooted to block ads and check to see if they have the latest version I keep of adhosts. If after checking you do not have the latest, it will download it for you automatically.
What does this script do (in a nutshell):
1) Checks to see if you have the latest version of ad hosts for adblocking from me
2) If you do not have the latest, it will download it for you
3) If you have the latest, it just exits out, no changes
4) Installs the script to your /system/xbin directory so the next time you just have to type:
Code:
su
blockads
and it will run the script for you
How to run this?
Get this if you are using an AOSP ROM:
1) Download it from http://dl.dropbox.com/u/24904191/blockads
Try this if you are using a SENSE ROM (thanks chrootz for the fixes):
1) http://dl.dropbox.com/u/24904191/sense/blockads
*** If you have troubles getting the script to work, try updating your system to the latest version of busybox (stick it in /system/xbin and overwrite the current version of busybox, then change the permissions to 755 and owner and group to root) ***
2) Move it to /data/local/tmp (if you dont have it, create it) from a file explorer with root permissions (must set the system in r/w mode) or from the terminal shell
3) make sure the script has the right permissions by typing:
Code:
su
chmod 755 /data/local/tmp/blockads
in the terminal shell (in the emulator or whatever you use to get to it)
4) run the script by typing
Code:
/data/local/tmp/blockads
5) let it do its thing
After its done you can run it again anytime from the terminal by typing
Code:
su
blockads
as already mentioned.
I'm working on making it a GUI app next (with more features), but this should tie anyone who wants it over until then
Anyone who finds any adservers and wants me to add them to the list, feel free to list them here and I will add them.
Latest updates:
2011-12-01: Updated to block carrieriq
Tried this out and got this:
sh-3.2# su
sh-3.2# /data/local/tmp/blockads
Fetching host file via hostname
wget: bad address 'dl.dropbox.com'
update could not be completed, sorry
sh-3.2#
newter55 said:
Tried this out and got this:
sh-3.2# su
sh-3.2# /data/local/tmp/blockads
Fetching host file via hostname
wget: bad address 'dl.dropbox.com'
update could not be completed, sorry
sh-3.2#
Click to expand...
Click to collapse
I forgot some ROMs and such have a busybox version that doesn't work right with hostnames in wget. I'll see if I can work around that and update the script
EDIT: updated to work around by using the IP for those that their busybox wget does not work correctly with hostnames. Only issue with that is the IP may change.
Ok. I am stuck. I actually don't have a hosts file under "etc", only a hosts.bak. With root explorer mounted as r/w I am still not able to rename the "host.bak" file to "hosts" - error message "read-only file/directory". I created a blank "hosts" text file, put in on the sdcard and with terminal emulator still can't cp to "etc" because of "read-only directory" error message. Any other suggestions?
GermanGuy said:
Ok. I am stuck. I actually don't have a hosts file under "etc", only a hosts.bak. With root explorer mounted as r/w I am still not able to rename the "host.bak" file to "hosts" - error message "read-only file/directory". I created a blank "hosts" text file, put in on the sdcard and with terminal emulator still can't cp to "etc" because of "read-only directory" error message. Any other suggestions?
Click to expand...
Click to collapse
Top right corner of Root Explorer .... Mount RW.
Sent from my A05PTH3ORY using XDA App
Does this do anything differently then AdFree, from the market?
yareally said:
I forgot some ROMs and such have a busybox version that doesn't work right with hostnames in wget. I'll see if I can work around that and update the script
EDIT: updated to work around by using the IP for those that their busybox wget does not work correctly with hostnames. Only issue with that is the IP may change.
Click to expand...
Click to collapse
Updated blockads script to test this am and:
sh-3.2$ export PATH=/data/local/bin:$PATH
sh-3.2$ su
sh-3.2# blockads
Fetching host file via hostname
wget: bad address 'dl.dropbox.com'
The busybox version of wget on your system does not work correctly with
hostnames. Trying workaround with latest known IP to the hostname...
Connecting to 184.73.229.87 (184.73.229.87:80)
hosts 100% |***********| 641k 00:00:00 ETA
backing up old host file and updating
failed on 'hosts' - Cross-device link
md5sum: can't open '/system/etc/hosts': No such file or directory
/system/xbin/blockads: line 38: [: 8172d35d1b72871f7e1ef4e709920f0e: unary operator expected
Unable to chmod /system/etc/hosts: No such file or directory
Unable to chmod /system/etc/hosts: No such file or directory
remounting filesystem in r/o mode...
Cleaning up files...
rm failed for -f, No such file or directory
update complete!
sh-3.2#
The end result is the existing hosts file being renamed hosts.bak and obviously no new hosts filebeing being created.
EDIT.... The above is testing on my inspire running busybox 1.19. Tried using the script on my sensation running bb 1.18.4 and it works fine.
Edit edit... Installed bb 1.18.4 on inspire and result is the same as posted above.
DroidTh3ory said:
Top right corner of Root Explorer .... Mount RW.
Sent from my A05PTH3ORY using XDA App
Click to expand...
Click to collapse
That's what I did, but it does not work - still does not let me modify read-only files.
After reading over the code and seeing the comments, I can only guess you had the modified version of wget on your device during testing, which does support host names. Before I continue, I am not trying to rain on your parade, but... By downloading the file, checking the md5, comparing it to the existing file, replacing if needed, and then cleaning up... you went about 5 steps beyond what just doing an "if server file is newer" check would do by including a custom wget. Even though you have to put in the code to install and verify the wget, the trade is that you no longer have to download the file every time, check it every time, and worry about making sure the md5 matches.
If you decide you want to switch over to that method, you can check out the option already included in http://forum.xda-developers.com/showthread.php?t=1092128 by downloading the live install version to view the actual script. Just a recommendation to optimize the process. Nice work, though, you definitely found a way to get the job done.
As for the difference between this and Adfree. There is no real difference. Adfree checks the server, does a callback, and prompts the user with updates. Adfree just requires an entire shell to turn it into an app, but will automatically run on boot.
twistedumbrella said:
As for the difference between this and Adfree. There is no real difference. Adfree checks the server, does a callback, and prompts the user with updates. Adfree just requires an entire shell to turn it into an app, but will automatically run on boot.
Click to expand...
Click to collapse
So, for those of you not comfortable running ADB, or Terminal Emulator, just install AdFree, and let it do everything for you.
spotmark said:
So, for those of you not comfortable running ADB, or Terminal Emulator, just install AdFree, and let it do everything for you.
Click to expand...
Click to collapse
Well, you also have the option of most included ROM toolkits, ScriptFusion, and a lot of preinstalled adblock scripts, but the big difference is the hosts file itself. Sounds like this one is custom, whereas mine takes bamf and adfree and merges them. This one may end up blocking more ads, but the only way to know would be to sit down and compare them all.
Sent from my ADR6400L using Tapatalk
twistedumbrella said:
Well, you also have the option of most included ROM toolkits, ScriptFusion, and a lot of preinstalled adblock scripts, but the big difference is the hosts file itself. Sounds like this one is custom, whereas mine takes bamf and adfree and merges them. This one may end up blocking more ads, but the only way to know would be to sit down and compare them all.
Sent from my ADR6400L using Tapatalk
Click to expand...
Click to collapse
Ah, I see.
Thank you for your comments everyone . I'll refine the script a bit more and also deal with a permanent workaround for not having a wget that checks hostsnames by testing with a ping and getting the IP first, using that and then doing wget. This started as a way for me to deal with having to move my ad host file each time I update it on my phone to just giving it out to everyone.
The only other difference than what was mentioned between my script and adfree as far as I know is I include a wider range of adhosts according to those that have used both. I have never used adfree, but people that have said I blocked more ads than they do and I also use an invalid IP address to block (0.0.0.0) instead of the loopback address (127.0.0.1) so it kills them a bit faster.
If anyone is still having problems that weren't resolved with it from above, let me know as well. I tested it against busybox 1.16.2 on my own phone, but it seems no 2 busybox version are alike
I havent tried this, but this one does include busybox 1.19 for those that don't want to manually install it. https://market.android.com/details?id=com.jrummy.busybox.installer&feature=related_apps
yareally said:
Thank you for your comments everyone . I'll refine the script a bit more and also deal with a permanent workaround for not having a wget that checks hostsnames by testing with a ping and getting the IP first, using that and then doing wget. This started as a way for me to deal with having to move my ad host file each time I update it on my phone to just giving it out to everyone.
The only other difference than what was mentioned between my script and adfree as far as I know is I include a wider range of adhosts according to those that have used both. I have never used adfree, but people that have said I blocked more ads than they do and I also use an invalid IP address to block (0.0.0.0) instead of the loopback address (127.0.0.1) so it kills them a bit faster.
If anyone is still having problems that weren't resolved with it from above, let me know as well. I tested it against busybox 1.16.2 on my own phone, but it seems no 2 busybox version are alike
I havent tried this, but this one does include busybox 1.19 for those that don't want to manually install it. https://market.android.com/details?id=com.jrummy.busybox.installer&feature=related_apps
Click to expand...
Click to collapse
Hit me up if I can be any help. It's good to have a better list available. Adfree has never been very thorough.
Sent from my ADR6400L using Tapatalk
+1 I exam yareally's hosts, This is much faster killing them and I glad you finally developing the script update for the hosts. I am going test your script update on 2 of the roms A05PTH3ORY and Gengeritis 3D VII. Thanks - Keep it up
yareally said:
The only other difference than what was mentioned between my script and adfree as far as I know is I include a wider range of adhosts according to those that have used both. I have never used adfree, but people that have said I blocked more ads than they do and I also use an invalid IP address to block (0.0.0.0) instead of the loopback address (127.0.0.1) so it kills them a bit faster.
Click to expand...
Click to collapse
Added about 10-15 more hosts today.
Thanks for the script. I'm going to give it a shot in a little bit. AdFree hasn't worked right in months. I've been using Absolute System to block ads, but I think I'll give this a try. Thanks again.
I'm about 50% done working on a basic gui app to do what the script does + some other features, just to give an update. GUI app will be free to any xda members of course
Things I am putting into it:
Choice between no blocking, partial blocking (basically in browser only stuff in case you want to show developers some love by not blocking their application ads), and full blocking.
Updating like the script does with just a touch of a button.
Optional ability to download a host block list for your desktop pc.
*features that may come later*
-ability to send me hosts from the app to add to the block list
-ability to add your own hosts on the fly to the list (either for personal routing or for adblocking, since adblocking is only the secondary use of the hosts file). Unfortunately, you will have to figure out the hosts yourself, since there's no easy way to tell really automatically.
Any other suggestions are welcomed
yareally said:
I'm about 50% done working on a basic gui app to do what the script does + some other features, just to give an update. GUI app will be free to any xda members of course
Things I am putting into it:
Choice between no blocking, partial blocking (basically in browser only stuff in case you want to show developers some love by not blocking their application ads), and full blocking.
Updating like the script does with just a touch of a button.
Optional ability to download a host block list for your desktop pc.
*features that may come later*
-ability to send me hosts from the app to add to the block list
-ability to add your own hosts on the fly to the list (either for personal routing or for adblocking, since adblocking is only the secondary use of the hosts file). Unfortunately, you will have to figure out the hosts yourself, since there's no easy way to tell really automatically.
Any other suggestions are welcomed
Click to expand...
Click to collapse
Sounds like AdFree but much better and will work better as well. Can't wait!!
Just tried this today on gingeritis 3d beta8 and it doesnt seem to work as i get the same error someone else posted a few posts back. Something about no such file or directory system/etc/hosts. I reverted adfree and uninstalled it and renamed the hosts file to hosts from hosts.bak but when I Su adblock it gets renamed to hosts.bak and terminal shows that same error

[SCRIPT] Debloat HTC 10

Although HTC 10 comes with less bloat than most other phones, it still has apps preinstalled that some of us probably will never use.
Some of those apps may even run at boot and consume RAM and CPU. For this purpose I made a small script that will remove those apps instead of doing it manually via ADB Shell.
This script is for Mac/OS X/macOS. I think it can also run on Linux but I'm not sure because I don't use Linux much.
For Windows, it can easily be ported to command line. If someone is willing to do it, PM me the script and I will add it to the repo.
Apps that the script removes:
Boost+
Google+ Sense Add-on
Instagram (placeholder app)
LinkedIn Sense Add-on
HTC Mail
Facebook (placeholder app)
Messenger (placeholder app)
News Republic
TouchPal Keyboard (SEE NOTE!)
Twitter Sense Add-on
Voice Recorder
Zoe
HTC Help
IceView Case support
HTC Speak
Transfer my stuff
Google Hangouts
Google Play Music
Basically what the script does:
Mount /system as RW
Delete above apps .apk and containing folder
Reboot after done.
DISCLAIMER: Although I don't see what could possibly go wrong by flashing this script, be sure to back up your ROM before flashing as I don't take any responsibility caused by this script. I have tested it on my HTC 10 and I didn't have any issues.
IMPORTANT NOTE: If you plan to remove TouchPal keyboard, make sure that you have an alternative already installed before or you won't be able to type any text. In case you're reading this after you already screwed up, download your prefered keyboards .apk file and install it via ADB. The script will stop before removing the keyboard and ask if you are sure you want to remove it.
How to:
Enable USB debugging
Connect your phone
Execute "adb shell" and then "su" and grant superuser access to adb shell
(OS X) make script executable (chmod a+x)
Run script
I am open for suggestions and merge requests, happy debloating
The script can be found HERE.
Hoping someone works on the windows version cause i suppose totally run this.
Thanks for sharing
Sent from my HTC 10 using XDA-Developers mobile app
All this can be manually removed simply by hitting uninstall with root access right? Not knocking the script, just asking honestly.
Sent from my SM-G900V using Tapatalk
Just double checking, but I take it that root is required?
Milano_II said:
All this can be manually removed simply by hitting uninstall with root access right? Not knocking the script, just asking honestly.
Sent from my SM-G900V using Tapatalk
Click to expand...
Click to collapse
Ive tried some apps for removal of system apps but it didn't work. And since I play around with ROMs reinstalling and uninstalling app by app takes just to much time.
Milamber said:
Just double checking, but I take it that root is required?
Click to expand...
Click to collapse
Yes, you need root because you need to remove apps from the read-only /system partition.
Got it. Thanks for the reply. I haven't had an htc phone since gingerbread and I mostly had Samsungs on Verizon so I never bothered rooting. I didn't get my 10 yet but I hope to root right away and get rid of things I think are bloat. Probably gonna need this script I guess we'll see. Thanks again!
Sent from my SM-G900V using Tapatalk
very nice, quick and easy one step to uninstall the stuff that is safe to, thank you!
razrlover said:
Hoping someone works on the windows version cause i suppose totally run this.
Thanks for sharing
Click to expand...
Click to collapse
if you like i can take a crack at it, simple batch script should work almost out of the box as long as you have adb set up
ibrokemypie said:
if you like i can take a crack at it, simple batch script should work almost out of the box as long as you have adb set up
Click to expand...
Click to collapse
will you make it for windows please?
@gillim74 @razrlover @dj_chapz
I have made a working copy for windows and added it to a fork of the gitlab repo here: https://github.com/ibrokemypie/htc_10_pme_debloat/blob/master/htc10_bloat_remover.cmd
I will maintain this as long as @dj_chapz does and will pull in any changes he makes.
I usually make changes after a firmware update if I notice any new bloat, but there shouldnt be much changes.
Also, this list is by personal preference, because some apps that I choose to leave others may want to remove or vice versa, so everyone should take the script as a base and edit to their likeing.
ibrokemypie said:
@gillim74 @razrlover @dj_chapz
I have made a working copy for windows and added it to a fork of the gitlab repo here: https://github.com/ibrokemypie/htc_10_pme_debloat/blob/master/htc10_bloat_remover.cmd
I will maintain this as long as @dj_chapz does and will pull in any changes he makes.
Click to expand...
Click to collapse
After running this (windows), and going into Settings > Apps, I get a Loading screen that never ends. Same thing in Titanium backup when it tries to build a db of the installed apps.
typhoonikan said:
After running this (windows), and going into Settings > Apps, I get a Loading screen that never ends. Same thing in Titanium backup when it tries to build a db of the installed apps.
Click to expand...
Click to collapse
which update are you running? still marshmallow or have you gone to nougat? custom rom? and have you tried restarting and perhaps clearing cache/dalvik?
Device or resource busy
Read-only file system
Read-only file system
tried it but all the apps had the above thing ^
nougat,
oh it did work o.o saw the apps for a second, thank you! could i just add the sense apks into the script and remove it the same way?
Dare I ask... why not make a shell script you run from the phone? I'll give it a shot. I wrote one that creates directories so I can use FolderSync to restore settings from the cloud.
Sent from my HTC6545LVW using XDA Labs
SovPanda said:
Device or resource busy
Read-only file system
Read-only file system
tried it but all the apps had the above thing ^
nougat,
oh it did work o.o saw the apps for a second, thank you! could i just add the sense apks into the script and remove it the same way?
Click to expand...
Click to collapse
Hi, did you use the Windows version? Thanks
spacecowboy618 said:
Hi, did you use the Windows version? Thanks
Click to expand...
Click to collapse
windows 10 <--
used the one he has listed to download in the original OP and works

Categories

Resources