07-12-2016, 04:25 PM
(This post was last modified: 07-12-2016, 04:38 PM by BigBear59.
Edit Reason: Itallics are messed up
)
You could do this on a Linux system, if the image is slightly to big.
cd /tmp
wget http://files.pine64.org/os/android/andro...4-64GB.zip #Download the ZIP to the Linux system
unzip android-ver5.1.1-20160505-pine64-64GB.zip # Unzip it to android-ver5.1.1-20160505-pine64-64GB.img
fdisk -l android-ver5.1.1-20160505-pine64-64GB.img # Get the IMG partition info
omitting empty partition (14)
Disk android-ver5.1.1-20160505-pine64-64GB.img: 63.3 GB, 63282610176 bytes, 123598848 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
android-ver5.1.1-20160505-pine64-64GB.img1 5251072 123596798 59172863+ b W95 FAT32
android-ver5.1.1-20160505-pine64-64GB.img2 * 73728 139263 32768 6 FAT16
android-ver5.1.1-20160505-pine64-64GB.img3 1 5251072 2625536 85 Linux extended
android-ver5.1.1-20160505-pine64-64GB.img5 139264 172031 16384 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img6 172032 204799 16384 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img7 204800 3350527 1572864 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img8 3350528 3383295 16384 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img9 3383296 3448831 32768 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img10 3448832 5021695 786432 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img11 5021696 5054463 16384 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img12 5054464 5087231 16384 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img13 5087232 5251071 81920 83 Linux
Partition table entries are not in disk order
Got the 73728 from the START col of .img2, would use 139264 for .img5, yada, yada, yada
echo "73728 * 512" | bc # Calculate the offset
37748736
mkdir /mnt/from_part
mkdir /mnt/to_part
Use FDISK & MKFS to duplicate your Slightly small SD card to match the fdisk from the IMG. Here partition 1 should end up a bit smaller, normally this smaller partition would be the last, but that's not how this one came out.
# Mount your SD card onto /mnt/to_part, I'll let you figure this out
mount -o loop,owner,offset=37748736 /tmp/android-ver5.1.1-20160505-pine64-64GB.img /mnt/from_part/ # Mount the IMG partition #2
ls -l /mnt/from_part/ # Ouh see the Magic , see what is on IMG partition #2
total 1358
drwxr-xr-x. 2 root root 2048 Dec 31 1979 bat
-rwxr-xr-x. 1 root root 681774 Dec 31 1979 bootlogo.bmp
-rwxr-xr-x. 1 root root 0 Dec 31 2009 data.notfirstrun
-rwxr-xr-x. 1 root root 344813 Dec 31 1979 font24.sft
-rwxr-xr-x. 1 root root 357443 Dec 31 1979 font32.sft
-rwxr-xr-x. 1 root root 512 Dec 31 1979 magic.bin
cd /mnt/from_part/
tar -cf - . | ( cd /mnt/to_part; tar -xpvf - )./ # copy the files from the IMG partition to the SD
./font24.sft
./bat/
./bat/bat9.bmp
./bat/bat7.bmp
./bat/bat2.bmp
./bat/bat5.bmp
./bat/bootlogo.bmp
./bat/bat0.bmp
./bat/bat8.bmp
./bat/low_pwr.bmp
./bat/battery.bmp
./bat/bat1.bmp
./bat/bat3.bmp
./bat/bempty.bmp
./bat/bat6.bmp
./bat/battery_charge.bmp
./bat/bat10.bmp
./bat/bat4.bmp
./bootlogo.bmp
./font32.sft
./magic.bin
./data.notfirstrun
tar: .: implausibly old time stamp 1969-12-31 16:00:00
ls -l /mnt/to_part/ # look they match
total 1368
drwxr-xr-x. 2 root root 4096 Dec 31 1979 bat
-rwxr-xr-x. 1 root root 681774 Dec 31 1979 bootlogo.bmp
-rwxr-xr-x. 1 root root 0 Dec 31 2009 data.notfirstrun
-rwxr-xr-x. 1 root root 344813 Dec 31 1979 font24.sft
-rwxr-xr-x. 1 root root 357443 Dec 31 1979 font32.sft
-rwxr-xr-x. 1 root root 512 Dec 31 1979 magic.bin
umount /mnt/from_part
umount /mnt/to_part
# Rinse, Repeat for each partition in the IMG
Good luck,
BigBear
cd /tmp
wget http://files.pine64.org/os/android/andro...4-64GB.zip #Download the ZIP to the Linux system
unzip android-ver5.1.1-20160505-pine64-64GB.zip # Unzip it to android-ver5.1.1-20160505-pine64-64GB.img
fdisk -l android-ver5.1.1-20160505-pine64-64GB.img # Get the IMG partition info
omitting empty partition (14)
Disk android-ver5.1.1-20160505-pine64-64GB.img: 63.3 GB, 63282610176 bytes, 123598848 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
android-ver5.1.1-20160505-pine64-64GB.img1 5251072 123596798 59172863+ b W95 FAT32
android-ver5.1.1-20160505-pine64-64GB.img2 * 73728 139263 32768 6 FAT16
android-ver5.1.1-20160505-pine64-64GB.img3 1 5251072 2625536 85 Linux extended
android-ver5.1.1-20160505-pine64-64GB.img5 139264 172031 16384 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img6 172032 204799 16384 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img7 204800 3350527 1572864 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img8 3350528 3383295 16384 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img9 3383296 3448831 32768 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img10 3448832 5021695 786432 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img11 5021696 5054463 16384 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img12 5054464 5087231 16384 83 Linux
android-ver5.1.1-20160505-pine64-64GB.img13 5087232 5251071 81920 83 Linux
Partition table entries are not in disk order
Got the 73728 from the START col of .img2, would use 139264 for .img5, yada, yada, yada
echo "73728 * 512" | bc # Calculate the offset
37748736
mkdir /mnt/from_part
mkdir /mnt/to_part
Use FDISK & MKFS to duplicate your Slightly small SD card to match the fdisk from the IMG. Here partition 1 should end up a bit smaller, normally this smaller partition would be the last, but that's not how this one came out.
# Mount your SD card onto /mnt/to_part, I'll let you figure this out
mount -o loop,owner,offset=37748736 /tmp/android-ver5.1.1-20160505-pine64-64GB.img /mnt/from_part/ # Mount the IMG partition #2
ls -l /mnt/from_part/ # Ouh see the Magic , see what is on IMG partition #2
total 1358
drwxr-xr-x. 2 root root 2048 Dec 31 1979 bat
-rwxr-xr-x. 1 root root 681774 Dec 31 1979 bootlogo.bmp
-rwxr-xr-x. 1 root root 0 Dec 31 2009 data.notfirstrun
-rwxr-xr-x. 1 root root 344813 Dec 31 1979 font24.sft
-rwxr-xr-x. 1 root root 357443 Dec 31 1979 font32.sft
-rwxr-xr-x. 1 root root 512 Dec 31 1979 magic.bin
cd /mnt/from_part/
tar -cf - . | ( cd /mnt/to_part; tar -xpvf - )./ # copy the files from the IMG partition to the SD
./font24.sft
./bat/
./bat/bat9.bmp
./bat/bat7.bmp
./bat/bat2.bmp
./bat/bat5.bmp
./bat/bootlogo.bmp
./bat/bat0.bmp
./bat/bat8.bmp
./bat/low_pwr.bmp
./bat/battery.bmp
./bat/bat1.bmp
./bat/bat3.bmp
./bat/bempty.bmp
./bat/bat6.bmp
./bat/battery_charge.bmp
./bat/bat10.bmp
./bat/bat4.bmp
./bootlogo.bmp
./font32.sft
./magic.bin
./data.notfirstrun
tar: .: implausibly old time stamp 1969-12-31 16:00:00
ls -l /mnt/to_part/ # look they match
total 1368
drwxr-xr-x. 2 root root 4096 Dec 31 1979 bat
-rwxr-xr-x. 1 root root 681774 Dec 31 1979 bootlogo.bmp
-rwxr-xr-x. 1 root root 0 Dec 31 2009 data.notfirstrun
-rwxr-xr-x. 1 root root 344813 Dec 31 1979 font24.sft
-rwxr-xr-x. 1 root root 357443 Dec 31 1979 font32.sft
-rwxr-xr-x. 1 root root 512 Dec 31 1979 magic.bin
umount /mnt/from_part
umount /mnt/to_part
# Rinse, Repeat for each partition in the IMG
Good luck,
BigBear