Search code examples
iossmssandboxjailbreak

Installing an app directly into /Applications/


When you build an app, and directly install it on your iOS device as normal using Xcode, the application will be sandboxed on the device.

However, I would like to build the app straight into /Applications/ so that the application will not be sandboxed and therefore, I will be able to access the SMS database (var/mobile/Library/SMS/sms.db)

Edit---- Editor (Editors Fault)

The OP mentioned in his original question that the application would be for a Jailbroken iOS Device, hence the 'jailbreak' tag. Apologies on my (the editors) behalf.


Solution

  • You can check out iOSOpenDev for an alternate toolset to use.

    But, also, if your phone is jailbroken, you can use Cydia to install OpenSSH. With SSH installed, and the SSH daemon running, you can just log in to the phone and simply move the application directory (e.g. /var/mobile/Applications/*/MyAppName.app) to /Applications. You might need to change permissions with chown or chmod to make MyAppName.app and its contents have the same ownership/permissions as the other apps in /Applications.

    ssh root@iphone-wifi-ip
    find /var/mobile/Applications/ -name MyAppName.app
    cd /var/mobile/Applications/D76328B1-42F2-4AA0-B1B4-A77796290082/
    mv MyAppName.app /Applications/
    chown -R mobile.staff /Applications/MyAppName.app
    su mobile -c uicache
    

    Obviously, the long unique ID string above will be different for you.

    Another option is to use dpkg to package up your apps, and then install them on the device from the command line. But, that might be more work than you're ready for yet.