How to create your own app for jailbreak iPad

Discussion in 'iPad Development' started by jsherk, May 4, 2011.

  1. jsherk
    Offline

    jsherk iPF Novice

    Joined:
    Apr 19, 2011
    Messages:
    78
    Thanks Received:
    1
    Trophy Points:
    0
    Ratings:
    +1 / 0
    I was trying to figure out how to start writing my own apps for a jailbreak iPad, so here is what I figured out so far.

    NOTE: This is all done on an iPad first generation 16GB WiFi with redsn0w jailbreak running iOS 4.3.2 and using my Windows XP PC to access it.

    NOTE: My understanding is that the steps below will allow you compile C, C++ or Objective C.

    HELPFUL LINKS:
    Theos/Getting Started - iPhone Development Wiki
    Chapter*1.*Makefiles
    IRC @ irc.saurik.com (channel #theos )

    STEP #1
    jailbreak your ipad

    STEP #2

    From Cydia you will need to install
    BigBoss Recommended Tools (id: bigbosshackertools)

    I think you can use MobileTerminal directly on the iPad, but personally I access the iPad from my PC. I use PSPad to edit my text files, then use WinSCP to upload the files to the iPad and then use PuTTY for command line access.
    To use WinSCP and PuTTY you will need to install OpenSSH from Cydia as well.

    STEP #3
    Install sdk version 3 (required for Theos to work properly). This is part of BigBos Recommended Tools. From command line type:
    installsdk3

    STEP #4
    Install PERL and THEOS

    1. Create a file at /etc/apt/sources.list.d/coredev.nl.list containing the following line:
      Code:
      deb http://coredev.nl/cydia iphone main
    2. Create a file at /etc/apt/sources.list.d/howett.net.list containing the following line:
      Code:
      deb http://nix.howett.net/theos ./
    3. As root, issue this command:
      Code:
      apt-get update
    4. Then this command:
      Code:
      apt-get install perl net.howett.theos
    NOTE: Steps #1 to #4 would only be performed once on your iPad and you should never have to do them again!

    COMMAND LINE TOOL EXAMPLE
    STEP #5
    Use New Instance Creator to create a NEW project. Type
    cd /var/theos/bin
    /var/theos/bin/nic.pl


    For this example we will make a Hello World command line tool

    Choose template: 4 (iphone/tool)
    Project Name: helloworld
    Package Name: com.memyself.helloworld
    Author Maintainer Name: me myself

    This should create a new directory (in your current working directory):
    /var/theos/bin/helloworld

    STEP #6
    Open the following file with your favorite text editor:
    /var/theos/bin/helloworld/main.mm

    Add
    printf("Hello World\n");
    on the line BEFORE
    return 0;
    and save the changes.

    STEP #7
    Run make to compile using the makefile by typing:
    /var/theos/bin/helloworld/make

    This should create a new directory (obj) with your compiled command line tool.

    STEP #8
    To run our fabulous Hello World command line tool type:
    /var/theos/bin/helloworld/obj/helloworld

    That's it!

    I just typed all this up from memory, so if you find a mistake let me know and I will fix it. Also, the #theos channel on IRC @ irc.saurik.com is where I got most of this info, so they are a good reference as well.


    GUI APPLICATION EXAMPLE
    Do Step #1 to Step #4 above if you have not done them already (they should only need to be done once, and then you won't have to do them ever again.)

    STEP #5
    Use New Instance Creator to create a NEW project. Type
    cd /var/theos/bin
    /var/theos/bin/nic.pl


    For this example we will use the default application "red screen" with icon on the springboard:

    Choose template: 1 (iphone/application)
    Project Name: redscreen
    Package Name: com.memyself.redscreen
    Author Maintainer Name: me myself

    This should create a new directory (in your current working directory):
    /var/theos/bin/redscreen

    STEP #6
    Run make package install to compile using the makefile and install the app by typing:
    /var/theos/bin/redscreen/make package install

    This should create appropriate application files and directories.

    STEP #7
    You now need to re-spring the spring board. You can do this by either re-booting your iPad, or you can run the uicache command as the mobile user (su mobile first then uicache).

    That's it! You should now have an application icon on the springboard called redscreen. Tap it and look at an amazing red screen!

    UNINSTALL (applies to application only, not to command line tool)
    If you need to uninstall your application, you would run dpkg -r packagename from command line, and then re-spring (reboot ipad or run uicache from mobile user):
    dpkg -r com.memyself.redscreen

    Again let me know if you find any issues!
    Last edited: May 5, 2011
  2. f4780y
    Offline

    f4780y Super Moderator Staff Member

    Joined:
    Sep 11, 2010
    Messages:
    7,109
    Thanks Received:
    635
    Trophy Points:
    113
    Location:
    Troon, Scotland
    Ratings:
    +635 / 0
    Thanks for the info. We have a development section, so I'm moving the thread over there where hopefully it can get some good feedback and grow into a valuable resource for the site.
  3. SweetPoison
    Offline

    SweetPoison iPad Legend

    Joined:
    Jun 20, 2010
    Messages:
    14,940
    Thanks Received:
    132
    Trophy Points:
    0
    Location:
    Sacramento, California
    Ratings:
    +134 / 0
    Yay! I am very glad.:)
  4. jsherk
    Offline

    jsherk iPF Novice

    Joined:
    Apr 19, 2011
    Messages:
    78
    Thanks Received:
    1
    Trophy Points:
    0
    Ratings:
    +1 / 0
    I have just updated instructions above with how to create a sample gui application as well.
  5. zerozhu
    Offline

    zerozhu iPF Noob

    Joined:
    Jul 6, 2012
    Messages:
    1
    Thanks Received:
    0
    Trophy Points:
    0
    Ratings:
    +0 / 0
    Hi,I am chinese,my english is not good,and i encount a question:
    I followed you teaching ,and i successfully installed the .deb file on my jailbroken device,but it can not run,it just show a while,and then disappeared. can you tell me the reason,thank you ,if you know the reason,can you send to me. thanks very much!

    [Moderator edit: Removed link to e-mail address. Please read our rules. Thanks.]
    Last edited by a moderator: Jul 6, 2012
  6. seeskyline
    Offline

    seeskyline iPF Noob

    Joined:
    Dec 25, 2012
    Messages:
    1
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    中国
    Ratings:
    +0 / 0


    Hi, zerozhu, Have you worked it out? I encountered the same problem as you did. If you found the solution, could you tell me too? Thanks in advance.
  7. shophia
    Offline

    shophia iPF Noob

    Joined:
    Mar 21, 2013
    Messages:
    6
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    USA
    Ratings:
    +0 / 0
    Hi jsherk. You put such a informative information about how to create your on app fora jailbreak iPad. You define GUI application example but I'm not getting your 6 point. When I Run make package install, at that time error will be occurred, can you please recommended it or give me solution of it.

Share This Page

Search tags for this page
code jailbreak apps
,
create jailbreak apps
,
create jb apps
,
cydia make your own app
,
develop apps for jailbroken ipad
,
developpement ipad application jailbreak
,
how can you make your own jailbreak
,
how to compile app for jailbroken ipad
,

how to create a jailbreak app

,
how to create jailbreak app
,
how to create jailbreak apps
,

how to develop jailbreak applications mail

,
how to get jailbreak on ipad
,

how to make a jailbreak app

,

how to make jailbreak apps

,
how to make jailbroken apps
,
installsdk3
,
make a jailbreak app
,
theos on ipad
,
write a jailbreak app