[Q] Low entropy - /dev/random problem - Android Software/Hacking General [Developers Only]

I hope I'm asking this in the right forum ...
My phone: Motorola Cliq, rooted, Eclair ROM "J_r0dd's TheOfficial v1.6."
So the other night I needed to ssh into one of my servers and I wasn't near a computer, so I fired up terminal emulator and got the dreaded:
ssh: Warning: Reading the random source seems to have blocked.
If you experience problems, you probably need to find a better entropy source.
Took a look at /proc/sys/kernel/random/entropy_avail and sure enough it's hovering between about 120 and 190, which is way too low. It ought to be in the 3000 to 4000 range.
So I worked around it by swapping in /dev/urandom for /dev/random and got my server issue resolved, but then I got curious if this was a general problem or if it was specific to the ROM I'm running (J_r0dd's TheOfficial v1.6.)
I tried restoring Blurry Eclair RC3 and also the stock 2.1 ROM and both had the same issue - entropy_avail ranges from about 120 to 190.
I tried switching on Wifi, GPS, playing music, etc. but nothing made a difference.
This is pretty weird since it seems to me there are plenty of handy sources for entropy - phone network activity, wireless activity, app activity, user actions etc.
I'm now curious as to whether this is a problem with my phone hardware, something true of Android on Motorola CLIQ, or true of many other Android devices as well.
There are two issues here which I think are serious:
1) With entropy that low, any app that needs good randomness and uses /dev/random to get it may hang indefinitely.
2) The trick of swapping in urandom will let you go forward, but introduces a serious vulnerability since urandom can be predicted.
Any thoughts and info would be appreciated. Anybody know what hardware input the kernel uses to get entropy? Does your CLIQ (or other phone_ have a similarly small entropy pool as mine?

x-y-no said:
Took a look at /proc/sys/kernel/random/entropy_avail and sure enough it's hovering between about 120 and 190, which is way too low. It ought to be in the 3000 to 4000 range.
So I worked around it by swapping in /dev/urandom for /dev/random and got my server issue resolved, but then I got curious if this was a general problem or if it was specific to the ROM I'm running (J_r0dd's TheOfficial v1.6.)
Click to expand...
Click to collapse
Same problem with Samsung Galaxy S 4G and AOKP/CM9 kernel. Available entropy runs in the 75-200 range.
I agree that symlink-ing /dev/random to be /dev/urandom resolves the symptom, not the problem. With such limited entropy, /dev/urandom would be even weaker cryptographically that it would be on a system with reasonable available entropy.

Related

Help! Cm6 rom is so close to perfection :'(

