TutorialConvert341to355
From PSL1GHT
| Language: | English • Deutsch • Français |
|---|
This script will let you quickly and easily convert a 3.41 homebrew to Geohot's 3.55-jb homebrew. You must have a proper build environment set up and assumes that it is set up like the toolchain tutorial
Usage: convert341to355 old.3.41.pkg new.3.55.pkg
You may notice the new pkg is much smaller than the old, this is due to compression which is part of the encryption process.
The manual way
cd /tmp/update_package.$$ pkg.py -x old.3.41.pkg unself UNIQDIR/USRDIR/EBOOT.BIN hobgoblin.elf make_self_npdrm hobgoblin.elf EBOOT.BIN UNIQDIR mv EBOOT.BIN UNIQDIR/USRDIR/ pkg.py --contentid UNIQDIR /tmp/update_package.$$/UNIQDIR/ new.3.55.pkg package_finalize new.3.55.pkg
The more automated way
#!/bin/bash #Wutangrza's lazy man's script to convert from existing 3.41 pkg to 3.55 pkg installable with GEO's CFW #You have to have PSL1GHT and all the other goodness installed already # This script assumes that you installed your build environment according to # http://psl1ght.net/wiki/TutorialInstall # Contributors ## Trixter EXPECTED_ARGS=2 E_BADARGS=65 if [ $# -ne $EXPECTED_ARGS ] then echo "Usage: `basename $0` old.3.41.pkg new.3.55.pkg" exit $E_BADARGS fi OLDPKG=$1 NEWPKG=$2 oldPWD=`pwd` if [ ! -f "$OLDPKG" ]; then echo "Unable to locate $OLDPKG" exit fi rm -rf /tmp/update_package.$$ mkdir /tmp/update_package.$$ cd /tmp/update_package.$$ #hackish, but pkg.py won't let me tell it where to extract? if [ ! -f "$OLDPKG" ]; then OLDPKG="$oldPWD/$OLDPKG" fi pkg.py -x "$OLDPKG" #this is really hackish, but eff you, dont use it if you dont like it DIRNAME=`ls /tmp/update_package.$$` unself ${DIRNAME}/USRDIR/EBOOT.BIN crap.elf make_self_npdrm crap.elf EBOOT.BIN ${DIRNAME} mv EBOOT.BIN ${DIRNAME}/USRDIR/ pkg.py --contentid ${DIRNAME} /tmp/update_package.$$/${DIRNAME}/ `basename "$NEWPKG"` package_finalize `basename "$NEWPKG"` cd $oldPWD mv /tmp/update_package.$$/`basename "$NEWPKG"` "$NEWPKG" rm -rf /tmp/update_package.$$

