Jump to content

[MOD] CrossBreeder-Entropy Lag Reduce/DNS Speedup/Tether boost/Clean Adblock!-2-27-13

Recommended Posts

QUICK LINKS TO FLASH: CrossBreeder_2.27.13.zip and CrossBreeder_Uninstall.zip

Please take a NANDROID backup of your device before installing this MOD. This MOD is beta and still some way to go before stabilising. Please do download both CrossBreeder and the Uninstall ZIP together to your SD Card so you can uninstall in case of any issues.

Please upgrade even if you're happy with a prior version as there are some prospective issues with prior versions which can result in your phone doing more work than necessary.

It is recommended to uninstall a prior version by flashing the attached uninstall ZIP before flashing the latest version.

*** UPDATE 2-27-13 *** Removed DNSMasq client ( still exists for DHCP and Tethering). Added DNRD for DNS client (NOTE HOSTS FILE LOCATION CHANGED). Havege improvements. Multiple improvements in the startup scripts. Tweaks updated with optimised mount options for partitions.

If you get any issues in the OS immediately after installation, do try a reboot to see if the problem goes away.

This is a new take at Android lag reduction. It's lightweight and won't consume battery. Users have reported drastic improvements in usability and even benchmark scores. It will show noticeable improvements on all Android devices from Donut to Froyo to Gingerbread to Honeycomb to ICS and Jellybean.

This is a combination of 5 different methodologies to reduce Android lag.

1. It's a big new feature, removal of DNS lag . A lot of the lag in a lot of apps, apart from the GUI lag, is due to slow DNS querying, specially on the mobile network.

CrossBreeder now runs a caching, load balancing DNS client on the device. So now most of your DNS queries will be served from the cache and if not found, the query will be sent in in round robin fashion to multiple DNS servers including Google DNS, OpenDNS and L3 DNS and the reply will be served to you, hot.

This speeds up network access and networked apps, like Browsers of course, and Tapatalk, Gmail and thousands of others drastically. And removes a lot of the lag where it was due to DNS querying. This will not increase your network or download speed but pages will load much faster.

This will future proof your devices as more and more apps start using HTML5 and/or reside completely as web pages or the like.

The latest update now boosts your tethering connection. Client devices to your device will take advantage of the new DNS. Hence their usage is also improved! In many cases this update might even fix a broken tethering feature on your phone. So if your ROM doesn't have a working tethering support, you an try and install this update. It might magically start working!

If you're experiencing any issues with your tethering, you can selectively disable the tethering boost functionality using the command:


You can re-enable it with:


If tethering still doesn't work after removing just the Tether boost, then you can try and disable the DNS client as mentioned next.

Similarly if you're getting any issues with browser not reaching pages etc. then you can try and disable the DNS client functionality using:


You can re-enable it with:


Also of note is the Adblock feature. CrossBreeder now uses it's own Adblock file in /etc/CrossBreeder/dnrd_root/master ( NOTE - CHANGED FROM PREVIOUS VERSION). It also serves up these blocks in a clean blank format so you don't get an ugly 'Page not found' error instead of every ad. This is quite unique.

CrossBreeder also renames any existing /etc/hosts file on your device. Testing has proven that keeping a system wide /etc/hosts file as is used by most Ad blocking software actually slows down your system. So it is recommended to use this method instead.

In order to achieve all this DNS related functionality, CrossBreeder relies on the excellent open source utility - DNRD

2. Change wakeup threshold kernel parameters so read blocks are released instantly and writes never wake up as we have an external entropy generator. And other tweaks:


