问题
I'm looking for a solution how to remove all installed iOS-Apps from a device. I'm working on a project for iOS-Security. For different analytical stuff on a jail-broken device it's necessary to automatically install a fat bunch of apps, perform all the tests and remove them afterwards to get free space for further applications. The auto installation and test-logic is already done. I only stuck with the apps-removing part.
User installed iOS-Apps are located in /var/mobile/Applications/
.
Each application has its own randomly named directory e.g. 7654BE30-F438-42CE-98E0-B95264458C49/
.
To proof whether an application is already installed or not my software checks out the com.apple.mobile.installation.plist
in /private/var/mobile/Library/Caches/
I've tried to remove the binaries of all applications in /var/mobile/Applications/
and there references in the com.apple.mobile.installation.plist
. It seems like the iOS generates a new com.apple.mobile.installation.plist
after each installation-process, so it makes no difference whether I remove all the entries out of com.apple.mobile.installation.plist
or not. So if I would like to install an application which was already tested someday my software wouln't recognize that it's not installed yet, because it's still listed in com.apple.mobile.installation.plist
.
I try to find out where the iOS stores all the information about a user installed application. Would appreciate any help or hint to find out the information. Thanks in advance!
Consider I'm working with an jailbroken iDevice, so everything is possible ;-)
回答1:
Wipe whole device programmatically
Is there a way to programatically restore my iphone to factory settings?
Uninstall some app programmatically
if you want to uninstall apps, you can use private API "MobileInstallationUninstall". However, it requires entitlement "com.apple.private.mobileinstall.allowedSPI", which you can get, because your device is jailbroken.
来源:https://stackoverflow.com/questions/16321809/programmatically-automatically-removing-ios-apps