yashsingh1/xdaforums huggingface dataset:
[Nexus 7 General] pjhoody:
Glad I came across this post because I hadn't heard of Greenify before. My n7 is now virtually lag-free after installing that app. Thanks!
[Nexus 7 General] bftb0:
There might be more elegant solutions, but arguably the lightest-weight and fastest method is simply using a hosts file (rooted devices only, /system/etc/hosts) that black-holes many many ad-serving/tracking domains to the loopback address on your device [127.0.0.1]

e.g. http://winhelp2002.mvps.org/hosts.htm

lightweight because the only thing added to your tablet is a single file.

fastest because DNS lookups on those domains return instantaneously, and IP RST occurs nearly instantaneously when your browser goes looking for a http server at 127.0.0.1:80 - there are no network delays in looking up and connecting/RST to blackholed servers - and no additional traffic interception app/services running on your device and pilfering system resources.

You will find that there are all sorts of tricks employed by various media sites that effectively check to see that cookies associated with ad-publishing/tracking domains have been set, so YMMV with respect to any ad-block method.

good luck
[Nexus 7 General] Krooked22:
I'm not using any ad blocker right now because it makes the tablet virtually unusable with all the RAM consumption. Again Google Plus is also guilty of the same, taking up 40 megabytes of RAM and slowing down your tablet even though you are not using that app
[Nexus 7 General] Krooked22:
I'm glad that I could recommend that to you
[Nexus 7 General] Krooked22:
Our device only has 1 gig of ram 1 apps start taking up over 30 megabytes of RAM it definitely is a huge problem, not only that is completely unnecessary there's no reason that should be consuming that much
[Nexus 7 General] Krooked22:
When you think about it it's actually absurd, 78 megabytes of RAM just so that I don't see advertisements I'll just deal with the advertisements and have a smooth experience. The trade off is not good
[Nexus 7 General] GedBlake:
Yep... this is the method

AdAway

uses to block adverts...

QUOTE: (from AdAway) "An ad blocker that uses the hosts file. The hosts file contains a list of mappings between hostnames and IP addresses. When an app requests an ad, that request is directed to 127.0.0.1 which does nothing. There are options to run a web server to respond to blocked hostnames and to direct requests to the IP address of your choosing. You can download hosts files from the app but it is possible to use your own and to add certain sites to the white- and black-lists."

With AdaAway installed on my Nexus 7 (and my other rooted devices), it uses no system resources at all (CPU/RAM etc.) until I actively run it (which I do every couple of weeks or so) to see if there any new hosts files updates available... and even then it only uses around 21Mb of RAM. After a reboot (necessary for the hosts files update to take effect), AdaAway is exited, and it no longer appears in a list of running processes... until it's run again to check for further updates. However, it does require root.

Rgrds,

Ged.
[Nexus 7 General] khaytsus:
Um, ad blockers use zero ram unless you set them to stay active, such as to listen to local host. They copy a file and are done.
[Nexus 7 General] GedBlake:
Hi, khaytsus...

That's certainly true of AdAway... but AdBlock Plus (the one the OP is referring to) runs as a background service... and filters ads out by routing internet traffic through a proxy.

AdBlock Plus' chief attraction lies in it not requiring root... but having just installed AdBlock Plus on my Nexus 7, and then running System Panel (from Playstore), I can see it hogging around 80Mb of RAM.

Though it really shouldn't cause the lag problems as described by the OP... given that the Nexus 7 is equipped with a gigabyte of RAM... and that within that context, 80Mb is a miniscule RAM requirement.

I have Dolphin Browser (with Jetpack) installed on my Nexus 7... and that routinely occupies anywhere from between 170Mb to 300Mb of RAM. Significantly more than the 80Mb used by AdBlock Plus... and I have no discernible lag.

So maybe AdBlock Plus is causing problems elsewhere... running the CPU into the ground maybe? Although I suspect that routing traffic via a proxy may be the cause of the reported lag.

Anyway... it seems that AdBlock Plus is the least optimal way of blocking ads (by routing traffic through a proxy), and running a constant background service whilst it does so.

The best way of blocking ads (IMHO), is to root the device, and then install AdAway (which just modifies the /system/etc/hosts file when AdAway is run).

And even if you automate the process of AdAway checking for updates, it appears this only happens upon boot or daily. It runs a check to see if there are any new hosts files updates available... informs you if there are... and then exits. It doesn't hang around in the background, 'listening' for updates, consuming system resources whilst it does so.

