Skip to content

Commit

Permalink
[+] add debug commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Heng30 committed Jan 15, 2024
1 parent 383bd9b commit ecc3639
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ install-debug: build-android-app
install-release: build-android-app
cd ./cpnews && ./gradlew installRelease

run-android-app:
adb shell am start -n xyz.heng30.cpnews/android.app.NativeActivity

run:
$(build-evn) $(run-evn) cargo run --bin cpnews --features=desktop

Expand Down
12 changes: 11 additions & 1 deletion build.help
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using `NativeActivity` with egui, winit and wgpu.

```bash
#### Build
export ANDROID_NDK_HOME="path/to/ndk"
export ANDROID_HOME="path/to/sdk"

Expand All @@ -10,4 +10,14 @@ cargo install cargo-ndk
cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build
./gradlew build
./gradlew installDebug

#### Debug
- find the `activity-name`: `adb shell dumpsys package <package-name> | grep -A 1 MAIN`

example:
```
adb shell dumpsys package xyz.heng30.cpnews | grep -A 1 MAIN

```

- adb shell am start -n xyz.heng30.cpnews/android.app.NativeActivity
2 changes: 1 addition & 1 deletion cpnews/src/version.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pub const VERSION: &str = "v0.0.5";
pub const VERSION: &str = "v0.0.6";

0 comments on commit ecc3639

Please sign in to comment.