Once again I am here seeking the help from developers for my phone. Which is not the XT720 (XT701 instead), but I really don't know where else to turn.
I was restless again, so then I went and started looking for roms. I found this one:
Speed XT701 2.2.1版 beta7 搞掂wifi
This is really new and is running CM6 based moto blur extremely smoothly. Search on google and click the first few links to see the interface. Amazing as always, the CM roms. The touch sensitivity is ON PAR with the Iphone 4. I was so glad that everything was working - Camera, SDcard, SERVICE, SMS, CALLING, all working so perfectly. It was completely different from the CM 7 mod.
And honestly, It really seems even faster than the CM7 rom. I read from the translated description that it is using "smart200mhz to 600 mhz" processing for superb battery and so on. It really does have a lot of attractive features and usual and completely destroys the 2.1 rom.
Now comes the horrible, devastating part. No wifi. .
I did the 3 wipes, updated, and 3 wipes again, and it still had no wifi.
Right now I'm really leaning towards sticking to this rom. My solution is to keep my backup of the 2.1 stock, and nandroid over to it when I need to so that I can download new apps, back then up in SD, and then nandroid back.
Can anyone please help me figure out how to get wifi? I'll donate from paypal if someone can help me resolve this wifi issue. . Just terrible, this problem. So close.
firzen_net said:
Once again I am here seeking the help from developers for my phone. Which is not the XT720 (XT701 instead), but I really don't know where else to turn.
I was restless again, so then I went and started looking for roms. I found this one:
Speed XT701 2.2.1版 beta7 搞掂wifi
This is really new and is running CM6 based moto blur extremely smoothly. Search on google and click the first few links to see the interface. Amazing as always, the CM roms. The touch sensitivity is ON PAR with the Iphone 4. I was so glad that everything was working - Camera, SDcard, SERVICE, SMS, CALLING, all working so perfectly. It was completely different from the CM 7 mod.
And honestly, It really seems even faster than the CM7 rom. I read from the translated description that it is using "smart200mhz to 600 mhz" processing for superb battery and so on. It really does have a lot of attractive features and usual and completely destroys the 2.1 rom.
Now comes the horrible, devastating part. No wifi. .
I did the 3 wipes, updated, and 3 wipes again, and it still had no wifi.
Right now I'm really leaning towards sticking to this rom. My solution is to keep my backup of the 2.1 stock, and nandroid over to it when I need to so that I can download new apps, back then up in SD, and then nandroid back.
Can anyone please help me figure out how to get wifi? I'll donate from paypal if someone can help me resolve this wifi issue. . Just terrible, this problem. So close.
Click to expand...
Click to collapse
I'm sure our dev's would love to help as it might help with our phone as well. First can you post a link to this amazing ROM please? Thank you!
Look forward to seeing this, but...
firzen_net said:
The touch sensitivity is ON PAR with the Iphone 4.
Click to expand...
Click to collapse
...what's that supposed to mean? I've never had a problem EVER with the phone registering my touches and my touches can be me barely touching the screen (i.e. I can't imagine how anything can actually be better than that).
Maybe he meant responsiveness of the UI? Just a guess. And yes I agree the touches on the phone is already very good in your sense.
syrenz said:
Look forward to seeing this, but...
...what's that supposed to mean? I've never had a problem EVER with the phone registering my touches and my touches can be me barely touching the screen (i.e. I can't imagine how anything can actually be better than that).
Click to expand...
Click to collapse
Sent from my Milestone XT720 using XDA App
For the touch sensitivity thing, I'm pretty sure its because I'm running 2.1, which is why the IPhone seemed faster with tracking my finger movement when I compared them side by side. The XT701 itself is already blazing fast, because I'ved used overclocking, setcpu, and memory manager, but then when I upgraded to this rom called the "speed beta 7" it was just overwhelming. I've never seen the phone so reactive.
The rom is a CM 6.1.2, android 2.2, so it would explain everything so much faster. I always thought I couldn't get the phone to be any faster, but this rom proved me wrong again.
Here is the link to the rom. I'm also going to be copying and pasting the post that the developers have along with the rom. It's going to be translated from Chinese into English, so it'll be rough. But you'll get the jist of what its saying.
http://u.115.com/file/dn6dnp8n
I nandroided back to my stock rom again =/. Apparently this Rom has close to daily updates so I'll wait a while. They started releasing it on the 7/18 and they're already on beta7.
Statement: As a consulting 2.2 version of the oil, therefore continue to provide useful new 2.2 ROM.
This ROM is not my production is transferred from the other forums, but I have used ever measured, easy to use just made up, hope you like
Version of the return to original author, has nothing to do with me ~
Mod Description:
This Mod is based on CM6.1.2 production, with Moto-style 2.2.1 version of the official 2.1 ROM, with a great memory, experience, ensuring smoothness and stability, and has a very strong memory recall mechanism.
And with improved functionality and greater ease of use, without adding redundant features.
This ROM native support APP2SD, support both computer and cell phone card reader (connected to a computer can not afford to card), NICAM excellent results.
CPU clocked Smart250Mhz to 600Mhz, power efficient correct, let your XT701 has a stronger fighting at the same time have sustained life.
ROM renamed Speed ​​XT701, translated as "rapid XT701", reflects the ROM features.
This Mod is currently only for a kernel customization, the future will be to consider other kernels, so there will be more than one branch.
Please note: Some functions can not achieve because the kernel is the reason, in the absence of perfect Neihe 前, Mod can not solve the problem.
701 began to decay ...
Speed ​​XT701 Beta7 stage is a more stable version, while faster than Beta1 has been greatly improved, A-GPS issues still need to look at, here adopted a compromise;
FM repair just around the corner, recommended update to this version.
Interface is slightly flawed, the next version of the repair.
2011.7.27 3:00 Updated Beta7
- New Atrix 4G interface; (blur Starter: Launcher.apk (2.39 MB) option, choose blur interface)
- Fixed dynamic Wi-Fi connection (thanks to S);
- Fixed Google Search FC;
- Streamlining the volume size;
- Increase stability;
- Add more beautiful Google Video;
- Support for 4-point touch; (thanks S)
- OC 800Mhz, standby frequency reduced to 125Mhz, more power, smoother!
- Strengthening the capacity of the hard decoding;
2011.7.26 update Beta6 Remastered 0:00
- Fixed browser FC;
- Update to the latest 3.0.27 version of the electronic marketplace;
- Update patch version of the power and temperature;
- Increase stability;
2011.7.25 0:30 Updated Beta6
- Solve the vibration problem to unlock;
- Because the library file repair Dlna caused errors;
- New dial-up interface and contact interface;
2011.7.24 10:30 update Beta5 Remastered (this can be ignored without the requirements of a friend)
- Replace defy the keyboard file, keyboard, power button and all other issues hang perfect solution
2011.7.23 10:30 update Beta5
- Replace the latest 113 version of the font, smaller, better display;
- Repair Beta4 problems (set English Bug, Android keyboard error, etc.);
- Extracted from the MOTO 4G distinctive ring;
- Add to unlock the other core vibration setting; (thanks to friends chj334499) (stability unknown)
- Replace the display of attribution in text; (thanks to friends fdwxd) (stability unknown)
- Replace the Chinese version of "MOTO mobile portal"
2011.7.22 10:30 update Beta4
- Optimize the network settings, better support for WCDMA networks, and enhance the connection speed and quality;
- The new configuration of GPS and speed;
- Force on A-GPS, to enhance positioning speed;
- Draw all the android machine configuration, integration into a machine with the XT701, collect all the network location server as a backup link;
- Configuration files using the latest CM6 0.11;
- Add cold patch, effectively reduce the temperature more than 20%; (please use this method with h ttp: / / bbs.gfan.com/android-2089915-1-1.html)
- Integrated Performance patch tested to enhance CPU performance to run sub-10%;
- Integrated the latest version of the DSI from CM6 0.11 patch, XT701 continue to increase endurance;
- Reduce the Wi-Fi scanning frequency, Wi-Fi throughout the day as more power;
- Replace CM6 0.11 the latest version of Wi-Fi and configuration files. (Not sure whether to fix dynamic)
- Completely remove the overclocking module, to save space;
- The kernel is locked, overclocking is invalid, it is deleted;
- Optimized version of the baseband added, the latest version from CM6 0.11;
- Add audio library, you can use third-party audio controller;
- Updated built-APP version;
- Add high-quality broadband talk configuration;
2011.7.21 10:30 Beta3 enhanced version update
- Added DLNA support;
- You can transfer data via WIFI and other equipment, or set up local area network to share streaming media, specifically refer to Baidu Baike.
- Repair software to download third-party market issues;
2011.7.20 10:30 update Beta3
- Re-optimize the configuration file of GPS and A-GPS files;
- In theory than in previous versions of the GPS version is better, basically reached the limit of Mod;
- Optimization of the hosts file, which greatly improve the google server connection speed; [thanks] to provide users 1179873587
- Improve the synchronization speed;
- Gmail and other google software to reduce latency;
- Replacement splash screen, more appropriate theme Moto, faster boot speed;
2011.7.19 10:30 Update Beta2
- Fixed error Android keyboard procedures;
- Streamlined some services for the Youtube upload and delete services;
- Add V @ P @ N service support;
- Streamlining the integration software, the production will follow after the official 2.1 version to make;
- Replaced with lower-resolution boot screen, improved boot speed;
- Replace the official 2.1 comes with wallpaper;
- Integrated the latest version of Moto input (from Motorola Atrix 4G);
- Change Root manager for the latest version, fix "is loaded as read-only" misplaced;
- Fixed several existing bug.
2011.7.18 18:30 update Beta1 Remastered
- Fixed multi-satellite GPS can locate the problem found;
Beta 1 update 2011.7.18 10:30
- Replace the landmark core library files, optimize media effectiveness.
- Replace the new version of CM software, a large amount of updated content, localization is not completely finished parts.
- Can be set not by third-party software to set maximum memory occupied by each program;
- Can change the screen mode and unlock the lock;
- By avoiding kernel crash DSI greatly reduces the chance of error;
- Has a more detailed set;
- Joined the GPS optimization patch, the original speed faster;
- Use of State Bank 2.1GPS configuration file, add add GPS module and the search speed so write the boot loader module list;
- Replace USB.apk the milestone comes the official Chinese version 2.2;
- Update to the latest versions of many programs;
- Add a contact interface numbers and call records to show ownership of the interface number to show ownership;
- Add to Google services pack version of the latest available version, download error correction;
- The electronic market is unable to update, talk can not update the map to the latest 5.7 version of China to speed up
- Increase Plus kit;
- You can replace the five versions of this toolbox baseband;
- Available through the Toolbox to streamline internal procedures;
- Can remove the camera sound camera;
- Can remove built-in multiple records;
- Easy to change the font;
- Minimum brightness breakthrough limit;
- Screening software function within the advertising;
...
- Streamlining the number of useless software;
- Replace the ADW as ADW.EX faster;
- Excluding services provided by voice prompts, and many other services;
- Use the native theme files, and add the mot-framework-res.apk (birth certificate);
- After extreme pressure test, the native theme with more stable characteristics, it is recommended that a friend like landscaping to restore native interface;
- With the birth certificate, you can install the software, the biological (moto software installation available)
Next Blur Beta 5 ready to try the latest version of its portable interface, please look forward to it!
Students do not envy MIUI, MIUI is based on the CM 0.1 development, and the current version has a lot of difference, and code optimization is not high.
Goal: present the mod of the already chaotic, mod rarely have their own style, hope this mod will enable students to experience the same as 2.2.1 to 2.1, and so restore the Moto mod style.
Known issues:
1. WIFI not dynamic;
(2) some special encoding video black;
3. FM is still not available;
4. Can not call recording;
(this part was in white text. I don't know if it means that its fixed or not. Because it does say that in the latest Beta7 wifi was fixed thanks to S or something)
(Note: points represent the normal running speed, running sub is the ultimate performance of a test, therefore, the common run from high up poor, but the machine is running;
For example: run the software needed to run sub-use lots of memory, ROM memory recovery efficiency is poor, will result in greatly reduced running speed after hours, but had no effect on the running sub-
So the actual speed will depend on the. )
Recommendation: To maintain the stability and speed, it is recommended to remove the JIT, of course, affect the reserves is small.
Recommended with the software: automated process killer from Kai Butler
Recommended with the script:
Swap 256M memory or more
beta 7 Download: http://u.115.com/file/dn6dnp8n
Please place this file to the root directory of cell phone coverage with the same name file (remove. Apk): init.choles.rc.apk (11.92 KB)
Downloads: 146
Yesterday, 03:47
Download the consumption of G coins 1
Brush Method: Download this package on the SD card OpenRecovery / Updates folder, the brush before you wipe 3 items.
Everything it says is true. It is fast as hell, no lag. The ONLY thing which is stopping me is the wifi, which bugs me even more, because it says here that Beta7 FIXED WIFI. I don't know why my wifi doesn't work!
interesting. I wonder what will happen if we apply this update to the running cm6 on xt720
Becarefull this could have a custom kernal that could bootloop or worst.
Sent from my Milestone using XDA Premium App
Really? I've been using this so far it's great. I've never seen my phone be so responsive ever. But there is still no Wifi. Everytime I try to connect it says, Connecting, and then Disconnected. Because of that I haven't even logged in with my account. No wifi causes the phone to run even smoother, cause a lot of background apps aren't runnning
mchlbenner said:
Becarefull this could have a custom kernal that could bootloop or worst.
Sent from my Milestone using XDA Premium App
Click to expand...
Click to collapse
firzen_net said:
Really? I've been using this so far it's great. I've never seen my phone be so responsive ever. But there is still no Wifi. Everytime I try to connect it says, Connecting, and then Disconnected. Because of that I haven't even logged in with my account. No wifi causes the phone to run even smoother, cause a lot of background apps aren't runnning
Click to expand...
Click to collapse
I think he's telling xt720 users to be careful.
Yes are kernal cant be messed
Thanks to moto locked bootloader.
Not for use it you have milestone xt720.
Sent from my Milestone using XDA Premium App
firzen_net said:
Can anyone please help me figure out how to get wifi? I'll donate from paypal if someone can help me resolve this wifi issue. . Just terrible, this problem. So close.
Click to expand...
Click to collapse
I just had a similar problem on the XT720 CM6. It turned out that wifi actually was working, but DNS lookup was not (I could use static IP in browser). I fixed it by replacing /system/xbin/busybox with a known-good version. You can test busyboxes with something like copying it to /tmp/busybox and then running (either via adb or terminal emulator):
/tmp/busybox nslookup android.com
Could you be a bit more specific Mioze7Ae. I have the busybox app; I don't think I have the terminal emulator. But I still don't understand what you mean.
I have Busybox app installed, and it says the "Status: Done!" after installing 1.18.4 :S.
As for the terminal emulator, I've heard of it but I don't have the app. So I install the app and then type that in the emulator?
EDIT: I just downloaded some Pro term emulator app. I turned on wifi, and then I typed in that code (cept I put xbin since I only installed it there) and it said:
Server: 8.8.8.8
Address 1: 8.8.8.8
nslookup: can't resolve 'android.com'
What does this mean? cause It just seems to me that my Wifi is still not working. Also, I've been seeing DNS around but I have no idea where to find it in my phone. Or DPN, something liek that but all I have in the Network settings is VPN and proxy, which is at default.
On a side note, could anyone help me find a working zip folder of Google apps for XT701/XT720/CM6? In the past I've installed them manually on android, and I've tried to use OR to flash the apps into my phone as well.
Look in the cm7 for the Motoroi thread & around post 50 there is a link to the cm website Google apps updates
With wifi connected try using the browser to go to a website via ip address instead of name. For example http://50.23.231.74/ worked, even though http://xda-developers.com/ did not. If ip addresses don't work then probably you have a different problem.
My problem right now is that I cannot even connect to the router at home (or anywhere else). It just keeps saying scanning connecting, and then looping back to scanning.
Sad thing is, just today I flashed another CM6 rom by the name of update-cm-6.1.2-XT701-Milestone-signed-by-s.zip today, and wifi worked. But then, a ton of other things stopped working so I nandroided back.
It just doesn't make sense that Wifi wouldn't work for some and not for others. I am still way too unexperienced for android.
I found it from this website, http://xt701.ghostry.cn which is sort of a jackpot for me. It has the latest releases of ROMS from China/world all uploaded onto that site. I don't know if it will be much help for XT720 developers, but that site is extremely updated.
Another slight problem which I am also overlooking for the sake of Speed is the LED being unusable. I always relied on it when my phone was on silent for texts, but now It is just gone. Any ideas how to get it back=/? Thanks for your input anyways!
So wifi is still not working. I've been reading around that it has to do with the Radio img??!? I don't get it.
I do know that this ROM doesn't have a FM radio yet, but I don't know if it has to do with my wifi.
I also tried replacing my tiwlan_drv.ko with other versions of it, but it ended up in an Error. Is it possible for me to flash a CM6 rom with a working wifi, copy the tiwlan_drv.ko file from there, and then use it on this current ROM that is not working? Like using root explorer to replace the .ko with the other roms one?
Sigh..
is this thread closed? nobody from august? i donwloaded some roms from http ://xt701.ghostry . cn and now i will install to my XT701 and see if any it's working so I can have android 2.2!!!
As long as you have xt701 your good to go.
Sent from my XT720 using XDA Premium App
i have now on my XT701 MIUI 1.12.30 Android 2.3.7 but i have some problems with network signal and when I try to call anybody the phone restarts! last night when I flased this ROM the calling was good. Strange!?!?

[APK] Seeder 2.0.0 entropy generator to provide significant lag reduction

Hey everyone,
Version 2.0.0 released!
This version introduces performance tuning, power management control, and an optional MMC I/O queue extension/timing change.
For those of you who have seen reboots / black screens that seem to be caused by Seeder, I suspect it may be due to the power management implemented in previous versions. Disabling power management (by unchecking "Suspend RNG service while screen off") may help. In my testing, battery impact was negligible (less than 2% per 24h).
The performance profiles are Light, Moderate, and Aggressive, and they control how frequently rngd wakes. The default configuration (Light) is unchanged from previous versions. Moderate and Aggressive may impact battery life (slightly), but may also help on devices where the entropy pool is drained quickly and often.
Last but not least, the "Extend I/O queue" option increases the nr_requests on MMC devices to 1024, and increases the dirty page expiry time, allowing more outstanding writes to accumulate. This may allow the I/O scheduler to make better decisions and combine more writes; some users have reported an improvement under heavy I/O.
Feedback appreciated!
---
On some (older) versions of Android, the JVM (and other components) often read random data from the blocking /dev/random device. On newer builds, this problem has been solved, yet depletion of the input entropy pool still seems to slow devices.
So, I cross-compiled rngd, and used it to feed /dev/urandom into /dev/random at 1 second intervals.
Result? Significant lag reduction (for some people)! :good:
Note - if you want to try it, you must be running a rooted device, and you only need to install one of the APKs (latest version is best). Then, just open it, and turn it on. The other files (patches / .zips) are intended for recompiling, packaging, and init.d integration. If you uninstall the app, either turn off rngd first (open, and click the on/off button), or reboot afterwards; the UI does not presently kill the daemon on uninstallation.
For more information on using the .zip flashing method, see Ryuinferno's post here:
http://forum.xda-developers.com/showpost.php?p=36479461&postcount=1924
FAQ
Q: Do I need the .apk or the .zip?
A: The easiest method is simply installing the latest .apk, attached below. You do not need to use the patch or the .zip file.
Q: What is the patch for?
A: The patch file contains the source differences needed to recompile the Seeder version of the rngd binary. You only need it if you want to recompile rngd yourself.
Q: What is the .zip file for?
A: The .zip file contains the latest rngd binary. It is intended for ROM builders or those who want to build their own CWMR packages.
Q: Seeder keeps shutting down! Does this mean I have to restart it?
A: The Seeder UI is only used to configure and start/stop the RNG service, which runs in the background. The RNG service is not visible from Android, since it is a native Linux process. You can terminate the UI at any time, and the service will continue running.
Q: Does seeder cause excessive battery drain?
A: Seeder 1.2.7 introduced an RNG service power-saving mode. The process automatically suspends whenever the screen is off. The code is actually in the rngd native binary, so suspend/resume events happen independently of the UI; you can see it in action by attaching to the running process with strace. This means that battery drain while the screen is off is highly unlikely.
While the screen is on, the RNG service simply polls a file descriptor every second, and, when needed, injects a small amount of random data into /dev/random (and calls an ioctl). It's unlikely that this would present enough load to trigger a CPU governor state change at 10mhz (let alone 200mhz), so it shouldn't impact battery life. Having said that, I have received sporadic reports that it does reduce battery life on some devices. They may be coincidental (other software installed at the same time), or due to extra device use while testing. Or, they may be real. If you think your battery drain has increased, shoot me a PM!
Q: How can I see the RNG service Linux process?
A: In a terminal, type: ps | grep rngd
Q: How do I uninstall the .apk?
A: Launch Seeder, and stop the RNG service. Then, uninstall the app as you normally would. Alternatively, uninstall the app, and reboot.
Q: Is seeding /dev/random with /dev/urandom safe?
A: Seeding /dev/random with PRNG-derived data does reduce the quality of its random data. However, it's worth noting that nearly all major OSes except Linux do this. Linux is one of the very few to offer a blocking RNG device. And, at least as of ICS, Dalvik doesn't even read /dev/random, so there is little difference anyway.
Updates
There has been a lot of controversy about Seeder/rngd. In newer versions of Dalvik, nothing touches /dev/random, and yet many users (including myself) still notice a lag reduction. There are theories ranging from kernel lock contention to UI polling load when crediting the entropy pool to simply kicking the governor. And many who believe it's all placebo. I'm trying my best to figure out what exactly is happening, and others are as well.
Someone asked how I arrived at the conclusion I did when I started the thread back in November, and I posted this; I think it might be better served here:
A while back one of the webapps I was hosting on Tomcat (server-side) was experiencing some inexplicable latency and while stracing java I saw it frequently hanging on read()'s from /dev/random. I checked the available entropy, and it was constantly under 250 or so. It was a VM, no HWRNG, so I decided to use rngd to push urandom->random.
Dropped session creation times under load from 5-10 seconds to less than a second.
It's worth noting that Linux is one of very few OSes that have a blocking RNG device. Free/OpenBSD, Windows, etc.. essentially only provide urandom. It's generally considered secure, even for long-term crypto keys, so long as the initial seed is big (and random) enough.
Checked on my device, and saw a few processes grabbing /dev/random. /proc/sys/kernel/random/entropy_avail reporting depleted input pool. Figured it was worth a shot, so I rebuilt rngd for arm (with a few patches, linked on first page), and tried it out. It made a significant difference. Posted it up on this thread, and had a lot of positive feedback. Wanted to get into Android development, so figured.. why not wrap a little UI around it. More positive feedback, so I threw it on the market as well.
I had no idea it would take off like this and was shocked when I saw it Thursday morning. I'm in the awkward position now of explaining why it seems to work for some people, and not for others, especially given the fact Dalvik doesn't have references to /dev/random as of ICS. Theories abound, but it looks like it might be an issue of polling the UI for input events when the entropy pool drops (which never happens so long as rngd is running).
I'm doing this as a hobby. I'm a *nix admin by trade, and can only spend time working on this stuff on evenings and weekends, and the last few weeks have been kinda nuts.
I want to stress to everyone that:
a) It doesn't work the way I thought it did on later Android builds, but it does reduce latency for me and many others even on these builds,
b) I'm offering (and always will offer) Seeder for free to everyone on XDA,
c) Like I say in the market description, if anyone has purchased it and it isn't working, PLEASE email me for a refund (and let me know what device you're on if you're willing).
I was one of the first to root the Captivate glide (my first Android phone), and submitted the A2DP bitpool patch; I was active in the n900 community. I hope everyone understands that I'm doing my best here!
I hope the technique proves useful to people, and if there is in fact contention at the kernel level, I hope it's solved so we all benefit.
Version 2.0.0 attached. No changes.
Version 2.0.0b1 attached. New performance profile selector, I/O queue extender, and power saving control. Improved root checking.
Version 1.4.0 attached. Major refactoring. Service control now fully asynchronous.
Version 1.3.1 attached. No changes from 1.3.1-beta.
Version 1.3.1-beta released. New root check method during ANR-sensitive code.
Version 1.3.0 attached. Proper IntentServices for process control, and notification on upgrade / loss of root / autostart failure.
Version 1.2.9 attached. Yet another update to the upgrade/autostart code.
Version 1.2.8 attached. Asynchronous startup of rngd during boot; this should solve the remaining autostart problems some users have reported.
Version 1.2.7 released. This version introduces a much more efficient suspend-on-sleep mode for rngd.
Version 1.2.6 released. This version reverts the suspend-on-sleep rngd change which may have been contributing to new latency. I'm sorting out a better way of implementing it.
Version 1.2.5 released. This version should fix the autostart failure some users have seen.
Version 1.2.4 released. This version implements a progress bar displaying your currently available entropy, as well as automatic rngd restart on upgrade.
Version 1.2 released. This version implements rngd suspend-on-sleep, and contains minor user interface updates, more robust process and superuser checks, and a new icon (thanks Nathanel!)
Version 1.1 released. This version uses the release signature, so you will need to uninstall the old XDA version first!
This version fixes the issue some users were seeing on later Jellybean ROMs, where the UI would misreport the RNG service status.
Caveats
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). It's worth noting that as of ICS, Dalvik uses /dev/urandom exclusively, anyway, and that Linux is one of very few modern operating systems that even offer a blocking RNG device to begin with.
Support for rngd suspend-on-sleep was added to Seeder 1.2. It should no longer impact battery life while the device is asleep.
There has been a large amount of speculation on why/if this actually improves performance on ICS+ devices. I'm continuing to investigate and will post updates to this thread.
If you try it, let me know how it goes.
ROM builders - feel free to integrate this into your ROMs (either the .apk / application, or just the rngd binary called from init.d)!
If anyone's interested, I've launched a paid app on the Play store for non-xda users. As I add features I'll post the new versions here as a thanks to you guys (and xda community at large for being such a great resource). But if anyone's interested in the market's auto-update feature, just thought I'd mention it.
Cheers! :highfive:
This seems absolutely amazing!I think I'll try it out on the weekend, cheers!
Will this work for cwmr 6
Sent from my SGH-I927 using xda app-developers app
Hi,
I would try this, cause I experienced these lags, and they're really annoying, but I'd really need a simple instruction for what to do. You wrote how you managed to discover what to do and stuff, but I'm lost between the lines. Since I'm kind of a newbie, I'm kindly asking you to write some kind of instruction manual step by step, and forgive my ignorance
Laugher19 said:
Will this work for cwmr 6
Click to expand...
Click to collapse
Not yet. If a few people try it and report positive results, I'll make a flashable image. Stay tuned.
soadzoor said:
Hi,
I would try this, cause I experienced these lags, and they're really annoying, but I'd really need a simple instruction for what to do. You wrote how you managed to discover what to do and stuff, but I'm lost between the lines. Since I'm kind of a newbie, I'm kindly asking you to write some kind of instruction manual step by step, and forgive my ignorance
Click to expand...
Click to collapse
I updated the first post with instructions. Please be careful, though! Let me know if you need more detail.
lambgx02 said:
I updated the first post with instructions. Please be careful, though! Let me know if you need more detail.
Click to expand...
Click to collapse
I got troubles. Using Terminal Emulator I got an error message when I type the 3rd line ("cp /mnt/sdcard/rngd /system/xbin"), it says: "sh: cp: not found"
soadzoor said:
I got troubles. Using Terminal Emulator I got an error message when I type the 3rd line ("cp /mnt/sdcard/rngd /system/xbin"), it says: "sh: cp: not found"
Click to expand...
Click to collapse
Where did you transfer rngd to on your phone? Have to make sure the source path matches.
lambgx02 said:
Where did you transfer rngd to on your phone? Have to make sure the source path matches.
Click to expand...
Click to collapse
It does match, that's why I'm confused.. :\ which terminal do you use?
Will test this later, for sure! If all goes well, may I request permissions to include this with the MIUI build I will be learning to make and attempting to produce?
edit: My phone wasnt particularly laggy before except when playing games, but there is a noticeable difference after executing this binary. Noticed a few small hangs but unsure if it is related to this binary.
I've tested it ... integrated it into my rom and installed ... there was no lag even right after it first boot ... its incredibly smooth ... though I too noticed small hangs ... though I attributed this to the device getting ahead of itself ....
Sent from my SGH-I927 using xda premium
Yeah it kind of seems like its fine after settling a bit. Can't wait to see it in 0.7 thegreatergood.
Sent from my SGH-I927 using xda premium
Ok, everyone. I built a very simple Android app that bundles the rngd binary and starts/stops it. Details in first post.
lambgx02 said:
Ok, everyone. I built a very simple Android app that bundles the rngd binary and starts/stops it. Details in first post.
Click to expand...
Click to collapse
wow ... that was quick ... maybe i should look into a custom tweaking app for my rom ...
Zero Computing said:
Will test this later, for sure! If all goes well, may I request permissions to include this with the MIUI build I will be learning to make and attempting to produce?
Click to expand...
Click to collapse
Of course you can!
edit: My phone wasnt particularly laggy before except when playing games, but there is a noticeable difference after executing this binary. Noticed a few small hangs but unsure if it is related to this binary.
Click to expand...
Click to collapse
Yeah, sometimes we really do hit filesystem I/O limits, but at least this should help once everything has been cached.
Ok, autostart on boot is working.
Seems to be a little faster...game still lagging though guess I will give it time
Sent from my SGH-I927 using xda app-developers app
Trying it out. Definitely noticing faster returns to the home screen. I'm using the ICS "only one" build for galaxy note sgh-i717
.
Sent from my SAMSUNG-SGH-I717 using xda app-developers app
OMG! I downloaded via qr code. and OMG! My phone runs sooo much smoother than before!!
This is one of the best mod for glide ever. Things are much smoother and faster to access. ES file explorer, dialer and contact list comes up so fast.
Thanks for this, really appreciate the mod. I'm keeeping it .
Sent from my SGH-I927
Would this work on other devices?

