Skip to content
Permalink
Browse files

[FIXED JENKINS-14741] Allow for the x86 ABI for android-10.

Google now host the x86 ABI for android-10 rather than Intel,
in the process making it a proper system-image rather than an
add-on. This caused problems with determining if the configured
AVD required an ABI, so now we add some more special handling
for this case.
  • Loading branch information...
orrc committed May 17, 2013
1 parent 7dcf3de commit 485d72b223982e91cc627c02d5ca943ee2eb5345
@@ -125,10 +125,12 @@ public boolean isCustomPlatform() {
* emulator creation.
*/
public boolean requiresAbi() {
// TODO: Could be improved...
// TODO: Could be improved / this logic should ideally be moved to emulator creation time...
// This is a relatively naive approach; e.g. addons for level <= 13 can have ABIs, though
// the only example seen so far is the Intel x86 level 10 image we explicitly include here..
return level >= 14 || Util.fixNull(name).contains("Intel Atom x86 System Image");
// But, since the Intel x86 for SDK 10 is now hosted by Google, we can't rely on the name...
return level == 10 || level >= 14
|| Util.fixNull(name).contains("Intel Atom x86 System Image");
}

public String getTargetName() {
@@ -326,4 +328,4 @@ public String toString() {
return alias;
};

}
}
@@ -499,8 +499,15 @@ public Boolean call() throws AndroidEmulatorException {
builder.add(osVersion.getTargetName());

if (targetAbi != null && osVersion.requiresAbi()) {
builder.add("--abi");
builder.add(targetAbi);
// This is an unpleasant side-effect of there being an ABI for android-10,
// and that Google renamed the image after its initial release from Intel...
// Ideally, as stated in AndroidPlatform#requiresAbi, we should preferably check
// via the "android list target" command whether an ABI is actually required.
if (osVersion.getSdkLevel() != 10 || targetAbi.equals("armeabi")
|| targetAbi.equals("x86")) {
builder.add("--abi");
builder.add(targetAbi);
}
}

// Log command line used, for info
@@ -280,7 +280,7 @@ private static boolean isPlatformInstalled(PrintStream logger, Launcher launcher

// Add system image, if required
// Even if a system image doesn't exist for this platform, the installer silently ignores it
if (dependentPlatform >= 14 && includeSystemImages) {
if (dependentPlatform >= 10 && includeSystemImages) {
components.add(String.format("sysimg-%s", dependentPlatform));
}

0 comments on commit 485d72b

Please sign in to comment.
You can’t perform that action at this time.