Jump to content


Photo

[ROM][4.4.4][ALL] SlimKat 8.8 UNOFFICIAL [21/10/2014]


3737 replies to this topic

#2441
juanpablocastillo

juanpablocastillo

    Regular

  • Members
  • PipPip
  • 107 posts
  • Gender:Male
  • Devices:Huawei Ascend Y300
chil: One question. Is frandom enabled by default in the kernel?

  • 0

#2442
chil360

chil360

    Enthusiast

  • Members
  • PipPipPip
  • 191 posts
  • Devices:Huawei Ascend Y300-0100

chil: One question. Is frandom enabled by default in the kernel?

Yes and no! Frandom is enabled in the kernel but it's not being used. This is something I have been trying this week. After looking around at other custom roms with frandom, I have found that they use an init script like the one below to redirect all calls to random/urandom to use frandom instead. At the moment I'm not using this script so frandom isn't being used.

#!/system/bin/sh

L="log -p i -t FRandom"

if [ -c "/dev/frandom" ]; then
	# Redirect random and urandom generation to frandom char device
	$L "Fast Random Generator (frandom): Initializing..."
	rm -f /dev/random
	rm -f /dev/urandom
	ln /dev/frandom /dev/random
	ln /dev/frandom /dev/urandom
	chmod 0666 /dev/random
	chmod 0666 /dev/urandom
	$L "Fast Random Generator (frandom): Ready!"
else
	$L "Fast Random Generator (frandom): Not supported!"
fi

When I tried adding this script in init.d, my Antutu benchmark scores dropped by ~400 points. If someone could try this to confirm what I found, that would be useful.

 

There were a number of kernel patches to random & prandom that I added in v0.35 (recommended by ZolaIII) and these significantly increased benchmark scores. Maybe these patches outperform frandom.


  • 0

If you would like to support my work with a donation you can use this link. Thank you.


#2443
H3ROS

H3ROS

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,782 posts
  • Gender:Not Telling

On my ROM's I've always done it differently.

if [ -e /dev/frandom ]; then
    chmod 666 /dev/frandom;
    chmod 666 /dev/erandom;
    rm /dev/random && ln /dev/frandom /dev/random;
    chmod 666 /dev/random;
    mv /dev/urandom /dev/urandom.old && ln /dev/erandom /dev/urandom;
    chmod 666 /dev/urandom;
fi;

You've set it up to remove urandom, which you shouldn't do because keystore uses it (check with lsof | grep -i random). urandom should also link to erandom rather than frandom.

 

erandom uses no kernel entropy at all and it's very fast. I'm still not sure if it'll do better than a patched random and prandom (not checked your source), but on older Android versions frandom/erandom can help boost the score of a Y300 over 8000 in AnTuTu.


Edited by H3ROS, 20 July 2014 - 02:05 PM.

  • 0
BNqXLPC.pnghIMMF2y.png
If you like my ROM's then please consider a donation. A lot of time and effort went into them. Thank you.

My blog website: codeshed.co.uk

#2444
chil360

chil360

    Enthusiast

  • Members
  • PipPipPip
  • 191 posts
  • Devices:Huawei Ascend Y300-0100

@H3ROS

I have tried your script and my Antutu scores are still about 300 points lower than without frandom.


  • 0

If you would like to support my work with a donation you can use this link. Thank you.


#2445
H3ROS

H3ROS

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,782 posts
  • Gender:Not Telling

Shame, but that is how the script should be done anyway. On older versions of Android it seems to have a much better effect. Like here's the result from my own Android 4.1.1 ROM on a Y300:

 

Attached File  Screenshot_2014-07-20-18-18-02.png   91.76KB   58 downloads


  • 0
BNqXLPC.pnghIMMF2y.png
If you like my ROM's then please consider a donation. A lot of time and effort went into them. Thank you.

My blog website: codeshed.co.uk

#2446
moddingg33k

moddingg33k

    Addict

  • Members
  • PipPipPipPipPip
  • 598 posts
  • Gender:Not Telling

Well, to point one thing out first: Hero's script is doing things correctly, while the script posted by you, chil, got a small bug in it.

 

/dev/random needs to get replaced by: /dev/frandom

 

AND

 

/dev/urandom by /dev/erandom

 

ln /dev/frandom /dev/urandom  <--  this is wrong

 

However it's strange, that frandom shall drop performance in any way, because it's up to 10x faster than the default kernel random devices. huh.png

 

I'm going to do some tests, too.


  • 0

#2447
chil360

chil360

    Enthusiast

  • Members
  • PipPipPip
  • 191 posts
  • Devices:Huawei Ascend Y300-0100

The script that I posted was based on a script I pulled from the ramdisk of Christopher83's kernel. After searching a bit more, I agree that H3ROS script is the right way to activate frandom. I will try it again now that I have finished building the weekly.


  • 0

If you would like to support my work with a donation you can use this link. Thank you.


#2448
SIMONPRO

SIMONPRO

    Newbie

  • Members
  • Pip
  • 45 posts
  • Gender:Male
  • Devices:Huawei Ascend Y300