OUTDATED - [MOD] CrossBreeder - Lag-/Entropy+/DNS+/Tether+/Ads-/Censors-/.bit support!!

See the third post for full information about the functionality of CrossBreeder from the original creator @idcrisis. It's his blood, sweat, and tears that created CrossBreeder. I provided an app, fram, and pixelserv along with other ideas and support.
Thanks.
Please use the 12.1.2013 edition of CrossBreeder attached so I can properly diagnose and support the MOD moving forward.
The source has been pushed to github, the URL is: https://github.com/f1vefour/CrossBreeder
If you wish to help simply clone the project, make changes and create a pull request. I will review/test and commit if they are helpful.
I appreciate all the help I can get, both with the CrossBreeder scripts and with general testing and support in this thread. I have a wife and three semi-wonderful kids so time is limited, I will work on and support the project the best I can with the time I have.
Thanks,
Tim (fivefour)
If you have an issue please get a logcat, post it to pastebin and link it along with your issue. Otherwise I probably can't help you.
I just wanted to drop in and share the application and code I started on before I ran short on time.
The app is on github under my CrossBreeder repo in the entropy branch. For those who want to use it as is you can simply download the APK.
https://raw.githubusercontent.com/f1vefour/CrossBreeder/entropy/bin/CrossBreeder.apk
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
You must first flash the zip in the original post of this thread if you haven't already, the app simply allows you to control the major components of CrossBreeder.
Note:
You must touch the toggle buttons instead of sliding them, if you slide them on/off it will not function.
Enjoy,
Tim
Additional Credit: @bigsupersquid for his improvements of additional switches and for creating the git pull for said changes.
'This software is being distributed with the Aware license. Please allow it to be brought to your kind awareness that buying lesser devices could possibly have a direct positive socio-political impact in some countries where the components are sourced from.
If you like this work please help your friends become aware of this too.' - http://forum.xda-developers.com/showthread.php?t=2521266
----
28/10/2013 -
Hi guys,
Uploaded the current version with development as it was. Should be very usable with some noticeable usability improvements in the process and services ionice and renice and cgroup ( iffy ) space.
Uploaded source of the binaries.
License is BSD unless inherited from GPL.
Sorry for the terrible coding. Maybe some programmer can take it up and do something good with it.
Idcrisis
-----
VERY IMPORTANT - Please take a NANDROID backup of your device before installing this MOD. This MOD is alpha 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.
IMPORTANT - Please uninstall a prior version of CrossBreeder by flashing the attached latest uninstall ZIP before flashing the latest version. Please report problems only with the latest version of the software along with your model number, ROM details and the output of the following command:
su -c "/system/etc/CrossBreeder/CHECK_PROCS"
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.
Also do read the portion below on how to run the REMOVE_DNS_CLIENT command to disable the DNS portion only if you're getting network issues.
QUICK LINKS TO FLASH: CrossBreeder_edition.zip and CrossBreeder_Uninstall_edition.zip - NOTE - Installer clears dalvik cache!
What is CrossBreeder?
This is a new take at improving Android and reducing GUI lag.
It's lightweight and won't consume battery. Users have reported drastic improvements in usability and battery life. It will show noticeable improvements.
All you need to try it is custom recovery. It is for all Android devices. ( not x86 ones ).
This is a combination of 5 different key methodologies to improve the Android experience:
1. It's a big new feature, DNS caching, parallelising and tether boost . 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, parallelising 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 parallel to multiple DNS servers including the two Google DNS servers, the two L3 DNS servers and your two ISP servers and the quickest reply will be served to you, hot and transparently. You can read the rationale for this approach - http://ma.ttwagner.com/make-dns-fly-with-dnsmasq-all-servers/
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.
CrossBreeder 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!
CrossBreeder blocks ads and spyware in an efficient manner by blocking access to the host. It does this using a static block list of known ad sites and behaving as an authoritative DNS server for these sites and redirecting them to a dummy address. CrossBreeder runs a simple web server serving empty images and pages, so ads completely disappear instead of showing an ugly Page/Image Not found error.
You can update this block list from an external specialised tool like Adaway if you need. Here is a guide ( http://forum.xda-developers.com/showthread.php?p=42711244 )
CrossBreeder now includes the bypass censor functionality. This allows you to circumvent DNS based censors as used by most authoritarian countries. This basically works by bypassing your ISP's DNS servers and querying the 2 Google DNS servers and 2 L3 DNS servers only. These are usually faster anyway, more so due to the caching and parallelizing nature of the query. Thus if your ISP is blocking websites without telling you, you have a way out if this. You can enable it using the following command:
su -c "/system/etc/CrossBreeder/ENABLE_BYPASS_ISP"
and rebooting. You can read this for some more info ( http://forum.xda-developers.com/showpost.php?p=42240441&postcount=2748 )
You can also choose your custom DNS servers by updating the /etc/CrossBreeder/REMOTE_DNS file with each custom DNS server in a separate line.
NOTE: CrossBreeder DNS (Boost/Adblock/Censor Bypass) will not work (as in it won't be used ) if your ISP APN contains an entry for a proxy server. Do edit the APN and remove the proxy entry and see if you can browse fine. That will allow CrossBreeder DNS to work.
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 other Ad blocking software actually slows down your system. So it is recommended to use this method instead. Check this out for the demonstration of the slowdown and how to test it yourself - http://forum.xda-developers.com/showthread.php?p=41877518
In order to achieve all this DNS related functionality, CrossBreeder relies on the excellent open source utilities - DNRD and Dnsmasq
2. 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.)
3. Change kernel parameters specially the wakeup threshold ones so read blocks are released instantly and writes never wake up as we have an external entropy generator. And a host of other fail safe and working tweaks from the community for each key subsystem. ( one can look inside /etc/CrossBreeder/zzCrossBreeder ).
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 (Optional) - 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-developers.com/showpost.php?p=37409586&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 ). Advanced users can even try and load the frandom module built for other kernels if they don't have one readily available for their own kernel version using the Punchmod utility. Read this: http://forum.xda-developers.com/showthread.php?p=41920265#post41920265
Your thoughts and experiences welcome and actively solicited.
HOWTO:
- If you want to install it automatically please flash the attached file 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***
1. VALIDATION and TROUBLESHOOTING:
You can check your DNS boost functionality by running the following command:
Code:
getprop net.dns1
It should report 0.0.0.0
Then to verify Adblock you can select any one host from the blocked hosts file using the command:
Code:
tail /etc/CrossBreeder/dnrd_root/master
Pick one from there and browse to it in your browser. You should get a blank space :good:
If you're experiencing any issues with your tethering, then you can first try and disable the tethering using:
Code:
su -c /system/etc/CrossBreeder/REMOVE_TETHER_BOOST
and rebooting.
You can re-enable it with:
Code:
su -c /system/etc/CrossBreeder/INSTALL_TETHER_BOOST
and rebooting.
Similarly if you're getting any issues with browser not reaching pages etc. then you can try and disable the entire DNS speedup functionality using:
Code:
su -c /system/etc/CrossBreeder/REMOVE_DNS_CLIENT
and rebooting.
You can re-enable it with:
Code:
su -c /system/etc/CrossBreeder/INSTALL_DNS_CLIENT
and rebooting.
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. If you want to disable Adblock to save around 3 MB of RAM on low end devices, you can run the command:
Code:
su -c /system/etc/CrossBreeder/DISABLE_ADBLOCK
You can re-enable it with:
Code:
su -c /system/etc/CrossBreeder/ENABLE_ADBLOCK
The biggest improvements are in general usability of apps, both local and network based.
2. You can check your entropy values with this tool:
http://play.google.com/store/apps/details?id=com.promethylhosting.checkrandentropyavail
or use this method for more fine grained graphs: http://forum.xda-developers.com/showthread.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.
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:
Code:
su -c "/system/etc/CrossBreeder/zzCrossBreeder FORCE"
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 still getting issues, you can run the collection script:
Code:
su -c /system/etc/CrossBreeder/CHECK_PROCS
(if it hangs you can close the window and run it again) and post the resultant /data/cb_CHECK_PROCS.log 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:
Code:
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.
GENERAL RECOMMENDATIONS:
1. It is recommended to disable all animations in your System settings and Launcher settings ( or keep them at 0.5 ). Also recommended is to disable haptic feedback and keypress sounds in your system, launcher and keyboard ( especially on low memory phones).
Some software recommendations include the Holo Launcher as a launcher replacement, HoloWeb Browser ( version 1.4 only) or Naked browser and exDialer as a dialer replacement.
These recommendations are general in nature and are not required for normal CrossBreeder functionality.
NOTE FOR ROM/KERNEL DEVELOPERS:
Please feel free to include CrossBreeder in your ROM/kernel. Do include a link to this thread in your credits. The best way to include it has not been given much thought so I'd like to recommend that you install it as the last thing and then package /system completely. If you are distributing files alone, then I guess the best way would be to include (from a ROM with CrossBreeder installed) :
1. /system/etc/CrossBreeder - The entire directory structure with perms intact
2. /system/bin/dnsmasq
3. /system/bin/dnsmasq_dhcp
4. /system/xbin/haveged
5. /system/etc/hosts
6. /system/bin/debuggerd
7. /system/xbin/debuggerd
8. /data/rngd.pid ( as a directory with permissions intact. Important or the device will crawl if your user installs Seeder/RNGD ).
9. Remove any /system/[x]bin/*rngd
Also do make sure that the debuggerd entry exists in /init.rc and before the zygote/system_server entry.
And it is a very very strong recommendation to use a CrossBreeder version after 6.30.13. Earlier versions just don't cut it. You and your users deserve better.
Credits:
1. This software is dedicated to the entire Open Source community.
2. DNRD
3. DNSMasq ( http://thekelleys.org.uk/dnsmasq/doc.html )
4. Havege ( http://irisa.fr/caps/projects/hipsor/ )
5. Seeder. ( http://forum.xda-developers.com/showthread.php?p=33999592 ). Thunderbolt tweaks for I/O tweaks and governor tweaks ( http://forum.xda-developers.com/showthread.php?p=23827087 )
6. V6 Supercharger for network buffer size tweaks and always for a general idea of what to do ( http://forum.xda-developers.com/showthread.php?t=991276 ).
7. Pixelserv ( Thanks Fivefour and Wonderwoofy for the referrals)
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.
.
First!
Woohoo!!
Back to the topic, your claim seems legit. I'll look into this n try it out on my devices. Thanks~
idcrisis said:
Hi,
This is just a suggestion to reduce lag on Android devices based on others' findings that the blocking /dev/random device may be the cause of the significant lag on most Android devices.
Why can't we just remove the /dev/random device and link it to /dev/urandom?:
1. mv /dev/random /dev/random.ORIG ; ln /dev/urandom /dev/random
2. Stop the seeder service if it's running.
Wakelock and battery drain is probably not a concern as there's nothing running in the background. Also this may be better than feeding /dev/random from external sources as the device is now non blocking.
Saw this on some JDK optimisation site and decided to try it. I'm getting some good results on all Android devices I've tried this on.
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.
I guess usability is more important than catering to a one in a impossibillion chance and a billion devices performing sub optimally.
Your thoughts welcome.
Ref:
http://forums.oracle.com/forums/thread.jspa?threadID=991619
http://itonguard.com/20090313/weblogic-starts-slow/
Click to expand...
Click to collapse
hi.i would like to try.how to do that? do you have a script or something? thank you.
Re: [MOD] Link /dev/random to urandom for lag reduction
Hi,
You can adb into the phone and type 'su' and enter and then run the command in the first step:
mv /dev/random /dev/random.ORIG ; ln /dev/urandom /dev/random
Sent from my Transformer TF101G using xda app-developers app
idcrisis said:
Hi,
You can adb into the phone and type 'su' and enter and then run the command in the first step:
mv /dev/random /dev/random.ORIG ; ln /dev/urandom /dev/random
Sent from my Transformer TF101G using xda app-developers app
Click to expand...
Click to collapse
i tried with terminal emulator but it is not working...
have to do it with adb so?
thank you
Re: [MOD] Link /dev/random to urandom for lag reduction
desalesouche said:
i tried with terminal emulator but it is not working...
have to do it with adb so?
thank you
Click to expand...
Click to collapse
Sounds like a personal issue to me.
Re: [MOD] Link /dev/random to urandom for lag reduction
desalesouche said:
i tried with terminal emulator but it is not working...
have to do it with adb so?
thank you
Click to expand...
Click to collapse
In terminal emulator, hope you're running 'su' and enter first before running the command.
Sent from my Transformer TF101G using xda app-developers app
Neat idea! Trying now. Thank you.
Edit: It's so hard to tell with these kinds of things whether they are working or it's placebo. If it is working, it is definitely not like an "in yo face" difference, on my device at least. Before it was pretty smooth with an occasional stutter here and there. Now it is pretty smooth with an occasional stutter here and there. It didn't blow up so that's a win.
Curious to hear what results other have though.
Re: [MOD] Link /dev/random to urandom for lag reduction
DEF3NDER said:
Neat idea! Trying now. Thank you.
Edit: It's so hard to tell with these kinds of things whether they are working or it's placebo. If it is working, it is definitely not like an "in yo face" difference, on my device at least. Before it was pretty smooth with an occasional stutter here and there. Now it is pretty smooth with an occasional stutter here and there. It didn't blow up so that's a win.
Curious to hear what results other have though.
Click to expand...
Click to collapse
Hi,
Thanks for your feedback.
I just updated the post with the accompanying kernel parameters. You can try the whole thing as a bunch perhaps and maybe create an init.d script and reboot. Then after ensuring that it actually ran on boot, you can perhaps test.
Sent from my Transformer TF101G using xda app-developers app
Re: [MOD] Link /dev/random to urandom for lag reduction
I don't know how to make an init.d script but can I just run that code in adb for a temporary test? I tried that and I could swear it made a difference.
Sent from my SPH-D710 using xda premium
Re: [MOD] Link /dev/random to urandom for lag reduction
DEF3NDER said:
I don't know how to make an init.d script but can I just run that code in adb for a temporary test? I tried that and I could swear it made a difference.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Yeah sure, you can run it in ADB. The settings will then remain till the next reboot.
Sent from my Transformer TF101G using xda app-developers app
Re: [MOD] Link /dev/random to urandom for lag reduction
OK that's what I thought. Been running these settings for a few hours now with good results.
Gonna post a link to this thread over in the e4gt forum and see if everyone gets the same results.
What devices have you tried this on?
Sent from my SPH-D710 using xda premium
DEF3NDER said:
What devices have you tried this on?
Click to expand...
Click to collapse
Till now it's been tried on:
- Sony Xperia X10 Mini
- Asus TF101G
- Sony Xperia X10
- Samsung P1000
All with decent results.
Re: [MOD] Link /dev/random to urandom for lag reduction
Is setting write up threshold to 2048 the best idea? Stock is 128 and using a higher value resembles what we may want to call a minimum entropy value. Using 2048 one should not see entropy drop below that value. Using that high a read wake up threshold keeps enropy filling up till it caps and stops at 4096. It likely is smoother to have a more default write wake up threshold as the system doesn't need to wait for the minimum of 2048 it just starts using entropy right away on the default 128. By time system boots im always at 1000+ plenty and as day of usage progresses it climbs to 2-3k. 2048 may be more than necessary. Zepplinrox uses 1366 and 128 and his explanation made sense to me. I also had a smoother experience on stock write uo threshold. Ive tried above and below 2048 also. The rest all seems to be what has been discussed like the randomize va space etc. I made an initd for this last month too... this seems just as useful as seeder apk etc but Ive seen people claim this method is slower. To me they both work and this way has no added apk or overhead to do so.
GS3 L710 4.2.1 AOSP Kt747 2.1Ghz ROW/Ktoonservative *Tapatalk
Re: [MOD] Link /dev/random to urandom for lag reduction
mw86 said:
Is setting write up threshold to 2048 the best idea? Stock is 128 and using a higher value resembles what we may want to call a minimum entropy value. Using 2048 one should not see entropy drop below that value. Using that high a read wake up threshold keeps enropy filling up till it caps and stops at 4096. It likely is smoother to have a more default write wake up threshold as the system doesn't need to wait for the minimum of 2048 it just starts using entropy right away on the default 128. By time system boots im always at 1000+ plenty and as day of usage progresses it climbs to 2-3k. 2048 may be more than necessary. Zepplinrox uses 1366 and 128 and his explanation made sense to me. I also had a smoother experience on stock write uo threshold. Ive tried above and below 2048 also. The rest all seems to be what has been discussed like the randomize va space etc. I made an initd for this last month too... this seems just as useful as seeder apk etc but Ive seen people claim this method is slower. To me they both work and this way has no added apk or overhead to do so.
GS3 L710 4.2.1 AOSP Kt747 2.1Ghz ROW/Ktoonservative *Tapatalk
Click to expand...
Click to collapse
Hi,
This method is different from Zepplinrox as /dev/random is now a link to /dev/urandom and is thus non blocking. So the idea is to take the best of all worlds.
I think your suggestions for the read and write values seem valid when there's no entropy generator but may need some analysis on top of Zeppelin's observations due to the changed nature of the random device. I have changed the OP with your suggestions as there's no rngd around to fill 2048 of entropy very easily.
This method is different to Seeder as nothing is running in the background but suffers from the same drawbacks of the Zeppenlin's method that the entropy pool may be getting populated naturally slower than what rngd would have. Which is where it might make sense to run rngd too once-off every 5 minutes.
Or maybe replace rngd with havenged.
Thanks a lot for your feedback.
Sent from my Transformer TF101G using xda app-developers app
Re: [MOD] Link /dev/random to urandom for lag reduction
idcrisis said:
Hi,
This method is different from Zepplinrox as /dev/random is now a link to /dev/urandom and is thus non blocking. So the idea is to take the best of all worlds.
I think your suggestions for the read and write values seem valid when there's no entropy generator but may need some analysis on top of Zeppelin's observations due to the changed nature of the random device. I have changed the OP with your suggestions as there's no rngd around to fill 2048 of entropy very easily.
This method is different to Seeder as nothing is running in the background but suffers from the same drawbacks of the Zeppenlin's method that the entropy pool may be getting populated naturally slower than what rngd would have. Which is where it might make sense to run rngd too once-off every 5 minutes.
Rngd from Seeder seems to be taking 60-70% system CPU and therefore possibly more battery. Top shows that it's certainly nowhere close to an idle system. I'm pretty sure all sorts of wakelocks etc will be disturbed in that scenario.
The next step for this method would be to bring rngd cpu usage down to negligible (maybe by removing all customisations and running once every 5 minutes instead of 1 second) and use that in conjunction. Or maybe replace rngd with havenged.
Thanks a lot for your feedback.
Sent from my Transformer TF101G using xda app-developers app
Click to expand...
Click to collapse
I see because of the symbolic link it does differ from Zeppelinrox method. So with the symbolic link method why is it necessary to raise write or read wake threshold from from default?
Yes your idea of having seeder run every five minutes makes sense as entropy isn't drained in most cases by that much.
With no link and no seeder 1366 read wake and 128 write wake, entropy doesnt drop only accumulates and takes a lot of actual entropy drain to reach 4096 and stays there. Why are read wake needed to differ from default on the symbolic link method?
Edit: sorry did i mis read and think you wrote 2048 write wake up in the OP? Or was it updated i am confused now.
Re: [MOD] Link /dev/random to urandom for lag reduction
mw86 said:
I see because of the symbolic link it does differ from Zeppelinrox method. So with the symbolic link method why is it necessary to raise write or read wake threshold from from default?
Yes your idea of having seeder run every five minutes makes sense as entropy isn't drained in most cases by that much.
With no link and no seeder 1366 read wake and 128 write wake, entropy doesnt drop only accumulates and takes a lot of actual entropy drain to reach 4096 and stays there. Why are read wake needed to differ from default on the symbolic link method?
Edit: sorry did i mis read and think you wrote 2048 write wake up in the OP? Or was it updated i am confused now.
Click to expand...
Click to collapse
Yeah I changed it according to your suggestions. Its WIP
Write doesn't seem to affect entropy values much but read does. But write may affect usability so I'll take your word for it.
Values still needs to be increased because I'm told the blocking /dev/random is not the only issue, the entropy pool still needs to be maintained in an efficient manner.
You can see how the available entropy falling even with the link in place.
Hence the attempt to use all 3 methods.
Sent from my Xperia X10 using xda app-developers app
Re: [MOD] Link /dev/random to urandom for lag reduction
I rebooted my phone and then attempted to adb the code with the updated values. Both codes give me an error that says "link failed file exists." Does that mean they stuck through the reboot or what should I do?
Sent from my SPH-D710 using xda premium

[APP][AOSP Root 4.4] AudioTricks / VolumeTricks

Thread is under construction.
WARNING: There have been 3 reports so far of failure to boot after installing the Shim HAL. This sort of problem should be assumed possible at this early "Alpha level research project" phase.
Please don't install if you have stock recovery or don't know what recovery is.
Please don't install if you are nervous. Wait a while for the bugs to get worked out and info compiled.
Don't install if not confident in your technical skills.
Don't install if you might freak out if your phone gets disabled for a little while.
For bootloops or to fix or remove: http://forum.xda-developers.com/showpost.php?p=52931431&postcount=67
Post #2 has download links and instructions: http://forum.xda-developers.com/showpost.php?p=52765309&postcount=2
Since interest has ramped up quickly, I've published a 99 cent "donate" version on Play: https://play.google.com/store/apps/details?id=fm.a2d.av (Wait until the $200 placeholder price disappears, LOL.)
I'm not sure "donate" is the right word, but it's the exact same app I'm distributing and will continue to distribute for free (for at least X months to a year ??), so nobody is under any obligation to buy to get the app. Updates will be automatic via Play though.
============================================================
AudioTricks / VolumeTricks is a new kind of "audio mod" that is HAL Shim based.
At present, it can raise or lower output volume and microphone input gains digitally.
Only works on ICS Android 4.0.3 and later. AOSP ROMs such as CM11 or other KitKat very much preferred. Many stock ROMs 4.1-4.3, won't work, especially HTC.
Post 2 has download link and instructions.
Disclaimer: Please understand that this is the first public release of this app. Although I endeavour to make my apps as safe as possible, one never knows whether or not some silly bug or unusual interaction might pop a speaker, headset or whatever. I have over 20 devices that I use for testing my apps and I try to "torture test" as much as possible. So if something goes pop, I'll be very sorry and do everything I can to analyze and fix any problems. If you're "not sure", just wait and more adventurous people will do the early testing needed to help ensure nothing breaks.
By it's very nature, any app that can boost volume creates risk for audio output devices as well as your ears.
For those who know my Spirit FM apps, this is a bit of a move for me. Spirit1 and Spirit2 both are alive and well, but the future of FM radio on Android seems to be dimming the last few years. I'll be splitting my time between apps based on the support I get.
Making this HAL Shim based provides some advantages and disadvantages over other methods of changing volume or gain.
Advantages include:
- Audio modification even for apps, games, etc. that use the low level Android NDK OpenSL ES API.
Disadvantages:
- Analog controls, if available, may be better.
AudioTricks is intended to be my name for a group of small apps, and/or a "master app" that includes the features of them all.
VolumeTricks is the first such small app to be released, and is focused on output volumes and input gains.
VolumeTricks may not be limited to the "HAL Shim" approach to audio mods. It may also include ALSA, ALSA UCM, and other methods to manipulate audio.
At this time, the app is free, but Copyright Me. I'll likely maintain a free version for some time, but I gotta eat too so there will be a paid version on Play when it seems ready.
At this time, this app has been tested mostly on CM11 and a few other AOSP ROMs. Many stock ROMs won't work, especially HTC.
The app is currently set to only work on Android KitKat 4.03+.
I haven't tested ART much yet, mostly Dalvik, but it's working OK on my One M7 w/ ART. Shouldn't be too hard to fix any ART issues.
So what the heck is a "HAL Shim" ??
Android uses HALs (Hardware Adaptation Libraries) as an API between Google's Android code and the phone OEMs hardware specific code. Android Audio has at least 2 HALs, one for "Policy" (selects outputs, inputs and some other stuff) and one for the audio transfers. The HAL Shim in this app works with the latter "Primary" HAL for audio transfers.
A SHIM is a component that sits between 2 other components and pretends to be the higher component as well as the lower component. Hierarchy:
Android AudioFlinger
------------------------
HAL Shim
------------------------
Primary Audio HAL
So, the HAL shim pretends to be an audio HAL to Android's AudioFlinger. AND it pretends to be Android AudioFlinger to the Primary Audio HAL.
The HAL shim acts as an intermediary. It can pass everything back and forth unmodified which makes it invisible. Or it can modify anything passing between, including the audio data.
Isn't there a better way to do this ? No, I don't think so. I don't want to be modifying a bunch of HALs on thousands of ROMs. I also don't want to be modifying AudioFlinger on those same hordes of ROMs.
What else can be done with the HAL Shim concept, besides "Volume Tricks".
I think some of these may be feasible:
- Recording all inputs and/or outputs. Maybe even both sides of phone calls.
- Analyze, Visualize, Equalize, Effects-ize all or many inputs and outputs.
- Bypass DRM.
- Maybe a method to modify (eg. encrypt / decrypt) phone call audio, inbound and outbound; possibly via pretending to be a BT headset....
Note that, at present, the HAL shim only works with the "Primary Audio Interface". Small-ish mods could do the same for HDMI, A2DP / BT, USB Audio, "Remote Submix" and whatever new audio devices Google defines.
Post 2 download link and instructions.
If a boot loop would ruin your day, please see warnings at top of post #1 and don't install this app until more mature.
Disclaimer: Please understand that this is the first public release of this app. Although I endeavour to make my apps as safe as possible, one never knows whether or not some silly bug or unusual interaction might pop a speaker, headset or whatever. I have over 20 devices that I use for testing my apps and I try to "torture test" as much as possible. So if something goes pop, I'll be very sorry and do everything I can to analyze and fix any problems. If you're "not sure", just wait and more adventurous people will do the early testing needed to help ensure nothing breaks.
By it's very nature, any app that can boost volume creates risk for audio output devices as well as your ears.
Android seems to have a ridiculously / hilariously complex audio system... LOL.
v140530: http://d-h.st/2lc#.U4hLA3KBugY
Fixes a LOT of issues, especially SU / mount issues with stock restrictive SELinux like Samsung stock 4.2+.
As always, Press Update/OK to update Shim HAL each new release.
- SU / root fixes, especially for SELinux Samsung 4.2+.
- Fine control removed.
- Coarse control range changed from -60 to +60 db ; now 0 to +36 db. Maybe I'm the only one w/ a need for gain reduction below 1.0 or 0 dB.
- Many other fixes.
Version av-140526:
- Fix the /system/addon.d/ ROM update backup/restore script used during ROM updates.
Version av-140525:
- Automatic gain reduction is now sticky, so reduces distortion when maxed. Touch sliders to reset.
- Numbers for VU.
- After amplification VU display.
- Sliders caiibrated in dB.
May not work on stock ROMs, especially older Android versions and HTC stock ROMs.
Starting this app for the first time should request root and prompt to install the HAL Shim and an addon.d backup/restore script to allow it to survive ROM updates.
After the Shim is installed, the "system_server" is killed in order to activate the Shim. Sometimes it may be better to completely reboot the phone, especially with effects, visualizers and player apps running at install time.
Once the app and Shim are installed, the app shows a "Remove" button that removes the Shim, should it be causing you problems or you just don't want/need it. The button will change to "Update" with newer versions of the app/Shim.
Sometimes, like on ROMs with old Legacy HALs, state detection won't work and the button will only offer to Install with no way to remove. As of v1.0.3 go to the 2nd tab (swipe from right to left) and there is a permanent Remove button.
If you remove the app without removing the Shim, the shim will remain, but should be mostly dormant. The easiest way to remove the Shim would be to reinstall the app and select the Remove button.
To manually remove the Shim and addon.d script, something like this should work from a connected PC with adb shell:
Code:
adb shell
su
mount -o remount,rw /system
ll /system/lib/hw/audio.primary.*.so
# !!!! Note the name of the HAL, like audio.primary.msm8960.so and use this name in next line. (If only audio.primary.default.so exists, use that.)
mv /system/lib/hw/audio.primary.orig.so /system/lib/hw/audio.primary.msm8960.so
rm /system/addon.d/99-audiotricks.sh
mount -o remount,ro /system
reboot
Using the app:
See post #3 for usage instructions.
Usage:
If a boot loop would ruin your day, please see warnings at top of post #1 and don't install this app until more mature.
Disclaimer: Please understand that this is the first public release of this app. Although I endeavour to make my apps as safe as possible, one never knows whether or not some silly bug or unusual interaction might pop a speaker, headset or whatever. I have over 20 devices that I use for testing my apps and I try to "torture test" as much as possible. So if something goes pop, I'll be very sorry and do everything I can to analyze and fix any problems. If you're "not sure", just wait and more adventurous people will do the early testing needed to help ensure nothing breaks.
By it's very nature, any app that can boost volume creates risk for audio output devices as well as your ears.
To select output volume or input gain, swipe left or right or use the tabs. The primary/left screen is for output volume.
Set the enable switch to ON to enable volume/gain adjustments.
The Left and Right indicators are logarithmic/DB audio level indicators, updated every 0.1 seconds with the peak audio level. These show the signal level before amplification. If they are VERY near the full width of the screen, there is little amplification that can be reasonably done. (But 80-90% leaves some room, given the exponential nature.)
For no boost, IE an amplification factor of 1.0, the Coarse and Fine controls should both be set to 0 at centre.
Setting Fine all the way right to +6 dB doubles audio power, setting to -6 dB halves audio power.
Setting Coarse to +30 dB creates an amp factor of 32, assuming Fine is set to 0. Setting -30 dB is about 0.03.
Note that an amp factor of 32 is very high, unless you are dealing with very low input signals.
The Shim detects when the signal will overload, and reduces the amp factor as needed to prevent overload/distortion. To raise it again, use the UI to reset.
There are some "streams" for which amplification will not work. I will support as many stream flags (such as Fast) as I can; remains to be seen; this is still kind of a "research project" at this stage.
At present, all streams are amplified the same amount. Per stream or stream type amp factors will be supported.
Just go to post #11 on next page.
Nothing to see here, move along.
Technical info to fill in later.
Pay no attention...
... to the man behind the curtain...
8 is lucky 7 + 1; even better.
Trouble-shooting info.
#10 is always "Future".
Comments and questions start here.
Volume control?
Hi Mike,
You are making me curious about this new project of you.
I bought a long time ago this app for level control. It is doing his job, but has lack of storing the settings and sometimes still adjust (unwanted) the volume.
Count me in for testing :fingers-crossed:
Edit: get an error parsing the apk :crying:
Rinoceros said:
Hi Mike,
You are making me curious about this new project of you.
I bought a long time ago this app for level control. It is doing his job, but has lack of storing the settings and sometimes still adjust (unwanted) the volume.
Count me in for testing :fingers-crossed:
Edit: get an error parsing the apk :crying:
Click to expand...
Click to collapse
Welcome to my new thread and app.
AFAICT, that app mostly just manipulates standard Android volume levels, which is fine, but not much different than the standard volume control.
I just downloaded my new app linked http://d-h.st/plb myself (7 downloads in first 2 hours now), and it installs fine on my One M7, and matches bit for bit the 1.0 version installed on my test phones.
So you're on stock based InsertCoin ROM ?
As long as it's Android 4.4 KitKat (API Level: 19), it SHOULD parse and install OK.
The binaries are for ARM devices only (ie 99+% of Android devices). Intel x86 or MIPs can't work (at present.)
I can't think of any other reason it won't parse, unless your copy is corrupted. This is the MD5 I get:
Code:
md5sum ~/Downloads/av-release.apk
2c8328e8cbe1f585f3b1634e36200c8f /home/mike/Downloads/av-release.apk
I'm happy to hear anyone else's stories of success or failure, but I'll need a good 7 hours of sleep first.
------------
Happy Victoria Day to all fellow Canadians & CommonWealther's, and Good Long Weekend to all those with a day off of work this Monday. Finally nice weather here lately...
mikereidis said:
I just downloaded my new app linked http://d-h.st/plb myself (7 downloads in first 2 hours now), and it installs fine on my One M7, and matches bit for bit the 1.0 version installed on my test phones.
So you're on stock based InsertCoin ROM ?
As long as it's Android 4.4 KitKat (API Level: 19), it SHOULD parse and install OK.
Click to expand...
Click to collapse
Aha, here might be my problem. My InsertCoin is still the good old JellyBean 4.3 (I am happy with this version and had nearly no problems and all the stuff is working on this one. So if it ain't broke; don't fix it )
The binaries are for ARM devices only (ie 99+% of Android devices). Intel x86 or MIPs can't work (at present.)
I can't think of any other reason it won't parse, unless your copy is corrupted. This is the MD5 I get:
Code:
md5sum ~/Downloads/av-release.apk
2c8328e8cbe1f585f3b1634e36200c8f /home/mike/Downloads/av-release.apk
I'm happy to hear anyone else's stories of success or failure, but I'll need a good 7 hours of sleep first.
Click to expand...
Click to collapse
Got the same MD5: 2C8328E8CBE1F585F3B1634E36200C8F
I am confused or it doesn't work on 4.3
Sleep well!
4.4
Does it work on Android below 4.4?
Can't wait to try it. Your work with Spirit was amazing, so I am sure this is too.
Thanks for the effort, but it ain't working on i9100, cm 11/kk 4.4.2. Tried to increase volume a little (level was about 3, but as you know, first written value is 5), there was a very strange noise as I tried to.increase volume via volume buttons while listening music via headphones. It was a crackling noise, looked to me like the phone is going to get damaged, so I removed HAL and uninstalled your app.
Rinoceros said:
Aha, here might be my problem. My InsertCoin is still the good old JellyBean 4.3 (I am happy with this version and had nearly no problems and all the stuff is working on this one. So if it ain't broke; don't fix it )
Got the same MD5: 2C8328E8CBE1F585F3B1634E36200C8F
I am confused or it doesn't work on 4.3
Sleep well!
Click to expand...
Click to collapse
Here's a v1.0.2 test release that will install on Android 2.2+: http://d-h.st/QfV
Draw Em! said:
Does it work on Android below 4.4?
Click to expand...
Click to collapse
It may. Here's a 2.2+ test release: http://d-h.st/QfV
Chances are lower the lower the Android version. I'd recommend 4.1+, but it may work on some Android 4.0 as well. Android 2.3 GB and older used a "legacy HAL API" which won't work.
At this time it's a "bleading edge" release, and most people comfortable with that have been running 4.4 the last 6 months, I'd think.
pilgrim011 said:
Thanks for the effort, but it ain't working on i9100, cm 11/kk 4.4.2. Tried to increase volume a little (level was about 3, but as you know, first written value is 5), there was a very strange noise as I tried to.increase volume via volume buttons while listening music via headphones. It was a crackling noise, looked to me like the phone is going to get damaged, so I removed HAL and uninstalled your app.
Click to expand...
Click to collapse
It sounds like it was working then, as it does for me on my 9100 with CM11.
In many circumstances audio amplitude will already be maxed out, and trying to increase volume will only result in the automatic gain control kicking in with a different value many times per second, thus leading to distortion and other audio "artifacts".
This solution is more helpful when, for some reason, the audio source material doesn't use the full 16 bits of amplitude. If the VU indicators in the app are showing peaks around 80-90% of the screen width, when the normal volume control is maxed, then amplitude is probably above 16,000 and could be near the absolute peak around 32,000.
For example, some audio may have been recorded that only peaks around 4,000 - 8,000, and for this, and amp factor of 4 may be useful. Another possible solution for this scenario is to enable Compression in DSP Manager or whatever. As with everything, this has pros and cons.
In many circumstances, when possible, it's better to raise analog gain, like Voodoo sound does on the Galaxy S GT-I9000. I'm going to look into this, but this sort of solution is very audio chip dependent.

My Daily Driver Hall of Fame

Index (use Ctrl + F)
Introduction
Panache DD HoF Requirements
Physical upgrades
After Root Report
2014 Stepp_aospX Editorial Correction
Stepp_aospX Troubleshooting Final Corrections
Beauty Shots -- Phone Screenshots
Click to expand...
Click to collapse
Introduction
It's 2014, and stock GingerBread is so boring, so you googled and found the best surviving Glacier rooting guide, upon the newest ROM list, but you saw the entries covered with dust, links as old as Fred Flintstone rolling towards extinction in a dinosaur powered car. You said to yourself, It's too late, the phone's dead.
Your lead is cold, and you don't feel like playing thread detective, so allow me to present, your best answer since the last phone retirement case...
Panache DD HoF Requirements
Well I do say old chap, we ought to have standards coming from a Titanic class phone, and thus...​
Stability - The least crashes, freezes, and bugs.
Function - Every hardware function works with software. Buttons! GPS! BlueTooth! WIFI! Data! Camera! Speakers! Light! Sound! Action! all working as intended.
Battery - Efficient Kernel, combined with ROM must match or exceed stock battery uptime.
Compatibility - Common apps on the market works on the phone. (Youtube, MX player, Browser, etc)
Physical upgrades
We can rebuild him, with a bigger battery!.​
SD Card: SanDisk ultra 64GB microSD from stock Samsung 8GB (iirc)
This was just an adhoc cheap fill one day on amazon.
Battery: Mugen 1700mAh Thunderbolt slim (similar size for MT4G/Panache) from stock 1400mAh OEM
Why? Stock died on 2013, charge held for literally 1 hour max, then battery started bulging.
Improvements: 48 hours uptime on light use, stock gingerbread 2.3
Also: Slightly bigger than stock 1400mAh, in length, fits very tight, no extra backcover required.
Alternatives: Anker batteries, use the search, I've heard they're the best upgrade and bang for your buck.
After Root Report
How I ate the breadcrumb trail, ROM after ROM; optional read..​So the first thing I did was find the newest version of android and the most recent candidate.
aospSX, which was the Synthetic.Nightmare's aospX's work carried over to android 4.2.2 (Jellybean) by SteppNasty.
Looked and felt amazing, however impassable amounts of issues lead me to switch, including malfunctioning stock camera, firefox, dolphin, and stock browser stops responding, and 1-bar signal which plagued Android 4.2 (term: "signal drop" if you want to search).
So I searched for the word "stable"...
CM 7.2, the most stable version of Gingerbread, the stability and battery was amazing, but it didn't feel as good as the JB ROM before.
So I searched again, and I found a like-minded user from the past with similar objectives, Darkgiant revealed through a conversation to another user about the most stable ROMs.
The clue is CM10.0 by either 0.0 or coderz, but one is a dead link, the other have outlined issues after it got discontinued.
So I went back, double guessed myself on the older versions of Steppnasty's ROM.
2014 Stepp_aospX Editorial Correction
For installation of aforementioned ROM, some non-obvious things he didn't mention..​To summon the proper Steppnasty's ROM for your android... you must:
Install the Stepp_aospSX Final
Fix Permissions
Reboot and setup phone settings (Language, google sync etc.,)
Reboot into recovery
Wipe Cache, Dalvik Cache
Install ICS GAPPs
Reboot and use the phone!
Trouble with ICS GAPPs ? (Based off of my anecdotal evidence).​After ROM installation from downgraded Froyo, ICS GAPPs wasn't applicable (md5 double checked)
I just used the phone as is, later on, somehow I was able to install the ICS GAPPs.
Incase you can't use GAPPs, know this may be temporary and you're missing these features (afaik):
Facial recognition via lockscreen
Software EQ for stock Music player
TLDR:
aospSX 1.0.0 -- Android 4.2.2 (JellyBean) -- newer version -- Unstable
Stepp_aospX Final -- Android 4.0.4 (IceCreamSandwich) works only without GAPPs.
Although the ICS version (Stepp_aospX) is old, it's better and not much different, a halfway mark between GB and JB.
Stepp_aospX Troubleshooting Final Corrections
Radio, bugs/glitches, GPS locking, Perma-Voicemail-Notification, My battery omg my battery :crying:!.​
Only swap radio files if absolutely necessary, and when you do, check the md5 sum every hair of the way.
The Radio Version, most important function to your phone, receiving calls from the network towers, has been changed! Haha I should've posted this before the link to rooting. It's when you were downgrading to Froyo (iirc), because no other ROMs I've installed changes radio, this ROM didn't change it either. But no worries, there are vast lists of these radios, available to download either here (CM Wiki) or here (dropbox by acefsw). Just use adb to push the PD15IMG.zip file as usual to sd for a recovery install. The difference between your signal, if it's even different, should be almost immediate after a reboot.
Bugs/Glitches:
Matrix/Zalgo Text // looks like y͏̴̡͢o͜͞҉̴͢u̢̨̕͝'̸ĺ̛͞͝l̕͜ ̸̵k̢͟͟͢ǹ̢̡̕͟ơ̸̡w̨͏҉̡̧ // Fix via rebooting
GPS Never-lock // Fix via dorqus
For GPS, you can also try FasterGPS the app.​
Perma-voicemail-Notification on every reboot // Temp fix: Settings => Manage Apps => Phone => Clear Cache.
Trying permanent fixes now, I've heard if you get voicemail, delete it from voicemail center, it'll work.​
Battery Drain from wakelock // GOOGLE PLAY SERVICES! // To Fix, either task it or filter it (require xposed framework) (For more information on battery, I'll make a separate section later on for wakelocks to filter by, to reduce drain, it allows battery drain only from user permitted activity apart from being idle)
Screen turns off automatically on camera mode and youtube videos // Fix: use screenOn app
Notification cannot be manually toggled off like app settings of JB. // No Fix, hope your app isn't as bad as my Lux D:
Headphone Heat: No bug noticeable, with ATH-M50 headphones, Skullcandy earbuds, Speaker phone over long hours, no over heating.
Extra tips while Unix Editing:
Code:
adb remount
to change permissions of /system/ folder files
[in shell]
Code:
mv renameMe.file renamed.bak
renames .file to renamed.bak, useful for creating backups before pushing gps.conf.
Code:
rm renameMe.file
deletes renameMe.file
Code:
cd ..
cd space
Moves up a directory outside of current folder
Moves into space folder
Code:
ls
lists items in folder
Final Result
Subject to change from threats, bribes and future tweaks/experiences.​
:good: Stability - 9/10, only zalgo text so far...
:good: Function - 8/10 Every hardware button works from stock apps, two of the cameras, LED, Flash, light sensor, microphone, voice search, gps, bluetooth, speakers, mobile data, backup-sync, auto-rotate all work well, I only wish some functions could work without tweaking, ie GPS and notifications bug.
Battery - 5/10 Efficient options provided with smartassv2 and selectable others, however the phone is awake more than necessary, see batstats Currently I'm trying to figure out what wake trigger is doing this (apart from google play) to see if it can beat <20 hour battery time from stock >48 hours with light usage.
Problem solved, new section write-up incoming soon...
:good: Compatibility - 10/10 Stepp_Nasty advised some amazon apps doesn't work, I don't dwell on those fields, being a canadian. However it's awesome that this works just as well as the stock gingerbread, and your camera resolution increased. See comparison (2592px × 1456px vs 2592px x 1936px).
This is the best ROM I can find, if you have another favourite, please list it and give it a rating, because in a few years this phone is going to the grave yard, and whoever is looking here now, still have a glimmer of hope!
Shoutout to XDA Glacier, past and future posters, for giving us the resources to build on this awesome phone.
Future Edits: Format; txt y u no wrd wrap, More Links, Updated Root Guide, Experience/Final Result, more Bugs/tweaks.

Categories

Resources