-
Notifications
You must be signed in to change notification settings - Fork 11
/
LoadingProcess.c
94 lines (80 loc) · 2.94 KB
/
LoadingProcess.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#include <jni.h>
#include <LoadingProcess.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
// Make sure to fill in those values if you enable anti piracy
char APK_SIGNATURE_PRODUCTION[] = ""; // Signature string value from release key
char BASE_64_LICENSE_KEY[] = ""; // Base64 license key from Google Play Console
// You can change those values if you enable anti piracy
jboolean ENABLE_APP_BLACKLIST_CHECK = JNI_FALSE; // You can see the blacklisted app in Constants.kt line 31
jboolean ENABLE_INTERNET_CHECK = JNI_FALSE;
jboolean REQUIRE_INSTALL_FROM_PLAY_STORE = JNI_FALSE;
jboolean REQUIRE_INSTALL_FROM_AMAZON_STORE = JNI_FALSE;
// Change this value to JNI_FALSE to block users from using your theme with third party substratum build
jboolean ALLOW_THIRD_PARTY_SUBSTRATUM_BUILD = JNI_TRUE;
/*
* APK Signature Production
*/
JNIEXPORT jstring JNICALL
Java_com_ohayoubaka_yoru_SubstratumLauncher_getAPKSignatureProduction(JNIEnv *env) {
return (*env)->NewStringUTF(env, APK_SIGNATURE_PRODUCTION);
}
/*
* Base 64 License Key
*/
JNIEXPORT jstring JNICALL
Java_com_ohayoubaka_yoru_SubstratumLauncher_getBase64Key(JNIEnv *env) {
return (*env)->NewStringUTF(env, BASE_64_LICENSE_KEY);
}
/*
* Enforce Internet Check
*/
JNIEXPORT jboolean JNICALL
Java_com_ohayoubaka_yoru_SubstratumLauncher_getInternetCheck(JNIEnv *env) {
return ENABLE_INTERNET_CHECK;
}
/*
* Enforce Google Play Install
*/
JNIEXPORT jboolean JNICALL
Java_com_ohayoubaka_yoru_SubstratumLauncher_getGooglePlayRequirement(JNIEnv *env) {
return REQUIRE_INSTALL_FROM_PLAY_STORE;
}
/*
* Enforce Amazon App Store Install
*/
JNIEXPORT jboolean JNICALL
Java_com_ohayoubaka_yoru_SubstratumLauncher_getAmazonAppStoreRequirement(JNIEnv *env) {
return REQUIRE_INSTALL_FROM_AMAZON_STORE;
}
/*
* Enable check for Blacklisted APKs
*/
JNIEXPORT jboolean JNICALL
Java_com_ohayoubaka_yoru_SubstratumLauncher_getBlacklistedApplications(JNIEnv *env) {
return ENABLE_APP_BLACKLIST_CHECK;
}
/*
* Allow Third Party Substratum Builds
*
* WARNING: Having this enabled may or may not cause a bunch of issues due to the system not built
* and distributed by an official team member. You will take charge of handling bug reports
* if there are specific bugs unreproducible on the main stream of APKs.
*/
JNIEXPORT jboolean JNICALL
Java_com_ohayoubaka_yoru_SubstratumLauncher_allowThirdPartySubstratumBuilds(JNIEnv *env) {
return ALLOW_THIRD_PARTY_SUBSTRATUM_BUILD;
}
JNIEXPORT jbyteArray JNICALL
Java_com_ohayoubaka_yoru_SubstratumLauncher_getDecryptionKey(JNIEnv *env) {
jbyteArray ret = (*env)->NewByteArray(env, 16);
(*env)->SetByteArrayRegion(env, ret, 0, 16, DECRYPTION_KEY);
return ret;
}
JNIEXPORT jbyteArray JNICALL
Java_com_ohayoubaka_yoru_SubstratumLauncher_getIVKey(JNIEnv *env) {
jbyteArray ret = (*env)->NewByteArray(env, 16);
(*env)->SetByteArrayRegion(env, ret, 0, 16, IV_KEY);
return ret;
}
#pragma clang diagnostic pop