Skip to content

Commit 9057bf0

Browse files
committed
refactor: now runs with Java 1.8, embedding dummy key and cert for signing, first draft of readme
1 parent db47262 commit 9057bf0

17 files changed

Lines changed: 147 additions & 104 deletions

.idea/artifacts/DropmixModdingTool_jar.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/ren_crux_jadb_base1.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DropmixModdingTool.iml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,6 @@
7171
<SOURCES />
7272
</library>
7373
</orderEntry>
74+
<orderEntry type="library" name="ren.crux.jadb.base2" level="project" />
7475
</component>
7576
</module>

external_tools/jadb.jar

-591 Bytes
Binary file not shown.

readme.md

Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,70 @@
1-
This project relies on the following jars:
1+
# DropmixModdingTool
22

3-
- apksigner: from android dev tools, for signing
4-
- apktool_2.9.3: for decompiling and recompiling
5-
- jadb: for connecting to android device
3+
I previously done work on Dropmix at https://github.com/padraigfl/dropmix-card-swap-utility but hit a brick wall in the browser. As the project being modded is an APK it made sense to use Java instead (although C# may also make sense for the Unity side of things).
64

5+
This project currently replicates the playlist swap functionality of the previous project but the idea is to make a bit of a dumping ground for useful utilites.
76

8-
Setup:
7+
## Requirements
98

10-
1. Begin an ADB server instance if you want to transfer direct to a phone (`adb server` or `adb.exe server` in most cases I think)
11-
2. Add a key and certificate to the same directory as you run the jar from for signing the new APK
12-
3. Run `java -jar [app path]/DropmixModdingTool.jar`
13-
4. Add a valid Dropmix APK file (must be v1.9.0) and verify it
14-
5. (if desired) connect Android device (will fail if more than one available)
9+
### Needed
10+
11+
- Java 1.8 or later (broke a few things getting it down to this one but it should make it more accessible)
12+
- Dropmix 1.9.0 APK file: this program was designed with only 1.9.0 in mind and relies on asset data which may be unique to that version
13+
- ONE phone with ADB enabled and connected: without this you'll have to copy APK files to the phone and install them manually repeatedly
14+
- A bunch of scary permissions screens to accept: directory access on computer, installing unverified APKs on android device, probably others. You are taking risks running this code, hopefully not loads of risks but I can't guarantee it
15+
- Dropmix being deleted from your device: the signing process of the modified APKs means you can't swap between the legit Dropmix APK and modded ones. You can however install one modded APK directly over another and have immediate access to a whole fresh range of card data
16+
- Patience
17+
18+
### Included
19+
20+
This project relies on the following jars, which are included in the build:
21+
22+
- [apksigner](https://developer.android.com/tools/apksigner): from android dev tools, for signing
23+
- [apktool](https://apktool.org/): for decompiling and recompiling
24+
- [jadb](https://github.com/vidstige/jadb): for connecting to android device
25+
- [sl4j](https://www.slf4j.org/): ehh... jadb depends on it
26+
27+
adb is also baked in to simplify the process of connecting to an Android device; this has mainly been tested on macOS.
28+
29+
30+
## Setup:
31+
32+
1. Add a key and certificate to the same directory as you run the jar from for signing the new APK (I may include a dummy one to remove this step)
33+
1. Run `java -jar [app path]/DropmixModdingTool.jar` (depending on your device you may only need to click on the icon in your Finder/Explorer)
34+
1. Add a valid Dropmix APK file (must be v1.9.0) and verify it
35+
1. (if desired) connect Android device (will fail if more than one available)
36+
1. Go to playlists tab and select the playlists you wish to swap
37+
1. Build the modded version of the APK
38+
1. Either install it directly to you ADB connected device or save it to your hard drive
39+
40+
## Troubleshooting
41+
42+
I need to know the version of Java you're using and the output of the log panel within the application. If you want to test more extensively you can get additional and/or clearer logs by running the jar file from the terminal.
43+
44+
- is java working on your system? (check for `java -version` in the terminal)
45+
- what version of java is it?
46+
- do you have multiple adb devices conneccted to your computer?
47+
- is the Dropmix APK file definitely 1.9.0
48+
49+
### Known Issues:
50+
51+
1. I raced through this so the UI is janky as hell. I expect frequent restarts. Some of it looks pretty bad with the Java 1.8 compilation settings but it'll do
52+
1. Logs aren't updating correctly; I think I need to add some multithreading functionality
53+
1. UI in general has weird lags tbh
54+
1. Need to figure out the licensing stuff fully. My understanding is that all the libraries I depend on here use Apache 2.0 so I will use that too
55+
1. The included keys for signing the APK currently have had less than zero thought put into them. This is a rough and insecure project. If you want to improve anything around the security of this project I'd love the help!
56+
1. No data is saved between instances of the program so you need to readd the apk each time
57+
1. The app does a terrible job cleaning up after itself, the directory you run the app from will likely have some junk folders in it, they'll overwrite each time you run the app and it's safe to delete them
58+
59+
## Current functionality:
1560

16-
Current functionality:
1761
1. Parse app's key card database
1862
1. Generates a modified version of the application with playlists swapped
1963
1. Directly installs modified APK onto connected android device (requires ADB server instance)
2064

21-
Future work:
65+
## Future work:
66+
1. Include associated baffler cards in playlist swaps
2267
1. Streamline process some more (can I launch the ADB server within the jar code?)
2368
1. Verify working on Windows
2469
1. Tools for straightforward installing of APK without mods
25-
1. Mayyyyybe custom cards? This involves modifying the level0 assets file instead and injecting custom data files post-install so it's not so easy)
26-
27-
Issues:
28-
29-
1. I raced through this so the UI is janky as hell. I expect frequent restarts
30-
1. Need to figure out the licensing stuff fully. My understanding is that all the libraries I depend on here use Apache 2.0 so I will use that too
70+
1. Mayyyyybe custom cards? This involves modifying the level0 assets file instead and injecting custom data files post-install so it's not so easy

src/model/AppState.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.io.IOException;
99
import java.nio.file.Files;
1010
import java.nio.file.Path;
11+
import java.nio.file.Paths;
1112
import java.util.*;
1213

1314
public class AppState {
@@ -103,7 +104,7 @@ byte[] loadFile() {
103104

104105
try {
105106
String fileByteArrayPathString = classLoader.getResource("sharedassets0.assets.split194").getFile();
106-
rawData = Files.readAllBytes(Path.of(fileByteArrayPathString));
107+
rawData = Files.readAllBytes(Paths.get(fileByteArrayPathString));
107108
return rawData;
108109
} catch (IOException | NullPointerException e) {
109110
throw new Error(e);

src/ui/UILog.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ public void actionPerformed(ActionEvent e) {
5858
private void refreshText() {
5959
tp.setText(log);
6060
tp.repaint();
61-
CompletableFuture.delayedExecutor(5, TimeUnit.SECONDS).execute(() -> {
62-
if (!tp.getText().equals(log)) {
63-
refreshText();
64-
}
65-
});
61+
// CompletableFuture.delayedExecutor(5, TimeUnit.SECONDS).execute(() -> {
62+
// if (!tp.getText().equals(log)) {
63+
// refreshText();
64+
// }
65+
// });
6666
}
6767
private void logSetup() {
6868
PrintStream cmd = System.out;

0 commit comments

Comments
 (0)