Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcelocation committed Jan 31, 2023
2 parents 15ff117 + bf66a3a commit 032a34c
Show file tree
Hide file tree
Showing 16 changed files with 193 additions and 101 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
![ ](https://user-images.githubusercontent.com/52459150/215339684-ce83a0c4-5838-4b5d-bb36-4c1e3d45efd2.png)
# ResSet16
Set screen resolution on iOS 15.0 - iOS 16.1.2 to whichever you want
<p align="center">
<img align="center" src='https://user-images.githubusercontent.com/52459150/215339684-ce83a0c4-5838-4b5d-bb36-4c1e3d45efd2.png'>
</p>
<h1 align="center">ResSet16</h1>
<h3 align="center">Set screen resolution on iOS 15.0 - iOS 16.1.2 to anything you like!</h3>
<br>

Please ⭐️ the repo if you like the tool :) I make these tweaks for free and would highly appreciate if you star!

Expand Down
14 changes: 14 additions & 0 deletions ResSet16.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.private.security.no-container</key>
<true/>
<key>platform-application</key>
<true/>
<key>com.apple.security.exception.files.absolute-path.read-write</key>
<array>
<string>/</string>
</array>
</dict>
</plist>
32 changes: 20 additions & 12 deletions ResSet16.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
21B1A927298574CB00AF13C1 /* Alert++.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21B1A926298574CB00AF13C1 /* Alert++.swift */; };
21B1A92929857B5200AF13C1 /* DeviceFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21B1A92829857B5200AF13C1 /* DeviceFeatures.swift */; };
21B1A92B29858E7A00AF13C1 /* ipabuild.sh in Resources */ = {isa = PBXBuildFile; fileRef = 21B1A92A29858E7A00AF13C1 /* ipabuild.sh */; };
25378CE0298761740008553C /* ResSet16.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 25378CDF298761730008553C /* ResSet16.entitlements */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -36,6 +37,7 @@
21B1A92829857B5200AF13C1 /* DeviceFeatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeviceFeatures.swift; sourceTree = "<group>"; };
21B1A92A29858E7A00AF13C1 /* ipabuild.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = ipabuild.sh; sourceTree = "<group>"; };
21F2FD53298729A200CA5B0E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
25378CDF298761730008553C /* ResSet16.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = ResSet16.entitlements; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -61,6 +63,7 @@
21B1A9012985743000AF13C1 = {
isa = PBXGroup;
children = (
25378CDF298761730008553C /* ResSet16.entitlements */,
21B1A92A29858E7A00AF13C1 /* ipabuild.sh */,
21B1A90C2985743000AF13C1 /* ResSet16 */,
21B1A90B2985743000AF13C1 /* Products */,
Expand Down Expand Up @@ -170,6 +173,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
25378CE0298761740008553C /* ResSet16.entitlements in Resources */,
21B1A9152985743100AF13C1 /* Preview Assets.xcassets in Resources */,
21B1A92B29858E7A00AF13C1 /* ipabuild.sh in Resources */,
21B1A9122985743100AF13C1 /* Assets.xcassets in Resources */,
Expand Down Expand Up @@ -246,7 +250,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.2;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -300,7 +304,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.2;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand All @@ -319,28 +323,30 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"ResSet16/Preview Content\"";
DEVELOPMENT_TEAM = 92S6JX27W2;
DEVELOPMENT_TEAM = U67AKNW8PW;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = ResSet16/Info.plist;
INFOPLIST_KEY_NSAppleMusicUsageDescription = "Tap \"OK\". Required for exploit to work.";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = net.sourceloc.ResSet16;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "ResSet16/ResSet16-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
};
Expand All @@ -353,27 +359,29 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"ResSet16/Preview Content\"";
DEVELOPMENT_TEAM = 92S6JX27W2;
DEVELOPMENT_TEAM = U67AKNW8PW;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = ResSet16/Info.plist;
INFOPLIST_KEY_NSAppleMusicUsageDescription = "Tap \"OK\". Required for exploit to work.";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = net.sourceloc.ResSet16;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "ResSet16/ResSet16-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
};
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>ResSet16.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
Binary file added ResSet16/.DS_Store
Binary file not shown.
Binary file added ResSet16/Assets.xcassets/.DS_Store
Binary file not shown.
4 changes: 0 additions & 4 deletions ResSet16/Assets.xcassets/AccentColor.colorset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"colors" : [
{
"color" : {
"platform" : "universal",
"reference" : "systemOrangeColor"
},
"idiom" : "universal"
}
],
Expand Down
Binary file added ResSet16/Assets.xcassets/Icon.imageset/ .png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions ResSet16/Assets.xcassets/Icon.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : " .png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
117 changes: 71 additions & 46 deletions ResSet16/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,61 +11,88 @@ struct ContentView: View {
@State var width: Double = UIScreen.main.nativeBounds.width
@State var height: Double = UIScreen.main.nativeBounds.height

@State var successAlert = false
@Environment(\.openURL) var openURL

var body: some View {
NavigationView {
VStack {
Text("by sourcelocation - \(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown.")\nEnter new screen resolution below")
.foregroundColor(.secondary)
.multilineTextAlignment(.center)
.padding()
VStack {
TextField("New height", value: $height, format: .number)
.textFieldStyle(.roundedBorder)
TextField("New width", value: $width, format: .number)
.textFieldStyle(.roundedBorder)
VStack {
HStack {
Spacer()
Image("Icon")
.resizable()
.frame(width: 70, height: 70)
.cornerRadius(16)
Spacer()
}
Text("ResSet16").fontWeight(.bold).font(.system(size: 25))
Text("Version \(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown")").fontWeight(.light).font(.system(size: 18))
Text("sourcelocation").fontWeight(.light).font(.system(size: 18))
.padding(.bottom)
TextField("Height", value: $height, format: .number.grouping(.never))
.keyboardType(.decimalPad)
.padding()
.multilineTextAlignment(.center)
.overlay(
RoundedRectangle(cornerRadius: 999)
.stroke(Color.lightGray, lineWidth: 1)
)
TextField("Width", value: $width, format: .number.grouping(.never))
.keyboardType(.decimalPad)
.padding()
.multilineTextAlignment(.center)
.overlay(
RoundedRectangle(cornerRadius: 999)
.stroke(Color.lightGray, lineWidth: 1)
)
Button(action: {
setResolution()
}) {
HStack {
Spacer()
Text("Set Resolution")
Spacer()
}
.padding()
.frame(maxWidth: 350)

.background(.orange)
.foregroundColor(.white)
.cornerRadius(999)
}
HStack {
Button(action: {
setResolution()
UIApplication.shared.alert(title: "ResSet16", body: "Supports: iOS 15.0-16.1.2. \n100% safe.\nForce reboot to revert changes\n\n Inspired by ResolutionSetterSwift for TrollStore\n\nCredits:\n I copy-pasted a lot of code, so I'll just thank all of you: lemin, Avangelista, haxi0, opa334, Ian Beer, zhuowei.")
}) {
Text("Set resolution")
.padding()
.background(Color.orange)
.foregroundColor(.white)
.cornerRadius(999)
}

Button("Join my Discord :)") {
openURL(URL(string: "https://discord.gg/VyVcNjRMeg")!)
HStack {
Spacer()
Text("About")
.foregroundColor(.orange)
Spacer()
}
.padding()
.overlay(
RoundedRectangle(cornerRadius: 999)
.stroke(Color.orange, lineWidth: 1)
)
.background(Color.clear)
}
}
.navigationTitle("ResSet16")
.toolbar {
Button(action: {
UIApplication.shared.alert(title: "ResSet16", body: "Supports: iOS 15.0-16.1.2. \n100% safe.\nForce reboot to revert changes\n\n Inspired by ResolutionSetterSwift for TrollStore\n\nCredits:\n I copy-pasted a lot of code, so I'll just thank all of you: lemin, Avangelista, haxi0, opa334, Ian Beer, zhuowei.")
openURL(URL(string: "https://discord.gg/VyVcNjRMeg")!)
}) {
Image(systemName: "info.circle")
HStack {
Spacer()
Text("Discord")
.foregroundColor(.orange)
Spacer()
}
.padding()
.overlay(
RoundedRectangle(cornerRadius: 999)
.stroke(.orange, lineWidth: 1)
)
.background(.clear)
}
}
}
.navigationViewStyle(StackNavigationViewStyle())
.alert("Success!", isPresented: $successAlert, actions: {
Button("Respring", role: .none, action: {
xpcRestart()
})
Button("Alt Respring", role: .none, action: {
UIDevice.current.respring()
})
Button("Later", role: .cancel, action: {})
}, message: {
Text("Please respring the device to apply changes. It might be needed to also restart system services in some rare cases.")
})

.padding()
.frame(maxWidth: 350)
}

func setResolution() {
Expand All @@ -79,8 +106,7 @@ struct ContentView: View {
try? FileManager.default.removeItem(at: aliasURL)
try FileManager.default.createSymbolicLink(at: aliasURL, withDestinationURL: tmpPlistURL)


successAlert = true
xpcRestart()
} catch {
UIApplication.shared.alert(body: error.localizedDescription)
}
Expand All @@ -89,14 +115,13 @@ struct ContentView: View {
func xpcRestart() {
let processes = [
"com.apple.cfprefsd.daemon",
"com.apple.backboard.TouchDeliveryPolicyServer",
"com.apple.backboard.TouchDeliveryPolicyServer"
]
for process in processes {
xpc_crash(process)
}
}


func createPlist(at url: URL) throws {
let 💀 : [String: Any] = [
"canvas_height": Int(height),
Expand Down
1 change: 0 additions & 1 deletion ResSet16/Exploit/grant_full_disk_access.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@

void grant_full_disk_access(void (^completion)(NSError* _Nullable));


#endif /* grant_full_disk_access_h */
20 changes: 7 additions & 13 deletions ResSet16/Extensions/DeviceFeatures.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,17 @@
// Created by exerhythm on 17.12.2022.
//

import UIKit

extension UIDevice {
func respring() {
#if targetEnvironment(simulator)
#else
guard let window = UIApplication.shared.windows.first else { return }
while true {
window.snapshotView(afterScreenUpdates: false)
}
#endif
}
}
import SwiftUI

func xpc_crash(_ serviceName: String) {
let buffer = UnsafeMutablePointer<CChar>.allocate(capacity: serviceName.utf8.count)
defer { buffer.deallocate() }
strcpy(buffer, serviceName)
xpc_crasher(buffer)
}

extension Color {
static var lightGray:Color {
return Color(UIColor.init(hue: 0, saturation: 0, brightness: 0.7, alpha: 0.2))
}
}
1 change: 0 additions & 1 deletion ResSet16/ResSet16-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
// Use this file to import your target's public headers that you would like to expose to Swift.
//

#import "vm_unaligned_copy_switch_race.h"
#import "grant_full_disk_access.h"
#import "helpers.h"
Loading

0 comments on commit 032a34c

Please sign in to comment.