Skip to content
This repository was archived by the owner on Oct 26, 2021. It is now read-only.

Commit b1d9379

Browse files
committed
хохлы
1 parent be85289 commit b1d9379

13 files changed

+1336
-0
lines changed

Build.bat

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@echo off
2+
cls
3+
title ParturIH314
4+
setlocal EnableDelayedExpansion
5+
for /F %%a in ('echo prompt $E ^| cmd') do (
6+
set "ESC=%%a"
7+
)
8+
for /f %%a in (params.txt) do set checkContent=%%a
9+
if not !checkContent! gtr 0 (
10+
set /p "np=Set your ndk path: "
11+
set /p "pp=Set your project path: "
12+
) else (
13+
for /f "delims=" %%x in (params.txt) do set pp=%%x
14+
set /p np=<params.txt
15+
echo ndk path: !np!
16+
echo project path: !pp!
17+
)
18+
echo.
19+
call ndk-build NDK_PROJECT_PATH=%pp%\x32 NDK_APPLICATION_MK=%pp%\x32\jni\Application.mk MAIN_LOCAL_PATH="%pp%\x32\jni"
20+
if "%errorlevel%" == "0" (echo %ESC%[92mBuild successful%ESC%[0m) else (echo %ESC%[91mBuild failed%ESC%[0m)
21+
xcopy /y "%pp%\x32\libs\armeabi" "%pp%\out\armeabi\"*
22+
echo.

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# cos8o give me hyperdash
2+
---
3+
4+
## Installation
5+
1. Download this github files and unzip it
6+
2. Download [Android NDK 16b](https://developer.android.com/ndk/downloads/older_releases)
7+
8+
## Compiling
9+
```sh
10+
./build.bat
11+
```
12+
13+
## Loading the libbt1p0.so
14+
1. Open GeometryDash/smali/com/robtopx/geometryjump/geometryjump.smali
15+
2. Add this to the first static constructor method
16+
```
17+
.line 70
18+
const-string v0, "bt1p0"
19+
invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
20+
```
21+
22+
---
23+
## Special thanks
24+
- FlairyDash and кафiф
25+
26+
---
27+
### Join [Galaxium](https://discord.gg/ZV2zDu6JUX)

params.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ndk path (%NDK_ROOT%)
2+
project path

x32/jni/Android.mk

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
include $(CLEAR_VARS)
2+
$(warning "${MAIN_LOCAL_PATH}")
3+
4+
LOCAL_PATH = .
5+
LOCAL_MODULE := game
6+
LOCAL_EXPORT_C_INCLUDES := $(MAIN_LOCAL_PATH) \
7+
$(MAIN_LOCAL_PATH)/libs/cocos2dx
8+
LOCAL_SRC_FILES := ${MAIN_LOCAL_PATH}/include/libgame.so
9+
include $(PREBUILT_SHARED_LIBRARY)
10+
11+
LOCAL_PATH := ${MAIN_LOCAL_PATH}
12+
include $(CLEAR_VARS)
13+
LOCAL_MODULE := bt1p0
14+
15+
LOCAL_CPPFLAGS := -std=c++14
16+
LOCAL_CFLAGS := -Wno-error=format-security -fpermissive -Wc++14-extensions -Wno-absolute-value
17+
LOCAL_CFLAGS += -fno-rtti -fno-exceptions
18+
19+
LOCAL_C_INCLUDES += $(MAIN_LOCAL_PATH) \
20+
$(MAIN_LOCAL_PATH)/libs/cocos2dx
21+
22+
LOCAL_SRC_FILES := src/main.cpp \
23+
libs/hook/inlineHook.c \
24+
libs/hook/relocate.c \
25+
26+
LOCAL_LDLIBS := -llog
27+
LOCAL_SHARED_LIBRARIES = game
28+
include $(BUILD_SHARED_LIBRARY)

x32/jni/Application.mk

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
APP_ABI := armeabi
2+
APP_OPTIM := release
3+
APP_PLATFORM := android-27
4+
APP_STL := system
5+
APP_STL := gnustl_static
6+
APP_THIN_ARCHIVE := true
7+
APP_PIE:= true
8+
9+
10+
ifneq ($(APP_OPTIM), debug)
11+
$(info APP_OPTIM is $(APP_OPTIM) ...)
12+
APP_LDFLAGS += -Wl,--strip-all
13+
APP_CFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
14+
APP_CFLAGS += -g0 -O3 -fomit-frame-pointer -ffunction-sections -fdata-sections
15+
endif

x32/jni/include/Utils.h

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#ifndef UTILS_H
2+
#define UTILS_H
3+
4+
#include <jni.h>
5+
#include <unistd.h>
6+
7+
8+
typedef unsigned long DWORD;
9+
10+
11+
DWORD libBase = 0;
12+
13+
/**************************************
14+
ENTER THE GAME's LIB NAME HERE!
15+
***************************************/
16+
const char* libName = "libgame.so";
17+
18+
19+
DWORD get_libBase(const char* libName);
20+
DWORD getRealOffset(DWORD address);
21+
22+
DWORD get_libBase(const char* libName) {
23+
FILE *fp;
24+
DWORD addr = 0;
25+
char filename[32], buffer[1024];
26+
snprintf(filename, sizeof(filename), "/proc/%d/maps", getpid());
27+
fp = fopen(filename, "rt");
28+
if (fp != NULL) {
29+
while (fgets(buffer, sizeof(buffer), fp)) {
30+
if (strstr(buffer, libName)) {
31+
addr = (uintptr_t) strtoul(buffer, NULL, 16);
32+
break;
33+
}
34+
}
35+
fclose(fp);
36+
}
37+
return addr;
38+
}
39+
40+
DWORD getRealOffset(DWORD address) {
41+
if (libBase == 0) {
42+
libBase = get_libBase(libName);
43+
}
44+
return (libBase + address);
45+
}
46+
47+
48+
#endif

x32/jni/include/libgame.so

3.84 MB
Binary file not shown.

x32/jni/libs/cocos2dx/cocos2d.h

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#ifndef COCOS2D_H
2+
#define COCOS2D_H
3+
4+
// smaller than original cocos headers :ok_cool:
5+
// note: tested only CCSprite::createWithSpriteFrameName, CCMenuItemSprite::create, node->setPositionX, node->setPositionY, node->addChild, node->setScale and CCMenu::create
6+
7+
namespace cocos2d {
8+
class CCPoint {
9+
public:
10+
float x;
11+
float y;
12+
CCPoint();
13+
CCPoint(float, float);
14+
};
15+
class CCSize {
16+
public:
17+
float width;
18+
float height;
19+
CCSize();
20+
CCSize(float, float);
21+
};
22+
class CCObject {
23+
public:
24+
CCObject(void);
25+
};
26+
typedef void (CCObject::*SEL_MenuHandler)(CCObject*);
27+
#define menu_selector(_SELECTOR) (SEL_MenuHandler)(&_SELECTOR)
28+
class CCNode : public CCObject {
29+
public:
30+
CCNode();
31+
void setScale(float);
32+
void setScaleX(float);
33+
void setScaleY(float);
34+
void getScale(float);
35+
void setPositionX(float);
36+
void setPositionY(float);
37+
void setPosition(cocos2d::CCPoint const&);
38+
cocos2d::CCPoint getPosition();
39+
float getPositionY();
40+
float getPositionX();
41+
bool isVisible();
42+
void setVisible();
43+
void getTag();
44+
void setTag(int);
45+
void addChild(cocos2d::CCNode*);
46+
void addChild(cocos2d::CCNode*, int);
47+
void removeChild(cocos2d::CCNode*, bool);
48+
void addChild(cocos2d::CCNode*, int, int);
49+
void setContentSize(cocos2d::CCSize const&);
50+
cocos2d::CCSize getContentSize();
51+
static CCNode* create();
52+
};
53+
class CCLayer : public cocos2d::CCNode {
54+
public:
55+
CCLayer();
56+
static CCLayer* create();
57+
void init();
58+
};
59+
class CCScene : public cocos2d::CCNode {
60+
public:
61+
CCScene();
62+
static CCScene* create();
63+
void init();
64+
};
65+
class CCSprite : public cocos2d::CCNode {
66+
public:
67+
CCSprite();
68+
static CCSprite* create(const char*);
69+
void init();
70+
static CCSprite* createWithSpriteFrameName(const char*);
71+
};
72+
class CCMenuItemSprite : public CCSprite {
73+
public:
74+
CCMenuItemSprite();
75+
static CCMenuItemSprite* create(cocos2d::CCNode*, cocos2d::CCNode*, cocos2d::CCObject*, SEL_MenuHandler);
76+
};
77+
class CCDirector {
78+
public:
79+
CCDirector();
80+
static CCDirector* sharedDirector();
81+
void pushScene(CCScene*);
82+
void popScene();
83+
};
84+
class CCMenu : public cocos2d::CCNode {
85+
public:
86+
CCMenu();
87+
static CCMenu* create();
88+
};
89+
}
90+
91+
#endif

0 commit comments

Comments
 (0)