[Tutorial] How to build Electra ( iOS 11 Jailbreak app ) with ldid2
Coolstar has released a new beta version of Electra jailbreak toolkit for iOS 11 – iOS 11.1.2. The author also release the source code of the jailbreak toolkit on Github. I would like to try to find out how the toolkit work by building it on my own. So I wrote this guide for people (who may be a developer) can follow instructions and build Electra toolkit successfully.
The most important of all, before you start to read this guide, make sure you have the ability to handle the problem you meet. You are fully doing this at your own risk, I’m not responsible for any damage caused.
If you don’t know what this article is doing, you can download the released ipa on the author website resign by tools such as iResign and install it to your iPhone without building it youself.
Advantage of build the toolkit yourself
- Know the structure of the code
- Preventing if there were malicious code in toolkit.
- Remove unused features. For example, in this toolkit, it will install Anemone tweak after you jailbreak. The last part in this tutorial will told you how to do it.
- Keep the latest version, you can pull the latest version from Github and build it yourself.
- You need to turn the SIP off of macOS before you did these instructions.
Clone repo
You can access the Electra repo on Github, which contain a Xcode project.
Clone it to your ~/Desktop or any other path you like to work with.
0 1 2 |
git clone https://github.com/coolstar/electra.git |
Build Xcode project
Open the Xcode project then build. You will meet some error with the clean Xcode environment.
ldid2 error
After you build the project, you will meet a error. You will see this error:
At the first test, I tried install ldid original version by
0 1 2 |
brew install ldid |
and the bin of the ldid would be at /usr/local/Cellar/ldid/1.2.1
, then link it as ldid2 in /usr/local/bin
0 1 2 |
ln -s /usr/local/Cellar/ldid/1.2.1/bin/ldid /usr/local/bin/ldid2 |
With the ldid, it can work, and you can build the toolkit into your iPhone. However, the jailbreak won’t success and block on 2/3.
So I tried to find the solution on Github. I found xerub make a ldid2 with SHA256 support. However, this repo is not complete. The repo are lack of make code and wasn’t build.
Add ldid2 to /usr/local/bin/
I completed the ldid2 project and put the binary in release version page.
Project Link
0 1 2 3 4 |
curl https://raw.githubusercontent.com/GaryniL/ldid/master/ldid2 -o ldid2 sudo mv ldid2 /usr/local/bin/ chmod +x /usr/local/bin/ldid2 |
Then rebuild the project, it will work.
Remove Anemone
Besides, you can remove the line for preventing installing Anemone tweak
Yeah… you said we can build by ourselves to prevent malicious code… and then you just provide a ldid2 binary that built by yourself…. lol
Don’t be lazy and build it yourself..
This would require SIP to be turned off, a better location would be to put it in /usr/local/bin
Thanks for your advice! I will update the info in paragraph~
cp: /Users/xxx/Library/Developer/Xcode/DerivedData/electra-arlmfxsvqijesjervgkpznuiuqav/Build/Intermediates.noindex/electra.build/Debug-iphoneos/electra.build/DerivedSources/basebinaries.tar: No such file or directory
???
还有一个错误提示 就是cp: /Users/PingHangIOS/Library/Developer/Xcode/DerivedData/electra-arlmfxsvqijesjervgkpznuiuqav/Build/Intermediates.noindex/electra.build/Debug-iphoneos/electra.build/DerivedSources/basebinaries.tar: No such file or directory
你沒有裝ldid
I’ve followed this step by step and the xcode project still fails to build with the same exact errors, I dont know whats wrong
I don’t know what’s wrong too….
Would you be able to make a video tutorial on this? I’m not good at these sort of things and I need to compile the electra app directly from xcode because my phone has a problem where data and wifi won’t work, so I won’t be able to trust the app from profile and device management. I installed a tweak that wasn’t compatible and now my phone is messed up…