Jump to content

Creating a tweak/.deb hack using CSCI patcher


Go to solution Solved by castix,

17 posts in this topic

Recommended Posts

Posted (edited)

Edit: Done - Finally able to create deb packages. But it's always the standard template  (Switch text etc.) - How to change that?

Updated by Mayaxaya
Posted

Edit: Done - Finally able to create deb packages. But it's always the standard template  (Switch text etc.) - How to change that?

/PrefName/Resources/TweakName.plist

 

Edit that ^

Posted

Alright guys, my tweak.xm looks like the following now:

#import "writeData.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#define PLIST_PATH @"/var/mobile/Library/Preferences/com.mayaxaya.rob.plist"

inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

%ctor {
if(GetPrefBool(@"kRunes"))
{
writeData(0x00327584, 0xC046);
} else {
writeData(0x00327584, 0xF0B5);
}
}

After saving it I type make package via ssh. What comes out in settings is the original template with the swich stuff, and no matter which switch I activate the hack won't activate :(

Posted

Alright guys, my tweak.xm looks like the following now:

 

#import "writeData.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#define PLIST_PATH @"/var/mobile/Library/Preferences/com.mayaxaya.rob.plist"

inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

%ctor {
if(GetPrefBool(@"kRunes"))
{
writeData(0x00327584, 0xC046);
} else {
writeData(0x00327584, 0xF0B5);
}
}
After saving it I type make package via ssh. What comes out in settings is the original template with the swich stuff, and no matter which switch I activate the hack won't activate :(

Change the kKey from the .plist in /Resources/ to the same one as in the tweak.xm which is kRunes.

Posted

Change the kKey from the .plist in /Resources/ to the same one as in the tweak.xm which is kRunes.

Alright, but as I said the stuff I want to modify consists of the given adress and the adress below (which in this case would be ''0x00327586''.

So in order to edit this properly, which one of the following codes would be right?:

#import "writeData.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#define PLIST_PATH @"/var/mobile/Library/Preferences/com.mayaxaya.rob.plist"

inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

%ctor {
if(GetPrefBool(@"kRunes"))
{
writeData(0x00327584, 0xC0467047); //Simply extending the code including the neighboring bytes of the adress below
} else {
writeData(0x00327584, 0xF0B503AF); //Simply extending the code including the neighboring bytes of the adress below
}
}

or

 

 

#import "writeData.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#define PLIST_PATH @"/var/mobile/Library/Preferences/com.mayaxaya.rob.plist"

inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

%ctor {
if(GetPrefBool(@"kRunes"))
{
writeData(0x00327584, 0xC046);
writeData(0x00327586, 0x7047); //modifying the adress below seperately
} else {
writeData(0x00327584, 0xF0B5);
writeData(0x00327586, 0x03AF); //modifying the adress below seperately
}
}

Thanks so far and thanks in advance!

Posted

If the hex addresses are in a different offset then you will use the 2nd one.

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