Skip to content

Commit

Permalink
v15.2
Browse files Browse the repository at this point in the history
  • Loading branch information
chiteroman committed Jan 18, 2024
1 parent 931fd3d commit da8e611
Show file tree
Hide file tree
Showing 292 changed files with 26,678 additions and 432 deletions.
1 change: 1 addition & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 20 additions & 7 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,16 @@ android {
versionName = "v15.2"

externalNativeBuild {
ndk {
jobs = Runtime.getRuntime().availableProcessors()
cmake {
arguments += "-DANDROID_STL=none"
arguments += "-DCMAKE_BUILD_TYPE=MinSizeRel"
arguments += "-DPlugin.Android.BionicLinkerUtil=ON"

cppFlags += "-std=c++20"
cppFlags += "-fno-exceptions"
cppFlags += "-fno-rtti"
cppFlags += "-fvisibility=hidden"
cppFlags += "-fvisibility-inlines-hidden"
}
}
}
Expand All @@ -33,7 +41,9 @@ android {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
}
}

Expand All @@ -43,8 +53,9 @@ android {
}

externalNativeBuild {
ndkBuild {
path = file("src/main/cpp/Android.mk")
cmake {
path = file("src/main/cpp/CMakeLists.txt")
version = "3.22.1"
}
}
}
Expand All @@ -71,8 +82,10 @@ tasks.register("copyFiles") {

doLast {
val moduleFolder = project.rootDir.resolve("module")
val dexFile = project.layout.buildDirectory.get().asFile.resolve("intermediates/dex/release/minifyReleaseWithR8/classes.dex")
val soDir = project.layout.buildDirectory.get().asFile.resolve("intermediates/stripped_native_libs/release/out/lib")
val dexFile =
project.layout.buildDirectory.get().asFile.resolve("intermediates/dex/release/minifyReleaseWithR8/classes.dex")
val soDir =
project.layout.buildDirectory.get().asFile.resolve("intermediates/stripped_native_libs/release/out/lib")

dexFile.copyTo(moduleFolder.resolve("classes.dex"), overwrite = true)

Expand Down
4 changes: 1 addition & 3 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
-keep class es.chiteroman.playintegrityfix.EntryPoint {public <methods>;}
-keep class es.chiteroman.playintegrityfix.CustomProvider
-keep class es.chiteroman.playintegrityfix.CustomKeyStoreSpi
-keep class es.chiteroman.playintegrityfix.EntryPoint {public <methods>;}
16 changes: 0 additions & 16 deletions app/src/main/cpp/Android.mk

This file was deleted.

6 changes: 0 additions & 6 deletions app/src/main/cpp/Application.mk

This file was deleted.

33 changes: 33 additions & 0 deletions app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.22.1)

project("playintegrityfix")

include_directories(${CMAKE_SOURCE_DIR}/libcxx/include)

link_libraries(${CMAKE_SOURCE_DIR}/libcxx/${CMAKE_ANDROID_ARCH_ABI}/libcxx.a)

add_library(${CMAKE_PROJECT_NAME} SHARED
main.cpp)

if (NOT TARGET dobby)
set(DOBBY_DIR ${CMAKE_SOURCE_DIR}/Dobby)
macro(SET_OPTION option value)
set(${option} ${value} CACHE INTERNAL "" FORCE)
endmacro()
SET_OPTION(DOBBY_DEBUG OFF)
SET_OPTION(DOBBY_GENERATE_SHARED OFF)
SET_OPTION(Plugin.Android.BionicLinkerUtil ON)
add_subdirectory(${DOBBY_DIR} dobby)
get_property(DOBBY_INCLUDE_DIRECTORIES
TARGET dobby
PROPERTY INCLUDE_DIRECTORIES)
include_directories(
.
${DOBBY_INCLUDE_DIRECTORIES}
$<TARGET_PROPERTY:dobby,INCLUDE_DIRECTORIES>
)
endif ()

target_link_libraries(${CMAKE_PROJECT_NAME}
log
dobby)
18 changes: 18 additions & 0 deletions app/src/main/cpp/Dobby/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
BasedOnStyle: LLVM

IndentWidth: 2
TabWidth: 2
UseTab: Never
ColumnLimit: 120

FixNamespaceComments: true

# default is false
#AlignConsecutiveMacros: true
#AlignConsecutiveAssignments: true
#AlignConsecutiveDeclarations: true

# default is true
ReflowComments: false
SortIncludes : false
AllowShortFunctionsOnASingleLine: false
114 changes: 114 additions & 0 deletions app/src/main/cpp/Dobby/.github/workflows/Builder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Builder

on:
push:
branches:
- master

env:
CMAKE_VERSION: 3.20.2
LLVM_VERSION: 14.0.0
NDK_VERSION: r25b

jobs:
delete_latest_release:
runs-on: ubuntu-latest
steps:
- name: checkout master
uses: actions/checkout@master

- name: delete latest release
uses: dev-drprasad/[email protected]
with:
delete_release: true
tag_name: latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

linux_and_android:
runs-on: ubuntu-latest
needs: delete_latest_release
steps:
- name: checkout master
uses: actions/checkout@master

- name: init linux cross compile env
run: |
sh scripts/setup_linux_cross_compile.sh
mkdir -p artifact
shell: bash

- name: compile linux
run: |
python3 scripts/platform_builder.py --platform=linux --arch=all --cmake_dir=$HOME/opt/cmake-$CMAKE_VERSION --llvm_dir=$HOME/opt/llvm-$LLVM_VERSION
cp include/dobby.h build/linux
tar -zcvf build/dobby-linux-all.tar.gz build/linux
cp build/dobby-linux-all.tar.gz artifact/
shell: bash

- name: compile android
run: |
python3 scripts/platform_builder.py --platform=android --arch=all --cmake_dir=$HOME/opt/cmake-$CMAKE_VERSION --llvm_dir=$HOME/opt/llvm-$LLVM_VERSION --android_ndk_dir=$HOME/opt/ndk-$NDK_VERSION
cp include/dobby.h build/android
tar -zcvf build/dobby-android-all.tar.gz build/android
cp build/dobby-android-all.tar.gz artifact/
shell: bash

- name: print output
run: |
ls -lha .
- name: update release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: latest
body: "a lightweight, multi-platform, multi-architecture exploit hook framework"
artifacts: "build/dobby-linux-all.tar.gz,build/dobby-android-all.tar.gz"
allowUpdates: true
replacesArtifacts: true

macos_and_iphoneos:
runs-on: macos-latest
needs: delete_latest_release
steps:
- name: checkout dev
uses: actions/checkout@master

- name: init macos compile env
run: |
sh scripts/setup_macos_cross_compile.sh
mkdir -p artifact
shell: bash

- name: compile macos
run: |
python3 scripts/platform_builder.py --platform=macos --arch=all --cmake_dir=$HOME/opt/cmake-$CMAKE_VERSION/CMake.app/Contents
cp include/dobby.h build/macos
tar -zcvf build/dobby-macos-all.tar.gz build/macos
cp build/dobby-macos-all.tar.gz artifact/
shell: bash

- name: compile iphoneos
run: |
python3 scripts/platform_builder.py --platform=iphoneos --arch=all --cmake_dir=$HOME/opt/cmake-$CMAKE_VERSION/CMake.app/Contents
cp include/dobby.h build/iphoneos
tar -zcvf build/dobby-iphoneos-all.tar.gz build/iphoneos
cp build/dobby-iphoneos-all.tar.gz artifact/
shell: bash

- name: print output
run: |
ls -lha .
- name: update release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: latest
body: "a lightweight, multi-platform, multi-architecture exploit hook framework"
artifacts: "build/dobby-macos-all.tar.gz,build/dobby-iphoneos-all.tar.gz"
allowUpdates: true
replacesArtifacts: true
80 changes: 80 additions & 0 deletions app/src/main/cpp/Dobby/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
.DS_Store
.idea/
*-build*/
build-output/

CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Prefab
/prefab/**/*.a
/prefab/**/*.h
/AndroidManifest.xml
Loading

0 comments on commit da8e611

Please sign in to comment.