Is there a Script to Backup Cartridges? - popit - 01-18-2014
Is there a Script to Backup Cartridges?
merci en advance
RE: Is there a Script to Backup Cartridges? - Deak Phreak - 01-18-2014
Not currently, but I can look into it. We would need to make our own custom app to do this and I believe they all run app.so to launch each app. We would need to somehow make or hack one up to run a shell script. If you make one of the customized carts for shell access, it should be fairly easy to do it via shell commands.
RE: Is there a Script to Backup Cartridges? - popit - 01-26-2014
Deak That would be great. please let me know how i may help
RE: Is there a Script to Backup Cartridges? - Deak Phreak - 01-26-2014
I looked into it and would not be worth it. The easiest way would be to simply make a modified cart for shell access and dump it that way. Each cart has a different structure so it would be annoying to try and get it working in a way that works with any cart.
RE: Is there a Script to Backup Cartridges? - Deak Phreak - 02-18-2014
I ended up building in a function to dump carts. It has not been tested too much though.
RE: Is there a Script to Backup Cartridges? - fargoadvice - 05-01-2014
If you enable developer mode, you can FTP to the tablet over USB and cd to the cart mount location (note: when you insert most carts and tap the 'cart' icon, the filesystem boots the nand on the cart - this CAN change the /mnt/XXXX location of cartridges - I have NOT tested this *YET*, but as soon as I get my hands on some carts, I will start cataloging each one and their mount points.
Overall, as soon as we are able to put some time into the carts, this should be easily possible!
RE: Is there a Script to Backup Cartridges? - Deak Phreak - 05-01-2014
So far my built-in function to my custom app is working fine. Here is the code in C# that I made to do this.
Code: private void btn_dumpCart(object sender, EventArgs e)
{
bool found = false;
string cartFolder = "";
string filePath = "";
string[] dirList = my_dftp.dir_list("/LF/Cart");
foreach (string s in dirList)
{
string[] tmp = s.Split(' ');
filePath = tmp[tmp.Length - 1].Trim();
if (filePath != "./" && filePath != "../" && filePath != "lib/" && !string.IsNullOrEmpty(filePath) && filePath.Length < 30)
{
if (cartFolder == "")
{
found = true;
cartFolder = filePath.Replace("/", "");
}
else
{
found = false;
}
}
}
if (found)
{
string metaP = "";
string metaN = "";
string meta = System.Text.Encoding.ASCII.GetString(my_dftp.cat("/LF/Cart/" + cartFolder + "/meta.inf"));
string[] metainf = meta.Split('\n');
foreach (string s in metainf)
{
if (s.StartsWith("PackageID=\""))
{
metaP = s.Replace("PackageID=", "");
metaP = metaP.Replace("\"", "");
}
if (s.StartsWith("Name=\""))
{
metaN = s.Replace("Name=", "");
metaN = metaN.Replace("\"", "");
}
}
if (!string.IsNullOrEmpty(metaP) && !string.IsNullOrEmpty(metaN))
{
UpdateLog("Found cart:" + metaN);
UpdateLog("Dumping cart...");
my_dftp.run_buffer("#!/bin/sh\nrm -rf /LF/Bulk/ProgramFiles/mytempdir\n");
Thread.Sleep(500);
my_dftp.mkdir(@"/LF/Bulk/ProgramFiles/mytempdir");
Thread.Sleep(500);
my_dftp.run_buffer("#!/bin/sh\ncp -r /LF/Cart/"+cartFolder+"/* /LF/Bulk/ProgramFiles/mytempdir\n");
Thread.Sleep(500);
string runstring = string.Format("#!/bin/sh\nmv /LF/Bulk/ProgramFiles/mytempdir /LF/Bulk/ProgramFiles/{0}\n", metaP);
my_dftp.run_buffer(runstring);
UpdateLog("Dumped cart to device");
}
else
{
UpdateLog("Could not parse cart info");
}
}
else
{
UpdateLog("Could not find cart");
}
}
RE: Is there a Script to Backup Cartridges? - snipa - 06-30-2014
I dumped a couple of carts last night with mixed success.
One worked OK as far as I have tried it.
The other one boots fine and plays fine as far as I have tested it but it is missing some SFX bizarrely!
Very strange....
I've tried it more than once, too with the same result each time. On both dumps, the file structure was identical in the number and size of files.
RE: Is there a Script to Backup Cartridges? - Deak Phreak - 06-30-2014
I thought that I had my dump script working, but realized that the dump I had made, when installed, put the device into a loop and would not load the dashboard. I am not sure the exact issue and don't really have time to look into it now :/ Luckily I was able to just connect via USB and use my program to delete the installed app.
RE: Is there a Script to Backup Cartridges? - Joshtech - 10-30-2015
The way that I do it is as followed...
I put this script in /etc/init.d/ as jackel
For Leapster Explorer/GS
Code: #!/bin/sh
case "$1" in
start)
ISSHOWING="FALSE"
ISDUMPING="FALSE"
ISDONE="FALSE"
echo "Starting JACKEL!"
if [ "`gpio-control /dev/gpio invalue 2 13 | grep value | cut -d = -f 2`" -eq "1" ] ; then # LFT-SHOULDER
echo "Left Shoulder Button not held, stopping JACKEL!"
exit
fi
if [ ! -e /var/fonts/monotext8x16.rgb -a -e /test/monotext8x16.rgb ] ; then
mkdir -p /var/fonts
cp -s /test/monotext8x16.rgb /var/fonts
fi
if [ -e /sys/class/graphics ]; then
DRAWTEXT_CMD="drawtext-fb /dev/fb0 /var/fonts/monotext8x16.rgb"
SCREEN_SELECT="fbctrl /dev/fb0"
LAYER_CONTROL="0" #"fbctrl /dev/fb0"
else
DRAWTEXT_CMD="drawtext /dev/layer0 /var/fonts/monotext8x16.rgb"
SCREEN_SELECT="fbctrl /dev/layer0"
LAYER_CONTROL="1" #"layer-control /dev/layer0"
fi
display_screen /Jackel/jackel.png
$DRAWTEXT_CMD "Jackel v0.1" 0 0 1
$DRAWTEXT_CMD "Written by Josh Johansson" 1 0 1
$DRAWTEXT_CMD "A = Dump Game Cartridge" 3 3 1
$DRAWTEXT_CMD " to Console" 4 3 1
$DRAWTEXT_CMD "Hint = Stop Jackel" 6 3 1
$DRAWTEXT_CMD "L & R Show/Hide Jackel" 8 3 1
$DRAWTEXT_CMD "PAUSE = Reboot (Needed after dump/s)" 11 3 1
$SCREEN_SELECT set blank 1
while true ; do
if [ "`gpio-control /dev/gpio invalue 2 4 | grep value | cut -d = -f 2`" -eq "0" ] && [ $ISDUMPING == "FALSE" ] && [ $ISSHOWING == "TRUE" ] ; then # PAUSE BUTTON
break
fi
if [ "`gpio-control /dev/gpio invalue 2 6 | grep value | cut -d = -f 2`" -eq "0" ] && [ $ISDUMPING == "FALSE" ] ; then #RIGHT SHOULDER
$DRAWTEXT_CMD " " 13 3 1
#$DRAWTEXT_CMD " " 13 3 1
$SCREEN_SELECT set blank 1
ISSHOWING="FALSE"
elif [ "`gpio-control /dev/gpio invalue 2 13 | grep value | cut -d = -f 2`" -eq "0" ] ; then # LFT-SHOULDER
display_screen /Jackel/jackel.png
$DRAWTEXT_CMD " " 13 3 1
#$DRAWTEXT_CMD "L" 13 3 1
display_screen $PROG_PATH/jackel.png
$DRAWTEXT_CMD "Jackel v0.1" 0 0 1
$DRAWTEXT_CMD "Written by Josh Johansson" 1 0 1
$DRAWTEXT_CMD "A = Dump Game Cartridge" 3 3 1
$DRAWTEXT_CMD " to Console" 4 3 1
$DRAWTEXT_CMD "Hint = Stop Jackel" 6 3 1
$DRAWTEXT_CMD "L & R Show/Hide Jackel" 8 3 1
$DRAWTEXT_CMD "PAUSE = Reboot (Needed after dump/s)" 11 3 1
$SCREEN_SELECT set blank 0
ISSHOWING="TRUE"
fi
if [ $ISSHOWING == "TRUE" ] && [ $ISDUMPING == "FALSE" ] ; then
if [ "`gpio-control /dev/gpio invalue 2 3 | grep value | cut -d = -f 2`" -eq "0" ] ; then # A button
$DRAWTEXT_CMD " " 13 3 1
$DRAWTEXT_CMD " " 3 3 1
$DRAWTEXT_CMD " " 4 3 1
$DRAWTEXT_CMD " " 6 3 1
$DRAWTEXT_CMD "DO NOT PRESS ANYTHING!!! " 8 3 1
$DRAWTEXT_CMD "DO NOT TURN OFF POWER!!! " 11 3 1
$DRAWTEXT_CMD "DUMPING CART PLEASE WAIT!" 13 3 1
ISDUMPING="TRUE"
cp -avr /LF/Cart/. /LF/Bulk/ProgramFiles
$DRAWTEXT_CMD " " 13 3 1
$DRAWTEXT_CMD "DONE DUMPING!" 13 3 1
$DRAWTEXT_CMD "A = Dump Game Cartridge" 3 3 1
$DRAWTEXT_CMD " to Console" 4 3 1
$DRAWTEXT_CMD "Hint = Stop Jackel" 6 3 1
$DRAWTEXT_CMD "L & R Show/Hide Jackel" 8 3 1
$DRAWTEXT_CMD "PAUSE = Reboot (Needed after dump/s)" 11 3 1
ISDUMPING="FALSE"
elif [ "`gpio-control /dev/gpio invalue 2 5 | grep value | cut -d = -f 2`" -eq "0" ] ; then # Hint
$DRAWTEXT_CMD " " 13 3 1
#$DRAWTEXT_CMD "Hint" 13 3 1
$SCREEN_SELECT set blank 1
exit
fi
fi
done
echo "Reboot requested by Jackel!"
reboot
;;
stop)
echo "Stopping JACKEL"
exit
;;
*)
echo "Usage: /etc/init.d/jackel {start|stop}"
exit 1
;;
esac
exit 0
For LeapPad2 - LeapPad2's don't have the gpio-control... well not on the one I managed to get my hands on for 2 secs haha read_button will do altho we only have the direction keys
Code: #!/bin/sh
# For some reason leappad2's don't have gpio-control but ultras do
# They have a function read_button
case "$1" in
start)
ISSHOWING="FALSE"
ISDUMPING="FALSE"
ISDONE="FALSE"
echo "Starting JACKEL!"
if [ "`read_button left`" != "pressed" ] ; then # up Button
echo "Left not held, stopping JACKEL!"
exit
#else
# echo "Jackel would have started"
# exit
fi
if [ ! -e /var/fonts/monotext8x16.rgb -a -e /test/monotext8x16.rgb ] ; then
mkdir -p /var/fonts
cp -s /test/monotext8x16.rgb /var/fonts
fi
if [ -e /sys/class/graphics ]; then
DRAWTEXT_CMD="drawtext-fb /dev/fb0 /var/fonts/monotext8x16.rgb"
SCREEN_SELECT="fbctrl /dev/fb0"
LAYER_CONTROL="0" #"fbctrl /dev/fb0"
else
DRAWTEXT_CMD="drawtext /dev/layer0 /var/fonts/monotext8x16.rgb"
SCREEN_SELECT="fbctrl /dev/layer0"
LAYER_CONTROL="1" #"layer-control /dev/layer0"
fi
display_screen /Jackel/jackel.png
$DRAWTEXT_CMD "Jackel v0.1" 0 0 1
$DRAWTEXT_CMD "Written by Josh Johansson" 1 0 1
$DRAWTEXT_CMD "> = Dump Game Cartridge" 3 3 1
$DRAWTEXT_CMD " to Console" 4 3 1
$DRAWTEXT_CMD " " 6 3 1
$DRAWTEXT_CMD "^ & v Show/Hide Jackel" 8 3 1
$DRAWTEXT_CMD "< = Reboot (Needed after dump/s)" 11 3 1
$SCREEN_SELECT set blank 1
while true ; do
if [ "`read_button down`" == "pressed" ] && [ $ISDUMPING == "FALSE" ] && [ $ISSHOWING == "TRUE" ] ; then # PAUSE BUTTON
break
fi
if [ "`read_button right`" == "pressed" ] && [ $ISDUMPING == "FALSE" ] ; then #RIGHT
$DRAWTEXT_CMD " " 13 3 1
#$DRAWTEXT_CMD " " 13 3 1
$SCREEN_SELECT set blank 1
ISSHOWING="FALSE"
elif [ "`read_button left`" == "pressed" ] ; then # Left
display_screen /Jackel/jackel.png
$DRAWTEXT_CMD " " 13 3 1
#$DRAWTEXT_CMD "L" 13 3 1
display_screen $PROG_PATH/jackel.png
$DRAWTEXT_CMD "Jackel v0.1" 0 0 1
$DRAWTEXT_CMD "Written by Josh Johansson" 1 0 1
$DRAWTEXT_CMD "> = Dump Game Cartridge" 3 3 1
$DRAWTEXT_CMD " to Console" 4 3 1
$DRAWTEXT_CMD " " 6 3 1
$DRAWTEXT_CMD "^ & v Show/Hide Jackel" 8 3 1
$DRAWTEXT_CMD "< = Reboot (Needed after dump/s)" 11 3 1
$SCREEN_SELECT set blank 0
ISSHOWING="TRUE"
fi
if [ $ISSHOWING == "TRUE" ] && [ $ISDUMPING == "FALSE" ] ; then
if [ "`read_button up`" == "pressed" ] ; then # Up
$DRAWTEXT_CMD " " 13 3 1
$DRAWTEXT_CMD " " 3 3 1
$DRAWTEXT_CMD " " 4 3 1
$DRAWTEXT_CMD " " 6 3 1
$DRAWTEXT_CMD "DO NOT PRESS ANYTHING!!! " 8 3 1
$DRAWTEXT_CMD "DO NOT TURN OFF POWER!!! " 11 3 1
$DRAWTEXT_CMD "DUMPING CART PLEASE WAIT!" 13 3 1
ISDUMPING="TRUE"
cp -avr /LF/Cart/. /LF/Bulk/ProgramFiles
$DRAWTEXT_CMD " " 13 3 1
$DRAWTEXT_CMD "DONE DUMPING!" 13 3 1
$DRAWTEXT_CMD "> = Dump Game Cartridge" 3 3 1
$DRAWTEXT_CMD " to Console" 4 3 1
$DRAWTEXT_CMD " " 6 3 1
$DRAWTEXT_CMD "^ & v Show/Hide Jackel" 8 3 1
$DRAWTEXT_CMD "< = Reboot (Needed after dump/s)" 11 3 1
ISDUMPING="FALSE"
fi
fi
done
echo "Reboot requested by Jackel!"
reboot
;;
stop)
echo "Stopping JACKEL"
exit
;;
*)
echo "Usage: /etc/init.d/jackel {start|stop}"
exit 1
;;
esac
exit 0
then at the end of /etc/init.d/rc5 I append
Code: chmod +x /etc/init.d/jackel
nice /etc/init.d/jackel start;
Then when I want to dump carts to console I just turn on my console while holding left shoulder button and toggle showing it with left and right shoulder buttons
or
For the LeapPad2 hold left while booting till you see the jackel screen...
This is a direct dump from fb0 on a Leapster Explorer
![[Image: MAVRpRf.png]](http://i.imgur.com/MAVRpRf.png)
This is the little image that I use(I just have it in /Jackel/jackel.png) for Leapster Explorer 320x240
![[Image: UV6Ravc.png]](http://i.imgur.com/UV6Ravc.png)
LeapPad2 Version 480x272
![[Image: mZb0njL.png]](http://i.imgur.com/mZb0njL.png)
This was just a quick way of doing this on a leapster explorer/gs...
This method will also work on an ultra but there is more that has to be done
But if you delete \LF\Bulk\SharedPackageInfo.db and restart. It will rebuild the database to my understand according to the meta.inf files in the folders under /LF/Bulk/ProgramFiles.
Keep in mind wifi has to be off or it will connect to Mr Leapfrog and correct the database.
|