#development

1 messages · Page 49 of 1

radiant idol
#

int

hasty ruin
#

but BOOL can also be a signed char

cloud yacht
#

Have some code chatGPT wrote for me ```objc
@interface🌺🍎:👨‍👩‍👧‍👦
@property(👀,💪)👩‍💼*💼;
@end
@implementation🌺🍎

  • (void)🍏🍏🍏:(🍎*)🍎 {
    [self.💼🌸🌸🌸:🍎];
    }
    @end
hasty ruin
#

BOOL definition in objc.h

#if (TARGET_OS_IPHONE && __LP64__)  ||  TARGET_OS_WATCH
#define OBJC_BOOL_IS_BOOL 1
typedef bool BOOL;
#else
#define OBJC_BOOL_IS_CHAR 1
typedef signed char BOOL; 
// BOOL is explicitly signed so @encode(BOOL) == "c" rather than "C" 
// even if -funsigned-char is used.
#endif

#define YES ((BOOL)1)
#define NO  ((BOOL)0)```
radiant idol
#

but why

hasty ruin
#

don't forget Boolean!

radiant idol
#

no.

hasty ruin
#

_Bool too

hasty ruin
#

bool
Introduced to standard C in the C99 spec. (The C99 standard was published in 1999, but it took some years after that to become widespread in use.) Prior to that, "plain" C had no built-in Boolean type, so libraries that built on top of C often defined their own. (And often continued using their own types for source/binary compatibility even after they embraced C99 compilers.)

Use this if you're writing ISO C and aren't working in the context of higher level libraries with their own Boolean types.

Boolean
Defined by Carbon (the early-OSX-days compatibility bridge from the even older Mac Toolbox), which you might still see in some projects (due to transitive #include of headers that are really only around for compatibility with really old source code).

Don't use this.

BOOL
Defined by ObjC because NeXTSTEP needed its own Boolean type back in 1988. (The oldest objc.h I can find on my office bookshelf dates to 1992 and includes a definition of BOOL.)

ObjC BOOL has often been defined as typedef signed char, meaning that it can hold more values than just YES (1) and NO (0). That can be a problem if you aren't careful. (Why even do that? Because if a type is one bit wide, it's hard to pack into well-aligned memory for good performance.)

However, in iOS 64-bit (including tvOS) and watchOS, the compiler defines OBJC_BOOL_IS_BOOL, which makes ObjC BOOL just an alias for C99 bool. That means the language/compiler ensures that nonzero values are always stored as 1, so you don't have the issues that come from typedef signed char BOOL. (Still gotta worry about them on macOS or 32-bit iOS, though.)

TLDR
If you're working in ObjC with ObjC frameworks (like Cocoa, UIKit, etc), you should use BOOL for consistency with the APIs you're interacting with. (Besides, YES and NO are much louder than true and false, and it's good to be emphatic when you're talking about absolute truth, right?)

#

just wrote that entirely by myself

#

boolean_t trol

radiant idol
#

im still using true and false

vale oxide
#

its much louder

radiant idol
#

copium

vale oxide
#

hasty ruin
topaz yew
#

Stop nightwindi

hasty ruin
#

wtf its half 3 already

#

i gotta stop talking about booleans and go to bed

#

gotta be up in 3h

vale oxide
#

you dumbass

#

go to bed

hasty ruin
#

no longer helping you

vale oxide
#

😭

radiant idol
gentle grove
#

@hasty ruin stop watching gorn and go to bed

hasty ruin
#

no

#

i can't stop it

vale oxide
#

the brain needs sleep

#

weekend soon

#

then you can pull an all nighter with gorn

cloud yacht
hasty ruin
#

i memorised them

cloud yacht
hasty ruin
#

it bypasses dopamine's hook somehow

vale oxide
#

ok so how do i respring then

hasty ruin
#
#import <rootless.h>
#import <spawn.h>

then

pid_t pid;
const char* args[] = {"sbreload", NULL, NULL};
posix_spawn(&pid, ROOT_PATH("/usr/bin/sbreload"), NULL, NULL, (char* const*)args, NULL);```
vale oxide
#

and xina?

hasty ruin
#

should be fine

#

think ROOT_PATH checks if the path exists, else prefixes /var/jb

vale oxide
#

Preferences will be fun to figure out

naive kraken
#

it uses preprocessor macro

hasty ruin
#

Did these change?

naive kraken
#

Do not use these

hasty ruin
#

Ah

#

new GitHub ui sucks bruh

#

had to view raw bc they seemingly broke mobile support

vale oxide
#

hi opa

#

do you use swift or obj-c

naive kraken
#

obj-c

lime pivot
#

with the very easy to type kCFBooleanTrue and kCFBooleanFalse

hasty ruin
#

I love cf but also hate it

lime pivot
#

the purpose of CF is just weird these days

#

back then you could claim it was handy because it was a pretty fast and comprehensive C implementation of the base types you need

#

now it's like, it's there because it has to be there

#

I mean it's had ObjC in it since iOS 6, which is when NSObject was moved from Foundation to libobjc, so it's barely just C any more

#

I do wonder how much of ObjC would still exist if C++ came first

#

because objc does predate C++ by a few years

naive kraken
#

my favorite part of it is that kCFBooleanTrue and NSNumber 1 are not equivalent

cloud yacht
#

Man objective C is a lovely language

lime pivot
#

and people say javascript is crazy

#

objc was the OG crazy language

cloud yacht
#

Oh I just must be crazy

#

uses js and objc

graceful gate
#

@ objc trol

cloud yacht
#

My code compiles so therefore it must be good

hasty ruin
#

??

cloud yacht
#

totally doesn't crash springboard

lime pivot
#

the compiler doesn't have very high standards bro

cloud yacht
hasty ruin
#

I’m gonna sleep before capt finishes typing so he has to wait 2 hours for a reply thumbsUpSwag

cloud yacht
#

sleep for 2 hours

#

RIP you

#

#import spawn.h>

#

:trol

lime pivot
#

we do a little :trol ing

cloud yacht
timid furnace
#

why aren't we just using that kirb post

#
    SBSRelaunchAction* restartAction = [SBSRelaunchAction actionWithReason:@"RestartRenderServer" options:SBSRelaunchActionOptionsFadeToBlackTransition targetURL:relaunchURL];
    [[FBSSystemService sharedService] sendActions:[NSSet setWithObject:restartAction] withResult:nil];
``` or something like that
vale oxide
#

why confuse me

timid furnace
#

man

#

wtf is the difference

#

man

#

so which one should i actually use

#

man

faint timber
#

if you killall spring or back in 2023 you need to be banned from dev

cloud yacht
#

we have a tool for that too

#

but i think it might be not recommnended now maybe

ocean raptor
cloud yacht
#

yeah smth like that

ocean raptor
#

Wait

#

sbreload sucks

#

wtf is this

#

So if sending the sbreload thing doesn't give springboard or backboard a new pid within 2 seconds it will launchctl stop them androidskull

#

I hate this

#

Why not launchctl restart or whatever it's called

#

Also ldrestart sucks

cloud yacht
#

oh yeah that was the one i was thinking of

tepid olive
#

thanks you, it doesnt crash anymore but it also doesnt hook sadly

tepid olive
#

tf you talking about, sbreload literally calls RestartRenderServer

#

it seems to be using slightly different args though

#

not sure if that matters

primal perch
#

capt wrong

lime pivot
#

stop will cause a KeepAlive daemon to immediately restart so it’s fine

ocean raptor
#

launchctl ios 12-15 are all fairly identical

lime pivot
#

which springboard and backboardd are

#

because well, I don’t think you want a springboard crash bricking the phone till you force reboot

ocean raptor
#

And there were some minor xpc pipe changes

#

But otherwise

lime pivot
#

what’s the 14 one from?

ocean raptor
#

I had three sources

#
  1. Leaks
  2. Simulator
  3. macOS
#

I think iOS 14 was a simulator

#

iOS 12 was a leak

lime pivot
#

that… seems like a bad idea

ocean raptor
#

Wdym

tepid olive
#

to hook functions using ellekit on jailed, its like this? void MSHookFunction(void *symbol, void *hook, void **old);

#

Discord deleted the pointer

#

wrap it in backticks

tepid olive
wheat grotto
#

It looks like the jwt token expires right away, even tho im setting expiresIn to 3600

#
console.log(process.env.JWT_EXPIRES)

        const token = jwt.sign({ email: user.Email }, process.env.SECRET_KEY, {
            expiresIn: process.env.JWT_EXPIRES,
        });
#

idk if signing the email is good or not but all i care about is that it works

#

Thats it.

tepid olive
#

Is this for ellekit too? Jailed ios
void MSHookFunction(void *symbol, void *hook, void **old);

#

yes

#

if it doesn’t work then you’re doing something wrong coz it works for me

#

are you on arm64e

#

ie A12 or higher

#

let me see

#

A14

wheat grotto
tepid olive
#

would this be correct as an exampleMSHookFunction((void *)getRealOffset(0x12345678), (void *)newFunction, (void **)&oldFunction);

vale oxide
#

this i cool

tepid olive
#

i forgot 2 brackets didnt i?

faint timber
tepid olive
faint timber
#

no shit

#

but where did it come from

tepid olive
#

let me see

faint timber
#

you really should be writing your own code

#

otherwise you don't learn shit

tepid olive
faint timber
#

smh

#

write your own code please

tepid olive
#

ok

#

one second

tepid olive
# faint timber write your own code please
{
    uint32_t image_count = _dyld_image_count();

    for (uint32_t i = 0; i < image_count; i++)
    {
        const char *image_name = _dyld_get_image_name(i);
        if(strstr(image_name, "UnityFramework"))
        {
            return _dyld_get_image_vmaddr_slide(i) + offset;
        }
    }

    return _dyld_get_image_vmaddr_slide(0) + offset;
}
faint timber
#

that looks wrong

tepid olive
#

why

faint timber
#

nevermind I missed the return in the loop

#

pretty cool

tepid olive
#

idk it doesnt hook

#

no crash, just doesnt hook.

#

its for arm64 right

faint timber
#

its bad logic

#

you really should look for image slide on request, not default

#

because it will fall back to executable slide

#

thats just bad logic

tepid olive
#

It only looks for it when doing getrealoffsrt

faint timber
#

you use two functions, or you tell said function the behavior

#

parameters?

tepid olive
#

?

#

Thats the entire getrealoofset

#

with parameters

faint timber
#

hahaa

#

this was supposed to be your code

#

so you can change it as you please

#

add more parameters

tepid olive
#

ok

faint timber
#

remove them

#

a suggestion is to have two slide functions

#

one for images, the other for executable 0

#

the param 2 can be the image name that get's strstr'ed

tepid olive
# faint timber the param 2 can be the image name that get's strstr'ed
uint64_t ownGetRealOffset(uint64_t offset, str image)
{
    uint32_t image_count = _dyld_image_count();

    for (uint32_t i = 0; i < image_count; i++)
    {
        const char *image_name = _dyld_get_image_name(i);
        if(strstr(image_name, image))
        {
            return _dyld_get_image_vmaddr_slide(i) + offset;
        }
    }

    return _dyld_get_image_vmaddr_slide(0) + offset;
}
#

wait not str

#

string

#

rivht

#

Std::string?

#

i think it would be just char * since you're passing it to strstr

#

ok

tepid olive
faint timber
tepid olive
faint timber
#

for the second function

#

do you understand you are making one for hardcode 0 and one for image slide?

tepid olive
faint timber
#

Transparency is key

grave sparrow
tepid olive
#

the offset works when using another hooking method

#

i can test it on my other phone

#

but maybe i missed something in the makefile

#

Maybe it uses the original substrate instead of ellekit

tepid olive
#

i can’t automatically add the slide when i don’t know what module your symbol is in

tepid olive
#

which one

tepid olive
tepid olive
#

It should work

#

I tested this many times

#

here sweetie i just tested it for you on A13

#

hope ur happy

#

ok one second ill post the hook and the function

#
int(*oldScore)(void *instance);
int newScore(void *instance) {
    if(score) {
        return -300;
    }
    return oldScore(instance);
}

MSHookFunction(((void *)ownGetRealOffset(0x2DCAEB8, "UnityFramework")), (void *)newScore, (void **)&oldScore);
#

i put the mshookfunction in a function which gets called after app start

#
uint64_t ownGetRealOffset(uint64_t offset, char *image)
{
    uint32_t image_count = _dyld_image_count();

    for (uint32_t i = 0; i < image_count; i++)
    {
        const char *image_name = _dyld_get_image_name(i);
        if(strstr(image_name, image))
        {
            return _dyld_get_image_vmaddr_slide(i) + offset;
        }
    }
    return _dyld_get_image_vmaddr_slide(0) + offset;
}


#

its the .framework

#

no, i tried another function from soemone else too. That one worked for me on jailbroken and on jailed using the other hook function

#

but not with this hook

#

Yes

#

ARCHS = arm64
DEBUG = 0
FINALPACKAGE = 1
FOR_RELEASE = 1
IGNORE_WARNINGS=1
TARGET = iphone:clang:latest:15

PROJ_COMMON_FRAMEWORKS = UIKit Foundation Security QuartzCore CoreGraphics CoreText

