init.rc: mix device-specific data into the Linux RNG

Mix the contents of /proc/cmdline and /default.prop
into /dev/urandom. /proc/cmdline often contains
androidboot.serialno, a device-specific unique
identifier. Similarly, /default.prop contains the
build fingerprint and timestamp, which vary between
device families.

Change-Id: I8803b38c7089b2a1217b99a7c1808b29a3b138cf
This commit is contained in:
Nick Kralevich 2016-01-22 18:02:29 -08:00
parent 8f8ce0c300
commit 27cb410352
1 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,10 @@ on early-init
on init
sysclktz 0
# Mix device-specific information into the entropy pool
copy /proc/cmdline /dev/urandom
copy /default.prop /dev/urandom
# Backward compatibility.
symlink /system/etc /etc
symlink /sys/kernel/debug /d