-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ichitaso
committed
Mar 20, 2021
0 parents
commit f62ead3
Showing
11 changed files
with
789 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*.o | ||
.theos/* | ||
debs/* | ||
*.deb | ||
*.dylib | ||
**/.theos/* | ||
*/.theos/* | ||
*.sublime-workspace | ||
_/* | ||
*/obj/* | ||
obj/* | ||
*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ Filter = { Bundles = ( "com.apple.springboard" ); }; } |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
DEBUG = 0 | ||
GO_EASY_ON_ME = 1 | ||
PACKAGE_VERSION = $(THEOS_PACKAGE_BASE_VERSION) | ||
ARCHS = arm64 arm64e | ||
|
||
TARGET = iphone:13.0:11.0 | ||
|
||
THEOS_DEVICE_IP = localhost -p 2222 | ||
|
||
TWEAK_NAME = IconAnus | ||
$(TWEAK_NAME)_FILES = Tweak.xm | ||
$(TWEAK_NAME)_CFLAGS = -fobjc-arc | ||
|
||
TOOL_NAME = postinst | ||
$(TOOL_NAME)_FILES = main.m | ||
$(TOOL_NAME)_FRAMEWORKS = UIKit | ||
$(TOOL_NAME)_INSTALL_PATH = /DEBIAN | ||
$(TOOL_NAME)_CODESIGN_FLAGS = -Sentitlements.xml | ||
$(TOOL_NAME)_CFLAGS = -fobjc-arc | ||
|
||
include $(THEOS)/makefiles/common.mk | ||
include $(THEOS_MAKE_PATH)/tweak.mk | ||
include $(THEOS_MAKE_PATH)/tool.mk | ||
|
||
before-package:: | ||
sudo chown -R root:wheel $(THEOS_STAGING_DIR) | ||
sudo chmod -R 755 $(THEOS_STAGING_DIR) | ||
sudo chmod 666 $(THEOS_STAGING_DIR)/DEBIAN/control | ||
|
||
after-package:: | ||
make clean | ||
sudo rm -rf .theos/_ | ||
|
||
after-install:: | ||
install.exec "killall -9 backboardd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# IconAnus | ||
Preserve custom icon layouts by Springboard Crash or reboots etc | ||
|
||
## For Tweak dev | ||
Add this to the control of your deb file: | ||
|
||
```Depends: com.ichitaso.iconanus``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#import <UIKit/UIKit.h> | ||
|
||
#define PREF_PATH @"/var/mobile/Library/Preferences/com.ichitaso.iconanus.plist" | ||
#define KEY @"IconAnus" | ||
|
||
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:PREF_PATH]; | ||
NSMutableDictionary *mutableDict = dict ? [dict mutableCopy] : [NSMutableDictionary dictionary]; | ||
|
||
%hook SBDefaultIconModelStore | ||
- (id)loadCurrentIconState:(id*)error { | ||
id orig = %orig; | ||
|
||
if ([mutableDict objectForKey:KEY]) { | ||
return [mutableDict objectForKey:KEY]; | ||
} else { | ||
[mutableDict setValue:orig forKey:KEY]; | ||
[mutableDict writeToFile:PREF_PATH atomically:YES]; | ||
|
||
return orig; | ||
} | ||
} | ||
- (BOOL)saveCurrentIconState:(id)state error:(id*)error { | ||
[mutableDict setValue:state forKey:KEY]; | ||
[mutableDict writeToFile:PREF_PATH atomically:YES]; | ||
return %orig; | ||
} | ||
%end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Author: ichitaso | ||
Maintainer: Packix | ||
Name: IconAnus | ||
Package: com.ichitaso.iconanus | ||
Pre-Depends: firmware (>= 13.0) | ||
Depends: mobilesubstrate | ||
Conflicts: me.nepeta.iconstate | ||
Replaces: com.ichitaso.iconanus | ||
Section: Tweaks | ||
Version: 1.0.0 | ||
Architecture: iphoneos-arm | ||
Description: Preserve custom icon layouts by Springboard Crash or reboots etc | ||
Depiction: https://cydia.ichitaso.com/depiction/iconanus.html | ||
Homepage: https://ichitaso.com/ | ||
dev: ichitaso | ||
Tag: purpose::extension, compatible::ios14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?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>platform-application</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
rm -rf /var/mobile/Library/Preferences/com.ichitaso.iconanus.plist | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#import <UIKit/UIKit.h> | ||
|
||
#define PREF_PATH @"/var/mobile/Library/Preferences/com.apple.springboard.plist" | ||
#define KEY @"_NepetaIconState" | ||
|
||
int main(int argc, char **argv, char **envp) { | ||
@autoreleasepool { | ||
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:PREF_PATH]; | ||
NSMutableDictionary *mutableDict = dict ? [dict mutableCopy] : [NSMutableDictionary dictionary]; | ||
|
||
[mutableDict removeObjectForKey:KEY]; | ||
[mutableDict writeToFile:PREF_PATH atomically:YES]; | ||
} | ||
return 0; | ||
} |