-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use external script to write entitlements
- Loading branch information
Showing
2 changed files
with
43 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Modified from: | ||
# https://stackoverflow.com/questions/67264212/android-emulator-crash-when-start-hvf-error-hv-error | ||
|
||
original_dir=$(pwd) | ||
target_dir=~/Library/Android/sdk/emulator/qemu/darwin-aarch64 | ||
file_path=entitlements.xml | ||
|
||
xml_content='<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.hypervisor</key> | ||
<true/> | ||
</dict> | ||
</plist>' | ||
|
||
cd "$target_dir" | ||
echo "$xml_content" > "$file_path" | ||
codesign -s - --entitlements entitlements.xml --force ./qemu-system-aarch64 | ||
cd "$original_dir" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters