Skip to content

Instantly share code, notes, and snippets.

Forked from r-plus/
Last active August 6, 2016 00:15
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Theos install script
export THEOS=/opt/theos
if ! [ -d $THEOS ]; then
mkdir -p $THEOS
# clone theos.git
cd /opt
git clone git://
# clone iphoneheaders.git
mv include include.bak
git clone git:// include
for FILE in include.bak/*.h; do mv $FILE include/; done
rmdir include.bak
# get IOSurfaceAPI.h
cd $THEOS/include/IOSurface/
curl -O
# clone CaptainHook.git
cd $THEOS/include/
git clone git://
# clone theos-nic-templates.git
cd $THEOS/templates/
git clone git://
# get dpkg-deb for Mac OS X
curl -O
chmod a+x dpkg-deb-fat
sudo mkdir -p /usr/local/bin
sudo mv dpkg-deb-fat /usr/local/bin/dpkg-deb
# get ldid (Packages list is not latest for ldid)
# #install_from_telesphoreo ldid
# cd $THEOS
# curl -s -L > ldid.deb
# ar -p ldid.deb data.tar.gz | tar -zxvf- --strip-components 2 ./usr/bin/ldid
# rm ldid.deb
cd $THEOS/bin
curl -O
chmod a+x ldid
# get libsubstrate.dylib
curl -OL$msdeb
dpkg-deb -x $msdeb mobilesubstrate
cp mobilesubstrate/Library/Frameworks/CydiaSubstrate.framework/CydiaSubstrate $THEOS/lib/libsubstrate.dylib
rm $msdeb
#get libactivator.dylib
echo "Downloading Activator library..."
curl -s -L "${ACTIVATOR_REPO}/dists/stable/main/binary-iphoneos-arm/Packages.bz2" > Packages.bz2
pkg_path=$(bzcat Packages.bz2 | grep "debs2.0/libactivator" | awk '{print $2}')
pkg=$(basename $pkg_path)
curl -s -L "${ACTIVATOR_REPO}/${pkg_path}" > $pkg
ar -p $pkg data.tar.gz | tar -zxf - ./usr/include/libactivator/libactivator.h ./usr/lib/libactivator.dylib
#mv ./usr/include/libactivator $THEOS/include
mv ./usr/lib/libactivator.dylib $THEOS/lib
rm -rf usr Packages.bz2 $pkg
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment