You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
text =if (!enabled) "Disabled while patching"else"Select where patches are loaded from",
@@ -1211,6 +1239,65 @@ private fun EditPatchSourceDialog(
1211
1239
)
1212
1240
}
1213
1241
1242
+
// ── Strip Libs Section ──
1243
+
1244
+
/**
1245
+
* Architectures exposed in the strip libs settings. Each entry has the
1246
+
* patcher-facing value (matching CpuArchitecture.arch) and a short display name.
1247
+
* Only modern arches are listed — legacy mips/armeabi are intentionally omitted.
1248
+
*/
1249
+
privatevalSTRIP_LIBS_ARCHS=listOf(
1250
+
"arm64-v8a" to "ARM 64-bit (most modern phones)",
1251
+
"armeabi-v7a" to "ARM 32-bit (older phones)",
1252
+
"x86_64" to "Intel 64-bit (emulators / Chromebooks)",
1253
+
"x86" to "Intel 32-bit (legacy emulators)"
1254
+
)
1255
+
1256
+
@Composable
1257
+
privatefunStripLibsSection(
1258
+
keepArchitectures:Set<String>,
1259
+
onChange: (Set<String>) ->Unit,
1260
+
mono: androidx.compose.ui.text.font.FontFamily,
1261
+
accentColor:Color,
1262
+
enabled:Boolean = true,
1263
+
expanded:Boolean = false,
1264
+
onExpandedChange: (Boolean) ->Unit = {}
1265
+
) {
1266
+
CollapsibleSection(
1267
+
title ="STRIP LIBS",
1268
+
mono = mono,
1269
+
expanded = expanded,
1270
+
onExpandedChange = onExpandedChange
1271
+
) {
1272
+
Column(
1273
+
verticalArrangement =Arrangement.spacedBy(10.dp)
1274
+
) {
1275
+
Text(
1276
+
text ="Uncheck architectures you don't need. When patching, the output APK will keep only the architectures present in the APK AND in this list. If none overlap, nothing is stripped to avoid broken APKs.",
1277
+
fontSize =11.sp,
1278
+
fontFamily = mono,
1279
+
color =MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha =0.5f)
1280
+
)
1281
+
STRIP_LIBS_ARCHS.forEach { (arch, description) ->
1282
+
val checked = arch in keepArchitectures
1283
+
SettingToggleRow(
1284
+
label = arch,
1285
+
description = description,
1286
+
checked = checked,
1287
+
onCheckedChange = { keepIt ->
1288
+
val updated =if (keepIt) keepArchitectures + arch
1289
+
else keepArchitectures - arch
1290
+
onChange(updated)
1291
+
},
1292
+
accentColor = accentColor,
1293
+
mono = mono,
1294
+
enabled = enabled
1295
+
)
1296
+
}
1297
+
}
1298
+
}
1299
+
}
1300
+
1214
1301
// ── Signing / Keystore Section ──
1215
1302
1216
1303
@Composable
@@ -1224,7 +1311,9 @@ private fun SigningSection(
1224
1311
mono: androidx.compose.ui.text.font.FontFamily,
1225
1312
accentColor:Color,
1226
1313
borderColor:Color,
1227
-
enabled:Boolean = true
1314
+
enabled:Boolean = true,
1315
+
expanded:Boolean = false,
1316
+
onExpandedChange: (Boolean) ->Unit = {}
1228
1317
) {
1229
1318
val corners =LocalMorpheCorners.current
1230
1319
val alpha =if (enabled) 1felse0.4f
@@ -1241,7 +1330,12 @@ private fun SigningSection(
1241
1330
val keystoreExists = keystoreFile?.exists() ==true
0 commit comments