#development

1 messages · Page 20 of 1

primal perch
#
bool is_rootless()
{
    static bool gorn;
    if (!gorn) {
        // check

        gorn = true;
    }
}```
indigo peak
#
bool is_rootless() {
  return access("/var/jb/.procursus_strapped");
}
#

😄

primal perch
#

bloat but sure

#

it is dumbass

#

thats a .bss variable

indigo peak
#

yeah

#

no shit

primal perch
#

and is guaranteed to be 0

#

or .data one of the two

#
bool is_rootless()
{
    static bool gorn;
    static bool actual;
    if (!gorn) {
        // check
        actual = access(...);

        gorn = true;
    }

    return actual;
}```
#

there

#

pre configured for the skid

indigo peak
#

i just don't know where id put it

#

to run once

primal perch
#

literally copy that

#

and rename it how you want

indigo peak
#

oh shit

#

static

primal perch
#

L

#

that way you keep the state encapsulated

#

and you cant overwrite it

indigo peak
#
bool is_rootless() {
  static bool didRun;
  static bool ret;
  if (!didRun) {
    ret = access("/var/jb/.procursus_strapped", F_OK) == 0;
    didRun = true;
  }
  return ret;
}
primal perch
#

set did run at the end and yes

indigo peak
#

die

primal perch
#

gotem

indigo peak
#
// before
if (access("/usr/lib/libhooker.dylib", F_OK) == 0)

// after
if (access(is_rootless() ? "/usr/lib/libhooker.dylib" : "/var/jb/usr/lib/libhooker.dylib", F_OK) == 0)
#

would it be like that

primal perch
#

yea but reverse it

indigo peak
indigo peak
#

LMAO

#

nah

#

!is_rootless()

primal perch
#

ok

#

i would also write wrapper functions

#

get_lib_directory() + "libhooker.dylib" for example

#

or get_file_from_lib(...)

#

some bullshit like that

unkempt raft
#

@tepid olive nice

primal perch
#

Yet another tweak

indigo peak
#

TROL

primal perch
#

std::string supports that perfectly trol

indigo peak
#

access is C

primal perch
#

what

unkempt raft
indigo peak
#

yeah

unkempt raft
#

test if you can delete /

indigo peak
#

nah

primal perch
indigo peak
#

just update it to search through every file in teh system

#

and get the filepath from name

#

make a NSDictionary

primal perch
#

thats some captware

#

dont use a '

#

youre not talking about possession

#

learn ENGLISH

#

this is real

#

AEAssessmentIndividualConfiguration isEqual:

unkempt raft
#

real

#

just check if you can write to /Applications

primal perch
#

setuid(0) problem solved

unkempt raft
#

why not become root

#

free power

primal perch
indigo peak
#

@primal perch ```C
const char *new_path(const char *path) {
// check if rootless
if (access("/var/jb/.procursus_strapped", F_OK) == 0) {
// append /var/jb/ to path
NSString *new_path = [NSString stringWithFormat:@"/var/jb/%s", path];
return [new_path UTF8String];
}
return path;
}

#

something like that?

primal perch
indigo peak
# primal perch use is_rootless in this itself
bool is_rootless() {
    static bool didRun;
    static bool ret;
    if (!didRun) {
        ret = access("/var/jb/.procursus_strapped", F_OK) == 0;
        didRun = true;
    }
    return ret;
}

const char *new_path(const char *path) {
    // check if rootless
    if (is_rootless()) {
        // append /var/jb/ to path
        NSString *new_path = [NSString stringWithFormat:@"/var/jb/%s", path];
        return [new_path UTF8String];
    }
    return path;
}
primal perch
#

im strapped daddy

#

based hayden

#

as always

unkempt raft
#
for pid in processes {
  setuidpid(pid, 0)
}
#

Problem solved trollface

primal perch
#

oh now you change your mind

#

cuz daddy hayden said so

#

capt is a bottom

#

hes a gamma male

#

gorn

unkempt raft
indigo peak
#

yeah ill just wait until @lime pivot fixes it

#

kirb merge my theos PR challenge

#

failed

unkempt raft
indigo peak
#

thats valid

primal perch
#

MEOW MEOW MEOW @worn cradle

worn cradle
primal perch
#

real ios framework

worn cradle
#

becoming a jb dev now

primal perch
#

fr

unkempt raft
primal perch
unkempt raft
#

smh it does actually useful stuff

#

@indigo peak how does the valid cmd+c cmd+v going? trolley

indigo peak
#

not doing anything

#

im scrolling on my phone now

unkempt raft
primal perch
#

COCK

unkempt raft
#

Anybody knows how does iSH keep itself running an background and not get terminated? I remember reading somewhere when iSH just came out it was constantly requesting geo data from ios, but I'm not sure where to find that code and if it still works

lime pivot
#

you can request coarse location, and never un-request it, so effectively you're asking for continuous background notifications forever

#

coarse won't drain battery because it's just triangulating based on cell towers and wifi SSIDs near the phone

#

well, it still has to go and send that data to Apple if it detects a significant change

unkempt raft
#

thanks

lime pivot
#

but it's negligible when you're already asking for the CPU and radios to be kept alive I suppose

indigo peak
#

mr upside down

lime pivot
#

actually would help if you could since I can't test it currently

indigo peak
#

sick

#

@naive kraken would i be able to use you NSString* getRootPath(void) from CCSupport to update libCephei to work rootless

#

@lime pivot can i use a function from CCSupport of opa334 gives permission

lime pivot
#

hmm

#

what does the function do?

#

should be fine though

indigo peak
#

basically

#

you call getRootPath

lime pivot
#

just if exists /var/jb --> /var/jb else --> /

#

?

indigo peak
#

yeah

#

literally yeah

lime pivot
#

should be fine

indigo peak
#

since its done by an actual dev the function will be actually good

#

and not shit

#

yk

hasty ruin
indigo peak
#

oh shit

#

im sorry opa

hasty ruin
#

real

primal perch
#

real

#

as always opa beat you to the punch

hasty ruin
primal perch
#

gorn app

#

it curates the best gay porn

indigo peak
hasty ruin
#

bet

primal perch
#

ok whatever we do tho

#

we need to call it gorn

#

deadass

hasty ruin
#

True

#

brb stealing name for my LS tweak

primal perch
indigo peak
#

getRootPath.h & getRootPath.m

hasty ruin
#

No that’s bloat and will slow down compilation by multiple milliseconds

indigo peak
#

not funny

#

only funny when shep says it

hasty ruin
#

it’s only funny when you believe it

primal perch
#

me downloading a 14GB file in 2 mins

#

thanks gigabit

hasty ruin
#

is it gorn by any chance

primal perch
#

no

#

macos 12.6 ipsw

hasty ruin
#

🧢

lime pivot
indigo peak
#

bet

primal perch
#

cumless

indigo peak
#

@lime pivot

/home/fiore/theos/vendor/include/LightMessaging/LightMessaging.h:25:2: error: definition of configuration macro 'ROCKETBOOTSTRAP_LOAD_DYNAMIC' has no effect on the import of 'RocketBootstrap'; pass '-DROCKETBOOTSTRAP_LOAD_DYNAMIC=...' on the command line to configure the module [-Werror,-Wconfig-macros]
#include "../rocketbootstrap/rocketbootstrap.h"
#

trying to build cephei

lime pivot
#

yeah so that define will need to be moved to the makefile

#

in ADDITIONAL_CFLAGS

#

then remove the #define line wherever it is

indigo peak
lime pivot
#

don't think it needs a value actually

#

just define it without =1

indigo peak
#
  "___isOSVersionAtLeast", referenced from:```
primal perch
#

pins

tepid olive
#

writing asm today

#

posix spawn asm patch

unkempt raft
tepid olive
#

it’s so hard

#

almost done

unkempt raft
#

lmk if you need any help

#

not with asm though trolley

indigo peak
#

ok i lied

#

it works

#

now my own code doesnt work

#

wtf

indigo peak
#

i have no idea why this shit isnt working

#
// Rootless.m
#include "Rootless.h"

NSString* getRootPath(void) {
  // blah
}
// Rootless.h
NSString* getRootPath(void);
// prefs/SomeController.m
#import "../Rootless.h"

getRootPath();
#
Undefined symbols for architecture armv7:
  "_getRootPath", referenced from:
#

like

#

it should work

hasty ruin
#

ew

indigo peak
#

copy and paste

#

¯_(ツ)_/¯

indigo peak
#

it doesnt work

#

bro

#

im gonna end my life

#

this is so stupid

#

why wont it work

#

it should be tho

tepid olive
ocean raptor
#

Ew

#

@lime pivot what's your plan for building iphoneos-arm64 debs in theos?

#

Do you know how you're going to do it, if at all?

lime pivot
ocean raptor
#

Is the Architecture field set by theos or by the control file at the root?

lime pivot
#

I'm super undecided on how support for side-by-side arm and arm64 package building should be architected

#

(if it should even be a Theos feature at all)

#

because all the templates will have architecture iphoneos-arm in their control, unless you're building for 15+, in which case the control will be a lie and it's actually iphoneos-arm64

naive kraken
tepid olive
#

what

vivid dew
#

i eat pussy like a starving animal

indigo peak
#

i cant get __isOSVersionAtLeast to work

#

wtf

naive kraken
#

that won't work on linux

#

only on macOS and latest iOS

#

or you need to add like compiler-rt or something like that

indigo peak
#

.

indigo peak
lime pivot
#

should stick it in a .m

#

otherwise it'll indeed be duplicating it for each time it's imported

hasty ruin
#

.

indigo peak
#

i just dont know which one to put it in

lime pivot
#

.

restive ether
#

real

indigo peak
#

i legit got it to work yesterday

#

i dont remember which file i put it in tho

#

😭

ocean raptor
lime pivot
#

at this rate never

indigo peak
#

@lime pivot ```SH
==> Linking tool hbprefs (armv7)…
ld: library not found for -lcrt1.3.1.o
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [/home/fiore/theos/makefiles/instance/tool.mk:20: /home/fiore/libcephei/.theos/obj/debug/armv7/hbprefs] Error 1
make[3]: *** [/home/fiore/theos/makefiles/instance/tool.mk:20: /home/fiore/libcephei/.theos/obj/debug/armv7/hbprefs] Error 2
make[3]: *** Waiting for unfinished jobs....
==> Linking tool hbprefs (arm64)…
Undefined symbols for architecture arm64:
"start", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64

restive ether
#

can't even get Cydia 2 in the loader

lime pivot
#

you'll have to just edit the makefiles to bump the TARGETs to something way higher

#

it's my fault for making it run on old ass iOSes

indigo peak
#

waht version do you recc

#

fianlly

#

got it to compile

#

changed it from 5.0 to 6.0

hasty ruin
ocean raptor
lime pivot
indigo peak
#

like it errored

lime pivot
#

I mean hey, rootless is my chance

indigo peak
#

and extern changed nothing

#

like its being compiled & erroring

#

whatever

#

made something up

#

somehow worked

#

lmao

restive ether
ocean raptor
#

Rootless is really our chance to fix everything we hate about the current setup. But no! Xina wants to use saily

faint stag
indigo peak
#

@lime pivot id also need to change the shell scripts to account for rootless

#

ex: ln -s /usr/lib/Cephei

naive kraken
ocean raptor
#

I've been talking to him

naive kraken
#

ah

restive ether
zenith hatch
#

???

hasty ruin
#

Jk

#

Your code would never look that clean

hollow scroll
#

Hey everyone, i have been a bit out of the loop for the past few months.
I am starting to get emails about some of my tweaks from people that use the new iOS 15 jailbreak.
they report that the preferences are not saving correctly. (when they change a value and go back to settings it wont save)
any ideas on what have changed on this new jailbreak? perhaps the location of saved preferences plist files?

naive kraken
hollow scroll
# naive kraken where is your hook that's reading the preferences? maybe in a system app?

I am reading the preferences on the Springboard, but it sounds like the preferences file is not saved correctly so that's not the issue

One of the tweaks with this issue is open sourced: https://github.com/gilshahar7/ExactTime

GitHub

Jailbreak tweak: show the exact time of a notification. - GitHub - gilshahar7/ExactTime: Jailbreak tweak: show the exact time of a notification.

naive kraken
#

Ah

#

I know the issue

hollow scroll
naive kraken
#

In your pref bundle you write to /User/Library

#

/User has never been guaranteed to exist

#

And will never exist on iOS 15 due to SSV

#

So change that to /var/mobile/Library

hollow scroll
#

Awesome, that sounds reasonable. Thank you 🙂

tepid olive
#

@grave sparrow tell me whats wrong now

#

i did more stuff

tardy narwhal
#

if that patch actually works it's fine for the first time writing raw assembly, adhering to conventions & proper assembly code-style should be secondary and the next stage in development

#

(imo)

#

ah, then rework is needed but I wouldn't necessarily push for the hard reset. correcting the mistakes as the code is now would probably be more fruitful, i'm not too deep into arm64 asm

#

the x64 bits are ... well they could use some love too

tepid olive
#

No

#

I am gonna clean this up after, I know I can’t use those registers

#

I don’t see why making a string with bytes is bad though?

#

Read the code

#

There are hardcoded addresses

#

Because I am not finished

#

I know

#

Stop thinking I’m this stupid

#

Lmao

#

The dyld slide doesn’t change so I hardcode it to accelerate development

#

Not in my experience

#

No

#

Yes

#

The code is right there

#

I still don’t see what’s wrong dude

#

Except the calling conv

#

Which I will fix

#

It does set the env correctly

#

Unused

#

It was used to test string alloc

#

No

#

It executes the first instructions before jumping back

#

Which isn’t a problem

#

The lr thing is temporary as well

#

This is a instruction of posix spawn

#

I can’t omit it

#

It has to be ran before jumping back

#

Otherwise it’s skipping 5 instructions

#

I am 100% sure that part is correct

#

I do

#

Dude

#

Please

#

What’s wrong with strings made with ascii bytes

#

Why?

#

How do you think ascii works

#

😭

#

No because that would require doing cursed disassembly to make the compiler work as intended

#

?

#

Ok

modern shuttle
#

Wow your knowledge is awesome

tepid olive
#

this is unnecessary pain

#

about this

#

i strongly doubt launchd has a env string set already

#

like it surely doesn’t

wheat grotto
#

How do i convert epoch time to yyyy:mm:dd hh:mm:ss

#

Arduino, so basically c++

tepid olive
#

capt everything you’re talking about assumes that there is undefined behaviour but this is only one process that runs the same everywhere

tepid olive
#

with all the code

wheat grotto
#

I tried using the Time.h Library that the arduino ide should have by default, but "DateTime" was not declared in this scope

#

Copium

#

or it might not be updated

#

if so

#

im f dead

#

Poggers

neon jungle
#

Do I need to fix this "ld: warning: object file /home/me/work/sidestatus/.theos/obj/debug/arm64e/Tweak.xm.a6b474a9.o was built with an incompatible arm64e ABI compiler" if I want my tweak to work on arm64e?

wheat grotto
#

Tho im eventually moving to a uno with an eth shield, so maybe thats gonna fix it...?

tepid olive
#

You’re telling me that I’m supposed to consider that a user will debug launchd?

ocean raptor
#

@grave sparrow I need to intercept xpc messages on iOS, how do I do that?

neon jungle
#

Apparently I have clang 13?

#

So am I fine?

tepid olive
#

PAC sucks

ocean raptor
#

frida-ps -U rebooted my device 💀

indigo peak
#

how

restive ether
#

cause I know Frida just doesn't work on any coolstar jailbreak

ocean raptor
#

checkra1n

ocean raptor
#

I got xpcspy working

ocean raptor
restive ether
primal perch
#

the discord admin educates the advanced developer

hasty ruin
#

frida ios really fell off

restive ether
#

I know why it doesn't work on star's

#

but it was literally built for u0 more than anything so

ocean raptor
ocean raptor
tepid olive
#

@vivid dew hiii pac nerd can you help

#

how do I sign a pointer to a string on arm64e with raw instructions

vivid dew
#

depends

#

what type of signed pointer is the target expecting

restive ether
#

schizo

vivid dew
restive ether
#

Justin Trudeau

vivid dew
restive ether
vivid dew
primal perch
#

fr

tepid olive
#

Ok

#

Idrc

#

How would I resign the environ pointer

vivid dew
#

IDK

primal perch
#

KDI

tepid olive
#

I am so tired of PAC why does it exist

primal perch
#

security

vivid dew
#

trolling purposes

tepid olive
vivid dew
#

just assume the pointer was never signed in the first place

primal perch
#

i mean is it though

vivid dew
#

it usually isn't

primal perch
#

its making whatever ur tryna do extra difficult

vivid dew
vivid dew
primal perch
#

capt inc writing a whole essay for one post

vivid dew
#

uhhh, you can start by hooking xpc_pipe_routine() and print the 2nd argument, which is the message to be sent

i’m not really sure about intercepting messages that are received, but you can start by hooking xpc_pipe_receive() and logging that? potentially?

extern int xpc_pipe_simpleroutine(xpc_object_t pipe, xpc_object_t message);

#if __has_feature(objc_arc)
extern int xpc_pipe_routine(xpc_object_t pipe, xpc_object_t message, __strong xpc_object_t *reply);
#else
extern int xpc_pipe_routine(xpc_object_t pipe, xpc_object_t message, xpc_object_t *reply);
#endif

#if __has_feature(objc_arc)
extern int xpc_pipe_receive(mach_port_t port, __strong xpc_object_t *message);
#else
extern int xpc_pipe_receive(mach_port_t port, xpc_object_t *message);
#endif

xpc_pipe_routine sends a message and waits for a reply synchronously. xpc_pipe_simpleroutine is similar, but does not expect a reply & returns immediately

note that xpc_pipe_routine() calls an underlying function: _xpc_pipe_routine() (prefixed underscore).

you may find better luck hooking the underlying function instead, but who knows. note that the underlying function has the message as the 3rd arg instead of the 2nd arg

primal perch
#

uhhh, you can start by hooking xpc_pipe_routine() and print the 2nd argument, which is the message to be sent

i’m not really sure about intercepting messages that are received, but you can start by hooking xpc_pipe_receive() and logging that? potentially?

extern int xpc_pipe_simpleroutine(xpc_object_t pipe, xpc_object_t message);

#if has_feature(objc_arc)
extern int xpc_pipe_routine(xpc_object_t pipe, xpc_object_t message, strong xpc_object_t reply);
#else
extern int xpc_pipe_routine(xpc_object_t pipe, xpc_object_t message, xpc_object_treply);
#endif

#if has_feature(objc_arc)
extern int xpc_pipe_receive(mach_port_t port, strong xpc_object_t message);
#else
extern int xpc_pipe_receive(mach_port_t port, xpc_object_tmessage);
#endif

xpc_pipe_routine sends a message and waits for a reply synchronously. xpc_pipe_simpleroutine is similar, but does not expect a reply & returns immediately

note that xpc_pipe_routine() calls an underlying function: _xpc_pipe_routine() (prefixed underscore).

you may find better luck hooking the underlying function instead, but who knows. note that the underlying function has the message as the 3rd arg instead of the 2nd arg

vivid dew
#

NEW OUTFIT TIME AHHH #FaunasFashion

✿ Hashtags ✿
LIVE: #faunline ART: #FineFaunart

✿ Twitter ✿
https://twitter.com/ceresfauna
@ceresfauna

༻━━━༺ .⋅ ✧ ⋅. ༻━━━༺

【Tsukumo Sana】
[YouTube] https://t.co/rmtApAWdl3?amp=1
[Twitter] https://twitter.com/tsukumosana

【Ouro Kronii】
[YouTube] https://t.co/P3BX2MUiCX?amp=1
[Twitter] https://twitter.com/o...

▶ Play video
ocean raptor
#
#include <stdio.h>
#include <stdlib.h>
#include <xpc/xpc.h>
typedef xpc_object_t xpc_pipe_t;

#include "fishhook.h"

kern_return_t
xpc_pipe_routine(xpc_pipe_t pipe, xpc_object_t request,
    xpc_object_t *reply);

kern_return_t (*old_xpc_pipe_routine)(xpc_pipe_t, xpc_object_t, xpc_object_t*);

kern_return_t
hook_xpc_pipe_routine(xpc_pipe_t pipe, xpc_object_t request,
    xpc_object_t *reply)
{
    kern_return_t ret = old_xpc_pipe_routine(pipe, request, reply);
    char *requeststr = xpc_copy_description(request);
    fprintf(stderr, "REQUEST: %s\n", requeststr);
    free(requeststr);
    char *replystr = xpc_copy_description(*reply);
    fprintf(stderr, "REPLY: %s\n", replystr);
    free(replystr);
    return ret;
}

kern_return_t
xpc_pipe_routine_with_flags(xpc_pipe_t pipe, xpc_object_t request,
    xpc_object_t *reply, uint32_t flags);

kern_return_t (*old_xpc_pipe_routine_with_flags)(xpc_pipe_t, xpc_object_t, xpc_object_t*, uint32_t);

kern_return_t
hook_xpc_pipe_routine_with_flags(xpc_pipe_t pipe, xpc_object_t request,
    xpc_object_t *reply, uint32_t flags)
{
    kern_return_t ret = old_xpc_pipe_routine_with_flags(pipe, request, reply, flags);
    char *requeststr = xpc_copy_description(request);
    fprintf(stderr, "REQUEST: %s\n", requeststr);
    free(requeststr);
    char *replystr = xpc_copy_description(*reply);
    fprintf(stderr, "REPLY: %s\n", replystr);
    free(replystr);
    printf("FLAGS: %i\n", flags);
    return ret;
}

__attribute__((constructor))
static void ctor(void) {
    struct rebinding rebindings[] = {
        {"xpc_pipe_routine_with_flags", hook_xpc_pipe_routine_with_flags, &old_xpc_pipe_routine_with_flags},
        {"xpc_pipe_routine", hook_xpc_pipe_routine, &old_xpc_pipe_routine}
    };
    rebind_symbols(rebindings, 2);
    fprintf(stderr, "Hooked!\n");
}
#

I figured it out without you trol

#

I couldn't get xpcspy to work

primal perch
#

did apple start symbolicating ios 16 kcaches or something

#

cuz the one i just dropped in has almost all the symbols as the ios 14 one nfr

vivid dew
#

rare based move from apple

tepid olive
vivid dew
#

ok now disassemble the function where it crashes and find what instruction is being used to auth the pointer

tepid olive
#

you can pass a pointer from arm64 processes and it works

ocean raptor
tepid olive
#

Ok nvm

#

Fixed it by stripping

ocean raptor
#

I don't have any hooking lib installed

tepid olive
#

But it crashes somewhere else

vivid dew
#

trolling

tepid olive
#

KERN_INVALID_ADDRESS at 0xf1060001000b0000 -> 0x00000001000b0000 (possible pointer authentication failure)

#

0x00000001000b0000 is the posix_spawn pointer

#

What does it mean

vivid dew
#

you passed a signed pointer where you shouldnt have

tepid olive
#

It's a function pointer tho

#

No wait

vivid dew
#

fr

tepid olive
#

It's the PC register??

#

Bro.

#

Zefram code leak

#

yes

#

do i use blraa

vivid dew
#

second one

#

authenticate then jump

tepid olive
#

i'm loading an unsigned pointer in x16

#

I did that

#

And it crashed

#

yes

vivid dew
#

is the pointer signed or not

tepid olive
#

can mach_vm_address_t be signed

vivid dew
tepid olive
#

as in, the address where i've allocated memory

vivid dew
#

no

tepid olive
#

so basically i'm jumping to a executable page that i just allocated

#

should i be signing with the asia key

vivid dew
#

nooo

#

if you're in control of the jump like that you don't need to sign anything

tepid olive
#

yes

vivid dew
#

if you pass it out to something following normal abi then you need to sign it

tepid olive
#

And it's a blr

#

But it dies when I do a ret

#

I put it back yeah

vivid dew
#

you need uhh

tepid olive
#

When I ret in the function where I jumped

vivid dew
#

retab then

#

authenticate lr then return

#

why

tepid olive
#

No

#

I removed it

#

I am just doing retab

#

With a blr

#

I pushed it again

vivid dew
#

wtf

tepid olive
#

fixed it again

#

mb

#

it’s done in the spawn prefix macro

vivid dew
#

where is it crashing now

indigo peak
#

xina crashes when anything is reading syslog

#

shit jb

tepid olive
#

i don’t need it

#

why

tacit stump
faint stag
#

haven't seen capt like this since the beta alert

hasty ruin
indigo peak
#

ive only used 1.1.3.6

#

and thats what its crashing on

hasty ruin
#

Real

#

Console.app was always fine tho

#

Idk if you have access to that

indigo peak
#

you buying me a mac

hasty ruin
lime pivot
restive ether
#

and using force options in dpkg!

tepid olive
#

the ret makes it go back

restive ether
#

and they don't know how a dist repo works!

tepid olive
#

since it’s blr

lime pivot
#

Removing the dpkg lock files is never a correct solution

restive ether
#

and newer versions of apt don't lock nearly as much regardless

lime pivot
#

which, turns out, isn’t supported, and shouldn’t be overridden to make it work!

#

it’s almost as if the feature exists for a reason, or something like that

indigo peak
#

@lime pivot im not going to try and get cephei on ios 15 working, that requires a lot of work idk how to do

lime pivot
#

if you wanna just PR that one thing that’s cool with me

#

or whatever you got working so far

indigo peak
#

it changed nothing

#

nothing works

#

lmao

#

idk why

lime pivot
#

lmao sounds good to me

restive ether
#

can we just agree to keep preferences in the /var/jb path instead of whatever is going on now

#

no /var/mobile whatever please 😭

primal perch
#

based

restive ether
#

ill tell cfprefsd to get fucked

naive kraken
#

actually making a cfprefsd hook to save all prefs with a non apple prefix in /var/jb would be very easy

#

but then again hooking cfprefsd is broken on xina 🙂

#

also /var/jb/var points back to /var

#

in an ideal world we'd store prefs in /var/jb/var/mobile/Library/Preferences

restive ether
#

idk what Xina is doing, I'm not quite sure he does either

restive ether
naive kraken
#

I mean, he's looking into fixing cfprefsd now just so I can get Crane working so that's something

tepid olive
#

isn’t ret just mov pc lr

faint timber
#

Well it has to trigger the cpu to change pc based on lr too so mov + jump

#

True

indigo peak
#

@primal perch whats broken w birdpoop rn

tepid olive
#

okay

#

i just don’t get it anymore

#

there must be a stupid mistake somewhere

#

the lr triggers a pointer authentication failure

#

How would I sign my lr

#

i guess i use the discriminator

#

no

#

i mean right now i’m tryna do the direct jump

#

unsigned address

#

but it crashes

#

posix spawn + 20

#

skipping the first jump to the replacement

#

it never reached it though, the branch itself crashes the process

#

the one that jumps back to posix spawn

#

i am doing br x16 now

#

that’s the thing it just won’t go back

#

Okay wait

#

If I compile for arm64, posix spawn outputs bad address as an error

#

but it shows that something is wrong with envp

#

Ok it is fixed

#

Idk how the fuck

#

But it is

#

that's what i did

#

almost works

#

Pushed the current thing

#

Going to bed now

#

Too bad i guess

#

I’ll just do malloc memcpy

#

that’s work for later

primal perch
#

i updated them to what i thought was correct but tested and crashed

#

didnt test f urther

restive ether
neon jungle
#

Nvm I figured it out, my tweak couldn’t find the preference bundle and it causes respring loop on xina

#

The other error idk

ocean raptor
#
#include <stdio.h>
#include <stdlib.h>
#include <xpc/xpc.h>
typedef xpc_object_t xpc_pipe_t;

#define DYLD_INTERPOSE(_replacement,_replacee) \
   __attribute__((used)) static struct{ const void* replacement; const void* replacee; } _interpose_##_replacee \
            __attribute__ ((section ("__DATA,__interpose"))) = { (const void*)(unsigned long)&_replacement, (const void*)(unsigned long)&_replacee };

kern_return_t
xpc_pipe_routine(xpc_pipe_t pipe, xpc_object_t request,
    xpc_object_t *reply);

kern_return_t
hook_xpc_pipe_routine(xpc_pipe_t pipe, xpc_object_t request,
    xpc_object_t *reply)
{
    kern_return_t ret = xpc_pipe_routine(pipe, request, reply);
    char *requeststr = xpc_copy_description(request);
    fprintf(stderr, "\033[32mREQUEST: %s\033[m\n", requeststr);
    free(requeststr);
    char *replystr = xpc_copy_description(*reply);
    fprintf(stderr, "\033[31mREPLY: %s\033[m\n", replystr);
    free(replystr);
    return ret;
}

DYLD_INTERPOSE(hook_xpc_pipe_routine, xpc_pipe_routine);

#ifdef WITH_FLAGS
kern_return_t
xpc_pipe_routine_with_flags(xpc_pipe_t pipe, xpc_object_t request,
    xpc_object_t *reply, uint32_t flags);

kern_return_t
hook_xpc_pipe_routine_with_flags(xpc_pipe_t pipe, xpc_object_t request,
    xpc_object_t *reply, uint32_t flags)
{
    kern_return_t ret = xpc_pipe_routine_with_flags(pipe, request, reply, flags);
    char *requeststr = xpc_copy_description(request);
    fprintf(stderr, "\033[32mREQUEST: %s\033[m\n", requeststr);
    free(requeststr);
    char *replystr = xpc_copy_description(*reply);
    fprintf(stderr, "\033[31mREPLY: %s\033[m\n", replystr);
    free(replystr);
    fprintf(stderr, "\033[32mFLAGS: %i\033[m\n", flags);
    return ret;
}

DYLD_INTERPOSE(hook_xpc_pipe_routine_with_flags, xpc_pipe_routine_with_flags);
#endif
#

(the _with_flags function is only on iOS 13+ and I needed to run it on iOS 12)

hasty ruin
#

(All to the same email)

gentle grove
#

Maybe github accidentally sent 4 emails to everyone

#

same content in all 4

untold drift
#

is mshookfunction working with xina jailbreak ?

indigo peak
indigo peak
untold drift
indigo peak
#

I can give you an example

#

and link the docs

#

just give me a few

#

I just got out of bed

naive kraken
#

xina has both substitute and libhooker for whatever reason

indigo peak
#

Really?

timid furnace
naive kraken
#

so when you use MSHookFunction it calls to substitute and LHHookFunction goes to libhooker

indigo peak
#

I didnt get mshookmemory to work

naive kraken
#

Yeah substitute is half broken

timid furnace
#

no embed, sad

naive kraken
#

Xina should just drop it and include a substrate libhooker shim

#

that would be much better

untold drift
#

i tried to hook a mangled name class (from ida) but not working with %hookf
apps crashing when launch

elder scaffold
#

i need rootless injector for checkm8 devices

#

my arm64e is 15.4.1 so not ready yet

indigo peak
#

@naive kraken is this the "best" way to check if the device uses libhooker or should default to substitute

bool hasLibhooker(void) {
    if (access("/.procursus_strapped", F_OK) == 0 || access("/var/jb/.procursus_strapped", F_OK) == 0) {
        return true;
    }
    return false;
}
naive kraken
#

absolutely not

indigo peak
naive kraken
#

I just try to dlopen libhooker and dlsym LHHookFunctions

untold drift
#

thanks for your effort @indigo peak

naive kraken
#

and if that exists I use it, and if not I use MSHookFunction

#

(coolstar doesn't like this, but it seems to work for me so far)

indigo peak
#

cephei uses this
if (access("/usr/lib/libhooker.dylib", F_OK) == 0)

untold drift
#

whats alternative MSFindSymbol in libhooker ?

indigo peak
#

prob LHFindSymbols

tepid olive
#

no symbol finder tho

naive kraken
#

symbol finders are largely broken anyways

tepid olive
#

it works otherwise

naive kraken
#

MSFindSymbol doesn't work correctly on libhooker for me

tepid olive
#

lhhookfunctions is more optimized than on libhooker

#

coolstar apparently doesn't even reuse pages

untold drift
indigo peak
tepid olive
naive kraken
tepid olive
#

@marble perch we need a procursus package

#

pls

naive kraken
#

So using LHHookFunctions directly will break substrate and substitute

#

unless you depend on like libhooker compatiblity shim

tepid olive
#

weak symbols exist

indigo peak
# naive kraken problem is, you can't link both substrate and libhooker
void HookMemory(Class class, SEL selector, uint64_t offset, uint32_t data) {
    void *final_offset = (void *)[class instanceMethodForSelector:selector] + offset;
    
    if (hasLibhooker()) {
        struct LHMemoryPatch patch;
        patch.destination = final_offset;
        patch.data = &data;
        patch.size = sizeof(data);
        patch.options = NULL;

        LHPatchMemory(&patch, 1);
    } else {
        MSHookMemory(final_offset, (const void *)&data, sizeof(data));
    }
}
#

this seems to work

#

idk what youre talking about

naive kraken
#

won't work correctly

#

If libhooker is not installed, the dylib won't load

naive kraken
tepid olive
#

why

naive kraken
#

never works correctly

tepid olive
#

that's what MS and LH do

naive kraken
#

and on some jailbreaks the memoryhooker functions do way more

#

signing pages and stuff

tepid olive
#

Nobody does this

naive kraken
#

substrate does

tepid olive
#

Libhooker doesn't and it's fine

indigo peak
naive kraken
#

only because of the jailbreak supporting it

indigo peak
#

im checking to see if the file exists

#

and if not

tepid olive
#

Huh?

indigo peak
#

default to substitute

naive kraken
tepid olive
#

What does Taurine do more

#

Set CS_DEBUGGED for everyone?

indigo peak
#

does someone here have a substitute device

#

that can test smth for me

naive kraken
#

no need to test anything

#

if libhooker is in there, it won't load if libhooker is not installed

#

if you want to make your dylib determine whether to use libhooker or substrate at runtime, you need to stop linking libhooker and use dlopen and dlsym to get the pointer to LHHookFunctions and then call that

#

but as I said, coolstar does not like this, not entirely sure why

indigo peak
#

@rpath/libhooker.dylib (compatibility version 0.0.0, current version 0.0.0)

naive kraken
#

yep

#

this means when your dylib loads, libhooker gets loaded too

#

and if libhooker doesn't exist, dyld will refuse to load your dylib

tepid olive
indigo peak
#

oh i get it

tepid olive
#

why are you using lh api tho

#

idgi

naive kraken
tepid olive
#

how

naive kraken
#

because instead of shipping a shim, it ships both libsubstitute and libhooker

tepid olive
#

what did they do

#

LMAO

#

hii

#

libellekit in /usr/lib

#

libsubstrate and libhooker symlink (in another package?) possibly?

#

libinjector in /usr/lib as well

#

it can't run completely independently sadly

#

almost done

#

It implements libsubstrate and libhooker

indigo peak
naive kraken
#

when you use dlsym, no _ at the front

#

besides, yes

tepid olive
#

I could do the substitute API as well

#

I just doubt anyone uses it?

naive kraken
#

not even bingners own tweaks lol

tepid olive
#

sounds good

#

There's only the Swift API for that

#

I'm not providing a stable API atm

indigo peak
#

@naive kraken

bool hasLibhooker() {
    static void (*_LBHookMessage)(Class, SEL, void*, void*);
    if (!_LBHookMessage) {
        void *handle = dlopen("/usr/lib/libsubstrate.dylib", RTLD_LAZY);
        _LBHookMessage = dlsym(handle, "LBHookMessage");
    }
    if (_LBHookMessage) {
        return true;
    }
    return false;
}
#

i have 0 idea if thats right or not

tepid olive
#

guess what guys

#

i got the injector loading

naive kraken
#

hm

tepid olive
#

now i have to do little thingies and i can put it in launchd

naive kraken
#

yeah looks ok

indigo peak
#

now i need to make it check /usr/lib and or /var/jb/usr/lib

untold drift
tepid olive
#

it dies on launchd

#

so fun

#

oh forgot to lock

naive kraken
#
int (*__LHHookFunctions)(const struct LHFunctionHook *hooks, int count);

int HCHookFunctions(const struct LHFunctionHook *hooks, int count)
{
    static dispatch_once_t onceToken;
    dispatch_once (&onceToken, ^{
        void* lhImage = dlopen((rootifyCPath("/usr/lib/libhooker.dylib")), RTLD_NOW);
        if(lhImage)
        {
            NSLog(@"picking libhooker");
            // this is illegal according to coolstar but it works
            __LHHookFunctions = (void*)dlsym(lhImage, "LHHookFunctions");
            NSLog(@"__LHHookFunctions = %p", __LHHookFunctions);
        }
        else
        {
            NSLog(@"not picking libhooker");
        }
    });

    // if libhooker is available, use it
    if(__LHHookFunctions)
    {
        return __LHHookFunctions(hooks, count);
    }
    // otherwise, fall back to substrate
    else
    {
        for(int i = 0; i < count; i++)
        {
            struct LHFunctionHook hook = hooks[i];
            MSHookFunction(hook.function, hook.replacement, hook.oldptr);
        }
        return 0;
    }
}
#

this is what I do

tepid olive
#

huh

naive kraken
#
NSString* getRootPath(void)
{
    static NSString* rootPath = nil;

    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^
    {
        NSFileManager* fileManager = [NSFileManager defaultManager];
        NSDictionary* attributes = [fileManager attributesOfItemAtPath:@"/var/jb" error:nil];
        if(attributes)
        {
            NSString* fileType = attributes[NSFileType];
            if([fileType isEqualToString:NSFileTypeSymbolicLink])
            {
                NSString* destination = [fileManager destinationOfSymbolicLinkAtPath:@"/var/jb" error:nil];
                if(![destination isEqualToString:@"/jb"] && ![destination isEqualToString:@"/jb/"])
                {
                    rootPath = destination;
                }
            }
        }
        if(!rootPath)
        {
            rootPath = @"/";
        }
    });

    return rootPath;
}

NSString* rootifyPath(NSString* path)
{
    return [getRootPath() stringByAppendingPathComponent:path];
}

const char* rootifyCPath(const char* cPath)
{
    NSString* path = [NSString stringWithUTF8String:cPath];
    return rootifyPath(path).fileSystemRepresentation;
}
tepid olive
#

ok uhhhh

#

how am i supposed to debug now

indigo peak
#

whats the performance diff between dispatch_once & not using it at all

naive kraken
#

just good practice

#

just copy all of that tbh

#

works fine (at least from what I tested)

#

then just call HCHookFunctions instead of MSHookFunction / LHHookFunctions

ocean raptor
#

Or libiosexec

tepid olive
#

i can do this just send what i have to do

ocean raptor
tepid olive
#

ok i'll use a vmapple to test

untold drift
naive kraken
#

just put a cast there

untold drift
#

lol

#

thanks

tepid olive
#

@naive kraken Any idea why I can't attach lldb to launchd?

#

I get attach failed ((os/kern) invalid address)

#

SIP off, arm64e enabled

naive kraken
#

uhh

#

no idea

#

maybe launchd doesn't like being debugged

tepid olive
#

Sad

#

How would I get a backtrace otherwise

ocean raptor
#

@tepid olive you may be able to dtrace it

indigo peak
#

@naive kraken converted it to hook memory & not hook functions

int HookMemory(const struct LHMemoryPatch *patches, int count)
{
    static dispatch_once_t onceToken;
    dispatch_once (&onceToken, ^{
        void* lhImage = dlopen((rootifyCPath("/usr/lib/libhooker.dylib")), RTLD_NOW);
        if(lhImage) {
            __LHPatchMemory = (void*)dlsym(lhImage, "LHPatchMemory");
        }
    });

    // if libhooker is available, use it
    if(__LHPatchMemory) {
        return __LHPatchMemory(patches, count);
    } else {
        for(int i = 0; i < count; i++)
        {
            struct LHMemoryPatch patch = patches[i];
            MSHookMemory(patch.destination, patch.data, patch.size);
        }
        return 0;
    }
}
tepid olive
tepid olive
#

okay i don’t get it anymore

#

works in every arm64e remote process, but not launchd

tepid olive
#

i’m so close to having this work

#

the patch is installed, it just does nothing atm for some reason

untold drift
#

is there any way to call native c++ or c function in framework with tweak?

tepid olive
untold drift
#

function is not in header file. i found it in ida

timid furnace
#

is the symbol exported

untold drift
#

looking like symbol bcs start with _

timid furnace
#

well, if you are in ida, check the exports tab

#

the symbol starting with _ is not a good indicator of whether it is exported or not

untold drift
#

function looking in export

timid furnace
#

ok

#

next, what SDK are you using

untold drift
#

ios 11.4

timid furnace
#

that's your SDK? and not your deployment target?

untold drift
#

its my development target

#

im ios 15.0

timid furnace
#

what is your SDK

#

ok

#

now open $THEOS/sdks/iPhoneOS15.0.sdk/System/Library/(Private)Frameworks/<FrameworkName>.framework/<FrameworkName>.tbd

untold drift
#

the framework is target application's framework

timid furnace
#

oh

#

ok

#

in that case, you would want to declare the function in a header somewhere

#

with ```extern "C" {
// function declaration
}

