如何从越狱的iOS设备上的捆绑ID快速获取应用程序的目录? [英] How to quickly get app's directory from its bundle id on jailbroken iOS device?
问题描述
在iOS设备中,所有用户应用程序都位于 / var / mobile / Applications
目录中,每个应用程序都有一个唯一的随机uuid作为其目录名称,例如:
In iOS devices, all user applications are located in /var/mobile/Applications
directory, and each app has a unique random uuid as its directory name, for instance:
/ var / mobile / Applications / 15FD62FD-2BEB-4C1E-A9B8-BC93E5C721CC
uuid 15FD62FD-2BEB-4C1E-A9B8-BC93E5C721CC
。
现在我想通过应用程序的包标识符获取目录,我的解决方案是枚举 / var / mobile / Applications
目录,从获取包标识符.plist
并检查。
Now I want to get the directory by application's bundle identifier, my solution is enumerate the /var/mobile/Applications
directory, get the bundle identifier from Info.plist
and check.
这个解决方案相当慢,有没有更快的方法呢?
This solution is rather slow, is there any quicker way to do this?
例如。如果有一个plist将bundle id记录到uuid映射,那么我可以读取该文件以避免目录枚举。
e.g. if there is a plist that records the bundle id to uuid mapping, then I can read that file to avoid directory enumeration.
推荐答案
我认为你要找的文件是
/var/mobile/Library/Caches/com.apple.mobile.installation.plist
例如,它包含每个应用的类似信息:
For example, it contains information like this for each app:
"com.zillow.ZillowMap" = {
ApplicationDSID = 216284405;
ApplicationType = User;
CFBundleDisplayName = Zillow;
CFBundleExecutable = ZillowMap;
CFBundleIconFiles = (
"app-icon",
"app-icon-iPad.png",
"app-icon-iPad@2x.png"
);
CFBundleIcons = {
CFBundlePrimaryIcon = {
CFBundleIconFiles = (
"app-icon",
"app-icon-iPad.png",
"app-icon-iPad@2x.png"
);
UIPrerenderedIcon = 1;
};
};
CFBundleIdentifier = "com.zillow.ZillowMap";
CFBundleName = ZillowMap;
CFBundleShortVersionString = "6.1.0112";
CFBundleVersion = "6.1.0112";
CodeInfoIdentifier = "com.zillow.ZillowMap";
Container = "/private/var/mobile/Applications/B9284FBE-E558-4A65-A7E4-AE20CDAD9A1D";
Entitlements = {
"application-identifier" = "JEWMY3RZ4A.com.zillow.ZillowMap";
"aps-environment" = production;
};
EnvironmentVariables = {
"CFFIXED_USER_HOME" = "/private/var/mobile/Applications/B9284FBE-E558-4A65-A7E4-AE20CDAD9A1D";
HOME = "/private/var/mobile/Applications/B9284FBE-E558-4A65-A7E4-AE20CDAD9A1D";
TMPDIR = "/private/var/mobile/Applications/B9284FBE-E558-4A65-A7E4-AE20CDAD9A1D/tmp";
};
IsUpgradeable = 1;
LSRequiresIPhoneOS = 1;
MinimumOSVersion = "5.0";
Path = "/private/var/mobile/Applications/B9284FBE-E558-4A65-A7E4-AE20CDAD9A1D/ZillowMap.app";
SequenceNumber = 2618;
SignerIdentity = "Apple iPhone OS Application Signing";
UIDeviceFamily = (
1,
2
);
UIPrerenderedIcon = 1;
};
更新
此文件已被删除iOS 8 :( https://www.theiphonewiki.com/wiki/Com .apple.mobile.installation.plist )
iOS 8上存在类似的文件 / var / mobile / Library / MobileInstallation / LastLaunchServicesMap.plist
,但它可能只在启动时重新启动(重启)。
There exists a similar file for iOS 8 at /var/mobile/Library/MobileInstallation/LastLaunchServicesMap.plist
, but it might only be updated at launch (reboot).
这篇关于如何从越狱的iOS设备上的捆绑ID快速获取应用程序的目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!