Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1.7 #353

Closed
wants to merge 29 commits into from
Closed

2.1.7 #353

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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
106 changes: 69 additions & 37 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Dopamine: build and upload"
name: build_Release

on:
push:
Expand All @@ -12,32 +12,42 @@ on:
paths-ignore:
- ".gitignore"
workflow_dispatch:
schedule:
- cron: '0 0 1 1 *'
- cron: '0 0 1 4 *'
- cron: '0 0 30 6 *'
- cron: '0 0 28 9 *'
- cron: '0 0 27 12 *'


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

env:
VERSION: '2.1.7'
BUNDLEID: 'com.wwg135.Dopamine'

jobs:
build:
runs-on: macos-13
environment: Auto Build And Release
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.1.4
with:
submodules: recursive

- name: Install Procursus
uses: dhinakg/procursus-action@main
- name: Pre Procursus
uses: wwg135/procursus-action@main
with:
packages: ldid findutils sed coreutils make
packages: ldid findutils coreutils make sed

- name: Install THEOS
- name: Pre trustcache
run: |
set -x
git clone https://github.com/CRKatri/trustcache
cd trustcache
gmake -j$(sysctl -n hw.physicalcpu) OPENSSL=1
sudo cp trustcache /opt/procursus/bin/

- name: Pre theos
run: |
set -x
export BASEDIR="$(pwd)"
Expand All @@ -52,45 +62,67 @@ jobs:
rm $THEOS/sdks/iPhoneOS16.5.sdk.tar
cd $BASEDIR

- name: Build and Install trustcache
- name: Pre Bundleid
run: |
set -x
git clone https://github.com/CRKatri/trustcache
cd trustcache
gmake -j$(sysctl -n hw.physicalcpu) OPENSSL=1
sudo cp trustcache /opt/procursus/bin/
sed -i '' "s/com.opa334.Dopamine/${{ env.BUNDLEID }}/g" ./Application/Dopamine/Jailbreak/DOPreferenceManager.m
sed -i '' "s/com.opa334.Dopamine/${{ env.BUNDLEID }}/g" ./Application/Dopamine.xcodeproj/project.pbxproj
sed -i '' "s/com.opa334.Dopamine/${{ env.BUNDLEID }}/g" ./BaseBin/jbctl/src/main.m

- name: Set Environment Variables
- name: Set env
run: |
set -x
T2=$(TZ=UTC-2 date +'%Y%m%d_%H%M%S')
TS=$(date -j -f "%Y%m%d_%H%M%S" "${T2}" +%s)
SHASH=$(git rev-parse --short HEAD)
echo "ctime=${T2}" >> $GITHUB_ENV
echo "ctimestamp=${TS}" >> $GITHUB_ENV
echo "shorthash=${SHASH}" >> $GITHUB_ENV
sT=$(TZ=UTC-8 date +'%S')
echo "msT=$(date -j -f "%Y-%m-%d %H:%M:%S" "$(TZ=UTC-8 date +'%Y-%m-%d %H:%M'):${sT}" +%s)" >> $GITHUB_ENV
echo "shT=$(TZ=UTC-8 date +'%Y-%m-%d'' ''%H:%M:%S')" >> $GITHUB_ENV
echo "logT=$(TZ=UTC-8 date +'%Y年%m月%d %H:%M'):${sT}" >> $GITHUB_ENV

- name: Print env
run: |
echo ${{ env.VERSION }}
echo ${{ env.msT }}
echo ${{ env.shT }}
echo ${{ env.logT }}

- name: Pre Version
run: |
echo "${{ env.VERSION }}" >./BaseBin/_external/basebin/.version
sed -i '' 's/MARKETING_VERSION = .*;/MARKETING_VERSION = ${{ env.VERSION }};/g' ./Application/Dopamine.xcodeproj/project.pbxproj
sed -i '' "s/AAA/更新时间:${{ env.shT }} 由M哥编译/g" ./Application/Dopamine/UI/DOMainViewController.m

- name: Install libarchive
run: |
brew install libarchive

- name: Download Bootstraps
run: |
set -x
cd Application/Dopamine/Resources
./download_bootstraps.sh
set -x
cd Application/Dopamine/Resources
./download_bootstraps.sh

- name: Build
- name: Build ipa
run: |
set -x
export BASEDIR="$(pwd)"
export THEOS="${BASEDIR}/theos"
gmake -j$(sysctl -n hw.physicalcpu) NIGHTLY=1
mv Application/Dopamine.tipa Dopamine.ipa

- name: Upload Artifact
id: dopamine-latest-upload
uses: actions/upload-artifact@v3
- name: Release Logs
run: |
set -x
echo -e "更新时间:${{ env.logT }}" >> body.txt
echo "" >> ./release.md
cat body.txt > release.txt
echo "" >> release.txt
cat ./release.md >> release.txt

