Huge ethan patch, like actually so huge

This commit is contained in:
carette 2024-02-20 19:31:27 -06:00
parent f28334f011
commit 0aa0bb3bb8
12 changed files with 398 additions and 567 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
docs_build/
*:Zone.Identifier

0
docs/files/nesys.bat Executable file → Normal file
View file

0
docs/files/system.zip Executable file → Normal file
View file

View file

@ -1,4 +1,4 @@
# SIF
(the following was copied from the fandom wiki) (the following was copied from the fandom wiki)
Love Live! School idol festival (ラブライブ!スクールアイドルフェスティバル Rabu raibu! Sukūru Aidoru Fesutibaru, LLSIF) was a rhythm game released for iOS and Android, based on the Love Live! franchise. It was published by Bushiroad and developed by KLab Inc. and was released on April 16, 2013 for iOS and June 6, 2013 for Android devices. Love Live! School idol festival (ラブライブ!スクールアイドルフェスティバル Rabu raibu! Sukūru Aidoru Fesutibaru, LLSIF) was a rhythm game released for iOS and Android, based on the Love Live! franchise. It was published by Bushiroad and developed by KLab Inc. and was released on April 16, 2013 for iOS and June 6, 2013 for Android devices.
@ -10,50 +10,4 @@ A successor to the game Love Live! School idol festival 2 MIRACLE LIVE! was anno
On January 31, 2023, it was announced that the game's service would be shut down on March 31, 2023. [^1] On January 31, 2023, it was announced that the game's service would be shut down on March 31, 2023. [^1]
# Private Servers Looking to setup a private server? Continue onto [Private Servers](private-servers.md).
# Self Hostable Servers
Special thanks to AuahDark and hentaku for being the gods that carried us this far. If it wasn't for these two (and many others in the community), we would not have the game to play anymore!
Currently there are a few methods of playing SIF in a semi-online state, but you are the hoster of this server. There are however public CDN servers (hosting the game files like musics and story files). This is also self-hostable but there is no written guide for it at the moment.
## Setup for Android
Retrieve the APK file. There are many locations for this, but the main requirement is that it's patched to work with the server we'll be setting up. Try getting it at the locations below:
- [https://cdn.sif.moe/lovelive-community.apk](https://cdn.sif.moe/lovelive-community.apk)
- [https://pixeldrain.com/u/8vx6azHr](https://pixeldrain.com/u/8vx6azHr)
The differences of the ones above are JP and Global. Global has the following done to it:
- Automatic in-game language selection between English and Japanese based on system language or Android 13 per-app language setting.
- Runs natively in Android emulator. All binaries supported by Android, including x86-64, is available.
- Activates debug mode which show little bit of more information in-game.
- Backtrace, AppsFlyer, and Google Play is neutralized.
- Backtrace error is printed to logcat.
- Uses RSA private key from tungnotpunk/LLSIF@Home which should be compatible with LLSIF@Home and NPPS4.
- AppAssets.zip is patched to load from localhost:51376. This means it's compatible with LLSIF@Home and NPPS4.
Note: It does NOT contain patch to neutralize X-Message-Sign check. If you can't get XMS verification working, you need to patch it yourself. Well, you should make your private server generates correct XMS though.
Note2: It's recommended to launch the game in English for the first time. Otherwise, when you launch the game in Japanese for the first time, switching to English will erase all your game data (excluding your account). This logic is in the Lua script of the game. Help on neutralizing this behavior is welcome.
How to generate X-Message-Sign:
NPPS4: https://github.com/DarkEnergyProcessor/NPPS4/blob/b24b4e2a71be3c268c069a49bd3fae2bb25d7feb/npps4/util.py#L37-L42
LLSIF@Home: https://codeberg.org/dic1911/LLSIF.local/src/commit/e7e780258dca86c2f1a77577897fad23298fe9c7/handler/util.js#L18-L34
After the APK is retrieved and installed, then you should install the private server.
## Self-Host Server
1. Install Termux (I recommend to download from [F-Droid](https://f-droid.org/en/packages/com.termux/), [direct link for latest release atm](https://f-droid.org/repo/com.termux_118.apk)) and open it
2. Run this command(s) inside of `Termux`:
```curl http://ll.sif.moe/android | bash```
***OR*** (if the command above fails do the commands below)
```wget http://ll.sif.moe/android```
```bash android```
(curl is broken currently, this will be one command if curl is fixed)
3. After it is done and it shows you the link to the discord/matrix server, you can run `runserver` to start the private server.
4. After this is done, you should be able to launch the game and it should just work. Message in the discord or matrix if help is needed.
[^1]: https://love-live.fandom.com/wiki/Love_Live!_School_idol_festival

22
docs/sif/apk-patching.md Normal file
View file

@ -0,0 +1,22 @@
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/)
- [zipalign](https://developer.android.com/tools/zipalign) (part of the android sdk)
- [apksigner](https://developer.android.com/tools/apksigner) (part of the android sdk)
- A keystore. For your convinience you can download [this keystore](https://codeberg.org/arina999999997/nozomi/raw/branch/master/sifkey.keystore) with the password `123456`.
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 `zipalign -f 4 lovelive-community/dist/<apk name> LLSIF_patched.apk`.
11. Sign the apk by running `apksigner sign -ks sifkey.keystore LLSIF_patched.apk`.
Assuming you did it correctly, your newly signed apk is ready to install and run.

15
docs/sif/ipa-patching.md Normal file
View file

@ -0,0 +1,15 @@
These steps are required for iOS users looking to play sif.
Prerequisites:
- linux/macos/wsl2
- [libhonoka](https://github.com/DarkEnergyProcessor/libhonoka/releases/)
1. Download the [modified lovelive sif ipa](https://mega.nz/file/R1dQhLCL#mANiHWyDQY8ZmzkFcMadLTpKLpaWT7r0jiQE4wQ_Mqk)
2. Run `unzip Application.ipa` to unzip the app.
3. Use libhonoka to decrypt `server_info.json`. (`honoka2 server_info.json`) located at `Payload\LoveLive.app\ProjectResources\config\`
4. Edit the json file to point to your server.
5. Re-encrypt the json file by running `honoka2 -e -j server_info.json`.
6. Run `zip -qr "Application.resigned.ipa" Payload` to re-zip the ipa.
7. Use [sideloadly](https://sideloadly.io/) to install the ipa.
Assuming you did it correctly, you should be able to open the app and play sif.

View file

@ -0,0 +1,46 @@
Special thanks to AuahDark and hentaku for being the gods that carried us this far. If it wasn't for these two (and many others in the community), we would not have the game to play anymore!
Currently there are a few methods of playing SIF in a semi-online state, but you are the hoster of this server. There are however public CDN servers (hosting the game files like musics and story files). This is also self-hostable but there is no written guide for it at the moment.
## Setup for Android
Retrieve the APK file. There are many locations for this, but the main requirement is that it's patched to work with the server we'll be setting up. Try getting it at the locations below:
- [https://cdn.sif.moe/lovelive-community.apk](https://cdn.sif.moe/lovelive-community.apk)
- [https://pixeldrain.com/u/8vx6azHr](https://pixeldrain.com/u/8vx6azHr)
The differences of the ones above are JP and Global. Global has the following done to it:
- Automatic in-game language selection between English and Japanese based on system language or Android 13 per-app language setting.
- Runs natively in Android emulator. All binaries supported by Android, including x86-64, is available.
- Activates debug mode which show little bit of more information in-game.
- Backtrace, AppsFlyer, and Google Play is neutralized.
- Backtrace error is printed to logcat.
- Uses RSA private key from tungnotpunk/LLSIF@Home which should be compatible with LLSIF@Home and NPPS4.
- AppAssets.zip is patched to load from localhost:51376. This means it's compatible with LLSIF@Home and NPPS4.
Note: It does NOT contain patch to neutralize X-Message-Sign check. If you can't get XMS verification working, you need to patch it yourself. Well, you should make your private server generates correct XMS though.
Note2: It's recommended to launch the game in English for the first time. Otherwise, when you launch the game in Japanese for the first time, switching to English will erase all your game data (excluding your account). This logic is in the Lua script of the game. Help on neutralizing this behavior is welcome.
How to generate X-Message-Sign:
- [NPPS4](https://github.com/DarkEnergyProcessor/NPPS4/blob/b24b4e2a71be3c268c069a49bd3fae2bb25d7feb/npps4/util.py#L37-L42)
- [LLSIF@Home](https://codeberg.org/dic1911/LLSIF.local/src/commit/e7e780258dca86c2f1a77577897fad23298fe9c7/handler/util.js#L18-L34)
After the APK is retrieved and installed, then you should install the private server.
## Local server using LLSIF@Home
1. Install Termux (I recommend to download from [F-Droid](https://f-droid.org/en/packages/com.termux/), [direct link for latest release atm](https://f-droid.org/repo/com.termux_118.apk)) and open it. **Do not download from google play**. Termux on google play is outdated and will not work.
2. Run this command(s) inside of `Termux`:
```curl http://ll.sif.moe/android | bash```
***OR*** (if the command above fails do the commands below)
```wget http://ll.sif.moe/android```
```bash android```
(curl is broken currently, this will be one command if curl is fixed)
3. After it is done and it shows you the link to the discord/matrix server. Enter `exit` and re-launch termux.
4. You can run `runserver` to start the private server.
4. After this is done, you should be able to launch the game and it should just work. Message in the discord or matrix if help is needed.
## Local server using NPPS4
- Please refer to [this guide](https://gist.github.com/MikuAuahDark/eabf54e9db3f5004e3ccd9a72f0d79d5)
[^1]: https://love-live.fandom.com/wiki/Love_Live!_School_idol_festival

View file

@ -1,4 +1,3 @@
# SIFAS
(the following was copied from the fandom wiki) (the following was copied from the fandom wiki)
Love Live! School Idol Festival ALL STARS (ラブライブ!スクールアイドルフェスティバル ALL STARS Rabu raibu! Sukūru Aidoru Fesutibaru ALL STARS) was a rhythm action game developed for mobile platforms, based on the Love Live! and related franchises. It is published by Bushiroad and developed by KLab Inc., and was released on September 26, 2019. It was first announced at Tokyo Game Show 2017 on September 21, 2017. Prior to the announcement, it was first introduced and teased on March 30, 2017 as the PERFECT Dream Project in conjunction with SIF's 4th year anniversary. Love Live! School Idol Festival ALL STARS (ラブライブ!スクールアイドルフェスティバル ALL STARS Rabu raibu! Sukūru Aidoru Fesutibaru ALL STARS) was a rhythm action game developed for mobile platforms, based on the Love Live! and related franchises. It is published by Bushiroad and developed by KLab Inc., and was released on September 26, 2019. It was first announced at Tokyo Game Show 2017 on September 21, 2017. Prior to the announcement, it was first introduced and teased on March 30, 2017 as the PERFECT Dream Project in conjunction with SIF's 4th year anniversary.
@ -11,509 +10,6 @@ SIFAS, whether you liked it or not, was unjustly killed in favor of a bad "seque
Luckily for us, the community managed to preserve most if not all of the beloved aspects of the game. Thanks to various community members, there are works done and being done so that with a bit of tinkering, you can install and play SIFAS. Luckily for us, the community managed to preserve most if not all of the beloved aspects of the game. Thanks to various community members, there are works done and being done so that with a bit of tinkering, you can install and play SIFAS.
# Disclaimers Wanting to setup your own local server? Check [Easy install](easy-install.md).
The information presented by the author(s) of this documentation were either background knowledge, knowledge provided by community members, or knowledge learned from works published by community members.
The author(s) try to make sure that the information presented is correct. However, there might be incorrect info, or outdated info. Wanting to learn more and setup your own local server? check [Private Server](private-server.md)
The author(s) try to acknowledge and credit the community members who share knowledge, develop tools, host resources, or helped in any other way, but there might be some missing credit. If that were the case, please know that it is not intended by the author(s), and please contact the author(s) for proper credit.
The knowledge, tools, resources used by this documentation are acquired and presented with a good faith basis. While the author(s) try to ask creators for permission to use or feature their works, some works was used or featured without explicit permission. If you have problem with your works being mentioned / features, or your name being credited, please contact the author(s) to sort things out.
# Intents
This documentation go somewhat in depth to the technical side, so for experienced audience, it can serve as a quick introduction to the working of the game and server. If you are not interested in the details, or want to get something running before learning more, please check out the [Easy install](#easy-install) section for a streamlined experience. Do note that the provided packages might not work for you, however, the details explanation should give you want you need to get things working. Regardless, feel free to reach out to the community, both to help resolve your situation and to help make the documentation better.
This documentation will be about hosting your own SIFAS server, however, there exist a Korean private server that you can play the GL version on. You can find out more about it by asking in the LL Hax server. This documentation will also discuss only the GL (Global) and JP (Japanese) version, although there exist private server for CN (Chinese) version as well.
This documentation assume that you have some background knowledge related to the topic discussed, however, if this is your first time doing something like this, or you just want to learn more, you can also checkout the [Random knowledge](#random-knowledge) section. Various things that are common knowledge, things that are related and interesting (but not totally relevant to the discussion) are discussed.
# Convention
As there are multiple platforms for both client and server, we use the following terms to refer to them:
- Client: The game/app itself. This is what you will use to play the game.
- Server: The program that serve the necessary data for client(s) to function. This was Klab/MYNET/Bushiroad responsibility, but we will have to run our own server now that they have stoped supporting the game. The server often run in another machine, but there are setup that run the client and server on the same machine for android.
- Android/iOS/android/ios: The platform that the client run on. You should know what your platform is.
- Window/Linux/MacOS/Android: The platform that the server will run on.
# Installing the client
## Clients version
We will be using the 3.12 clients (patched):
- If you recall, these are released after the game is dead.
- The only functionality is to show a "SIFAS EoS, thanks for playing SIFAS" message, or so it seems.
- The truth is that, none of the original functionality was deleted, but the crack-proof is removed.
- Which mean that if we patch the starting screen away, we have access to a superior version of the app.
- We will only deal with the patched version here, the only modification you might need to do is to change the server address inside the client.
## Basic clients
These are the clients that come with the [elichika server](https://github.com/YumeMichi/elichika), you can get them from[elichika](https://github.com/YumeMichi/elichika) or directly [here](https://mega.nz/folder/gwJizZjS#v_fSOadf9yrb_eaOze2r7Q).
These clients connect to http://192.168.1.123. This is a local address (LAN), so if you run ``elichika`` the machine that has that address (and the port is opened for LAN access), you won't have to modify the clients at all. It will be explained more on the [easy install section](#easy-install).
## Patching client to a different server address
There are some problems that prevent the basic clients from working or working well:
- You might not have a Wi-Fi network that you can connect to.
- You might not have a separate device (usually a PC / laptop) to run the server on.
- Your Wi-Fi router IP address might not look like 192.168.xxx.xxx, and it's impossible or very complicated to change that.
- You can't obtain the IP 192.168.1.123 because someone or something on your network already have that (it's a nice address).
- You have the IP but you need port 80 (default http) for something else, so you can't run ``elichika`` on that port.
- You are outside touching grass a lot, so you are not connected to Wi-Fi that often.
- The list go on.
In which case, you will need to patch the server address in your client, or a client with different address. There are a few clients provided in the [easy install section](#easy-install), see if you can use one of them, if not then you will have to patch the server address yourself.
### Patching Android client to different server address
This part is written after referencing [honoka-chan](https://github.com/YumeMichi/honoka-chan/blob/master/doc/3.md). It's recommended that you read that for a deeper understanding, however that won't be necessary to follow this documentation.
We work with the basic clients `.apk` here.
#### First step: Unpacking the apk
There are multiple ways to do this, but we will use [apktool](https://apktool.org/).
We can either use the wrapper or .jar directly. Of course, [java](https://www.java.com) will be necessary.
Open up a terminal (command prompt) in the same folder as the `.apk` and run the following:
```
apktool d ALL_STARS_3.12.0_gl_patched.apk
```
for global client, or
```
apktool d ALL_STARS_3.12.0_ja_patched.apk
```
for JP client. Note that if you don't use or don't have the `apktool` wrapper, you can run the `.jar` directly (put in the same directory or you will have to specify to the actual path):
```
java -jar apktool_2.8.1.jar d apkname.apk
```
In any case, after unpacking, you should have a folder that has the same name as the `.apk` except for the extension
#### Second step: Change the address string
We will use the [MetaData String Editor](https://github.com/JeremieCHN/MetaDataStringEditor)
It is written in C#, and the `.exe` you can download need windows to run. If you can build your own from source, or change the metadata in other way, then you can use that too.
This tool is used to edit the metadata file of Unity engine games. In this case, we use it to change the address the client will connect to, but you can also change other strings.
<!-- TODO: Maybe insert some photo. -->
To change the address string, open the tool, then press the top left button and open up the `global-metadata.dat` file. You can find it in:
```
ALL_STARS_3.12.0_gl_patched\assets\bin\Data\Managed\Metadata
```
or
```
ALL_STARS_3.12.0_jp_patched\assets\bin\Data\Managed\Metadata
```
depending on the versions.
You will see many strings. Search for http://192.168.1.123 using the textbox at the top. Double click on the string, click on the popup thing, and you will see another window pop up. You can edit that data to any address you wish to connect to.
If want to use the [elichika](https://github.com/YumeMichi/elichika) server, keep it `http`, you can use `https` if the server do support that.
After editing the address, click the bottom right button to change the address. After that, click the middle button on the top left of the program. Save the metadata as some other file, as you can't overwrite to the current file. After that you can close the tool, remove the original `global-metadata.dat` and rename the new file to `global-metadata.dat`.
#### Third step: Repack the apk
We can do this with `apktool`:
```
apktool b ALL_STARS_3.12.0_gl_patched
```
or
```
apktool b ALL_STARS_3.12.0_ja_patched
```
After `apktool` is done, you can find the output `.apk` in
```
ALL_STARS_3.12.0_gl_patched\dist\ALL_STARS_3.12.0_gl_patched.apk
```
or
```
ALL_STARS_3.12.0_jp_patched\dist\ALL_STARS_3.12.0_jp_patched.apk
```
This `.apk` is not finished, we need to sign it before it can be installed in emulators or phones.
#### Fourth step: Sign the apk
To sign the `.apk`, we will need a few things.
The first is `apksigner`. You can either download a `.jar` online, or you can get it with the [Android SDK](https://developer.android.com/studio).
The second thing we need is a keystore. You can download this [keystore](https://codeberg.org/arina999999997/nozomi/raw/branch/master/sifkey.keystore) that has password `123456` for your convinience. If you want to generate your own key store, you will need `keytool`, which come with `java` (find it in java bin folder):
```
keytool -genkeypair -v -keystore sifkey.keystore -alias sifkey -keyalg RSA -keysize 2048 -validity 36500
```
You can choose your own password and the keystore name. After we have the keystore, you can sign the `.apk`:
```
apksigner sign --ks sifkey.keystore --ks-key-alias sifkey --out ALL_STARS_3.12.0_gl_patched.apk ALL_STARS_3.12.0_gl_patched\dist\ALL_STARS_3.12.0_gl_patched.apk
```
You can change the `.apk` name if necessary.
After this, you can install the `.apk`. If you already have a version of SIFAS, you might get an error saying that the signature doesn't match. You can just uninstall the old SIFAS and install the new one in that case. Google play protect might say the file is suspicious, but you can still install it.
### Patching Android client to new address with frida
It's possible to use [frida](https://github.com/vfsfitvnm/frida-il2cpp-bridge) to change the address and avoid having to patch the `.apk`, as demonstated by ``sarah`` in the LL Hax discord. If you don't want to use the above patching process, you might want to try that.
### Patching ios client to new address
The details on patching `.ipa` is outside of the author(s) knowledge and is not discussed here, but it is doable.
The ios clients distributed by `elichika` were patched by ``tungnotpunk`` in the LL Hax discord. If you want to learn how patch them yourself, you can find out more there.
# Install the elichika server
[elichika](https://github.com/YumeMichi/elichika) is a SIFAS server written by ``YumeMichi`` (``.yumemichi`` on discord). It is written in Go(lang), and it is still being worked on at the time of writing this documentation. As such, it's recommended that you install [git](https://git-scm.com/) to make it easy to keep your version up-to-date.
This documentation will walk through the process of installing and building `elichika` using `git` and some other tools. You can also try the [prebuilt server binaries](#easy-install) but they might not be up to date, and might not work for your purpose.
## Platforms
Generally, if we can run Go on a platform, then we can run the server on it. Regardless of the platform, the setup will be something like this:
- Local PC: server run on a PC (windows, linux, mac), client connect to it through WLAN (Wi-Fi) or some tethering method.
- External PC: server run on an external machine, client connect to it through a public IP or a server address. This is the setup for online multiplayers, however that is not supported by the server (for now).
- Android/Termux: server run on the same android phone, tablet, or emulator as the client. More precisely, it will be running inside the [termux](#installing-termux-for-android) app.
## Zeroth step: Install git for each platform
If you want to use `git` to get the server, and you didn't have it installed, you can download and install through the [official website](https://git-scm.com/downloads).
For Linux and Termux, you can also install `git` through the terminal (it's most likely already installed in Linux, but this is necessary for a fresh Termux install):
```
apt install git
```
If you don't want to use it, you can skip this step.
## First step: Download the server
### Using git
Nagivate to where you want to put the server and open up a terminal:
- For Windows, nagivate with the GUI to the folder you want to put the server, then enter `cmd`` into the address bar, that will open up a terminal inside that folder.
- For Linux GUI, you can also navigate to the directory you want, and right click, there should be an option to open the terminal.
- For all platforms, you can also just open the command prompt / terminal and go to the correct place. Expect to use things like `cd` and `mkdir` to navigate and create folder.
After that, use `git clone` to download the server:
```
git clone https://github.com/YumeMichi/elichika
```
You will get an `elichika` folder / directory. Go to it with your current terminal:
```
cd elichika
```
Everyt ime you want to run the server, you will have to open a terminal in that directory.
If you use git, you can keep your server source code up to date by running the following:
```
git pull
```
Note that if you made changes to the server, then `git pull` might fail. You can either learn more about `.gitignore` (or other methods) to keep your changes, or you can just run:
```
git reset --hard
git pull
```
to update it, but you will have to make the change again.
### Download directly
You can also download the source code directly to avoid using `git`. If you do this, everytime you want to update the server, you will have to redownload everything.
Simply go to [elichika](https://github.com/YumeMichi/elichika) with your web browser, click on the Code button, click on Download ZIP, save the file, and extract it. You will need to open terminal in the extracted folder with `main.go` file.
## Third step: Build the server
It's recommended to build your own server if you can, so you can stay up-to-date and make the changes necessary.
### Installing Go
Because the server is written in Go, you have to install it to build the server.
For PC platforms, you can get it [here](https://go.dev/doc/install).
For Termux, run:
```
pkg install golang
```
### Building the server
On all platform, simply run:
```
go build
```
inside the `elichika` server. You will get an `elichika` binary (`elichika.exe` on windows). Note that you will have to rebuild everytime you update or make a change.
# Running the server
Before you can play the game, you have to run the server. To do that, go to the `elichika` folder, and run the binary through terminal / command prompt:
```
./elichika
```
remove the `./` on windows. On windows, you can also run it by opening the .exe file directly.
If you haven't configured the server correctly, you might have to change some config. Mostly you will change `config.json` or `main.go`.
[Easy setups](#easy-install) all have configuration ready, but you might still want to do some modifications.
To change the files in windows or linux GUI, you can open any text editor to change config.
In Termux, you should use some command-line based text editor like `nano`, or `vim`. Looks up a tutorial if you don't know how to use them. You can also just use `sed` if you are comfortable with it.
## Providing a CDN server
A CDN (content distribution network) server is where the game(app) will download the files necessary (i.e. songs, stories). We can set it inside `config.json`. Note that if the file is not present, just run `elichika` and close it, the file will be generated.
By default, it's pointed to http://192.168.1.123/static (the same address as the default `elichika` server). This essentially tell the game to download game files from http://192.168.1.123/static (from the game network environment).
We can change the CDN server by changing that string in the `config.json` file.
### Online CDN
Thanks to ``sarah`` (``sarayalth``) from the LL Hax discord, there is a CDN that we can use to avoid hosting our own files.
Change the cnd server to https://llsifas.catfolk.party/static, and the game will download file from that server (through the internet). This is the recommended way to do this, however the server might become unavailable later on. The `config.json` file should looks something like this:
```
{"app_name":"elichika","settings":{"cdn_server":"https://llsifas.catfolk.party/static"}}
```
The [easy installs](#easy-install) all use this method.
### Self hosted CDN
`elichika` has the ability to host the CDN files, but we will have to have the CDN data ready. The data is 20GB for either GL or JP server, so 40GB for both.
One way to get them is from [archive.org](https://archive.org/details/ll-sifas-cdn-data). The direct downloading speed is not that great, so be prepared to leave your machine on for a very long time. If you don't want that, download using the `.torrent`, it would be much appreciated if you also host the files once downloaded. Do note that there are risks associated with torrenting, but that topic will not be discussed here.
Another way to get them is from extracting the downloaded game files. You can try this once you download the necessary files (from https://llsifas.catfolk.party/static), for example. To extract the files, use [this youtube tutorial](https://youtu.be/j4oh3qrCrfw), or any other methods you know.
You can also just directly download from https://llsifas.catfolk.party/static if you have the list of necessary files (check the file database).
Regardless of how you get the files, you want to put them in:
```
elichika/static/2d61e7b4e89961c7
```
for GL or
```
elichika/static/b66ec2295e9a00aa
```
for JP. After that, edit the `cnd_server` address to be `http://<server_address>/static` (i.e. http://192.168.1.123/static or http://127.0.0.1:8080/static) and we're done.
## Patching the database
Since we use the 3.12 clients, we have to patch the database (as the cdn data was for 3.11 clients). The patched database is included in the same download with the basic clients [here](https://mega.nz/folder/gwJizZjS#v_fSOadf9yrb_eaOze2r7Q). Just extract the correct version GL or JP, and put them in `elichika/static/2d61e7b4e89961c7` (GL) or `elichika/static/b66ec2295e9a00aa` (JP).
The [easy installs](#easy-install) have the database patch included for both JP and GL version.
It's possible to patch and key the database again (if you want to modify some file for example), although that is not discussed here. Join the discord and ask around for more informations.
## Changing server port
By default the server run on port 80. You can change by changing the `main.go` file. Remember that you have to rebuild if you do this. Maybe this is better in a config file, but it's hard coded for now.
To change the port, open up `main.go` the line:
```
r.Run(":80")
```
to whatever port you like, i.e.:
```
r.Run(":8080")
```
or
```
r.Run(":1503")
```
You can also use `sed`:
```
sed -i 's/r.Run(":80")/r.Run(":8080")/g' main.go
```
On some system (Linux and/or Termux), port with number less than 1024 need to have root permission (or just higher permission than normal) to open, so changing it to something bigger let you run without root. Your port 80 might also be used for other things, so you might want a new port.
# Playing the game
After you have the server installed and run it, just open the game. You will be prompted to choose language if you are using the GL version, English(EN), Korean (KR), and Traditional Chinese (ZH) are supported, choose the one you want.
You will then be prompted to download the files. If you have spaces on your phone / emulator, you can just download everything, however, other type of download also work just fine. Download everything let you play the game without the internet later on.
After you are done downloading, you can just play the game like normal.
For your information, here is the summany state of the server. Note these might be outdated, mising, or incorekt.
## Stuff that works (at least partially)
### Personalization
The following persionalizations work:
- Changing profile: You can select any card / title / name / nickname.
- Changing partner: You can select partners and their costumes, as well as the backgrounds.
### Partner interaction
You can interact with everyone, view their cards, view their costumes and preview them.
There is no bond board unlock as they are all maxed.
### 3DMV
You can watch all the MVs, with all the settings:
- The "custom formation" tab works and you have all the outfit to choose from.
- However changing costume in the "original formation" tab doesn't work, but you can just use the "custom formation" node.
### Story
You can read ALL the stories, ALL of them:
- All main stories
- All bond stories
- All side (card) stories
- All event stories
- All Nijigasaki anime tie-in stories
### Live show
You can build team and play live shows:
- You can play all the permanent songs and story songs.
- You can play all the daily song, but they are on a rotation similar to the official game, however there is no limit to how many time you can play. Maybe it will be possible to make it so all daily song are always available.
- You have all the cards almost maxed, along with maxed bond board and bond level 500 on every character, so you can try to clear the harder songs that you didn't manage to do before the game die.
- Autoplay will also get Wonderful judgement everytime. If you didn't know, this is a server setting, so you can change the server so that it behave like the official game if you want.
- The song play record is not implemented for now, and you don't get any item drops, but the main feature is there.
- After you complete a song, you always get taken to a story menu, so it might be a bit annoying.
- Some stuff like changing formation name can crash the game, but you can just restart.
- Skip ticket doesn't work.
- Overall the core stuff is there.
### School idols
You have all the school idols at max level and max limit breaks.
- Most idols have their practice done, except for the party cards (will likely be fixed soon enough)
- There's no actual idol rising experience for now.
### Training
You can do training:
- Training doesn't cost any AP.
- Training doesn't give you any items.
- Training doesn't depend on the regiments, you always get the same insight awarded, so you can use that to quickly build your maxed team.
- Training doesn't give any other skill for now, so you can't build a team that has maxed out skill chance for example.
### Accessories
You have the accessories available in the original game:
- You can choose accessories for the formation just fine.
- All the DLP accessories are available and maxed.
- You also have other maxed accessories.
- But there is no way to get more for now, so you can't play into some strategy that require them.
- The game will crash if you try to disassemble or synthesize, or lock or remove from all formation etc. These will be address in due time.
## Stuff that doesn't work (at least at the time of writing)
Aside from the things that work partially, some stuff doesn't work at all and crash the game, you should avoid clicking on them.
### Gacha
Sadly you can't gacha for now.
### Membership card
Membership doesn't work on the global version (tapping it results in a crash).
Supposedly it works in the JP version.
### News
The news menu works but it shows you JP news, and if you click on the news it crashes.
### Goals
There's no goal (mission), you can click on it but it will freeze your game, so you will need to restart the game.
### Channel member
Crash the game if clicked on.
### Shop and exchange
Crash the game if clicked on.
### Multiplayer
No form of multiplayer exist or can exist with the current implementation. That might change later on.
### Event, SBL, and DLP
There is currently no way to play these modes. In the future, someone might figure that out.
# Future of the server
Development is still being done on the server by YumeMichi. If you want to help, joining the LL Hax discord would be a good first step.
Ideally, we would at least have a server that offer the same experience of the SIFAS journey: Getting cards, costumes, clearing goals, raising idols, raising bond level and so on.
# Easy install
This section provide some prebuilt server binaries and some clients so you don't have to make the modifications yourself.
## Clients
- [elichika](https://github.com/YumeMichi/elichika) provided [android and ios clients](https://mega.nz/folder/gwJizZjS#v_fSOadf9yrb_eaOze2r7Q). Connect to server at http://192.168.1.123:80
- localhost android clients. Connect to server at http://127.0.0.1:8080
- LAN android clients. Connect to server at http://192.168.1.123:8080
- For the `.apk` clients, you can get them [here](https://codeberg.org/arina999999997/nozomi/releases). The naming format is `ALL_STARS_3.12.0_version_ip_ip_ip_ip_port`. Version being GL or JP.
## Servers
- [elichika](https://github.com/YumeMichi/elichika) server source.
- [elichika](https://github.com/YumeMichi/elichika) server resource: download directly from [github](https://github.com/YumeMichi/elichika/archive/refs/heads/master.zip) and unzip.
- [catfolk CDN patch](https://codeberg.org/arina999999997/nozomi/raw/branch/master/catfolk_cdn.json).
- static/database: [same download as elichika provided clients](https://mega.nz/folder/gwJizZjS#v_fSOadf9yrb_eaOze2r7Q), or [direct zip](https://codeberg.org/arina999999997/nozomi_static_db/archive/master.zip)
- [elichika](https://github.com/YumeMichi/elichika) prebuilt [server binaries](https://codeberg.org/arina999999997/nozomi/releases) for various OS and architectures so you don't or can't install go. The file names is in the format: `elichika_<OS>_<ARCH>_<PORT>`.
- To use a server version, download the server resource and extract it, download the CDN patch, download the correct binary. Put the binary and CDN patch inside the extracted server resource and run the binary.
## Common setups
### Server and client run on Android, with Termux
The server run inside Termux, on the same phone or emulator that you want to play SIFAS on. After downloading all of the game files, you can play anywhere anytime even without internet.
- Download the client that point to http://127.0.0.1:8080 and install it in your phone.
+ [GL version](https://codeberg.org/attachments/8d11c7d9-a57d-498e-ba3e-4fe529e741a6)
+ [JP version](https://codeberg.org/attachments/0483f301-b0cd-4cc5-b1a6-74da15419a90)
- Open up termux and enter the follow commands:
```
curl https://codeberg.org/arina999999997/nozomi/raw/branch/master/termux_install_script.sh -o sifas_install.sh && bash sifas_install.sh
```
- After that run the `elichika` server:
```
cd elichika
./elichika
```
- Finally run the game and enjoy.
If that doesn't work, you might have one of the following problems:
- If you can't install the `.apk` then you're out of luck, either play with a 64 bits emulator or phone.
- If anything happen before you run the binary, your Termux has problem. Install through this [guide](#installing-termux-for-android).
- If you run the server binary and it doesn't work, it's likely that your system has a different architecture. It might also start and give you a warning (this still works). The way to resolve this is to install golang and build the server yourself:
```
apt install golang
go build
```
- Note that in some system, even if you can build the go binary, you will still have a problem when running it. If this happens, it's easier to just use another device that work.
### Server on PC, play on phone, through Wi-Fi
The server run on your PC (Windows / Linux / MacOS). You play on your phone. The 2 devices has to be in the same network.
- Download the client that point to http://192.168.1.123:80 (or http://192.168.1.123:8080 if you can't use port 80) and install that.
- Download the server (your architecture + port). If the architecture is not in the release, then you will have to build your own with go.
- Change your PC's local IP to 192.168.1.123. You might also have to deal with firewall stuff. Look up how to change IP on `<your specific system>` if you have trouble.
- Run the binary on PC and run the game on your phone.
- Note that if you are using port 80, you might need to run the server with root permission on Linux and MacOS, otherwise the program just close after it start.
### Server on PC, play on android phone, through adb
In the case that you want to run server on PC but play on android phone, and you can't get the IP/port, you can rely on [adb](https://developer.android.com/tools/adb).
- Download the client that point to http://127.0.0.1:8080 and install it in your phone.
- Download a server that run at http://127.0.0.1:8080 on your PC.
- Enable [developer options](https://developer.android.com/studio/debug/dev-options), and turn on `adb`.
- Connect your phone to your pc, accept the USB debugging and run:
```
adb reverse tcp:8080 tcp:8080
```
- This map http://127.0.0.1:8080 in your phone to http://127.0.0.1:8080 in your PC, allow the app to connect to the server.
- If you don't want to have your phone plugged in to your computer, debug the phone through `tcpip` mode. If you are going to do this, it's good to have a static IP for your phone, then you can make a script that connect to your phone and run the server,for convinience.
### Server on PC, play on android emulator
If you want to play on an emulator and don't want to use Termux, you can use either `adb`, or you can bridge the network so your emulator get treated as a device in your LAN. The details on how to do this depend on the emulator, so you should look it up yourself.
# Random knowledge
Some random knowledge that you might already know, or stuff that is inconvenience to discuss elsewhere.
## Install necessary program in Linux/Mac/Termux
If you need a program, say `git`, you can just type it to the terminal. The terminal will say that you don't have that program, but it will let you know which command to install the thing. If it doesn't then the tool you are trying to use is very niche, but you can still find some installing guide by searching.
## Installing .apk
For android, you can just use your phone/emulator to download the `.apk` and install it. You might have to go through some step / permission, but it should be doable.
Pretty much all emulators have a way to install `.apk`. You can use that feature for them. Most of them also let you install `.apk` by dragging them into the emulator.
Finally, you can install `.apk` through `adb`.
## Installing .ipa
For ios, it's way harder to install custom package. Please look up guide or ask the communities for help.
## Installing termux (for android)
[Termux](https://termux.dev/en/) give you access to various things, you can do things usually done on computers like programming. In our case, it let us run the server and play the game everywhere (without internet if you has downloaded the game files).
You can build termux yourself, but for simplicity, you can install Termux through the [F-Droid release](https://f-droid.org/en/packages/com.termux/). You can either use the F-Droid app, or download the `.apk` directly from the page and install that.
Note that the Termux from Google Play store is very OUTDATED, and it will likely NOT WORK.

146
docs/sifas/apk-patching.md Normal file
View file

@ -0,0 +1,146 @@
The original 3.12 clients are designed to only serve as a EOS notice. Howerver, the functionalities are still (mostly) there, so we can patch it to work.
This docs will outline the necessary steps and how to do them, should you need to make your own clients. This docs assume we start with a stock clients. You can get these by dumping the app from Google Playstore or from other apk distribution sites.
# Patching android binary
Note that some of these steps will not be necessary depending on what you started with and what you want to do.
Also note that some commands might become outdated after the tools are updated. If this is the case, try getting the specific version used or try to adapt the command yourself.
## Unpacking the apk
The first step is to unpack the apk so we can modify it.
We will do this with [apktool](https://apktool.org/), version `2.9.3` to be exact.
We can either use the wrapper or .jar directly. Of course, [java](https://www.java.com) will be necessary.
Open up a terminal (command prompt) in the same directory(folder) as the `.apk` and run the following:
```
apktool d LLAS_GL_3.12.0.apk
```
After unpacking, you should have a folder that has the same name as the `.apk` except for the extension, so `LLAS_GL_3.12.0` in our case.
The `LLAS_GL_3.12.0.apk` is just the file name, here it refer to LLAS, GL, version 3.12.0, but you can rename the apk to pretty much anything.
After that, you can do the relevant modifcation, then finally [repack it](#repacking-the-apk)
## Packing the binary to unlock the game features
By default, the game only show the EOS screen. Helpfully for us, the developer left in everything, and the EOS screen is triggered by a check function. To make the game work, we need to patch away this check. Furthermore, some feature are also time-sensitive, so they requires or will require other check later on.
### Easy way out
You can use these [clients](https://github.com/arina999999997/elichika/releases/tag/clients) that has the binary patch in them, and do the later modification step if necessary.
### Directly edit the binaries
The file we need to patch is `libil2cpp.so`, we can find it in `LLAS_GL_3.12.0/lib/arm64-v8a/` (64 bit), or `LLAS_GL_3.12.0/lib/armeabi-v7a/` (32 bit).
We will need to change some specific bytes in the `libil2cpp.so` file to make the client work.
Tool and the relevant patch for editing is [here](https://github.com/arina999999997/sifas-tools/tree/master/scripted_hex_editor). Either build the tool and run it with the relevant patch, or make the edit manually using any binary editor.
### Doing things properly
If we want to make other binary modification, then we have to understand things properly. This is a very indepth topic, so here is a summary and resource to get started:
- SIFAS uses `il2cpp` with `Unity`. This means that their higher level code eventually get compiled to `C/C++` code, and then machine code (`.so`).
- This is done for better performance, but it also allow us to use the various reverse engineer tools that are developed for `il2cpp`.
- More precisely, [Il2CppInspector](https://github.com/djkaty/Il2CppInspector) and [Il2CppDumper](https://github.com/Perfare/Il2CppDumper) can read the project and provide more information.
- So we can setup `libil2cpp.so` inside [Ghidra](https://ghidra-sre.org/), and see what the code is doing more easily.
- After that, we can analyse the code and see what the game is actually doing, and then perform the relevant modification.
- The prepade patch explains what we need to do, you can look at the same address in Ghidra to see the difference.
- If you want to do modification, it might be better to directly patch the binary rather than doing the modification in Ghidra then exporting it.
## Patching the RSA key and the server address
The RSA key and server address are stored in the `global-metadata.dat` of the `apk`. So in our case, we can find it at `LLAS_GL_3.12.0/assets/bin/Data/Managed/Metadata/global-metadata.dat`.
In short, this is just the way the game stores string literals, and we need to edit the relevant strings:
- The server address is the URL or the IP of the server, it's just the address that the client connect to.
- The RSA key is used in communication between the client and the server.
- The client has the public key, and the server has the private key.
- Because we don't have the private key for the public key that come with the client, we have to generate our own private-public key pairs
- And then we have to change the public key for the client.
### Using the MetaData String Editor GUI
First download [MetaData String Editor](https://github.com/JeremieCHN/MetaDataStringEditor).
It is written in C#, and the `.exe` need Windows to run.
To change the address string, open the tool, then press the top left button and open up the `global-metadata.dat` file. You can find it in:
You will see many strings. Search for the current values using the textbox at the top. Double click on the string, click on the popup thing, and you will see another window pop up. You can edit that data to any other data. You will need to change:
- The server address:
- For gl client, the original address is "https://gl-real-prod-8f2jln5l4evlw5l1.llas.bushimo.jp/ep3120"
- For jp client, the original address is "https://jp-real-prod-v4tadlicuqeeumke.llas.bushimo.jp/ep3120"
- For [elichika's clients](https://github.com/arina999999997/elichika/releases/tag/clients), the original address is "http://127.0.0.1:8080" or "http://localhost:8080".
- You can change the address to anything you want, but keep in mind the following:
- Do not have `/` at the end of the address.
- For `https`, you might run into problems with trust certificate if you don't set things up properly.
- The RSA key:
- Both gl and jp clients user the same original RSA key, the prefix is: "<RSAKeyValue><Modulus>v2VElqvCwrhdiXJ"
- Elchika's RSA key is:
```
<RSAKeyValue><Modulus>1r6QjkBr1hIGrgq95ZEEDnXqCYa+81hvhejsGoUcfCZ/kkngBuUbq8/rqRfoFVEZOmDRG8DKrhtfFoWQyftqycCrQj8ELQeGCQJFtdXg+eljb3HDP8Zzzh+9YXJHNIswCYfMFYXlBHP90QniFfZqfERVSqK9V1uJU8EyxHMismU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>
```
- The key is in XML format, so if you want to use your own RSA keys then you have to convert it.
After editing the data, click the bottom right button to change it. After that, click the middle button on the top left of the program. Save the metadata as some other file, as you can't overwrite to the current file. After that you can close the tool, remove the original `global-metadata.dat` and rename the new file to `global-metadata.dat`.
### Using the MetaData String Editor CLI
Instead of the GUI, you can use the [Metadata String Editor](https://github.com/arina999999997/sifas-tools/tree/master/metadata_string_editor) CLI that can replace string or edit strings by ids.
It also come with the relevant patches for SIFAS.
## Changing the package name, app name, and icon
Aside from changing metadata and binary, we can also change a few things about the app itself.
### Changing the package name
If you want to keep multiple clients, either for testing or for playing on multiple servers, you will have to change the package name as android systems don't allow multiple apps with the same package name.
To do this, you need to change the manifest file at `LLAS_GL_3.12.0/AndroidManifest.xml`.
Assume the package name is `com.klab.lovelive.allstars.global`, and we want to change it to `com.klab.lovelive.allstars.global.mod`, then we have to change every instance of `com.klab.lovelive.allstars.global` to `com.klab.lovelive.allstars.global.mod` except for the instance that say ``com.klab.lovelive.allstars.global.GlobalUnsafeMainActivity``.
### Changing the app name
To change the app name, you will have to change the field `"app_name"` to what you want in `LLAS_GL_3.12.0/res/values/strings.xml`.
### Changing the app icon
You can also modify the icon in `LLAS_GL_3.12.0/res/mipmap...`. Note that this depend on your DPI, so you might have to edit them all.
## Repacking the apk
First, use [apktool](https://apktool.org/) to build the `.apk`:
```
apktool b LLAS_GL_3.12.0
```
After `apktool` is done, you can find the output `.apk` at `LLAS_GL_3.12.0/dist/LLAS_GL_3.12.0.apk`
However, this `.apk` is not completed, we need to sign it before it can be installed in standard devices.
The easiest way to do this is to use the [uber-apk-signer](https://github.com/patrickfav/uber-apk-signer/releases). If you know how to do it in other ways (i.e. with apksigner), feel free to do so.
Download [uber-apk-signer-<version>.jar](https://github.com/patrickfav/uber-apk-signer/releases), then run:
```
java -jar uber-apk-signer-<version>.jar -a LLAS_GL_3.12.0/dist/LLAS_GL_3.12.0.apk
```
You can find the output apk in the same folder as the input one:
```
LLAS_GL_3.12.0/dist/LLAS_GL_3.12.0-aligned-debugSigned.apk
```
After this, you can install that `.apk`. If you already have a version of SIFAS, you might get an error saying that the signature doesn't match. You can uninstall the old version or [change the client package name](#changing-the-package-name-app-name-and-icon) to have a different app entirely.
## Patching Android client to new address with frida
It's possible to use [frida](https://github.com/vfsfitvnm/frida-il2cpp-bridge) to change the address and avoid having to patch the `.apk`, as demonstated by ``sarah`` in the LL Hax discord. If you don't want to use the above patching process, you might want to try that.

View file

@ -0,0 +1,60 @@
This section discuss some easy way to setup the game and play, as well as some common way to set things up.
# Servers
- [elichika](https://github.com/YumeMichi/elichika) original server.
- [elichika fork](https://github.com/arina999999997/elichika) recommended server.
# Clients
## Android
- Download one of the elichika compatible [clients](https://github.com/arina999999997/elichika/releases/tag/clients) and install it.
- [Modify that or make your own](apk-patching.md) if necessary.
### iOS setup
- You can download the `ipa` files from [here](https://mega.nz/folder/klACSZzC#Lxv3m-Gq8_7FF_4pcr4X8A) (or from [here](https://ethanthesleepy.one/public/lovelive/jp_allstars_3_12_0.ipa) if you need http enabled)
- Enable developer mode under settings -> privacy & security - very bottom. Older iOS versions may not have this option and do not need to worry about it.
- Use [sideloadly](https://sideloadly.io/) to install the `ipa`.
- Open settings and navigate to the settings for the installed app. You can configure the server url there.
- Note that at the moment it appears the global `ipa` files do not work. The reason is unknown.
## Setups
These are types of setup, choose one that suit you, or adapt one to your usage.
### (Forked) Elichika - Android with Termux
The server can run inside Termux, on the same phone or emulator that you want to play SIFAS on. After downloading all of the game files, you can play anywhere anytime even without internet.
- Download one of [these clients](https://github.com/arina999999997/elichika/releases/tag/clients) and install it.
- Then follow [this guide](https://github.com/arina999999997/elichika/?tab=readme-ov-file#android).
If that doesn't work, you might have one of the following problems:
- If you can't install the `.apk` then you're out of luck, you will need to find a device (emulator) that is compatible, or [make one yourself](apk-patching.md) from a compatible stock client.
- If anything happen before you run the server binary, your Termux has problem. Make sure you followed Install [the guide](https://github.com/arina999999997/elichika/?tab=readme-ov-file#android) and installed the correct Termux.
- If you are sure you have done things correctly, it might be the case that your device is too new or just have some weird restriction. If this happens, it's probably easier to just use another device that works.
If you are not using `elichika`, you can still use this setup as long as your code can run inside Termux.
### External server (Internet or LAN), play on phone
The server run on your PC (Windows / Linux / MacOS), or some external machine.
You play on your phone or emulator. The clients need to be able to reach the server, either through LAN or the Internet.
- If you are using Android clients, [patch them](apk-patching.md) to point to the correct address.
- If you are using IOS clients, change set settings to point to the correct address.
Generally, if you are using someone else's server then they should provide you with a client that you just need to install, or walk you through how to do this in details.
### Server on PC, play on android phone, through adb
In the case that you want to run server on PC but play on android phone (for development), and you can't get static IP/port, you can rely on [adb](https://developer.android.com/tools/adb).
- Download a client and install it.
- Enable [developer options](https://developer.android.com/studio/debug/dev-options), and turn on `adb`.
- Connect your phone to your pc, accept the USB debugging and run:
```
adb reverse tcp:8080 tcp:8080
```
- This map http://127.0.0.1:8080 in your phone to http://127.0.0.1:8080 in your PC, allow the app to connect to the server. Change the port if necessary.
- If you don't want to have your phone plugged in to your computer, debug the phone through `tcpip` mode. If you are going to do this, it's good to have a static IP for your phone, then you can make a script that connect to your phone and run the server, for convinience.
### Server on PC, play on android emulator
If you want to play on an emulator and don't want to use Termux, you can use either `adb`, or you can bridge the network so your emulator get treated as a device in your LAN. The details on how to do this depend on the emulator, so you should look it up yourself.

View file

@ -0,0 +1,93 @@
# Disclaimers
The information presented by the authors of this documentation were either background knowledge, knowledge provided by community members, or knowledge learned from works published by community members.
The authors try to make sure that the information presented is correct. However, there might be incorrect info, or outdated info.
The authors try to acknowledge and credit the community members who share knowledge, develop tools, host resources, or helped in any other way, but there might be some missing credit. If that were the case, please know that it is not intended by the authors, and please contact the authors for proper credit.
The knowledge, tools, resources used by this documentation are acquired and presented with a good faith basis. While the authors try to ask creators for permission to use or feature their works, some works was used or featured without explicit permission. If you have problem with your works being mentioned / features, or your name being credited, please contact the authors to sort things out.
# Intents
This documentation will go somewhat in depth to the technical side, so for experienced audience, it can serve as a quick introduction to the working of the game and server. Do note that the provided packages might not work for you, however, the details explanation should give you want you need to get things working. Regardless, feel free to reach out to the community, both to help resolve your situation and to help make the documentation better.
This documentation will be about hosting and playing your own SIFAS server, more precisely, how to do so in general. For specific implementations of private server, we will only provide link to them or their documentation. This documentation will also discuss only the GL (Global) and JP (Japanese) version, although there exist private server for CN (Chinese) version as well.
<!-- This documentation assume that you have some background knowledge related to the topic discussed, however, if this is your first time doing something like this, or you just want to learn more, you can also checkout the [Random knowledge](#random-knowledge) section. Various things that are common knowledge, things that are related and interesting (but not totally relevant to the discussion) are discussed. -->
This documentation assume that you have some background knowledge related to the topic discussed. If this is your first time doing something like this, you will have to search up relevant information, or reach out to the community for help.
# Convention
As there are multiple platforms for both client and server, we use the following terms to refer to them:
- Client: The game/app itself. This is what you will use to play the game.
- Server: The program that serve the necessary data for client(s) to function. This was Klab/MYNET/Bushiroad responsibility, but we will have to run our own server now that they have stoped supporting the game. The server often run in another machine, but there are setup that run the client and server on the same machine for android.
- Android/iOS/android/ios: The platform that the client run on. You should know what your platform is.
- Window/Linux/MacOS/Android: The platform that the server will run on.
# Preparing the client
## Clients version
We will be using the 3.12 clients:
- If you can't recall, these are released after the game is dead.
- The only functionality is to show a "SIFAS EoS, thanks for playing SIFAS" message, or so it seems.
- The truth is that, none of the original functionality was deleted, but the crack-proof is removed.
- Which mean that if we patch the starting screen away, we have access to a superior version of the app.
- You can learn how to do so [here](apk-patching.md).
## Premade clients
### Android
You can download the apks from [here](https://github.com/arina999999997/elichika/releases/tag/clients). This should work with both 32 bit and 64 bit devices.
These clients connect to http://127.0.0.1:8080, and is mainly designed to work for [elichika](https://github.com/arina999999997/elichika/). However, you can modified them to work for other servers if necessary (see [patching apks](apk-patching.md) for details).
### Patching ios client to new address
The `.ipa` files do not need to be patched thanks to tri.angle in the discord server. You can just sideload the app and change the server url in setting.
You can download the `ipa` files from [here](https://mega.nz/folder/klACSZzC#Lxv3m-Gq8_7FF_4pcr4X8A).
These `.ipa` files do not enable http servers by default, you will need to modify `Info.plist` using [ProperTree](https://github.com/corpnewt/ProperTree) and enable `NSAllowsArbitraryLoads`, or for your convinience a pre-patched `ipa` with http support enabled can be downloaded [here](https://ethanthesleepy.one/public/lovelive/jp_allstars_3_12_0.ipa).
Note: currently the global version indefinitely loads for no apparent reason. It may not work.
# Preparing the server
You need to pick an implemtentation or make your own.
## Elichika servers
[elichika](https://github.com/YumeMichi/elichika) is a SIFAS private server written by `YumeMichi` (`.yumemichi` on discord).
However, it's recommended to use the [forked elichika](https://github.com/arina999999997/elichika/) that are much easier to setup and has more features and more to come. Refer to the github repository for server-specific details.
## Other servers
Currently there are no public "non-elichika" private server implementation that we know of. If you are working on your own implementation and want to share it, please reach out to the LL Hax discord.
# Operating the server
These are some knowledge necessary to operate the server.
## Patching the database
The client will download the database directly from your server after it successfully connected.
The details on how to patch them is complicated and contains weird cryptography stuff.
The [forked elichika](https://github.com/arina999999997/elichika/) handle this automatically, you can look into how it does that for details.
## Providing a CDN server
A CDN (content distribution network) server is where the game(app) will download the necessary files (i.e. songs, stories). No matter what server implementation you use, you will need a CDN host.
More precisely, the client will request the link to download assets at `/asset/getPackUrl`, and you will have to response with the correct link to download them. There is no restriction to where the client will download the file from, so you can link to any server.
### Online CDN
Thanks to `sarah` (`sarayalth`) from the LL Hax discord, there is a CDN that we can use to avoid hosting our own files.
The server is at [https://llsifas.catfolk.party/static](https://llsifas.catfolk.party/static) or [https://llsifas.imsofucking.gay/static](https://llsifas.imsofucking.gay/static).
You can get the files in `static/2d61e7b4e89961c7` for GL files or `static/b66ec2295e9a00aa` for JP files.
### Self hosted CDN
If you don't want to use the online CDN, you can download the data and host it yourself.
The data is around 20GB for both GL and JP server (around 40GB for both).
One way to get them is from [archive.org](https://archive.org/details/ll-sifas-cdn-data). The direct downloading speed is not that great, so be prepared to leave your machine on for a very long time. If you don't want that, download using the `.torrent`, it would be much appreciated if you also host the files once downloaded. Do note that there are risks associated with torrenting, but that topic will not be discussed here.
Another way to get them is from extracting the downloaded game files or download the files yourself from the online CDN.
You can also try to extract the relevant files from a client where you have the file downloaded. To extract the files, use [this youtube tutorial](https://youtu.be/j4oh3qrCrfw), or any other methods you know.

View file

@ -3,9 +3,17 @@ site_url: https://ll.hax.sif.moe
nav: nav:
- Home: index.md - Home: index.md
- Puchiguru: pugu/README.md - Puchiguru: pugu/README.md
- SIF: sif/README.md - SIF:
- SIF - Introduction: sif/README.md
- Private (self hostable) servers: sif/private-servers.md
- Patching the apk: sif/apk-patching.md
- Patching the ipa: sif/ipa-patching.md
- SIFAC: sifac/README.md - SIFAC: sifac/README.md
- SIFAS: sifas/README.md - SIFAS:
- SIFAS - Introduction: sifas/README.md
- Private (self hostable) servers: sifas/private-server.md
- Easy install: sifas/easy-install.md
- Patching the apk: sifas/apk-patching.md
- SIF2: sif2/README.md - SIF2: sif2/README.md
- About: about.md - About: about.md
theme: theme:
@ -26,17 +34,6 @@ theme:
toggle: toggle:
icon: material/brightness-4 icon: material/brightness-4
name: Switch to light mode name: Switch to light mode
extra:
alternate:
- name: English
link: /en/
lang: en
- name: 日本語
link: /ja/
lang: ja
- name: 中国人
link: /zh_CN/
lang: zh_CN
markdown_extensions: markdown_extensions:
- toc: - toc:
permalink: true permalink: true