Skip to content

Commit 8260198

Browse files
committed
Release GUI version 1.2.4
1 parent 5a1c4e0 commit 8260198

39 files changed

+674
-515
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,6 @@ bin/
3939
.vscode/
4040

4141
### Mac OS ###
42-
.DS_Store
42+
.DS_Store
43+
44+
/wix311

.idea/artifacts/nmmp_jvm.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ART/Screenshot.png

346 KB
Loading

README.md

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,59 @@
33
## Original REPO:
44
https://github.com/maoabc/nmmp
55

6+
# Screenshots
7+
![Main](/ART/Screenshot.png)
8+
69
## Add it in your root build.gradle at the end of repositories:
710
```groovy
8-
allprojects {
9-
repositories {
10-
//...
11-
maven { url 'https://jitpack.io' }
12-
}
11+
allprojects {
12+
repositories {
13+
maven { url 'https://jitpack.io' }
1314
}
15+
}
1416
```
1517

16-
## Add the dependency
18+
## Add the dependency:
1719
```groovy
18-
dependencies {
19-
implementation 'com.github.TimScriptov:nmmp:Tag'
20-
}
20+
dependencies {
21+
implementation("com.github.TimScriptov:nmmp:Tag")
22+
implementation("com.github.TimScriptov:preferences:Tag")
23+
}
24+
```
25+
26+
## Init preferences:
27+
```kotlin
28+
Preferences(File("path"), "name.json").init()
2129
```
2230

23-
## Convert byte-code to native
31+
## Environment path:
2432
```kotlin
25-
Nmmp(File("path/in.apk"), File("path/out.apk"), File("path/rules.txt"), File("path/mapping.txt"), null/*ApkLogger*/).obfuscate()
33+
Prefs.setSdkPath("path") // ANDROID_SDK_HOME
34+
Prefs.setCmakePath("path") // CMAKE_PATH
35+
Prefs.setNdkPath("path") // ANDROID_NDK_HOME
2636
```
2737

28-
```java
29-
new Nmmp(new File("path/in.apk"), new File("path/out.apk"), new File("path/rules.txt"), new File("path/mapping.txt"), null/*ApkLogger*/).obfuscate();
30-
```
38+
## Change lib name and class name:
39+
```kotlin
40+
Prefs.setRegisterNativesClassName("com/nmmedit/protect/NativeUtil")
41+
Prefs.setVmName("nmmvm")
42+
Prefs.setNmmpName("nmmp")
43+
```
44+
45+
## Convert byte-code to native:
46+
```kotlin
47+
val input = File("input.apk")
48+
val output = File("output.apk")
49+
val rules = File("rules.txt")
50+
val simpleRules = SimpleRules().apply {
51+
parse(InputStreamReader(FileInputStream(rules), StandardCharsets.UTF_8))
52+
}
53+
val filterConfig = SimpleConvertConfig(BasicKeepConfig(), simpleRules)
54+
ApkProtect.Builder(ApkFolders(input, output)).apply {
55+
setInstructionRewriter(RandomInstructionRewriter())
56+
setApkVerifyCodeGenerator(null)
57+
setFilter(filterConfig)
58+
setLogger(null)
59+
setClassAnalyzer(ClassAnalyzer())
60+
}.build().run()
61+
```

build.gradle.kts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1+
import org.jetbrains.compose.ExperimentalComposeLibrary
12
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
23

34
plugins {
45
kotlin("multiplatform")
56
id("org.jetbrains.compose")
67
}
78

8-
group = "com.mcal"
9-
version = "1.0-SNAPSHOT"
10-
119
repositories {
1210
google()
1311
mavenCentral()
1412
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
15-
maven { url = uri("https://www.jitpack.io" ) }
13+
maven { url = uri("https://www.jitpack.io") }
1614
}
1715

1816
kotlin {
@@ -24,10 +22,12 @@ kotlin {
2422
val jvmMain by getting {
2523
dependencies {
2624
implementation(compose.desktop.currentOs)
27-
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
25+
@OptIn(ExperimentalComposeLibrary::class)
2826
implementation(compose.material3)
2927

3028
implementation(project(":library"))
29+
30+
implementation("com.github.TimScriptov:preferences:1.0.1")
3131
}
3232
}
3333
val jvmTest by getting
@@ -40,7 +40,11 @@ compose.desktop {
4040
nativeDistributions {
4141
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
4242
packageName = "nmmp"
43-
packageVersion = "1.0.0"
43+
packageVersion = "1.2.4"
44+
description = "Android app protector"
45+
copyright = "© 2023 timscriptov."
46+
vendor = "timscriptov"
4447
}
48+
jvmArgs("-Djdk.util.zip.disableZip64ExtraFieldValidation=true")
4549
}
4650
}

library/build.gradle.kts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ repositories {
1212

1313
dependencies {
1414
implementation("com.github.TimScriptov:apkparser:1.2.4")
15-
implementation("com.github.TimScriptov:preferences:1.0.1")// {
16-
//exclude(module = "kotlinx-serialization-core-jvm")
17-
//exclude(module = "kotlinx-serialization-json-jvm")
18-
//}
15+
implementation("com.github.TimScriptov:preferences:1.0.1")
1916
implementation("com.android.tools.smali:smali-dexlib2:3.0.3")
2017
implementation("org.jetbrains:annotations:24.0.1")
2118
implementation("com.google.guava:guava:31.1-jre")
@@ -41,7 +38,7 @@ publishing {
4138
register<MavenPublication>("release") {
4239
groupId = "com.mcal"
4340
artifactId = "nmmp"
44-
version = "1.2.3"
41+
version = "1.2.4"
4542

4643
afterEvaluate {
4744
from(components["java"])

library/src/main/java/com/mcal/nmmp/Nmmp.kt

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)