How to create a .deb using MobileTerminal?

Discussion in 'iPod touch' started by masterhomieg, Jan 7, 2011.

  1. masterhomieg

    masterhomieg New Member

    Sep 22, 2010
    Likes Received:
    Ok I have Mobile Terminal on my 2G iPod and I was wondering how I can create a .deb file using it and how do I put the folder I need onto my device to make it into a .deb file using mobileterminal. I'm a new themer so I'd like to know please and thanks?
  2. michaelhaseth

    michaelhaseth Member

    Oct 10, 2010
    Likes Received:
    4G iPod touch
    Set your folders up like so:

    Create a folder with the same name as your application (I'll call it MyApp in this example)

    Insde MyApp add a folder called DEBAIN, then still in the MyApp folder (not the DEBAIN just yet) add a folder called Applications and inside of that place your folder. The rest of the folders (in the MyApp folder again) will vary, if you add a folder called var with a file inside of it, it will add that file to the /var folder upon installation. But be warned also, if you add a file thats in the same location and has the same name as an already existing file (like, say /System/Library/CoreServices/ then it will overwright it, and it will remove that file upon uninstallation.

    Now navigate to the .../MyApp/DEBAIN folder and create a file called control,

    the controle file should look like this:

    (saurik's example)
    Package: com.saurik.myprogram
    Name: MyProgram
    Version: 1.0.4-1
    Architecture: iphoneos-arm
    Description: an example of using APT
    Every day people use Cydia, but with the
    instructions embodied in this package,
    people can publish for it as well.
    Maintainer: Your Name <>
    Author: Jay Freeman (saurik) <>
    Sponsor: Microsoft <>
    Section: Games

    You dont neccicarily need all of these feilds, this is the file that cydia uses to identify all of the apps information, but is required by debain to build the app.

    The file permissions should be like this;

    MyApp - 777
    Debain folder and controle file - >=755
    Your applications binary (inside the, named the same as MyApp) - 4755 (thats just 755 but the owner is also set to sticky)

    Once you have set this up, go to mobile terminal and login as root, type cd (Location of MyApp) then type this dpkg-deb -b MyApp

    Go back to the location of your MyApp folder, you should now have a deb file!

Share This Page