Skip to content

Commit

Permalink
revert to original implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
roothider committed Jun 1, 2024
1 parent dba73aa commit af5ab14
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Packages/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
libkrw-provider/libkrw-plugin.*
libroot/libroot.deb
libroot/libroot.*
basebin-link/basebin-link.*
25 changes: 25 additions & 0 deletions Packages/libroot/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
TARGET = libroot.dylib
CC = clang

CFLAGS = -I../../BaseBin/.include -Isrc -isysroot $(shell xcrun --sdk iphoneos --show-sdk-path) -arch arm64 -arch arm64e -miphoneos-version-min=15.0 -fobjc-arc -O2
LDFLAGS = -dynamiclib -rpath /var/jb

all: $(TARGET) sign

sign: $(TARGET)
@ldid -S $^

$(TARGET): $(wildcard src/*.c ../../BaseBin/libjailbreak/src/jbclient_xpc.c)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^

clean:
@rm -f $(TARGET)
@rm -f libroot.deb

package: all
@mkdir -p .package/DEBIAN
@mkdir -p .package/var/jb/usr/lib
@cp control .package/DEBIAN/control
@cp libroot.dylib .package/var/jb/usr/lib/libroot.dylib
@dpkg-deb --root-owner-group -Zzstd -b .package ./libroot.deb
@rm -rf .package
9 changes: 9 additions & 0 deletions Packages/libroot/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Package: libroot-dopamine
Name: libroot (Dopamine)
Author: opa334
Maintainer: opa334
Architecture: iphoneos-arm64
Version: 1.0.1
Priority: optional
Section: Development
Description: libroot for Dopamine
16 changes: 16 additions & 0 deletions Packages/libroot/src/paths.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <libjailbreak/jbclient_xpc.h>

const char *libroot_get_root_prefix(void)
{
return "";
}

const char *libroot_get_jbroot_prefix(void)
{
return jbclient_get_jbroot();
}

const char *libroot_get_boot_uuid(void)
{
return jbclient_get_boot_uuid();
}
8 changes: 8 additions & 0 deletions Packages/libroot/src/paths.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef LIBROOT_PATHS_H
#define LIBROOT_PATHS_H

const char *libroot_get_root_prefix(void);
const char *libroot_get_jbroot_prefix(void);
const char *libroot_get_boot_uuid(void);

#endif

0 comments on commit af5ab14

Please sign in to comment.