I tried to patch an app but encoding failed. I installed apk-mitm from the AUR.
$ apk-mitm --certificate ~/.mitmproxy/mitmproxy-ca-cert.pem de.fefe.blog.apk
╭ apk-mitm v1.2.0
├ apktool v2.6.0
╰ uber-apk-signer v1.2.1
Using temporary directory:
/tmp/apk-mitm-635a1343edb8d4e807a66e81617ad5d1
✔ Checking prerequisities
✔ Decoding APK file
✔ Applying patches
❯ Encoding patched APK file
↓ Encoding using AAPT2 [skipped]
→ Failed, falling back to AAPT...
✖ Encoding using AAPT [fallback]
→ I: Smaling smali_assets folder into assets.dex...
Signing patched APK file
Failed! An error occurred:
I: Using Apktool 2.6.0
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Smaling smali_assets folder into assets.dex...
decode/smali_assets/org/chromium/webapk/lib/runtime_library/IWebApkApi$Stub.smali[22,73] Class Lorg/chromium/webapk/lib/runtime_library/IWebApkApi$Stub; has already been interned
Could not smali file: org/chromium/webapk/lib/runtime_library/IWebApkApi$Stub.smali
The full logs of all commands are available here:
/tmp/apk-mitm-635a1343edb8d4e807a66e81617ad5d1/logs
decoding.log
I: Using Apktool 2.6.0 on de.fefe.blog.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /tmp/apk-mitm-635a1343edb8d4e807a66e81617ad5d1/framework/1.apk
I: Renamed manifest package found! Replacing de.fefe.blog with org.greatfire.freebrowser
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling assets.dex...
I: Baksmaling classes2.dex...
I: Baksmaling assets/webapk7.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
encoding-aapt2.failed.log
I: Using Apktool 2.6.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether sources has changed...
I: Smaling smali_assets folder into assets.dex...
decode/smali_assets/org/chromium/webapk/lib/runtime_library/IWebApkApi$Stub.smali[22,73] Class Lorg/chromium/webapk/lib/runtime_library/IWebApkApi$Stub; has already been interned
Could not smali file: org/chromium/webapk/lib/runtime_library/IWebApkApi$Stub.smali
encoding-aapt.failed.log
I: Using Apktool 2.6.0
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Smaling smali_assets folder into assets.dex...
decode/smali_assets/org/chromium/webapk/lib/runtime_library/IWebApkApi$Stub.smali[22,73] Class Lorg/chromium/webapk/lib/runtime_library/IWebApkApi$Stub; has already been interned
Could not smali file: org/chromium/webapk/lib/runtime_library/IWebApkApi$Stub.smali
I tried to patch an app but encoding failed. I installed apk-mitm from the AUR.
decoding.log
encoding-aapt2.failed.log
encoding-aapt.failed.log
apk file:
https://www.file-upload.net/download-14878350/de.fefe.blog.apk.html