Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 07f0c55

Browse files
committed
v3.1
1 parent b5c4e36 commit 07f0c55

File tree

18 files changed

+676
-288
lines changed

18 files changed

+676
-288
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Batchomatic
22
TL;DR - a tweak to batch install all of your other tweaks, repos, saved .debs, tweak preferences, and hosts file. Online or offline. Can also remove all of your tweaks, respring, and run uicache. A real time saver!
33

4-
Compatible with all devices on iOS 11.0-12.2. Works with Cydia, Zebra, Sileo, and Installer on unc0ver, unc0ver dark, and Chimera. Might work on older iOS versions too
4+
Compatible with all devices on iOS 11.0-12.4. Works with Cydia, Zebra, Sileo, and Installer on unc0ver, unc0ver dark, and Chimera. Might work on older iOS versions too
55

66
Repo: BigBoss
77

@@ -11,7 +11,7 @@ Price: Free!
1111

1212
[Additional information available in the reddit post](https://www.reddit.com/r/jailbreak/comments/cqarr6/release_batchomatic_v30_on_bigboss_batch_install/)
1313

14-
[Screenshots](https://imgur.com/a/ZR7eSaR)
14+
[Screenshots](https://imgur.com/a/u70Cojx)
1515

1616
# How to compile
1717
1. Install Theos on your Mac

com.captinc.batchomatic.deb

5.28 KB
Binary file not shown.

sourcecode-daemon/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: com.captinc.batchomaticd
22
Name: batchomaticd
3-
Version: 1.0
3+
Version: 3.1
44
Author: Capt Inc <captinc37@gmail.com>
55
Maintainer: Capt Inc <captinc37@gmail.com>
66
Architecture: iphoneos-arm

sourcecode-daemon/makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@ batchomaticd_CFLAGS = -fobjc-arc
99
batchomaticd_CODESIGN_FLAGS = -Splatform.xml
1010

1111
include $(THEOS_MAKE_PATH)/tool.mk
12-
13-
internal-stage::
14-
$(ECHO_NOTHING)chmod +s $(THEOS_STAGING_DIR)/usr/bin/batchomaticd$(ECHO_END)

sourcecode-tweak/Tweak.x

Lines changed: 243 additions & 52 deletions
Large diffs are not rendered by default.

sourcecode-tweak/headers.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
@interface Cydia : UIApplication
77
- (void) reloadData;
8+
- (void) _loaded;
89
- (void) resolve;
910
- (void) queue;
1011
- (void) addSource:(NSDictionary *)dictionary;
@@ -71,7 +72,7 @@ typedef enum {
7172

7273
//-----------------------------------------------------------------
7374
//headers for compatibility with Sileo
74-
@interface PackageListViewController : UIViewController
75+
@interface _TtC5Sileo25PackageListViewController : UIViewController
7576
- (void) viewDidLoad;
7677
@end
7778

sourcecode-tweak/layout/DEBIAN/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: com.captinc.batchomatic
22
Name: Batchomatic
3-
Version: 3.0.1
3+
Version: 3.1
44
Author: Capt Inc <captinc37@gmail.com>
55
Maintainer: Capt Inc <captinc37@gmail.com>
66
Depends: mobilesubstrate, gawk, coreutils
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#!/bin/bash
22

3-
mkdir /var/mobile/BatchomaticDebs > /dev/null 2>&1
4-
mkdir /var/mobile/BatchomaticDebs/UserSavedDebs > /dev/null 2>&1
3+
mkdir /var/mobile/BatchomaticDebs 2>/dev/null
4+
mkdir /var/mobile/BatchomaticDebs/UserSavedDebs 2>/dev/null
5+
chown -R mobile /var/mobile/BatchomaticDebs
56
chmod -R 777 /var/mobile/BatchomaticDebs
7+
8+
chmod +s /usr/bin/batchomaticd
9+
chown root /Library/batchomatic/directions
10+
chmod 755 /Library/batchomatic/directions
11+
chown mobile /Library/batchomatic/*.sh
12+
chmod 777 /Library/batchomatic/*.sh
13+
614
exit 0
Lines changed: 119 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,127 @@
11
#!/bin/bash
22

3-
timestamp="`date +"%Y.%m.%d-%H.%M.%S"`"
4-
versionNumber=`dpkg-query --showformat='${Version}\n' --show com.captinc.batchomatic`
5-
rm -r /tmp/batchomatic
6-
mkdir /tmp/batchomatic
7-
8-
mkdir /tmp/batchomatic/create
9-
mkdir /tmp/batchomatic/create/DEBIAN
10-
cp /Library/batchomatic/directions /tmp/batchomatic/create/DEBIAN/postinst
11-
mkdir /tmp/batchomatic/create/var
12-
mkdir /tmp/batchomatic/create/var/mobile
13-
mkdir /tmp/batchomatic/create/var/mobile/BatchInstall
14-
mkdir /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences
15-
mkdir /tmp/batchomatic/create/var/mobile/BatchInstall/SavedDebs
16-
17-
echo "Package: com.you.batchinstall" >> /tmp/batchomatic/create/DEBIAN/control
18-
echo "Name: BatchInstall" >> /tmp/batchomatic/create/DEBIAN/control
19-
echo "Version: $timestamp" >> /tmp/batchomatic/create/DEBIAN/control
20-
echo "Author: You" >> /tmp/batchomatic/create/DEBIAN/control
21-
echo "Maintainer: You" >> /tmp/batchomatic/create/DEBIAN/control
22-
echo "Architecture: iphoneos-arm" >> /tmp/batchomatic/create/DEBIAN/control
23-
echo "Section: Tweaks" >> /tmp/batchomatic/create/DEBIAN/control
24-
echo "Description: Batch-install all of your tweaks for your setup! Created using Batchomatic v$versionNumber" >> /tmp/batchomatic/create/DEBIAN/control
25-
26-
apt-cache depends com.you.batchinstall | awk -F "Depends: " '/Depends: /{print $2}' > /tmp/batchomatic/alltweaks.txt
27-
awk 'NR==FNR{a[$0];next} !($0 in a)' /Library/batchomatic/ignoredtweaks.txt /tmp/batchomatic/alltweaks.txt > /tmp/batchomatic/tweaksUnformatted.txt
28-
sed -i 's|[<>,]||g' /tmp/batchomatic/tweaksUnformatted.txt
29-
printf %s "$(< /tmp/batchomatic/tweaksUnformatted.txt)" > /tmp/batchomatic/create/var/mobile/BatchInstall/tweaks.txt
30-
31-
cat /etc/apt/sources.list.d/cydia.list >> /tmp/batchomatic/reposRaw.txt || true
32-
cat /etc/apt/cydiasources.d/cydia.list >> /tmp/batchomatic/reposRaw.txt || true
33-
cat "/var/mobile/Library/Application Support/xyz.willy.Zebra/sources.list" >> /tmp/batchomatic/reposRaw.txt || true
34-
cat /etc/apt/sources.list.d/*.sources >> /tmp/batchomatic/reposRaw.txt || true
35-
ls "/var/mobile/Library/Application Support/Installer/SourcesFiles" | sed 's:_:/:g' | sed 's:\(.*\)-Packages:\1:' >> /tmp/batchomatic/reposFormatted.txt || true
36-
egrep -o 'https?://[^ ]+' /tmp/batchomatic/reposRaw.txt >> /tmp/batchomatic/reposExtracted.txt
37-
while read aLine; do
38-
case "$aLine" in
39-
*/)
40-
echo $aLine >> /tmp/batchomatic/reposFormatted.txt
41-
;;
42-
*)
43-
echo "$aLine/" >> /tmp/batchomatic/reposFormatted.txt
44-
;;
45-
esac
46-
done < /tmp/batchomatic/reposExtracted.txt
47-
sed 's#https://repounclutter.coolstar.org/#http://apt.thebigboss.org/repofiles/cydia/#g' /tmp/batchomatic/reposFormatted.txt > /tmp/batchomatic/reposRepoUnclutterConverted.txt
48-
sort -u /tmp/batchomatic/reposRepoUnclutterConverted.txt >> /tmp/batchomatic/reposSorted.txt
49-
awk 'NR==FNR{a[$0];next} !($0 in a)' /Library/batchomatic/ignoredrepos.txt /tmp/batchomatic/reposSorted.txt > /tmp/batchomatic/reposWithoutIgnores.txt
50-
sort -u /tmp/batchomatic/reposWithoutIgnores.txt >> /tmp/batchomatic/reposReSorted.txt
51-
printf %s "$(< /tmp/batchomatic/reposReSorted.txt)" > /tmp/batchomatic/create/var/mobile/BatchInstall/repos.txt
52-
53-
find /var/mobile/BatchInstall -type f -exec chmod 777 {} \;
54-
find /var/mobile/BatchInstall -type d -exec chmod 777 {} \;
55-
hostsFile=/var/mobile/BatchInstall/hosts
56-
if test -f "$hostsFile"; then
3+
step1 () {
4+
rm -r /tmp/batchomatic 2>/dev/null
5+
mkdir /tmp/batchomatic
6+
timestamp="`date +"%Y.%m.%d-%H.%M.%S"`"
7+
echo $timestamp >> /tmp/batchomatic/timestampWithNewline.txt
8+
printf %s "$(< /tmp/batchomatic/timestampWithNewline.txt)" > /tmp/batchomatic/timestamp.txt
9+
echo "LOG: completed initial setup"
10+
}
11+
step2 () {
12+
mkdir /tmp/batchomatic/create
13+
mkdir /tmp/batchomatic/create/DEBIAN
14+
cp /Library/batchomatic/directions /tmp/batchomatic/create/DEBIAN/postinst
15+
mkdir /tmp/batchomatic/create/var
16+
mkdir /tmp/batchomatic/create/var/mobile
17+
mkdir /tmp/batchomatic/create/var/mobile/BatchInstall
18+
mkdir /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences
19+
mkdir /tmp/batchomatic/create/var/mobile/BatchInstall/SavedDebs
20+
echo "LOG: completed filesystem setup"
21+
}
22+
step3 () {
23+
timestamp="`cat /tmp/batchomatic/timestamp.txt`"
24+
versionNumber=`dpkg-query --showformat='${Version}\n' --show com.captinc.batchomatic`
25+
echo "Package: com.you.batchinstall" >> /tmp/batchomatic/create/DEBIAN/control
26+
echo "Name: BatchInstall - Online" >> /tmp/batchomatic/create/DEBIAN/control
27+
echo "Version: $timestamp" >> /tmp/batchomatic/create/DEBIAN/control
28+
echo "Author: You" >> /tmp/batchomatic/create/DEBIAN/control
29+
echo "Maintainer: You" >> /tmp/batchomatic/create/DEBIAN/control
30+
echo "Architecture: iphoneos-arm" >> /tmp/batchomatic/create/DEBIAN/control
31+
echo "Section: Tweaks" >> /tmp/batchomatic/create/DEBIAN/control
32+
echo "Description: Batch-install all of your tweaks for your setup! Created using Batchomatic v$versionNumber" >> /tmp/batchomatic/create/DEBIAN/control
33+
echo "LOG: created control file"
34+
}
35+
step4 () {
36+
apt-cache depends com.you.batchinstall | awk -F "Depends: " '/Depends: /{print $2}' > /tmp/batchomatic/alltweaks.txt
37+
awk 'NR==FNR{a[$0];next} !($0 in a)' /Library/batchomatic/ignoredtweaks.txt /tmp/batchomatic/alltweaks.txt > /tmp/batchomatic/tweaksWithoutIgnores.txt
38+
sed -i 's|[<>,]||g' /tmp/batchomatic/tweaksWithoutIgnores.txt
39+
printf %s "$(< /tmp/batchomatic/tweaksWithoutIgnores.txt)" > /tmp/batchomatic/create/var/mobile/BatchInstall/tweaks.txt
40+
echo "LOG: gathered tweaks"
41+
}
42+
step5 () {
43+
cat /etc/apt/sources.list.d/*.list /etc/apt/cydiasources.d/*.list /var/mobile/Library/Application\ Support/xyz.willy.Zebra/*.list /etc/apt/sources.list.d/*.sources 2>/dev/null >> /tmp/batchomatic/reposRaw.txt
44+
ls "/var/mobile/Library/Application Support/Installer/SourcesFiles" 2>/dev/null | sed 's:_:/:g' | sed 's:\(.*\)-Packages:\1:' >> /tmp/batchomatic/reposWithSlash.txt
45+
egrep -o 'https?://[^ ]+' /tmp/batchomatic/reposRaw.txt >> /tmp/batchomatic/reposExtracted.txt
46+
sed 's:/\?$:/:g' /tmp/batchomatic/reposExtracted.txt >> /tmp/batchomatic/reposWithSlash.txt
47+
sed 's#https://repounclutter.coolstar.org/#http://apt.thebigboss.org/repofiles/cydia/#g' /tmp/batchomatic/reposWithSlash.txt > /tmp/batchomatic/reposRepoUnclutterConverted.txt
48+
sort -u /tmp/batchomatic/reposRepoUnclutterConverted.txt >> /tmp/batchomatic/reposSorted.txt
49+
awk 'NR==FNR{a[$0];next} !($0 in a)' /Library/batchomatic/ignoredrepos.txt /tmp/batchomatic/reposSorted.txt > /tmp/batchomatic/reposWithoutIgnores.txt
50+
sort -u /tmp/batchomatic/reposWithoutIgnores.txt >> /tmp/batchomatic/reposReSorted.txt
51+
printf %s "$(< /tmp/batchomatic/reposReSorted.txt)" > /tmp/batchomatic/create/var/mobile/BatchInstall/repos.txt
52+
echo "LOG: gathered repos"
53+
}
54+
step6 () {
55+
find /var/mobile/BatchInstall -type f -exec chmod 777 {} \;
56+
find /var/mobile/BatchInstall -type d -exec chmod 777 {} \;
57+
hostsFile=/var/mobile/BatchInstall/hosts
58+
if test -f "$hostsFile"; then
5759
cp -r /var/mobile/BatchInstall/TweakPreferences/* /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences
5860
cp /var/mobile/BatchInstall/hosts /tmp/batchomatic/create/var/mobile/BatchInstall
59-
batchomaticd 2
60-
else
61+
else
6162
cp -r /var/mobile/BatchInstall/* /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences
6263
batchomaticd 1
64+
fi
65+
cp /var/mobile/Library/Caches/libactivator.plist /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences/libactivator.exported.plist 2>/dev/null
66+
rm /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences/.Global* 2>/dev/null
67+
rm /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences/com.google* 2>/dev/null
68+
rm /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences/group.com.apple* 2>/dev/null
69+
rm /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences/com.saurik.Cydia.plist 2>/dev/null
70+
rm /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences/nfcd.plist 2>/dev/null
71+
rm /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences/TVRemoteConnectionService.plist 2>/dev/null
72+
rm /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences/UITextInputContextIdentifiers.plist 2>/dev/null
73+
find /tmp/batchomatic/create/var/mobile/BatchInstall/Preferences -maxdepth 1 -name "*groups.com.apple*" -delete 2>/dev/null
74+
echo "LOG: gathered tweak preferences"
75+
}
76+
step7 () {
6377
batchomaticd 2
64-
fi
78+
echo "LOG: gathered hosts file"
79+
}
80+
step8 () {
81+
cp /var/mobile/BatchomaticDebs/UserSavedDebs/* /tmp/batchomatic/create/var/mobile/BatchInstall/SavedDebs 2>/dev/null
82+
echo "LOG: gathered saved debs"
83+
}
84+
step9 () {
85+
timestamp="`cat /tmp/batchomatic/timestamp.txt`"
86+
find /tmp/batchomatic/create -name ".DS_Store" -type f -delete 2>/dev/null
87+
echo "LOG: building final deb"
88+
dpkg -b /tmp/batchomatic/create /var/mobile/BatchomaticDebs/batchinstall-online-$timestamp.deb
89+
}
90+
step10 () {
91+
timestamp="`cat /tmp/batchomatic/timestamp.txt`"
92+
echo "batchinstall-online-$timestamp.deb" > /tmp/batchomatic/nameOfDeb.txt
93+
echo "LOG: complete"
94+
}
6595

66-
cp /var/mobile/BatchomaticDebs/UserSavedDebs/* /tmp/batchomatic/create/var/mobile/BatchInstall/SavedDebs
67-
68-
dpkg-deb -b /tmp/batchomatic/create /var/mobile/BatchomaticDebs/batchinstall-$timestamp.deb
69-
rm -r /tmp/batchomatic
96+
if [ "$1" = 1 ]; then
97+
step1
98+
elif [ "$1" = 2 ]; then
99+
step2
100+
elif [ "$1" = 3 ]; then
101+
step3
102+
elif [ "$1" = 4 ]; then
103+
step4
104+
elif [ "$1" = 5 ]; then
105+
step5
106+
elif [ "$1" = 6 ]; then
107+
step6
108+
elif [ "$1" = 7 ]; then
109+
step7
110+
elif [ "$1" = 8 ]; then
111+
step8
112+
elif [ "$1" = 9 ]; then
113+
step9
114+
elif [ "$1" = 10 ]; then
115+
step10
116+
elif [ "$1" = 0 ]; then
117+
step1
118+
step2
119+
step3
120+
step4
121+
step5
122+
step6
123+
step7
124+
step8
125+
step9
126+
step10
127+
fi

0 commit comments

Comments
 (0)