2

I've read about this argument here: UUID mismatch detected with the loaded library

The most voted solution didn't work for me, because I'm sure in my case the problem is Spire.

When I try to run my App [iOS 5.0 targeted] in Xcode 4.2 onto my iPhone 4 [iOS 5.0.1 JB] the output in the console is:

warning: UUID mismatch detected with the loaded library - on disk is:
    /Users/myusername/Library/Developer/Xcode/iOS DeviceSupport/5.0.1 (9A405)/Symbols/System/Library/Frameworks/CoreLocation.framework/CoreLocation
unable to load symbol file: warning: Unable to read symbols for /Library/MobileSubstrate/MobileSubstrate.dylib (file not found).
warning: No copy of MobileSubstrate.dylib found locally, reading from memory on remote device.  This may slow down the debug session.

Before installing Spire I didn't have any Xcode problem. I've read that somebody already found a solution: https://stackoverflow.com/a/8930742/1203837 but I'm not so practical in approaching the proposed one that I'm going to report also here:

If you have Spire installed and you updated to 5.0.1 you need to uninstall Spire or update dyld_shared_cache which Spire is using...Spire dyld cache is at /var/spire. You need to extract cache appropriate to your current firmware from ipsw.

I really would NOT uninstall Spire, so please help me to find out how to "update dyld_shared_cache which Spire is using" .


EDIT: thanks to kexik I've tested a fully working workaround for the problem.

Whatever device you have installed Spire in, here is the step-by-step guide (Mac OS):

  • download the original iPhone 4S ipsw ( link )

  • rename it from .ipsw to .zip

  • extract it (normally, by double-clicking it in Mac OS X)

  • download vfdecrypt ( link ) ed unzip it into the same extracted folder of the ipsw.

  • Open Terminal and navigate into the ipsw extraxted folder (tip: type cd then drag-and-drop directly the folder into the Terminal window)

  • Run the command:

./vfdecrypt -i 038-3763-001.dmg -o decrypted.dmg -k a31ffd506c6711c5a0c52c9f0a2f7208a2f63ad9dd40506e70d80ea20a981eb1312bc774

NOTE:

-i 038-3763-001.dmg

Is relative to the biggest .dmg in all the ones you can find into the extracted ipsw folder (referred to the Root File System)

-o decrypted.dmg

Is relative to the name of the output decrypted file, I called "decrypted" (the extension .dmg is fixed)

-k a31ffd506c6711c5a0c52c9f0a2f7208a2f63ad9dd40506e70d80ea20a981eb1312bc774

Is relative to the VFDecrypt Key exactly for iPhone 4S iOS 5.0.1 and 038-3763-001.dmg image. Source is theiPhoneWiki

  • Wait until the process terminates (You'll see a new prompt line) completed vfdecrypt process

  • Open (mount) decrypted.dmg (double-click it) and here it is the iPhone 4S root file system.

  • Navigate into the folder

/System/Library/Caches/com.apple.dyld

  • Make a copy of the (only) file dyld_shared_cache_armv7 (i.e. on your desktop) and rename it to dyld_shared_cache_armv7.new

  • Copy it (I used DiskAid) into your iDevice file system at the path

/var/spire

  • Navigate into that path (I used iFile Cydia App directly on my iPhone) and rename the original dyld_shared_cache_armv7 in dyld_shared_cache_armv7.bak. Rename now the recently copied dyld_shared_cache_armv7.new in dyld_shared_cache_armv7. Check that the new dyld_shared_cache_armv7 has the same properties than the dyld_shared_cache_armv7.bak (I had to add the execute property to the new file), than delete dyld_shared_cache_armv7.bak (I suggest also to backup that file before deleting it in case of problems).

  • Save, exit iFile, unplug from your Mac and reboot your device.

  • Reopen XCode and plug your device in. It probably won't be automatically detected. In this case open the Organizer (Window -> Organizer) and delete the current iPhone (or iPod touch, or iPad) profile (mine one had the the yellow light instead of the green one near the name), unplug it, reboot Xcode, reopen Organizer and wait your device profile auto installation process.

NOW your device should be fully working debugging your Apps! My iPhone 4 GSM iOS 5.0.1 JB with Spire installed does.

Hope this guide will help whoever have the same problem.

Thanks again kexik for his suggestions!

Cœur
  • 37,241
  • 25
  • 195
  • 267
erond
  • 270
  • 5
  • 15
  • If everything works, of course, you can unmount and delete all the images and files created/downloaded! :) **DISCLAIMER:** every test you're gonna make is on your own risk! – erond Feb 13 '12 at 17:48