## source files ##
KITTYMEMORY_SRC = $(wildcard KittyMemory/*.cpp)
SCLALERTVIEW_SRC =  $(wildcard SCLAlertView/*.m)
MENU_SRC = Menu.mm

include $(THEOS)/makefiles/common.mk

TWEAK_NAME = jpg

jpg_CFLAGS = -fobjc-arc
jpg_CCFLAGS = -std=c++11 -fno-rtti -fno-exceptions -DNDEBUG

ifeq ($(IGNORE_WARNINGS),1)
  jpg_CFLAGS += -w
  jpg_CCFLAGS += -w
endif


jpg_FILES = Tweak.xm $(MENU_SRC) $(KITTYMEMORY_SRC) $(SCLALERTVIEW_SRC)

jpg_LIBRARIES += substrate

jpg_LDFLAGS += -L. -lellekit

jpg_FRAMEWORKS = $(PROJ_COMMON_FRAMEWORKS)
# GO_EASY_ON_ME = 1

include $(THEOS_MAKE_PATH)/tweak.mk```
#

why are you adding substrate

#

?

#

yes i use sideloadly

#

what

#

he probably didn’t even include ellekit inside 💀

#

💀

tepid olive
#

Azule?

#

you can use export ipa in sideloadly, remove substrate and add ellekit and then sideload it

#

ok

#

but then ellekit has to be resigned

#

yes

#

does trollstore work

#

So,
1.Inject my tweak and Ellekit
2.Export eithout substrate ticked
3.sign with that website
4.sideload with trollstore?

#

are u sure

harsh junco
#

fr

timid furnace
#

yes

#

same

tepid olive
#

So not inject ellekit.dylib in sideloadly? And where do i get ellekit files

#

i got the dylib

#

is that all

#

one for arm64 one for arm right

#

i only got ellekit.dylib

timid furnace
#

there is no stub dylib

#

well fuck you

tepid olive
#

so delete cydiasubstrate.framework folder

timid furnace
#

but yea you only need to worry about ellekit.dylib

#

also capt make sure you help them with rpath

#

with their tweak's LCs?

tepid olive
#

and then paste ellekit inside

#

ok

timid furnace
#

and ellekit.dylib's install name?

#

alr

tepid olive
#

libellekit.dylib

timid furnace
#

wrong as in "there should be more than one" or "i don't like this approach"

#

no this has been a thing forever

#

libsubstrate has been a symlink to ellekit for a long time

#

and you don't need libinjector and such

#

oh

#

bruh

#

i do

#

i handle the packaging stuff

tepid olive
#

do i need to put something in the fields

timid furnace
#

sure but the tweak's load commands, you should change @rpath/CydiaSubstrate.framework/CydiaSubstrate to @rpath/libellekit.dylib right

tepid olive
#

new app id, app display name, app version, app short version

timid furnace
#

ngl its probably easier to just replace the CydiaSubstrate file with the ellekit dylib

#

smh

#

ok

#

wait

#

frameworks dir or libraries dir

#

idk if the latter exists in app bundles

#

ok ig we'll figure it out

#

@tepid olive ping me when you are alive again

timid furnace
#

ok so what are you up to so far

#

exporting the app from sideloadly?

tepid olive
#

install_name_tool -change old new?

tepid olive
timid furnace
#

ok yea make sure you don't modify any of the info.plist fields

#

ok

#

so rename the .ipa to .zip

#

unzip the app

tepid olive
#

i did

timid furnace
#

you should see a Frameworks/CydiaSubstrate.framework directory

#

delete CydiaSubstrate.framework

tepid olive
#

yes

timid furnace
#

copy libellekit.dylib or whatever it's named into the Frameworks directory

tepid olive
#

yes

timid furnace
#

then look for MyTweak.dylib

#

tell me where you find it

tepid olive
timid furnace
#

ok

#

we're gonna change it from looking for substrate to looking for ellekit

#

in a terminal

#

run otool -L dragMyTweak.dylibhere

#

show me the output

tepid olive
# timid furnace show me the output

@executable_path/Frameworks/jpg.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/System/Library/Frameworks/Foundation.framework/Foundation (compatibility version 300.0.0, current version 1971.0.0)
/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (compatibility version 150.0.0, current version 1971.0.0)
/System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 6441.1.101)
/System/Library/Frameworks/Security.framework/Security (compatibility version 1.0.0, current version 60420.102.1)
/System/Library/Frameworks/QuartzCore.framework/QuartzCore (compatibility version 1.2.0, current version 1.11.0)
/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics (compatibility version 64.0.0, current version 1690.5.4)
/System/Library/Frameworks/CoreText.framework/CoreText (compatibility version 1.0.0, current version 1.0.0)
@executable_path/Frameworks/CydiaSubstrate.framework/CydiaSubstrate (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1500.65.0)
/usr/local/lib/libellekit.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
/System/Library/Frameworks/Accelerate.framework/Accelerate (compatibility version 1.0.0, current version 4.0.0)
/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox (compatibility version 1.0.0, current version 1000.0.0)

timid furnace
#

uh

#

why is /usr/local/lib/libellekit.dylib there dead

timid furnace
#

its probably from -Lellekit dead

tepid olive
#

Yes

timid furnace
#

ok um

#

that's gonna be a problem

tepid olive
#

ok do i need to remove -lellekit

timid furnace
#

yes

tepid olive
#

ok

#

one sec

timid furnace
#

and then redo all the steps

tepid olive
# timid furnace and then redo all the steps

@executable_path/Frameworks/jpg.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/System/Library/Frameworks/Foundation.framework/Foundation (compatibility version 300.0.0, current version 1971.0.0)
/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (compatibility version 150.0.0, current version 1971.0.0)
/System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 6441.1.101)
/System/Library/Frameworks/Security.framework/Security (compatibility version 1.0.0, current version 60420.102.1)
/System/Library/Frameworks/QuartzCore.framework/QuartzCore (compatibility version 1.2.0, current version 1.11.0)
/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics (compatibility version 64.0.0, current version 1690.5.4)
/System/Library/Frameworks/CoreText.framework/CoreText (compatibility version 1.0.0, current version 1.0.0)
@executable_path/Frameworks/CydiaSubstrate.framework/CydiaSubstrate (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1500.65.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
/System/Library/Frameworks/Accelerate.framework/Accelerate (compatibility version 1.0.0, current version 4.0.0)
/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox (compatibility version 1.0.0, current version 1000.0.0)

timid furnace
#

ok

#

ellekit is gone

#

good

#

now we're gonna change substrate to ellekit

#

it's named libellekit.dylib right

tepid olive
#

yes

timid furnace
#

ok

#

install_name_tool -change "@executable_path/Frameworks/CydiaSubstrate.framework/CydiaSubstrate" "@executable_path/Frameworks/libellekit.dylib" dragMyTweak.dylibhere

#

it's gonna complain about code signature, ignore it

#

that's what iOS app signer is for

#

after this drag in libellekit.dylib into the Frameworks folder

tepid olive
timid furnace
#

no

tepid olive
#

Ok i did that

timid furnace
#

ok

#

now rezip the ipa

#

you know how to do this right

tepid olive
#

@executable_path/Frameworks/jpg.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/System/Library/Frameworks/Foundation.framework/Foundation (compatibility version 300.0.0, current version 1971.0.0)
/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (compatibility version 150.0.0, current version 1971.0.0)
/System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 6441.1.101)
/System/Library/Frameworks/Security.framework/Security (compatibility version 1.0.0, current version 60420.102.1)
/System/Library/Frameworks/QuartzCore.framework/QuartzCore (compatibility version 1.2.0, current version 1.11.0)
/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics (compatibility version 64.0.0, current version 1690.5.4)
/System/Library/Frameworks/CoreText.framework/CoreText (compatibility version 1.0.0, current version 1.0.0)
@executable_path/Frameworks/libellekit.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1500.65.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
/System/Library/Frameworks/Accelerate.framework/Accelerate (compatibility version 1.0.0, current version 4.0.0)
/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox (compatibility version 1.0.0, current version 1000.0.0)

#

after otool again

timid furnace
#

looks good

tepid olive
timid furnace
#

ok

#

do it

#

then sign it with ios app signer and sideload it

tepid olive
#

Ok

tepid olive
vale oxide
#

x = [appUserDefaults objectForKey:@"slidex"] ? [[appUserDefaults objectForKey:@"slidex"] int] : 0;

timid furnace
#

well

#

you need to replace the tweak dylib

#

do install_name_tool again

vale oxide
timid furnace
#

copy ellekit

#

and then resign

tepid olive
timid furnace
#

also i'm pretty sure the method isn't just called "int"

#

it's probably intValue or something

vale oxide
tepid olive
timid furnace
timid furnace
#

then call intValue on it

#

man

honest star
#

ktool is being very annoying. I use the command ktool dump --headers --out RandomHeaders some_random_binary but I just get a whooole lot of errors saying ERROR - ktool.objc:L#678:Class:from_image() - Loading a class failed Anyone else ran into this? Just tryna dump iOS app headers.

timid furnace
#

what is the binary from

honest star
#

SoundCloud

timid furnace
#

did you decrypt the ipa

honest star
#

Yeah I got it from anyipa

vale oxide
#

wat

timid furnace
#

ok

#

appUserDefaults is an NSUserDefaults instance right

vale oxide
#

yeah

timid furnace
#

oh they have an integerForKey method

#

ok

#

right now you're using objectForKey to get the value

#

this returns an id

#

well it's really a NSObject

#

but whatever

#

it doesn't specifically return an NSNumber

#

because from its perspective, it could be anything. you could have made that thing a text field for example

#

does this take decimals

#

your slider

vale oxide
#

no

#

whole numbers only

timid furnace
#

ok

#

so you have two options here:

  1. cast it, and deal with it yourself if it's not the specific type you want
  2. use integerForKey. this will return an NSInteger so you don't have to deal with casting it, however if the value was never set it will return 0
#

or you could use integerForKey trol

#

the default for integerForKey is 0

#

if you want to use a different default then yea integerForKey goes out the window and you can use this

#

although uh

#

?: is a thing?

#

you don't need an expression in between ? and :

#

?

#

damn

#

man wtf

#

no one told me this

#

is this objc specific

#

oh

#

it's a GNU extension

#

L

tepid olive
#

cuz it crashes

timid furnace
#

i uh

#

what

tepid olive
#

none there

#

Nothing there

#

i search the binary but only crash logs from yesterday

#

trollstore works right

#

i put it in app signer then downloaded on ipad and used trollstore

#

yes

#

629,5

#

maybe the signer changed something of the plist

timid furnace
#

is bobashare fast

vale oxide
#

IT WORKS

#

AHAHAHAAHHA

tepid olive
#

does the signer change anything from bundle id

timid furnace
#

only 30mb/s

#

sad

vale oxide
#

is it possible to make a slider that goes up by whole numbers

tepid olive
#

Thats what makes crash probably. The app has jailed detection but i found a bypass and the dev said to not change bundle id

tepid olive
#

tomorrow

timid furnace
#

why you bothering with signing if you're just gonna use trollstore

vale oxide
#

^^

#

im a tweak developer

#

i made a red rectangle

#

my greatest achivement

celest quiver
vale oxide
celest quiver
#

L

timid furnace
#

what

#

@vale oxide are you not using a PSSliderCell

vale oxide
#

also can i use UIColor with rgb values?

sharp moth
#

import os
from pathlib import Path

DIRECTORIES = {
"HTML": [".html5", ".html", ".htm", ".xhtml"],
"IMAGES": [".jpeg", ".jpg", ".tiff", ".gif", ".bmp", ".png", ".bpg", "svg",
".heif", ".psd"],
"VIDEOS": [".mkv", ".avi", ".flv", ".wmv", ".mov", ".mp4", ".webm", ".vob", ".mng",
".qt", ".mpg", ".mpeg", ".3gp"],
"DOCUMENTS": [".oxps", ".epub", ".pages", ".docx", ".doc", ".fdf", ".ods",
".odt", ".pwi", ".xsn", ".xps", ".dotx", ".docm", ".dox",
".rvg", ".rtf", ".rtfd", ".wpd", ".xls", ".xlsx", ".ppt",
"pptx"],
"ARCHIVES": [".a", ".ar", ".cpio", ".iso", ".tar", ".gz", ".rz", ".7z",
".dmg", ".rar", ".xar", ".zip"],
"AUDIO": [".aac", ".aa", ".aac", ".dvf", ".m4a", ".m4b", ".m4p", ".mp3",
".msv", "ogg", "oga", ".raw", ".vox", ".wav", ".wma"],
"PLAINTEXT": [".txt", ".in", ".out"],
"PDF": [".pdf"],
"PYTHON": [".py"],
"XML": [".xml"],
"EXE": [".exe"],
"SHELL": [".sh"],
"BAT": [".cmd", ".bat"]

}

FILE_FORMATS = {file_format: directory
for directory, file_formats in DIRECTORIES.items()
for file_format in file_formats}

def organize_junk():
for entry in os.scandir():
if entry.is_dir() or entry.name == "Orger.py":
continue
file_path = Path(entry)
file_format = file_path.suffix.lower()
if file_format in FILE_FORMATS:
directory_path = Path(FILE_FORMATS[file_format])
directory_path.mkdir(exist_ok=True)
file_path.rename(directory_path.joinpath(file_path))

    for dir in os.scandir():
        try:
            os.rmdir(dir)
        except:
            pass

if name == "main":
organize_junk()

#

only VSCode debugger can run that sh1t not Python 3.11

#

bruh i wont get an answer

tepid olive
#

not true, but if you mismatch app id and bundle id that breaks some things

sharp moth
#

o ye

tepid olive
#

you can also create a wildcard cert that's just * using xcode if you don't need special entitlements

#

or on web portal you can do com.* etc

sharp moth
#

so i wanna run this code with Python 3.11 but only VSCode debugger runs it what do i do?

tepid olive
#

you're wrong

#

you can literally sideload with a mismatching bundle id, it just breaks some features that assume the app id is the same as the bundle id

#

i literally have apps with mismatched bundle id and app id sideloaded on ios 16.4 rn

#

that's how push notifications can work in sideloaded apps

#

also xcode can still create * provisioning profiles, though i have not actually tried using those yet

#

do i need to add ellekit anywhere in the makefile

#

maybe its bc of trollstore, do you know any other way to sign

#

tomorrow as i said

#

<t:1683957600>

sharp moth
#

ok

#

IT WORKED

#

but why do right clicking and opening with python doesnt work?

cursive rampart
#

when is french hate month

tepid olive
sharp moth
cursive rampart
sharp moth
#

im french

cursive rampart
#

L bozo

tepid olive
#

skill issue

sharp moth
#

why hate?

tepid olive
#

nah jk

cursive rampart
#

because french

sharp moth
#

mothafaker

cursive rampart
#

how many revolutions per minute is france

sharp moth
#

69

cursive rampart
#

oh

tepid olive
#

only in paris

timid furnace
#

@grave sparrow what's the manual way of objc hooking

#

objc_exchangeImplementations?

#

im getting tired of not having clangd

tepid olive
#

clang

timid furnace
#

i want my format document and code completion back

tepid olive
#

clang moment

timid furnace
#

yes

#

except calling the original gets funky iirc

#

the last time i tried it at least

#

no i mean with method_exchangeImplementations i ended up in a loop

#

somehow

#

im gonna miss logos syntax tho

#

sad

#

yea when eta send

cold basin
#

help friends, I have connected rootless.h in kitty memory and I now have deb running on dopamine but the functions don't work

vale oxide
#

what is the best way to do color picking with prefrences?

restive ether
#

i guess if you only care about ios 14+ (or 15+? i can’t remember) you can use the uikit one also. the link has the differences between the two

vale oxide
#

yeah ima just use the uikit one

#

how do i make this return a color and how can i make it activate from preference loader?

#

actually the activate is the easy part

#

its the getting the data back i dont know about

ocean raptor
#

ZFHookBalls

vale oxide
ocean raptor
vale oxide
ocean raptor
gentle grove
#

7 emails

twilit jungle
gentle grove
vale oxide
#
#import <Alderis/Alderis.h>
#import <UIKit/UIKit.h>
@interface CSCoverSheetViewController : UIViewController
@end

NSString *const domainString = @"com.zanehelton.redrectangle";
static BOOL enabled;
static int x;
static int y;
static UIColor *coolColor;
%group tweak
%hook CSCoverSheetViewController
- (void) viewDidLoad {
    %orig;
    //loadPrefs();
    //UIColor *color = [UIColor colorWithRed:177.0 / 255.0 green:120.0 / 255.0 blue:255.0 / 255.0 alpha:1.0];
    UIView *redRectangle = [[UIView alloc] initWithFrame:CGRectMake(x, y, 200, 200)];
    [redRectangle setBackgroundColor:[UIColor coolColor]];
    [self.view addSubview:redRectangle];
}
%end
%end

void loadPrefs() {
    NSUserDefaults *appUserDefaults = [[NSUserDefaults alloc] initWithSuiteName:domainString];
    enabled = [appUserDefaults objectForKey:@"enabledK"] ? [[appUserDefaults objectForKey:@"enabledK"] boolValue] : NO;
    x = [[appUserDefaults objectForKey:@"slidex"] ?: @(0)  intValue];
    y = [[appUserDefaults objectForKey:@"slidey"] ?: @(0)  intValue];}
    NSString *coolColorHex = [appUserDefaults objectForKey:@"color"];
    UIColor *coolColor = LCPParseColorString(coolColorHex, @"#ff0000");
%ctor{
    loadPrefs();
    if (enabled) {
        %init(tweak);
    }
}
vale oxide
#

Anyone know what’s wrong here?

tepid olive
#

So the app i inject my jailed tweak in crashes on opening and i get no logs, so ill say my steps here and i want to know if i did anything wrong.

  1. build my tweak without adding or linking ellekit anywhere
  2. inject the tweak into an ipa using sideloadly and export it
  3. unzip the ipa and deleting cydiaSubstrate folder in frameworks
  4. adding libellekit.dylib into frameworks folder
  5. changing the path to cydia substrate of my tweak to ellekit using install_name_tool
  6. re zip the payload folder
  7. rename to ipa
  8. put in ios app signer and dont fill any other field
  9. install with trollstore
  10. crash on opening
wheat grotto
# vale oxide Anyone know what’s wrong here?

The error messages indicate several issues in your code:

error: no known class method for selector 'coolColor': The UIColor class does not have a class method called coolColor. You might have intended to set the background color using the coolColor variable, but it is not defined properly.

error: unknown receiver 'appUserDefaults'; did you mean 'NSUserDefaults'?: There is a typo in the variable name. It should be NSUserDefaults instead of appUserDefaults.

error: no known class method for selector 'objectForKey:': The NSUserDefaults class does not have a class method called objectForKey:. You should use an instance of NSUserDefaults to access its methods.

error: initializer element is not a compile-time constant: You cannot assign a value returned by a method (in this case, objectForKey:) directly as an initializer. You should move the initialization of coolColorHex to a separate line.

error: non-static declaration of 'coolColor' follows static declaration: You have declared coolColor as both a static variable and as a local variable inside the loadPrefs() function. Remove the static declaration at the top of your code to avoid conflicts.

error: implicit declaration of function 'LCPParseColorString' is invalid in C99: The function LCPParseColorString is not recognized. Make sure you have included the necessary headers or imported the required libraries for this function.

hollow scroll
#

Looking for help updating tweaks to rootless. didn't find much info on r/jailbreakdevelopers

I understand that i need to change some paths but i dont want to break anything for existing users.
Also, do i need a mac to compile for rootless or can i use Linux/WSL?

faint timber
#

You will need to build your own toolchain Apple llvm swift 5.8 branch probably or Mac

tepid olive
#

and yea if you want it to work on a12+ you should ideally use a mac with xcode 12 or newer, otherwise users may have to install "legacy arm64e support" for your tweak to work

(if you still want to support ios 13 and below, you should compile the rootful package with xcode 11.7)

hollow scroll
faint timber
#

New cpu subtype need new compiler

#

Oh and it’s closed source I think so yah you need a Mac regardless

#

Thanks Apple…

hollow scroll
#

Okay guess I'll get someone with a mac.
now just making sure, what paths would need a change?
I have @"/var/mobile/Library/Preferences/...." for preferences. is that also considered rootful?

tepid olive
#

if you're using NSUserDefaults it will be automatically redirected for you but you can still wrap it in the macro just in case

hollow scroll
#

I am not using NSUserDefaults, i am just reading a .plist for the preferences

#

so /var/jb has a preference folder in it?

tepid olive
#

yes

hollow scroll
#

And what does this ROOT_PATH_NS() macro do exactly? how do i keep support for .plists that are in /var/mobile/Library/Preferences/ while also supporting rootless in var/jb?

tepid olive
#

compile for rootful:

make clean package FINALPACKAGE=1

compile for rootless:

make clean package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless

in the former case THEOS_PACKAGE_INSTALL_PREFIX (which is used by the macros) expands to "", in the latter case it expands to "/var/jb"

hollow scroll
#

So there exists a /var/jb/var/mobile/Library/Preferences/?

#

sounds kind of wrong

tepid olive
#

yes, that's a thing

hollow scroll
#

okay as long as it works

#

thanks, it really helped 🙂

tepid olive
hollow scroll
hasty ruin
tepid olive
#

it's annoying how you can't depend on oldabi only for arm64e devices

#

because cy+cpu.arm64 is also satisfied on arm64e iirc

#

maybe oldabi could just install a dummy dylib on arm64? @tepid olive @timid furnace (actually not needed, see below)

#

or should we have procursus updated to be able to express these dependencies properly?
removing cy+cpu.arm64 entirely on arm64e may break a few packages, but doing it only for ios 15+ should minimize impact...
either that, or add a new package like cy+cpu.not-arm64e, but that is ugly

hollow scroll
#

well it sounds complicated
I dont even have a tweak dev environment because my PC died.. i just need to compile a couple of my tweaks since i have lots of people complaining

tepid olive
#

you basically have two choices right now:

  • compile the rootless package on mac with xcode 12+
  • tell your users to install "Legacy arm64e Support" on a12+ ios 15+ (right now you can't depend on it because it depends on cy+cpu.arm64e, unless you want to make a separate package for a12+ only)
tepid olive
#

context: being able to express a dependency like cy+cpu.arm64 | oldabi, i.e. arm64 only, NOT arm64e
(the problem right now is that cy+cpu.arm64 is also installed on arm64e)

naive kraken
#

oldabi should just be a dylib that only has an arm64e slice then it won't get opened on arm64

tepid olive
#

oh is that enough

#

i thought you'd need a dummy arm64 slice or something

naive kraken
#

wait can't you just check for cy+cpu.arm64e

tepid olive
#

the problem is, there is no AND condition

#

well

#

there is but

#

not like that

naive kraken
#

I feel like this should be possible

tepid olive
#

there is AND, but there is no "if X, then Y"

#

that is normally done by negating it and doing an OR, but there is nothing to negate cy+cpu.arm64e since cy+cpu.arm64 also exists on arm64e

naive kraken
#

Depends: cy+cpu.arm64e?

tepid olive
#

no, the thing is we don't want it to only work on a12+

#

we want it to depend on oldabi only if it's arm64e

#

otherwise not depend on oldabi

naive kraken
#

oldABI should not exist

#

:/

#

we should just add the stuff needed to the dyld patch

#

I meant you can make oldABI depend on arm64e

tepid olive
naive kraken
#

yeah

tepid olive
#

oldabi already depends on arm64e currently, that's the issue

#

i guess it could just not do that and then users would have a dummy few kilobyte package on arm64, not a huge deal

hollow scroll
naive kraken
#

no one should depend on oldABI tbh

tepid olive
naive kraken
#

It is possible on Linux too

tepid olive
naive kraken
#

new ld64 is out

tepid olive
naive kraken
#

a few weeks

#

I mean the source

hollow scroll
naive kraken
#

not sure if anyone has managed to compile it yet

tepid olive
#

is firmware-sbin the package that generates the cy+ packages?

#

oh no it's darwintools

#

i think there might be a way to depend on arm64-only, but not yet sure if it works on all arm64 devices

#

cy+cpu.arm64v8

cloud yacht
#

If you do have someone with a Mac that can compile it for you, you can build on Linux for testing, with oldabi/legacy arm64e support installed, then when your ready to make a production deb, compile on mac so oldabi isn't needed

tepid olive
#

TL;DR: basically just do Depends: cy+cpu.arm64v8 | oldabi if you cannot compile your tweak on a mac

#

at least until someone compiles the new toolchain for linux

tepid olive
#

or idk, can't you just apply the transformations oldabi does to the dylib directly in a post-process step somehow?

#

i thought it was

hasty ruin
ocean raptor
#

sudo apt purge oldabi

timid furnace
#

OldABI isn't even an end all be all solution

#

The whitelist is there for a reason

#

Depending on it should be avoided as much as possible

tepid olive
tepid olive
timid furnace
#

Frankly I like the shim idea more but it has its own issues

#

Ie. You'd need the ellekit repo added

celest quiver
#

is this how ill build for rootless?

#

i just added THEOS_PACKAGE_SCHEME=rootless and ROOTLESS=1

tepid olive
#

though if your tweak is strictly rootless only it's fine

#

also ROOTLESS=1 does nothing now, not needed anymore

celest quiver
#

alr ty

tepid olive
#

also, if you do both rootful and rootless, then make sure to do make clean each time when switching between the two

#

e.g. make clean do and make clean do THEOS_PACKAGE_SCHEME=rootless

#

(do is just an alias for all package install basically)

celest quiver
#

also, is there a way to fix this? (I know 0 people are on iOS 13, but itd be nice to have A12+ support)

tepid olive
#

i’ll explore the alternatives to the current oldabi technique today

tepid olive
# tepid olive it is

yea but it depends on cy+cpu.arm64e
but i already figured out Depends: cy+cpu.arm64v8 | oldabi works in meantime, so no need to change it ig

#

though i do wonder if elu's firmware works that way too...

#

if it doesn't then the dep could be added only for the rootless package ig

hasty ruin
tepid olive
#

install xcode 11.7 GM with xcodes, then copy just the toolchain from it

hasty ruin
#

xina has a built-in abi patch

tepid olive
#

one sec

#
cp -rc /Applications/Xcode-11.7.0-GM.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain "$THEOS/toolchain/Xcode.arm64eLegacy.xctoolchain"

# if you don't want xcode 11.7 to take up space:
rm -rf /Applications/Xcode-11.7.0-GM.app
#

build.sh:

#!/bin/sh -e

threads=$(sysctl -n hw.logicalcpu)

echo '[*] Building rootful package...'
PREFIX=$THEOS/toolchain/Xcode.arm64eLegacy.xctoolchain/usr/bin/ gmake -j"$threads" clean package FINALPACKAGE=1

echo

echo '[*] Building rootless package...'
gmake -j"$threads" clean package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
#

this assumes xcode 12 or above is selected as default with xcode-select

timid furnace
#

Can't you just use the flags

naive kraken
#

because I can tell you with 99% certainity that dyld is supposed to sign these pointers

tepid olive
naive kraken
#

no the flag does not work

tepid olive
#

dhinak said it did, you said it didn't 🤷‍♀️

timid furnace
#

i tested it way back when

tepid olive
#

there seem to be bigger differences in the output of xcode 11.7 vs 14.x so i couldn't easily compare to see if they're equivalent

timid furnace
#

you need no-ptrauth-abi-version and the -Xlinker -ios_version_min flags

tepid olive
#

yea that

#

i also realized my logic for choosing the min version wasn't entirely right and was too lazy to fix it to always choose the optimal one, that's another reason i decided to just use xcode 11.7

#

i mean you can set it to 6.0 or whatever too, but you get a slightly more optimal binary if you set it higher ig

timid furnace
#

my min version is just going to be my deployment target

tepid olive
#

yea but you can also make it 12.0 if deployment target is lower

#

no arm64e for ios 11 and below so

#

that's basically what i did but i remember in some cases it was setting it too high, not sure exactly when

timid furnace
#

extra work if you build for both archs at the same time

#

which is my situation with luz

tepid olive
#

it doesn't have __AUTH_CONST

naive kraken
#

and check if that makes it work

tepid olive
#

doing that rn

#

it does work on macOS

naive kraken
#

either way dyld is supposed to sign the pointers

#

If that works you can just patch the check in dyld

timid furnace
#

@tepid olive do you have access to Xcode 11.7 toolchain rn

naive kraken
#

if it doesn't then more work is needed

timid furnace
#

if i send you test binary source can you build it with 11.7 tc

#

gonna compare the three

tepid olive
#

I wrote a patch tool to make plain iOS dylibs work on macOS

tepid olive
#

So this is how I test OldABI now

celest quiver
#

also why does theos not have a patched sdk higher than 14.5

tepid olive
#

i remember the problem i ran into when diffing now actually, -Xlinker -ios-version-min was what was causing the generated binaries to be significantly different iirc... surprising because there was a difference even when i made it match the deployment target, which sounds like theos isn't passing it normally

timid furnace
timid furnace
#

someone should PR one

tepid olive
#

@naive kraken bad news, it does not make the dylib work

celest quiver
naive kraken
#

well there are two options: load dylib with RTLD_NO_LOAD or whatever and sign the pointers in data manually, only then make the constructor run or patch dyld to sign the pointers

tepid olive
# timid furnace

how do i make it use 11.7 if i only have the toolchain from it and not the whole sysroot

#

i tried installing full 11.7 again but uh

xip: error: The archive “Xcode-11.7.0-GM+11E801a.xip” can’t be expanded because the selected volume doesn’t have enough free space.
timid furnace
#

replace clang with path/to/clang?

tepid olive
#

true

timid furnace
#

not like the sdk matters

#

also use make emptydylib idk why plain make doesn't work

tepid olive
#

make all worked too

timid furnace
#

oh

#

trolling

tepid olive
#
clangclang: : error: error: unknown argument: '-fno-ptrauth-abi-version'
timid furnace
#

oh

#

i guess you can ditch that

tepid olive
#

the problem may be that it needs to be a linker arg

#

i think?

#

let me re-check

timid furnace
#

ld: unknown option: -fno-ptrauth-abi-version

#

so

#

it's def a compiler arg

tepid olive
#

nvm it was a compiler arg

#

i guess it makes sense that arg doesn't exist in xcode 11

timid furnace
#

-fno-ptrauth-abi-version controls the ABI of the object files, -Xlinker for ld

#

at least from what i've noticed

tepid olive
#

still getting these

timid furnace
#
#import <Foundation/Foundation.h>

static void __attribute__((constructor)) initialize(void) {  }

@interface Inject : NSObject
@end

@implementation Inject
+ (void)load {
}
@end
#

oh

#

it hates foundation

#

try ```c
#include <stdio.h>

static void attribute((constructor)) initialize(void) { printf("Hello, world!\n"); }

#

not like we're actually loading this, just analyzing it

#

if it still dies ig i'm downloading 11.7 (bc need older sdk ig)

tepid olive
#

@naive kraken extern void pmap_disable_user_jop(pmap_t pmap);

#

This is what is needed

#

gonna find offsets

unkempt ore
#

is there any way to detect if the user is using xina right now?

naive kraken
unkempt ore
#

because for some reason, my NSBundle hook doesn't work on Xina (and I can't debug it because I don't have a xina compatible device)

unkempt ore
restive ether
#

John Xina

tepid olive
#
clang: warning: argument unused during compilation: '-fno-ptrauth-abi-version' [-Wunused-command-line-argument]

MenheraThink1

timid furnace
#

yea that's fine

tepid olive
timid furnace
#

epic

#

ok time to compare

#

ok yea so the xcode 11 files are pretty much identical

#

as expected

#

as are the arm64 files

tepid olive
#

@timid furnace there's no difference between old and new abi if you don't include objc classes

#

afaik

timid furnace
tepid olive
timid furnace
#

alr

timid furnace
# tepid olive <@218455673581600770> there's no difference between old and new abi if you don't...

this is good enough right?

#import <Foundation/Foundation.h>
#import <dlfcn.h>
#import <objc/objc.h>

#import <Foundation/Foundation.h>
#include <MacTypes.h>
// #import <Security/SecCode.h>
#import <Security/Security.h>
#import <objc/runtime.h>

#define LOG(format, ...) NSLog(@"[emptydylib] " format, ##__VA_ARGS__)

static void __attribute__((constructor)) initialize(void) { LOG(@"emptydylib init (constructor)"); }

@interface Inject : NSObject
@end

@implementation Inject
+ (void)load {
    LOG(@"emptydylib init (ObjC load)");
}
@end
timid furnace
#

alr

#

back to diffing

tepid olive
#

so you'd only want that dependency for rootless if you plan to support ios 14 and below basically

timid furnace
#

Xcode 11 build vs "old ABI" Xcode 14 build:

  • S_ATTR_NO_DEAD_STRIP added (who cares)
  • LC_BUILD_VERSION diff (who cares)
  • LINKEDIT got smaller?
  • _OBJC_LABEL_CLASS_$ and _OBJC_LABEL_NONLAZY_CLASS_$ gone
  • CFString ABI is different i think? 4010000000000004 vs C0156AE100000004
  • __objc_data is different but i'm not exactly sure what
#

this is why __objc_data is different

#

wait no its not different

#

am i being lied to

#

yes

#

ok my conclusion is Xcode 14 "old ABI" and Xcode 11 build should be essentially the same

#

now lemme compare old ABI vs new ABI

#
  • __init_offsets, __objc_methlist, and __objc_selrefs now exist
  • __mod_init_func gone (replacement is __init_offsets)
  • LC_DYLD_INFO_ONLY replaced with LC_DYLD_CHAINED_FIXUPS and LC_DYLD_EXPORTS_TRIE
  • CFString ABI C0156AE100000004 vs C0156AE100000001 (doesn't seem like much of a difference)
#

is the new ABI just chained fixups

tepid olive
tepid olive
#

it seems that chained fixups are really important

pale spear
#

@tepid olive Accept friend request, i got hook working with UnityFramewokr

tepid olive
#

@timid furnace can you send the dylibs

timid furnace
unkempt ore
#

anyone know why modifying the info.plist of apps by hooking -(NSDictionary *)infoDictionary in NSBundle doesn't work on Xina?

unkempt ore
# primal perch because xina

yeah thats what I thought 😄 guess I'll just put a disclaimer out that this feature won't be supported on xina.

primal perch
velvet path
#

honestly I don't get the value in supporting XinaA15 at this point

#

like Xina already advised people to switch to Fugu15 Max when that was the thing (before it became Dopamine)

timid furnace
#

Muh rootful tweaks

tepid olive
velvet path
#

it merely had its support plans cancelled

gentle grove
velvet path
#

I mean true but yet here we are, tweak developers still wanting to support it because... why exactly?

steady nest
#

because people still use it

velvet path
steady nest
#

people aren’t going to stop using stuff that works just because somebody else says so

#

you can tell them that dopamine is better all you want, but if half the tweaks they want to install don’t work in dopamine… thishowitis

radiant idol
#

^^^

harsh junco
radiant idol
#

hi

harsh junco
radiant idol
#

good

#

u?

harsh junco
radiant idol
#

very good

grim sparrow
wheat quarry
#

Hi there, I was told that my repo and the theme packages on it aren't compatible with a rootless jailbreak so I wanted to update things to ensure they are. I searched this chat and best I could find was that I have to specify iphoneos-arm64 in the control file, but when I specifically make it Architecture: iphoneos-arm iphoneos-arm64 then dpkg gives me the warning:

dpkg-deb: warning: parsing file 'com.favware.lotusdarksettingsvpnicon/DEBIAN/control' near line 3 package 'com.favware.lotusdarksettingsvpnicon:iphoneos-arm iphoneos-arm64':
 'iphoneos-arm iphoneos-arm64' is not a valid architecture name in 'Architecture' field: character ' ' not allowed (only letters, digits and characters '-')
dpkg-deb: warning: ignoring 1 warning about the control file(s)
dpkg-deb: building package 'com.favware.lotusdarksettingsvpnicon' in 'com.favware.lotusdarksettingsvpnicon.deb'.

Can I just ignore this warning, or am I doing this all wrong?

I created a git branch where I am pushing my changes so this is the control file:
https://github.com/favna/cydia/blob/fix/rootless-support/source/com.favware.lotusdarksettingsvpnicon/DEBIAN/control#L3
And this is the Release file:
https://github.com/favna/cydia/blob/fix/rootless-support/Release#L6

tepid olive
#

it all works

timid furnace
#

you can use all, however that is only usable in extremely rare cases

timid furnace
#

ie. when you aren't placing any files on the filesystem

tepid olive
naive kraken
#

wait is this able to convert arm64 to arm64e too?

#

ah nvm

wheat quarry
tepid olive
#

correct

hasty ruin
#

Oh nvm you already got an answer

tepid olive
#

i mean technically you could have one deb with a postinst but that's cursed, don't do that

wheat quarry
#

part of me is tempted to just only do rootless but I have no statistics at all of how many people download the package especially considering they're 2 and 4 years old respectively

tepid olive
wheat quarry
#

decided I'll support both and I'm revamping my repo to do so in a scripted way. It's been well overdue for a complete cleanup anyway.

wheat grotto
#

I don’t know the slightest thing about tweak dev

vale oxide
#

wb obj-c

wheat grotto
#

same

vale oxide
#

oh

#

shit

gentle grove
vale oxide
#

how do i get a uicolor from alderis

#
Tweak.x:32:43: error: no known class method for selector 'objectForKey:'
        NSString *coolColorHex = [NSUserDefaults objectForKey:@"color"];
                                                 ^~~~~~~~~~~~
Tweak.x:32:27: error: initializer element is not a compile-time constant
        NSString *coolColorHex = [NSUserDefaults objectForKey:@"color"];
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tweak.x:33:10: error: interface type cannot be statically allocated
        UIColor coolColor = LCPParseColorString(coolColorHex, @"#ff0000");
                ^
                *
Tweak.x:33:22: error: implicit declaration of function 'LCPParseColorString' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        UIColor coolColor = LCPParseColorString(coolColorHex, @"#ff0000");
                            ^
Tweak.x:33:22: error: implicit conversion of 'int' to 'UIColor *' is disallowed with ARC
        UIColor coolColor = LCPParseColorString(coolColorHex, @"#ff0000");
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tweak.x:33:10: error: incompatible integer to pointer conversion initializing 'UIColor *' with an expression of type 'int' [-Werror,-Wint-conversion]
        UIColor coolColor = LCPParseColorString(coolColorHex, @"#ff0000");
                ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tweak.x:33:22: error: initializer element is not a compile-time constant
        UIColor coolColor = LCPParseColorString(coolColorHex, @"#ff0000");
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
NSString *coolColorHex = [NSUserDefaults objectForKey:@"color"];
UIColor coolColor = LCPParseColorString(coolColorHex, @"#ff0000");
hasty ruin
#

[NSUserDefaults objectForKey:] is an instance method, not class
you need to call objectForKey on an instance of NSUserDefaults

#

and replace UIColor coolColor with UIColor *coolColor

primal perch
#

nerd craze ios

primal perch
#

L

gentle grove
radiant idol
#

.new

radiant idol
lime pivot
# gentle grove

hey at least jpegs and gifs don’t open in Internet Explorer any more

gentle grove
#

i think they do for me

#

i dont have an image viewer installed at the moment

lime pivot
#

yikes

#

you need some Windows Picture and Fax Viewer in your life

hasty ruin
#

please learn objective-c

vale oxide
#

i started

#

you know what ill just keep learning

#

your right ill slow down

rain tree
#

is there a way to make my iphone automatically authenticate the passphrase for a sshkey? hopefully that makes sense

lime pivot
#

if not there’s other solutions if you google ssh agent zsh or bash or whatever you use

rain tree
celest quiver
#

gnome is probably the ugliest de ever

lime pivot
tepid olive
#

how do i know why an app is crashing?

tepid olive
#

nothing in analytics data

ocean raptor
hexed knot
#

they all look like shit

#

no thats wrong

#

they all look like shit ootb

#

if you spend like 5 hours customizing then maybe it’ll look ok

lime pivot
#

idk I use gnome with just a font change and smaller dock icon size and it's fine

tepid olive
#

@timid furnace Can you make some new arm64e dylibs with xc11 and xc14 with a class you define and a method inside it

#

I need to have the __objc_selrefs section, there's an issue with it

tepid olive
#

@wheat bobcat not sure if the ersatz source code on github is up to date with the rootless version, but can you please wrap your preference file path in ROOT_PATH_NS() so it goes to /var/jb on rootless? this avoids jailbreak detection being triggered by leftovers in /var after removing the jailbreak

#

basically #import <rootless.h> and do this:

settings = [[NSMutableDictionary alloc] initWithContentsOfFile:ROOT_PATH_NS_VAR([NSString stringWithFormat:@"/var/mobile/Library/Preferences/%@.plist", bundleIdentifier])];
wheat bobcat
#

it's not up to date

#

haven't pushed

#

it's /var/jb/mobile

tepid olive
#

well, i asked about the code bc i was gonna make a pr, but i actually installed it myself and it wrote to /var/mobile on rootless

wheat bobcat
#

wait

tepid olive
#

ROOTLESS doesn't exist anymore, it's THEOS_PACKAGE_SCHEME=rootless

#

you can just use the macro

wheat bobcat
#

yes it does

#

I defined it

#

make package ROOTLESS=1

tepid olive
#

that doesn't get exposed as a define i think, you'd need -DROOTLESS=1

#

or add it to CFLAGS in the ifeq

wheat bobcat
#

mb

tepid olive
#

you can also just use the rootless.h macro:

static NSString *settingsPath = ROOT_PATH_NS(@"/var/mobile/Library/Preferences/");
wheat bobcat
#

that checks if the directory exists

tepid olive
#

not anymore

#

it's a compile time check now

wheat bobcat
#

where is the updated code then

tepid olive
#

it's a part of theos

wheat bobcat
#

the documentation for this is so bad uhh

#

ight

wheat bobcat
#

anyways the only reason I updated it was bc someone said they'd pay me but they haven't 💀

tepid olive
#

lol

wheat bobcat
#

how do I build for rootless correctly then

tepid olive
#

you just do make clean package THEOS_PACKAGE_SCHEME=rootless (clean is important)

#

and use the macros

#

oh also, one more thing

#

you should use xcode 12+ for rootless for it to work on arm64e without oldabi package, but xcode 11 for rootful if you want to support ios 13 and below

#

linux can't build with new abi yet, though i heard new ld64 is out, just nobody compiled it yet

wheat bobcat
#

well I mean I'm not going to be publishing anything for < ios 13

#

I already said I wouldn't be updating for ios 15

tepid olive
#

ok then you can just use latest xcode for all if it's ios 14+ only

#

xcode 12 and up is good

wheat bobcat
#

yeah

#

alright thanks

#

ok should be fixed

timid furnace
#

@tepid olive

#
#import <Foundation/Foundation.h>
#import <dlfcn.h>
#import <objc/objc.h>

#import <Foundation/Foundation.h>
#include <MacTypes.h>
// #import <Security/SecCode.h>
#import <Security/Security.h>
#import <objc/runtime.h>

#define LOG(format, ...) NSLog(@"[emptydylib] " format, ##__VA_ARGS__)

static void __attribute__((constructor)) initialize(void) { LOG(@"emptydylib init (constructor)"); }

@interface RandomClass : NSObject
@end

@implementation RandomClass
+ (void)load {
    LOG(@"emptydylib init (ObjC load)");
}

- (id)init {
    LOG(@"emptydylib init (ObjC init)");
    return [super init];
}

- (void)randomInstanceMethod {
    LOG(@"emptydylib init (ObjC randomInstanceMethod)");
}

+ (void)randomClassMethod {
    LOG(@"emptydylib init (ObjC randomClassMethod)");
}

@end
#

good?

timid furnace
tepid olive
#

objc methods generally take an NSString

#

oh true i guess you can do that

snow python
#

Is there a version of flexing or related for rootless? Need to fix something and don’t know who hosts that package.

hasty ruin
snow python
#

There it is, thanks

#

Hmm maybe it’s not compatible with my iPad, not able to get it with long press status bar or three finger long press

faint lionBOT
#
blockota

To block OTA updates, you can install a modified tvOS beta profile. This works even without a jailbreak. Note that the profile expires and will stop blocking updates on <t:1706677200:D> (<t:1706677200:R>). Check back after that date for a new profile.

You can re-enable updates by uninstalling this profile in Settings -> General -> Profiles & Device Management.

If you're jailbroken, you can also install the OTADisabler tweak instead, but note that it is harder to remove while unjailbroken.

snow python
tepid olive
pine holly
#

If i have a tweak that doesnt use images or anything that wouldnt comply with rootless, what do i have to do for it to work on dopamine?

#

do i just change "iphoneos-arm" to whatever the other is?

hasty ruin
#

run make clean first though

pine holly
#

Thats it? And bet thanks

hasty ruin
#

Yep

#

It’ll move everything into /var/jb and change the architecture

pine holly
#

Oh sick alright

#

Thansk

vale oxide
#

Is there any way to debug if nothing happens with my tweak

primal perch
#

no

#

absolutely 0 tooling

vale oxide
#

Shit

primal perch
#

/ j

pine holly
vale oxide
pine holly
pine holly
#

@hasty ruin sorry for the ping but you were the one helping so any ideas?

hasty ruin
#

is your theos up to date

#

make update-theos

pine holly
#

Lemme check

pine holly
hasty ruin
#

git stash

#

cd back to tweak

#

make update-theos

pine holly
#

lmk if you need the top part of the error

hasty ruin
#

what did git stash output

pine holly
tepid olive
# pine holly

try

pushd $THEOS/vendor
git stash
popd
make update-theos
pine holly
#

nvm problem solved

#

git submodule deinit -f --all && git submodule update --init
inside $THEOS fixed issues

pine holly
#

Thanks for the help both of you!

vale oxide
#
UIImageView *imageView = [[UIImageView alloc] initWithFrame:rect];
imageView.image = [UIImage imageNamed:@"MyImage.png"];
[self.view addSubview:imageView];
#

where do i put MyImage

vivid dew
#

idk

gentle grove
tepid olive
#

he looks like someone from a specific clan

celest star
#

Does anyone know how we can install Substitute in rootless env?

snow python
#

Is there a rootless frida build out there

#

Found it

#

Its on miticollos repo

tepid olive
#

use ellekit

#

What are CFlags and CCFlags and what does fobj-arc do and whag does fvisibilty do

tepid olive
tepid olive
tepid olive
#

why would you want both

tepid olive
#

just use ellekit, it provides substrate compatibility

tepid olive
#

It no worky

tepid olive
#

or not if use ellekit

#

probably, the readme says to use it

#

i never tried using ellekit jailed myself yet

tepid olive
#

also the readme says nothing

celest star
tepid olive
#

Do i need to include libhooker.h

#

not if you aren't calling libhooker methods

celest star
#

@tepid olive Hi, may I ask a question? IOHIDEventSystemClientDispatchEvent works with rootful palera1n, but doesn't work with rootless, do you have any idea? Very appreciate it.

tepid olive
#

hmm, not familiar with that

#

i don't see why it wouldn't work, doesn't even seem related to hooking or rootfs stuff from what i can see

tepid olive
celest star
#

I don't know what difference between rootful and rootless causes that

tepid olive
#

not sure, what if you install ellekit instead of substitute on rootful, does it work? though again i don't see how that would make a difference if you confirmed your tweak's code is being executed

celest star
hasty ruin
#

Check syslog ig

celest star
faint stag
pale spear
#

welp....exceptionCodes":"0x0000000000000002, 0x0000000110788d3c(\n 2,\n 4571303228\n)EXC_BAD_ACCESSSIGBUSKERN_PROTECTION_FAILURE at 0x0000000110788d3c","incidentID":"D8B9AA4C-8FEB-42F1-B531-206E47FFD799","logwritten":0,
Rootless is fun......

faint timber
#

Doesn’t really show much

tepid olive
#

Im just gonna try another app to inject my tweak into and if it still doesnt work idk

faint timber
#

Skill issue

tepid olive