0

i Used iOSOpenDev with Xcode and I am able to compile a tweak and generate dylib file. Its a simple hello world kind of program which says hello when springboard is restarted.

How do I run it on jailbroken device? 1) I copied the dylib file in /Library/MobileSubstrate/DynamicLibraries/ and its plist file as well.

Then I executed the command killall -HUP SpringBoard.

For the very first time it ran. And then it has not ran ever since even after re-starting the phone several times.

What is the right process to run a theos dylib on a device?

Regards, Vishal.

TorukMakto
  • 2,066
  • 2
  • 24
  • 38

3 Answers3

4

Aha! Finally resolved the issue. There were actually more then one issues. I had to reinstall Cyida as it was corrupt and a huge learning curve to pass as below.

1) There are multiple ways to develop theos tweaks. The best way is to do it on Mac. Theos installation is required in all cases. So please follow Mac instructions from http://iphonedevwiki.net/index.php/Theos/Getting_Started. But don't run nic.pl to create project.

2) Install iOSOpenDev so that you can develop tweak via xcode itself. iOSOpenDev needs Theos which we installed on step 1. iOSOpenDev will also require dpkg package to be installed via macports.

3) Once done, just create new project via xcode. Pressing the RUN button in xcode only compiles and does not deploy to device. Once all compiling and linking errors are resolved follow below steps to run on actual device.

4) Open Target->build settings->User-Defined->iOSOpenDevDevice - Change this variable value to the IP of your phone. (You have to have your phone and you Mac on same WIFI). Then just press Command + Shift + I. And it will directly run on your device.

Setting up theos/tweak is not as straight forward as I thought but it fun to explore and figure out.

TorukMakto
  • 2,066
  • 2
  • 24
  • 38
2

Actually you cannot "run" the dylib, as it's a dynamic library.

You can copy the dylib to the target device through SCP/SSH. By pressing Command + Shift + i in Xcode, iOSOpenDev will do the work for you.

You need to make your iOS device and PC/Laptop in the same WiFi network, and remember to set the iOS device's IP address in ~/.bash_profile.

The wiki pages should help. https://github.com/kokoabim/iOSOpenDev/wiki/_pages

Wang Yandong
  • 136
  • 3
  • I got iExploror. I so I don't have problem transferring dylib to device. Why doesn't it execute and hook as expected? Link you mentioned has instructions for compiling and installing but not actually how to run it on the device? – TorukMakto Jul 11 '13 at 10:03
  • As I said previously, you cannot "run" the dylib directly. The dylib is loaded into the target process's address space. I'm not sure what's your tweak doing, paste some code and the plist content would help. – Wang Yandong Jul 12 '13 at 13:46
  • It should be packaged as a .deb file and, you can ssh it via iExplorer and then can be installed using iFile. The packaging will be done by xcode. iOSopendev does it. Or the easiest way is check my answer. Theos will do it and sign it for you using ldid. – johnny peter Jul 24 '13 at 03:18
1

In my opinion, creating tweaks using inbuilt theos script is better than iosopendev. If you have issues installing theos, just run the script below and it should be done. I couldn't trace the author of the script. Its by far the best way to install theos and all the other components necessary.

Link: http://goo.gl/Id6sU

johnny peter
  • 4,634
  • 1
  • 26
  • 38