Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
比特彗星
Proj156_vendor_anbox
Commits
d6f797ab
Commit
d6f797ab
authored
4 years ago
by
Antoine Fontaine
Browse files
Options
Download
Patches
Plain Diff
snap: fix and document usage of a locally build anbox image
parent
d0c97452
bitcomet
anbox10
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+0
-1
.gitignore
README.md
+2
-2
README.md
data/android-images/.gitignore
+1
-0
data/android-images/.gitignore
data/android-images/README.md
+5
-0
data/android-images/README.md
snap/snapcraft.yaml
+7
-5
snap/snapcraft.yaml
with
15 additions
and
8 deletions
+15
-8
.gitignore
+
0
−
1
View file @
d6f797ab
...
...
@@ -3,7 +3,6 @@ parts/
stage/
prime/
snap/.snapcraft
android-images/
*.snap
CMakeLists.txt.user
*.o
...
...
This diff is collapsed.
Click to expand it.
README.md
+
2
−
2
View file @
d6f797ab
...
...
@@ -137,8 +137,8 @@ If you want to build the anbox snap instead you can do this with the following
steps:
```
$
mkdir android-images
$ cp /path/to/android.img android-images/android.img
$
ARCH=$(uname -m)
$ cp /path/to/android.img
data/
android-images/android
-$ARCH
.img
$ snapcraft
```
...
...
This diff is collapsed.
Click to expand it.
data/android-images/.gitignore
0 → 100644
+
1
−
0
View file @
d6f797ab
android-*
This diff is collapsed.
Click to expand it.
data/android-images/README.md
0 → 100644
+
5
−
0
View file @
d6f797ab
You can put your own android images here. They will be used
when building the snap.
You should name your images
`android-$(arch).img`
. For example
`android-x86_64.img`
or
`android-aarch64.img`
.
This diff is collapsed.
Click to expand it.
snap/snapcraft.yaml
+
7
−
5
View file @
d6f797ab
...
...
@@ -95,18 +95,20 @@ parts:
build-packages
:
-
wget
override-build
:
|
LOCAL_IMAGE=$SNAPCRAFT_PART_INSTALL/../../../android-images/android.img
ARCH=$(uname -m)
LOCAL_IMAGE="$SNAPCRAFT_PART_SRC/android-images/android-$ARCH.img"
if [ -f $LOCAL_IMAGE ]; then
if [ -f
"
$LOCAL_IMAGE
"
]; then
echo "Using local image $LOCAL_IMAGE"
cp $LOCAL_IMAGE
$SNAPCRAFT_PART_INSTALL/android.img
cp
"
$LOCAL_IMAGE
" "
$SNAPCRAFT_PART_INSTALL
"
/android.img
else
echo "android image 'data/android-images/android-$ARCH.img'" \
"not found, downloading one\n\n"
IMAGE_PATH=
IMAGE_NAME=
ARCH=$(uname -m)
case "$ARCH" in
x86_64)
...
...
@@ -115,7 +117,7 @@ parts:
IMAGE_HASH="6b04cd33d157814deaf92dccf8a23da4dc00b05ca6ce982a03830381896a8cca"
;;
*)
echo "ERROR:
Unknown architecture
$ARCH"
echo "ERROR:
Anbox upstream doesn't provide an image for
$ARCH"
exit 1
;;
esac
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets