Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
6bfe34e5
Commit
6bfe34e5
authored
Aug 19, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support testing magiskinit on arm64 AVD
parent
34dd9eb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
avd_test.sh
scripts/avd_test.sh
+19
-6
No files found.
scripts/avd_test.sh
View file @
6bfe34e5
...
...
@@ -13,9 +13,20 @@ trap cleanup EXIT
emu
=
"
$ANDROID_SDK_ROOT
/emulator/emulator"
avd
=
"
$ANDROID_SDK_ROOT
/cmdline-tools/latest/bin/avdmanager"
sdk
=
"
$ANDROID_SDK_ROOT
/cmdline-tools/latest/bin/sdkmanager"
type
=
'google_apis'
emu_args
=
'-no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim'
case
$(
uname
-m
)
in
'arm64'
|
'aarch64'
)
arch
=
arm64-v8a
;;
*
)
arch
=
x86_64
;;
esac
# Should be either 'google_apis' or 'default'
type
=
'google_apis'
wait_for_boot
()
{
while
true
;
do
if
[
-n
"
$(
adb shell getprop sys.boot_completed
)
"
]
;
then
...
...
@@ -31,7 +42,7 @@ test_api() {
local
pkg pid img_dir ramdisk features
# Setup emulator
pkg
=
"system-images;android-
$1
;
$type
;
x86_64
"
pkg
=
"system-images;android-
$1
;
$type
;
$arch
"
echo
-e
"
\n\0
33[44m* Testing
$pkg
\0
33[0m
\n
"
...
...
@@ -39,7 +50,7 @@ test_api() {
echo
no |
"
$avd
"
create avd
-f
-n
test
-k
$pkg
# Launch emulator and patch
img_dir
=
"
$ANDROID_SDK_ROOT
/system-images/android-
$1
/
$type
/
x86_64
"
img_dir
=
"
$ANDROID_SDK_ROOT
/system-images/android-
$1
/
$type
/
$arch
"
ramdisk
=
"
$img_dir
/ramdisk.img"
features
=
"
$img_dir
/advancedFeatures.ini"
if
[
-f
"
${
ramdisk
}
.bak"
]
;
then
...
...
@@ -78,13 +89,15 @@ test_api() {
./build.py binary
./build.py app
# We test the following API levels for the following reason:
# We test these API levels for the following reason
# API 23: legacy rootfs w/o Treble
# API 26: legacy rootfs with Treble
# API 28: legacy system-as-root
# API 32: 2 Stage Init
# API 29: 2 Stage Init
# API 33: latest Android
for
api
in
23 26 28
32
;
do
for
api
in
23 26 28
29 33
;
do
test_api
$api
done
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment