diff --git a/.forgejo/workflows/build-debug.yml b/.forgejo/workflows/build-debug.yml
index 0818b8b..660dabc 100644
--- a/.forgejo/workflows/build-debug.yml
+++ b/.forgejo/workflows/build-debug.yml
@@ -33,23 +33,14 @@ jobs:
uses: https://gitea.angry.im/actions/setup-android@v3
- name: Build Debug APKs
- run: ./gradlew --no-daemon assembleDebug :app:assembleDebugMagiskModuleDir
+ run: ./gradlew --no-daemon assembleDebug
- name: Copy Artifacts
- run: |
- find . -name 'app*-debug.apk' -exec cp {} . \;
- cp -r app/build/magisk/debug ./magisk-debug
+ run: find . -name 'app*-debug.apk' -exec cp {} . \;
- - name: Upload APK Artifacts
+ - name: Upload Artifacts
uses: https://gitea.angry.im/actions/upload-artifact@v3
with:
name: Debug APKs
compression-level: 0
path: app*-debug.apk
-
- - name: Upload Magisk Artifacts
- uses: https://gitea.angry.im/actions/upload-artifact@v3
- with:
- name: magisk-debug
- compression-level: 0
- path: magisk-debug
diff --git a/.idea/.gitignore b/.idea/.gitignore
index 2e12995..b7c2402 100644
--- a/.idea/.gitignore
+++ b/.idea/.gitignore
@@ -2,7 +2,7 @@
/caches
/libraries
/assetWizardSettings.xml
-/deploymentTarget*.xml
+/deploymentTargetDropDown.xml
/gradle.xml
/misc.xml
/modules.xml
diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml
new file mode 100644
index 0000000..e40be60
--- /dev/null
+++ b/.idea/deploymentTargetSelector.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app-common/src/main/java/im/angry/openeuicc/core/DefaultEuiccChannelFactory.kt b/app-common/src/main/java/im/angry/openeuicc/core/DefaultEuiccChannelFactory.kt
index 78a8c3f..0de99b5 100644
--- a/app-common/src/main/java/im/angry/openeuicc/core/DefaultEuiccChannelFactory.kt
+++ b/app-common/src/main/java/im/angry/openeuicc/core/DefaultEuiccChannelFactory.kt
@@ -21,7 +21,7 @@ open class DefaultEuiccChannelFactory(protected val context: Context) : EuiccCha
override suspend fun tryOpenEuiccChannel(
port: UiccPortInfoCompat,
isdrAid: ByteArray
- ): EuiccChannel? = try {
+ ): EuiccChannel? {
if (port.portIndex != 0) {
Log.w(
DefaultEuiccChannelManager.TAG,
@@ -35,52 +35,58 @@ open class DefaultEuiccChannelFactory(protected val context: Context) : EuiccCha
DefaultEuiccChannelManager.TAG,
"Trying OMAPI for physical slot ${port.card.physicalSlotIndex}"
)
- EuiccChannelImpl(
- context.getString(R.string.channel_type_omapi),
- port,
- intrinsicChannelName = null,
- OmapiApduInterface(
- seService!!,
+ try {
+ return EuiccChannelImpl(
+ context.getString(R.string.omapi),
port,
- context.preferenceRepository.verboseLoggingFlow
- ),
- isdrAid,
- context.preferenceRepository.verboseLoggingFlow,
- context.preferenceRepository.ignoreTLSCertificateFlow,
- context.preferenceRepository.es10xMssFlow,
- )
- } catch (_: IllegalArgumentException) {
- // Failed
- Log.w(
- DefaultEuiccChannelManager.TAG,
- "OMAPI APDU interface unavailable for physical slot ${port.card.physicalSlotIndex} with ISD-R AID: ${isdrAid.encodeHex()}."
- )
- null
+ intrinsicChannelName = null,
+ OmapiApduInterface(
+ seService!!,
+ port,
+ context.preferenceRepository.verboseLoggingFlow
+ ),
+ isdrAid,
+ context.preferenceRepository.verboseLoggingFlow,
+ context.preferenceRepository.ignoreTLSCertificateFlow,
+ ).also {
+ Log.i(DefaultEuiccChannelManager.TAG, "Is OMAPI channel, setting MSS to 60")
+ it.lpa.setEs10xMss(60)
+ }
+ } catch (_: IllegalArgumentException) {
+ // Failed
+ Log.w(
+ DefaultEuiccChannelManager.TAG,
+ "OMAPI APDU interface unavailable for physical slot ${port.card.physicalSlotIndex} with ISD-R AID: ${isdrAid.encodeHex()}."
+ )
+ }
+
+ return null
}
override fun tryOpenUsbEuiccChannel(
ccidCtx: UsbCcidContext,
isdrAid: ByteArray
- ): EuiccChannel? = try {
- EuiccChannelImpl(
- context.getString(R.string.channel_type_usb),
- FakeUiccPortInfoCompat(FakeUiccCardInfoCompat(EuiccChannelManager.USB_CHANNEL_ID)),
- intrinsicChannelName = ccidCtx.productName,
- UsbApduInterface(
- ccidCtx
- ),
- isdrAid,
- context.preferenceRepository.verboseLoggingFlow,
- context.preferenceRepository.ignoreTLSCertificateFlow,
- context.preferenceRepository.es10xMssFlow,
- )
- } catch (_: IllegalArgumentException) {
- // Failed
- Log.w(
- DefaultEuiccChannelManager.TAG,
- "USB APDU interface unavailable for ISD-R AID: ${isdrAid.encodeHex()}."
- )
- null
+ ): EuiccChannel? {
+ try {
+ return EuiccChannelImpl(
+ context.getString(R.string.usb),
+ FakeUiccPortInfoCompat(FakeUiccCardInfoCompat(EuiccChannelManager.USB_CHANNEL_ID)),
+ intrinsicChannelName = ccidCtx.productName,
+ UsbApduInterface(
+ ccidCtx
+ ),
+ isdrAid,
+ context.preferenceRepository.verboseLoggingFlow,
+ context.preferenceRepository.ignoreTLSCertificateFlow,
+ )
+ } catch (_: IllegalArgumentException) {
+ // Failed
+ Log.w(
+ DefaultEuiccChannelManager.TAG,
+ "USB APDU interface unavailable for ISD-R AID: ${isdrAid.encodeHex()}."
+ )
+ }
+ return null
}
override fun cleanup() {
diff --git a/app-common/src/main/java/im/angry/openeuicc/core/EuiccChannelImpl.kt b/app-common/src/main/java/im/angry/openeuicc/core/EuiccChannelImpl.kt
index eaec522..2a33c20 100644
--- a/app-common/src/main/java/im/angry/openeuicc/core/EuiccChannelImpl.kt
+++ b/app-common/src/main/java/im/angry/openeuicc/core/EuiccChannelImpl.kt
@@ -1,9 +1,8 @@
package im.angry.openeuicc.core
import im.angry.openeuicc.util.UiccPortInfoCompat
+import im.angry.openeuicc.util.decodeHex
import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.first
-import kotlinx.coroutines.runBlocking
import net.typeblog.lpac_jni.ApduInterface
import net.typeblog.lpac_jni.LocalProfileAssistant
import net.typeblog.lpac_jni.impl.HttpInterfaceImpl
@@ -16,8 +15,7 @@ class EuiccChannelImpl(
override val apduInterface: ApduInterface,
override val isdrAid: ByteArray,
verboseLoggingFlow: Flow,
- ignoreTLSCertificateFlow: Flow,
- es10xMssFlow: Flow,
+ ignoreTLSCertificateFlow: Flow
) : EuiccChannel {
override val slotId = port.card.physicalSlotIndex
override val logicalSlotId = port.logicalSlotIndex
@@ -27,10 +25,8 @@ class EuiccChannelImpl(
LocalProfileAssistantImpl(
isdrAid,
apduInterface,
- HttpInterfaceImpl(verboseLoggingFlow, ignoreTLSCertificateFlow),
- ).also {
- it.setEs10xMss(runBlocking { es10xMssFlow.first().toByte() })
- }
+ HttpInterfaceImpl(verboseLoggingFlow, ignoreTLSCertificateFlow)
+ )
override val atr: ByteArray?
get() = (apduInterface as? ApduInterfaceAtrProvider)?.atr
diff --git a/app-common/src/main/java/im/angry/openeuicc/ui/EuiccInfoActivity.kt b/app-common/src/main/java/im/angry/openeuicc/ui/EuiccInfoActivity.kt
index bfbcbd8..4a34edd 100644
--- a/app-common/src/main/java/im/angry/openeuicc/ui/EuiccInfoActivity.kt
+++ b/app-common/src/main/java/im/angry/openeuicc/ui/EuiccInfoActivity.kt
@@ -36,7 +36,7 @@ private val RE_SAS = Regex(
class EuiccInfoActivity : BaseEuiccAccessActivity(), OpenEuiccContextMarker {
companion object {
- private val YES_NO = Pair(R.string.euicc_info_yes, R.string.euicc_info_no)
+ private val YES_NO = Pair(R.string.yes, R.string.no)
}
private lateinit var swipeRefresh: SwipeRefreshLayout
@@ -69,7 +69,7 @@ class EuiccInfoActivity : BaseEuiccAccessActivity(), OpenEuiccContextMarker {
logicalSlotId = intent.getIntExtra("logicalSlotId", 0)
val channelTitle = if (logicalSlotId == EuiccChannelManager.USB_CHANNEL_ID) {
- getString(R.string.channel_type_usb)
+ getString(R.string.usb)
} else {
appContainer.customizableTextProvider.formatInternalChannelName(logicalSlotId)
}
@@ -119,7 +119,7 @@ class EuiccInfoActivity : BaseEuiccAccessActivity(), OpenEuiccContextMarker {
channel.lpa.euiccInfo2?.let { info ->
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_gp_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()))
info.sasAccreditationNumber.trim().takeIf(RE_SAS::matches)
?.let { add(Item(R.string.euicc_info_sas_accreditation_number, it.uppercase())) }
@@ -131,14 +131,14 @@ class EuiccInfoActivity : BaseEuiccAccessActivity(), OpenEuiccContextMarker {
// FS.27 v2.0, Security Guidelines for UICC Profiles (Page 25 of 27, 2024-01-30)
// https://www.gsma.com/solutions-and-impact/technologies/security/wp-content/uploads/2024/01/FS.27-Security-Guidelines-for-UICC-Credentials-v2.0-FINAL-23-July.pdf#page=25
val resId = when {
- signers.isEmpty() -> R.string.euicc_info_unknown // the case is not mp, but it's is not common
+ signers.isEmpty() -> R.string.unknown // the case is not mp, but it's is not common
PKID_GSMA_LIVE_CI.any(signers::contains) -> R.string.euicc_info_ci_gsma_live
PKID_GSMA_TEST_CI.any(signers::contains) -> R.string.euicc_info_ci_gsma_test
else -> R.string.euicc_info_ci_unknown
}
add(Item(R.string.euicc_info_ci_type, getString(resId)))
}
- val atr = channel.atr?.encodeHex() ?: getString(R.string.euicc_info_unavailable)
+ val atr = channel.atr?.encodeHex() ?: getString(R.string.information_unavailable)
add(Item(R.string.euicc_info_atr, atr, copiedToastResId = R.string.toast_atr_copied))
}
@@ -171,7 +171,7 @@ class EuiccInfoActivity : BaseEuiccAccessActivity(), OpenEuiccContextMarker {
fun bind(item: Item) {
copiedToastResId = item.copiedToastResId
title.setText(item.titleResId)
- content.text = item.content ?: getString(R.string.euicc_info_unknown)
+ content.text = item.content ?: getString(R.string.unknown)
}
}
diff --git a/app-common/src/main/java/im/angry/openeuicc/ui/MainActivity.kt b/app-common/src/main/java/im/angry/openeuicc/ui/MainActivity.kt
index b42f4cf..01d0ab2 100644
--- a/app-common/src/main/java/im/angry/openeuicc/ui/MainActivity.kt
+++ b/app-common/src/main/java/im/angry/openeuicc/ui/MainActivity.kt
@@ -174,7 +174,7 @@ open class MainActivity : BaseEuiccAccessActivity(), OpenEuiccContextMarker {
// If USB readers exist, add them at the very last
// We use a wrapper fragment to handle logic specific to USB readers
usbDevice?.let {
- val productName = it.productName ?: getString(R.string.channel_type_usb)
+ val productName = it.productName ?: getString(R.string.usb)
newPages.add(Page(EuiccChannelManager.USB_CHANNEL_ID, productName) {
UsbCcidReaderFragment()
})
diff --git a/app-common/src/main/java/im/angry/openeuicc/ui/NotificationsActivity.kt b/app-common/src/main/java/im/angry/openeuicc/ui/NotificationsActivity.kt
index 07d5f13..21a2d40 100644
--- a/app-common/src/main/java/im/angry/openeuicc/ui/NotificationsActivity.kt
+++ b/app-common/src/main/java/im/angry/openeuicc/ui/NotificationsActivity.kt
@@ -60,7 +60,7 @@ class NotificationsActivity: BaseEuiccAccessActivity(), OpenEuiccContextMarker {
// This is slightly different from the MainActivity logic
// due to the length (we don't want to display the full USB product name)
val channelTitle = if (logicalSlotId == EuiccChannelManager.USB_CHANNEL_ID) {
- getString(R.string.channel_type_usb)
+ getString(R.string.usb)
} else {
appContainer.customizableTextProvider.formatInternalChannelName(logicalSlotId)
}
diff --git a/app-common/src/main/java/im/angry/openeuicc/ui/SettingsFragment.kt b/app-common/src/main/java/im/angry/openeuicc/ui/SettingsFragment.kt
index 7a717ac..6554142 100644
--- a/app-common/src/main/java/im/angry/openeuicc/ui/SettingsFragment.kt
+++ b/app-common/src/main/java/im/angry/openeuicc/ui/SettingsFragment.kt
@@ -8,7 +8,6 @@ import android.provider.Settings
import android.widget.Toast
import androidx.lifecycle.lifecycleScope
import androidx.preference.CheckBoxPreference
-import androidx.preference.ListPreference
import androidx.preference.Preference
import androidx.preference.PreferenceCategory
import androidx.preference.PreferenceFragmentCompat
@@ -17,6 +16,7 @@ import im.angry.openeuicc.util.*
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
+import kotlinx.coroutines.runBlocking
open class SettingsFragment: PreferenceFragmentCompat() {
private lateinit var developerPref: PreferenceCategory
@@ -34,7 +34,7 @@ open class SettingsFragment: PreferenceFragmentCompat() {
// Show / hide developer preference based on whether it is enabled
lifecycleScope.launch {
preferenceRepository.developerOptionsEnabledFlow
- .onEach(developerPref::setVisible)
+ .onEach { developerPref.isVisible = it }
.collect()
}
@@ -84,9 +84,6 @@ open class SettingsFragment: PreferenceFragmentCompat() {
requirePreference("pref_developer_euicc_memory_reset")
.bindBooleanFlow(preferenceRepository.euiccMemoryResetFlow)
- requirePreference("pref_developer_es10x_mss")
- .bindIntFlow(preferenceRepository.es10xMssFlow, 63)
-
requirePreference("pref_developer_isdr_aid_list").apply {
intent = Intent(requireContext(), IsdrAidListActivity::class.java)
}
@@ -103,53 +100,51 @@ open class SettingsFragment: PreferenceFragmentCompat() {
@Suppress("UNUSED_PARAMETER")
private fun onAppVersionClicked(pref: Preference): Boolean {
if (developerPref.isVisible) return false
-
val now = System.currentTimeMillis()
- numClicks = if (now - lastClickTimestamp >= 1000) 1 else numClicks + 1
+ if (now - lastClickTimestamp >= 1000) {
+ numClicks = 1
+ } else {
+ numClicks++
+ }
lastClickTimestamp = now
- lifecycleScope.launch {
- preferenceRepository.developerOptionsEnabledFlow.updatePreference(numClicks >= 7)
+ if (numClicks == 7) {
+ lifecycleScope.launch {
+ preferenceRepository.developerOptionsEnabledFlow.updatePreference(true)
+
+ lastToast?.cancel()
+ Toast.makeText(
+ requireContext(),
+ R.string.developer_options_enabled,
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ } else if (numClicks > 1) {
+ lastToast?.cancel()
+ lastToast = Toast.makeText(
+ requireContext(),
+ getString(R.string.developer_options_steps, 7 - numClicks),
+ Toast.LENGTH_SHORT
+ )
+ lastToast!!.show()
}
- val toastText = when {
- numClicks == 7 -> getString(R.string.developer_options_enabled)
- numClicks > 1 -> getString(R.string.developer_options_steps, 7 - numClicks)
- else -> return true
- }
-
- lastToast?.cancel()
- lastToast = Toast.makeText(requireContext(), toastText, Toast.LENGTH_SHORT)
- lastToast!!.show()
return true
}
protected fun CheckBoxPreference.bindBooleanFlow(flow: PreferenceFlowWrapper) {
lifecycleScope.launch {
- flow.collect(::setChecked)
+ flow.collect { isChecked = it }
}
setOnPreferenceChangeListener { _, newValue ->
- lifecycleScope.launch {
+ runBlocking {
flow.updatePreference(newValue as Boolean)
}
true
}
}
- private fun ListPreference.bindIntFlow(flow: PreferenceFlowWrapper, defaultValue: Int) {
- lifecycleScope.launch {
- flow.collect { value = it.toString() }
- }
-
- setOnPreferenceChangeListener { _, newValue ->
- lifecycleScope.launch {
- flow.updatePreference((newValue as String).toIntOrNull() ?: defaultValue)
- }
- true
- }
- }
-
protected fun mergePreferenceOverlay(overlayKey: String, targetKey: String) {
val overlayCat = requirePreference(overlayKey)
val targetCat = requirePreference(targetKey)
diff --git a/app-common/src/main/java/im/angry/openeuicc/ui/wizard/DownloadWizardSlotSelectFragment.kt b/app-common/src/main/java/im/angry/openeuicc/ui/wizard/DownloadWizardSlotSelectFragment.kt
index 8097058..28bc9f0 100644
--- a/app-common/src/main/java/im/angry/openeuicc/ui/wizard/DownloadWizardSlotSelectFragment.kt
+++ b/app-common/src/main/java/im/angry/openeuicc/ui/wizard/DownloadWizardSlotSelectFragment.kt
@@ -19,6 +19,7 @@ import im.angry.openeuicc.util.*
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.launch
+import net.typeblog.lpac_jni.LocalProfileInfo
class DownloadWizardSlotSelectFragment : DownloadWizardActivity.DownloadWizardStepFragment() {
companion object {
@@ -186,12 +187,12 @@ class DownloadWizardSlotSelectFragment : DownloadWizardActivity.DownloadWizardSt
}
title.text = if (item.logicalSlotId == EuiccChannelManager.USB_CHANNEL_ID) {
- item.intrinsicChannelName ?: root.context.getString(R.string.channel_type_usb)
+ item.intrinsicChannelName ?: root.context.getString(R.string.usb)
} else {
appContainer.customizableTextProvider.formatInternalChannelName(item.logicalSlotId)
}
eID.text = item.eID
- activeProfile.text = item.enabledProfileName ?: root.context.getString(R.string.profile_no_enabled_profile)
+ activeProfile.text = item.enabledProfileName ?: root.context.getString(R.string.unknown)
freeSpace.text = formatFreeSpace(item.freeSpace)
checkBox.isChecked = adapter.currentSelectedIdx == idx
}
diff --git a/app-common/src/main/java/im/angry/openeuicc/util/PreferenceUtils.kt b/app-common/src/main/java/im/angry/openeuicc/util/PreferenceUtils.kt
index 2fef3db..5f4aec4 100644
--- a/app-common/src/main/java/im/angry/openeuicc/util/PreferenceUtils.kt
+++ b/app-common/src/main/java/im/angry/openeuicc/util/PreferenceUtils.kt
@@ -5,7 +5,6 @@ import androidx.datastore.core.DataStore
import androidx.datastore.preferences.core.Preferences
import androidx.datastore.preferences.core.booleanPreferencesKey
import androidx.datastore.preferences.core.edit
-import androidx.datastore.preferences.core.intPreferencesKey
import androidx.datastore.preferences.core.stringPreferencesKey
import androidx.datastore.preferences.preferencesDataStore
import androidx.fragment.app.Fragment
@@ -39,7 +38,6 @@ internal object PreferenceKeys {
val IGNORE_TLS_CERTIFICATE = booleanPreferencesKey("ignore_tls_certificate")
val EUICC_MEMORY_RESET = booleanPreferencesKey("euicc_memory_reset")
val ISDR_AID_LIST = stringPreferencesKey("isdr_aid_list")
- val ES10X_MSS = intPreferencesKey("es10x_mss")
}
const val EUICC_DEFAULT_ISDR_AID = "A0000005591010FFFFFFFF8900000100"
@@ -52,12 +50,9 @@ internal object PreferenceConstants {
# eUICC standard
$EUICC_DEFAULT_ISDR_AID
- # ESTKme AUX (deprecated, use SE0 instead)
+ # eSTK.me
A06573746B6D65FFFFFFFF4953442D52
- # ESTKme SE0
- A06573746B6D65FFFF4953442D522030
-
# eSIM.me
A0000005591010000000008900000300
@@ -91,7 +86,6 @@ open class PreferenceRepository(private val context: Context) {
PreferenceConstants.DEFAULT_AID_LIST,
{ Base64.getEncoder().encodeToString(it.encodeToByteArray()) },
{ Base64.getDecoder().decode(it).decodeToString() })
- val es10xMssFlow = bindFlow(PreferenceKeys.ES10X_MSS, 63)
protected fun bindFlow(
key: Preferences.Key,
diff --git a/app-common/src/main/java/im/angry/openeuicc/util/UiUtils.kt b/app-common/src/main/java/im/angry/openeuicc/util/UiUtils.kt
index c7c859d..a73d7fe 100644
--- a/app-common/src/main/java/im/angry/openeuicc/util/UiUtils.kt
+++ b/app-common/src/main/java/im/angry/openeuicc/util/UiUtils.kt
@@ -102,8 +102,8 @@ fun T.setupLogSaving(
AlertDialog.Builder(context).apply {
setMessage(R.string.logs_saved_message)
- setNegativeButton(android.R.string.cancel) { _, _ -> }
- setPositiveButton(android.R.string.ok) { _, _ ->
+ setNegativeButton(R.string.no) { _, _ -> }
+ setPositiveButton(R.string.yes) { _, _ ->
val intent = Intent(Intent.ACTION_SEND).apply {
type = "text/plain"
clipData = ClipData.newUri(context.contentResolver, lastFileName, uri)
diff --git a/app-common/src/main/res/menu/activity_isdr_aid_list.xml b/app-common/src/main/res/menu/activity_isdr_aid_list.xml
index 99492d6..32f178a 100644
--- a/app-common/src/main/res/menu/activity_isdr_aid_list.xml
+++ b/app-common/src/main/res/menu/activity_isdr_aid_list.xml
@@ -9,7 +9,7 @@
\ No newline at end of file
diff --git a/app-common/src/main/res/menu/activity_main.xml b/app-common/src/main/res/menu/activity_main.xml
index c15663f..0e00292 100644
--- a/app-common/src/main/res/menu/activity_main.xml
+++ b/app-common/src/main/res/menu/activity_main.xml
@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
diff --git a/app-common/src/main/res/menu/activity_notifications.xml b/app-common/src/main/res/menu/activity_notifications.xml
index b80e06e..87f96a6 100644
--- a/app-common/src/main/res/menu/activity_notifications.xml
+++ b/app-common/src/main/res/menu/activity_notifications.xml
@@ -4,6 +4,6 @@
\ No newline at end of file
diff --git a/app-common/src/main/res/values-ja/strings.xml b/app-common/src/main/res/values-ja/strings.xml
index 946625f..e631d52 100644
--- a/app-common/src/main/res/values-ja/strings.xml
+++ b/app-common/src/main/res/values-ja/strings.xml
@@ -2,10 +2,10 @@
このアプリでアクセスできるリムーバブル eUICC カードがデバイス上で検出されていません。互換性のあるカード挿入または USB リーダーを接続してください。
この eSIM にはプロファイルがありません。
- 不明
- 情報がありません
- ヘルプ
- スロットを再読み込み
+ 不明
+ 情報がありません
+ ヘルプ
+ スロットを再読み込み
論理スロット %d
有効済み
無効済み
@@ -110,7 +110,7 @@
製品ファームウェアバージョン
SGP.22 バージョン
eUICC OS バージョン
- グローバルプラットフォームのバージョン
+ グローバルプラットフォームのバージョン
SAS 認定番号
保護されたプロファイルのバージョン
NVRAM の空き容量 (eSIM プロファイルストレージ)
@@ -118,8 +118,8 @@
GSMA ライブ CI
GSMA テスト CI
不明な eSIM CI
- はい
- いいえ
+ はい
+ いいえ
保存
%s のログ
開発者になるまであと %d ステップです。
@@ -167,6 +167,6 @@
この操作は、デフォルトでは非表示になっている危険な操作です。代わりに、すべての構成ファイルを手動で削除することもできます。
モデムに更新コマンドを送信
ISD-R AID リストのカスタマイズ
- リセット
+ リセット
ISD-R AID リスト
diff --git a/app-common/src/main/res/values-zh-rCN/strings.xml b/app-common/src/main/res/values-zh-rCN/strings.xml
index e947c6a..b0938d3 100644
--- a/app-common/src/main/res/values-zh-rCN/strings.xml
+++ b/app-common/src/main/res/values-zh-rCN/strings.xml
@@ -2,9 +2,9 @@
在此设备上未检测到此应用程序可访问的可插拔 eUICC 卡。请插入兼容卡或 USB 读卡器。
此 eSIM 上还没有配置文件
- 未知
- 帮助
- 重新加载卡槽
+ 未知
+ 帮助
+ 重新加载卡槽
逻辑卡槽 %d
已启用
已禁用
@@ -132,7 +132,7 @@
可插拔
SGP.22 版本
eUICC OS 版本
- GlobalPlatform 版本
+ GlobalPlatform 版本
SAS 认证号码
Protected Profile 版本
NVRAM 剩余空间 (eSIM 存储容量)
@@ -140,8 +140,8 @@
GSMA 生产环境 CI
GSMA 测试 CI
未知 eSIM CI
- 是
- 否
+ 是
+ 否
还有 %d 步成为开发者
你现在是开发者了!
语言
@@ -152,7 +152,7 @@
在配置文件列表中包括非生产环境的配置文件
无视 SM-DP+ 的 TLS 证书
允许 RSP 服务器使用任意证书
- 无信息
+ 无信息
输入的确认文本不匹配
此芯片已被擦除
正在擦除 eSIM 芯片
@@ -167,6 +167,6 @@
此操作是默认隐藏的危险操作。作为替代方案,您可以手动删除所有配置文件。
向基带发送刷新命令
自定义 ISD-R AID 列表
- 重置
+ 重置
ISD-R AID 列表
\ No newline at end of file
diff --git a/app-common/src/main/res/values-zh-rTW/strings.xml b/app-common/src/main/res/values-zh-rTW/strings.xml
index 88cc011..e0334c6 100644
--- a/app-common/src/main/res/values-zh-rTW/strings.xml
+++ b/app-common/src/main/res/values-zh-rTW/strings.xml
@@ -2,9 +2,9 @@
在此裝置上未檢測到此應用程式可訪問的可插拔 eUICC 卡。請插入相容卡或 USB 晶片讀卡機。
此 eSIM 上還沒有設定檔
- 未知
- 幫助
- 重新載入卡槽
+ 未知
+ 幫助
+ 重新載入卡槽
虛擬卡槽 %d
已啟用
已停用
@@ -132,7 +132,7 @@
可插拔
SGP.22 版本
eUICC OS 版本
- GlobalPlatform 版本
+ GlobalPlatform 版本
SAS 認證號碼
Protected Profile 版本
NVRAM 剩餘空間 (eSIM 儲存容量)
@@ -140,8 +140,8 @@
GSMA 生產環境 CI
GSMA 測試 CI
未知 eSIM CI
- 是
- 否
+ 是
+ 否
還有 %d 步成為開發者
您現在是開發者了!
語言
@@ -152,7 +152,7 @@
在設定檔列表中包括非生產環境的設定檔
忽略 SM-DP+ 的 TLS 證書
允許 RSP 伺服器使用任意證書
- 無資訊
+ 無資訊
輸入的確認文字不匹配
此晶片已被擦除
正在擦除 eSIM 晶片
@@ -167,6 +167,6 @@
此操作是預設隱藏的危險操作。作為替代方案,您可以手動刪除所有設定檔。
向基帶發送刷新命令
自訂 ISD-R AID 列表
- 重置
+ 重置
ISD-R AID 列表
\ No newline at end of file
diff --git a/app-common/src/main/res/values/strings.xml b/app-common/src/main/res/values/strings.xml
index b90338c..f28318f 100644
--- a/app-common/src/main/res/values/strings.xml
+++ b/app-common/src/main/res/values/strings.xml
@@ -2,15 +2,14 @@
No removable eUICC card accessible by this app is detected on this device. Insert a compatible card or a USB reader.
No profiles (yet) on this eSIM.
-
- Help
-
- Reload Slots
- Unknown
+ Unknown
+ Information Unavailable
+ Help
+ Reload Slots
Logical Slot %d
- USB
- OpenMobile API (OMAPI)
+ USB
+ OpenMobile API (OMAPI)
Enabled
@@ -160,7 +159,7 @@
ISD-R AID
SGP.22 Version
eUICC OS Version
- GlobalPlatform Version
+ GlobalPlatform Version
SAS Accreditation Number
Protected Profile Version
Free NVRAM (eSIM profile storage)
@@ -177,11 +176,8 @@
I CONFIRM TO ERASE THE CHIP WHOSE EID ENDS WITH %s AND UNDERSTAND THAT THIS IS IRREVERSIBLE
Erase
-
- Yes
- No
- Unknown
- Information Unavailable
+ Yes
+ No
Save
Logs at %s
@@ -189,9 +185,10 @@
You are %d steps away from being a developer.
You are now a developer!
+ Reset
+
ISD-R AID List
Saved custom ISD-R AID list.
- Reset
Settings
Notifications
@@ -220,16 +217,6 @@
Accept any TLS certificate used by the RSP server
Allow erasing eUICC
This is a dangerous operation and hidden by default. As an alternative, you can delete all profiles manually.
- ES10x MSS
- Global ES10x MSS
-
- - High Speed
- - Compatibility Mode
-
-
- - 255
- - 63
-
Customize ISD-R AID list
Some brands of removable eUICCs may use their own non-standard ISD-R AID, rendering them inaccessible to third-party apps. We can attempt to use non-standard AIDs added in this list, but there is no guarantee that they will work.
Info
diff --git a/app-common/src/main/res/xml/pref_settings.xml b/app-common/src/main/res/xml/pref_settings.xml
index 831b04d..690a120 100644
--- a/app-common/src/main/res/xml/pref_settings.xml
+++ b/app-common/src/main/res/xml/pref_settings.xml
@@ -81,14 +81,6 @@
app:summary="@string/pref_developer_euicc_memory_reset_desc"
app:title="@string/pref_developer_euicc_memory_reset" />
-
-
("assembleDebugMagiskModuleDir") {
- variant = "debug"
- appName = "OpenEUICC"
- permsFile = project.rootProject.file("privapp_whitelist_im.angry.openeuicc.xml")
- moduleInstaller = project.file("magisk/module_installer.sh")
- moduleCustomizeScriptText = moduleCustomizeScript
- moduleUninstallScriptText = moduleUninstallScript
- moduleProp = modulePropsTemplate.let {
- it["description"] = "(debug build) ${it["description"]}"
- it["versionCode"] = "${(android.applicationVariants.find { it.name == "debug" }!!.outputs.first() as ApkVariantOutputImpl).versionCodeOverride}"
- it["updateJson"] = "https://openeuicc.com/magisk/magisk-debug.json"
- it
- }
- dependsOn("assembleDebug")
-}
-
-tasks.register("assembleDebugMagiskModule") {
- dependsOn("assembleDebugMagiskModuleDir")
- from((tasks.getByName("assembleDebugMagiskModuleDir") as MagiskModuleDirTask).outputDir)
- archiveFileName = "magisk-debug.zip"
- destinationDirectory = project.layout.buildDirectory.dir("magisk")
- entryCompression = ZipEntryCompression.STORED
-}
-
-tasks.register("assembleReleaseMagiskModuleDir") {
- variant = "release"
- appName = "OpenEUICC"
- permsFile = project.rootProject.file("privapp_whitelist_im.angry.openeuicc.xml")
- moduleInstaller = project.file("magisk/module_installer.sh")
- moduleCustomizeScriptText = moduleCustomizeScript
- moduleUninstallScriptText = moduleUninstallScript
- moduleProp = modulePropsTemplate
- dependsOn("assembleRelease")
-}
-
-tasks.register("assembleReleaseMagiskModule") {
- dependsOn("assembleReleaseMagiskModuleDir")
- from((tasks.getByName("assembleReleaseMagiskModuleDir") as MagiskModuleDirTask).outputDir)
- archiveFileName = "magisk-release.zip"
- destinationDirectory = project.layout.buildDirectory.dir("magisk")
- entryCompression = ZipEntryCompression.STORED
}
\ No newline at end of file
diff --git a/app/magisk/customize.sh b/app/magisk/customize.sh
deleted file mode 100644
index 707b401..0000000
--- a/app/magisk/customize.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-TMP_FILE="$TMPDIR/{APK_NAME}"
-
-chmod u+x "$MODPATH/uninstall.sh"
-cp "$MODPATH/system/system_ext/{APK_NAME}/{APK_NAME}.apk" "$TMP_FILE"
-
-pm install -r "$TMP_FILE"
-rm -f "$TMP_FILE"
-
-pm grant "{PKG_NAME}" android.permission.READ_PHONE_STATE
\ No newline at end of file
diff --git a/app/magisk/module_installer.sh b/app/magisk/module_installer.sh
deleted file mode 100644
index 28b48e5..0000000
--- a/app/magisk/module_installer.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/sbin/sh
-
-#################
-# Initialization
-#################
-
-umask 022
-
-# echo before loading util_functions
-ui_print() { echo "$1"; }
-
-require_new_magisk() {
- ui_print "*******************************"
- ui_print " Please install Magisk v20.4+! "
- ui_print "*******************************"
- exit 1
-}
-
-#########################
-# Load util_functions.sh
-#########################
-
-OUTFD=$2
-ZIPFILE=$3
-
-mount /data 2>/dev/null
-
-[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
-. /data/adb/magisk/util_functions.sh
-[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
-
-install_module
-exit 0
diff --git a/app/magisk/uninstall.sh b/app/magisk/uninstall.sh
deleted file mode 100644
index 1eb0200..0000000
--- a/app/magisk/uninstall.sh
+++ /dev/null
@@ -1 +0,0 @@
-pm uninstall "{PKG_NAME}"
\ No newline at end of file
diff --git a/app/src/main/java/im/angry/openeuicc/core/PrivilegedEuiccChannelFactory.kt b/app/src/main/java/im/angry/openeuicc/core/PrivilegedEuiccChannelFactory.kt
index 876387f..68eddef 100644
--- a/app/src/main/java/im/angry/openeuicc/core/PrivilegedEuiccChannelFactory.kt
+++ b/app/src/main/java/im/angry/openeuicc/core/PrivilegedEuiccChannelFactory.kt
@@ -2,6 +2,7 @@ package im.angry.openeuicc.core
import android.content.Context
import android.util.Log
+import im.angry.openeuicc.OpenEuiccApplication
import im.angry.openeuicc.R
import im.angry.openeuicc.util.*
import kotlinx.coroutines.flow.first
@@ -31,7 +32,7 @@ class PrivilegedEuiccChannelFactory(context: Context) : DefaultEuiccChannelFacto
)
try {
return EuiccChannelImpl(
- context.getString(R.string.channel_type_telephony_manager),
+ context.getString(R.string.telephony_manager),
port,
intrinsicChannelName = null,
TelephonyManagerApduInterface(
@@ -42,7 +43,6 @@ class PrivilegedEuiccChannelFactory(context: Context) : DefaultEuiccChannelFacto
isdrAid,
context.preferenceRepository.verboseLoggingFlow,
context.preferenceRepository.ignoreTLSCertificateFlow,
- context.preferenceRepository.es10xMssFlow,
)
} catch (_: IllegalArgumentException) {
// Failed
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index fbf5c53..acc1728 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -1,7 +1,7 @@
このデバイスで eUICC が見つかりません。\nデバイスによってはアプリのメニューからデュアル SIM を有効化する必要があります。
- TelephonyManager (特権)
+ TelephonyManager (特権)
デュアル SIM
DSDS の状態が切り替わりました。モデムが再起動するまでお待ちください。
このスロットは MEP (Multiple Enabled Profiles) をサポートしています。この機能を有効化または無効化するには「スロットマッピングツール」を使用してください。
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index acd9a61..d6befc2 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -16,7 +16,7 @@
您的设备支持 eSIM。要连接到移动网络,请下载运营商发布的 eSIM,或插入物理 SIM 卡。
跳过
下载 eSIM
- TelephonyManager (特权)
+ TelephonyManager (特权)
全局使用 TelephonyManager
在默认情况下,可移除 eUICC 将仅使用 OMAPI。这与非特权模式 (EasyEUICC) 一致。在某些设备上 OMAPI 可能存在问题 -- 选择此选项以强制使用 TelephonyManager。
\ No newline at end of file
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 52b5aa8..10285d3 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -16,7 +16,7 @@
您的裝置支援 eSIM。要連線到行動網路,請下載電信業者釋出的 eSIM,或插入實體 SIM 卡。
跳過
下載 eSIM
- TelephonyManager (特權)
+ TelephonyManager (特權)
全域使用 TelephonyManager
在預設情況下,可移除 eUICC 將僅使用 OMAPI。這與非特權模式 (EasyEUICC) 一致。在某些裝置上 OMAPI 可能有問題 -- 選擇此選項以強制使用 TelephonyManager。
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 2c26bc3..ddf17e4 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,7 +1,7 @@
OpenEUICC
No eUICC found on this device.\nOn some devices, you may need to enable dual SIM first in the menu of this app.
- TelephonyManager (Privileged)
+ TelephonyManager (Privileged)
Dual SIM
diff --git a/buildSrc/src/main/kotlin/im/angry/openeuicc/build/Magisk.kt b/buildSrc/src/main/kotlin/im/angry/openeuicc/build/Magisk.kt
deleted file mode 100644
index 6245d8c..0000000
--- a/buildSrc/src/main/kotlin/im/angry/openeuicc/build/Magisk.kt
+++ /dev/null
@@ -1,74 +0,0 @@
-package im.angry.openeuicc.build
-
-import org.gradle.api.DefaultTask
-import org.gradle.api.provider.MapProperty
-import org.gradle.api.provider.Property
-import org.gradle.api.tasks.Input
-import org.gradle.api.tasks.InputDirectory
-import org.gradle.api.tasks.InputFile
-import org.gradle.api.tasks.OutputDirectory
-import org.gradle.api.tasks.TaskAction
-import java.io.File
-
-abstract class MagiskModuleDirTask : DefaultTask() {
- @get:Input
- abstract val variant : Property
-
- @get:Input
- abstract val appName : Property
-
- @get:InputFile
- abstract val permsFile : Property
-
- @get:InputFile
- abstract val moduleInstaller : Property
-
- @get:Input
- abstract val moduleCustomizeScriptText : Property
-
- @get:Input
- abstract val moduleUninstallScriptText : Property
-
- @get:Input
- abstract val moduleProp : MapProperty
-
- @InputDirectory
- val inputDir = variant.map { project.layout.buildDirectory.dir("outputs/apk/${it}") }
-
- @OutputDirectory
- val outputDir = variant.map { project.layout.buildDirectory.dir("magisk/${it}") }
-
- @TaskAction
- fun build() {
- val dir = outputDir.get().get()
- project.mkdir(dir)
- val systemExtDir = dir.dir("system/system_ext")
- val permDir = dir.dir("system/system_ext/etc/permissions")
- val appDir = systemExtDir.dir("priv-app/${appName.get()}")
- val metaInfDir = dir.dir("META-INF/com/google/android")
- project.mkdir(systemExtDir)
- project.mkdir(metaInfDir)
- project.mkdir(appDir)
- project.mkdir(permDir)
- project.copy {
- into(appDir)
- from(inputDir) {
- include("app-${variant.get()}.apk")
- rename("app-${variant.get()}.apk", "${appName.get()}.apk")
- }
- }
- project.copy {
- from(permsFile)
- into(permDir)
- }
- project.copy {
- from(moduleInstaller)
- into(metaInfDir)
- rename(".*", "update-binary")
- }
- dir.file("customize.sh").asFile.writeText(moduleCustomizeScriptText.get())
- dir.file("uninstall.sh").asFile.writeText(moduleUninstallScriptText.get())
- metaInfDir.file("updater-script").asFile.writeText("# MAGISK")
- dir.file("module.prop").asFile.writeText(moduleProp.get().map { (k, v) -> "$k=$v" }.joinToString("\n"))
- }
-}
\ No newline at end of file
diff --git a/buildSrc/src/main/kotlin/im/angry/openeuicc/build/Versioning.kt b/buildSrc/src/main/kotlin/im/angry/openeuicc/build/Versioning.kt
index ef07c43..24f0235 100644
--- a/buildSrc/src/main/kotlin/im/angry/openeuicc/build/Versioning.kt
+++ b/buildSrc/src/main/kotlin/im/angry/openeuicc/build/Versioning.kt
@@ -16,7 +16,7 @@ val Project.gitVersionCode: Int
standardOutput = stdout
}
stdout.toString("utf-8").trim('\n').toInt()
- } catch (_: Exception) {
+ } catch (e: Exception) {
0
}
@@ -29,7 +29,7 @@ val Project.gitVersionName: String
standardOutput = stdout
}
stdout.toString("utf-8").trim('\n')
- } catch (_: Exception) {
+ } catch (e: Exception) {
"Unknown"
}
@@ -38,7 +38,7 @@ class MyVersioningPlugin: Plugin {
target.configure {
defaultConfig {
versionCode = target.gitVersionCode
- versionName = target.gitVersionName.removePrefix("unpriv-")
+ versionName = target.gitVersionName
}
applicationVariants.all {
diff --git a/libs/lpac-jni/src/main/jni/Application.mk b/libs/lpac-jni/src/main/jni/Application.mk
index c1d3766..2112196 100644
--- a/libs/lpac-jni/src/main/jni/Application.mk
+++ b/libs/lpac-jni/src/main/jni/Application.mk
@@ -1,5 +1,4 @@
APP_ABI := all
APP_SHORT_COMMANDS := true
APP_CFLAGS := -Wno-compound-token-split-by-macro
-APP_LDFLAGS := -Wl,--build-id=none -z muldefs
-APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true
+APP_LDFLAGS := -Wl,--build-id=none -z muldefs
\ No newline at end of file
diff --git a/libs/lpac-jni/src/main/jni/lpac-jni.mk b/libs/lpac-jni/src/main/jni/lpac-jni.mk
index dad173c..c0bcee7 100644
--- a/libs/lpac-jni/src/main/jni/lpac-jni.mk
+++ b/libs/lpac-jni/src/main/jni/lpac-jni.mk
@@ -1,5 +1,4 @@
LOCAL_PATH := $(call my-dir)
-LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384"
# function to find all *.c files under a directory
define all-c-files-under