Shame, but that is how the script should be done anyway. On older versions of Android it seems to have a much better effect. Like here's the result from my own Android 4.1.1 ROM on a Y300:

 

attachicon.gifScreenshot_2014-07-20-18-18-02.png

wow that is awesome i remember getting 6700 from stock rom and from this rom i get 6800 so your 1440 more that is great.

with the new update the antutu score increase to 7477


Edited by SIMONPRO, 21 July 2014 - 06:52 PM.

  • 0

#2449
Aqirul

Aqirul

    Newbie

  • Members
  • Pip
  • 18 posts
  • Devices:Huawei Y300-0100

widget on lockscreen doing great... i love it... for next weeky, notification on lockscreen? kitkat lockscreen like?

 

thanks very much for this rom


  • 0

#2450
luca020400

luca020400

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,342 posts
  • Gender:Male
  • Location:Genoa Italy
  • Interests:Linux Android
  • Devices:Huawei Ascend Y300

How have you enabled it ??


  • 0

Aospa 4.4.4 My Topic

Mahdi Rom 4.4.4 My Topic

Nameless Chil360 Topic

Carbon Rom 4.2.2 My Topic

All bootanimation My Personal Server
Mega script collection My Personal Server
 
Sorry for my bad english ( I promise you : I will learn English well XD )
I'm Italian and I'm 14 years old
Remember to click the thanks button


#2451
fonz93

fonz93

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,671 posts
  • Gender:Male
  • Location:Italy
  • Devices:Huawei Y300
  • Twitter:@Fonz93

How have you enabled it ??

 

chil360 ported some framework changes from cyanogenmod


  • 0

#2452
luca020400

luca020400

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,342 posts
  • Gender:Male
  • Location:Genoa Italy
  • Interests:Linux Android
  • Devices:Huawei Ascend Y300

Ok thanks


  • 0

Aospa 4.4.4 My Topic

Mahdi Rom 4.4.4 My Topic

Nameless Chil360 Topic

Carbon Rom 4.2.2 My Topic

All bootanimation My Personal Server
Mega script collection My Personal Server
 
Sorry for my bad english ( I promise you : I will learn English well XD )
I'm Italian and I'm 14 years old
Remember to click the thanks button


#2453
moddingg33k

moddingg33k

    Addict

  • Members
  • PipPipPipPipPip
  • 598 posts
  • Gender:Not Telling

I've upstreamed the driver for /dev/random to current mainline and did some tests:

 

time head -c 10m /dev/urandom > /dev/null
    0m6.52s real     0m0.17s user     0m6.24s system
 
time head -c 10m /dev/erandom > /dev/null
    0m0.52s real     0m0.31s user     0m0.20s system

 

time head -c 10m /dev/random > /dev/null
    (#ERROR: didn't get any results)
 
time head -c 10m /dev/frandom > /dev/null
    0m0.55s real     0m0.30s user     0m0.24s system

  • 0

#2454
chil360

chil360

    Enthusiast

  • Members
  • PipPipPip
  • 191 posts
  • Devices:Huawei Ascend Y300-0100

I get similar results with those commands - frandom/erandom is definitely faster. So why did Antutu benchmark slower with the init script??


  • 0

If you would like to support my work with a donation you can use this link. Thank you.


#2455
ZolaIII

ZolaIII

    Addict

  • Members
  • PipPipPipPipPip
  • 878 posts
  • Devices:Huawei Y300-100
Try to observe CPU utilization & fervency scaling changes with both methods of generating randomness!

  • 0

#2456
mtvento

mtvento

    Newbie

  • Members
  • Pip
  • 8 posts
  • Devices:Huawei Ascend Y300-100

:huh:?

sorry, the phone "posted" while in my pocket... post is edited now

  • 0

#2457
apvm

apvm

    Newbie

  • Members
  • Pip
  • 31 posts
  • Devices:Huawei Y300

Wbrambly, thanks for the file, it works.   I flashed your file and then 6.6 update and then wipe cache, all my apps are there and still linked to 2nd partition with link2sd.


  • 0

#2458
Aqirul

Aqirul

    Newbie

  • Members
  • Pip
  • 18 posts
  • Devices:Huawei Y300-0100

Screenshot_2014-07-04-15-31-06.jpg


  • 0

#2459
Ranx91

Ranx91

    Regular

  • Members
  • PipPip
  • 77 posts
  • Devices:huawei y300 - 0100

Wow,this rom after every update became better and better!!

 

thanks


Edited by Ranx91, 22 July 2014 - 09:55 AM.

  • 0

#2460
Naikkon

Naikkon

    Enthusiast

  • Members
  • PipPipPip
  • 299 posts
  • Gender:Male
  • Location:Romania
  • Devices:huawei ascend g510
  • Twitter:@Naikon9

Q: i try to download candy crash today after the update and i can ! not compatible "unnsuported" just me or ...


  • 0

Device :     Huawei Ascend G510-100

ROM:         Stock B195

 





13 user(s) are reading this topic

1 members, 12 guests, 0 anonymous users


    mshaw213