soul-browser/sources/java/com/mycompany/app/subtitle/Subtitle.java
KaKi87 550ddb0413
Decompile and recreate Soul Browser v1.4.85 with APK CI builds (#1)
* Decompile and recreate Soul Browser v1.4.85 with APK CI builds

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix CI build: include bundled google.jks and remove PR trigger

The apktool build failed in CI because app/unknown/.../google.jks was
excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files
and commit the missing resource.

Also remove the redundant pull_request workflow trigger.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Change package ID to com.github.kaki87.soulbrowser

Rename the application ID so the rebuilt APK can be installed
alongside the original Soul Browser from Google Play.

- Update AndroidManifest package, permissions, providers, and actions
- Update R class references in smali (com/github/kaki87/soulbrowser/R)
- Update shortcuts.xml targetPackage
- Rename app label to "Soul Rebuild" for easy identification

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix install compatibility: remove split APK metadata and bundle native libs

The rebuilt APK still declared requiredSplitTypes and Play Store split
metadata, causing Android to reject standalone installs as incompatible.

- Remove requiredSplitTypes and split-related manifest meta-data
- Merge native libs from all ABI splits with uncompressed storage
- Page-align before signing for extractNativeLibs=false
- Add .so to apktool doNotCompress list

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix install failure: use apksigner v2/v3 and bundle arm64 native libs

Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only
produces v1 signatures, causing Android to reject the install.

- Sign with apksigner (v1+v2+v3) instead of jarsigner
- Add arm64-v8a native libraries from universal Soul Browser 1.4.79
- Set extractNativeLibs=true for reliable sideload installs
- Commit stable debug keystore for consistent signatures across builds

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Add committed debug keystore for consistent APK signatures

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix startup crash: use original classes2.dex desugar libraries

Apktool recompiles smali_classes2 into a broken classes2.dex, causing
ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init.

Inject the original classes2.dex (Java 8+ desugar libs) after apktool
build instead of using the recompiled version.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix missing drawable resources from density split APKs

The base APK is an app bundle module; density-specific drawables like
seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild,
causing Resources$NotFoundException at runtime.

- Merge non-9-patch resources from split APKs before apktool build
- Sync public.xml IDs from R smali only when backing files exist
- Add 713 density-specific resource IDs to public.xml

Co-authored-by: KaKi87 <KaKi87@pm.me>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-10 16:07:14 +02:00

47 lines
4.1 KiB
Java

package com.mycompany.app.subtitle;
/* loaded from: classes3.dex */
public class Subtitle {
/* renamed from: a, reason: collision with root package name */
public static final String[] f18306a = {"ass", "psb", "scc", "smi", "srt", "ssa", "stl", "sub", "ttml", "vtt"};
public static final String[] b = {".ass", ".psb", ".scc", ".smi", ".srt", ".ssa", ".stl", ".sub", ".ttml", ".vtt"};
/* loaded from: classes3.dex */
public interface SubtitleListener {
boolean a();
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARN: Code restructure failed: missing block: B:452:0x02e5, code lost:
r9.append(r5);
r30 = r0;
r14 = r9.toString();
*/
/* JADX WARN: Code restructure failed: missing block: B:463:0x0306, code lost:
r9.append(r5);
r6.f18302c = r9.toString();
*/
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:105:0x092e A[SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:200:0x058f A[Catch: Exception -> 0x0601, TRY_ENTER, TryCatch #28 {Exception -> 0x0601, blocks: (B:187:0x0527, B:189:0x0535, B:191:0x053d, B:200:0x058f, B:201:0x0598, B:203:0x059e, B:205:0x05a4, B:207:0x05b3, B:210:0x05cb, B:211:0x05d1, B:213:0x05db, B:215:0x05de, B:217:0x05ec, B:219:0x05f2, B:221:0x05fb), top: B:186:0x0527 }] */
/* JADX WARN: Removed duplicated region for block: B:219:0x05f2 A[Catch: Exception -> 0x0601, LOOP:9: B:217:0x05ec->B:219:0x05f2, LOOP_END, TryCatch #28 {Exception -> 0x0601, blocks: (B:187:0x0527, B:189:0x0535, B:191:0x053d, B:200:0x058f, B:201:0x0598, B:203:0x059e, B:205:0x05a4, B:207:0x05b3, B:210:0x05cb, B:211:0x05d1, B:213:0x05db, B:215:0x05de, B:217:0x05ec, B:219:0x05f2, B:221:0x05fb), top: B:186:0x0527 }] */
/* JADX WARN: Removed duplicated region for block: B:286:0x044f A[Catch: Exception -> 0x04ef, TryCatch #0 {Exception -> 0x04ef, blocks: (B:259:0x039c, B:262:0x03a4, B:264:0x03b0, B:268:0x03c2, B:272:0x03d2, B:274:0x03d8, B:276:0x03e1, B:278:0x03ee, B:280:0x03f6, B:282:0x0402, B:284:0x0449, B:286:0x044f, B:290:0x040f, B:292:0x0417, B:293:0x0427, B:294:0x0434, B:300:0x03ce, B:304:0x0476, B:311:0x047e, B:315:0x0488, B:317:0x048e, B:319:0x0497, B:322:0x04a3, B:324:0x04ab, B:326:0x04b3, B:327:0x04c0, B:329:0x04c6, B:330:0x04d6, B:331:0x04e3), top: B:258:0x039c }] */
/* JADX WARN: Removed duplicated region for block: B:289:0x0466 A[SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:82:0x08a6 A[Catch: Exception -> 0x0934, TryCatch #6 {Exception -> 0x0934, blocks: (B:67:0x080c, B:68:0x0822, B:70:0x0828, B:72:0x0830, B:74:0x0858, B:75:0x0864, B:77:0x086c, B:79:0x0896, B:80:0x08a0, B:82:0x08a6, B:84:0x08b6, B:86:0x08f9, B:87:0x08d6, B:89:0x08e6, B:93:0x08fc, B:97:0x090f, B:98:0x0913, B:100:0x091d, B:102:0x0920, B:106:0x0879, B:108:0x0881), top: B:66:0x080c }] */
/* JADX WARN: Removed duplicated region for block: B:95:0x090c */
/* JADX WARN: Removed duplicated region for block: B:97:0x090f A[Catch: Exception -> 0x0934, TryCatch #6 {Exception -> 0x0934, blocks: (B:67:0x080c, B:68:0x0822, B:70:0x0828, B:72:0x0830, B:74:0x0858, B:75:0x0864, B:77:0x086c, B:79:0x0896, B:80:0x08a0, B:82:0x08a6, B:84:0x08b6, B:86:0x08f9, B:87:0x08d6, B:89:0x08e6, B:93:0x08fc, B:97:0x090f, B:98:0x0913, B:100:0x091d, B:102:0x0920, B:106:0x0879, B:108:0x0881), top: B:66:0x080c }] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static java.util.ArrayList a(int r30, java.io.InputStream r31, java.lang.String r32, com.mycompany.app.subtitle.Subtitle.SubtitleListener r33) {
/*
Method dump skipped, instructions count: 2448
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.mycompany.app.subtitle.Subtitle.a(int, java.io.InputStream, java.lang.String, com.mycompany.app.subtitle.Subtitle$SubtitleListener):java.util.ArrayList");
}
}