File userdataSrc = null;
// Look for a system image in the add-on.
// If we don't find one there, look in the base platform.
ISystemImage systemImage = target.getSystemImage(tag, abiType);
if (systemImage != null) {
File imageFolder = systemImage.getLocation();
userdataSrc = new File(imageFolder, USERDATA_IMG);
}
if ((userdataSrc == null || !userdataSrc.exists()) && !target.isPlatform()) {
// If we don't find a system-image in the add-on, look into the platform.
systemImage = target.getParent().getSystemImage(tag, abiType);
if (systemImage != null) {
File imageFolder = systemImage.getLocation();
userdataSrc = new File(imageFolder, USERDATA_IMG);
}
}
if (userdataSrc == null || !userdataSrc.exists()) {