[solution] completely remove slide to power off

Discussion in 'iOS Themes and Customization' started by daconcerror, Feb 11, 2010.

  1. daconcerror

    daconcerror Banned

    Joined:
    Sep 6, 2008
    Messages:
    2,898
    Likes Received:
    0
    Device:
    3G iPod touch
    i need to remove that whole bar, reason being is that my firends little brother keeps turning off his touch 3rd gen, which wouldnt be a problem if he currently had a computer but he doesnt. So every time his bro turns it off i have to turn it on for him.

    any help?
  2. Happyman7

    Happyman7 Member

    Joined:
    Sep 2, 2009
    Messages:
    679
    Likes Received:
    7
    Device:
    4G iPod touch
    Tell him that he doesn't need to hold down the power button, just press it.

    I don't think you can turn it off though.
  3. theiThemer

    theiThemer Active Member

    Joined:
    Jan 23, 2010
    Messages:
    1,329
    Likes Received:
    4
    Device:
    3G iPod touch
    ... You can replace the images of the sliders and make it fully transparent so it looks like its not their w/ either manual SSH or WinterBoard...

    ... other than that, I'd go with ^^ his suggestion
  4. austers

    austers Well-Known Member

    Joined:
    Jan 7, 2010
    Messages:
    3,734
    Likes Received:
    456
    Device:
    3G iPod touch
    I'd punch him in the back of the head!
  5. spoonforknife

    spoonforknife Retired Moderator

    Joined:
    Nov 15, 2007
    Messages:
    6,896
    Likes Received:
    317
    I don't think this is possible. However, you could try adjusting the dimensions of the slider image to 1 px. That may not work though.
  6. Appman

    Appman Community Development Staff Member

    Joined:
    Jul 9, 2009
    Messages:
    4,034
    Likes Received:
    56
    Device:
    4G iPod touch
    If you make the images transparent it will work, that's what I do.
  7. Axis

    Axis Super Moderator Staff Member

    Joined:
    Dec 2, 2007
    Messages:
    6,288
    Likes Received:
    133
    Device:
    iPhone 4S (White)
    I'll make a MobileSubstrate dylib to disabling standard "slide to power off" functionality. It won't take long at all.
  8. daconcerror

    daconcerror Banned

    Joined:
    Sep 6, 2008
    Messages:
    2,898
    Likes Received:
    0
    Device:
    3G iPod touch
    His brother has his own iPod so he knows that he slides it, and his mum doesn't know he's jailbroken so it's kinda suspicious if he tells his brother by to turn it off,

    how do u make dylibs? And what is the name of the back bit on the slide to power off? I've made the slider and the cancel transparent but the bar is still there
  9. Axis

    Axis Super Moderator Staff Member

    Joined:
    Dec 2, 2007
    Messages:
    6,288
    Likes Received:
    133
    Device:
    iPhone 4S (White)
    Here's the dylib. Literally all it does is hook -[SBPoweDownController orderFront]. It prevents the "slide to power down" screen from even showing up. You can still lock the screen, and turn off the device (if you have to) with SBSettings.

    It's already been pseudo-signed and has the correct permissions. Place it in /Library/MobileSubstrate/DynamicLibraries and respring

    You'll have to unzip first, obviously.

    /edit: for anyone curious, MobileSubstrate facilitates runtime replacement of method implementations. You can basically do whatever you want, system wide. Uses range from useful (SBSettings, to goofy, like me returning the string "iPad" instead of the normal "iPhone" when analytics services gather info about my device/usage.

    /edit 2: here's the codeā€”not much going on

    [objc]#import <Foundation/Foundation.h>
    #import <SpringBoard/SpringBoard.h>
    #include "substrate.h"

    static void SBPowerDownController_orderFront_hook(id self, SEL _cmd) {

    return;

    }

    extern "C" void hookInit() {

    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

    NSString *identifier = [[NSBundle mainBundle] bundleIdentifier];

    if ([identifier isEqualToString

    Please Register or Log in to view images

    "com.apple.springboard"])
    MSHookMessage(objc_getClass("SBPowerDownController"), @selector(orderFront), (IMP)powerDown_hook);

    [pool release];

    }
    [/objc]

    Attached Files:

  10. daconcerror

    daconcerror Banned

    Joined:
    Sep 6, 2008
    Messages:
    2,898
    Likes Received:
    0
    Device:
    3G iPod touch

Share This Page