开发者

Installing Apps on Jailbroken Device in Applications

开发者 https://www.devze.com 2023-03-29 07:22 出处:网络
I have an Apple developer certificate.I\'m trying to install my application in the /Applications on my jailbroken iPhone so I can access the SMS.db database.I\'ve tried several different variations of

I have an Apple developer certificate. I'm trying to install my application in the /Applications on my jailbroken iPhone so I can access the SMS.db database. I've tried several different variations of using no certificate but signing with ldid, and signing with my iOS App Store distribution certificate. My app always crashes on launch and nothing seems to work. If I have an Apple developer certificate, what's the easiest way to get the app into /Applicat开发者_如何学JAVAions? Do I still have to do the ldid signing? I'm using XCode4, SDK 4.3 and iOS 4.1 on an iPhone 4.


I did some research about this for my own app that needed access to the whole file system on the jailbroken device. You can't install your app by normal means of installing an .ipa file to /Applications.

Your crash is most likely related to sandboxing, so it would look something like this:

Jun  2 15:16:10 unknown sandboxd[31] <Notice>: BlueTool(145) deny file-read-metadata /private/var/mobile

Process:         BlueTool [145]
Path:            /usr/sbin/BlueTool
Load Address:    0x7f000
Identifier:      BlueTool
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  BTServer [88]

Date/Time:       2012-06-02 15:16:10.275 -0500
OS Version:      iPhone OS 5.0.1 (9A405)
Report Version:  104

Backtrace:
0   libsystem_kernel.dylib          0x30604c0c stat + 12

I solved this by converting my .ipa package to a .deb package and installing it via dpkg. This way you can create any layout you want.

Here's the gist of the solution:

Create layout for the debian packager to work with:

mkdir ./layout
mkdir ./layout/Applications
mkdir ./layout/DEBIAN
chmod 0755 ./layout/DEBIAN

Unzip the .ipa package:

unzip package.ipa -d ./layout/Applications/MyAppName.app/

Create layout file:

cat > ./layout/DEBIAN/control <<EOF
Package: MyAppName
Name: MyAppName
Depends: mobilesubstrate, preferenceloader, libstatusbar
Version: 1.0-0
Architecture: iphoneos-arm
Description: MyAppName application
Maintainer: Me
Author: Me
Section: Tweaks
EOF

chmod 0755 ./layout/DEBIAN/control

Make a .deb package:

<path-to-theos-bin>/dpkg-deb -b ./layout MyAppName.deb

Show what's inside of the .deb package we just built:

<path-to-theos-bin>/dpkg-deb -c ./layout MyAppName.deb

Then deploy via ssh:

scp MyAppName.deb root@<device-ip>:/var/tmp
ssh root@<device-ip> "dpkg -i /var/tmp/MyAppName.deb"
ssh root@<device-ip> "killall -9 \"SpringBoard\""
0

精彩评论

暂无评论...
验证码 换一张
取 消