SHARE
TWEET

Untitled

a guest Sep 20th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if [ -z ${OUT+x} ];
  2. then
  3.         echo "Output environment variable unset. Did you source the build script?";
  4.         exit 1;
  5. fi
  6.  
  7. OUT_TRIMMED=$(echo $OUT | sed 's/^.*\/out/\/out/')
  8. WORKDIR=$(echo $OUT | sed 's/\/out.*$//')
  9.  
  10.  
  11. echo $OUT_TRIMMED
  12. mkdir -p $WORKDIR/emulator$OUT_TRIMMED
  13. mkdir -p $WORKDIR/emulator/prebuilts
  14. cp -Rvp $WORKDIR/prebuilts/android-emulator/ $WORKDIR/emulator/prebuilts/
  15. cp -Rvp $WORKDIR/script/ $WORKDIR/emulator/
  16. cp -Rvp $WORKDIR/build/ $WORKDIR/emulator/
  17. cp -vp $WORKDIR$OUT_TRIMMED/* $WORKDIR/emulator$OUT_TRIMMED
  18. cp -Rvp $WORKDIR/prebuilts/go/ $WORKDIR/emulator/prebuilts/
  19.  
  20. cat <<EOF > $WORKDIR/emulator/env.sh
  21. export ANDROID_DEV_SCRIPTS=\$PWD/development/scripts:\$PWD/prebuilts/devtools/tools:\$PWD/external/selinux/pre
  22. builts/bin:\$PWD/prebuilts/misc/linux-x86/dtc:\$PWD/prebuilts/misc/linux-x86/libufdt
  23. export TARGET_PRODUCT=sdk_phone_x86_64
  24. export BUILD_HOSTNAME=grapheneos
  25. export OUT=\$PWD/out/target/product/generic_x86_64
  26. export JAVA_HOME=\$PWD/prebuilts/jdk/jdk9/linux-x86
  27. export ANDROID_PRE_BUILD_PATHS=\$PWD/prebuilts/jdk/jdk9/linux-x86/bin:
  28. export TARGET_BUILD_VARIANT=userdebug
  29. export ANDROID_HOST_OUT_TESTCASES=\$PWD/out/host/linux-x86/testcases
  30. export TARGET_GCC_VERSION=4.9
  31. export BUILD_NUMBER=2019.09.06.19
  32. export ANDROID_JAVA_TOOLCHAIN=\$PWD/prebuilts/jdk/jdk9/linux-x86/bin
  33. export ANDROID_TARGET_OUT_TESTCASES=\$PWD/out/target/product/generic_x86_64/testcases
  34. export ANDROID_BUILD_TOP=\$PWD
  35. export _JAVA_OPTIONS=-XX:-UsePerfData
  36. export TARGET_BUILD_TYPE=debug
  37. export ANDROID_BUILD_PATHS=\$PWD/out/soong/host/linux-x86/bin:\$PWD/out/host/linux-x86/bin:\$PWD/prebuilts/gcc
  38. /linux-x86/x86/x86_64-linux-android-4.9/bin:\$PWD/development/scripts:\$PWD/prebuilts/devtools/tools:\$PWD/ext
  39. ernal/selinux/prebuilts/bin:\$PWD/prebuilts/misc/linux-x86/dtc:\$PWD/prebuilts/misc/linux-x86/libufdt:\$PWD/pr
  40. ebuilts/android-emulator/linux-x86_64:\$PWD/prebuilts/asuite/acloud/linux-x86:\$PWD/prebuilts/asuite/aidegen/l
  41. inux-x86:\$PWD/prebuilts/asuite/atest/linux-x86:
  42. export BUILD_USERNAME=grapheneos
  43. export PYTHONPATH=\$PWD/development/python-packages:
  44. export ANDROID_EMULATOR_PREBUILTS=\$PWD/prebuilts/android-emulator/linux-x86_64
  45. export ANDROID_PRODUCT_OUT=\$PWD/out/target/product/generic_x86_64
  46. export ANDROID_PYTHONPATH=\$PWD/development/python-packages:
  47. export ANDROID_TOOLCHAIN=\$PWD/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin
  48. export ANDROID_JAVA_HOME=\$PWD/prebuilts/jdk/jdk9/linux-x86
  49. export ANDROID_HOST_OUT=\$PWD/out/host/linux-x86
  50. export PATH=\$PWD/prebuilts/jdk/jdk9/linux-x86/bin:\$PWD/out/soong/host/linux-x86/bin:\$PWD/out/host/linux-x86
  51. /bin:\$PWD/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin:\$PWD/development/scripts:\$PWD/prebuilts/
  52. devtools/tools:\$PWD/external/selinux/prebuilts/bin:\$PWD/prebuilts/misc/linux-x86/dtc:\$PWD/prebuilts/misc/li
  53. nux-x86/libufdt:\$PWD/prebuilts/android-emulator/linux-x86_64:\$PWD/prebuilts/asuite/acloud/linux-x86:\$PWD/pr
  54. ebuilts/asuite/aidegen/linux-x86:\$PWD/prebuilts/asuite/atest/linux-x86:\$PWD/script/bin:/usr/local/sbin:/usr/
  55. local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
  56. export DISPLAY_BUILD_NUMBER=true
  57. EOF
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top