echo 0 > /proc/sys/kernel/random/write_wakeup_threshold
echo 64 > /proc/sys/kernel/random/read_wakeup_threshold
for i in `busybox find /sys -name add_random -print 2>/dev/null`; do echo 0 > $i; done
setprop persist.sys.scrollingcache 3
echo 1000 > /proc/sys/vm/dirty_expire_centisecs
echo 500 > /proc/sys/vm/dirty_writeback_centisecs
for i in `find /sys -name nr_requests | BUSYBOX grep mmcblk`; do echo 1024 > $i; done
for i in `mount | cut -d" " -f3`; do mount -o noatime,remount $i ; mount -o nodiratime,remount $i 2>/dev/null; done
for i in `mount | egrep "on \/system |on \/data |on \/cache " | cut -d" " -f1`; do tune2fs -o journal_data_writeback $i 2>/dev/null; done								

3. Modulate OS entropy levels for lag reduction ala Seeder. The whole OS reads either /dev/random or /dev/urandom and both need entropy. However this mod uses a completely different, lightweight and efficient random number generator called Havege . This sharply reduces cpu consumption and corresponding battery life loss compared to Seeder. It also does a better job at keeping entropy levels high hence your device is more responsive. It doesn't run in a CPU intensive loop either. The extend queue functionality has also been added to CrossBreeder. See here for another rationale favouring Havege compared to Rngd - ( http://code.google.com/p/csrng/ - Look for the limitations.)

4. Remove /dev/random as it's blocking . Link it to non-blocking /dev/urandom. Since /dev/random is blocking and designed to protect us from Quantum alien cryptographers with mathematical certainty and urandom is non blocking pseudo-random device that most apps and OSs are using anyway and with Haveged running, is as secure anyway as it's very difficult to empty the entropy pool faster than Havege can replenish it. Pre ICS devices have a lot to gain with this but ICS+ devices show visible gains too.

