Emulation of mobile devices (esp. Android)

Hi,

Following a request from some colleagues on the long-term preservation of mobile apps, I’m trying to get up to date on the current state of emulation of mobile devices. I was wondering if anyone here has done any work on this?

At the moment I’m mainly looking into Android (as far as I understand emulation options for iOS are still pretty much non-existent, aside from the iOS SDK simulator, which only runs on a Mac, and the Corellium service).

Over the last week I’ve been running some tests myself with a number of emulation/virtualization approaches:

  • Android-x86 + VirtualBox

  • Android-x86 + QEMU

  • Android Emulator (part of Android Studio)

  • Anbox (“a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu”, this is not rally emulation or even virtualization, but more alike to how Wine works for running Windows applications on Linux systems)

For all of the above environments side-loaded 2 apps from locally downloaded APK packages (selected because they are of particular interest to colleagues at the KB) using the Android Debug Bridge tool, and then tried to launch them. A blog post with more details will follow (hopefully next week), but the preliminary conclusion is that none of the approaches I tested is really adequate. The Android Emulator from Android Studio showed the most promising (but still not perfect) results.

As I was ranting a bit about this on Twitter, Euan Cochrane suggested people on this forum might know more about this. As I don’t want to re-invent the wheel here, any helpful suggestions or pointers are welcome!

Johan

1 Like

Hi @johanvanderknijff! Welcome!

This is a great question. I haven’t really experimented with emulating Android myself yet, but I know OpenSLX have it on the agenda to incorporate into EaaS. I assume that will take the Android-x86 + QEMU route since QEMU is already one of the key emulators in EaaS and EaaSI. Maybe @klaus.rechert or @oooleg or the student who has been working with them recently on emulator integration have more thoughts or tips.

Also pinging @cyn0matic because I know she has also been looking into this recently

I’m curious what limitations you hit! But maybe you can just come back and share the blog post, so you don’t have to write it all out twice :slight_smile:

1 Like

Johann, I am watching your progress eagerly. I made a few passes of installing Android on QEMU to see if I could make it go, with varied results. My next go at it I’ll look at the Android Emulator from Android Studio, see what it looks like.

Cynde

Hi @cyn0matic @ethan.gates and others,

I just published the blog post here:

https://www.bitsgalore.org/2021/02/09/four-android-emulators-two-apps

It’s a bit unwieldy, but I tried to provide enough detail to allow others to replicate/extend on the tests I did. Since I only tested with 2 apps, the conclusions are very tentative. Feedback would be very welcome, either in the comments at my blog or here, whatever you prefer.

1 Like

@johanvanderknijff this is fascinating and useful work as always (and you bring up several general emulation resources that I was not aware of - the Emulation General wiki, OSBoxes, etc). thank you!

quick note - in the “Android emulation options” section, it appears you did not quite finish your thought/sentence about Shashlik. Not super relevant, since you didn’t end up trying Shashlik anyway, but thought I would mention it.

Since iOS emulation is so muddled up with licensing issues, it is disappointing, though not surprising, to see your initial conclusions that the best Android option right now is indeed Google’s, and that it might be tied up in a similar gray area when it comes to preservation. The way I read that excerpt you posted, we would not be able to incorporate the SDK directly into EaaS/EaaSI, though as you say it would probably require much closer reading specifically of the license for the emulation component to say more definitively. This would be a very interesting case to bring in front of Software Preservation Network’s Law & Policy working group, or SPN’s Law & Policy advisor Brandon Butler, for their takes.

I also wonder how Apple’s movement to ARM may ultimately improve the state of QEMU’s ARM emulation/virtualization options, and whether that will wind up having any favorable trickle-down affect to better Android support in the main branches. It is fundamentally pretty odd that most of the options for Android emulation are using x86 images and barely emulating the actual Android experience to start - though I suppose that comes down to licensing again and the dominance of the Google Play Store and proprietary pre-installed apps guiding most Android use.

@ethan.gates About the Android Emulator licensing situation: I wonder if this is something that would be open for discussion with Google (is Vint Cerf still working there?). Obviously they never developed their emulator with preservation use cases in mind, but I don’t really see how this could be in any way threatening to their business model. So I wouldn’t be altogether surprised if some arrangements could be made with them. I wasn’t aware of the Software Preservation Network’s Law & Policy working group, but yes this I’d be very interested to hear what they have to say about it.

As for the missing Shashlik sentence: thanks for pointing that out. It originally ended with the observation about Shashlik’s “hybrid approach”, but then I moved that to the following subsection in the final draft, but apparently I only removed half of the sentence. Fixed now!

1 Like

I’ve added a task to my list to pursue this @johanvanderknijff. I will talk with some folks who may be able to connect us with the right people at Google.

Thanks!

1 Like

Thanks @ecochrane, looking forward to see where this might lead!

I just wrote another post on mobile app preservation, focusing on candidate components for acquisition/(pre)ingest workflows. Even though this is not really about emulation, it does address some metadata aspects that are relevant to it, so I’ll post the link here for anyone interested in this:

https://www.bitsgalore.org/2021/02/24/towards-a-preservation-workflow-for-mobile-apps

Feedback is always welcome.

1 Like