Mod for TikTok 47.1.3 (arm64) in Material 3 style: bottom bar, profile menu, TikTok settings and comments; downloads without the watermark; switches for ads, live streams and the Shop tab; badges of other mods next to names and the niche mod badge (members service); app icons; mod settings screen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
29 lines
1.3 KiB
Java
29 lines
1.3 KiB
Java
import com.android.tools.smali.dexlib2.*;
|
|
import com.android.tools.smali.dexlib2.iface.*;
|
|
import com.android.tools.smali.dexlib2.writer.pool.DexPool;
|
|
import java.util.*;
|
|
|
|
/** Merges extra classes into an existing dex; existing definitions win. */
|
|
public final class MergeClasses {
|
|
public static void main(String[] args) throws Exception {
|
|
Opcodes api = Opcodes.forApi(Integer.parseInt(args[3]));
|
|
DexFile host = DexFileFactory.loadDexFile(args[0], api);
|
|
DexFile extra = DexFileFactory.loadDexFile(args[1], api);
|
|
Map<String,ClassDef> classes = new LinkedHashMap<>();
|
|
for (ClassDef c : host.getClasses()) classes.put(c.getType(), c);
|
|
int added = 0;
|
|
for (ClassDef c : extra.getClasses()) {
|
|
if (classes.containsKey(c.getType())) continue;
|
|
classes.put(c.getType(), c);
|
|
added++;
|
|
}
|
|
if (added == 0) throw new IllegalArgumentException("No new classes to merge");
|
|
DexFile result = new DexFile() {
|
|
@Override public Set<? extends ClassDef> getClasses() { return new LinkedHashSet<>(classes.values()); }
|
|
@Override public Opcodes getOpcodes() { return api; }
|
|
};
|
|
DexPool.writeTo(args[2], result);
|
|
System.out.println("Merged " + added + " classes");
|
|
}
|
|
}
|