envsetup.sh: Override host metadata
reference taken from https://grapheneos.social/@GrapheneOS/113870255397154703 instead of fixed host number, use a random generated host number that follows google's host number format to bypass revolut's host checks Change-Id: I72feafd663a551eb0c6c4146d52137ed0dc7456d Signed-off-by: rmp22 <195054967+rmp22@users.noreply.github.com> Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
@@ -924,3 +924,14 @@ function fixup_common_out_dir() {
|
||||
mkdir -p ${common_out_dir}
|
||||
fi
|
||||
}
|
||||
|
||||
function generate_host_overrides() {
|
||||
export BUILD_USERNAME=android-build
|
||||
HEX=$(openssl rand -hex 8)
|
||||
ALPHA=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)
|
||||
export BUILD_HOSTNAME="r-${HEX}-${ALPHA}"
|
||||
echo "BUILD_USERNAME=$BUILD_USERNAME"
|
||||
echo "BUILD_HOSTNAME=$BUILD_HOSTNAME"
|
||||
}
|
||||
|
||||
generate_host_overrides
|
||||
|
||||
Reference in New Issue
Block a user