arc: Change the way to generate ro.serialno for ARCVM
Previously, Chrome just stored a randomly generated serial number in the user's prefs and passed it to ArcVmClientAdapter when it starts the VM. This CL changes the way of the serial number generation as follows: 1) Chrome no longer stores the serial number itself in the pref. It stores the "salt" instead. 2) The pref location is changed from the user's prefs to Local State. 3) When /var/lib/misc/arc_salt (which is for ARC container) exists, Chrome copies the file's content to the Local State pref. 4) Generate the serial number for the user in exactly the same was as ARC container which is sha256(user_id + salt_in_local_state). 5) Don't set the local state pref unless ARCVM is in use. As a result, devices that are upgraded from ARC container to ARCVM can continue to use the same ro.serialno on ARCVM. This CL depends on https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2271390 (platform2). BUG=b:143976415 TEST=try, ARC container/VM still starts Change-Id: Ia75e0e09d25d0eb3f806e865c1b19bca77507c9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2271534 Commit-Queue: Yusuke Sato <yusukes@chromium.org> Reviewed-by:Long Cheng <lgcheng@google.com> Cr-Commit-Position: refs/heads/master@{#787611}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment