A lot of people have managed to jailbreak their iDevices, but still Cydia continues to throw errors at them, right and left. This article reveals a solution for the DPKG LOCKED cydo and Cydia returned an error code issue on iOS 11.3.1 – 11.0 jailbreak.
Why Does Cydia Give DPKG LOCKED/CYDO RETURNED AN ERROR CODE Issue?
Cydia gives the “DPKG_LOCKED” & “cydo returned an error code” messages on several occasions, when –
- Cydia installation is corrupted.
- Cydia isn’t properly installed on an iDevice.
- There’s an error on part of the user.
- Jailbreak is using an outdated or bogus version of the package manager of Cydia.
Fortunately, though, the old tested Delectra script still functions for Electra1131 even though it hasn’t been updated by the developer.
The script can be easily used to clean Cydia installations and jailbreak the device from ground up again.
What You’ll Need
- WiFi connection.
- iOS 11.2-11.3.1 firmware.
- iDevice (iPod, iPad, or iPhone).
- Uninstall script for Delectra.
- WiFi network.
- PC running macOS or Windows.
Steps to Fixing DPKG_LOCKED ON IOS 11.3.1 – 11.0 & Cydia Returned an Error Code With Delectra
PREPARING YOUR DEVICE:
- Before anything else, make sure you’re in jailbreak mode. If your device isn’t jailbroken, follow this guide to jailbreak it.
- Download Cyberduck or Putty for Windows or macOS.
- Download (unjailbreak.sh) – the Delectra shell script – from here.
- Launch Settings from your iDevice, go to “WiFi” and tap “i” alongside the WiFi network you’re connected with. Note down “IP Address” as this is going to be used in later steps.
The IP will be something like: 192.168.31.180
Transferring The Uninstall Script to Your iDevice
- Open CyberDuck SSH utility and click “Open Connection”. We will be showcasing this process with macOS Mojave but all the steps can be performed on Windows too.
- Choose “SFTP (SSH File Transfer Protocol) from the protocol dropdown list. If it is set to any other option, an SFTP connection won’t be created.
- Enter these details to launch a session for SFTP.
Server – The IP address of the WiFi network as noted in step 4.
- Username is going to be root.
- Password – default one (alpine)
- SSH Private Key – default (None)
- Cyberduck will now showcase a warning for an “unknown fingerprint.” Click “Allow” to go to the next step.
- Transfer “unjailbreak.sh” shell script to the folder “/private/var/root” by dragging it to the window of Cyberduck.
Please note that this is the default folder and includes only two sub-folders (Library and Application Support) and a file (known as files.list).
Launch Delectra Script
- On the Mac, close down Cyberduck and head to “Go > Utilites’? If you’re using Windows, you must utilize “PuTTY” talent client that can be downloaded from this link.
- Open “Terminal” app.
- You should now log in to the device as root, and enter these commands:
Note: Instead of 192.168.31.180 enter your IP from Step 4.
- Terminal will now display a warning about the host’s authenticity and will request you to abort session. Type “yes” to proceed.
- Type “alpine” as the password and wait until it logs you in. Remember to use the custom password if you modified it before.
- Type this command and press “enter/return” key to launch it.
Jailbreak The Device Again
- Onnce the script has eliminated jailbreak from the device, it will return to its normal stock version. Restart the device and use Electra1131 to re-jailbreak your iPhone.
And that’s all. You can now install your favorite tweaks from Cydia without seeing cydo returned an error or DPKG_LOCKED messages.