#

if not, just extern is fine

untold drift
#

@interface SomeFramework:NSObject extern _someHiddenFunction(); @end

#

is that enough ?

timid furnace
#

i thought you said this was a c/c++ function

#

you would just leave it bare
so

// if tweak is Obj-C, and target function is C
// or if tweak is C++ and target function is C++
extern void someFunc();

// if tweak is C++ and target function is C
extern "C" void someFunc2();
#

then in your constructor, replace %init; with %init(someFunc = MSFindSymbol(NULL, "_someFunc"));

#

replace MSFindSymbol with whatever hooking API you're using

untold drift
#

when i use MSFindSymbol, app is crash

#

i tried this way

timid furnace
#

that probably means the framework isn't loaded yet and as such you have a null ptr

#

hm

#

maybe you can load the framework first

indigo peak
timid furnace
#

this is starting to get out of my wheelhouse though

indigo peak
#

try using libhooker instead of substitute

untold drift
#

thanks for your patience, and helpful supports

untold drift
indigo peak
#

@untold drift why cant you use hookf

#
char someFunc(int arg1, bool arg2);

%hookf(char, someFunc, int arg1, bool arg2) {
  char orig = %orig;
  // your code
  return orig;
}
untold drift
#

tried but crashing.. i think substitute not working well with xina