- name: Release ipa
uses: softprops/[email protected]
with:
name: Dopamine
path: |
${{ github.workspace }}/Application/Dopamine.ipa
name: ${{ env.VERSION }}
tag_name: ${{ env.VERSION }}
target_commitish: 2.x
body_path: release.txt
latest: true
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
files: |
*.ipa
27 changes: 20 additions & 7 deletions Application/Dopamine.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
0C65CFE62A47EA9D00EDF5F2 /* ellekit.deb in Resources */ = {isa = PBXBuildFile; fileRef = 0C65CFE42A47EA9D00EDF5F2 /* ellekit.deb */; };
0C65CFE52A47EA9D00EDF5F2 /* preferenceloader.deb in Resources */ = {isa = PBXBuildFile; fileRef = 0C65CFE32A47EA9D00EDF5F2 /* preferenceloader.deb */; };
040622AA2B77FE8E00393AAD /* DOPkgManagerPickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 040622A92B77FE8E00393AAD /* DOPkgManagerPickerViewController.m */; };
042479A22B66916B0082581B /* DOCreditsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0424796B2B66916B0082581B /* DOCreditsViewController.m */; };
042479A32B66916B0082581B /* DOSettingsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0424796C2B66916B0082581B /* DOSettingsController.m */; };
Expand Down Expand Up @@ -173,6 +175,8 @@
8C5FA96E2BDD7898008C246F /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C5FA93F2BDD5039008C246F /* IOKit.framework */; };
8C5FA96F2BDD789C008C246F /* IOSurface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C5FA9412BDD503D008C246F /* IOSurface.framework */; };
8C5FA9712BDD81EF008C246F /* LICENSE_weightBufs.md in Resources */ = {isa = PBXBuildFile; fileRef = 8C5FA9702BDD81EF008C246F /* LICENSE_weightBufs.md */; };
8C609C9E2C19B4270023DD12 /* NSString+Version.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C609C9C2C19AECF0023DD12 /* NSString+Version.m */; };
8C609C9F2C19B6FA0023DD12 /* libkrw-dopamine.deb in Resources */ = {isa = PBXBuildFile; fileRef = 8C609C992C19AC250023DD12 /* libkrw-dopamine.deb */; };
8C71981A2ABF0E82003C6658 /* DOAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C7198192ABF0E82003C6658 /* DOAppDelegate.m */; };
8C71981D2ABF0E82003C6658 /* DOSceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C71981C2ABF0E82003C6658 /* DOSceneDelegate.m */; };
8C7198252ABF0E84003C6658 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8C7198242ABF0E84003C6658 /* Assets.xcassets */; };
Expand All @@ -184,7 +188,6 @@
8CC139822B53DE6C00230143 /* NSData+Hex.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CC139812B53DE6C00230143 /* NSData+Hex.m */; };
8CC139832B53E05300230143 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD08372B4F682500A32B61 /* IOKit.framework */; };
8CCD2FC42B77AAA000F9C5DA /* basebin-link.deb in Resources */ = {isa = PBXBuildFile; fileRef = 8CCD2FC32B77AA9200F9C5DA /* basebin-link.deb */; };
8CCD8A872B6F16CC004B72B0 /* libkrw-plugin.deb in Resources */ = {isa = PBXBuildFile; fileRef = 8CCD8A852B6F1662004B72B0 /* libkrw-plugin.deb */; };
8CCD8A882B6F16D0004B72B0 /* libroot.deb in Resources */ = {isa = PBXBuildFile; fileRef = 8CCD8A832B6F165A004B72B0 /* libroot.deb */; };
8CDD07AA2B4F619000A32B61 /* kfd.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CDD07A92B4F619000A32B61 /* kfd.h */; settings = {ATTRIBUTES = (Public, ); }; };
8CDD07AF2B4F619000A32B61 /* kfd.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD07A72B4F619000A32B61 /* kfd.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
Expand Down Expand Up @@ -269,6 +272,8 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
0C65CFE42A47EA9D00EDF5F2 /* ellekit.deb */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "ellekit.deb"; path = "Dopamine/Resources/ellekit.deb"; sourceTree = "<group>"; };
0C65CFE32A47EA9D00EDF5F2 /* preferenceloader.deb */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "preferenceloader.deb"; path = "Dopamine/Resources/preferenceloader.deb"; sourceTree = "<group>"; };
040622A82B77FE8E00393AAD /* DOPkgManagerPickerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOPkgManagerPickerViewController.h; sourceTree = "<group>"; };
040622A92B77FE8E00393AAD /* DOPkgManagerPickerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DOPkgManagerPickerViewController.m; sourceTree = "<group>"; };
042479682B66916B0082581B /* DOJailbreakButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOJailbreakButton.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -368,7 +373,6 @@
04DD0B452B7CBEEA0055DE4F /* DOTheme.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOTheme.h; sourceTree = "<group>"; };
04DD0B462B7CBEEA0055DE4F /* DOTheme.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DOTheme.m; sourceTree = "<group>"; };
04DD0B5A2B7D19E60055DE4F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
04DD0B5D2B7D1A210055DE4F /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
04DD0B5C2B7D1A210055DE4F /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
04DD0B5D2B7D1A210055DE4F /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
51AB98D92BBF44390042EA7B /* libpartial.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpartial.a; path = Dopamine/Dependencies/libpartial.a; sourceTree = "<group>"; };
Expand Down Expand Up @@ -503,6 +507,9 @@
8C5FA9582BDD6C0C008C246F /* kernel_rw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = kernel_rw.h; sourceTree = "<group>"; };
8C5FA9592BDD6C0C008C246F /* exploit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = exploit.h; sourceTree = "<group>"; };
8C5FA9702BDD81EF008C246F /* LICENSE_weightBufs.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = LICENSE_weightBufs.md; sourceTree = "<group>"; };
8C609C992C19AC250023DD12 /* libkrw-dopamine.deb */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libkrw-dopamine.deb"; path = "../../../Packages/libkrw-provider/libkrw-dopamine.deb"; sourceTree = "<group>"; };
8C609C9C2C19AECF0023DD12 /* NSString+Version.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+Version.m"; sourceTree = "<group>"; };
8C609C9D2C19AEE70023DD12 /* NSString+Version.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+Version.h"; sourceTree = "<group>"; };
8C7198152ABF0E82003C6658 /* Dopamine.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Dopamine.app; sourceTree = BUILT_PRODUCTS_DIR; };
8C7198182ABF0E82003C6658 /* DOAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOAppDelegate.h; sourceTree = "<group>"; };
8C7198192ABF0E82003C6658 /* DOAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DOAppDelegate.m; sourceTree = "<group>"; };
Expand All @@ -520,7 +527,6 @@
8CC139812B53DE6C00230143 /* NSData+Hex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Hex.m"; sourceTree = "<group>"; };
8CCD2FC32B77AA9200F9C5DA /* basebin-link.deb */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "basebin-link.deb"; path = "../../../Packages/basebin-link/basebin-link.deb"; sourceTree = "<group>"; };
8CCD8A832B6F165A004B72B0 /* libroot.deb */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libroot.deb; path = ../../../Packages/libroot/libroot.deb; sourceTree = "<group>"; };
8CCD8A852B6F1662004B72B0 /* libkrw-plugin.deb */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libkrw-plugin.deb"; path = "../../../Packages/libkrw-provider/libkrw-plugin.deb"; sourceTree = "<group>"; };
8CDD07A72B4F619000A32B61 /* kfd.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = kfd.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8CDD07A92B4F619000A32B61 /* kfd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = kfd.h; sourceTree = "<group>"; };
8CDD07B32B4F639100A32B61 /* kfd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = kfd.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1012,6 +1018,8 @@
8C71980C2ABF0E82003C6658 = {
isa = PBXGroup;
children = (
0C65CFE42A47EA9D00EDF5F2 /* ellekit.deb */,
0C65CFE32A47EA9D00EDF5F2 /* preferenceloader.deb */,
8C7198172ABF0E82003C6658 /* Dopamine */,
8C7198162ABF0E82003C6658 /* Products */,
8C029F642B4E2E7D0071DE58 /* Frameworks */,
Expand Down Expand Up @@ -1080,6 +1088,8 @@
8CC139812B53DE6C00230143 /* NSData+Hex.m */,
8C9E46272ACA1C8D00B5456A /* UIImage+Blur.h */,
8C9E46282ACA1CC700B5456A /* UIImage+Blur.m */,
8C609C9D2C19AEE70023DD12 /* NSString+Version.h */,
8C609C9C2C19AECF0023DD12 /* NSString+Version.m */,
);
path = Extensions;
sourceTree = "<group>";
Expand All @@ -1093,7 +1103,7 @@
8CB94F022B59E17A0098BAFD /* basebin.tc */,
8C512B8B2B5C9DE800C6F14A /* sileo.deb */,
8C512B8C2B5C9DE800C6F14A /* zebra.deb */,
8CCD8A852B6F1662004B72B0 /* libkrw-plugin.deb */,
8C609C992C19AC250023DD12 /* libkrw-dopamine.deb */,
8CCD8A832B6F165A004B72B0 /* libroot.deb */,
8CCD2FC32B77AA9200F9C5DA /* basebin-link.deb */,
04DD0B362B7BA6180055DE4F /* LICENSE.md */,
Expand Down Expand Up @@ -1471,6 +1481,9 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8C609C9F2C19B6FA0023DD12 /* libkrw-dopamine.deb in Resources */,
0C65CFE62A47EA9D00EDF5F2 /* ellekit.deb in Resources */,
0C65CFE52A47EA9D00EDF5F2 /* preferenceloader.deb in Resources */,
04DD0B372B7BA6180055DE4F /* LICENSE.md in Resources */,
04DD0B3A2B7BF3E80055DE4F /* LICENSE_libc.md in Resources */,
8C56D4CD2B7C118B001C03D3 /* LICENSE_kfd.md in Resources */,
Expand All @@ -1491,7 +1504,6 @@
8C2875212BD850B4008B24DA /* LICENSE_libgrabkernel2.md in Resources */,
8C512B912B5C9F9100C6F14A /* sileo.deb in Resources */,
8C512B922B5C9F9400C6F14A /* zebra.deb in Resources */,
8CCD8A872B6F16CC004B72B0 /* libkrw-plugin.deb in Resources */,
8CCD8A882B6F16D0004B72B0 /* libroot.deb in Resources */,
8C296BAE2BE05914007C2AD1 /* LICENSE_plooshinit.md in Resources */,
8C5FA9712BDD81EF008C246F /* LICENSE_weightBufs.md in Resources */,
Expand Down Expand Up @@ -1654,6 +1666,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8C609C9E2C19B4270023DD12 /* NSString+Version.m in Sources */,
042479A62B66916B0082581B /* DOHeaderCell.m in Sources */,
042479A22B66916B0082581B /* DOCreditsViewController.m in Sources */,
042479B32B66916B0082581B /* DODebugLogView.m in Sources */,
Expand Down Expand Up @@ -2229,7 +2242,7 @@
"$(PROJECT_DIR)/Dopamine/Dependencies",
"$(PROJECT_DIR)/Dopamine/Resources",
);
MARKETING_VERSION = 2.1.5;
MARKETING_VERSION = 2.1.7;
PRODUCT_BUNDLE_IDENTIFIER = com.opa334.Dopamine;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down Expand Up @@ -2266,7 +2279,7 @@
"$(PROJECT_DIR)/Dopamine/Dependencies",
"$(PROJECT_DIR)/Dopamine/Resources",
);
MARKETING_VERSION = 2.1.5;
MARKETING_VERSION = 2.1.7;
PRODUCT_BUNDLE_IDENTIFIER = com.opa334.Dopamine;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
2 changes: 1 addition & 1 deletion Application/Dopamine/Exploits/weightBufs/exploit/exploit.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#else

