Skip to content

Commit

Permalink
[tools/codesign][tvOS] Do fake sign, needed for jailbroken devices
Browse files Browse the repository at this point in the history
  • Loading branch information
sy6sy2 committed Aug 22, 2020
1 parent f11d5f0 commit 5bfb24e
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions tools/darwin/Support/Codesign.command
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,24 @@ if [[ "$MACOS" || "${PLATFORM_NAME}" == "iphoneos" || "${PLATFORM_NAME}" == "app
CONTENTS_PATH="${CODESIGNING_FOLDER_PATH}"
fi

# todo: is this required anymore?
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
#do fake sign - needed for jailbroken ios5.1 devices for some reason
if [ -f ${LDID} ]; then
find ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/ -name "*.dylib" | xargs ${LDID} -S${IOS11_ENTITLEMENTS}
find ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/ -name "*.so" | xargs ${LDID} -S${IOS11_ENTITLEMENTS}
${LDID} -S${IOS11_ENTITLEMENTS} ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/${EXECUTABLE_NAME}

#repackage python eggs
EGGS=$(find "${CONTENTS_PATH}" -name "*.egg" -type f)
for i in $EGGS; do
echo $i
mkdir del
unzip -q $i -d del
find ./del/ -name "*.so" -type f | xargs ${LDID} -S${IOS11_ENTITLEMENTS}
rm $i
cd del && zip -qr $i ./* && cd ..
rm -r ./del/
done
fi
# do fake sign - needed for iOS >=5.1 and tvOS >=10.2 jailbroken devices
# see http://www.saurik.com/id/8
if [ -f ${LDID} ]; then
find ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/ -name "*.dylib" | xargs ${LDID} -S${IOS11_ENTITLEMENTS}
find ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/ -name "*.so" | xargs ${LDID} -S${IOS11_ENTITLEMENTS}
${LDID} -S${IOS11_ENTITLEMENTS} ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/${EXECUTABLE_NAME}

#repackage python eggs
EGGS=$(find "${CONTENTS_PATH}" -name "*.egg" -type f)
for i in $EGGS; do
echo $i
mkdir del
unzip -q $i -d del
find ./del/ -name "*.so" -type f | xargs ${LDID} -S${IOS11_ENTITLEMENTS}
rm $i
cd del && zip -qr $i ./* && cd ..
rm -r ./del/
done
fi

# pull the CFBundleIdentifier out of the built xxx.app
Expand Down

0 comments on commit 5bfb24e

Please sign in to comment.