Compare commits
No commits in common. "master" and "unpriv-v1.3.0" have entirely different histories.
master
...
unpriv-v1.
4 changed files with 19 additions and 22 deletions
|
@ -1,7 +1,7 @@
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '*'
|
- 'master'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-debug:
|
build-debug:
|
||||||
|
|
|
@ -9,7 +9,7 @@ There are two variants of this project, OpenEUICC and EasyEUICC:
|
||||||
| Privileged | Must be installed as system app | No |
|
| Privileged | Must be installed as system app | No |
|
||||||
| Internal eSIM | Supported | Unsupported |
|
| Internal eSIM | Supported | Unsupported |
|
||||||
| External (Removable) eSIM | Supported | Supported |
|
| External (Removable) eSIM | Supported | Supported |
|
||||||
| USB Readers | Supported | Supported |
|
| USB Readers | Yes | Yes |
|
||||||
| Requires allowlisting by eSIM | No | Yes -- except USB |
|
| Requires allowlisting by eSIM | No | Yes -- except USB |
|
||||||
| System Integration | Partial (carrier partner API unimplemented yet) | No |
|
| System Integration | Partial (carrier partner API unimplemented yet) | No |
|
||||||
|
|
||||||
|
|
|
@ -27,13 +27,6 @@ import kotlinx.coroutines.launch
|
||||||
import net.typeblog.lpac_jni.impl.PKID_GSMA_LIVE_CI
|
import net.typeblog.lpac_jni.impl.PKID_GSMA_LIVE_CI
|
||||||
import net.typeblog.lpac_jni.impl.PKID_GSMA_TEST_CI
|
import net.typeblog.lpac_jni.impl.PKID_GSMA_TEST_CI
|
||||||
|
|
||||||
// https://euicc-manual.osmocom.org/docs/pki/eum/accredited.json
|
|
||||||
// ref: <https://regex101.com/r/5FFz8u>
|
|
||||||
private val RE_SAS = Regex(
|
|
||||||
"""^[A-Z]{2}-[A-Z]{2}(?:-UP)?-\d{4}T?(?:-\d+)?T?$""",
|
|
||||||
setOf(RegexOption.IGNORE_CASE),
|
|
||||||
)
|
|
||||||
|
|
||||||
class EuiccInfoActivity : BaseEuiccAccessActivity(), OpenEuiccContextMarker {
|
class EuiccInfoActivity : BaseEuiccAccessActivity(), OpenEuiccContextMarker {
|
||||||
companion object {
|
companion object {
|
||||||
private val YES_NO = Pair(R.string.yes, R.string.no)
|
private val YES_NO = Pair(R.string.yes, R.string.no)
|
||||||
|
@ -116,14 +109,13 @@ class EuiccInfoActivity : BaseEuiccAccessActivity(), OpenEuiccContextMarker {
|
||||||
vendorInfo.firmwareVersion?.let { add(Item(R.string.euicc_info_fw_ver, it)) }
|
vendorInfo.firmwareVersion?.let { add(Item(R.string.euicc_info_fw_ver, it)) }
|
||||||
vendorInfo.bootloaderVersion?.let { add(Item(R.string.euicc_info_bl_ver, it)) }
|
vendorInfo.bootloaderVersion?.let { add(Item(R.string.euicc_info_bl_ver, it)) }
|
||||||
}
|
}
|
||||||
channel.lpa.euiccInfo2?.let { info ->
|
channel.lpa.euiccInfo2.let { info ->
|
||||||
add(Item(R.string.euicc_info_sgp22_version, info.sgp22Version.toString()))
|
add(Item(R.string.euicc_info_sgp22_version, info?.sgp22Version.toString()))
|
||||||
add(Item(R.string.euicc_info_firmware_version, info.euiccFirmwareVersion.toString()))
|
add(Item(R.string.euicc_info_firmware_version, info?.euiccFirmwareVersion.toString()))
|
||||||
add(Item(R.string.euicc_info_globalplatform_version, info.globalPlatformVersion.toString()))
|
add(Item(R.string.euicc_info_globalplatform_version, info?.globalPlatformVersion.toString()))
|
||||||
add(Item(R.string.euicc_info_pp_version, info.ppVersion.toString()))
|
add(Item(R.string.euicc_info_pp_version, info?.ppVersion.toString()))
|
||||||
info.sasAccreditationNumber.trim().takeIf(RE_SAS::matches)
|
add(Item(R.string.euicc_info_sas_accreditation_number, info?.sasAccreditationNumber))
|
||||||
?.let { add(Item(R.string.euicc_info_sas_accreditation_number, it.uppercase())) }
|
add(Item(R.string.euicc_info_free_nvram, info?.freeNvram?.let(::formatFreeSpace)))
|
||||||
add(Item(R.string.euicc_info_free_nvram, info.freeNvram.let(::formatFreeSpace)))
|
|
||||||
}
|
}
|
||||||
channel.lpa.euiccInfo2?.euiccCiPKIdListForSigning.orEmpty().let { signers ->
|
channel.lpa.euiccInfo2?.euiccCiPKIdListForSigning.orEmpty().let { signers ->
|
||||||
// SGP.28 v1.0, eSIM CI Registration Criteria (Page 5 of 9, 2019-10-24)
|
// SGP.28 v1.0, eSIM CI Registration Criteria (Page 5 of 9, 2019-10-24)
|
||||||
|
@ -142,9 +134,14 @@ class EuiccInfoActivity : BaseEuiccAccessActivity(), OpenEuiccContextMarker {
|
||||||
add(Item(R.string.euicc_info_atr, atr, copiedToastResId = R.string.toast_atr_copied))
|
add(Item(R.string.euicc_info_atr, atr, copiedToastResId = R.string.toast_atr_copied))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("SameParameterValue")
|
|
||||||
private fun formatByBoolean(b: Boolean, res: Pair<Int, Int>): String =
|
private fun formatByBoolean(b: Boolean, res: Pair<Int, Int>): String =
|
||||||
getString(if (b) res.first else res.second)
|
getString(
|
||||||
|
if (b) {
|
||||||
|
res.first
|
||||||
|
} else {
|
||||||
|
res.second
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
inner class EuiccInfoViewHolder(root: View) : ViewHolder(root) {
|
inner class EuiccInfoViewHolder(root: View) : ViewHolder(root) {
|
||||||
private val title: TextView = root.requireViewById(R.id.euicc_info_title)
|
private val title: TextView = root.requireViewById(R.id.euicc_info_title)
|
||||||
|
|
|
@ -80,7 +80,7 @@ apdu_interface_transmit(struct euicc_ctx *ctx, uint8_t **rx, uint32_t *rx_len, c
|
||||||
LPAC_JNI_EXCEPTION_RETURN;
|
LPAC_JNI_EXCEPTION_RETURN;
|
||||||
*rx_len = (*env)->GetArrayLength(env, ret);
|
*rx_len = (*env)->GetArrayLength(env, ret);
|
||||||
*rx = calloc(*rx_len, sizeof(uint8_t));
|
*rx = calloc(*rx_len, sizeof(uint8_t));
|
||||||
(*env)->GetByteArrayRegion(env, ret, 0, *rx_len, (jbyte *) *rx);
|
(*env)->GetByteArrayRegion(env, ret, 0, *rx_len, *rx);
|
||||||
(*env)->DeleteLocalRef(env, txArr);
|
(*env)->DeleteLocalRef(env, txArr);
|
||||||
(*env)->DeleteLocalRef(env, ret);
|
(*env)->DeleteLocalRef(env, ret);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -113,7 +113,7 @@ http_interface_transmit(struct euicc_ctx *ctx, const char *url, uint32_t *rcode,
|
||||||
jbyteArray rxArr = (jbyteArray) (*env)->GetObjectField(env, ret, field_resp_data);
|
jbyteArray rxArr = (jbyteArray) (*env)->GetObjectField(env, ret, field_resp_data);
|
||||||
*rx_len = (*env)->GetArrayLength(env, rxArr);
|
*rx_len = (*env)->GetArrayLength(env, rxArr);
|
||||||
*rx = calloc(*rx_len, sizeof(uint8_t));
|
*rx = calloc(*rx_len, sizeof(uint8_t));
|
||||||
(*env)->GetByteArrayRegion(env, rxArr, 0, *rx_len, (jbyte *) *rx);
|
(*env)->GetByteArrayRegion(env, rxArr, 0, *rx_len, *rx);
|
||||||
(*env)->DeleteLocalRef(env, txArr);
|
(*env)->DeleteLocalRef(env, txArr);
|
||||||
(*env)->DeleteLocalRef(env, rxArr);
|
(*env)->DeleteLocalRef(env, rxArr);
|
||||||
(*env)->DeleteLocalRef(env, headersArr);
|
(*env)->DeleteLocalRef(env, headersArr);
|
||||||
|
|
Loading…
Add table
Reference in a new issue