Rgrds,

Ged.
[Nexus 7 General] khaytsus:
AdBlock Plus can run as a service. It does not need to. Perhaps the OP isn't rooted.. But it's still nonsense IMO.
[Nexus 7 General] Leonhan:
[MENTION=5049483]GedBlake[/MENTION]

Thanks for the informative posts man, you have enlightened me. :) I was completely unaware that adblock was running in the background. I used adaway and it seems that my browsing speeds seems to hasten up a little bit. ;)
[Nexus 7 General] andrew9292:
If you're rooted:

http://winhelp2002.mvps.org/hosts2.htm

1. Download and extract hosts file from that page.

2. If extracting from PC, transfer the file to the n7 via usb.

3. Use your fav root text editor and copy the contents of the hosts file to /etc/hosts

Note: You can exclude the introductory messages in the extracted host file n start from the 1st ip entry.

Reboot.

Tada...

Ram/proc/battery hit? Almost none!

If it doesnt work, let me know. Sometimes there is a problem on the formatting, i can fix it and upload a proper one for you to follow the steps again. Why? Android is more particular than windows or mac on the hosts file.good luck.

More info on hosts file, google or wikipedia
[Nexus 7 General] GedBlake:
Hi, andrew9292...

What you suggest will probably work... but it's like cutting the grass with a pair of scissors!:)... it's time consuming and labour intensive. And there are better tools available, more suited to the task.

AdAway

will do the job for you, with minimal effort. And also, the one link you provide may not be sufficient to provide full ad blocking capability.

AdAway compiles the /system/etc/hosts file from four sources. These are...

http://winhelp2002.mvps.org/hosts.txt

http://adaway.sufficientlysecure.org/hosts.txt

http://hosts-file.net/ad_servers.asp

http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext

As I've previously stated, AdAway consumes no system resources until the user chooses to run it... in order to update the /system/etc/hosts file. So there is no "Ram/proc/battery hit", as you put it... until AdAway is run.

This seems to me to be the far more easier option, than manually messing around with large text files, copying them into /system/etc and with the potential screwups and errors that might result.

AdAway is installed on all of my rooted devices, and I rarely give it a second thought.... until I remember that ad blocking needs updating ('cos I haven't run it for a few weeks), I then just run AdAway... it updates... and upon my next reboot, the update takes effect.

Result - no ads... no hit on battery/CPU/RAM... and no complicated messing around in /system/etc:cool:.

Rgrds,

Ged.
[Nexus 7 General] andrew9292:
Thats nice bro! n im aware of it...i agree its a great app, does a wonderful job! Jus providing a manual method if anyone prefers it.

Pros, just some extra experience for the nerdy. This is xda anyway :cool: Cons, like you stated possible fakaps, time consuming, inadequate etc. Cheers :highfive:
[Nexus 7 General] biggerguy_sf:
THANK YOU!

OMG, thanks much for your post. I uninstalled adblock and installed Greenify, and it's like I finally have my N7 back again. I was close to junking it out of frustration but will keep it for a little longer now...
[Nexus 7 General] khaytsus:
Awwww, if you'd waited a month it would have been a full year since the last post in this DEAD thread.
[Nexus 7 General] cpvm:
I modified host file and no problems so far...
[Android Software/Hacking General [Developers Only]] codexc:
​

Framework Base

108375411c6b714635e7f17eeda75cc17857323d

f96fd1afff2e5189c0bf1e5c5c25ed9be6908061

568a433716cfc4a5080df3fd730cb438ab139b3d new

Settings

60f2ef537af3b7fe7c7557f61029e9a03b3a2105

95f2a541d59c988c82cf14655a3be6578802442a

Features included

Original :

Instantly turns the device screen on and displays notifications as they arrive

Up to 8 notifications displayed in a horizontal strip that can be viewed by touching the notification icon

Short notification description can be displayed around the outside of the center ring

Touch the center ring notification to view the full notification

Unlock the device, open the app for the current notification or dismiss the current notification

Set a re-display time to have active display remind you of your pending notifications

Adjustable brightness level for when active display turns the screen on

Pocket mode which allows active display to turn on once you remove the device from your pocket or bag

New all in one :

Display Time out

Turn Off Display

Threshold to proximity

maybe more ...

Fixes included :

FULL ActiveDisplay Fixes/Options

[I]Active display [squashed] (1/2) [/I]

