Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
TARGET = rootlessJB

.PHONY: all clean

all: clean
xcodebuild clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO PRODUCT_BUNDLE_IDENTIFIER="com.jakeashacks.rootlessJB3" -sdk iphoneos -configuration Release
ln -sf build/Release-iphoneos Payload
# strip Payload/$(TARGET).app/$(TARGET)
zip -r9 $(TARGET).ipa Payload/$(TARGET).app

clean:
rm -rf build Payload $(TARGET).ipa
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,11 @@ patcher usage:

Thanks to: Ian Beer, Brandon Azad, Jonathan Levin, Electra Team, IBSparkes, Sam Bingner, Sammy Guichelaar.


# And What's the difference with the original version?

Add Makefile file
Close install iSuperSU by default
Remount rootfs by default after renamed your system snapshot (you can use unc0ver to do that first, and only need use it once)
Add port 2222 by default, so you can use localssh apps without unsandbox (use port 2222)
Closed unlock nvram by default you can use UnlockNVRAM() to re-unlock it
Make sure iSuperSU works fine without re-install
17 changes: 8 additions & 9 deletions rootlessJB/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="pUb-Na-Ia2">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="pUb-Na-Ia2">
<device id="retina4_0" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down Expand Up @@ -41,7 +40,7 @@
<action selector="uninstall:" destination="pUb-Na-Ia2" eventType="touchUpInside" id="Hyh-1n-LeZ"/>
</connections>
</button>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="m4q-xC-ltu">
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="m4q-xC-ltu">
<rect key="frame" x="206" y="0.0" width="51" height="31"/>
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<color key="onTintColor" red="0.93469542264938354" green="0.32922995090484619" blue="0.31967747211456299" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
Expand Down Expand Up @@ -90,7 +89,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Tweaks" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6oQ-AU-pkf">
<rect key="frame" x="8" y="41" width="71" height="26"/>
<rect key="frame" x="8" y="41.5" width="71" height="26"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="21"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
Expand All @@ -116,19 +115,19 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="rootlessJB" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xeb-ve-NfA">
<rect key="frame" x="94.5" y="20" width="132" height="30"/>
<rect key="frame" x="94" y="20" width="132" height="30"/>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="25"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="iOS 12.0 - 12.1.2" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="73G-96-tii">
<rect key="frame" x="105.5" y="58" width="110" height="18"/>
<rect key="frame" x="105" y="58" width="110" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a6d-jW-eU0">
<rect key="frame" x="42.5" y="84" width="234" height="94"/>
<rect key="frame" x="43" y="84" width="234" height="94"/>
<constraints>
<constraint firstAttribute="height" constant="94" id="LbH-IQ-rkS"/>
</constraints>
Expand All @@ -139,7 +138,7 @@ Powered by #jelbrekLib</string>
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="LXD-zS-5F0">
<rect key="frame" x="16" y="380" width="286.5" height="168"/>
<rect key="frame" x="16" y="380" width="288" height="168"/>
<color key="backgroundColor" white="1" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="textColor" red="0.99993377923965454" green="1" blue="0.99988192319869995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
Expand Down
19 changes: 7 additions & 12 deletions rootlessJB/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,10 @@ - (IBAction)jailbreak:(id)sender {
//---- remount -----//
// this is against the point of this jb but if you can why not do it

if (maxVersion("11.4.1")) {
if (maxVersion("12.1.2")) {
if (remountRootFS()) LOG("[-] Failed to remount rootfs, no big deal");
}

//---- nvram ----//
// people say that this ain't stable
// and that ya should lock it later
// but, I haven't experienced issues
// nor so rootlessJB people

UnlockNVRAM(); // use nvram command for nonce setting!

//---- bootstrap ----//
if (!fileExists("/var/containers/Bundle/.installed_rootlessJB3")) {

Expand Down Expand Up @@ -398,10 +390,10 @@ - (IBAction)jailbreak:(id)sender {

// kill it if running
launch("/var/containers/Bundle/iosbinpack64/usr/bin/killall", "-SEGV", "dropbear", NULL, NULL, NULL, NULL, NULL);
failIf(launchAsPlatform("/var/containers/Bundle/iosbinpack64/usr/local/bin/dropbear", "-R", "-E", NULL, NULL, NULL, NULL, NULL), "[-] Failed to launch dropbear");
failIf(launchAsPlatform("/var/containers/Bundle/iosbinpack64/usr/local/bin/dropbear", "-R", "-E", "-p", "22", "-p", "2222", NULL), "[-] Failed to launch dropbear");
pid_t dpd = pid_of_procName("dropbear");
usleep(1000);
if (!dpd) failIf(launchAsPlatform("/var/containers/Bundle/iosbinpack64/usr/local/bin/dropbear", "-R", "-E", NULL, NULL, NULL, NULL, NULL), "[-] Failed to launch dropbear");
if (!dpd) failIf(launchAsPlatform("/var/containers/Bundle/iosbinpack64/usr/local/bin/dropbear", "-R", "-E", "-p", "22", "-p", "2222", NULL), "[-] Failed to launch dropbear");

//------------- launch daeamons -------------//
//-- you can drop any daemon plist in iosbinpack64/LaunchDaemons and it will be loaded automatically --//
Expand Down Expand Up @@ -509,7 +501,7 @@ - (IBAction)jailbreak:(id)sender {
removeFile("/var/containers/Bundle/tweaksupport/Applications/iSuperSU.app");
copyFile(in_bundle("apps/iSuperSU.app"), "/var/containers/Bundle/tweaksupport/Applications/iSuperSU.app");

failIf(system_("/var/containers/Bundle/tweaksupport/usr/local/bin/jtool --sign --inplace --ent /var/containers/Bundle/tweaksupport/Applications/iSuperSU.app/ent.xml /var/containers/Bundle/tweaksupport/Applications/iSuperSU.app/iSuperSU && /var/containers/Bundle/tweaksupport/usr/bin/inject /var/containers/Bundle/tweaksupport/Applications/iSuperSU.app/iSuperSU"), "[-] Failed to sign iSuperSU");
failIf(system_("/var/containers/Bundle/tweaksupport/usr/local/bin/jtool --sign --inplace --ent /var/containers/Bundle/tweaksupport/Applications/iSuperSU.app/ent.xml /var/containers/Bundle/tweaksupport/Applications/iSuperSU.app/iSuperSU"), "[-] Failed to sign iSuperSU");


// just in case
Expand Down Expand Up @@ -554,6 +546,9 @@ - (IBAction)jailbreak:(id)sender {
}
}
}

// make sure iSuperSU work fine
launch("/var/containers/Bundle/iosbinpack64/bin/bash", "-c", "/var/containers/Bundle/iosbinpack64/bin/rm -rf /private/var/containers/Bundle/Application/*/iSuperSU.app/_CodeSignature", NULL, NULL, NULL, NULL, NULL);

// find which applications are jailbreak applications and inject their executable
NSArray *applications = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/var/containers/Bundle/Application/" error:NULL];
Expand Down