This document provides information on developing software for a jailbroken iOS platform, including why one would develop for a jailbroken device, common jailbreaking tools and techniques, and development options using Xcode and Theos. Key points include being able to create tweaks and patches that can be loaded across apps, having more control over the platform, and not requiring an Apple developer license. Xcode and Theos are presented as options for development, with Theos noted as preferred due to its template system and ability to easily build MobileSubstrate extensions.
This document provides information on developing software for a jailbroken iOS platform, including why one would develop for a jailbroken device, common jailbreaking tools and techniques, and development options using Xcode and Theos. Key points include being able to create tweaks and patches that can be loaded across apps, having more control over the platform, and not requiring an Apple developer license. Xcode and Theos are presented as options for development, with Theos noted as preferred due to its template system and ability to easily build MobileSubstrate extensions.
This document provides information on developing software for a jailbroken iOS platform, including why one would develop for a jailbroken device, common jailbreaking tools and techniques, and development options using Xcode and Theos. Key points include being able to create tweaks and patches that can be loaded across apps, having more control over the platform, and not requiring an Apple developer license. Xcode and Theos are presented as options for development, with Theos noted as preferred due to its template system and ability to easily build MobileSubstrate extensions.
rlya 8a[agopal 1wluer: [ra[agp 8log: hup://www.prlyaonLech.com CocoaPeads, !an 2012 !allbreaklng ls Legal (..aL leasL ln Lhe uS) rlya 8a[agopal, CocoaPeads,2012 Why develop for a [allbroken plauorm? uevelop run-ume paLches (.dyllbs) LhaL can be auLomaucally loaded and shared across apps Llnk wlLh Lhlrd parL dyllbs (eg- 81SLack) Pook lnLo sysLem" apps and conLrol plauorm behavlor Lg. Moblle Safarl, Sprlngboard uullze feaLures noL exposed Lhrough Suk's publlc Als Lo bulld someLhlng really cool rlya 8a[agopal, CocoaPeads,2012 3 Why develop for a [allbroken plauorm? More conLrol over Lhe plauorm 1ermlnal wlndow, ssh, scp, rm eLc. lL's a unlx sysLem. uon'L need an Apple developer's llcense Self slgned apps, pseudo slgned apps ?ou don'L even need a Mac ?ou can even develop on Lhe phone (Cool!) Cpuons : ulsLrlbuLe Lhrough Cydla lnLernal LnLerprlse apps ersonal use. lf you can'L nd lL, you can bulld lL!
rlya 8a[agopal, CocoaPeads,2012 4 1eLhered vs. unLeLhered !allbreak 1eLhered ?ou need Lo LeLher your devlce Lo your C Lo rebooL lL. CulLe lnconvenlenL unLeLhered ?ou don'L need Lo LeLher your devlce Lo your C Lo rebooL lL. arual unLeLhered 1eLhered buL you can rebooL unLeLhered Lo enable mlnlmal funcuonallLy
rlya 8a[agopal, CocoaPeads,2012 3 !allbreak Soware (lf lLs noL free, lL's a scam) 8edSn0w (Mac /Wlndows) !allbreakme.com (Web) wnage1ool (Mac) Creenols0n (Mac/Wlndows) rlya 8a[agopal, CocoaPeads,2012 6 SLaLus of lCS !allbreak lCS 3.0.1 for A4 devlces: unLeLhered [allbreak avallable from 8edSn0w hup://cydlahelp.com/[allbreak-3.0.1-unLeLhered- lphone-4-3gs-lpod-Louch-4g-3g-lpad-wlLh- redsn0w-0.9.10b1-LuLrolal/ lhone4S and lad2 comlng soon lCS 4.3.3: LasL unLeLhered [allbreak rlya 8a[agopal, CocoaPeads,2012 7 8aslc Apps/packages Lo lnsLall on your !8 phone Cydla - App ulsLrlbuuon cenLer for [allbroken Apps !ay lreeman aka Saurlk" CpenSSP S8Semngs syslogd syslog Loggler Moblle 1ermlnal uownload lL from a source hup://?ourCydla8epo.org vla Cydla rlya 8a[agopal, CocoaPeads,2012 8 SPSP 8lobs SlgnaLure Pashes assoclaLed wlLh your rmware unlque Lo a devlce uurlng upgrade/resLore, Apple slgnaLure servers verlfy Lhe slgnaLures WlLh every new release, Apple sLops slgnlng old verslons Save your SPSP blobs lf you wanL Lo resLore Lo an older verslon Cydla now auLomaucally saves Lhem Can also use 1lnyumbrella 1o 8esLore Lo older verslon of rmware 1lnyumbrella or use l1unes , polnL Lo Cydla's slgnaLure servers rlya 8a[agopal, CocoaPeads,2012 9 Moblle SubsLraLe ! "# $%& '& ()*$+ (,)-&.+,/ $%)$ )00+.# 1,'23),$4 '&5&0+3&,# $+ 3,+5"'& ,6728-& 3)$*%&# 9:;+<"0&=6<#$,)$& &>$&7#"+7#?@ $+ #4#$&- (67*8+7#" lrom !ay lreeman (laLher of Cydla") Moblle SubsLraLe LxLenslons a.k.a !"#$%& MobllePooker Pooklng sysLem funcuons (Cb[-C, C/C++) ;=A++/;&##)B&C>9@ ;=A++/D67*8+79@ MoblleLoader Loads uslng u?Lu_lnSL81_Ll88A8lLS env. var Can speclfy lLers rlya 8a[agopal, CocoaPeads,2012 10 More Moblle SubsLraLe. Safe Mode Cperauon All Lweaks wlll be dlsabled lf a Lweak crashes Sprlng8oard MoblleSubsLraLe lnsLalled vla Cydla hup://lphonedevwlkl.neL/lndex.php/ MoblleSubsLraLe rlya 8a[agopal, CocoaPeads,2012 11 A noLe on class-dump Command llne uullLy LhaL generaLes Cb[-C declarauons for classes, caLegorles and proLocols from Mach-C les ?ou can use lL Lo generaLe header le declarauons for prlvaLe headers, prlvaLe frameworks, sysLem apps eLc. !"#$%&&'()*+ '- "./0/$1+/2"3$%4512*&" 63718/9:!+$%4512*"./0/$1+/2":.;&"63718/9:<!=!&(>" :?&4/*"@6A2%2?"B12/:/206#/&":+268CD1%2(!%++" :+268CD1%2( '2 ''&(>'61& <!= '1 :+268CD1%2(
hup://www.codeLhecode.com/pro[ecLs/class-dump/
rlya 8a[agopal, CocoaPeads,2012 12 uevelopmenL Cpuons xcode Mac 1heos Mac, Llnux, lCS rlya 8a[agopal, CocoaPeads,2012 13 uevelopmenL Cpuon- xCode Can bulld self-slgned apps Can lnsLall and debug vla xcode lalrly CompllcaLed SeLup. Could noL geL app Lo lnsLall wlLh xcode 4/lCS3 Can manually lnsLall Lhe app ?ou rely on syslog logglng Could bulld Moblle SubsLraLe exLenslons MoblleSubsLraLe dyllb" 1emplaLe was avallable for xcode 3 (from Skylar LC ) 1emplaLe noL avallable for xCode4 rlya 8a[agopal, CocoaPeads,2012 14 uevelopmenL Cpuon - 1heos E%&+# "# ) *,+##230)F+,- #6"$& +( '&5&0+3-&7$ $++0# (+, -)7)B"7BG '&5&0+3"7BG )7' '&30+4"7B "H= #+I.),& ."$%+6$ $%& 6#& +( J*+'&" CreaLor: u Poweu Can develop on Llnux , Mac or lCS ro[ecL LemplaLes vla nlC.pl A bulld sysLem wlLh auLomauc packaglng supporL (ready for Cydla dlsLrlbuuon) Can bulld pseudo slgned" apps wlLh ldld AuLomauc lnsLallauon of apps onLo devlce no debugglng faclllLy. 8ely on syslogs Can (easlly) bulld moblle subsLraLe exLenslons referred Cpuon rlya 8a[agopal, CocoaPeads,2012 13 8ulldlng self-slgned app wlLh xCode CeneraLe self slgned cerucaLe keyChaln->CerucaLe AsslsLanL
lnsLrucL xcode Lo use code slgnlng procedures ln xCCodeSlgnConLexL lnsLead of Lhe more resLrlcuve xClhoneCSCodeSlgnConLexL &)(1 ")&2"A68"&/( '6 !A%> E&" FB63718/9:B1(/:6C8B184/G4" FBB1(/:6C8B184/G4"E "./0/$1+/2" 3$%4512*&"63718/9:!+$%4512*" H851!+$6&4 rlya 8a[agopal, CocoaPeads,2012 16 8ulldlng self-slgned app wlLh xCode updaLe ro[ecL 8ulld Semngs
rlya 8a[agopal, CocoaPeads,2012 18 lnsLalllng self-slgned app (..LhaL was bullL wlLh xcode) Manual (lrom Lermlnal) scp <myApp.app> rooL[<lhone>:/Appllcauons 8esprlng Lhe phone S81oggler uebugglng Lnable syslog on phone /var/log/syslog vla xcode lollow serles of sLeps Lo enable enuLlemenLs for debugglng 8log posL: hup://neLworkpx.blogspoL.com/2009/09/complllng- lphoneos-31-apps-wlLh-xcode.hLml never goL lL worklng wlLh xcode 4.2
rlya 8a[agopal, CocoaPeads,2012 19 unlnsLalllng App &&7 2114IJ63718/K #( "L++$6#%4618& 2* M25 N?L++!%++ O/+268C rlya 8a[agopal, CocoaPeads,2012 20 uslng rlvaLe Peaders wlLh xCode CeL Lhe headers 9+4618PQ.1R8$1%( 47/ 7/%(/2& 744+&Q""C647)A!#1*"8&4"69:'O)846*/'-/%(/2&"4%C& Cpuon2: CeneraLe wlLh class-dump 1he generaLed header les have some spurlous #lmporLs LhaL need Lo be removed &)(1 &/( '6!1$( E"S:9AT/#4U!7" (E V!7 Copy Lhe headers lnLo Lhe approprlaLe lrameworks folder /ueveloper/lauorms/lhoneCS.plauorm/ueveloper/Suks/lhoneCS<sdk>.sdk/SysLem/ Llbrary/rlvaLelrameworks/<lramework>/Peaders folder ?ou would have Lo creaLe Peaders" folder /ueveloper/lauorms/lhoneCS.plauorm/ueveloper/Suks/lhoneCS<sdk>.sdk/SysLem/ Llbrary/lrameworks/<lramework>/Peaders folder
Add Lhe framework Lo your pro[ecL Llnk 8lnary WlLh Llbrarles bulld phase (Add CLher") rlya 8a[agopal, CocoaPeads,2012 21 uemo : Creaung self slgned app wlLh xCode rlya 8a[agopal, CocoaPeads,2012 22 1heos : SLeps Lo seL up uevelopmenL LnvlronmenL 1) lnsLall Lhe lCS Suk & xcode 2) lnsLall MacorLs (package mgmL. sysLem) hup://www.macporLs.org/lnsLall.php
rlya 8a[agopal, CocoaPeads,2012 23 3) SeLup 1heos (8un Cmds from a Lermlnal wlndow) CreaLe Lhe lnsLallauon dlrecLory *>(62 "47/1& /G+124 47/1& W "1+4"47/1& Check ouL Lhe Lheos src #( XY-Z9: &08 #1 744+Q""&08!71R/44!8/4"&08"47/1&"42)8> XY-Z9: lnsLall ldld - pseudo code slgnlng Lool" #( XY-Z9:"A68 #)2$ '& 744+Q""($!(21+A1G!#1*")"[P<\\]["$(6( K XY-Z9:"A68"$(6(^ #7*1( _G XY-Z9:"A68"$(6( rlya 8a[agopal, CocoaPeads,2012 24 4) lnsLall rlvaLe headers uownload prlvaLe headers for prlvaLe frameworks for 3.x from 744+&Q""C647)A!#1*"2+/426#7"6+718/7/%(/2&" %2#760/&"*%&4/2 `1) #%8 %$&1 C/8/2%4/ 47/ 7/%(/2& 512 *6&&68C 52%*/R12>& )&68C #$%&&'()*+ Copy Lhe headers lnLo lnclude folder #( XY-Z9:"68#$)(/ #+ '2 a".1R8$1%(&"J7/%(/2& 51$(/2K"V ! Some sysLem les may be mlsslng : So do a manual copy #+ ":?&4/*"@6A2%2?"b2%*/R12>&"H9:)25%#/!52%*/R12>" -/%(/2&"H9:)25%#/L3H!7 XY-Z9:"68#$)(/"H9:)25%#/"!
rlya 8a[agopal, CocoaPeads,2012 23 3)lnsLall dpkg needed Lo creaLe .deb packages &)(1 +124 68&4%$$ (+>C rlya 8a[agopal, CocoaPeads,2012 26 8ulldlng & 8unnlng an App WlLh 1heos /G+124 :.;cZO:H9SWJ&(> 0/2&618K 8un Lhe new lnsLance CreaLor" (nlC) A perl scrlpL LhaL allows you Lo creaLe pro[ecLs based on LemplaLes XY-Z9:"A68"86#!+$ SelecL Appllcauon" LemplaLe. llll ln Lhe baslc sLu 8ulld and lnsLall *%>/ +%#>%C/ /G+124 Y-Z9:d.ZcHBZdH3 W JH3L((2/&& 15 ?1)2 eD +718/K *%>/ 68&4%$$ rlya 8a[agopal, CocoaPeads,2012 27 uemo of Slmple App wlLh 1heos rlya 8a[agopal, CocoaPeads,2012 28 Moblle SubsLraLe LxLenslons wlLh 1heos very slmple wlLh 1heos 1emplaLe vla nlc.pl Logos reprocessor dlrecuves hook, orlg, Loglfy Logs meLhods wlLhln specled header le
rlya 8a[agopal, CocoaPeads,2012 29 A Comparlson ()*+,-* .,/,& HN3 126C68%$d%#460%4/L$/24H4/*d^
016( 2/+$%#/(d%#460%4/L$/24H4/*d f:DL$/24H4/*&B18421$$/2V &/$5g:Z@ d#*(g6( 64/*h i B$%&& #18421$$/2 W 1AT#dC/4B$%&& fj:D:N:L$/24H4/*jh^ 65 fkl64/* 6&;68(95B$%&&Q#18421$$/2mh i 126C68%$d%#460%4/L$/24H4/*d f&/$5gd#*(g64/*h^ n n
/G4/28 jBj 016( 68646%$6o/fh^ /G4/28 jBj 016( 68646%$6o/fh i B$%&& #18421$$/2 W 1AT#dC/4B$%&& fj:DL$/24H4/*&B18421$$/2jh^ N:-11>N/&&%C/ZGf#18421$$/2gI&/$/#412 f%#460%4/L$/24H4/*QhgfHN3h 2/+$%#/(d%#460%4/L$/24H4/*dgfHN3Vh p126C68%$d%#460%4/L$/24H4/*dh^ }
()*+ .,/,& q711> :DL$/24H4/*&B18421$$/2
'f016(h%#460%4/L$/24H4/*Qf6(h64/* i q$1C^ 65 fkl64/* 6&;68(95B$%&&Qq# f:D:N:L$/24H4/*hmh i q126C^ n n q/8( rlya 8a[agopal, CocoaPeads,2012 30 uemo : Slmple 1weak uslng 1heos rlya 8a[agopal, CocoaPeads,2012 31 WlLh CreaL ower Comes CreaL 8esponslblllLy. So lease Code 8esponslbly"