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

194 lines
5.1 KiB
Java

package com.google.android.gms.internal.ads;
import java.util.AbstractCollection;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes.dex */
class zzgrq extends AbstractCollection {
/* renamed from: c, reason: collision with root package name */
public final Object f8225c;
public Collection f;
public final zzgrq g;
public final Collection h;
public final /* synthetic */ zzgrt i;
public zzgrq(zzgrt zzgrtVar, Object obj, List list, zzgrq zzgrqVar) {
Collection collection;
this.i = zzgrtVar;
this.f8225c = obj;
this.f = list;
this.g = zzgrqVar;
if (zzgrqVar == null) {
collection = null;
} else {
collection = zzgrqVar.f;
}
this.h = collection;
}
public final void a() {
zzgrq zzgrqVar = this.g;
if (zzgrqVar != null) {
zzgrqVar.a();
if (zzgrqVar.f != this.h) {
throw new ConcurrentModificationException();
}
return;
}
if (this.f.isEmpty()) {
Collection collection = (Collection) this.i.h.get(this.f8225c);
if (collection != null) {
this.f = collection;
}
}
}
@Override // java.util.AbstractCollection, java.util.Collection
public final boolean add(Object obj) {
a();
boolean isEmpty = this.f.isEmpty();
boolean add = this.f.add(obj);
if (add) {
this.i.i++;
if (isEmpty) {
c();
return true;
}
}
return add;
}
@Override // java.util.AbstractCollection, java.util.Collection
public final boolean addAll(Collection collection) {
if (collection.isEmpty()) {
return false;
}
int size = size();
boolean addAll = this.f.addAll(collection);
if (addAll) {
this.i.i += this.f.size() - size;
if (size == 0) {
c();
return true;
}
return addAll;
}
return addAll;
}
public final void c() {
zzgrq zzgrqVar = this.g;
if (zzgrqVar != null) {
zzgrqVar.c();
} else {
this.i.h.put(this.f8225c, this.f);
}
}
@Override // java.util.AbstractCollection, java.util.Collection
public final void clear() {
int size = size();
if (size == 0) {
return;
}
this.f.clear();
this.i.i -= size;
zzb();
}
@Override // java.util.AbstractCollection, java.util.Collection
public final boolean contains(Object obj) {
a();
return this.f.contains(obj);
}
@Override // java.util.AbstractCollection, java.util.Collection
public final boolean containsAll(Collection collection) {
a();
return this.f.containsAll(collection);
}
@Override // java.util.Collection
public final boolean equals(Object obj) {
if (obj == this) {
return true;
}
a();
return this.f.equals(obj);
}
@Override // java.util.Collection
public final int hashCode() {
a();
return this.f.hashCode();
}
@Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable
public final Iterator iterator() {
a();
return new zzgrp(this);
}
@Override // java.util.AbstractCollection, java.util.Collection
public final boolean remove(Object obj) {
a();
boolean remove = this.f.remove(obj);
if (remove) {
zzgrt zzgrtVar = this.i;
zzgrtVar.i--;
zzb();
}
return remove;
}
@Override // java.util.AbstractCollection, java.util.Collection
public final boolean removeAll(Collection collection) {
if (collection.isEmpty()) {
return false;
}
int size = size();
boolean removeAll = this.f.removeAll(collection);
if (removeAll) {
this.i.i += this.f.size() - size;
zzb();
}
return removeAll;
}
@Override // java.util.AbstractCollection, java.util.Collection
public final boolean retainAll(Collection collection) {
collection.getClass();
int size = size();
boolean retainAll = this.f.retainAll(collection);
if (retainAll) {
this.i.i += this.f.size() - size;
zzb();
}
return retainAll;
}
@Override // java.util.AbstractCollection, java.util.Collection
public final int size() {
a();
return this.f.size();
}
@Override // java.util.AbstractCollection
public final String toString() {
a();
return this.f.toString();
}
public final void zzb() {
zzgrq zzgrqVar = this.g;
if (zzgrqVar != null) {
zzgrqVar.zzb();
} else if (this.f.isEmpty()) {
this.i.h.remove(this.f8225c);
}
}
}