Former Writer · Jan 3, 2013 at 09:00 am

Reduce Game Lag on Nexus 7 and Other Devices with Seeder Entropy Generator

Update: Due to questionable gains and inherent drawbacks, we recommend that users please read this explanation before proceeding.

Despite some truly top notch hardware, some high end Android devices still seem to have trouble with some games. There are mods out there to fix these lag issues, as the underlying cause usually equates to some issue with the processor not working to its full capacity. There is now a new fix for Nexus 7 devices to help reduce game lag.

XDA Senior Member lambgx02 originally posted the Seeder Entropy Generator to stop lag on various Android devices. The running premise was that most game lag was caused by entropy. As lambgx02 explains:

So, I was experiencing significant lag as we all do from time to time, and decided I was going to get to the bottom of it.

After tracing and debugging for hours, I discovered the source of 90% of Android’s lag. In a word, entropy (or lack thereof).

Google’s JVM, like Sun’s, reads from /dev/random. For all random data. Yes, the /dev/random that uses a very limited entropy pool.

Random data is used for all kinds of stuff.. UUID generation, session keys, SSL.. when we run out of entropy, the process blocks. That manifests itself as lag. The process cannot continue until the kernel generates more high quality random data.

So, I cross-compiled rngd, and used it to feed /dev/urandom into /dev/random at 1 second intervals.

The result of fixing this issue is that games run much, much smoother. XDA Recognized Contributor bradman117 tested and confirmed it worked for the Nexus 7 and posted where more users can see it. So far, users have have reported excellent results. Installation is easy as well, as it’s a simple zip to flash in recovery.

However, if you do decide to give it a shot be aware of the very real caveats of decreased security due to inferior random number generation, as well as decreased battery life. As stated by lambgx02:

  • There is a (theoretical) security risk, in that seeding /dev/random with /dev/urandom decreases the quality of the random data. In practice, the odds of this being cryptographically exploited are far lower than the odds of someone attacking the OS itself (a much simpler challenge).
  • This may adversely affect battery life, since it wakes every second. It does not hold a wakelock, so it shouldn’t have a big impact, but let me know if you think it’s causing problems. I can add a blocking read to the code so that it only executes while the screen is on. On the other hand, many of us attribute lag to lacking CPU power. Since this hack eliminates almost all lag, there is less of a need to overclock, potentially reducing battery consumption.

While lambgx02 states that the risk of being exploited due to the urandom -> random seeding is low, any increased risk is too much for a daily driven device in our book. We advise all those who are interested to give this a second thought, though, due to the potential risks. However, we understand why some in heavily controlled environments, where cryptographic strength is not of high importance, may want to give this a shot. To see more, check out the Nexus 7 thread as well as the original thread.


_________
Want something on the XDA Portal? Send us a tip!
Jimmy McGee · Mar 4, 2015 at 06:00 am · no comments

Pixie Dust – XDA Game Time!

There are some excellent ‘AAA’ tier games by huge development houses that offer fun, and, most of the time, in-app purchases. There is no doubt that some of these games are great. However, at XDA we like to keep an eye on the little guy. Some of the more successful Android developers have started out as the little guy. Today we celebrate another simple game developed by an XDA member. XDA Senior Member Rolf Smit offers up a 2D sandbox...

XDA NEWS
Mario Tomás Serrafero · Mar 3, 2015 at 04:29 pm · 1 comment

Five New Forums for Latest Phones, Tablet and Smartwatch

The Galaxy S6 Edge, Huawei Watch, Xperia Z4 Tablet, Moto E 2015 and Xperia M4 Aqua all have gotten new forums here at XDA. If you want the latest and greatest in hardware as of now, the Galaxy S6 Edge's top-tier processor, memory, and camera will most likely fulfill your everyday needs with blazing speed, and extra screen-space to boot. Huawei seems to have nailed the smartwatch with their new Huawei Watch, a classy-looking but also durable and powerful Android Wear...

XDA NEWS
Mario Tomás Serrafero · Mar 3, 2015 at 04:00 pm · no comments

Cross-Platform Encrypted Messaging with Signal 2.0

Privacy and security are two increasingly important factors in today's globalized world, and with the surge of internet spying by government agencies and third parties, wiretaps are an everyday thing that don't just concern James Bond anymore. Encryption made its way to the semi-mainstream messaging world with the Telegram platform, but while millions flocked to it, it is still clear that convenience beats privacy for most of smartphone users. After all, with the huge user bases boasted by Whatsapp and the...

XDA NEWS
Share This