summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.mm35
-rw-r--r--apt-extra/AvailabilityInternal.h5
m---------apt320
l---------gpgv.cc1
l---------http.cc1
l---------http.h1
-rw-r--r--lockdown.h168
-rw-r--r--makefile54
8 files changed, 247 insertions, 18 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 76a3a3f..b359a27 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -9191,17 +9191,47 @@ static NSMutableDictionary *AutoreleaseDeepMutableCopyOfDictionary(CFTypeRef typ
return [(NSMutableDictionary *) copy autorelease];
}
+int main_copy();
+int main_file();
+int main_gpgv();
+int main_rred(int, char *argv[]);
+
+int main_gzip(int, char *argv[]);
+
int main_store(int, char *argv[]);
+int main_http();
+
int main(int argc, char *argv[]) {
-#ifdef __arm64__
const char *argv0(argv[0]);
if (const char *slash = strrchr(argv0, '/'))
argv0 = slash + 1;
if (false);
+ else if (!strcmp(argv0, "copy"))
+ return main_copy();
+ else if (!strcmp(argv0, "file"))
+ return main_file();
+ else if (!strcmp(argv0, "gpgv"))
+ return main_gpgv();
+ else if (!strcmp(argv0, "rred"))
+ return main_rred(argc, argv);
+#ifdef __arm__
+ else if (!strcmp(argv0, "bzip2"))
+ return main_gzip(argc, argv);
+ else if (!strcmp(argv0, "gzip"))
+ return main_gzip(argc, argv);
+ else if (!strcmp(argv0, "lzma"))
+ return main_gzip(argc, argv);
+#endif
+#ifdef __arm64__
else if (!strcmp(argv0, "store"))
return main_store(argc, argv);
#endif
+ else if (!strcmp(argv0, "http"))
+ return main_http();
+ else if (!strcmp(argv0, "https"))
+ return main_http();
+ else {}
int fd(open("/tmp/cydia.log", O_WRONLY | O_APPEND | O_CREAT, 0644));
dup2(fd, 2);
@@ -9435,7 +9465,8 @@ int main(int argc, char *argv[]) {
_config->Set("Acquire::AllowInsecureRepositories", true);
_config->Set("Acquire::Check-Valid-Until", false);
- _config->Set("Dir::Bin::Methods::store", "/Applications/Cydia.app/store");
+
+ _config->Set("Dir::Bin::Methods", "/Applications/Cydia.app");
_config->Set("pkgCacheGen::ForceEssential", "");
diff --git a/apt-extra/AvailabilityInternal.h b/apt-extra/AvailabilityInternal.h
new file mode 100644
index 0000000..ed09ba8
--- /dev/null
+++ b/apt-extra/AvailabilityInternal.h
@@ -0,0 +1,5 @@
+#include_next <AvailabilityInternal.h>
+#undef __AVAILABILITY_INTERNAL_UNAVAILABLE
+#define __AVAILABILITY_INTERNAL_UNAVAILABLE
+#undef __AVAILABILITY_INTERNAL__IPHONE_NA
+#define __AVAILABILITY_INTERNAL__IPHONE_NA
diff --git a/apt32 b/apt32
-Subproject b62917f161e80c11d4c3265006102d8d2c1651c
+Subproject 9439ca0e8c0cb2523b756a4675f3fd1c69ce7ea
diff --git a/gpgv.cc b/gpgv.cc
new file mode 120000
index 0000000..2157299
--- /dev/null
+++ b/gpgv.cc
@@ -0,0 +1 @@
+apt32/methods/gpgv.cc \ No newline at end of file
diff --git a/http.cc b/http.cc
new file mode 120000
index 0000000..292a97e
--- /dev/null
+++ b/http.cc
@@ -0,0 +1 @@
+apt32/methods/http.cc \ No newline at end of file
diff --git a/http.h b/http.h
new file mode 120000
index 0000000..2e5317b
--- /dev/null
+++ b/http.h
@@ -0,0 +1 @@
+apt32/methods/http.h \ No newline at end of file
diff --git a/lockdown.h b/lockdown.h
new file mode 100644
index 0000000..82e2dd2
--- /dev/null
+++ b/lockdown.h
@@ -0,0 +1,168 @@
+/* iPhone Open SDK - Free Open Source Anti-Apple SDK
+ * Copyright (C) 2008 Jay Freeman (saurik)
+*/
+
+/*
+ * Redistribution and use in source and binary
+ * forms, with or without modification, are permitted
+ * provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the
+ * above copyright notice, this list of conditions
+ * and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the
+ * above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation
+ * and/or other materials provided with the
+ * distribution.
+ * 3. The name of the author may not be used to endorse
+ * or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef LOCKDOWN_LOCKDOWN_H
+#define LOCKDOWN_LOCKDOWN_H
+
+#include <CoreFoundation/CFString.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern CFStringRef kLDErrorMissingKey;
+
+extern CFStringRef kLockdownActivationInfoCompleteKey;
+extern CFStringRef kLockdownActivationInfoErrorsKey;
+extern CFStringRef kLockdownActivationInfoKey;
+extern CFStringRef kLockdownActivationRandomnessKey;
+extern CFStringRef kLockdownActivationStateAcknowledgedKey;
+extern CFStringRef kLockdownActivationStateKey;
+extern CFStringRef kLockdownActivationTicketKey;
+extern CFStringRef kLockdownAmountCameraAvailableKey;
+extern CFStringRef kLockdownAmountCameraReservedKey;
+extern CFStringRef kLockdownAmountDataAvailableKey;
+extern CFStringRef kLockdownAmountDataReservedKey;
+extern CFStringRef kLockdownAmountSongsReservedKey;
+extern CFStringRef kLockdownBasebandBootloaderVersionKey;
+extern CFStringRef kLockdownBasebandMasterKeyHashKey;
+extern CFStringRef kLockdownBasebandThumbprintKey;
+extern CFStringRef kLockdownBasebandVersionKey;
+extern CFStringRef kLockdownBluetoothAddressKey;
+extern CFStringRef kLockdownBrickStateKey;
+extern CFStringRef kLockdownBuildVersionKey;
+extern CFStringRef kLockdownCalendarUsageKey;
+extern CFStringRef kLockdownCameraUsageKey;
+extern CFStringRef kLockdownCaptureSyslogKey;
+extern CFStringRef kLockdownCarrierBundleInfoKey;
+extern CFStringRef kLockdownCheckpointDomainKey;
+extern CFStringRef kLockdownColorSyncProfileKey;
+extern CFStringRef kLockdownDBVersionKey;
+extern CFStringRef kLockdownDataSyncDomainKey;
+extern CFStringRef kLockdownDebugDockPresentKey;
+extern CFStringRef kLockdownDebugDomainKey;
+extern CFStringRef kLockdownDeviceCertificateKey;
+extern CFStringRef kLockdownDeviceClassKey;
+extern CFStringRef kLockdownDeviceNameKey;
+extern CFStringRef kLockdownDevicePrivateKey;
+extern CFStringRef kLockdownDevicePublicKey;
+extern CFStringRef kLockdownDiskUsageDomainKey;
+extern CFStringRef kLockdownEnable8021XLogsKey;
+extern CFStringRef kLockdownEnableVPNLogsKey;
+extern CFStringRef kLockdownFairPlayCertificateKey;
+extern CFStringRef kLockdownFairPlayContextIDKey;
+extern CFStringRef kLockdownFairPlayDomainKey;
+extern CFStringRef kLockdownFairPlayGUIDKey;
+extern CFStringRef kLockdownFairPlayIDKey;
+extern CFStringRef kLockdownFairPlayKeyDataKey;
+extern CFStringRef kLockdownFamilyIDKey;
+extern CFStringRef kLockdownFirmwareVersionKey;
+extern CFStringRef kLockdownHostAttachedKey;
+extern CFStringRef kLockdownICCIDKey;
+extern CFStringRef kLockdownIMEIKey;
+extern CFStringRef kLockdownIMSIKey;
+extern CFStringRef kLockdownInternalDomainKey;
+extern CFStringRef kLockdownInternationalDomainKey;
+extern CFStringRef kLockdownInverseDeviceIDKey;
+extern CFStringRef kLockdownIsInternalKey;
+extern CFStringRef kLockdownKeyboardKey;
+extern CFStringRef kLockdownLanguageKey;
+extern CFStringRef kLockdownLocaleKey;
+extern CFStringRef kLockdownLogToDiskKey;
+extern CFStringRef kLockdownMediaCacheUsageKey;
+extern CFStringRef kLockdownMinimumiTunesVersionKey;
+extern CFStringRef kLockdownMobileApplicationUsageKey;
+extern CFStringRef kLockdownModelNumberKey;
+extern CFStringRef kLockdownNANDInfoKey;
+extern CFStringRef kLockdownNotesUsageKey;
+extern CFStringRef kLockdownPasswordProtectedKey;
+extern CFStringRef kLockdownPhoneNumberKey;
+extern CFStringRef kLockdownPhotoUsageKey;
+extern CFStringRef kLockdownProductTypeKey;
+extern CFStringRef kLockdownProductVersionKey;
+extern CFStringRef kLockdownProhibitAppInstallKey;
+extern CFStringRef kLockdownProposedTicketKey;
+extern CFStringRef kLockdownProtocolVersionKey;
+extern CFStringRef kLockdownRegionInfoKey;
+extern CFStringRef kLockdownReleaseTypeKey;
+extern CFStringRef kLockdownRentalBagRequestKey;
+extern CFStringRef kLockdownRentalBagRequestVersionKey;
+extern CFStringRef kLockdownRentalBagResponseKey;
+extern CFStringRef kLockdownRentalCheckinAckRequestKey;
+extern CFStringRef kLockdownRentalCheckinAckResponseKey;
+extern CFStringRef kLockdownReservedBytesKey;
+extern CFStringRef kLockdownRestrictionDomainKey;
+extern CFStringRef kLockdownSIMGID1Key;
+extern CFStringRef kLockdownSIMGID2Key;
+extern CFStringRef kLockdownSIMStatusKey;
+extern CFStringRef kLockdownSerialNumberKey;
+extern CFStringRef kLockdownSomebodySetTimeZoneKey;
+extern CFStringRef kLockdownSupportedKeyboardsKey;
+extern CFStringRef kLockdownSupportedLanguagesKey;
+extern CFStringRef kLockdownSupportedLocalesKey;
+extern CFStringRef kLockdownSupportsCarrierBundleInstallKey;
+extern CFStringRef kLockdownSyncDataClassDomainKey;
+extern CFStringRef kLockdownTimeIntervalSince1970Key;
+extern CFStringRef kLockdownTimeZoneKey;
+extern CFStringRef kLockdownTimeZoneOffsetFromUTCKey;
+extern CFStringRef kLockdownTotalDataAvailableKey;
+extern CFStringRef kLockdownTotalDataCapacityKey;
+extern CFStringRef kLockdownTotalDiskCapacityKey;
+extern CFStringRef kLockdownTotalSystemAvailableKey;
+extern CFStringRef kLockdownTotalSystemCapacityKey;
+extern CFStringRef kLockdownTrustedHostAttachedKey;
+extern CFStringRef kLockdownUniqueDeviceIDKey;
+extern CFStringRef kLockdownUnlockCodeKey;
+extern CFStringRef kLockdownUserPreferencesDomainKey;
+extern CFStringRef kLockdownUserSetLanguageKey;
+extern CFStringRef kLockdownUserSetLocaleKey;
+extern CFStringRef kLockdownUses24HourClockKey;
+extern CFStringRef kLockdownVoicemailUsageKey;
+extern CFStringRef kLockdownVoidWarrantyKey;
+extern CFStringRef kLockdownWifiAddressKey;
+extern CFStringRef kLockdownWildcardTicketKey;
+extern CFStringRef kLockdowniTunesHasConnectedKey;
+
+extern void *lockdown_connect(void);
+extern CFStringRef lockdown_copy_value(void *lockdown, void *null, CFStringRef key);
+extern void lockdown_disconnect(void *lockdown);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif/*LOCKDOWN_LOCKDOWN_H*/
diff --git a/makefile b/makefile
index 51dcf7d..cced7ba 100644
--- a/makefile
+++ b/makefile
@@ -24,17 +24,15 @@ cycc += -fvisibility=hidden
link += -Wl,-dead_strip
link += -Wl,-no_dead_strip_inits_and_terms
-flag += -Xarch_armv6 -Iapt32
-flag += -Xarch_armv6 -Iapt32-contrib
-flag += -Xarch_armv6 -Iapt32-deb
-flag += -Xarch_armv6 -Iapt-extra
-flag += -Xarch_armv6 -IObjects/apt32
-
-flag += -Xarch_arm64 -Iapt64
-flag += -Xarch_arm64 -Iapt64-contrib
-flag += -Xarch_arm64 -Iapt64-deb
-flag += -Xarch_arm64 -Iapt-extra
-flag += -Xarch_arm64 -IObjects/apt64
+iapt :=
+iapt += -Iapt32
+iapt += -Iapt32-contrib
+iapt += -Iapt32-deb
+iapt += -Iapt-extra
+iapt += -IObjects/apt32
+
+flag += $(patsubst %,-Xarch_armv6 %,$(iapt))
+flag += $(patsubst %,-Xarch_arm64 %,$(subst apt32,apt64,$(iapt)))
flag += -I.
flag += -isystem sysroot/usr/include
@@ -67,6 +65,9 @@ libs += -framework SystemConfiguration
libs += -framework WebCore
libs += -framework WebKit
+libs += -framework CFNetwork
+libs += -llockdown
+
libs += -Xarch_armv6 -Wl,-force_load,Objects/libapt32.a
libs += -Xarch_arm64 -Wl,-force_load,Objects/libapt64.a
@@ -83,21 +84,29 @@ code := $(foreach dir,$(dirs),$(wildcard $(foreach ext,h hpp c cpp m mm,$(dir)/*
code := $(filter-out SDURLCache/SDURLCacheTests.m,$(code))
code += MobileCydia.mm Version.mm iPhonePrivate.h Cytore.hpp lookup3.c Sources.h Sources.mm DiskUsage.cpp
+code += gpgv.cc
+code += http.cc
+
source := $(filter %.m,$(code)) $(filter %.mm,$(code))
-source += $(filter %.c,$(code)) $(filter %.cpp,$(code))
-header := $(filter %.h,$(code)) $(filter %.hpp,$(code))
+source += $(filter %.c,$(code)) $(filter %.cpp,$(code)) $(filter %.cc,$(code))
+header := $(filter %.h,$(code)) $(filter %.hpp,$(code)) $(filter %.hh,$(code))
object := $(source)
object := $(object:.c=.o)
object := $(object:.cpp=.o)
+object := $(object:.cc=.o)
object := $(object:.m=.o)
object := $(object:.mm=.o)
object := $(object:%=Objects/%)
+methods := copy file rred
+
libapt32 :=
libapt32 += $(wildcard apt32/apt-pkg/*.cc)
libapt32 += $(wildcard apt32/apt-pkg/deb/*.cc)
libapt32 += $(wildcard apt32/apt-pkg/contrib/*.cc)
+libapt32 += apt32/methods/gzip.cc
+libapt32 += $(patsubst %,apt32/methods/%.cc,$(methods))
libapt32 := $(patsubst %.cc,Objects/%.o,$(libapt32))
libapt64 :=
@@ -106,6 +115,7 @@ libapt64 += $(wildcard apt64/apt-pkg/deb/*.cc)
libapt64 += $(wildcard apt64/apt-pkg/contrib/*.cc)
libapt64 += apt64/apt-pkg/tagfile-keys.cc
libapt64 += apt64/methods/store.cc
+libapt64 += $(patsubst %,apt64/methods/%.cc,$(methods))
libapt64 := $(filter-out %/srvrec.cc,$(libapt64))
libapt64 := $(patsubst %.cc,Objects/%.o,$(libapt64))
@@ -128,14 +138,12 @@ flag64 += -arch arm64
flag64 += -Xarch_arm64 -miphoneos-version-min=7.0
apt32 := $(cycc) $(flag32) $(flag)
-apt32 += -include apt.h
apt32 += -Wno-deprecated-register
apt32 += -Wno-format-security
apt32 += -Wno-tautological-compare
apt32 += -Wno-uninitialized
apt32 += -Wno-unused-private-field
apt32 += -Wno-unused-variable
-apt32 += -D'VERSION="0.7.25.3"'
apt64 := $(cycc) $(flag64) $(flag)
apt64 += -include apt.h
@@ -143,6 +151,14 @@ apt64 += -Wno-deprecated-register
apt64 += -Wno-unused-private-field
apt64 += -Wno-unused-variable
+eapt := -include apt.h
+apt64 += $(eapt)
+eapt += -D'VERSION="0.7.25.3"'
+apt32 += $(eapt)
+eapt += -Wno-format
+eapt += -Wno-logical-op-parentheses
+iapt += $(eapt)
+
cycc += $(flag32)
cycc += $(flag64)
@@ -176,6 +192,11 @@ apt64/apt-pkg/tagfile-keys.cc:
../apt64/apt-pkg/tagfile-keys.list
sed -i -e 's@typedef char static_assert64@//\\0@' $@
+Objects/%.o: %.cc $(header)
+ @mkdir -p $(dir $@)
+ @echo "[cycc] $<"
+ @$(cycc) $(plus) -c -o $@ $< $(flag) -Wno-format -include apt.h -Dmain=main_$(basename $(notdir $@))
+
Objects/apt32/%.o: apt32/%.cc $(header) apt.h apt-extra/*.h
@mkdir -p $(dir $@)
@echo "[cycc] $<"
@@ -277,7 +298,8 @@ debs/cydia_$(version)_iphoneos-arm.deb: MobileCydia preinst postinst cfversion s
cp -a MobileCydia.app _/Applications/Cydia.app
rm -rf _/Applications/Cydia.app/*.lproj
cp -a MobileCydia _/Applications/Cydia.app/Cydia
- ln -s Cydia _/Applications/Cydia.app/store
+
+ for meth in bzip2 gzip lzma gpgv http https store $(methods); do ln -s Cydia _/Applications/Cydia.app/"$${meth}"; done
cd MobileCydia.app && find . -name '*.png' -exec cp -af ../Images/MobileCydia.app/{} ../_/Applications/Cydia.app/{} ';'