#!/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
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
#change these if they're a different path for you
export PS3DEV=/usr/local/ps3dev
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
export PATH=$PATH:$PS3DEV/spu/bin
export PSL1GHT=~/PSL1GHT/psl1ght/build
PSKEYS=~/.ps3
PSUTILS=~/ps3utils
PSTOOLS=~/ps3tools
PSPUBTOOLS=~/ps3publictools
#update all tools, comment out if you want to skip this
#cd $PSKEYS && git pull && cd $PSUTILS && git pull && make && cd $PSTOOLS && git pull && make && cd $PSPUBTOOLS && git pull && make
OLDPKG=$1
NEWPKG=$2
oldPWD=`pwd`
rm -rf /tmp/crap123
mkdir /tmp/crap123
cd /tmp/crap123
#hackish, but pkg.py won't let me tell it where to extract?
$PSL1GHT/bin/pkg.py -x "$1"
#this is really hackish, but eff you, dont use it if you dont like it
DIRNAME=`ls /tmp/crap123`
$PSTOOLS/unself ${DIRNAME}/USRDIR/EBOOT.BIN crap.elf
$PSPUBTOOLS/bin/make_self_npdrm crap.elf EBOOT.BIN ${DIRNAME}
mv EBOOT.BIN ${DIRNAME}/USRDIR/
$PSL1GHT/bin/pkg.py --contentid ${DIRNAME} /tmp/crap123/${DIRNAME}/ "$2"
$PSPUBTOOLS/bin/package_finalize "$2"
cd $oldPWD
mv /tmp/crap123/"$2" "./$2"
rm -rf /tmp/crap123
Copyright © 2026, NextGenUpdate.
All Rights Reserved.