restive ether
#

don't worry nothing works with it really

indigo peak
#

@naive kraken do you think a wrapper for libhooker and subtrate would be useful

#

like it has a check for substrate libhooker

#

for all functions

naive kraken
#

besides, yeah I think this could work, but if done it should be done like the following: 2 separate packages, one that has like hookcompat.dylib that links libhooker and the other implements the same functions but links libsubstrate

#

and then when you have substrate or substitute it installs hookcompat (substrate) and when you have libhooker it installs hookcompat (libhooker)

#

this is also the only way to support all of this without using dlopen / dlsym

#

because you could just depend on hookcompat and link that

ocean raptor
#

@grave sparrow u up?

indigo peak
#

@naive kraken im just doing shit like this

int (*__LBHookMessage)(Class class, SEL selector, void *replacement, void *old_ptr);
int SHHookMessage(Class class, SEL selector, void *replacement, void *old_ptr) {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        void *lhImage = dlopen(rootifyCString("/usr/lib/libhooker.dylib"), RTLD_LAZY);
        if (lhImage) {
            __LBHookMessage = dlsym(lhImage, "LBHookMessage");
        }
    });

    if (__LBHookMessage) { // if we have libhooker, use it
        return __LBHookMessage(class, selector, replacement, old_ptr);
    } else { // otherwise use substitute
        MSHookMessageEx(class, selector, (IMP)replacement, (IMP *)old_ptr);
        return 0;
    }
}