ActiveDisplay: fix for disappearing notification bar
0c7588324f Browse code
maxwen authored

Active Display: Fix Derp
c6031125d0 Browse code
Der-Schubi authored

Active Display: Sort notifications by newest to oldest …
7674882824 Browse code
0xD34D authored

Active Display: Add some synchronization …
b3b33db6a6 Browse code
0xD34D authored

Omni: [1/2] Base: Fix pimp up ActiveDisplay …
434928a07e Browse code
micku7zu authored

pac : [1/2] Base: Pimp up ActiveDisplay …
b9e91f7a88 Browse code
Der-Schubi authored

Active display: Ability to turn off the screen, when a not clearable …
d047508943 Browse code
Der-Schubi authored

FULL ActiveDisplay Settings

[I]Active display [squashed] (2/2) [/I]

Pac : Pimp up ActiveDisplay
f7a3e64fa3 Browse code
Der-Schubi authored

OmniGears: Fix pimp up ActiveDisplay …
9852cc52b6 Browse code
micku7zu authored

this work took two days until i reached this result, I hope that it can be helpful for other developers

:cowboy:

Regards
[Android Software/Hacking General [Developers Only]] Dhiraj:
Is there any chance to get it works on 4.2?
[Android Software/Hacking General [Developers Only]] packhex:
Good it compiles correctly.

But when I activate activate display I obtain fc systemui

thank you good work:good:
[Android Software/Hacking General [Developers Only]] codexc:
what the base you work on ?
[Android Software/Hacking General [Developers Only]] gr33nd3vil:
So just those 4 commits & that's it?

git cherry pick commit?
[Android Software/Hacking General [Developers Only]] codexc:
there new fixes and changes was added , take a look here

https://github.com/ProBAMKK/android_frameworks_base/commit/568a433716cfc4a5080df3fd730cb438ab139b3d

then yes , you can pick it with "git cherry-pick SHA1"
[Android Software/Hacking General [Developers Only]] gr33nd3vil:
Alright I'll try adding to my cm11 build
[Android Software/Hacking General [Developers Only]] codexc:
OP was updated
[Android Software/Hacking General [Developers Only]] gr33nd3vil:
So what are the exact commands I should be using to cherry pick these and add into my build? Because I keep getting errors when trying to add...

---------- Post added at 11:56 PM ---------- Previous post was at 11:26 PM ----------

Well added in and tried to get it to build on CM11, and it kept erroring.
[Android Software/Hacking General [Developers Only]] Dhiraj:
Is there any chance to work it on 4.2+?
[Android Software/Hacking General [Developers Only]] Deleted member 4258086:
thank you for making this right, compiling went flawlessly ,:good::good:only i miss the option "use as lockscreen" ?

can you implement it ?
[Android Software/Hacking General [Developers Only]] codexc:
great , happy to help
[Android Software/Hacking General [Developers Only]] packhex:
Hello,if they can help me

I Have this problem with the navbar sometimes .. with the active activedisplay.

When I have a so called loss with the way active this pocket wakes up but with the screen of unfreezing for fault android. When I block and unfreezing again is when it activates the activedisplay
[Android Software/Hacking General [Developers Only]] ScoolAir:
I'm realy want add this feature to my rom, but i dont know how. i use with PA 4+ (beta3).
[Android Software/Hacking General [Developers Only]] codexc:
can we see your source ?

what is the base you work on ?
[Android Software/Hacking General [Developers Only]] codexc:
did you upload your rom on git ?
[Android Software/Hacking General [Developers Only]] packhex:
UPS! He forgive ! :$ Base CM-11.0

Source

https://github.com/lis4rd0

Thanks!
[Android Software/Hacking General [Developers Only]] ScoolAir:
I dont know how, you can tell me how and i'll upload?
[Android Software/Hacking General [Developers Only]] Deleted member 4258086:
first learn how to use git, look here and here
[Android Software/Hacking General [Developers Only]] jblazea50:
after commiting the changes for active display, i'm getting the following:

