Jump to content

26 posts in this topic

Recommended Posts

  • Replies 25
  • Created
  • Last Reply

Top Posters In This Topic

Posted


%hook SBLockScreenView

 

- (id)_defaultSlideToUnlockText

 

{

     NSDictionary *unlocktext = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"/var/mobile/Library/Preferences/preference.plist"]];

     return [[unlocktext objectForKey:@"kKey"] intValue];

     NSLog(unlocktext);

     return 0;

}

 

%end


<dict>

                <key>cell</key>

                    <string>PSGroupCell</string>

                <key>label</key>

                    <string>Custom Unlock Text</string>

            </dict>

            <dict>

                <key>cell</key>

                    <string>PSEditTextCell</string

                <key>default</key>

                    <integer>preference</integer>

                <key>defaults</key>

                    <string>preference</string>

                <key>key</key>

                    <string>kKey</string>

                <key>label</key>

                    <string></string>

            <key>isNumeric</key>

    <false/>

    <key>noAutoCorrect</key>

    <true/>

</dict>

Posted

Get this error

 

http://i.imgur.com/lD0h61t.jpg

This is m'y tweak.xm

 

#import <Foundation/Foundation>

 

#define kPath @"/var/mobile/Library/Preferences/SBMultiFunction.plist"

 

%hook SpringBoard

 

-(long long)homeScreenRotationStyle {

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"k3"] boolValue]){

return 2;

}

[prefs release];

return %orig;

}

 

-(BOOL)lockScreenCameraSupported {

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"k1"] boolValue]){

return false;

}

[prefs release];

return %orig;

}

 

%end

 

%hook SBFolderBackgroundView

 

-(bool)_shouldUseDarkBackground {

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"k4"] boolValue]){

return TRUE;

}

[prefs release];

return %orig;

}

 

%end

 

%hook SBFWallpaperSettings

 

-(bool)replaceBlurs {

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"ka"] boolValue]){

return TRUE;

}

[prefs release];

return %orig;

}

 

%end

 

%hook SBIconColorSettings

 

-(double)colorAlpha {

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"ka"] boolValue]){

return 0;

}

[prefs release];

return %orig;

}

 

-(double)whiteAlpha {

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"ka"] boolValue]){

return 0;

}

[prefs release];

return %orig;

}

 

-(bool)blurryFolderIcon {

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"ka"] boolValue]){

return false;

}

[prefs release];

return %orig;

}

 

%end

 

%hook SBFolderSettings

 

-(BOOL)allowNestedFolders {

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"kc"] boolValue]){

return TRUE;

}

[prefs release];

return %orig;

}

 

-(void)setAllowNestedFolders:(BOOL)fp8 {

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"kc"] boolValue]){

%orig(fp8);

fp8 = TRUE;

}

[prefs release];

return %orig;

}

 

%end

 

%hook SBLockOverlayStyleProperties

 

-(double) blurRadius{

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"kB"] boolValue]){

return 0;

}

[prefs release];

return %orig;

}

 

-(double)tintAlpha {

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"kB"] boolValue]){

return 0;

}

[prefs release];

return %orig;

}

 

%end

 

%hook SBSearchScrollView

 

-(BOOL)gestureRecognizerShouldBegin:(id)fp8{

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"kC"] boolValue]){

return false;

}

[prefs release];

return %orig;

}

 

%end

 

%hook SBLockScreenManager

 

-(BOOL) _shouldAutoUnlockFromUnlockSource:(int)fp8 {

NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];

%orig;

if([[prefs objectForKey:@"kD"] boolValue]){

return TRUE;

}

[prefs release];

return %orig;

}

 

%end

 

%hook SBLockScreenView

 

- (id)_defaultSlideToUnlockText

 

{

NSDictionary *unlocktext = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"/var/mobile/Library/Preferences/SBMultiFunction.plist"]];

return [[unlocktext objectForKey:@"kKey"] intValue];

NSLog(unlocktext);

return 0;

}

 

%end

Posted

@@dzcracker

 

Add

#include <Foundation/Foundation.h>

and replace

return [[unlocktext objectForKey:@"kKey"] intValue];

with

return [unlocktext objectForKey:@"kKey"];

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