1 Answers1

1

Find an ipsw for which there is the decryption key. Then uzip that ipsw and search iphone wiki for that particular firmware - there you will find a key as well as the name of .dmg file with root filesystem. Extract that dmg (using vfdecrypt or dmg decryptor) in extracted filesystem look for /System/Library/Caches/dyld.../dyld_shared_cache and copy that file to the place on the device I mentioned.

Sorry for not giving exact instructions, I wrote it from my memory. If needed, let me know and I will prepare more exact step-by-step. ;)

k3a
  • 1,296
  • 1
  • 15
  • 32
  • Hi Kexik, first of all thank you for your reply. I googled a couple of hours but didn't figure out how to follow your instructions! Very noob in this stuff!!! :( I'd be VERY grateful if you could explain me step-by-step this process... – erond Feb 12 '12 at 10:54
  • WOWOW...maybe I figured it out. When done, if everything will work fine I'm gonna write the step-by-step process followed. Just tell me: Must the dyld_shared_cache_armv7 file (200MB) I've extracted from the unzipped and decrypted ipsw and dmg be replaced now in my iPhone, obviously in the same path, right? Than maybe a respring or reboot? – erond Feb 12 '12 at 11:43
  • No way it works.... :( Anyway, I'm gonna edit my original post describing what I did. – erond Feb 12 '12 at 12:11
  • 1
    Do you have some IM like IRC/ICQ/GTalk? Which dyld shared you updated with extracted/decrypted one? There are two on the device (one system - at /System/Library/Caches/com.apple.dyld) and one Spire (/var/spire). You need to update that one in spire with dyld cache extracted from iphone 4S fw of the same version you have on your device (e.g. you update iPod touch with spire to 5.0.1, you ned to find iPhone 4S 5.0.1 fw which is decryptable end update spire dyld cache on your device). Hope this helps. – k3a Feb 12 '12 at 14:39
  • Yes I do! Is there any private way to send it to you? In the meanwhile I'm downloading iPhone4,1_5.0.1_9A406_Restore.ipsw (the iPhone 4S firmware). If I've well understood I've done 2 mistakes: the first decrypting and using dyld cache from the same firmware of my device (iPhone 4 instead of iPhone 4S). The second replacing it (on the device, of course) in /System/Library/Caches/com.apple.dyld instead of the one in /var/Spire ... right? – erond Feb 13 '12 at 09:30
  • 1
    I thought so :) Now if you extract it from what you are downloading ( http://k3a.me/l?m ) afrer replacing that one in /var/spire it should work again. If it works, please update instructions so it can help someone else as well... – k3a Feb 13 '12 at 12:39
  • IT WORKS!!!!!!!!! ASAP I'll update my original post with the complete solution... THANK YOU KEXIK, YOU ROCKS! – erond Feb 13 '12 at 13:23
  • You are welcome... as the addition, I probably know why this happens: Dyld shared cache contains dyld libraries, this is known, but Spire has it's own. I think that the problem is that Spire's dyld cache gets loaded into SpringBoard (Siri UI is loaded into springboard) and springboard is used for spawning debug processes, so it gets loaded also to the app you are debugging... (and UUID is just unique id of library which must match with debugging symbols you have at ~/Library/Developer/Xcode/iOS DeviceSupport/ on the Mac) – k3a Feb 13 '12 at 13:53