Consider using a newer version of Android for the AI2 emulator.

725 views
Skip to first unread message

nitinseshadri

unread,
Aug 26, 2017, 9:46:11 PM8/26/17
to mitappinv...@googlegroups.com
The AI2 emulator is currently using Android 2.2 (Froyo) which is extremely outdated, considering the latest version of Android is 8.0 (Oreo). Consider using a newer Android version in the emulator, because (1) Froyo is insecure, (2) Most recent computers can run semi-recent versions of Android in emulators with no problem and (3) Your minimum system requirements (at http://appinventor.mit.edu/explore/ai2/setup.html) need Android 2.3 (Gingerbread) or later, yet your emulator uses 2.2 (Froyo).

The way I see it, there are three viable choices:
1. Upgrade to Android 2.3 Gingerbread (a minor step-up, still very outdated, but it at least fits the system requirements, and if you want the emulator to run on really old systems, this is your best option)
2. Upgrade to Android 4.4.4 KitKat (this is the best option, as KitKat was designed with low-RAM/slow devices such as emulators in mind. This is why many old or cheap Android devices still run KitKat.)
3. Use a third-party emulator (such as Genymotion. The Thunkable.com AI2 fork supports this. You can also recommend Appetize.io.)

If you have the Android SDK (or Android Studio for that matter) installed it should be almost no trouble to prepare an emulator image with a newer version of Android.

EDIT: I have created an archive of the AppInventor macOS install directories with the Android 2.3 Gingerbread system images. Although this is from a macOS install, you can use the same from-android-SDK directory for all platforms. Have a look at it and tell me what you think. Link to download: https://drive.google.com/open?id=0B7cMRoJusjrnT2RtNzMzX25tdUk (Note that the android-8 directory has not been renamed to android-10 for compatibility purposes although the API level of Gingerbread is version 10.)

Abraham Getzler

unread,
Aug 27, 2017, 1:32:05 PM8/27/17
to MIT App Inventor Forum

Tim Carter

unread,
Aug 27, 2017, 3:25:35 PM8/27/17
to MIT App Inventor Forum
What are the security issues with this nitinseshadri?

Can an app under development using the emulator become infected with malware etc., and thus the subsequent apk ?

nitinseshadri

unread,
Aug 27, 2017, 7:44:52 PM8/27/17
to mitappinv...@googlegroups.com
It probably won't happen. I see your point there. However the three reasons I am focusing on are as follows (sorry if I wasn't clear earlier):
1. Your system requirements need Gingerbread. Froyo is too old.
2. Most systems these days can run newer versions of Android in emulators (2.3 shouldn't be that much of a step-up. And using the latest emulator binaries from the Android SDK will speed things up quite a bit.)
3. Most devices (even the cheapest ones) these days run more recent versions of Android (think KitKat). The only Android device that I own that still runs Froyo is an original Motorola Droid (still works, but it's old and can barely run Froyo at an acceptable speed so I don't use that for testing apps.)

As for Froyo being insecure, there are many malware programs out there that still target Froyo. A quick google search should help you there.

And if that isn't enough, see the link at the bottom of my original post (or use this: https://drive.google.com/open?id=0B7cMRoJusjrnT2RtNzMzX25tdUk. It's for macOS, but replacing the from-android-SDK/platforms/android-8/images directory in your own AI2 emulator install with the one from my archive should do the trick on your systems).

@Abraham Getzler: Consider linking to this from the main website.

Evan Patton

unread,
Aug 28, 2017, 2:22:29 PM8/28/17
to MIT App Inventor Forum
Hi nitinseshadri,

Here are responses to your comments:

1. You only need Gingerbread for the full capabilities (e.g., Firebase, extensions). The current version of the App Inventor companion will run on devices as old as Android Donut (1.6). However, in the next release of the setup tools and companion we will be updating the minimum SDK to Eclair MR1 (2.1) as I have posted previously.
2. The new emulator package will run Android Lollipop MR1 (5.1.1).
3. That may depend where you are located in the world. According to the statistics we collect on our rendezvous server between the website and devices, there is still a significant number of connections using an Android version prior to Honeycomb. As these numbers continue to shift we will reevaluate which versions of Android to continue to support.

Regards,
Evan

nitinseshadri

unread,
Aug 28, 2017, 3:54:44 PM8/28/17
to mitappinv...@googlegroups.com
Makes sense now.

What was the reasoning for your choice of Lollipop MR1 rather than Marshmallow, Nougat, or Oreo for the emulator?

And can you please share screenshots of the new emulator package in action?

Evan Patton

unread,
Aug 28, 2017, 5:33:13 PM8/28/17
to MIT App Inventor Forum
Currently our sources compile against Lollipop MR1 (5.1.1). There were significant changes to the permissions model starting with Marshmallow that will require in-depth testing of every component once we start targeting newer versions of Android. My guess is that we will be testing a newer build against Nougat or Oreo this year with an estimated release toward the end of the US academic year next spring.

Here's a sample screenshot:



Regards,
Evan

nitinseshadri

unread,
Aug 28, 2017, 5:43:44 PM8/28/17
to mitappinv...@googlegroups.com
Looks great. What device are you emulating with the Lollipop AVD? A Nexus 5X?

Is there any way I could help test this out?

Evan Patton

unread,
Aug 28, 2017, 6:55:34 PM8/28/17
to MIT App Inventor Forum
Currently it is a Nexus 4 but that is subject to change prior to release.

Evan

nitinseshadri

unread,
Aug 28, 2017, 9:03:32 PM8/28/17
to MIT App Inventor Forum
Possible combinations of Nexus 4 Lollipop MR1 system images (according to Android Studio):

armeabi
armeabi + Google Play APIs

x86 (Intel HAXM)
x86 + Google Play APIs

Which one are you using?

Evan Patton

unread,
Aug 29, 2017, 11:10:42 PM8/29/17
to MIT App Inventor Forum
Currently we are using the armeabi image and exploring using the HAXM version with a fallback to the arm if the host hardware does not support the virtualization required for HAXM.

Regards,
Evan

Reply all
Reply to author
Forward
0 new messages