Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Add autoinstall and iOS 13.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusHenze committed Mar 20, 2020
1 parent d3557f6 commit d1844f4
Show file tree
Hide file tree
Showing 15 changed files with 1,295 additions and 730 deletions.
2 changes: 1 addition & 1 deletion Fugu/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ DispatchQueue.global().async {
])
}

dispatchMain()
CFRunLoopRun()
32 changes: 9 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Fugu
Fugu is the first open source jailbreak tool based on the checkm8 exploit.

__UPDATE:__ NewTerm and other Apps that do not rely on tweak injection should work now.
__UPDATE2:__ Experimental MobileSubstrate support has been added. Tested with Bloard and PreferenceLoader.
__IMPORTANT:__ This jailbreak is currently in development and only meant to be used by developers. While it is possible to install Sileo (or Cydia), most tweaks (and probably other stuff) won't work. Additionally, although the root filesystem is mounted read/write, __rebooting into non-jailbroken mode will reset the root filesystem back to stock!__

__UPDATE:__ Fugu will now install Sileo, SSH and Substitute automatically! Put your iDevice into DFU mode, run `Fugu iStrap`, unlock your iDevice and follow the on-screen prompts.
__IMPORTANT:__ This jailbreak is currently in development and only meant to be used by developers. Although the root filesystem is mounted read/write, __rebooting into non-jailbroken mode will reset the root filesystem back to stock!__ (i.e. Remove Sileo and your Tweaks)

