Jump to content

Welcome to AppCake Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

How to build deb file on your iPhone


  • You cannot start a new topic
  • Please log in to reply
3 replies to this topic

#1
hotsjf

hotsjf

    7 years in scene

  • Admin
  • 7,633 posts
    • Time Online: 192d 2h 25m 26s
  • Twitter:@iphonecake_com
  • LocationUSA
  • iDevices Owned:iPod Classic, iPod Touch 4, iPhone 3GS, iPhone 4, iPhone 5S, iPhone 6+, iPad 1, iPad 3, iPad 4, iPad Air 2, Apple Watch, MacBook Air, MacBook Pro, iMac
  • Most used iOS:iOS 6, iOS 7, iOS 8

deb is the extension of the Debian software package format and the most often used name for such binary packages. Like the "Deb" part of the term Debian, it originates from the name of Debra, then girlfriend and now ex-wife of Debian's founder Ian Murdock.

Debian packages are standard Unix ar archives that include two tar archives optionally compressed with gzip (zlib), Bzip2, lzma, or xz (lzma2): one archive holds the control information and another contains the program data.


Requirements:
- iFile
- MobileTerminal or Prompt(Requires OpenSSH to be installed)


How to:

Create a working directory, I would suggest creating a folder named debs inside /var/mobile/

Download my sample package below. Copy the sample package to /var/mobile/debs and extract the archive with iFile.

Edit the field values in the control file with your package information. The control file is located /var/mobile/debs/com.sull.sample/DEBIAN/control


Sample control file:
Package: com.sull.sample
Name: Sample
Version: 1.0
Section: iThemes
Depends: winterboard
Architecture: iphoneos-arm
Description: Your description here.
Author: xxx <youremail@gmail.com>
Sponsor: xxx <http://xxx.com>
Maintainer: xxx <youremail@gmail.com>



In the sample the file structure has been laid out for a Winterboard theme. You can easily change the file structure to suit your package. Just be sure to name each folder inside your package exactly as it appears in the iOS filesystem. Say for example I want to include a ringtone with my theme, the structure of my deb would look like this:

com.sull.sample
-DEBIAN
---control
-Library
---Themes
---Ringtones

If I want to add a script inside my theme package that would go inside /usr/bin/ I would create the extra folders like so:

com.sull.sample
-DEBIAN
---control
-Library
---Themes
---Wallpaper
-usr
---bin
------myscript



Important:

*When done editing your control file, go to the end of the last line and press the enter/return key, now save the file. You always have to go to the last line and press enter or you'll run into errors when building.

*Depends: This field is only necessary in your control file if your package depends on another package to function properly, in the sample above the package depends on Winterboard because it's a winterboard theme. If your creating a dreamboard package you would have the depends field value looking like this Depends: com.wynd.dreamboard now remember you can easily find package identifiers within cydia, go to any package you wish to make your package depends on, scroll down and look for the ID, usually starts with com.bigboss, com.modmyi, com.sull, etc etc.

*Do not leave fields with empty values in your control file. If your package does not depend on any other package to function, simply remove the field Depends: from your control file.


Building your package into a deb:

You should be ready to build your deb package now. Open up MobileTerminal or some other command line alternative.

The first command su is going to give you root privliges and you'll be asked to type your password, alpine is your default root password if you have not changed it. second command cd is going to put you inside the debs directory. third command is going to build com.sull.sample into a deb file.
su
cd /var/mobile/debs
dpkg -b com.sull.sample

You can ignore these warnings they are completely normal.
warning, `com.sull.sample/DEBIAN/control' contains user-defined field `Name'
warning, `com.sull.sample/DEBIAN/control' contains user-defined field `Author'
warning, `com.sull.sample/DEBIAN/control' contains user-defined field `Sponsor'
dpkg-deb: ignoring 3 warnings about the control file(s)


Sample Package:

Sample DEB File

Attached File  com.sull.sample.zip   1.17KB   131 downloads

 
 
Credit: Boss

  • hexass, MONGOLO, AwesomeRob and 4 others like this

#2
picoro

picoro

    Getting Known

  • IC Member
  • 27 posts
    • Time Online: 2d 6h 34m 36s
  • Locationmexico

very usefull.



#3
Abst3rg0

Abst3rg0

    Ex- Moderator

  • IC Member
  • 464 posts
    • Time Online: 10d 2h 14m 14s
  • LocationEarth
  • iDevices Owned:iPhone 5, iPad Mini with Retina, iHave a PC
  • Donations:1EYddXkDkx41EP5Z2khDqjUnhCy8eGh3y3
Just want to learn how to repack the debs and put our credit like BYA is the author we put iPhonecake or AppCake

#4
hotsjf

hotsjf

    7 years in scene

  • Admin
  • 7,633 posts
    • Time Online: 192d 2h 25m 26s
  • Twitter:@iphonecake_com
  • LocationUSA
  • iDevices Owned:iPod Classic, iPod Touch 4, iPhone 3GS, iPhone 4, iPhone 5S, iPhone 6+, iPad 1, iPad 3, iPad 4, iPad Air 2, Apple Watch, MacBook Air, MacBook Pro, iMac
  • Most used iOS:iOS 6, iOS 7, iOS 8

Just want to learn how to repack the debs and put our credit like BYA is the author we put iPhonecake or AppCake

mostly its just unpack the deb then modify the control file, then pack again