int (*__LHHookFunctions)(const struct LHFunctionHook *hooks, int count);
int SHHookFunctions(const struct LHFunctionHook *hooks, int count) {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        void *lhImage = dlopen(rootifyCString("/usr/lib/libhooker.dylib"), RTLD_LAZY);
        if (lhImage) {
            __LHHookFunctions = dlsym(lhImage, "LHHookFunctions");
        }
    });

    if (__LHHookFunctions) {
        return __LHHookFunctions(hooks, count);
    } else {
        for (int i = 0; i < count; i++) {
            struct LHFunctionHook hook = hooks[i];
            MSHookFunction(hook.function, hook.replacement, hook.oldptr);
        }
        return 0;
    }
}
#

and then just publisdh the .h/m

naive kraken
#

because I haven't done that yet

indigo peak
#

smart

ocean raptor
#

dms

indigo peak
#

@naive kraken it seems to work on reg libhooker

#

at least LHPatchMemory/MSHookMemory

#

clarity just tested it on taurine

indigo peak
#

so i got HookMessage, HookFunctions and HookMemory with the rootless fix

#

idk what else to do

#

MSFindSymbol

#

that one

#

i think

timid furnace
#

wait

#

why are you doing this

indigo peak
#

xina's substitute is like half broken

#

so im making wrapper functions that detect libhooker and use that if its present

