Jump to content

16 posts in this topic

Recommended Posts

Posted

So now i am really confused because the tutorials about preference bundles are not of complex type.

 

how do i attach this to preference loader.

i know this--> if(GetPrefBool(@"kXyz"))

 

my point is how am i going to implement it

 

 

for example->

                           %hook DeviceInfoPayload_Builder

                              - (id)setJailbroken:(BOOL)fp8
                                  {
                                        fp8=false; 
                                      return %orig;
 
                                      }
 
 
 
now how do i put  if(GetPrefBool(@"kXyz"))in it?
 
 
 
you mean like this? 
                                                  
                              %hook DeviceInfoPayload_Builder
                              - (id)setJailbroken:(BOOL)fp8
                                  {
                                       if(GetPrefBool(@"kXyz"))
                                        fp8=false; 
                                      return %orig;
 
                                      }
                                      return %orig;
                                         }
 
                                        ?????

 

 

Posted (edited)

Almost correct. Just clean it up like this:

 

%hook DeviceInfoPayload_Builder

 

- (id)setJailbroken:(bool)fp8 {

if(GetPrefBool(@"kXyz")) {

fp8 = FALSE;

return %orig;

}

return %orig;

}

 

%end <---(add %end if you don't want to add more Target-Method also to end the Target-Class)

Updated by C3FFF0E
Posted (edited)
                     

%hook DeviceInfoPayload_Builder
                              - (id)setJailbroken:(BOOL)fp8 {
                                  if(GetPrefBool(@"kXyz")) {
                                        fp8=false;
                                       }
                                      return %orig;
 
                                         }

Updated by Chrizk0
Posted

@Chrizk0 has one missing '{' and @@C3FFF0E's 'return %orig' will erase the argument value

what if it's like this

 
%hook SSJailbreakCheck
+ (id)runningProcesses 
{
return [NSNumber numberWithInt:0];   
}
 
+ (int)filesExistCheck 
{
return 0;
}
+ (int)symbolicLinkCheck
 {
return 0;
}
+ (int)systemCheck
 {
return 0;
}
+ (int)fstabCheck 
{
return 0;
}
+ (int)processesCheck
{
return 0;
}
 
+ (int)plistCheck 
{
return 0;
}
+ (int)inaccessibleFilesCheck 
{
return 0;
}
+ (int)cydiaCheck 
{
return 0;
}
 
+ (int)urlCheck 
{
return 0;
}
+ (int)jailbroken 
{
return 0;
}
 
%end

@Chrizk0 has one missing '{' and @@C3FFF0E's 'return %orig' will erase the argument value

Do i need to put  if(GetPrefBool(@"kJail")) in every target method?

Posted

what if it's like this

 
%hook SSJailbreakCheck
+ (id)runningProcesses 
{
return [NSNumber numberWithInt:0];   
}
 
+ (int)filesExistCheck 
{
return 0;
}
+ (int)symbolicLinkCheck
 {
return 0;
}
+ (int)systemCheck
 {
return 0;
}
+ (int)fstabCheck 
{
return 0;
}
+ (int)processesCheck
{
return 0;
}
 
+ (int)plistCheck 
{
return 0;
}
+ (int)inaccessibleFilesCheck 
{
return 0;
}
+ (int)cydiaCheck 
{
return 0;
}
 
+ (int)urlCheck 
{
return 0;
}
+ (int)jailbroken 
{
return 0;
}
 
%end

Do i need to put  if(GetPrefBool(@"kJail")) in every target method?

Yes only put that if you are not implementing a cell.

Posted

Yes only put that if you are not implementing a cell.

hmm ,well, when i compile it , it says "you fell off the face of earth '{' 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines