Skip to content

Commit 482a862

Browse files
author
Onerdna
committed
feat: added new weapons to the item database: Shadow Lord, Old King, Flavor of Demise
feat: various additions & changes to the item database, which includes: replacing xmas* traits with ny* traits, adding deceased to val17 items, adding descriptions & missing traits to items feat: changed app package name to com.onerdna.stalker feat: added +- buttons to a new enchantment dialog feat: switched from the soon-to-be-deprecated Shizuku.newProcess to a Binder user service feat: updated shizuku api to version 13.5 feat: removed the "Become Titan" button because it was revealing many game bugs, including invisible sprites, zero damage output, items disappearing from the inventory feat: new procedural initialization system with a new UI, designed to be less bug-prone fix: removed deprecated AssetManifest.json implementation chore: upgraded project dependencies chore: upgraded flutter version chore: updated README chore: bumped project version to 3.0.0 chore: updated defaultRecord.xml to version 2.41.9 chore: updated ndk version
1 parent 7cb6b4d commit 482a862

39 files changed

+3148
-2214
lines changed

.metadata

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668"
7+
revision: "nixpkgs000000000000000000000000000000000"
88
channel: "stable"
99

1010
project_type: app
@@ -13,26 +13,26 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
17-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
16+
create_revision: nixpkgs000000000000000000000000000000000
17+
base_revision: nixpkgs000000000000000000000000000000000
1818
- platform: android
19-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
20-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
19+
create_revision: nixpkgs000000000000000000000000000000000
20+
base_revision: nixpkgs000000000000000000000000000000000
2121
- platform: ios
22-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
23-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
22+
create_revision: nixpkgs000000000000000000000000000000000
23+
base_revision: nixpkgs000000000000000000000000000000000
2424
- platform: linux
25-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
26-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
25+
create_revision: nixpkgs000000000000000000000000000000000
26+
base_revision: nixpkgs000000000000000000000000000000000
2727
- platform: macos
28-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
29-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
28+
create_revision: nixpkgs000000000000000000000000000000000
29+
base_revision: nixpkgs000000000000000000000000000000000
3030
- platform: web
31-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
32-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
31+
create_revision: nixpkgs000000000000000000000000000000000
32+
base_revision: nixpkgs000000000000000000000000000000000
3333
- platform: windows
34-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
35-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
34+
create_revision: nixpkgs000000000000000000000000000000000
35+
base_revision: nixpkgs000000000000000000000000000000000
3636

3737
# User provided section
3838

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
**Stalker** is a android utility application designed to **view and optionally modify save files** for the mobile game **Shadow Fight 2**.
44

5-
> ⚠️ **Disclaimer:** Shadow Fight 2 is a trademark of **Nekki Limited**. This application is not affiliated with, endorsed by, or associated with Nekki in any way. Use of this application is at your own risk. You are solely responsible for ensuring your use complies with Nekki’s terms of service and any applicable laws.
5+
> **Disclaimer:** Shadow Fight 2 is a trademark of **Nekki Limited**. This application is not affiliated with, endorsed by, or associated with Nekki in any way. Use of this application is at your own risk. You are solely responsible for ensuring your use complies with Nekki’s terms of service and any applicable laws.
66
7-
## 🔍 What It Does
7+
## What It Does
88

99
Stalker allows users to inspect and optionally tweak various aspects of their Shadow Fight 2 game progress by interacting with local save files.
1010

11-
### 🔧 Features
11+
### Features
1212

1313
- **View and modify**:
1414
- Coins
@@ -25,18 +25,18 @@ Stalker allows users to inspect and optionally tweak various aspects of their Sh
2525