frameworks/base/core/res/res/values/cr_symbols.xml:6: error: Symbol 'Theme.DeviceDefault.FloatingWindow' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/cr_symbols.xml:7: error: Symbol 'Theme.DeviceDefault.FloatingWindowLight' declared with <java-symbol> not defined
make: *** [/home/android/psx-light/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk] Error 1
make: *** Deleting file `/home/android/psx-light/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk'
make: *** Waiting for unfinished jobs....

This is what my cr_symbols.xml looks like:

<?xml version="1.0" encoding="utf-8"?>

<resources>

<!-- Halo -->
<java-symbol type="style" name="Theme.DeviceDefault.FloatingWindow" />
<java-symbol type="style" name="Theme.DeviceDefault.FloatingWindowLight" />

<!-- Active display -->
<java-symbol type="dimen" name="system_bar_height" />
<java-symbol type="dimen" name="kg_widget_pager_horizontal_padding" />
<java-symbol type="dimen" name="kg_widget_pager_top_padding" />
<java-symbol type="dimen" name="kg_widget_pager_bottom_padding" />
<java-symbol type="dimen" name="keyguard_avatar_size" />
<java-symbol type="dimen" name="keyguard_avatar_frame_stroke_width" />
<java-symbol type="dimen" name="keyguard_avatar_frame_shadow_radius" />
<java-symbol type="dimen" name="kg_edge_swipe_region_size" />
<java-symbol type="dimen" name="kg_squashed_layout_threshold" />
<java-symbol type="dimen" name="kg_small_widget_height" />
<java-symbol type="dimen" name="lockscreen_target_inset" />
<java-symbol type="dimen" name="glowpad_notification_font_size" />
<java-symbol type="dimen" name="glowpad_notification_text_radius" />
<java-symbol type="dimen" name="glowpad_overflow_notifications_margin_top" />

</resources>

also, when i cherry-picked and used git status, i noticed that there would be some files that were modified and some deleted; would i need to use git add to add those files back and then git commit?
[Android Software/Hacking General [Developers Only]] :
you have to modifie the files that show up in red ; 'gedit (file) ', after each file you modified you 'git add (file)' , if you done all the files then 'git clean -f ' all the red files should be gone now ,,if everything is green 'git commit'

look in my last post how to use github
[Android Software/Hacking General [Developers Only]] jblazea50:
yup...i've done that; i modified the files by manually going into the locations and removing <<<<<<HEAD ====== and >>>>>> (how do you know what else to modify?)

then i did git add file and git commit; i believe i've done the commit correctly but don't know how to fix it
[Android Software/Hacking General [Developers Only]] :
Did you 'git push' back to github?
[Android Software/Hacking General [Developers Only]] jblazea50:
here are the steps that i've done:

1. repo synced the rom that i want to build

2. went into /frameworks/base and opened a terminal

3. git remote add <remotename> <url>

4. git fetch <nameofremote>

5. git cherry-pick <commithash>

6. git status

7. modified the files by removing <<<<<<<HEAD =======

8. git add <files>

9. git commit
[Android Software/Hacking General [Developers Only]] 96DANGER96:
I've got an S4 mini with CM11 how I can get it working? Thanks..
[Android Software/Hacking General [Developers Only]] tarkin88:
Work on stock rom KK?

Enviado desde mi XT1032 mediante Tapatalk
[Android Software/Hacking General [Developers Only]] codexc:
there Oct Team , implement it with AOSP Stock

https://github.com/Octo-Kat/platform_frameworks_base/commits/kk-4.4
[Android Software/Hacking General [Developers Only]] jblazea50:
[MENTION=338911]codex[/MENTION]ec how do i fix the following error:

packages/apps/Settings/res/xml/user_interface_settings.xml:23: error: Error: No resource found that matches the given name (at 'title' with value '@string/psx_header_charging').
packages/apps/Settings/res/xml/user_interface_settings.xml:29: error: Error: No resource found that matches the given name (at 'title' with value '@string/display_rotation_title').
packages/apps/Settings/res/xml/user_interface_settings.xml:40: error: Error: No resource found that matches the given name (at 'title' with value '@string/display_category_animation_options_title').
packages/apps/Settings/res/xml/user_interface_settings.xml:44: error: Error: No resource found that matches the given name (at 'dialogTitle' with value '@string/system_power_crt_mode_dialog_title').
packages/apps/Settings/res/xml/user_interface_settings.xml:44: error: Error: No resource found that matches the given name (at 'title' with value '@string/system_power_crt_mode_title').
packages/apps/Settings/res/xml/user_interface_settings.xml:70: error: Error: No resource found that matches the given name (at 'title' with value '@string/psx_category_immersive_mode').
packages/apps/Settings/res/xml/user_interface_settings.xml:73: error: Error: No resource found that matches the given name (at 'title' with value '@string/immersive_mode_style').
packages/apps/Settings/res/xml/user_interface_settings.xml:79: error: Error: No resource found that matches the given name (at 'title' with value '@string/immersive_mode_state').
packages/apps/Settings/res/xml/user_interface_settings.xml:79: error: Error: No resource found that matches the given name (at 'summaryOn' with value '@string/immersive_mode_on').
packages/apps/Settings/res/xml/user_interface_settings.xml:79: error: Error: No resource found that matches the given name (at 'summaryOff' with value '@string/immersive_mode_off').
packages/apps/Settings/res/xml/user_interface_settings.xml:86: error: Error: No resource found that matches the given name (at 'title' with value '@string/psx_clear_recents_category').
packages/apps/Settings/res/xml/user_interface_settings.xml:89: error: Error: No resource found that matches the given name (at 'title' with value '@string/psx_clear_recents_location').
[Android Software/Hacking General [Developers Only]] codexc:
in settings app , there missing strings , should be in /res/values/cm_strings.xml
[Android Software/Hacking General [Developers Only]] jblazea50:
how would i go about adding the missing strings in the strings.xml file? is there a commit that i can just cherry-pick?
[Android Software/Hacking General [Developers Only]] codexc:
did you upload your source ? and what is last commit you pick in settings
[Android Software/Hacking General [Developers Only]] jblazea50:
Upload source?

Here's what I did:

1. repo init the rom branch

2. repo sync the rom

3. cherry pick these (apps_Settings apps_Settings apps_Settings commits to Settings

4. git status

5. edit the modified files

6. git add files

7. git commit

Also cherry picked the 10 or so frameworks_base from here frameworks_base

I cherry picked from psx_v3 since it already has active display while psx_light doesn't (rom i'm building).
[Samsung Galaxy Gear] gidi:
Hi all,

The vibration motor in my Gear was damaged and i have sent the watch to the service and now i have it back. They said that the changed the motherboard. So now the vibration motor does indeed work, i have tested through the secret *#0*# menu and have sensed the vibration on other occasions as well (yeah, i know how that sounds - LOL). However, there is no vibration on incoming calls.

Am i missing smth here? Is there an option for that? Do you people have vibration on incoming calls?

I am on null 15 but the same was on stock ROM if i remember correctly.

Thank you!
[Samsung Galaxy Gear] appelflap:
Turn sounds off and set it to vibrate in the Gear settings menu. As far as I know you can't have both.
[AT&T, Rogers HTC One X, Telstra One XL] AnzMaster:
Hello. I have a little problem. After i installed the new rom Wiped everything . The rom started fine. everything is smooth. only problem was I can not save my APN setting for mobile data. I input everything then click save but it just exit out and have no record of the new APN i just added. Is there a fix for it so i can turn on my mobile data and use it?. right now i can only use WiFI

Best regard John
[Omni Q&A] gadget_ar:
I am using the Omni rom for some two weeks and what I would like to say that this is very good rom but

one bug is irritating me so much. When I am connected to my WIFI network at home or somewhere else, my device(SAMSUNG Galaxy S3 I9300)

downloading some data at speed about 9.7kbps continuously and even I am not doing anything on the device at that time.

So I was searching which app or service caused that behavior and I found that is the Android download manager app or service.

When I have blocked this app with avast firewall everything has returned to normal and data traffic was dropping down to 0 kbps and only was going up when

I was launching some app that needs some access to Internet. After that, traffic data was dropping again to 0 kbps what is normal behavior.

Also this is happened when I disabled this app but this blocking have some side effect so I can't download any app from google play unless I unblock this Android downloading manger. When I am unblock this app it does not go immediately downloading this weird data but this is happening after some 5 min and than it continues until I block this app again with firewall.

I would ask developers and other users of this exellent rom if they also noticed this bug and how to resolve this problem because every time when i am updating apps from google play I must turn off blocking Android download manager.
[Omni Q&A] dibblebill:
I haven't seen this behavior before. Is it downloading an update, maybe?
[Omni Q&A] gadget_ar:
No it is not an update because update is downloading at much higher speed. This is like some pinging or sending maybe some data to someone or somewhere. Antivirus didn't found anything when I scanned system.
[Omni Q&A] Chainfire:
I had this happening as well on one of my devices and ultimately traced it back to GApps, one of the IME APKs specifically. Removing them fixed the issue.