Skip to content

Commit 766cca1

Browse files
committed
Supported 1.20.50 and 1.20.60 and added 32-bit ARM support
1 parent 30bc401 commit 766cca1

File tree

8 files changed

+57498
-561
lines changed

8 files changed

+57498
-561
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: nttld/setup-ndk@v1
2525
id: setup-ndk
2626
with:
27-
ndk-version: r26
27+
ndk-version: r25c
2828
add-to-path: false
2929

3030
- name: Build
@@ -37,11 +37,11 @@ jobs:
3737
with:
3838
tag_name: ${{ github.run_number }}
3939
name: Release ${{ github.run_number }}
40-
body: Support arm64 1.20.32.03 and 1.20.50.21
40+
body: Support 1.20.51.01 and 1.20.60.25 preview
4141
draft: false
4242
prerelease: false
4343
files: |
44-
./build/libmaterialbinloader-1.20.32.03-arm64.so
45-
./build/libmaterialbinloader-1.20.50.21-arm64.so
44+
./build/libmaterialbinloader-arm.so
45+
./build/libmaterialbinloader-arm64.so
4646
env:
4747
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.bat

Lines changed: 7 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,12 @@
11
@echo off
2-
:: usage:
3-
:: .\build.bat
4-
:: .\bulid.bat -v 1.20.40.22 1.20.50.21
52

6-
set CLANG_OPTS_ARM64=--target=aarch64-linux-android21 -shared -s -O2 -fPIC -Wno-void-pointer-to-enum-cast -DANDROID -ffunction-sections -fdata-sections -I./frida/arm64/include -L./frida/arm64/lib -lfrida-gum -llog -ldl -lm -pthread -Wl,--gc-sections,-z,noexecstack,-z,relro,-z,now
7-
8-
:: arm64-v8a
9-
:: 1.19.40.02 also compatible with 1.19.41.01
10-
set VERSIONS_ARM64=^
11-
1.19.20.02^
12-
1.19.21.01^
13-
1.19.40.02^
14-
1.19.51.01^
15-
1.19.60.03^
16-
1.19.62.01^
17-
1.19.63.01^
18-
1.19.70.22^
19-
1.19.70.02^
20-
1.19.71.02^
21-
1.19.73.02^
22-
1.19.80.02^
23-
1.19.81.01^
24-
1.19.83.01^
25-
1.20.0.20^
26-
1.20.0.01^
27-
1.20.1.02^
28-
1.20.10.01^
29-
1.20.12.01^
30-
1.20.30.20^
31-
1.20.30.21^
32-
1.20.15.01^
33-
1.20.30.22^
34-
1.20.30.25^
35-
1.20.40.20^
36-
1.20.30.02^
37-
1.20.40.22^
38-
1.20.31.01^
39-
1.20.32.03^
40-
1.20.40.24^
41-
1.20.50.20^
42-
1.20.50.21
43-
:: version list end
44-
45-
set ARG_MODE=
46-
:loop_args
47-
if "%1" == "" goto :end_args
48-
if "%1" == "-v" (
49-
set VERSIONS_ARM64=
50-
set ARG_MODE=%1
51-
goto :next_arg
52-
)
53-
if "%ARG_MODE%" == "-v" (
54-
set VERSIONS_ARM64=%VERSIONS_ARM64% %1
55-
)
56-
:next_arg
57-
shift
58-
goto :loop_args
59-
:end_args
3+
set CLANG_OPTS_ARM=--target=armv7a-linux-androideabi21 -shared -s -O2 -fPIC -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -ffunction-sections -fdata-sections -mthumb -I./frida/arm/include -L./frida/arm/lib -lfrida-gum -llog -ldl -lm -pthread -Wl,--fix-cortex-a8,-z,relro,-z,noexecstack,--gc-sections
4+
set CLANG_OPTS_ARM64=--target=aarch64-linux-android21 -shared -s -O2 -fPIC -DANDROID -ffunction-sections -fdata-sections -I./frida/arm64/include -L./frida/arm64/lib -lfrida-gum -llog -ldl -lm -pthread -Wl,--gc-sections,-z,noexecstack,-z,relro,-z,now
605

616
if not exist "build" md "build"
627