2626
> Modifying save files can impact gameplay and may violate the game’s terms of use. Use modification features at your own risk.
2727
28-
## How to install
28+
## How to install
2929
- Download and install the APK file from [releases](https://github.com/onerdna/stalker/releases) page
3030
- Install [Shizuku](https://shizuku.rikka.app/)
3131
- Start Shizuku service if it's not already running. There are great tutorials on the internet of doing so.
3232
- Launch the app, grant Shizuku permissions.
3333
- Proceed to the additional setup step. Before that, ensure that the game is fully closed. Minimize the app (do not fully close it!), open the game and wait until it fully loads. Then, close the game, go back to the app and tap "Reinitialize" button.
3434

35-
### Before using...
35+
### Before using...
3636
- Completely close the game before opening the app.
3737
- If you make any changes, you must tap the 'Save' button for them to take effect.
3838

39-
## FaQ
39+
## FaQ
4040
- **Will there ever be an IOS version?**
4141
- No.
4242
- **Why does the app use Shizuku?**
@@ -46,18 +46,17 @@ Stalker allows users to inspect and optionally tweak various aspects of their Sh
4646
- **What does the setup service actually do? I'm concerned about running high-privileged compiled binaries.**
4747
- The setup service’s only purpose is to tamper with your user ID inside the game’s process. Once it does that, it automatically closes — or after two minutes of inactivity. The user ID is just a random string unique to each device. It doesn’t contain any personal or device-identifiable information. I won’t share the exact method used to get the ID, or the source code for the service, because this is the only known working method. If it becomes public, the developers could easily patch it.
4848

49-
## 🔧 Troubleshooting
49+
## Troubleshooting
5050
- Tapping 'Reinitialize' after the 'Additional setup' step does nothing.
5151
1. Make sure that you are following the given instructions.
5252
2. For some devices, changing the 'Logger buffer size' in Developer Options from 256K to 8M might help.
5353
3. For Huawei and Honor devices, you need to enable logcat in the device settings. Search online for: 'enable logcat honor/huawei'
5454
4. If this does not help, report a bug [here](https://github.com/onerdna/stalker/issues/new?template=additional-setup-bug-report.md)
5555

5656

57-
### Special thanks to:
57+
### Special thanks to:
5858
- [**Shizuku**](https://shizuku.rikka.app/)
5959
- **ShadowFight2dojo community**
6060
- [Reddit](https://www.reddit.com/r/ShadowFight2dojo/)
61-
- [Discord](https://discord.gg/ThDBZztuJu)
6261
---
6362
## By downloading or using this software, you agree to the terms outlined in the [LICENSE](./LICENSE)

android/app/build.gradle

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ plugins {
55
}
66

77
android {
8-
namespace = "com.dojocommunity.stalker"
8+
namespace = "com.onerdna.stalker"
99
compileSdk = 36
10-
ndkVersion = "27.0.12077973"
10+
ndkVersion = "29.0.14206865"
1111

1212
compileOptions {
1313
sourceCompatibility = JavaVersion.VERSION_17
@@ -18,8 +18,14 @@ android {
1818
jvmTarget = JavaVersion.VERSION_17
1919
}
2020

21+
sourceSets {
22+
main {
23+
aidl.srcDirs = ['src/main/aidl']
24+
}
25+
}
26+
2127
defaultConfig {
22-
applicationId = "com.dojocommunity.stalker"
28+
applicationId = "com.onerdna.stalker"
2329
minSdk = 26
2430
targetSdk = flutter.targetSdkVersion
2531
versionCode = flutter.versionCode
@@ -41,7 +47,7 @@ flutter {
4147
source = "../.."
4248
}
4349
dependencies {
44-
def shizuku_version = "13.1.0"
50+
def shizuku_version = "13.1.5"
4551
implementation "dev.rikka.shizuku:api:$shizuku_version"
4652
implementation "dev.rikka.shizuku:provider:$shizuku_version"
4753
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.onerdna.stalker;
2+
3+
interface IBinderService {
4+
String runCommand(in String command);
5+
void destroy();
6+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
package com.onerdna.stalker;
2+
3+
import android.util.Log;
4+
5+
import androidx.annotation.Keep;
6+
7+
import java.io.BufferedReader;
8+
import java.io.InputStreamReader;
9+
10+
@Keep
11+
public class BinderService extends IBinderService.Stub {
12+
13+
@Keep
14+
public BinderService() {
15+
Log.i("BinderService", "Init called");
16+
}
17+
18+
@Keep
19+
@Override
20+
public String runCommand(String command) {
21+
StringBuilder outputBuilder = new StringBuilder();
22+
Process process = null;
23+
24+
try {
25+
process = Runtime.getRuntime().exec(new String[]{"sh", "-c", command});
26+
27+
// Read standard output
28+
BufferedReader input = new BufferedReader(new InputStreamReader(process.getInputStream()));
29+
String line;
30+
while ((line = input.readLine()) != null) {
31+
outputBuilder.append(line).append("\n");
32+
}
33+
34+
// Read error output
35+
BufferedReader error = new BufferedReader(new InputStreamReader(process.getErrorStream()));
36+
while ((line = error.readLine()) != null) {
37+
outputBuilder.append(line).append("\n");
38+
}
39+
40+
process.waitFor();
41+
} catch (Exception e) {
42+
outputBuilder.append("Error: ").append(e.getMessage());
43+
} finally {
44+
if (process != null) {
45+
process.destroy();
46+
}
47+
}
48+
49+
return outputBuilder.toString().trim();
50+
}
51+
52+
@Keep
53+
@Override
54+
public void destroy() {
55+
Log.d("BinderService", "Destroy called");
56+
}
57+
}

android/app/src/main/kotlin/com/dojocommunity/stalker/MainActivity.kt renamed to android/app/src/main/kotlin/com/onerdna/stalker/MainActivity.kt

Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1-
package com.dojocommunity.stalker
1+
package com.onerdna.stalker
22

3-
import android.annotation.SuppressLint
3+
import android.content.ComponentName
4+
import android.content.ServiceConnection
45
import android.content.pm.PackageManager
5-
import android.os.Build
6+
import android.os.IBinder
7+
import androidx.annotation.Keep
8+
import io.flutter.Log
69
import io.flutter.embedding.android.FlutterActivity
710
import io.flutter.embedding.engine.FlutterEngine
8-
import io.flutter.plugin.common.EventChannel
911
import io.flutter.plugin.common.MethodChannel
1012
import rikka.shizuku.Shizuku
11-
import rikka.shizuku.ShizukuRemoteProcess
12-
import java.io.BufferedReader
13-
import java.io.InputStreamReader
13+
import rikka.shizuku.Shizuku.UserServiceArgs
1414

1515

1616
class MainActivity : FlutterActivity() {
17-
private val shizukuChannel = "com.dojocommunity.stalker/shizuku"
17+
@Keep
18+
private val shizukuChannel = "com.onerdna.stalker/shizuku"
19+
@Keep
20+
private var binderService: IBinderService? = null
1821

22+
@Keep
1923
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
2024
super.configureFlutterEngine(flutterEngine)
2125

@@ -38,47 +42,34 @@ class MainActivity : FlutterActivity() {
3842
"runCommand" -> {
3943
val command = call.argument<String>("command")
4044
?: throw IllegalArgumentException("Invalid command argument")
41-
result.success(runCommand(command))
45+
if (binderService == null) {
46+
result.error("BINDER_SERVICE_NOT_AVAILABLE", "Binder service is not available", "binderService is null")
47+
} else {
48+
result.success(binderService?.runCommand(command))
49+
}
4250
}
4351

44-
else -> {
45-
result.notImplemented()
52+
"isBinderServiceAvailable" -> {
53+
result.success(binderService != null)
4654
}
47-
}
48-
}
49-
}
5055

51-
private fun runCommand(command: String): String {
52-
val outputBuilder = StringBuilder()
53-
var process: ShizukuRemoteProcess? = null
54-
try {
55-
require(command.isNotEmpty()) { "Command cannot be null or empty" }
56-
57-
process = Shizuku.newProcess(arrayOf("sh", "-c", command), null, "/")
58-
val input = BufferedReader(InputStreamReader(process.getInputStream()))
59-
val error = BufferedReader(InputStreamReader(process.errorStream))
60-
61-
var line: String?
62-
while ((input.readLine().also { line = it }) != null) {
63-
outputBuilder.append(line).append("\n")
64-
}
56+
"startBinderService" -> {
57+
try {
58+
startBinderService()
59+
result.success("")
60+
} catch (e: Exception) {
61+
result.error("START_BINDER_SERVICE_ERROR", e.toString(), "exception in startBindService")
62+
}
63+
}
6564

66-
while ((error.readLine().also { line = it }) != null) {
67-
outputBuilder.append(line).append("\n")
65+
else -> {
66+
result.notImplemented()
67+
}
6868
}
69-
70-
process.waitFor()
71-
} catch (e: java.lang.IllegalArgumentException) {
72-
outputBuilder.append("Error: ").append(e.message)
73-
} catch (e: Exception) {
74-
outputBuilder.append("Unexpected error: ").append(e.message)
75-
e.printStackTrace()
76-
} finally {
77-
process?.destroy()
7869
}
79-
return outputBuilder.toString().trim { it <= ' ' }
8070
}
8171

72+
@Keep
8273
private fun requestPermission(code: Int, result: MethodChannel.Result) {
8374
if (Shizuku.isPreV11()) {
8475
result.success(false)
@@ -108,4 +99,25 @@ class MainActivity : FlutterActivity() {
10899

109100
Shizuku.requestPermission(code)
110101
}
102+
103+
@Keep
104+
private fun startBinderService() {
105+
Log.i("BinderService", "Trying to start the service...")
106+
Shizuku.bindUserService(
107+
UserServiceArgs(
108+
ComponentName(context, BinderService::class.java)
109+
)
110+
.processNameSuffix("shell")
111+
.debuggable(false)
112+
.daemon(false),
113+
object : ServiceConnection {
114+
override fun onServiceConnected(name: ComponentName?, service: IBinder?) {
115+
this@MainActivity.binderService = IBinderService.Stub.asInterface(service)
116+
Log.i("BinderService", "service connected")
117+
}
118+
119+
override fun onServiceDisconnected(name: ComponentName?) {}
120+
}
121+
)
122+
}
111123
}

android/build.gradle

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,21 @@ rootProject.buildDir = "../build"
99
subprojects {
1010
project.buildDir = "${rootProject.buildDir}/${project.name}"
1111
}
12+
13+
subprojects {
14+
afterEvaluate { project ->
15+
if (project.hasProperty("android")) {
16+
project.android {
17+
compileSdkVersion 36
18+
}
19+
}
20+
}
21+
}
22+
1223
subprojects {
1324
project.evaluationDependsOn(":app")
1425
}
1526

1627
tasks.register("clean", Delete) {
1728
delete rootProject.buildDir
18-
}
29+
}

0 commit comments

Comments
 (0)