#

or substitute if its not present

#

basically making tweaks that use either one compatible with both libs

wheat grotto
#

Where do i edit the neofetch config on macos ? installed it via brew

neon jungle
#

How do I set this inside my objective C tweak?

wheat grotto
#

yea

#

kabylake SMBIOS on skylake

#

lfg

indigo peak
# neon jungle How do I set this inside my objective C tweak?
MSHookIvar<NSInteger>(object, "_orientation") = number;

// or

[self setValue:@(number), forKey:@"_orientation"];

// or

// look for a setter / getter for that and hook that getter/setter
// getter:
-(NSInteger)orientation {
  return number;
}
// setter:
-(void)setOrientation:(NSInteger)arg1 {
  %orig(number);
}
#

different ways i guess

indigo peak
#

any one of those would probably work

#

i said it earlier + less reading

#

i like helping people without actually describing what i did

#

gets the mind going

neon jungle
#

Yes it has an @tepid olive and a method

#

ooh

#

Sorry for ping I guess

indigo peak
#

its alright, my girlfriend doesnt mind getting pinged

#

(its funny because shes property)

neon jungle
#

How do you set a property instead of a method?

indigo peak
#

bro you think i have a girlfriend

#

funny guy

indigo peak
neon jungle
#

Nope

indigo peak
#

gotta join that

shut stag
#

got it

indigo peak
#

why

#

drive?

#

perfect

#

that answers your question

#

get that drunk guy back in the server'

wheat grotto
#

im broke stfu

primal perch
#

raptor lake >>>

primal perch
#

so true

noble zodiac
#

Hello guys, I don't know why is my code returning this error...

lime pivot
#

you can't throw a string. it needs to be an Error object

#

the error message says that

noble zodiac
#

how can I fix this ? I don't care if user get nothing if error

#

how to throw an error object

#

@lime pivot

lime pivot
#

well, the whole thing should be worth a read

gentle grove
lime pivot
#

well observed, bbaovanc#9999

noble zodiac
#

yes but i've mentionned I want to use string in static

#

@lime pivot

lime pivot
#

why?

#

your question isn't clear, sorry

noble zodiac
#

I just want to remove the throw thats it

#

not to fix it

#

but I don't know what to remove

