ll-hax-docs/docs/sif/apk-patching.md
2025-02-23 20:24:34 -06:00

29 lines
1.6 KiB
Markdown

These steps aren't needed unless you want to host your server somewhere other than the same device, so either on a seperate server/computer.
### Prerequisites:
- [apktool](https://apktool.org/)
- [libhonoka](https://github.com/DarkEnergyProcessor/libhonoka/releases/)
- [uber-apk-signer](https://github.com/patrickfav/uber-apk-signer)
### Steps:
1. Download the [modified lovelive sif apk](https://cdn.sif.moe/lovelive-community.apk) ([jp](https://pixeldrain.com/u/8vx6azHr))
2. Run `apktool d lovelive-community.apk` to decompile the apk.
3. Unzip `config/server_info.json` from `assets/AppAssets.zip`.
4. Use libhonoka to decrypt `server_info.json`. (`honoka2 server_info.json`)
5. Edit the json file to point to your server.
6. Re-encrypt the json file by running `honoka2 -e -j server_info.json`.
7. Replace the `assets/AppAssets.zip/config/server_info.json` file with the new one you patched.
8. Get the md5sum of `AppAssets.zip` and replace `assets/version` with the new md5sum.
9. Run `apktool b lovelive-community` to re-build the apk.
10. Run `uber-apk-signer -a lovelive-community/dist/<apk name>.apk LLSIF_patched.apk`.
**uber-apk-signer will sign the APK with a debug keystore. You should sign with your own keystore if you are planning to distribute this!**
Assuming you did it correctly, your newly signed apk is ready to install and run.
### Web based patcher
I compiled libhonoka to WebAssembly and made it an easy GUI to use: [https://ethanaobrien.github.io/sif-patcher/](https://ethanaobrien.github.io/sif-patcher/)
You will still need to follow step 10 from above.