Skip to content

Commit

Permalink
Remove path suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-TSNG committed Feb 2, 2023
1 parent 0cd714d commit 673eca8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
31 changes: 23 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
# Zygisk on KernelSU

Zygisk loader for KernelSU, which allows Zygisk modules to run without Magisk environment.
Zygisk loader for KernelSU, allowing Zygisk modules to run without Magisk environment.

Warning: The current version of Zygisksu is UNSTABLE. You may suffer boot loop or even data loss so use with caution.

## Requirements

+ Minimal KernelSU version: 15
+ Minimal ksud version: 7b32c0e

## Compatibility

- [x] LSPosed
- [x] Storage Isolation
- [ ] IFW Enhance
- [ ] Universal SafetyNet Fix
- [ ] Shamiko

## Development road map

- [x] Basic Zygisk loader
- [x] Stabilize injector
- [ ] Separate zygiskd process
- [ ] Handle 64 bit only devices
- [ ] DenyList & Hide
- [x] [Inject] Basic Zygisk loader
- [x] [Inject] Stabilize injector
- [x] [Inject] Unload
- [ ] [Daemon] Separate zygiskd process
- [ ] [Daemon] Handle 64 bit only devices
- [ ] [Daemon] Handle zygote death

## Running on Magisk

It is possible to run Zygisksu on Magisk with a few steps:

1. `mkdir -p /data/adb/ksu/bin`
1. `mkdir /data/adb/ksu`
2. `ln -s /data/adb/modules /data/adb/ksu/`
3. `cp $(which resetprop) /data/adb/ksu/bin/resetprop`
2 changes: 1 addition & 1 deletion module/src/daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export NATIVE_BRIDGE=$(getprop ro.dalvik.vm.native.bridge)
[ "$DEBUG" = true ] && export RUST_BACKTRACE=1

log -p i -t "zygisksu" "Start watchdog"
/data/adb/ksu/bin/resetprop ro.dalvik.vm.native.bridge libzygiskloader.so
resetprop ro.dalvik.vm.native.bridge libzygiskloader.so
exec "$MODDIR/bin/zygiskwd" >/dev/null 2>&1
2 changes: 1 addition & 1 deletion zygiskd/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn get_native_bridge() -> String {
}

pub fn restore_native_bridge() -> Result<()> {
Command::new("/data/adb/ksu/bin/resetprop")
Command::new("resetprop")
.arg(constants::PROP_NATIVE_BRIDGE)
.arg(get_native_bridge())
.spawn()?.wait()?;
Expand Down
2 changes: 1 addition & 1 deletion zygiskd/src/zygisk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ fn create_daemon_socket(is64: bool) -> Result<UnixListener> {
fn handle_daemon_action(mut stream: UnixStream, context: &Context) -> Result<()> {
let action = stream.read_u8()?;
let action = DaemonSocketAction::try_from(action)?;
log::debug!("New daemon action {:?}", action);
log::trace!("New daemon action {:?}", action);
match action {
DaemonSocketAction::PingHeartbeat => {
restore_native_bridge()?;
Expand Down

0 comments on commit 673eca8

Please sign in to comment.