# WARNING
**!!! ONLY DOWNLOAD FUGU FROM [https://github.com/LinusHenze/Fugu](https://github.com/LinusHenze/Fugu) AS IT IS VERY EASY TO CREATE A VERSION OF FUGU THAT CONTAINS MALWARE !!!**

# Supported Devices
Currently, the iPad Pro (2017) and iPhone 7 are the only officially supported devices (on iOS 13 - 13.3.1).
Currently, the iPad Pro (2017) and iPhone 7 are the only officially supported devices (on iOS 13 - 13.4).

# Building
_Note that you can also download a precompiled version from the releases tab._
Expand All @@ -28,24 +30,8 @@ _You may need to run this command multiple times. If it won't work after the 4th

This will send iStrap (the kernel bootstrapper) to your iDevice together with iDownload (small application that can be used to upload files to the iDevice or execute commands). See _Components_ for more information.

# Installing Sileo, SSH and MobileSubstrate
__IMPORTANT:__ All of this is highly experimental. Expect things to be broken.

Make sure you have `libusbmuxd` installed.
You can install it through Homebrew:
```bash
brew install libusbmuxd
```
After installing usbmuxd, boot your iDevice into jailbroken mode (e.g. `Fugu iStrap`) and unlock it afterwards.
Make sure it's still connected to your Mac via USB.
You can now install Sileo using:
```bash
python install_sileo.py
```
This will download all the necessary files to install Sileo and install it.
After the installation is done, you should see the Sileo Icon on your Homescreen.
Aditionally, SSH will be running now. __Make sure to change the root/mobile passwords!__
MobileSubstrate will be installed as well.
# Installing Sileo, SSH and Substitute
**Fugu will now install Sileo, SSH and Substitute automatically!** Unlock your iDevice and follow the on-screen prompts. Make sure your iDevice is connected to the internet!

# Components
Fugu consists of the following components:
Expand Down
1 change: 1 addition & 0 deletions USB/IOKitUSB.swift
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ final class IOKitUSB: USBDeviceImplementation {
let nPort = IONotificationPortCreate(kIOMasterPortDefault)
var source = IONotificationPortGetRunLoopSource(nPort)
_ = deviceInterface.CreateDeviceAsyncEventSource(deviceInterfacePtrPtr, &source)
CFRunLoopAddSource(CFRunLoopGetMain(), source?.takeUnretainedValue(), CFRunLoopMode.commonModes)
}

deinit {
Expand Down
14 changes: 14 additions & 0 deletions iDownload/iDownload.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/* Begin PBXBuildFile section */
1557A3BD236624D60072A036 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1557A3AD236623F60072A036 /* main.m */; };
1591CDF023F0703700FAC98C /* install.m in Sources */ = {isa = PBXBuildFile; fileRef = 1591CDEF23F0703700FAC98C /* install.m */; };
1591CDF323F070A100FAC98C /* server.c in Sources */ = {isa = PBXBuildFile; fileRef = 1591CDF223F070A100FAC98C /* server.c */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -34,6 +36,11 @@
1557A3AF236624580072A036 /* iDownload */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = iDownload; sourceTree = "<group>"; };
1557A3B0236624750072A036 /* iDownload.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = iDownload.entitlements; sourceTree = "<group>"; };
1557A3B5236624CF0072A036 /* iDownload_macOS_test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = iDownload_macOS_test; sourceTree = BUILT_PRODUCTS_DIR; };
1591CDEE23F0703700FAC98C /* install.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = install.h; sourceTree = "<group>"; };
1591CDEF23F0703700FAC98C /* install.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = install.m; sourceTree = "<group>"; };
1591CDF123F070A100FAC98C /* server.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = server.h; sourceTree = "<group>"; };
1591CDF223F070A100FAC98C /* server.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = server.c; sourceTree = "<group>"; };
1591CDF423F0719100FAC98C /* common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; };
15D3CBE6236640AC00D71E2D /* iDownload.z */ = {isa = PBXFileReference; lastKnownFileType = file; path = iDownload.z; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -75,6 +82,11 @@
children = (
1557A3AC236623D90072A036 /* Makefile */,
1557A3AD236623F60072A036 /* main.m */,
1591CDEF23F0703700FAC98C /* install.m */,
1591CDEE23F0703700FAC98C /* install.h */,
1591CDF223F070A100FAC98C /* server.c */,
1591CDF123F070A100FAC98C /* server.h */,
1591CDF423F0719100FAC98C /* common.h */,
1557A3B0236624750072A036 /* iDownload.entitlements */,
150E2BF82367055F00611E9F /* xpc */,
);
Expand Down Expand Up @@ -177,6 +189,8 @@
buildActionMask = 2147483647;
files = (
1557A3BD236624D60072A036 /* main.m in Sources */,
1591CDF323F070A100FAC98C /* server.c in Sources */,
1591CDF023F0703700FAC98C /* install.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
9 changes: 6 additions & 3 deletions iDownload/iDownload/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
CC=xcrun -sdk iphoneos clang
CFLAGS=-target arm64-apple-darwin -arch arm64 -Wall -nostdlib -fno-stack-protector -DiOS
LDFLAGS=-target arm64-apple-darwin -arch arm64 -dead-strip -framework Foundation
LDFLAGS=-target arm64-apple-darwin -arch arm64 -dead-strip -framework Foundation -framework UIKit

OBJS=main.o
OBJS=main.o server.o install.o
DEPS=iDownload.entitlements

%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)

%.o: %.m $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)

%.o: %.S $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)

iDiskMounter: $(OBJS)
iDownload: $(OBJS)
$(CC) -o ../build/iDownload $(OBJS) $(LDFLAGS)
codesign -s - --entitlements iDownload.entitlements ../build/iDownload
cat ../build/iDownload | python -c "import sys, zlib; print zlib.compress(sys.stdin.read(), 9)" > ../build/iDownload.z
Expand Down
17 changes: 17 additions & 0 deletions iDownload/iDownload/common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// common.h
// iDownload
//
// Created by Linus Henze on 09.02.20.
// Copyright © 2020 Linus Henze. All rights reserved.
//

#ifndef common_h
#define common_h

#define VERSION "1.1"
#define PLIST_VERSION 1

#define FILE_EXISTS(file) (access(file, F_OK ) != -1)

#endif /* common_h */
4 changes: 4 additions & 0 deletions iDownload/iDownload/iDownload.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
<true/>
<key>com.apple.private.ProvInfoIOKitUserClient.access</key>
<true/>
<key>com.apple.springboard.CFUserNotification</key>
<true/>
<key>com.apple.springboard.launchapplications</key>
<true/>
<key>com.apple.private.PurpleReverseProxy.allowed</key>
<true/>
<key>com.apple.private.apfs.trim-active-file</key>
Expand Down
17 changes: 17 additions & 0 deletions iDownload/iDownload/install.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// install.h
// iDownload
//
// Created by Linus Henze on 09.02.20.
// Copyright © 2020 Linus Henze. All rights reserved.
//

#ifndef install_h
#define install_h

#include "common.h"

void update_springboard_plist(void);
void requestInstall(void);

#endif /* install_h */
Loading

0 comments on commit d1844f4

Please sign in to comment.