soul-browser/app/smali/androidx/credentials/provider/CreateEntry$Api35Impl.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

284 lines
6.4 KiB
Smali

.class final Landroidx/credentials/provider/CreateEntry$Api35Impl;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation build Landroidx/annotation/RequiresApi;
.end annotation
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/credentials/provider/CreateEntry;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Api35Impl"
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\u0008\u00c3\u0002\u0018\u00002\u00020\u0001\u00a8\u0006\u0002"
}
d2 = {
"Landroidx/credentials/provider/CreateEntry$Api35Impl;",
"",
"credentials_release"
}
k = 0x1
mv = {
0x1,
0x8,
0x0
}
xi = 0x30
.end annotation
.annotation build Lkotlin/jvm/internal/SourceDebugExtension;
value = {
"SMAP\nCreateEntry.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CreateEntry.kt\nandroidx/credentials/provider/CreateEntry$Api35Impl\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,773:1\n1855#2,2:774\n*S KotlinDebug\n*F\n+ 1 CreateEntry.kt\nandroidx/credentials/provider/CreateEntry$Api35Impl\n*L\n406#1:774,2\n*E\n"
}
.end annotation
# direct methods
.method public static final a(Landroid/app/slice/Slice;)Landroidx/credentials/provider/CreateEntry;
.locals 12
.line 1
const-string v0, "slice"
.line 2
.line 3
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 4
.line 5
.line 6
invoke-static {p0}, Landroidx/credentials/provider/CreateEntry$Api28Impl;->a(Landroid/app/slice/Slice;)Landroidx/credentials/provider/CreateEntry;
.line 7
.line 8
.line 9
move-result-object v0
.line 10
const/4 v1, 0x0
.line 11
if-nez v0, :cond_0
.line 12
.line 13
return-object v1
.line 14
:cond_0
invoke-virtual {p0}, Landroid/app/slice/Slice;->getItems()Ljava/util/List;
.line 15
.line 16
.line 17
move-result-object p0
.line 18
const-string v2, "slice.items"
.line 19
.line 20
invoke-static {p0, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 21
.line 22
.line 23
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
.line 24
.line 25
.line 26
move-result-object p0
.line 27
move-object v2, v1
.line 28
:cond_1
:goto_0
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
.line 29
.line 30
.line 31
move-result v3
.line 32
if-eqz v3, :cond_2
.line 33
.line 34
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
.line 35
.line 36
.line 37
move-result-object v3
.line 38
check-cast v3, Landroid/app/slice/SliceItem;
.line 39
.line 40
const-string v4, "androidx.credentials.provider.credentialEntry.SLICE_HINT_BIOMETRIC_PROMPT_DATA"
.line 41
.line 42
invoke-virtual {v3, v4}, Landroid/app/slice/SliceItem;->hasHint(Ljava/lang/String;)Z
.line 43
.line 44
.line 45
move-result v4
.line 46
if-eqz v4, :cond_1
.line 47
.line 48
invoke-virtual {v3}, Landroid/app/slice/SliceItem;->getBundle()Landroid/os/Bundle;
.line 49
.line 50
.line 51
move-result-object v2
.line 52
goto :goto_0
.line 53
:cond_2
:try_start_0
new-instance v3, Landroidx/credentials/provider/CreateEntry;
.line 54
.line 55
iget-object v4, v0, Landroidx/credentials/provider/CreateEntry;->a:Ljava/lang/CharSequence;
.line 56
.line 57
iget-object v5, v0, Landroidx/credentials/provider/CreateEntry;->b:Landroid/app/PendingIntent;
.line 58
.line 59
iget-object v6, v0, Landroidx/credentials/provider/CreateEntry;->c:Landroid/graphics/drawable/Icon;
.line 60
.line 61
iget-object v7, v0, Landroidx/credentials/provider/CreateEntry;->d:Ljava/lang/CharSequence;
.line 62
.line 63
iget-object v8, v0, Landroidx/credentials/provider/CreateEntry;->e:Lj$/time/Instant;
.line 64
.line 65
iget-object v9, v0, Landroidx/credentials/provider/CreateEntry;->f:Ljava/util/Map;
.line 66
.line 67
iget-boolean v10, v0, Landroidx/credentials/provider/CreateEntry;->g:Z
.line 68
.line 69
if-eqz v2, :cond_3
.line 70
.line 71
sget p0, Landroidx/credentials/provider/BiometricPromptData;->a:I
.line 72
.line 73
invoke-static {v2}, Landroidx/credentials/provider/BiometricPromptData$Companion;->a(Landroid/os/Bundle;)Landroidx/credentials/provider/BiometricPromptData;
.line 74
.line 75
.line 76
move-result-object p0
.line 77
move-object v11, p0
.line 78
goto :goto_1
.line 79
:catch_0
move-exception v0
.line 80
move-object p0, v0
.line 81
goto :goto_2
.line 82
:cond_3
move-object v11, v1
.line 83
:goto_1
invoke-direct/range {v3 .. v11}, Landroidx/credentials/provider/CreateEntry;-><init>(Ljava/lang/CharSequence;Landroid/app/PendingIntent;Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Lj$/time/Instant;Ljava/util/Map;ZLandroidx/credentials/provider/BiometricPromptData;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 84
.line 85
.line 86
return-object v3
.line 87
:goto_2
new-instance v0, Ljava/lang/StringBuilder;
.line 88
.line 89
const-string v2, "fromSlice failed with: "
.line 90
.line 91
invoke-direct {v0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 92
.line 93
.line 94
invoke-virtual {p0}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
.line 95
.line 96
.line 97
move-result-object p0
.line 98
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 99
.line 100
.line 101
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
.line 102
.line 103
.line 104
move-result-object p0
.line 105
const-string v0, "CreateEntry"
.line 106
.line 107
invoke-static {v0, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 108
.line 109
.line 110
return-object v1
.end method