pwn20wndstuff / Undecimus

unc0ver jailbreak for iOS 11.0 - 12.4
BSD 3-Clause "New" or "Revised" License
6.64k stars 1.3k forks source link

Fatal Error: Failed to Restore Memory Limit #1009

Closed Cupcak3 closed 4 years ago

Cupcak3 commented 5 years ago

Describe the bug Unable to jailbreak due to fatal error in jailbreaking process. Exact error in screenshot. Options enabled are: • Load Tweaks • Load Daemons • Dump APTicket • Disable Auto Updates • Disable App Revokes • Overwrite Boot Nonce • Reload System Daemons Kernel Exploit: Seems to affect both VS and M2 exploits

Happens using Unc0ver ipa installed through Cydia Impactor, not a signing service.

To Reproduce Steps to reproduce the behavior:

  1. Start in a non-jailbroken state
  2. Open Unc0ver app
  3. Tap jailbreak
  4. See error

(I'm not sure why the error started now or exact steps to replicate bug. It may have something to do with my phone erroneously restarting and restarting in a jailbroken state) Screenshots If applicable, add screenshots to help explain your problem. IMG_3274

Device (please complete the following information):

Place an "x" between the brackets if true:

Logs If applicable, add logs or error messages here.

Cupcak3 commented 5 years ago

Upon further use it seems like Unc0ver could not properly detect if I was in a jailbroken state or not. After closing the app from the switcher after getting the error message, I noticed some of my tweaks had partially loaded in. Except I was under the impression that the jailbreak was not successful since the home screen did not get tweaks applied to it. But in apps like settings and chrome tweaks were applied (like battery bars and dark modes). Apps only usable while jailbroken also worked. This let me respring and everything applied correctly and Unc0ver could properly detect that I was jailbroken.

Strange interaction and eventually worked out but I'll wait for a dev to close this ticket in case they have any luck reproducing my scenario.

kartikn commented 5 years ago

iOS Version: 12.1.1 iOS Device: iPhone 8 Plus (GSM) unc0ver Version: 3.0.1

jetsam file : com.jetsamproperties.D211.plist (different based on device - check log) File Location: /System/Library/LaunchDaemons/

Issue This is happening as the jetsam file that unc0ver is trying to modify is corrupted.

Fix I was able to fix the error by manually correcting the corrupted lines in the jetsam file. Steps listed below:

  1. Verify the line number in unc0ver logs. In my scenario it was Line # 744.

  2. Copy file over to a computer for editing using Filza/alternative methods or open using a text editor on phone.

  3. Open file in a code editor (VS Code/ Sublime) or on your phone and navigate to the Line # mentioned in the logs. You will notice a large block of unrecognizable characters.

  4. Delete the unrecognizable characters and correct the key/dictionary block. If needed refer to the one of the other files (Dxxx.plist) for the same key/dictionary item.

  5. In my scenario, this was com.apple.assistantd. I corrected it to the following

    <key>com.apple.assistantd</key>
    <dict>
        <key>ExecuteAllowed</key>
        <true/>
    </dict>
  6. Save file and transfer over to device if needed and set correct permissions.

  7. Upon the next try at jailbreaking, you will notice that the error is now resolved.