#define MAX_PROGRAMS 5
#define IOSURFACE_OBJ_SIZE 0x430
#define IOSURFACE_OBJ_SIZE 0x8
#define MAX_SHMEMS 0x2000

#endif /* TARGET_OS_OSX */
Expand Down
5 changes: 3 additions & 2 deletions Application/Dopamine/Exploits/weightBufs/exploit/exploit.m
Original file line number Diff line number Diff line change
Expand Up @@ -1154,9 +1154,10 @@ bool get_target_surface(u64 *kaddr_target)
printf("[+] Found a matching surface-id=0x%04x IOSurface=0x%llx ! \n",
matched.surface_id,
matched.IOSurface_loc);
break;
}
}
/* if(matched.surface_id) break; */
if(matched.surface_id) break;
}

/* assert(matched.surface_id && "Unable to find a suitable IOSurface"); */
Expand Down Expand Up @@ -1402,4 +1403,4 @@ int main()
{
return exploit();
}
#endif
#endif
18 changes: 18 additions & 0 deletions Application/Dopamine/Extensions/NSString+Version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// NSString+Version.h
// Dopamine
//
// Created by Lars Fröder on 12.06.24.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (Version)

- (NSInteger)numericalVersionRepresentation;

@end

NS_ASSUME_NONNULL_END
26 changes: 26 additions & 0 deletions Application/Dopamine/Extensions/NSString+Version.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// NSString+Version.h
// Dopamine
//
// Created by Lars Fröder on 12.06.24.
//

#import <Foundation/Foundation.h>

@implementation NSString (Version)

- (NSInteger)numericalVersionRepresentation
{
NSInteger numericalRepresentation = 0;

NSArray *components = [self componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]];
while (components.count < 3)
components = [components arrayByAddingObject:@"0"];

numericalRepresentation |= [components[0] integerValue] << 16;
numericalRepresentation |= [components[1] integerValue] << 8;
numericalRepresentation |= [components[2] integerValue];
return numericalRepresentation;
}

@end
Loading
Loading