(Programmatically/Automatically) Removing iOS-Apps

半世苍凉 提交于 2019-12-11 04:06:50

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!