Scripts in CM6

Discussion in 'Koush' started by h_10, Oct 21, 2010.

  1. h_10
    Offline

    h_10 Member

    Joined:
    Jun 9, 2010
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    I just installed CM6 on my Droid 1. Love everything about it. However I do want to turn on adblock but noticed that there is no script for it. After searching on the net I found the following link.

    Scripts? - CyanogenMod Forum

    I dloaded and installed the goodies_update.zip from the link from absolute zero's post about half way down the page. i updated it per recovery and i still can't run any scripts, especially blockads.

    can anyone help?

    thanks in advance. i'll hang up and listen.
  2. RafficaX
    Offline

    RafficaX Premium Member Premium Member Developer

    Joined:
    Aug 2, 2010
    Messages:
    605
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Goodies is made for jrummy's rom that is based on cyanogenmod but not the new release. Cyanogenmod does not have scripts and such. Can try adblock from the market. If its not under cyanogenmod in the settings menu then its not included.

    Sent from my Ultimate DROiD 1.0.0 using Tapatalk
  3. h_10
    Offline

    h_10 Member

    Joined:
    Jun 9, 2010
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    that's disappointing.

    i tried typing in terminal the below.


    su
    sh /sdcard/goodies/scripts/blockads

    it came back w/ about 3 lines of error messages but the last line said ads are now blocked.

    i rebooted but still see ads in the apps so i guess you're right, cm6 does not support scripts.

    oh well. this is my one complaint about this room. not critical but just an annoyance since it seems like all other rooms support scripts.
  4. Se7enLC
    Offline

    Se7enLC Active Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    36
    Ratings:
    +0
    You're better off just manually doing the things that the scripts would be doing. All the "adblock" script is doing is replacing the hosts file with one that maps a bunch of known ad providers to localhost (rendering them unreachable, so the ads don't show up)

    The adblock app in the market will do that for you, or you can manually copy a file into /system/etc/hosts. The scripts from that file will mostly NOT work, because they make a lot of assumptions about what is already present in the ROM, and those assumptions aren't true for CM.

    Here's an example of what you might do to install a new hosts file (I don't know where to find one offhand, however EDIT - try grabbing an adblocking hosts file out of another ROM)
    Code:
    su
    mount -o rw,remount /system
    cp /system/etc/hosts /sdcard/hosts.backup
    cp /sdcard/some_new_hosts_file_you_downloaded /system/etc/hosts
    mount -o ro,remount /system
    sync
    
    EDIT AGAIN: Just use "adfree" from the market. It's a free app that requires root, downloads a new host file and installs it. You can even uninstall the app afterwards, if you want and the hosts file will stay
    Last edited: Oct 21, 2010
Search tags for this page

ads cm6

,
cyanogenmod edit hosts file android ads
,
droid 2 how to turn adblock off