soul-browser/sources/java/com/google/android/gms/internal/ads/zzbuc.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

395 lines
19 KiB
Java

package com.google.android.gms.internal.ads;
import android.os.RemoteException;
import com.google.ads.mediation.admob.AdMobAdapter;
import com.google.android.gms.ads.AdError;
import com.google.android.gms.ads.RequestConfiguration;
import com.google.android.gms.ads.VideoController;
import com.google.android.gms.ads.mediation.MediationBannerAdapter;
import com.google.android.gms.ads.mediation.MediationBannerListener;
import com.google.android.gms.ads.mediation.MediationInterstitialAdapter;
import com.google.android.gms.ads.mediation.MediationInterstitialListener;
import com.google.android.gms.ads.mediation.MediationNativeAdapter;
import com.google.android.gms.ads.mediation.MediationNativeListener;
import com.google.android.gms.ads.mediation.UnifiedNativeAdMapper;
import com.google.android.gms.common.internal.Preconditions;
/* loaded from: classes.dex */
public final class zzbuc implements MediationBannerListener, MediationInterstitialListener, MediationNativeListener {
/* renamed from: a, reason: collision with root package name */
public final zzbtf f4903a;
public UnifiedNativeAdMapper b;
/* renamed from: c, reason: collision with root package name */
public zzbkt f4904c;
public zzbuc(zzbtf zzbtfVar) {
this.f4903a = zzbtfVar;
}
@Override // com.google.android.gms.ads.mediation.MediationBannerListener
public final void onAdClicked(MediationBannerAdapter mediationBannerAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdClicked.");
try {
this.f4903a.zze();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationBannerListener
public final void onAdClosed(MediationBannerAdapter mediationBannerAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdClosed.");
try {
this.f4903a.zzf();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationBannerListener
public final void onAdFailedToLoad(MediationBannerAdapter mediationBannerAdapter, int i) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
StringBuilder sb = new StringBuilder(String.valueOf(i).length() + 44);
sb.append("Adapter called onAdFailedToLoad with error. ");
sb.append(i);
com.google.android.gms.ads.internal.util.client.zzo.zzd(sb.toString());
try {
this.f4903a.p(i);
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationNativeListener
public final void onAdImpression(MediationNativeAdapter mediationNativeAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
UnifiedNativeAdMapper unifiedNativeAdMapper = this.b;
if (this.f4904c == null) {
if (unifiedNativeAdMapper == null) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", null);
return;
} else if (!unifiedNativeAdMapper.getOverrideImpressionRecording()) {
com.google.android.gms.ads.internal.util.client.zzo.zzd("Could not call onAdImpression since setOverrideImpressionRecording is not set to true");
return;
}
}
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdImpression.");
try {
this.f4903a.zzk();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationBannerListener
public final void onAdLeftApplication(MediationBannerAdapter mediationBannerAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdLeftApplication.");
try {
this.f4903a.zzh();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationBannerListener
public final void onAdLoaded(MediationBannerAdapter mediationBannerAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdLoaded.");
try {
this.f4903a.zzj();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationBannerListener
public final void onAdOpened(MediationBannerAdapter mediationBannerAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdOpened.");
try {
this.f4903a.zzi();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationNativeListener
public final void onVideoEnd(MediationNativeAdapter mediationNativeAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onVideoEnd.");
try {
this.f4903a.A();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationBannerListener
public final void zza(MediationBannerAdapter mediationBannerAdapter, String str, String str2) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAppEvent.");
try {
this.f4903a.k4(str, str2);
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationNativeListener
public final void zzc(MediationNativeAdapter mediationNativeAdapter, zzbkt zzbktVar) {
String str;
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
zzbktVar.getClass();
try {
str = zzbktVar.f4752a.zzh();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzg(RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, e);
str = null;
}
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdLoaded with template id ".concat(String.valueOf(str)));
this.f4904c = zzbktVar;
try {
this.f4903a.zzj();
} catch (RemoteException e2) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e2);
}
}
@Override // com.google.android.gms.ads.mediation.MediationNativeListener
public final void zzd(MediationNativeAdapter mediationNativeAdapter, zzbkt zzbktVar, String str) {
try {
this.f4903a.p0(zzbktVar.f4752a, str);
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationInterstitialListener
public final void onAdClicked(MediationInterstitialAdapter mediationInterstitialAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdClicked.");
try {
this.f4903a.zze();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationInterstitialListener
public final void onAdClosed(MediationInterstitialAdapter mediationInterstitialAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdClosed.");
try {
this.f4903a.zzf();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationBannerListener
public final void onAdFailedToLoad(MediationBannerAdapter mediationBannerAdapter, AdError adError) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
int code = adError.getCode();
String message = adError.getMessage();
String domain = adError.getDomain();
int length = String.valueOf(code).length();
StringBuilder sb = new StringBuilder(length + 71 + String.valueOf(message).length() + 15 + String.valueOf(domain).length());
sb.append("Adapter called onAdFailedToLoad with error. ErrorCode: ");
sb.append(code);
sb.append(". ErrorMessage: ");
sb.append(message);
sb.append(". ErrorDomain: ");
sb.append(domain);
com.google.android.gms.ads.internal.util.client.zzo.zzd(sb.toString());
try {
this.f4903a.Q(adError.zza());
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationInterstitialListener
public final void onAdLeftApplication(MediationInterstitialAdapter mediationInterstitialAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdLeftApplication.");
try {
this.f4903a.zzh();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationInterstitialListener
public final void onAdLoaded(MediationInterstitialAdapter mediationInterstitialAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdLoaded.");
try {
this.f4903a.zzj();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationInterstitialListener
public final void onAdOpened(MediationInterstitialAdapter mediationInterstitialAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdOpened.");
try {
this.f4903a.zzi();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationNativeListener
public final void onAdClicked(MediationNativeAdapter mediationNativeAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
UnifiedNativeAdMapper unifiedNativeAdMapper = this.b;
if (this.f4904c == null) {
if (unifiedNativeAdMapper == null) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", null);
return;
} else if (!unifiedNativeAdMapper.getOverrideClickHandling()) {
com.google.android.gms.ads.internal.util.client.zzo.zzd("Could not call onAdClicked since setOverrideClickHandling is not set to true");
return;
}
}
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdClicked.");
try {
this.f4903a.zze();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationNativeListener
public final void onAdClosed(MediationNativeAdapter mediationNativeAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdClosed.");
try {
this.f4903a.zzf();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationNativeListener
public final void onAdLeftApplication(MediationNativeAdapter mediationNativeAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdLeftApplication.");
try {
this.f4903a.zzh();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationNativeListener
public final void onAdLoaded(MediationNativeAdapter mediationNativeAdapter, UnifiedNativeAdMapper unifiedNativeAdMapper) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdLoaded.");
this.b = unifiedNativeAdMapper;
if (!(mediationNativeAdapter instanceof AdMobAdapter)) {
VideoController videoController = new VideoController();
videoController.zza(new zzbtp());
if (unifiedNativeAdMapper != null && unifiedNativeAdMapper.hasVideoContent()) {
unifiedNativeAdMapper.zza(videoController);
}
}
try {
this.f4903a.zzj();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationNativeListener
public final void onAdOpened(MediationNativeAdapter mediationNativeAdapter) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
com.google.android.gms.ads.internal.util.client.zzo.zzd("Adapter called onAdOpened.");
try {
this.f4903a.zzi();
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationInterstitialListener
public final void onAdFailedToLoad(MediationInterstitialAdapter mediationInterstitialAdapter, int i) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
StringBuilder sb = new StringBuilder(String.valueOf(i).length() + 44);
sb.append("Adapter called onAdFailedToLoad with error ");
sb.append(i);
sb.append(".");
com.google.android.gms.ads.internal.util.client.zzo.zzd(sb.toString());
try {
this.f4903a.p(i);
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationInterstitialListener
public final void onAdFailedToLoad(MediationInterstitialAdapter mediationInterstitialAdapter, AdError adError) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
int code = adError.getCode();
String message = adError.getMessage();
String domain = adError.getDomain();
int length = String.valueOf(code).length();
StringBuilder sb = new StringBuilder(length + 71 + String.valueOf(message).length() + 15 + String.valueOf(domain).length());
sb.append("Adapter called onAdFailedToLoad with error. ErrorCode: ");
sb.append(code);
sb.append(". ErrorMessage: ");
sb.append(message);
sb.append(". ErrorDomain: ");
sb.append(domain);
com.google.android.gms.ads.internal.util.client.zzo.zzd(sb.toString());
try {
this.f4903a.Q(adError.zza());
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationNativeListener
public final void onAdFailedToLoad(MediationNativeAdapter mediationNativeAdapter, int i) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
StringBuilder sb = new StringBuilder(String.valueOf(i).length() + 44);
sb.append("Adapter called onAdFailedToLoad with error ");
sb.append(i);
sb.append(".");
com.google.android.gms.ads.internal.util.client.zzo.zzd(sb.toString());
try {
this.f4903a.p(i);
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
@Override // com.google.android.gms.ads.mediation.MediationNativeListener
public final void onAdFailedToLoad(MediationNativeAdapter mediationNativeAdapter, AdError adError) {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
int code = adError.getCode();
String message = adError.getMessage();
String domain = adError.getDomain();
int length = String.valueOf(code).length();
StringBuilder sb = new StringBuilder(length + 71 + String.valueOf(message).length() + 15 + String.valueOf(domain).length());
sb.append("Adapter called onAdFailedToLoad with error. ErrorCode: ");
sb.append(code);
sb.append(". ErrorMessage: ");
sb.append(message);
sb.append(". ErrorDomain: ");
sb.append(domain);
com.google.android.gms.ads.internal.util.client.zzo.zzd(sb.toString());
try {
this.f4903a.Q(adError.zza());
} catch (RemoteException e) {
com.google.android.gms.ads.internal.util.client.zzo.zzl("#007 Could not call remote method.", e);
}
}
}