lime pivot
#

I don't understand. comment it out then?

#

but the function still needs to return something, of course

#

either return a String or throw an Error

noble zodiac
lime pivot
#

you're not, though

#

you're throwing one

noble zodiac
#

return image["StatusBarCarrierName"] as! String

lime pivot
#

right, but the code won't reach that path 100% of the time

noble zodiac
#

wdym

lime pivot
#

hence why the throw is there, because there is a case where it can fail to find what you need

noble zodiac
#

yes and how can I fix that ?

lime pivot
#

if you comment out the throw line and try to build, you'll get an error that the function doesn't return a value on all paths

gentle grove
gentle grove
lime pivot
#

so, you need to make sure that final line of the func either returns a String, or throws an Error

#

hope that makes sense?

#

at the moment what you've got is trying to throw a String, which isn't possible

noble zodiac
#

Ok

#

I've fixed it

#

Now it's getting this error @lime pivot

lime pivot
#

it's hard for me to really give you good advice since I don't know the codebase you're working with. but indeed there is no function like that by default, if you copied that from somewhere, that codebase is defining an extension on UIApplication for that

noble zodiac
#

Any other way to spawn an alert ?

lime pivot
#

since you're using SwiftUI, there's a proper way to do it with SwiftUI modifiers

noble zodiac
#

like ?

lime pivot
#

really that code using a custom alert() function is a bit of a cheat, it works but it's not the "best" way to do it

noble zodiac
#

now it's getting me the error :
Cannot find 'ContentView' in scope

#

@lime pivot

noble zodiac
lime pivot
#

probably have a syntax error in ContentView.swift

noble zodiac
#

@lime pivot

lime pivot
#

that's not quite how Alert() works - you need to use it as a modifier on the view, so SwiftUI knows it needs to be displayed

#

otherwise it's kind of just a statement that does nothing, you create an Alert() but don't do anything with it

lime pivot
#

the .alert(…) bit is what you're missing, that attaches the alert to your view, so SwiftUI is aware of it

#

when your presentAlert state variable becomes true, SwiftUI knows it has to display the alert

noble zodiac
#
.alert("Hit !", isPresented: true, actions: {
                                    // actions
                                }, message: {
                                    Text("Please reboot your device. Made by C22")
                                })
                        } catch {
                            .alert("Title", isPresented: true, actions: {
                                // actions
                            }, message: {
                                Text("Message")
                            })
#

I get Value of tuple type '()' has no member 'alert'

#

@lime pivot

#

for the moment, i'm too lazy to figure out with alert, but i've put a print @lime pivot , however, i still get cannot find contentview in scope

turbid fjord
#

Then set the variable true/false depending on what your trying to do

#

If the variable is true then the alert will be presented

noble zodiac
#

Hey devs, how can I make an app restart the device that host it with non sandbox and root entitlements ?

sour ruin
#

Hey guys doing some SpriteKit but cant figure out why this doesnt work (Trying to move player)

unkempt raft
#

I also suggest you moving the player and move_Right (also rename it to moveRight) to ViewController for them to be instance variables

sour ruin
#

oh sorry to clarrify that was the ViewController

unkempt raft
sour ruin
unkempt raft
#

you can create a var scene: GameScene! at the top of ViewController and at the line where there's let sceneNode = scene.rootNode written you can write self.scene = sceneNode

#

this way the scene will now be set whenever it loads

unkempt raft
#
var scene: GameScene!

override func viewDidLoad() {
  ...
  if let sceneNode = scene.rootNode as? GameScene {
    self.scene = sceneNode
  }
}

func keyDown(...) {
   scene.movePlayer() 
}
#

I made a mistake by the way, you rather have to addChild from the GameScene

#

you can think of viewcontroller as being completely unrelated to game logic

#

never write anything inside it to move, add sprites

#

let me know if something's not clear

#

I'll be glad to help

sour ruin
#

ok is codeUnit the correct way to identify what key is pressed, if so is there documentation on what key has wha code?

unkempt raft
sour ruin
unkempt raft
#

Your scene (GameScene.swift usually contains GameScene in the template) has a function addChild

#

you can run the function addChild when the scene loads

#

in didLoad e.g.

#

addChild(spriteReference)

sour ruin
#

and then the node i would put in brackets is the just any sprite in the scene or...

tardy narwhal
#

I love you Craig but as an Apple SVP I expect you to know your own documentations!!

sour ruin
#

im trying to move a sprite after a keypress

#

@unkempt raft this is where im at still no movement either

thorn ether
#

Is there a way to enable landscape mode on a portrait mode locked app via Filza?

untold drift
#

why i get error: excess elements in scalar initializer

#

trying to find symbols and hook a function with libhooker.

#

doesnt any example of libhooker in github. its so hard to understand for me 😦

#

whats dc trick for show highlight code

#

anway doenst work xd

gentle grove
#

```
Code
```

untold drift
#

thanks 😄

gentle grove
untold drift
gentle grove
#

oh, what key board is it

untold drift
#

TR qwerty

#

const struct LHFunctionHook *hooks= {getC2MChecksum,rep_getC2MChecksum,0,options};

gentle grove
untold drift
gentle grove
#

Try it

untold drift
gentle grove
#

other than that idk

#

yeah

untold drift
#

copy paste work always xd

gentle grove
#

Oh

untold drift
#

symbols looking like an array

#

why no one share an example of libhooker 😦

#

thats looking like an array in array

#

and return error about of that

#

i will try another way. i want to learn libhooker but its so hard for code. substrate is very easy :d

#

if not function return type void ? or function has a parameters?

#

you did very good example. i will play with them all of night 🙂

#

im very thankful

#

i have last question about that. we found the symbol's address. but how can i call it ?

#

void *addressOfNSLog = addresses[0];
addressOfNSLog(); is enough?

#
typedef const char* (*FunctionType)(const char*);
FunctionType function = (FunctionType)addressOfgetC2MChecksum;
const char* res = function("test");
#

i tried that but crashing app when launch :d

#

yes

#

how can i found ptrauth_key_function_pointer?

#

ah okay i will try

#

i tried that but addresses same after authentication

untold drift
#

i cant access crash log bcs using windows without type c connection for phone 😦 i looked cr4shed tweak but not working.

tepid olive
#

still so weird seeing this channel actually used for development

thorn ether
#

tytyty

thorn ether
#

worked flawlessly for me on my ipad for a trollstore app, didnt have to resideload it either

noble zodiac
timid furnace
hasty ruin
tepid olive
#

now that’s more like the development channel

hardy hearth
#

I am trying to use theos/bin/nic.pl but keep getting "Killed: 9" Are there any solutions? iOS 14

#

I tried both manually installing and theosinstaller and the issue still persists

restive ether
#

delete everything and start over

#

and make sure you actually read step by step

#

and definitely don't use a theos installer becuase they're all wrong

hardy hearth
#

Ye you are right I ran it as root and I reckon that was the issue, let me try without