soul-browser/app/smali/androidx/work/Constraints.smali
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

432 lines
7.2 KiB
Smali

.class public final Landroidx/work/Constraints;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/work/Constraints$Builder;
}
.end annotation
# static fields
.field public static final i:Landroidx/work/Constraints;
# instance fields
.field public a:Landroidx/work/NetworkType;
.field public b:Z
.field public c:Z
.field public d:Z
.field public e:Z
.field public f:J
.field public g:J
.field public h:Landroidx/work/ContentUriTriggers;
# direct methods
.method static constructor <clinit>()V
.locals 1
.line 1
new-instance v0, Landroidx/work/Constraints$Builder;
.line 2
.line 3
invoke-direct {v0}, Landroidx/work/Constraints$Builder;-><init>()V
.line 4
.line 5
.line 6
invoke-virtual {v0}, Landroidx/work/Constraints$Builder;->a()Landroidx/work/Constraints;
.line 7
.line 8
.line 9
move-result-object v0
.line 10
sput-object v0, Landroidx/work/Constraints;->i:Landroidx/work/Constraints;
.line 11
.line 12
return-void
.end method
.method public constructor <init>()V
.locals 2
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
.line 3
.line 4
sget-object v0, Landroidx/work/NetworkType;->c:Landroidx/work/NetworkType;
.line 5
.line 6
iput-object v0, p0, Landroidx/work/Constraints;->a:Landroidx/work/NetworkType;
.line 7
.line 8
const-wide/16 v0, -0x1
.line 9
.line 10
iput-wide v0, p0, Landroidx/work/Constraints;->f:J
.line 11
.line 12
iput-wide v0, p0, Landroidx/work/Constraints;->g:J
.line 13
.line 14
new-instance v0, Landroidx/work/ContentUriTriggers;
.line 15
.line 16
invoke-direct {v0}, Landroidx/work/ContentUriTriggers;-><init>()V
.line 17
.line 18
.line 19
iput-object v0, p0, Landroidx/work/Constraints;->h:Landroidx/work/ContentUriTriggers;
.line 20
.line 21
return-void
.end method
# virtual methods
.method public final equals(Ljava/lang/Object;)Z
.locals 5
.line 1
if-ne p0, p1, :cond_0
.line 2
.line 3
const/4 p1, 0x1
.line 4
return p1
.line 5
:cond_0
const/4 v0, 0x0
.line 6
if-eqz p1, :cond_9
.line 7
.line 8
const-class v1, Landroidx/work/Constraints;
.line 9
.line 10
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
.line 11
.line 12
.line 13
move-result-object v2
.line 14
if-eq v1, v2, :cond_1
.line 15
.line 16
goto :goto_0
.line 17
:cond_1
check-cast p1, Landroidx/work/Constraints;
.line 18
.line 19
iget-boolean v1, p0, Landroidx/work/Constraints;->b:Z
.line 20
.line 21
iget-boolean v2, p1, Landroidx/work/Constraints;->b:Z
.line 22
.line 23
if-eq v1, v2, :cond_2
.line 24
.line 25
return v0
.line 26
:cond_2
iget-boolean v1, p0, Landroidx/work/Constraints;->c:Z
.line 27
.line 28
iget-boolean v2, p1, Landroidx/work/Constraints;->c:Z
.line 29
.line 30
if-eq v1, v2, :cond_3
.line 31
.line 32
return v0
.line 33
:cond_3
iget-boolean v1, p0, Landroidx/work/Constraints;->d:Z
.line 34
.line 35
iget-boolean v2, p1, Landroidx/work/Constraints;->d:Z
.line 36
.line 37
if-eq v1, v2, :cond_4
.line 38
.line 39
return v0
.line 40
:cond_4
iget-boolean v1, p0, Landroidx/work/Constraints;->e:Z
.line 41
.line 42
iget-boolean v2, p1, Landroidx/work/Constraints;->e:Z
.line 43
.line 44
if-eq v1, v2, :cond_5
.line 45
.line 46
return v0
.line 47
:cond_5
iget-wide v1, p0, Landroidx/work/Constraints;->f:J
.line 48
.line 49
iget-wide v3, p1, Landroidx/work/Constraints;->f:J
.line 50
.line 51
cmp-long v1, v1, v3
.line 52
.line 53
if-eqz v1, :cond_6
.line 54
.line 55
return v0
.line 56
:cond_6
iget-wide v1, p0, Landroidx/work/Constraints;->g:J
.line 57
.line 58
iget-wide v3, p1, Landroidx/work/Constraints;->g:J
.line 59
.line 60
cmp-long v1, v1, v3
.line 61
.line 62
if-eqz v1, :cond_7
.line 63
.line 64
return v0
.line 65
:cond_7
iget-object v1, p0, Landroidx/work/Constraints;->a:Landroidx/work/NetworkType;
.line 66
.line 67
iget-object v2, p1, Landroidx/work/Constraints;->a:Landroidx/work/NetworkType;
.line 68
.line 69
if-eq v1, v2, :cond_8
.line 70
.line 71
return v0
.line 72
:cond_8
iget-object v0, p0, Landroidx/work/Constraints;->h:Landroidx/work/ContentUriTriggers;
.line 73
.line 74
iget-object p1, p1, Landroidx/work/Constraints;->h:Landroidx/work/ContentUriTriggers;
.line 75
.line 76
invoke-virtual {v0, p1}, Landroidx/work/ContentUriTriggers;->equals(Ljava/lang/Object;)Z
.line 77
.line 78
.line 79
move-result p1
.line 80
return p1
.line 81
:cond_9
:goto_0
return v0
.end method
.method public final hashCode()I
.locals 6
.line 1
iget-object v0, p0, Landroidx/work/Constraints;->a:Landroidx/work/NetworkType;
.line 2
.line 3
invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
.line 4
.line 5
.line 6
move-result v0
.line 7
mul-int/lit8 v0, v0, 0x1f
.line 8
.line 9
iget-boolean v1, p0, Landroidx/work/Constraints;->b:Z
.line 10
.line 11
add-int/2addr v0, v1
.line 12
mul-int/lit8 v0, v0, 0x1f
.line 13
.line 14
iget-boolean v1, p0, Landroidx/work/Constraints;->c:Z
.line 15
.line 16
add-int/2addr v0, v1
.line 17
mul-int/lit8 v0, v0, 0x1f
.line 18
.line 19
iget-boolean v1, p0, Landroidx/work/Constraints;->d:Z
.line 20
.line 21
add-int/2addr v0, v1
.line 22
mul-int/lit8 v0, v0, 0x1f
.line 23
.line 24
iget-boolean v1, p0, Landroidx/work/Constraints;->e:Z
.line 25
.line 26
add-int/2addr v0, v1
.line 27
mul-int/lit8 v0, v0, 0x1f
.line 28
.line 29
iget-wide v1, p0, Landroidx/work/Constraints;->f:J
.line 30
.line 31
const/16 v3, 0x20
.line 32
.line 33
ushr-long v4, v1, v3
.line 34
.line 35
xor-long/2addr v1, v4
.line 36
long-to-int v1, v1
.line 37
add-int/2addr v0, v1
.line 38
mul-int/lit8 v0, v0, 0x1f
.line 39
.line 40
iget-wide v1, p0, Landroidx/work/Constraints;->g:J
.line 41
.line 42
ushr-long v3, v1, v3
.line 43
.line 44
xor-long/2addr v1, v3
.line 45
long-to-int v1, v1
.line 46
add-int/2addr v0, v1
.line 47
mul-int/lit8 v0, v0, 0x1f
.line 48
.line 49
iget-object v1, p0, Landroidx/work/Constraints;->h:Landroidx/work/ContentUriTriggers;
.line 50
.line 51
iget-object v1, v1, Landroidx/work/ContentUriTriggers;->a:Ljava/util/HashSet;
.line 52
.line 53
invoke-interface {v1}, Ljava/util/Set;->hashCode()I
.line 54
.line 55
.line 56
move-result v1
.line 57
add-int/2addr v1, v0
.line 58
return v1
.end method