steins-zapp/old_README.org

8.5 KiB
Raw Permalink Blame History

Steins;Zapp D-Mailer

Steins;Zapp D-Mailer, Steins;Zapp, or just S;Z, are a Steins;Gate inspired patches for WhatsApp made in SoulaMods WhatsApp Go (com.soula2). Join our Matrix space to receive S;Z updates, suggestion polls and pré-releases! 😁

Technical info

Repo content

  • dependencies/ - Steins;Zapp dependencies (softwares, scripts, images, etc.)
  • dev_builds/ - Development builds output
  • patches/ - com.soula2 patched files
  • steins-zapp/ - Steins;Zapp builds output
  • visual_identity/ - The entire S;Z visual identity (icons, wallpapers, project files). Collect and enjoy them 😉
  • builder.sh - Script to generate Steins;Zapp builds
  • CHANGELOG - Changes made in the actual Steins;Zapp release
  • dev_builder.sh - Script to help at development
  • dev_patches.org - Guide to find the files to patch
  • LICENSE - MIT License
  • README.org - Readme file with all important information about this project

Build guide

Software dependencies

  • Any terminal emulator with any shell
  • Java (developed with openjdk 17.0.3)
  • sed (should come by default with most *NIX os'es: BSD, Linux, Mac, etc.)
  • zip

Autobuild

  1. Open a terminal instance and enter on it on repo root folder (this one, that contains builder.sh)
  2. Check if builder.sh has execution permission (run ls -l). If hasn't, chmod +x builder.sh
  3. Run builder, with ./builder.sh

    The entire process can take more than 5 minutes. Make sure repo is up to date, to prevent errors

  4. If everything is OK, you're done!

Manual build

  1. If exists, delete source/ directory
  2. Run APKTool (it should be located at dependencies/) to decompile WhatsApp Go. Run

      java -jar ./dependencies/apktool_2.6.1.jar -q d ./dependencies/com.soula2_v0.22.6L.apk -o ./source
  3. Delete everything inside source/assets/, after that, delete WhatsApp bloats. Run

      rm -r ./source/assets/*
    
      ./dependencies/value_list.sh source
  4. Copy and replace everything inside patches/ into source/. To automate this process, run

      cp -rf ./patches/* ./source/
  5. Copy all light and dark theme files, to their respective directories. Run

      ./dependencies/light_theme.sh source
    
      ./dependencies/dark_theme.sh source
  6. Delete everything inside steins-zapp/. To automate this process, run

      rm -rf ./steins-zapp/*
  7. Create a copy of source/ directory called build/. To automate this process, run

      cp -r ./source ./build
  8. Copy last modified files. To automate this process, run

      declare -A symbols
      symbols[0]="0"
      symbols[1]="β"
      symbols[2]="α"
      symbols[3]="γ"
      symbols[4]="δ"
    
      divergence=VALUE
    
      ./dependencies/general.sh build ${divergence}

    Change VALUE to any number greater or equal to 0 and less or equal to 4.

  9. Change properly the package name to steinszapp${divergence}. To automate this process, run

      for apk_paths in $(grep -s -r -o "com\.soula2" ./build | cut -d ":" -f 1 | uniq); do sed -i "s/com\.soula2/com\.steinszapp${divergence}/g" ${apk_paths} > /dev/null; done
    
      for smali_paths in $(grep -s -r -o "Lcom\/soula2" ./build | cut -d ":" -f 1 | uniq); do sed -i "s/Lcom\/soula2/Lcom\/steinszapp${divergence}/g" ${smali_paths} > /dev/null; done
  10. Change wa_go_name and wa_go_version values in build/values-v1/strings.xml. Run

      release=NAME
    
      sed -i "s/<string name=\"wa_go_name\">Soula2<\/string>/<string name=\"wa_go_name\">${symbols[${divergence}]} Steins;Zapp ${release}<\/string>/g" ./build/res/values-v1/strings.xml > /dev/null
    
      sed -i "s/<string name=\"wa_go_version\">v0.22.6L<\/string>/<string name=\"wa_go_version\">${release}<\/string>/g" ./build/res/values-v1/strings.xml > /dev/null

    Change NAME to a name you want.

  11. Build, align and sign the APK. Run

      java -jar ./dependencies/apktool_2.6.1.jar -q b ./build -o build.apk
    
      ./dependencies/zipalign -p -f -v 4 build.apk ./steins-zapp/com.steinszapp${divergence}.apk > /dev/null
    
      java -jar ./dependencies/apksigner.jar sign --ks ./dependencies/key.keystore --ks-key-alias steins-zapp --ks-pass pass:elpsykongroo ./steins-zapp/com.steinszapp${divergence}.apk
  12. If everything gone correctly, your build is complete. To delete temp files, run

      rm -rf ./steins-zapp/com.steinszapp${divergence}.apk.idsig ./build.apk ./build > /dev/null

    Repeat steps 7 - 12 to build up to 5 Steins;Zapp's (you can build more, but you must have a basic shell scripting acknowledgment to change some variables and values with no errors).

Development tips

  • Check dev_patches.org to understand how S;Z patches are made
  • Backup files and instruction-sets BEFORE modifying them
  • Test patches using dev_builder.sh before copy modified files into patches/
  • Document the changes adding comments in the patches (search for Steins;Zapp in .smali and .xml files to do it like them)

Credits

This project wouldn't be possible without the help and collaboration of:

Made in FG Lab (aka Secret Vault)

~El Psy Kongroo