private static byte[] generateSeed() {
    try {
      ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream();
      DataOutputStream seedBufferOut = new DataOutputStream(seedBuffer);
      seedBufferOut.writeLong(java.lang.System.currentTimeMillis());
      seedBufferOut.writeLong(java.lang.System.nanoTime());
      seedBufferOut.writeInt(Process.myPid());
      seedBufferOut.writeInt(Process.myUid());
      seedBufferOut.write(getBuildFingerprintAndDeviceSerial());
      seedBufferOut.close();
      return seedBuffer.toByteArray();
    } catch (IOException e) {
      throw new SecurityException("Failed to generate seed", e);
    }
  }
Generates a device- and invocation-specific seed to be mixed into the
Linux PRNG.
java/com/google/android/apps/authenticator/util/PrngFixes.java