Fork of lukehutch/usb-copier and 2wenty2wo/usb-copier designed to make turn the original example project into a more practical appliance to copy files from a volume, clone boot disks, check files on a disk before putting in Windows computer, or re-format/wipe disk.
- Copy: Copies all files from one volume onto another disk's volume. THe destination partition is not altered. Destination volume must be larger than total size of all files
- DD: DD copied the entire disk from selected disk to destination disk. Destination disk must be larger than selected disk
- View: View a list of all files on a volume
- Wipe Quick: Format entire selected disk to FAT32
- Wipe Secure: One pass of 00 accross the selected entire disk and format to FAT32
- Added DD Copy funtionaity and menu, to include progress bar of copy/wipe
- Set Wipe-> Quick to format entire disk (was only partition before)
- Set Wipe-> Secure to DD Zero entire disk (was only partition before)
- Show true size of disk in parenthesis (in events where there is a multi-partition/volume disk)
- DD commands use 64K for
bs
for faster clone/wipe
- Drive formatting is done directly and without adding patrition table (not all devices will support reading this)
- Secure Wipe may not format disk after successful dd wipe is complete due to dd error reporting from items like byte size mismatch or block mis-allignment.
- ExFat automount is not supported at this time
- No unmount function (FAT32 volume files are unlikely to be damaged as long as it is not being written to when removed, but the safety bit will just not be written to disk)
- Disk will not show if it has no mounted volumes
- Raspberry Pi 4 or below (Pi 5 is NOT compatible at this time due to changes in GPIO)
- Pi Zero is compatible with USB HAT or USB extension
- Using a Pi 4 will be fastest as it has USB 3.0 ports
- Adafruit Bonnet OLED for Pi
- microSD for Raspian OS (8GB+)
- Power Supply for your Pi
Unzip file with tools like 7-Zip, Zip, or unzip. Then use DD, Rufus, BelenaEtcher, or another image program to write .img file to microSD card.
- Install latest version of Raspian 32-bit
- Update source list
sudo apt-get update
- Install dependencies
sudo apt install default-jdk udevil
- Install WiringPi manuall, since it does not appear avaliable via apt any more
wget https://github.com/WiringPi/WiringPi/releases/download/3.2/wiringpi_3.2_armhf.deb
sudo dpkg -i wiringpi_3.2_armhf.deb
- Run
sudo nano /boot/firmware/cmdline.exe
and addiomem=relaxed
- Enable I2C by running
sudo raspi-config
and turn it on from Interfaces. - Set I2C data rate in config file.
sudo nano /boot/firmware/config.txt
& add,i2c_arm_baudrate=1000000
afterdtparam=i2c_arm=on
- Move files to
/home/pi
(your user) directory - (Optional, if downloaded) Extract libpi4j-pigpio.so to /home/pi: unzip -j usb-copier-0.0.2-jar-with-dependencies.jar lib/armhf/libpi4j-pigpio.so
- Set program to start at boot:
sudo nano /etc/rc.local
and addsudo bash -c 'nohup java -Dpi4j.library.path=/home/pi -jar /home/pi/usb-copier-0.0.2-jar-with-dependencies.jar &'
(files name and directory path may differ based on your selectednames)
On Linux build machine:
git clone https://github.com/lukehutch/Adafruit-OLED-Bonnet-Toolkit.git
cd Adafruit-OLED-Bonnet-Toolkit ; mvn install ; cd ..
git clone https://github.com/lukehutch/usb-copier.git
cd usb-copier ; mvn package ; cd ..
- Then copy
usb-copier/target/usb-copier-0.0.2-jar-with-dependencies.jar
to/home/pi
on the Raspberry Pi.