4 if [ "$SNAPCRAFT_GRADE" = "stable" ]; then
5 echo $SNAPCRAFT_PROJECT_VERSION
7 echo $SNAPCRAFT_PROJECT_VERSION-$(git rev-parse --short HEAD)
9 summary: Android in a Box
11 Runtime for Android applications which runs a full Android system
12 in a container using Linux namespaces (user, ipc, net, mount) to
13 separate the Android system fully from the host.
16 architectures: [amd64]
32 command: desktop-launch $SNAP/bin/anbox-wrapper.sh
47 command: bin/container-manager.sh start
48 stop-command: bin/container-manager.sh stop
57 command: bin/collect-bug-info.sh
59 command: bin/anbox-shell.sh
61 command: desktop-launch $SNAP/bin/app-android-settings.sh
62 desktop: desktop/android-settings.desktop
78 command: desktop-launch $SNAP/bin/app-appmgr.sh
79 desktop: desktop/appmgr.desktop
97 # This needs to be any directory but not the root one as if we use
98 # it we get superious permissions errors with the copied .git tree
103 LOCAL_IMAGE=$SNAPCRAFT_PART_INSTALL/../../../android-images/android.img
105 if [ -f $LOCAL_IMAGE ]; then
107 echo "Using local image $LOCAL_IMAGE"
108 cp $LOCAL_IMAGE $SNAPCRAFT_PART_INSTALL/android.img
118 IMAGE_PATH="2018/07/19"
119 IMAGE_NAME="android_amd64.img"
120 IMAGE_HASH="6b04cd33d157814deaf92dccf8a23da4dc00b05ca6ce982a03830381896a8cca"
123 echo "ERROR: Unknown architecture $ARCH"
128 # FIXME: downloading with a source: field doesn't work as snapcraft
129 # expects the downloaded file to be an archive it can extract.
130 echo "Downloading image..."
131 wget http://build.anbox.io/android-images/$IMAGE_PATH/$IMAGE_NAME
133 echo "$IMAGE_HASH $IMAGE_NAME" > image-hash
134 sha256sum -c image-hash || exit 1
136 mv $IMAGE_NAME $SNAPCRAFT_PART_INSTALL/android.img
155 source: https://github.com/lxc/lxc
157 source-tag: lxc-3.0.1
174 - --disable-cgmanager
177 - --enable-capabilities
178 - --with-rootfs-path=/var/snap/anbox/common/lxc/
179 - --libexecdir=/snap/anbox/current/libexec/
182 git config user.email "buildbot@anbox.io"
183 git config user.name "Anbox Buildbot"
184 git remote add anbox https://github.com/anbox/lxc
186 # apparmor: don't require a transition for Anbox child profiles
187 git cherry-pick 2f81fb7c91560b32e506bb874f8cd63e37985906
191 snap/anbox/current/libexec: libexec
194 - lib/liblxc.so.1.4.0
195 - libexec/lxc/lxc-monitord
205 source: https://swiftshader.googlesource.com/SwiftShader
207 source-commit: b6e8c3f0f4830887d69ba765a922ac3c40e81dd9
209 git submodule update --init
216 libEGL.so: lib/anbox/swiftshader/libEGL.so
217 libGLES_CM.so: lib/anbox/swiftshader/libGLES_CM.so
218 libGLESv2.so: lib/anbox/swiftshader/libGLESv2.so
224 snap-wrapper.sh: bin/anbox-wrapper.sh
225 container-manager.sh: bin/container-manager.sh
226 anbox-bridge.sh: bin/anbox-bridge.sh
227 collect-bug-info.sh: bin/collect-bug-info.sh
228 app-android-settings.sh: bin/app-android-settings.sh
229 app-appmgr.sh: bin/app-appmgr.sh
230 anbox-shell.sh: bin/anbox-shell.sh
232 - bin/anbox-bridge.sh
234 - bin/anbox-wrapper.sh
235 - bin/container-manager.sh
236 - bin/collect-bug-info.sh
255 # FIXME: Anbox currently has some paths with hard coded prefixes. Once
256 # that is fixed we can avoid using a prefix here.
257 - -DCMAKE_INSTALL_PREFIX:PATH=/usr
258 - -DANBOX_VERSION=$SNAPCRAFT_PROJECT_VERSION
259 - -DBINDERFS_PATH=/var/snap/anbox/common/binderfs
260 # FIXME: Once we have everything in place for full snap confinement we
261 # can securely enable this.
262 # - -DSNAP_CONFINEMENT=ON
272 - libboost-filesystem-dev
274 - libboost-iostreams-dev
275 - libboost-program-options-dev
276 - libboost-system-dev
278 - libboost-thread-dev
286 - libproperties-cpp-dev
294 - libboost-iostreams1.58.0
295 - libboost-program-options1.58.0
296 - libboost-thread1.58.0
303 - libsdl2-image-2.0-0