63-
setlocal enabledelayedexpansion
64-
for %%a in (%VERSIONS_ARM64%) do (
65-
set DFLAG=%%a
66-
echo libmaterialbinloader-%%a-arm64.so
67-
clang.exe %CLANG_OPTS_ARM64% -DV!DFLAG:.=_! ./src/*.c -o ./build/libmaterialbinloader-%%a-arm64.so
68-
)
8+
:: armeabi-v7a
9+
clang++.exe %CLANG_OPTS_ARM% ./src/*.cpp -o ./build/libmaterialbinloader-arm.so
10+
11+
:: arm64-v8a
12+
clang++.exe %CLANG_OPTS_ARM64% ./src/*.cpp -o ./build/libmaterialbinloader-arm64.so

build.sh

Lines changed: 7 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,12 @@
11
#!/bin/bash
22

3-
# usage:
4-
# ./build.sh
5-
# ./build.sh -v 1.20.40.22 1.20.50.21
6-
7-
CLANG_OPTS_ARM64="-target aarch64-linux-android21 -shared -s -O2 -fPIC -Wno-void-pointer-to-enum-cast -DANDROID -ffunction-sections -fdata-sections -I./frida/arm64/include -L./frida/arm64/lib -lfrida-gum -llog -ldl -lm -pthread -Wl,--gc-sections,-z,noexecstack,-z,relro,-z,now"
8-
9-
# arm64-v8a
10-
VERSIONS_ARM64=(
11-
"1.19.20.02"
12-
"1.19.21.01"
13-
"1.19.40.02" # also compatible with 1.19.41.01
14-
"1.19.51.01"
15-
"1.19.60.03"
16-
"1.19.62.01"
17-
"1.19.63.01"
18-
"1.19.70.22"
19-
"1.19.70.02"
20-
"1.19.71.02"
21-
"1.19.73.02"
22-
"1.19.80.02"
23-
"1.19.81.01"
24-
"1.19.83.01"
25-
"1.20.0.20"
26-
"1.20.0.01"
27-
"1.20.1.02"
28-
"1.20.10.01"
29-
"1.20.12.01"
30-
"1.20.30.20"
31-
"1.20.30.21"
32-
"1.20.15.01"
33-
"1.20.30.22"
34-
"1.20.30.25"
35-
"1.20.40.20"
36-
"1.20.30.02"
37-
"1.20.40.22"
38-
"1.20.31.01"
39-
"1.20.32.03"
40-
"1.20.40.24"
41-
"1.20.50.20"
42-
"1.20.50.21"
43-
)
44-
45-
VERSIONS_ARM64=${VERSIONS_ARM64[@]}
46-
47-
ARG_MODE=""
48-
for t in "$@"; do
49-
if [ "$t" == "-v" ]; then
50-
ARG_MODE="v"
51-
VERSIONS_ARM64=""
52-
elif [ "$ARG_MODE" == "v" ]; then
53-
VERSIONS_ARM64+="$t"
54-
fi
55-
shift
56-
done
3+
CLANG_OPTS_ARM="--target=armv7a-linux-androideabi21 -shared -s -O2 -fPIC -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -ffunction-sections -fdata-sections -mthumb -I./frida/arm/include -L./frida/arm/lib -lfrida-gum -llog -ldl -lm -pthread -Wl,--fix-cortex-a8,-z,relro,-z,noexecstack,--gc-sections"
4+
CLANG_OPTS_ARM64="--target=aarch64-linux-android21 -shared -s -O2 -fPIC -DANDROID -ffunction-sections -fdata-sections -I./frida/arm64/include -L./frida/arm64/lib -lfrida-gum -llog -ldl -lm -pthread -Wl,--gc-sections,-z,noexecstack,-z,relro,-z,now"
575

586
mkdir -p build
597

60-
for v in $VERSIONS_ARM64; do
61-
echo "libmaterialbinloader-$v-arm64.so"
62-
DFLAG=${v//./_}
63-
$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/clang $CLANG_OPTS_ARM64 -DV$DFLAG ./src/*.c -o ./build/libmaterialbinloader-$v-arm64.so
64-
done
8+
# armeabi-v7a
9+
$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ $CLANG_OPTS_ARM ./src/*.cpp -o ./build/libmaterialbinloader-arm.so
10+
11+
# arm64-v8a
12+
$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ $CLANG_OPTS_ARM64 ./src/*.cpp -o ./build/libmaterialbinloader-arm64.so

0 commit comments

Comments
 (0)