Results 1 to 9 of 9
  1. #1

    Retired Prophet
    ToxicJew.'s Avatar
    Join Date
    Mar 2011
    Location
    S̢͎̳̞̲͈̪̳̻ͮͩt̟̳̏ͬ̔&#
    Posts
    7,781
    Points
    7,586
         User Info     Contact     Gamer ID
    Join Date
    Mar 2011
    Location
    S̢͎̳̞̲͈̪̳̻ͮͩt̟̳̏ͬ̔&#
    Posts
    7,781
    Points
    7,586

    Contact info:

    Youtube Channel: http://www.youtube.com/kennethbgoodin

    Default Your first Cydia Tweak.



    Have you ever wondered how developers create Cydia tweaks? The process is actually fairly simple, once you know the language of it.

    All you need to start building your own tweaks is a PC, preferably a Mac, an iOS device to test on, Theos, some iOS headers, Perl, SSH on your iDevice, and an iPhone SDK. Theos is a command line tool that greatly simplifies the amount of input you have to put in. A quick google search can get you all of these things, but if you're on a Windows PC you may have to do more work to get Theos running.

    Now that you've got Theos and are ready to begin, open your terminal and type in "export THEOS=/opt/theos" This will tell your terminal that anytime you type "THEOS" to replace it with "/opt/theos" simplifying the amount of typing you have to do. Next you'll need to type "export SDKVERSION=5.1" Change the value (5.1) to reflect whatever SDK version you have downloaded. Finally, find out your iDevice's internal IP address (connect it to the same wifi as your PC, by the way) and type "export THEOS_DEVICE_IP=192.168.1.122". Once again, change this value to reflect yours. You have to do these three things everytime you close and reopen terminal.

    Got Theos ready? Great, now type "THEOS/bin/nic.pl". This will open the tool Theos uses to generate a template for whatever you're developing, shown below.

    Code:
    $/opt/theos/bin/nic.pl
    NIC 1.0 - New Instance Creator
    ------------------------------
      [1.] iphone/application
      [2.] iphone/library
      [3.] iphone/preference_bundle
      [4.] iphone/tool
      [5.] iphone/tweak
    Since we're making a tweak, we'll type 5 and press enter. Theos will then prompt you for your tweak name, identifier, and your name. These details will be displayed on Cydia's page for your tweak.

    Once you fill out the few details, Theos creates a folder for your tweak in whatever directory your terminal is currently working in.

    Open the folder for your tweak and locate the tweak.xm file. This is where you'll be writing your code.

    So open the tweak.xm and paste in the following:

    Code:
    #import <SpringBoard/SpringBoard.h>
    
    %hook SpringBoard
    
    -(void)applicationDidFinishLaunching:(id)application {
        %orig;
        
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Welcome" 
            message:@"Welcome to your iPhone, Jew!" 
            delegate:nil 
            cancelButtonTitle:@"Thanks." 
            otherButtonTitles:nil];
        [alert show];
        [alert release];
    }
    
    %end
    So what does all that mean? First, we imported the Springboard headers with "#import..." Next, we used "%hook Springboard" to tell Theos what class we want to modify. Next we called upon the action, "applicationDidFinishLaunching" which in this case is the Springboard, and told it to return its original function with "%orig". Beware, if you don't tell your class to return its original function, it will not start, and you won't be able to use your iDevice until you delete your Cydia tweak via SSH. Next we simply told the Springboard to display a UIAlertView (otherwise known as a push notification) welcoming us to our iPhone. Finally we use "alert release" to clean up after ourselves and free the memory from usage. We finish with "%end" to tell Theos that we are done modifying that class.

    Next we'll open the terminal back up and type "make package install" to make a .deb of the package and install it to our iDevice. But wait, Theos is returning an error, isn't it? Like the one below?

    Code:
    Tweak.xm: In function ‘objc_object* $_ungrouped$SpringBoard$init(SpringBoard*, objc_selector*)’:
    Tweak.xm:6: error: declaration of ‘objc_object* self’ shadows a parameter
    No worries, this is because we called upon a UIAlertView, but did not mention the class that UI alerts depend on, the UIKit. To rectify this, navigate to the folder of your Cydia tweak. Find the "Makefile" file, open it, and add a new line, modeled after the below one:

    Code:
    WelcomeWagon_FRAMEWORKS = UIKit
    This ensures that the UIKit gets included. Now type "make package install" and it should begin installing to your device. It won't take long, but you will have to enter the root password several times (generally it's "alpine").

    Your iDevice should restart and display the push notification successfully. If it does, congrats, you just made your first Cydia tweak.

    0 Not allowed! Not allowed!
    Last edited by ToxicJew.; 11-18-2012 at 09:52 AM. Reason: Added image.
    ส็็็็็็็็็็็็็็็็็็็็็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้ส็็็็็็็็็็็็็็็็็็็็ ็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้

  2. #2
    Tig O Bitties
    Grey's Avatar
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964

    Contact info:

    Youtube Channel: http://www.youtube.com/l3g3darymods

    Default

    interesting. i may try this soon

    0 Not allowed! Not allowed!

  3. #3
    Gymshark Outlaw's Avatar
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,981
    Points
    5,116
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,981
    Points
    5,116
    Gamer IDs

    PSN ID: TheAdmiral303

    Contact info:

    Youtube Channel: http://www.youtube.com/channel/UCREc2hm6GvtwKn3l0eJ2dwA

    Default

    Quote Originally Posted by Grey View Post
    interesting. i may try this soon
    Yes, very.

    0 Not allowed! Not allowed!
    Go to http://bit.ly/1C01ZFM for custom modded controllers for Xbox One, PS4, Xbox 360 and PS3! Use the promo code: THEADMIRAL303 for your discount!

    Get a pair of the best gaming glasses: http://bit.ly/1AKk3El

    Bitcoin:
    16SeT5wqZRHoxPyEwD8HqjCa3xq5858RD4


  4. #4

    Retired Prophet
    ToxicJew.'s Avatar
    Join Date
    Mar 2011
    Location
    S̢͎̳̞̲͈̪̳̻ͮͩt̟̳̏ͬ̔&#
    Posts
    7,781
    Points
    7,586
         User Info     Contact     Gamer ID
    Join Date
    Mar 2011
    Location
    S̢͎̳̞̲͈̪̳̻ͮͩt̟̳̏ͬ̔&#
    Posts
    7,781
    Points
    7,586

    Contact info:

    Youtube Channel: http://www.youtube.com/kennethbgoodin

    Default

    Glad to see some people interested. It's very basic stuff, but it provides the frameworks for what you need to know to modify any iOS class.

    0 Not allowed! Not allowed!
    ส็็็็็็็็็็็็็็็็็็็็็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้ส็็็็็็็็็็็็็็็็็็็็ ็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้

  5. #5
    Tig O Bitties
    Grey's Avatar
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964

    Contact info:

    Youtube Channel: http://www.youtube.com/l3g3darymods

    Default

    Quote Originally Posted by ToxicJew. View Post
    Glad to see some people interested. It's very basic stuff, but it provides the frameworks for what you need to know to modify any iOS class.
    yes this actually is very helpful. i'll let you know when i finish my first working tweak

    0 Not allowed! Not allowed!

  6. #6

    Retired Prophet
    ToxicJew.'s Avatar
    Join Date
    Mar 2011
    Location
    S̢͎̳̞̲͈̪̳̻ͮͩt̟̳̏ͬ̔&#
    Posts
    7,781
    Points
    7,586
         User Info     Contact     Gamer ID
    Join Date
    Mar 2011
    Location
    S̢͎̳̞̲͈̪̳̻ͮͩt̟̳̏ͬ̔&#
    Posts
    7,781
    Points
    7,586

    Contact info:

    Youtube Channel: http://www.youtube.com/kennethbgoodin

    Default

    Are you going to be trying on Windows? Good luck, it's a big enough pain in the ass on a Mac.

    0 Not allowed! Not allowed!
    ส็็็็็็็็็็็็็็็็็็็็็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้ส็็็็็็็็็็็็็็็็็็็็ ็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้

  7. #7
    Tig O Bitties
    Grey's Avatar
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964

    Contact info:

    Youtube Channel: http://www.youtube.com/l3g3darymods

    Default

    Quote Originally Posted by ToxicJew. View Post
    Are you going to be trying on Windows? Good luck, it's a big enough pain in the ass on a Mac.
    well i'm sure as hell not going to spend $1k+ on a computer just to do that

    0 Not allowed! Not allowed!

  8. #8
    #HitlerDidNothingWrong
    ⌘Flying Dutchman⌘

    Join Date
    Apr 2011
    Posts
    4,018
    Points
    8,445
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Posts
    4,018
    Points
    8,445
    Gamer IDs

    Steam ID: baktiar77 Wii Code: baktiar77

    Contact info:

    Youtube Channel: http://www.youtube.com/user/77baktiar

    Default Your first Cydia Tweak.

    Quote Originally Posted by Grey View Post
    well i'm sure as hell not going to spend $1k+ on a computer just to do that
    A hackinstosh maybe?

    You could Parallels or VmWare and "emulate" OSX on your PC.


    Sent from my iPad using Tapatalk HD

    0 Not allowed! Not allowed!

  9. #9

    Retired Prophet
    ToxicJew.'s Avatar
    Join Date
    Mar 2011
    Location
    S̢͎̳̞̲͈̪̳̻ͮͩt̟̳̏ͬ̔&#
    Posts
    7,781
    Points
    7,586
         User Info     Contact     Gamer ID
    Join Date
    Mar 2011
    Location
    S̢͎̳̞̲͈̪̳̻ͮͩt̟̳̏ͬ̔&#
    Posts
    7,781
    Points
    7,586

    Contact info:

    Youtube Channel: http://www.youtube.com/kennethbgoodin

    Default

    Updated with a screenshot.

    0 Not allowed! Not allowed!
    ส็็็็็็็็็็็็็็็็็็็็็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้ส็็็็็็็็็็็็็็็็็็็็ ็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 02:30 AM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.