| 
 | 
 Edited by shwan at 2015-7-22 08:37  
 
@laboris - I went back to trying to use your linux script, and it still wasn't working - so I was trying to debug, even though I don't really know exactly what it's doing... 
 
I wonder if you can answer a quick question: ran command as below 
 
shawn@morpheus:~/Downloads/OPI_android_linuxinst$ sudo ./create_android_sdcard /dev/sdf 
WARNING: SD card /dev/sdf WILL BE ERASED !, Continue (y/N)?  y 
 
Init partitions 
2+0 records in 
2+0 records out 
2097152 bytes (2.1 MB) copied, 0.101068 s, 20.7 MB/s 
 boot 
36+0 records in 
36+0 records out 
37748736 bytes (38 MB) copied, 3.35426 s, 11.3 MB/s 
Error: Can't have overlapping partitions. (is this normal) 
 creating data partition... 
 
Welcome to fdisk (util-linux 2.25.2). 
Changes will remain in memory only, until you decide to write them. 
Be careful before using the write command. 
 
 
Command (m for help): Partition type 
   p   primary (1 primary, 1 extended, 2 free) 
   l   logical (numbered from 5) 
Select (default p): Partition number (1,4, default 1): First sector (4923393-62333951, default 4925440): Last sector, +sectors or +size{K,M,G,T,P} (4923393-62333951, default 62333951):  
Created a new partition 1 of type 'Linux' and of size 27.4 GiB. 
 
Command (m for help): Partition number (1-3,5-16, default 16): Hex code (type L to list all codes):  
If you have created or modified any DOS 6.x partitions, please see the fdisk documentation for additional information. 
Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'. 
 
Command (m for help): The partition table has been altered. 
Calling ioctl() to re-read partition table. 
Syncing disks. 
 
 
================================================== 
PLEASE REMOVE AND THEN INSERT AGAIN YOUR SD CARD ! (It doesn't stop to let me take the card out) 
================================================== 
 
Restore started: Android_OPI -> /dev/sdf 
 bootloader (vfat) 
 uboot environment 
 kernel&initramfs 
 misc 
 recovery 
 sysrecovery 
 private (vfat) 
 Reserve0 (vfat) 
 klog 
 Reserve1 
 Reserve2 
 Cache (ext4) 
 system (ext4) 
 UDISK - data (ext4) 
 
It does create some of these partitions - well maybe all of them - but I think the /system image is missing...I have managed to create this partition on a smaller 2GB SDCard, but I don't think its big enough for the rest of the script to work.   
 
cfdisk /dev/sdf gives this: 
 
                          Disk: /dev/sdf                                  
              Size: 29.7 GiB, 31914983424 bytes, 62333952 sectors 
                       Label: dos, identifier: 0x00000000 
 
    Device        Boot     Start       End   Sectors   Size  Id Type             
>>  /dev/sdf1            4923393  62333951  57410559  27.4G   c W95 FAT32 (LBA)  
    /dev/sdf2     *        73728    106495     32768    16M   6 FAT16 
    Free space            106496   4923392   4816897   2.3G 
    /dev/sdf3                  1   4923392   4923392   2.4G  85 Linux extended 
    ├─Free space            4096    106496    102401    50M 
    ├─/dev/sdf5           106496    139263     32768    16M  83 Linux 
    ├─/dev/sdf6           139264    172031     32768    16M  83 Linux 
    ├─/dev/sdf7           172032   1744895   1572864   768M  83 Linux 
    ├─/dev/sdf8          1744896   1777663     32768    16M  83 Linux 
    ├─/dev/sdf9          1777664   1843199     65536    32M  83 Linux 
    ├─/dev/sdf10         1843200   3416063   1572864   768M  83 Linux 
    ├─/dev/sdf11         3416064   3448831     32768    16M  83 Linux 
    ├─/dev/sdf12         3448832   3481599     32768    16M  83 Linux 
    ├─/dev/sdf13         3481600   3514367     32768    16M  83 Linux           
    ├─/dev/sdf14         3514368   3579903     65536    32M  83 Linux 
    ├─/dev/sdf15         3579904   3612671     32768    16M  83 Linux            
    └─/dev/sdf16         3612672   4923391   1310720   640M  83 Linux 
     
Any ideas please? 
 
 |   
 
 
 
 |