Compare commits
No commits in common. "master" and "master" have entirely different histories.
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#### Toolchain setup
|
#### Toolchain setup
|
||||||
|
|
||||||
- Get apktool (use [this self-built version](//f001.backblazeb2.com/file/avepub/apktool-cli-all.jar) which is master + [this pr](https://github.com/iBotPeaches/Apktool/pull/2463)).
|
- Get apktool (due to 2 bugs present in v2.3.4, you're strongly recommended to use v2.4.0 or higher, I compile latest from source).
|
||||||
- Get a keystore, see [here](https://stackoverflow.com/a/14994354/3286892), step 1.
|
- Get a keystore, see [here](https://stackoverflow.com/a/14994354/3286892), step 1.
|
||||||
- Get apksigner, it's part of android build tools.
|
- Get apksigner, it's part of android build tools.
|
||||||
- If you want Mutant Standard emoji patches, get 72x72 PNG copies of latest version of mutant standard emojis with codepoints. I have a zip [here](https://mutant.lavatech.top/72x72.zip).
|
- If you want Mutant Standard emoji patches, get 72x72 PNG copies of latest version of mutant standard emojis with codepoints. I have a zip [here](https://mutant.lavatech.top/72x72.zip).
|
||||||
|
|
|
@ -69,7 +69,7 @@ if DO_GITPULL:
|
||||||
|
|
||||||
# Extract the APK if it's not already extracted to base cache
|
# Extract the APK if it's not already extracted to base cache
|
||||||
if not os.path.exists(BASE_APK_PATH):
|
if not os.path.exists(BASE_APK_PATH):
|
||||||
subprocess.run(f"{APKTOOL_BIN} d --no-dummy {INPUT_FILE} -o {BASE_APK_PATH} -f",
|
subprocess.run(f"{APKTOOL_BIN} d {INPUT_FILE} -o {BASE_APK_PATH} -f",
|
||||||
shell=True,
|
shell=True,
|
||||||
cwd=WORK_FOLDER)
|
cwd=WORK_FOLDER)
|
||||||
|
|
||||||
|
|
|
@ -469,13 +469,13 @@ diff -crB from/smali/com/discord/widgets/chat/input/WidgetChatInputEditText$setO
|
||||||
|
|
||||||
+ invoke-static {}, Lcom/discord/stores/StoreStream;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
|
+ invoke-static {}, Lcom/discord/stores/StoreStream;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
|
||||||
+
|
+
|
||||||
+ move-result-object v2
|
+ move-result-object v0
|
||||||
+
|
+
|
||||||
+ invoke-virtual {v2}, Lcom/discord/stores/StoreUserSettings;->getShowTyping()Z
|
+ invoke-virtual {v0}, Lcom/discord/stores/StoreUserSettings;->getShowTyping()Z
|
||||||
+
|
+
|
||||||
+ move-result v2
|
+ move-result v0
|
||||||
+
|
+
|
||||||
+ if-eqz v2, :cond_1
|
+ if-eqz v0, :cond_1
|
||||||
+
|
+
|
||||||
.line 5
|
.line 5
|
||||||
iget-boolean v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText$setOnTextChangedListener$1;->empty:Z
|
iget-boolean v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText$setOnTextChangedListener$1;->empty:Z
|
||||||
|
|
12
patchport.py
12
patchport.py
|
@ -54,8 +54,6 @@ def fix_offset(patch_contents):
|
||||||
for line in patch_lines:
|
for line in patch_lines:
|
||||||
if "diff -crB" in line:
|
if "diff -crB" in line:
|
||||||
patch_target = line.split(" ")[2].replace("from/", "")
|
patch_target = line.split(" ")[2].replace("from/", "")
|
||||||
if not os.path.exists(os.path.join(apk_folder, patch_target)):
|
|
||||||
return False
|
|
||||||
os.makedirs(os.path.dirname(os.path.join(tmp_folder, patch_target)), exist_ok=True)
|
os.makedirs(os.path.dirname(os.path.join(tmp_folder, patch_target)), exist_ok=True)
|
||||||
shutil.copy(os.path.join(apk_folder, patch_target), os.path.join(tmp_folder, patch_target))
|
shutil.copy(os.path.join(apk_folder, patch_target), os.path.join(tmp_folder, patch_target))
|
||||||
#shutil.copytree(apk_folder, tmp_folder)
|
#shutil.copytree(apk_folder, tmp_folder)
|
||||||
|
@ -201,19 +199,13 @@ for patch in os.listdir(os.path.join(cutthecord_folder, "patches")):
|
||||||
capture_output=True)
|
capture_output=True)
|
||||||
|
|
||||||
# Check for issues
|
# Check for issues
|
||||||
if "FAILED" in out.stdout or "can't find file to patch" in out.stdout:
|
if "FAILED" in out.stdout:
|
||||||
print(f"FAILED: {patch} failed, please fix by hand.")
|
print(f"FAILED: {patch} failed, please fix by hand.")
|
||||||
failures.append(patch)
|
failures.append(patch)
|
||||||
out_path += "-failed"
|
out_path += "-failed"
|
||||||
elif "offset" in out.stdout:
|
elif "offset" in out.stdout:
|
||||||
temp_patch_contents = fix_offset(patch_contents)
|
patch_contents = fix_offset(patch_contents)
|
||||||
if temp_patch_contents:
|
|
||||||
patch_contents = temp_patch_contents
|
|
||||||
print(f"WARNING: {patch} has offsets which were auto corrected.")
|
print(f"WARNING: {patch} has offsets which were auto corrected.")
|
||||||
else:
|
|
||||||
print(f"FAILED: {patch} is missing files, please fix by hand.")
|
|
||||||
failures.append(patch)
|
|
||||||
out_path += "-failed"
|
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
print(out.stdout)
|
print(out.stdout)
|
||||||
|
|
Reference in New Issue