soul-browser/sources/java/org/apache/commons/text/lookup/InetAddressStringLookup.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

98 lines
4.5 KiB
Java

package org.apache.commons.text.lookup;
import java.net.InetAddress;
import org.apache.commons.lang3.function.FailableSupplier;
/* loaded from: classes4.dex */
final class InetAddressStringLookup extends AbstractStringLookup {
/* renamed from: c, reason: collision with root package name */
public static final InetAddressStringLookup f22479c;
public static final InetAddressStringLookup d;
public final FailableSupplier b;
static {
final int i = 0;
f22479c = new InetAddressStringLookup(new FailableSupplier() { // from class: org.apache.commons.text.lookup.a
@Override // org.apache.commons.lang3.function.FailableSupplier
public final Object get() {
switch (i) {
case 0:
return InetAddress.getLocalHost();
default:
return InetAddress.getLoopbackAddress();
}
}
});
final int i2 = 1;
d = new InetAddressStringLookup(new FailableSupplier() { // from class: org.apache.commons.text.lookup.a
@Override // org.apache.commons.lang3.function.FailableSupplier
public final Object get() {
switch (i2) {
case 0:
return InetAddress.getLocalHost();
default:
return InetAddress.getLoopbackAddress();
}
}
});
}
public InetAddressStringLookup(FailableSupplier failableSupplier) {
this.b = failableSupplier;
}
/* JADX WARN: Removed duplicated region for block: B:25:0x0057 A[ExcHandler: UnknownHostException -> 0x0057, RETURN] */
@Override // org.apache.commons.text.lookup.StringLookup
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.String a(java.lang.String r4) {
/*
r3 = this;
if (r4 != 0) goto L3
goto L57
L3:
int r0 = r4.hashCode() // Catch: java.net.UnknownHostException -> L57
r1 = -1147692044(0xffffffffbb979bf4, float:-0.0046267454)
org.apache.commons.lang3.function.FailableSupplier r2 = r3.b
if (r0 == r1) goto L3e
r1 = 3373707(0x337a8b, float:4.72757E-39)
if (r0 == r1) goto L2b
r1 = 1339224004(0x4fd2efc4, float:7.0778573E9)
if (r0 != r1) goto L51
java.lang.String r0 = "canonical-name"
boolean r0 = r4.equals(r0) // Catch: java.net.UnknownHostException -> L57
if (r0 == 0) goto L51
java.lang.Object r4 = r2.get() // Catch: java.net.UnknownHostException -> L57
java.net.InetAddress r4 = (java.net.InetAddress) r4 // Catch: java.net.UnknownHostException -> L57
java.lang.String r4 = r4.getCanonicalHostName() // Catch: java.net.UnknownHostException -> L57
return r4
L2b:
java.lang.String r0 = "name"
boolean r0 = r4.equals(r0) // Catch: java.net.UnknownHostException -> L57
if (r0 == 0) goto L51
java.lang.Object r4 = r2.get() // Catch: java.net.UnknownHostException -> L57
java.net.InetAddress r4 = (java.net.InetAddress) r4 // Catch: java.net.UnknownHostException -> L57
java.lang.String r4 = r4.getHostName() // Catch: java.net.UnknownHostException -> L57
return r4
L3e:
java.lang.String r0 = "address"
boolean r0 = r4.equals(r0) // Catch: java.net.UnknownHostException -> L57
if (r0 == 0) goto L51
java.lang.Object r4 = r2.get() // Catch: java.net.UnknownHostException -> L57
java.net.InetAddress r4 = (java.net.InetAddress) r4 // Catch: java.net.UnknownHostException -> L57
java.lang.String r4 = r4.getHostAddress() // Catch: java.net.UnknownHostException -> L57
return r4
L51:
java.lang.IllegalArgumentException r0 = new java.lang.IllegalArgumentException // Catch: java.net.UnknownHostException -> L57
r0.<init>(r4) // Catch: java.net.UnknownHostException -> L57
throw r0 // Catch: java.net.UnknownHostException -> L57
L57:
r4 = 0
return r4
*/
throw new UnsupportedOperationException("Method not decompiled: org.apache.commons.text.lookup.InetAddressStringLookup.a(java.lang.String):java.lang.String");
}
}