Skip to content

Commit

Permalink
4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Apr 8, 2024
1 parent 431acf7 commit 8c2dd4d
Show file tree
Hide file tree
Showing 308 changed files with 50,959 additions and 538 deletions.
22 changes: 20 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# Release Notes
# Changelog

## 4.0.3 (2023-04-06)
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 4.1.0 (2024-03-28)

Features:
- Added support for GSMA SGP.22 v3.1
- ASN1 schema support
- Configuration support
- NOTE: Server name extension (v3-specific FQDN) is not supported (yet)

Maintenance:
- Update to latest dependency versions
- Minor housekeeping
- Migrated userguide also to Markdown

## 4.0.3 (2023-04-19)

Maintenance:
- Update to latest dependency versions
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt → LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Infineon Technologies AG
Copyright (c) 2020-2024 Infineon Technologies AG

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 0 additions & 17 deletions LICENSE_Identive.txt

This file was deleted.

57 changes: 47 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
<div align="center">

<picture>
<img alt="Infineon logo" src="docs/images/infineon_logo_color.png" width="25%">
</picture>

###

![License](https://img.shields.io/badge/License-MIT-green)
![Android version](https://img.shields.io/badge/Android-14-green?logo=android)
![Gradle Build Chain](https://img.shields.io/badge/Gradle-8.2-green?logo=gradle)
![Java](https://img.shields.io/badge/Java-1.8-green?logo=openjdk)

# Infineon Android LPA (Local Profile Assistant)

The Infineon Android LPA is an example implementation of an LPA according to GSMA SGP.22 v2.4.0 for
the Android platform. It shall demonstrate the user experience of an eSIM and serve as example for
OEM integration.
This is an example implementation of a Local Profile Aassistant according to GSMA SGP.22 for the
Android
platform. It shall demonstrate the user experience of an eSIM and serve as example for OEM
integration.

###

<img src="docs/images/title_screenshot_profile_list.png" width="20%" >
<img src="docs/images/title_screenshot_profile_details.png" width="20%" >
<img src="docs/images/title_screenshot_euicc_details.png" width="20%" >

</div>

## Overview

This software is developed for and tested with the following eUICC:
* [Infineon OPTIGA™ Connect Consumer (OC1120)](https://www.infineon.com/cms/en/product/security-smart-card-solutions/optiga-embedded-security-solutions/optiga-connect/optiga-connect-consumer/)
Expand All @@ -12,7 +36,7 @@ To test this LPA, please feel free to download a profile from the Infineon Test

## Features
This software supports the following features:
* LPA according to GSMA SGP.22 v2.4.0
* LPA according to GSMA SGP.22
* Listing of installed profiles
* Profile download via GSMA Live or GSMA SGP.26 SM-DP+ profile servers
* Confirmation code handling
Expand All @@ -27,9 +51,18 @@ This software supports the following features:
* GSMA SGP.22 version supported by the eUICC
* TCA eUICC Profile Package version supported by the eUICC

### GSMA SGP.22 Version support

| version | support |
|-------------|--------------|
| 2.0.0-2.5.0 | full support |
| > 3.0.0 | experimental |

NOTE: Server name extension (v3-specific FQDN) according to GSMAP SGP.22 v3.1 is not supported (yet).

## Implementation information
### Development environment
* Android Studio Chipmunk 2021.2.1
* Android Studio Hedgehog 2023.1.1

### Project structure
* com.infineon.esim.lpa
Expand All @@ -51,14 +84,18 @@ The Infineon Android LPA is based on the following dependencies:
* Automatically downloaded via Gradle task before build
* Other dependencies see in app/build.gradle

### Documentation

Please see the [User Guide](docs/userguide/userguide.md) for more documentation.

## Authors

Michael Spähn (IFAG CSS M CS AE)\
Application Engineering\
Michael Spähn (CSS DSI TM AE AEB SW)\
Software Application Engineering\
[email protected]

Tan Siow Kiat (IFAP CSS SMD AP TM SAE ITS)\
Systems Application Engineering IoT Systems\
Tan Siow Kiat (SMD I2C3 AP TM CC AEB)\
Systems Application Engineering\
[email protected]

Infineon Technologies AG
Infineon Technologies AG
2 changes: 0 additions & 2 deletions app/.gitignore

This file was deleted.

57 changes: 30 additions & 27 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ apply plugin: 'de.undercouch.download'

android {
namespace 'com.infineon.esim.lpa'
compileSdkVersion 33
compileSdk rootProject.ext.sdk_version

defaultConfig {
applicationId "com.infineon.esim.lpa"
minSdkVersion 28
targetSdkVersion 33
versionCode 40003
versionName "4.0.3"
targetSdkVersion rootProject.ext.sdk_version
versionCode 40004
versionName "4.1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.debug
}
Expand Down Expand Up @@ -63,6 +63,9 @@ android {
useJUnitPlatform()
}
}
buildFeatures {
buildConfig true
}
}

// Task to print project version name (e.g. for CI/CD purposes)
Expand Down Expand Up @@ -103,13 +106,13 @@ dependencies {
// Google libraries
// ---------------------------------------------------------------------------------------------
// Open source license plugin (see: https://developers.google.com/android/guides/opensource)
implementation "com.google.android.gms:play-services-oss-licenses:17.0.0"
implementation "com.google.android.gms:play-services-oss-licenses:17.0.1"
// Android Material design
implementation "com.google.android.material:material:1.8.0"
implementation "com.google.android.material:material:1.11.0"
// QR Code Scanner
implementation "com.google.mlkit:barcode-scanning:17.1.0"
implementation "com.google.mlkit:barcode-scanning:17.2.0"
// Location Services
implementation "com.google.android.gms:play-services-location:21.0.1"
implementation "com.google.android.gms:play-services-location:21.1.0"

////////////////////////////////////////////////////////////////////////////////////////////////
// AndroidX / Jetpack Dependencies (see: https://developer.android.com/jetpack/androidx/versions)
Expand All @@ -119,63 +122,63 @@ dependencies {
// CameraX library
// ---------------------------------------------------------------------------------------------
// Camera2 library
implementation "androidx.camera:camera-camera2:1.3.0-alpha05"
implementation "androidx.camera:camera-camera2:1.3.1"
// Camera core
implementation "androidx.camera:camera-core:1.3.0-alpha05"
implementation "androidx.camera:camera-core:1.3.1"
// Camera lifecycle management
implementation "androidx.camera:camera-lifecycle:1.3.0-alpha05"
implementation "androidx.camera:camera-lifecycle:1.3.1"
// Camera extensions
implementation "androidx.camera:camera-extensions:1.3.0-alpha05"
implementation "androidx.camera:camera-extensions:1.3.1"
// Camera view fragment
implementation "androidx.camera:camera-view:1.3.0-alpha05"
implementation "androidx.camera:camera-view:1.3.1"

// ---------------------------------------------------------------------------------------------
// UI support
// ---------------------------------------------------------------------------------------------
// AppCompat
implementation "androidx.appcompat:appcompat:1.6.1"
// Activity (for permission handling)
implementation "androidx.activity:activity:1.7.0"
implementation "androidx.activity:activity:1.8.2"
// Fragment is needed for ActivityResult API to work properly (needs 1.3.0-rc01, 1.2.5 is not supporting ActivityResult)
// see: https://stackoverflow.com/questions/62771948/new-result-api-error-can-only-use-lower-16-bits-for-requestcode
implementation "androidx.fragment:fragment:1.5.6"
implementation "androidx.fragment:fragment:1.6.2"
// ConstraintLayout for profile list
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
// SwiperefreshLayout for profile list
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
// Preference
implementation "androidx.preference:preference:1.2.0"
implementation "androidx.preference:preference:1.2.1"
// WorkManager
implementation "androidx.work:work-runtime:2.8.1"
implementation "androidx.work:work-runtime:2.9.0"

// ---------------------------------------------------------------------------------------------
// Lifecycle management
// ---------------------------------------------------------------------------------------------
// ViewModel
implementation "androidx.lifecycle:lifecycle-viewmodel:2.6.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1"
implementation "androidx.lifecycle:lifecycle-viewmodel:2.7.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0"
// LiveData
implementation "androidx.lifecycle:lifecycle-livedata:2.6.1"
implementation "androidx.lifecycle:lifecycle-livedata:2.7.0"
// Lifecycle runtime only (without ViewModel or LiveData)
implementation "androidx.lifecycle:lifecycle-runtime:2.6.1"
implementation "androidx.lifecycle:lifecycle-runtime:2.7.0"
// Saved state module for ViewModel
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.7.0"
// Annotation processor
// annotationProcessor "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"
// alternately - if using Java8, use the following instead of lifecycle-compiler
implementation "androidx.lifecycle:lifecycle-common-java8:2.6.1"
implementation "androidx.lifecycle:lifecycle-common-java8:2.7.0"
// optional - helpers for implementing LifecycleOwner in a Service
implementation "androidx.lifecycle:lifecycle-service:2.6.1"
implementation "androidx.lifecycle:lifecycle-service:2.7.0"
// optional - ProcessLifecycleOwner provides a lifecycle for the whole application process
implementation "androidx.lifecycle:lifecycle-process:2.6.1"
implementation "androidx.lifecycle:lifecycle-process:2.7.0"
// optional - ReactiveStreams support for LiveData
implementation "androidx.lifecycle:lifecycle-reactivestreams:2.6.1"
implementation "androidx.lifecycle:lifecycle-reactivestreams:2.7.0"

////////////////////////////////////////////////////////////////////////////////////////////////
// Testing
////////////////////////////////////////////////////////////////////////////////////////////////
testImplementation "androidx.arch.core:core-testing:2.2.0"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.8.2"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.9.2"

androidTestImplementation "androidx.test:rules:1.5.0"
androidTestImplementation "androidx.test.ext:junit:1.1.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public class Atr {
"3B9F96803FC7828031E073F6215757A44D000560700014",
"3B9F96803FC7828031E073F62157574A4D0005608000E4",
"3B9F96803FC7828031E073F62157574A4D0005609000F4",
"3B9F96803FC7828031E073F62157574A4D020B60010069"
"3B9F96803FC7828031E073F62157574A4D020B60010069",
"3BDF96008091FE3F4C838031E073FE2117634950F4830F"
));

public static Boolean isAtrValid(byte[] atr) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,23 @@ private String transmitAPDU(String apdu, byte channel) throws Exception {

private void terminalCapability() throws Exception {
// According to ETS 102 221 Release 17 section 11.1.19 TERMINAL CAPABILITY
// 80AA000005A903830107
String request = genericCommand("80", "AA", "00", "00", "A903830107", null);
// 80AA000005A9038301 +

// RSP device capabilities (see GSMA SGP.22 v3.0.0 3.4.2 RSP Device Capabilities
// 0011 0111 = 0x37
// ││││ │││└─ Local User Interface in the Device (LUId) supported
// ││││ ││└── Local Profile Download in the Device (LPDd) supported
// ││││ │└─── Local Discovery Service in the Device (LDSd) supported
// ││││ └──── LUIe based on SCWS supported
// │││└────── Metadata update alerting supported
// ││└─────── Enterprise Capable Device
// │└──────── LUIe using E4E supported
// └───────── LPR supported

String rspDeviceCapabilities = "37";
String data = "A9038301" + rspDeviceCapabilities;

String request = genericCommand("80", "AA", "00", "00", data, null);

Log.debug(TAG, "TERMINAL CAPABILITY request: " + request);
String response = transmitAPDU(request, BASIC_CHANNEL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.infineon.esim.lpa.lpa.LocalProfileAssistant;
import com.infineon.esim.util.Log;

import java.net.ConnectException;
import java.util.concurrent.Callable;

public class DownloadTask implements Callable<DownloadResult> {
Expand All @@ -48,7 +49,13 @@ public DownloadResult call() {
DownloadResult downloadResult = lpa.downloadProfile(confirmationCode);

// Send notification
HandleNotificationsResult handleNotificationsResult = lpa.handleNotifications();
HandleNotificationsResult handleNotificationsResult;
try {
handleNotificationsResult = lpa.handleNotifications();
} catch (ConnectException e) {
// Ignore exceptions (E.g. no internet connection) and retry later
return downloadResult;
}

if(handleNotificationsResult.getSuccess()) {
return downloadResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.infineon.esim.lpa.lpa.LocalProfileAssistant;
import com.infineon.esim.util.Log;

import java.net.ConnectException;
import java.util.concurrent.Callable;

public class ProfileActionTask implements Callable<Void> {
Expand Down Expand Up @@ -89,8 +90,9 @@ public Void call() throws Exception {
Log.error(TAG, "HandleNotifications failed: " + handleNotificationsResult.getErrorDetails());
throw new Exception("HandleNotifications failed: " + handleNotificationsResult.getErrorDetails());
}
} catch (Exception e) {
} catch (ConnectException e) {
// Ignore exceptions (E.g. no internet connection) and retry later
// TODO: Show toast on fail?
}

return null;
Expand Down
Loading

0 comments on commit 8c2dd4d

Please sign in to comment.