5. Frandom support - CrossBreeder now supports linking both your random devices to the extremely fast alternative - Frandom ( http://billauer.co.il/frandom.html ). This module is orders of magnitude (10-50 times) faster than the standard character devices ( Check this out - http://forum.xda-dev....&postcount=134 ). The erandom character device also installed by Frandom doesn't use up system entropy at all on top of being fast. You will need to ask your ROM developer to develop the kernel module for you and then place it in /system/lib/modules. CrossBreeder will then try and load it and if successful, make all the necessary adjustments so that both /dev/random and /dev/urandom are pointing to /dev/frandom and /dev/erandom respectively. The speed benefits are to be seen to be believed. But since each ROM requires a unique kernel module, this option is left optional ( but auto detect ).

Your thoughts and experiences welcome and actively solicited.


- If you want to install it automatically please flash the attached CrossBreeder_2.27.13.zip in recovery. That's it. You're done!

*** WARNING - Other entropy reduction apps like rngd standard and rngd from Seeder and qrngd are not compatible with this mod. In case you have Seeder running please disable it. You can run the app to see the entropy levels though. This mod blocks all other rngs so Seeder may not run. The nature of the /dev/random device is now faster non blocking link to urandom and different to what these apps expect. They would otherwise go into a CPU consumption loop at 60-70% cpu usage. There is no loss of functionality by disabling other rngs as this is a replacement and an improvement***


The biggest improvements are in general usability of apps, both local and network based.

You can check your entropy values with this tool:


or use this method for more fine grained graphs: http://forum.xda-dev....php?p=38509664

You should get values moving to 4000 regularly with this mod.

Also of some use is this Lag Test app: Lag Test http://db.tt/eBHYJWYn ( Thanks MW86 ). This is for generally testing the CPU based GUI rendering functionality. The aim is to approach 60 fps, but there isn't a guaranteed correlation with CrossBreeder and your FPS result as of now. It is mostly related to your Governor but CrossBreeder certainly helps.

You can test your DNS client functioning using the software 'DNS Lookup' from the Play Store and querying for any domain name like www.google.com with a DNS server to query set as - . A successful reply indicates that the DNS client is running fine in the background, caching and parallelising your DNS requests. :thumbup:

2. If for some reason, your entropy values aren't hovering around 4096 then the app most probably didn't start automatically. You can try and run it manually using:



If the entropy values go up to around 4096 and stay there, it's working. CrossBreeder is now in it's separate directory and not dependent on your init.d support. You can make it run automatically on boot using an app like SManager from the Play store, just remember to check both 'BOOT' and 'ROOT' for the execution.

3. If you're getting issues, you can run the collection script:


su -c /system/etc/CrossBreeder/ENABLE_CROSSBREEDER

and post the resultant /data/cb_CHECK_PROCS.log.gz file here in this thread or anywhere else and post here pointing to it please. I will try to find a solution or post a bugfix soon.

You can also disable CrossBreeder if you have any problems using:


su -c /system/etc/CrossBreeder/DISABLE_CROSSBREEDER

4. If you tried (2) and (3) above and it still doesn't work for you or you would still like to uninstall the mod, then please flash the CrossBreeder_Uninstall.zip.



2. DNSMasq ( http://thekelleys.or...nsmasq/doc.html )

3. Havege ( http://irisa.fr/caps/projects/hipsor/ )

4. Seeder. ( http://forum.xda-dev....php?p=33999592 )

Absolutely no guarantees. I'm not responsible or liable for anything that arises out of the use of this, including you out of your chair.



zip.gifCrossBreeder_2.18.13.zip - [Click for QR Code] (1.71 MB, 151 views)

zip.gifCrossBreeder_2.26.13.zip - [Click for QR Code] (1.66 MB, 2378 views)

zip.gifCrossBreeder_2.27.13.zip - [Click for QR Code] (2.43 MB, 104 views)

zip.gifCrossBreeder_Uninstall.zip - [Click for QR Code] (233.1 KB, 47 views)

Edited by micky51100
Link to comment
Share on other sites

J'ai voulu installer init.d support, après reboot aucune appli installée dispo, pas même google play.

Je reflash les Gapps, j'espère que je retrouverai tout, mais c'est pas gagné.

p***** je n'ai accès à aucune des applis google installées après la rom, ni gmail ni le market malgré le flash des gapps !

Comment faire pour supprimer le script ?

Edited by JB 03
Link to comment
Share on other sites

bizarre l'apk active juste le support init.d, il ne retire rien normalement !

moi perso j'ai viré tout les fichiers gênant avec rootexplorer et le support init.d était déjà actif sur ma rom. Donc vérifie que ta rom n'est pas déjà le support d'activé. pour vérifier, c'est simple tu va dans system/etc/init.d/ dois apparaître si il est actif !

Link to comment
Share on other sites

J'ai bien le dossier en question (avec les fichiers 00banner, 00test, 01sysctl, 05mountext, 06handleswap, 08setperm, 10apps2sd, 20extgapps, Seeder), je n'ai pas flashé le zip du coup.

Ce que je ne comprends pas c'est la perte d'un certain nombre d'appli dont les gmail, market, navigation, maps etc.

J'hésité à flasher le zip vu le bordel mis par le script...

Link to comment
Share on other sites

J'utilise seeder 2.0.0 et j'en suis très satisfait...

(pas vu de fichier mgd dans /system/xbin)

Si je veux essayer CrossBreeder, comment savoir si ma rom intègre init.d support?

Actuellement, j'utilise : CM7.2-20130129.0131-Desire + A2SD.


Quasiment toutes les rom ont le support init.d

Cyanogen, Oxygen, MildWild(CM,MW, etc)

Enfin, toutes les roms que j'ai essayé l'avait.

Les seules fois où j'ai vu des roms qui ne l'avait pas, c'était sur des toute première version alpha.

Sinon, pour être sur de savoir si tu l'as :

Est-ce que j'ai le support init.d ?:

Et bien, voici comment le savoir:

1. Télécharger le fichier: Attachment 1612958

2. Extraire le fichier, vous obtiendrez un fichier nommé 00test. NE LE FLASHEZ PAS!

3. Copier le dans /etc/init.d. s'il n'y a pas de dossier init.d (ce qui m'étonnerait), vous n'avez probablement pas le support init.d. Toutefois, si vous voulez toujours essayer, il suffit de créer le dossier "init.d"

4. Changer les permissions du dossier init.d et le fichier 00test en rwxrwxrwx.

5. Redémarrer.

6. Si vous voyez le fichier nommé Test.log dans /data, vous avez le support init.d. S'il n'y est pas, vous devez exécuter Uni-init, Term-init ou Zip-init. wink.gif

Ou alors installer Uni-init v1.0.apk


Cliquer sur Verify


Vérifier dans /data si il y a le fichier Test.log

Si oui, c'est bon !!

Edited by sydbarrett55
  • Like 1
Link to comment
Share on other sites

Donc, je viens de me refaire une belle install toute propre. ça faisait au moins 4 mois que je ne l'avais pas fait.

En plus, je faisais des mises à jour de ROM les unes par dessus l'autre. Donc, ça n'a pas fait de mal, au contraire.

Revenons en au sujet. Alors là, je dis oui.

Je trouve (1000 %) que CrossBreeder et mieux que seeder.

Sortie de veille, aperçu des bureaux, lancement d'applicaions, etc.. et j'en passe.

Tout est beaucoup plus fluide; J'ai presque l'impression d'avoir un nouveau téléphone.

Par contre, une chose que j'ai fait. C'est retirer tous les scripts que j'avais ajouté dans init.dd (ramscript, sdcardreader, etc...)

Bref, je suis vraiment très satifait de cette solution.

Merci encore Micky

ps: on s'en fou, mais mon vrai prénom, c'est mikaël et on m'a toujours appelé Micky, ça m'a fait sourire lol

Link to comment
Share on other sites

Effectivement, CrossBreeder est mieux que seeder.

@syd :

dans init.d, je n'ai pas tout ce que tu cites mais j'en ai deux qui commencent pat 00.

C'est dans l'ordre croissants des nombres que les "modules" sont lancés?

Bonne questions je ne sais pas trop !

Link to comment
Share on other sites

pas grave qu'il est 2 fois le meme nombre, il fait par odre en effet mais il n'y a pas de pb qu'il lance l'un en premier ou l'autre. C'est important quand on lance un script pour monter un partition, mais dans ce cas pas de soucis ;)

  • Like 1
Link to comment
Share on other sites

Effectivement, CrossBreeder est mieux que seeder.

@syd :

dans init.d, je n'ai pas tout ce que tu cites mais j'en ai deux qui commencent pat 00.

C'est dans l'ordre croissants des nombres que les "modules" sont lancés?

Les scripts que j'ai cité ne sont pas installé par défaut. C'est des scripts que j'avais ajouté manuellement.

Donc, c'est normal que tu ne les vois pas.

En fait, ce que je voulais dire, c'est que j'ai retiré ceux que j'avais ajouté (qui ne sont pas dans la ROM) :P

PS: si j'avais connu CrossBreeder plus tôt, j'aurais peut-être pas commandé un NEXUS 4 car franchement, je le redis mais je suis super impressionné.

Link to comment
Share on other sites

Nouvelle version : zip.gifCrossBreeder_2.7.13.zip - [Click for QR Code] (684.9 KB, 372 views)

Pour l'installer, le DEV recommande de désinstaller l'ancienne version en utilisant CrossBreeder_Uninstall.zip - [Click for QR Code] (133.6 KB, 163 views

It is recommended to uninstall a prior version by flashing the attached uninstall ZIP before installing the latest version.

Edited by sydbarrett55
Link to comment
Share on other sites

Nouvelle version : zip.gifCrossBreeder_2.7.13.zip - [Click for QR Code] (684.9 KB, 372 views)

Pour l'installer, le DEV recommande de désinstaller l'ancienne version en utilisant CrossBreeder_Uninstall.zip - [Click for QR Code] (133.6 KB, 163 views

Le lien ne fonctionne pas, il y aurait une possibilité de le trouver ailleurs (pas réussi à tomber sur le bon message sur xda).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...