Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Booting from SD Card? Here's how I did it.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Booting from SD Card? Here's how I did it.

    Go to http://androtab.info/radxa_rock/sdboot/ and get sdboot_rk3188_miniroot.zip

    From this package We will need the parameters.img and the bootloader sdboot_rk3188.img.
    The boot.img, kernel.img and system.img will come from the ROM we what to boot from SD Card.

    initramfs and kernel must be splited from boot.img if they are together. If that is the case please follow these indications: Seperating kernel from boot.img


    Use RK3xxx Firmware Tools by SergioPoverony to unpack and repack the newly splitted boot.img (without the kernel included)


    locate and comment all entries related with rk30xxnand in the init files init.rc and init.rk30board.rc

    #insmod /rk30xxnand_ko.ko

    replace all mount points related to system data and cache pointing to NAND partitions by mount points located on SDCard :

    Code:
    mount ext4 mtd@system /system ....
    by
    Code:
    mount ext4 /dev/block/[B]mmcblk0p3  [/B]/system ....
    Code:
    mount ext4 mtd@userdata /data ....
    by
    Code:
    mount ext4 /dev/block/[B]mmcblk0p5  [/B]/data ....
    Code:
    mount ext4 mtd@cache /cache ....
    by
    Code:
    mount ext4 /dev/block/[B]mmcblk0p8  [/B]/cache ....
    rebuild the new boot.img after these changes and write it to the respective partitions on SDcard

    I adapted this script to create the needed partitions on a 16GB Sdcard and copy the ROM files to the correct partitions acording to the changes described above.:

    Code:
    #!/bin/bash
    
    
    DEVELOPMENT_DIR=..
    SRC_DIR=${DEVELOPMENT_DIR}/temp
    
    
    ANDROID_BOOT_IMAGE=${SRC_DIR}/Android/Image/boot.img
    ANDROID_KERNEL_IMAGE=${SRC_DIR}/Android/Image/kernel.img
    ANDROID_SYSTEM_IMAGE=${SRC_DIR}/Android/Image/system.img
    
    
    lsblk
    
    
    read -p "Enter name of SD card (e.g. /dev/sdi) : " SDCARD
    if [ -z "${SDCARD}" ]; then
        echo "MAKEFILE $0: No device name for SD card entered ... exiting."
        exit
    fi
    echo "$0: Creating a bootable SD card on '${SDCARD}' ..."
    
    
    umount ${SDCARD}* > /dev/null 2>&1
    
    
    # Create a new filesystem on SD card
    echo "$0: Creating new filesystem on SD card ..."
    
    
    echo -e "o\nw" | fdisk ${SDCARD} > /dev/null 2>&1
    echo -e "40,16,c
    ,36,83
    ,1024,83
    ,,5
    ,8192,83
    ,16,83
    ,36,83
    ,125,83
    ,16,83
    ,,83" | sfdisk --in-order -uM ${SDCARD}  > /dev/null 2>&1
    
    
    
    
    # Format partitions
    mkfs.vfat -n loaderp    ${SDCARD}1  > /dev/null 2>&1
    mkfs.ext4 -L bootpart   ${SDCARD}2  > /dev/null 2>&1
    mkfs.ext4 -L system     ${SDCARD}3  > /dev/null 2>&1
    mkfs.ext4 -L data       ${SDCARD}5  > /dev/null 2>&1
    mkfs.ext4 -L misc       ${SDCARD}6  > /dev/null 2>&1
    mkfs.ext4 -L recovery   ${SDCARD}7  > /dev/null 2>&1
    mkfs.ext4 -L cache      ${SDCARD}8  > /dev/null 2>&1
    mkfs.ext4 -L user       ${SDCARD}9  > /dev/null 2>&1
    mkfs.vfat -n SD         ${SDCARD}10 > /dev/null 2>&1
    
    
    SYSTEM_PARTITION="${SDCARD}"3
    DATA_PARTITION="${SDCARD}"5
    CACHE_PARTITION="${SDCARD}"8
    USER_PARTITION="${SDCARD}"9
    
    
    sync
    sync
    echo "$0: New filesystem created on SD card with partitions ${SYSTEM_PARTITION} ${DATA_PARTITION} ${CACHE_PARTITION} ${USER_PARTITION}"
    
    
    #./rkcrc ${SRC_DIR}/Android/parameter parameter.img
    
    
    # Copy bootloader to SD card
    echo "$0: Copying bootloader and kernel to SD card '${SDCARD}' ..."
    echo "BOOT_IMAGE='${ANDROID_BOOT_IMAGE}'"
    echo "KERNEL_IMAGE='${ANDROID_KERNEL_IMAGE}'"
    rm -rf MBR
    dd if=${SDCARD} of=MBR bs=1 count=512 > /dev/null 2>&1
    dd if=sdboot_rk3188.img of=${SDCARD} conv=sync,fsync > /dev/null 2>&1
    dd if=parameter.img of=${SDCARD}conv=sync,fsync seek=$((0x2000+0x0)) > /dev/null 2>&1
    dd if=${ANDROID_KERNEL_IMAGE} of=${SDCARD} conv=sync,fsync seek=$((0x2000+0x4000)) > /dev/null 2>&1
    dd if=${ANDROID_BOOT_IMAGE}  of=${SDCARD} conv=sync,fsync seek=$((0x2000+0xc000)) > /dev/null 2>&1
    dd if=MBR of=${SDCARD} > /dev/null 2>&1
    rm MBR
    sync
    sync
    echo "$0: Bootloader copied to SD card ..."
    
    
    #exit
    
    
    echo "$0: Copying '${ANDROID_SYSTEM_IMAGE}' to Partition '${SYSTEM_PARTITION}' ..."
    
    
    #dd if=${ANDROID_SYSTEM_IMAGE}  of=${SYSTEM_PARTITION} bs=4M 
    #sync
    #sync
    
    
    umount /mnt/sdcard_image /mnt/android_image > /dev/null 2>&1
    
    
    mkdir /mnt/sdcard_image > /dev/null 2>&1
    mkdir /mnt/android_image > /dev/null 2>&1
    
    
    cp "${ANDROID_SYSTEM_IMAGE}" /tmp/system.img
    mount -t ext4 "${SYSTEM_PARTITION}" /mnt/sdcard_image 
    mount -t ext4 /tmp/system.img /mnt/android_image 
    cp -a /mnt/android_image/* /mnt/sdcard_image
    #cp vold.fstab /mnt/sdcard_image/etc
    sync
    sync
    umount /mnt/sdcard_image /mnt/android_image
    rmdir /mnt/sdcard_image /mnt/android_image  > /dev/null 2>&1
    rm /tmp/system.img > /dev/null 2>&1
    
    
    echo "$0: System.img copied to '${SYSTEM_PARTITION}' ..."
    
    
    exit
    Feel free to make your own adaptations.

    My mk809III NAND is dead and not even the MASKROM tricks will make it work again. So, the only way I have to run new ROMs is this way. Maybe these instructions might be useful to others in similar circunstances.


    This procedure works with this ROM MK809III_ update_dongle RK3188T 6210_3.1
    Last edited by blueprint1972; 21 November 2014, 23:55.

    #2
    Maybe I can use this to fix my M9Pro. Does it require linux or do you use windows for this?
    Currently Inactive on Freaktab.com
    I use: MK903V | MELE F10 Deluxe | Roku 3600R
    RIP: MK808b | MK809III | PIPO M9 Pro

    Comment


      #3
      Originally posted by budgetgeek View Post
      Maybe I can use this to fix my M9Pro. Does it require linux or do you use windows for this?
      Hi,

      Most of this procedure is done on Linux. My setup is a Ubuntu 12.03 64 Bit Distro running inside VirtualBox. The only part I run on Windows, is the RK3xxx Firmware Tools for packing and unpacking .img(s). But that's because I'm a bit lazy. This could also be done in Linux of course.

      Comment


        #4
        Attempt to boot from sd a mk918 4.4.2 custom ROM

        Hi,
        I am a newbie in Android, but thanks to Your guide I unpack my boot.img and try to modify it.

        My boot (custom rom Kitkat 4.4.2 for mk918) is quite different from Your:

        In init.rc there are no references to rk30xxnand or mtd@.

        In init.rk30board.rc:
        on property:ro.boot.charger.emmc=1
        mount ext4 /dev/block/platform/emmc/by-name/system /system wait ro noatime nodiratime
        start console
        mount ext4 /dev/block/platform/emmc/by-name/metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc,discard
        start charger

        on property:ro.boot.charger.emmc=0
        insmod /rk30xxnand_ko.ko
        mount ext4 mtd@system /system wait ro noatime nodiratime noauto_da_alloc
        start console
        mount ext4 mtd@metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc
        start charger

        As You can see no reference to /cache or /data partitions, but a reference to /metadata

        In init.rk30board.bootmode.unknown.rc
        on fs
        insmod /rk30xxnand_ko.ko
        # mount mtd partitions
        # mount ext4 mtd@system /system wait ro noatime nodiratime noauto_da_alloc
        # start readahead
        # mount ext4 mtd@metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc
        # mount ext4 mtd@userdata /data wait noatime nodiratime nosuid nodev noauto_da_alloc
        # mount ext4 mtd@cache /cache wait noatime nodiratime nosuid nodev noauto_da_alloc
        mount_all fstab.rk30board
        on property:ro.config.low_ram=true
        swapon_all /fstab.rk30board

        I can choose from a number of parameters file, this is a 2GB userspace example
        FIRMWARE_VER:4.4.2
        MACHINE_MODEL:rk31sdk
        MACHINE_ID:007
        MANUFACTURER:RK30SDK
        MAGIC: 0x5041524B
        ATAG: 0x60000800
        MACHINE: 3066
        CHECK_MASK: 0x80
        KERNEL_IMG: 0x60408000
        #RECOVER_KEY: 1,1,0,20,0
        CMDLINE:console=ttyFIQ0 androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x 00006000@0x00004000(kernel),0x00006000@0x0000a000( boot),0x00010000@0x00010000(recovery),0x00020000@0 x00020000(backup),0x00040000@0x00040000(cache),0x0 0400000@0x00080000(userdata),0x00002000@0x00480000 (metadata),0x00002000@0x00482000(kpanic),0x0018000 0@0x00484000(system),-@0x00604000(user)

        Can I use Your script to partition sd card (Modified as my parameter file) and radxa files for booting my ROM ?

        Partition number start from 0 or from 1, i.e. my userdata partition is mmcblk0p6 or mmcblk0p7 ?

        Thanks in advance

        Originally posted by blueprint1972 View Post
        Go to http://androtab.info/radxa_rock/sdboot/ and get sdboot_rk3188_miniroot.zip

        From this package We will need the parameters.img and the bootloader sdboot_rk3188.img.
        The boot.img, kernel.img and system.img will come from the ROM we what to boot from SD Card.

        initramfs and kernel must be splited from boot.img if they are together. If that is the case please follow these indications: Seperating kernel from boot.img


        Use RK3xxx Firmware Tools by SergioPoverony to unpack and repack the newly splitted boot.img (without the kernel included)


        locate and comment all entries related with rk30xxnand in the init files init.rc and init.rk30board.rc

        #insmod /rk30xxnand_ko.ko

        replace all mount points related to system data and cache pointing to NAND partitions by mount points located on SDCard :

        Code:
        mount ext4 mtd@system /system ....
        by
        Code:
        mount ext4 /dev/block/[B]mmcblk0p3  [/B]/system ....
        Code:
        mount ext4 mtd@userdata /data ....
        by
        Code:
        mount ext4 /dev/block/[B]mmcblk0p5  [/B]/data ....
        Code:
        mount ext4 mtd@cache /cache ....
        by
        Code:
        mount ext4 /dev/block/[B]mmcblk0p8  [/B]/cache ....
        rebuild the new boot.img after these changes and write it to the respective partitions on SDcard

        I adapted this script to create the needed partitions on a 16GB Sdcard and copy the ROM files to the correct partitions acording to the changes described above.:

        Code:
        #!/bin/bash
        
        
        DEVELOPMENT_DIR=..
        SRC_DIR=${DEVELOPMENT_DIR}/temp
        
        
        ANDROID_BOOT_IMAGE=${SRC_DIR}/Android/Image/boot.img
        ANDROID_KERNEL_IMAGE=${SRC_DIR}/Android/Image/kernel.img
        ANDROID_SYSTEM_IMAGE=${SRC_DIR}/Android/Image/system.img
        
        
        lsblk
        
        
        read -p "Enter name of SD card (e.g. /dev/sdi) : " SDCARD
        if [ -z "${SDCARD}" ]; then
            echo "MAKEFILE $0: No device name for SD card entered ... exiting."
            exit
        fi
        echo "$0: Creating a bootable SD card on '${SDCARD}' ..."
        
        
        umount ${SDCARD}* > /dev/null 2>&1
        
        
        # Create a new filesystem on SD card
        echo "$0: Creating new filesystem on SD card ..."
        
        
        echo -e "o\nw" | fdisk ${SDCARD} > /dev/null 2>&1
        echo -e "40,16,c
        ,36,83
        ,1024,83
        ,,5
        ,8192,83
        ,16,83
        ,36,83
        ,125,83
        ,16,83
        ,,83" | sfdisk --in-order -uM ${SDCARD}  > /dev/null 2>&1
        
        
        
        
        # Format partitions
        mkfs.vfat -n loaderp    ${SDCARD}1  > /dev/null 2>&1
        mkfs.ext4 -L bootpart   ${SDCARD}2  > /dev/null 2>&1
        mkfs.ext4 -L system     ${SDCARD}3  > /dev/null 2>&1
        mkfs.ext4 -L data       ${SDCARD}5  > /dev/null 2>&1
        mkfs.ext4 -L misc       ${SDCARD}6  > /dev/null 2>&1
        mkfs.ext4 -L recovery   ${SDCARD}7  > /dev/null 2>&1
        mkfs.ext4 -L cache      ${SDCARD}8  > /dev/null 2>&1
        mkfs.ext4 -L user       ${SDCARD}9  > /dev/null 2>&1
        mkfs.vfat -n SD         ${SDCARD}10 > /dev/null 2>&1
        
        
        SYSTEM_PARTITION="${SDCARD}"3
        DATA_PARTITION="${SDCARD}"5
        CACHE_PARTITION="${SDCARD}"8
        USER_PARTITION="${SDCARD}"9
        
        
        sync
        sync
        echo "$0: New filesystem created on SD card with partitions ${SYSTEM_PARTITION} ${DATA_PARTITION} ${CACHE_PARTITION} ${USER_PARTITION}"
        
        
        #./rkcrc ${SRC_DIR}/Android/parameter parameter.img
        
        
        # Copy bootloader to SD card
        echo "$0: Copying bootloader and kernel to SD card '${SDCARD}' ..."
        echo "BOOT_IMAGE='${ANDROID_BOOT_IMAGE}'"
        echo "KERNEL_IMAGE='${ANDROID_KERNEL_IMAGE}'"
        rm -rf MBR
        dd if=${SDCARD} of=MBR bs=1 count=512 > /dev/null 2>&1
        dd if=sdboot_rk3188.img of=${SDCARD} conv=sync,fsync > /dev/null 2>&1
        dd if=parameter.img of=${SDCARD}conv=sync,fsync seek=$((0x2000+0x0)) > /dev/null 2>&1
        dd if=${ANDROID_KERNEL_IMAGE} of=${SDCARD} conv=sync,fsync seek=$((0x2000+0x4000)) > /dev/null 2>&1
        dd if=${ANDROID_BOOT_IMAGE}  of=${SDCARD} conv=sync,fsync seek=$((0x2000+0xc000)) > /dev/null 2>&1
        dd if=MBR of=${SDCARD} > /dev/null 2>&1
        rm MBR
        sync
        sync
        echo "$0: Bootloader copied to SD card ..."
        
        
        #exit
        
        
        echo "$0: Copying '${ANDROID_SYSTEM_IMAGE}' to Partition '${SYSTEM_PARTITION}' ..."
        
        
        #dd if=${ANDROID_SYSTEM_IMAGE}  of=${SYSTEM_PARTITION} bs=4M 
        #sync
        #sync
        
        
        umount /mnt/sdcard_image /mnt/android_image > /dev/null 2>&1
        
        
        mkdir /mnt/sdcard_image > /dev/null 2>&1
        mkdir /mnt/android_image > /dev/null 2>&1
        
        
        cp "${ANDROID_SYSTEM_IMAGE}" /tmp/system.img
        mount -t ext4 "${SYSTEM_PARTITION}" /mnt/sdcard_image 
        mount -t ext4 /tmp/system.img /mnt/android_image 
        cp -a /mnt/android_image/* /mnt/sdcard_image
        #cp vold.fstab /mnt/sdcard_image/etc
        sync
        sync
        umount /mnt/sdcard_image /mnt/android_image
        rmdir /mnt/sdcard_image /mnt/android_image  > /dev/null 2>&1
        rm /tmp/system.img > /dev/null 2>&1
        
        
        echo "$0: System.img copied to '${SYSTEM_PARTITION}' ..."
        
        
        exit
        Feel free to make your own adaptations.

        My mk809III NAND is dead and not even the MASKROM tricks will make it work again. So, the only way I have to run new ROMs is this way. Maybe these instructions might be useful to others in similar circunstances.


        This procedure works with this ROM MK809III_ update_dongle RK3188T 6210_3.1

        Comment


          #5
          It works with KitKat too

          Originally posted by pirmar View Post
          Hi,
          I am a newbie in Android, but thanks to Your guide I unpack my boot.img and try to modify it.

          My boot (custom rom Kitkat 4.4.2 for mk918) is quite different from Your:

          In init.rc there are no references to rk30xxnand or mtd@.


          ....
          Hi,

          I'm a newbie too, I just compiled information dispersed arround regarding this subject, out of necessity because my device, a some kind of MK890III clone, is hard bricked (NAND is dead for sure)

          This procedure also works for KitKat too. In fact it is easyer since all relevant mount points are located in these files:
          fstab.rk30board.bootmode.emmc
          and
          fstab.rk30board.bootmode.unknown
          In my case I just need to change the fstab.rk30board.bootmode.unknown but to make sure I change both with exactly the same content. Something like this:


          Code:
          /dev/block/mmcblk0p3                  /system             ext4      ro,noatime,nodiratime,noauto_da_alloc                            wait,resize
          /dev/block/mmcblk0p8                  /cache              ext4      noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard          wait
          /dev/block/mmcblk0p7                  /metadata           ext4      noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard          wait
          /dev/block/mmcblk0p5                  /data               ext4      noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard          wait,encryptable=/metadata/key_file
          
          
          /dev/block/mmcblk0p9                 /mnt/internal_sd     vfat      defaults        voldmanaged=internal_sd:auto,noemulatedsd
          /devices/platform/rk29_sdmmc.1/mmc_host/mmc    /mnt/external_sd     vfat      defaults        voldmanaged=external_sd:auto
          /devices/platform/usb20               /mnt/usb_storage/USB_DISK0     vfat      defaults        voldmanaged=usb_storage:auto
          /devices/platform/usb20               /mnt/usb_storage/USB_DISK1     vfat      defaults        voldmanaged=usb_storage:auto
          /devices/platform/usb20               /mnt/usb_storage/USB_DISK2     vfat      defaults        voldmanaged=usb_storage:auto
          /devices/platform/usb20               /mnt/usb_storage/USB_DISK3     vfat      defaults        voldmanaged=usb_storage:auto
          /devices/platform/usb20               /mnt/usb_storage/USB_DISK4     vfat      defaults        voldmanaged=usb_storage:auto
          /devices/platform/usb20               /mnt/usb_storage/USB_DISK5     vfat      defaults        voldmanaged=usb_storage:auto
          Please note that the script I gave as example creates more partitions than the ones that are really needed, and in this example for KitKat case I assigned the metadata partition to mmcblk0p7 originally meant to accommodate the recovery image. I don't know exactly what the size for this partition should be but from my first test it seems that KK is happy with it.

          Anyway, for KK you should need at least 5 partitions for:
          • around 700MB for system
          • 4; 8 or 10GB for data (you choose.... I have 8GB)
          • 125 MB for cache
          • 36 MB for metadata
          • and a fat32 partition with the remaining space on SD card for internal storage (where android stores e.g. downloaded files from internet)


          Now, looking at your parameters file...

          mtd@system partition is
          0x00180000@0x00484000(system)

          the size of the partition on SD Card that will accomodate the system.img must be:
          0x180000 (hex) * 512 (dec) =
          805306368 bytes = 786432 KB = 768 MB

          mtd@data partition is 0400000@0x00080000(userdata)
          0x400000 (hex) * 512 / 1024 /1024 = 2048 MB

          mtd@cache is
          0x00040000@0x00040000(cache)
          0x40000 (hex) * 512 / 1024 /1024 = 128 MB

          mtd@metadata is
          0x00002000@0x00480000 (metadata)
          0x2000 (hex) * 512 / 1024 /1024 = 4 MB

          Now that we have to correct sizes according your original parameters file we can change the part of my script that formats the sd card to create only the needed partitions with the correct sizes:

          Code:
          ...
          
          echo -e "o\nw" | fdisk ${SDCARD} > /dev/null 2>&1
          echo -e "40,[B]768[/B],83
          ,[B]2048[/B],83
          ,[B]128[/B],83
          ,,5
          ,[B]4[/B],83
          ,,c" | sfdisk --in-order -uM ${SDCARD}  > /dev/null 2>&1
          how should we read this bit of code:

          First partition starts at 40 MB of raw space in SD Card. (these initial 40MB will be used to store the MBR, parameter.img, boot.img and kernel.img)

          First ext4 partition starts at 40MB and has the size of 768 MB for system.img (mmcblk0p1)
          ... follows one ext4 partition of 2048 MB for data (mmcblk0p2)
          ... follows one ext4 partition of 128 MB for cache (mmcblk0p3)
          ... follows an extended partition (mmcblk0p4 - we need to create this extended partition otherwise we would be limited to only four)
          ... follows an ext4 partition of 4 MB for metadata (mmcblk0p5)
          .... and the remaining space on sdcard will be used as a FAT32 partition (mmcblkp6)


          so now we should format our partitions like this:

          Code:
          # Format partitions
          mkfs.ext4 -L system     ${SDCARD}1  > /dev/null 2>&1
          mkfs.ext4 -L data       ${SDCARD}2  > /dev/null 2>&1
          mkfs.ext4 -L cache      ${SDCARD}3  > /dev/null 2>&1
          mkfs.ext4 -L metadata      ${SDCARD}5  > /dev/null 2>&1
          mkfs.vfat -n user         ${SDCARD}6  > /dev/null 2>&1
          and our fstab.rk30board.bootmode.unknown should look like this:
          Code:
          /dev/block/[B]mmcblk0p1[/B]                  /system             ext4      ro,noatime,nodiratime,noauto_da_alloc                            wait,resize
          /dev/block/[B]mmcblk0p3[/B]                  /cache              ext4      noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard          wait
          /dev/block/[B]mmcblk0p5[/B]                  /metadata           ext4      noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard          wait
          /dev/block/[B]mmcblk0p2[/B]                  /data               ext4      noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard          wait,encryptable=/metadata/key_file
          
          
          /dev/block/[B]mmcblk0p6[/B]                 /mnt/internal_sd     vfat      defaults        voldmanaged=internal_sd:auto,noemulatedsd
          /devices/platform/rk29_sdmmc.1/mmc_host/mmc    /mnt/external_sd     vfat      defaults        voldmanaged=external_sd:auto
          /devices/platform/usb20               /mnt/usb_storage/USB_DISK0     vfat      defaults        voldmanaged=usb_storage:auto
          /devices/platform/usb20               /mnt/usb_storage/USB_DISK1     vfat      defaults        voldmanaged=usb_storage:auto
          /devices/platform/usb20               /mnt/usb_storage/USB_DISK2     vfat      defaults        voldmanaged=usb_storage:auto
          /devices/platform/usb20               /mnt/usb_storage/USB_DISK3     vfat      defaults        voldmanaged=usb_storage:auto
          /devices/platform/usb20               /mnt/usb_storage/USB_DISK4     vfat      defaults        voldmanaged=usb_storage:auto
          /devices/platform/usb20               /mnt/usb_storage/USB_DISK5     vfat      defaults        voldmanaged=usb_storage:auto
          This procedure works for example with this Neomode Custom Rom MK809III Version 3.1 Android 4.4.2 *Update*


          Here's an attach with a modified boot.img for this neomode rom and the sdcard script already adapted with the changes described in this post.
          sdboot.zip

          And here's a picture of this ROM running on my device:
          Click image for larger version

Name:	WP_20141124_001.jpg
Views:	1
Size:	123.1 KB
ID:	435381

          As said, I'm using this procedure because my NAND is dead but it is also great for those who want to spare their NAND from too much burning and for those who what to play around with alternative ROMs but keep their original firmware.

          Please feel free to adapt the script as you need and give some feedback about your progress.

          Comment


            #6
            thanks blueprint72

            when my 32gb card will arrive i 'll try it.

            Comment


              #7
              Originally posted by pirmar View Post
              thanks blueprint72

              when my 32gb card will arrive i 'll try it.
              Or you could try this - see http://www.freaktab.com/showthread.p...M-from-SD-card

              Comment


                #8
                Hello, I have not been able to create for my mk809iii sd not use ubuntu and it seems I'm very clumsy, you could put the image to download sd already created, it is possible ?, thanks

                Comment


                  #9
                  Hello blueprint1972,

                  I have a MEMOPAD Tablette ME102A. The NAND is bad, read-only. Il would like to boot android from SDCARD. I need some help with my parameter file.

                  Just, i can't boot with miniroot ... nothing is LCD Output. I think miniroot get output from HDMI, not LCD.

                  The only way for me :

                  http://files.androtab.info/rockchip/...oot-rk3066.zip (u-boot binary)

                  I must do:

                  # flash IDB sector 0
                  dd if=idb_sector_0.enc of=/dev/sdb conv=sync,fsync seek=64

                  # flash IDB sector 1
                  dd if=idb_sector_1 of=/dev/sdb conv=sync,fsync seek=65

                  # flash DDR blob
                  dd if=FlashData.bin of=/dev/sdb conv=sync,fsync seek=68

                  # flash U-Boot
                  dd if=FlashBoot.bin of=/dev/sdb conv=sync,fsync seek=100
                  At this time, ME102A can boot into Rockchip USB Loader

                  Then i can flash clockworkmod.img, kernel.img, boot.img parameter file and cwm_misc.img with upgrade_tool or rkandroidtools.

                  THEN => i can boot into Clockworkmod from sdcard. If i remove sdcard, i get Stock recovery and rkandroidtools don't work any more (download failed).


                  I can modifiy boot.img without any problem, build it, and flash it. but i need help with parameter file.

                  Here is my original parameter file :

                  FIRMWARE_VER:4.1.1
                  MACHINE_MODEL:rk30sdk
                  MACHINE_ID:007
                  MANUFACTURER:RK30SDK
                  MAGIC: 0x5041524B
                  ATAG: 0x60000800
                  MACHINE: 3066
                  CHECK_MASK: 0x80
                  KERNEL_IMG: 0x60408000
                  #RECOVER_KEY: 1,1,0,20,0
                  CMDLINE:console=ttyFIQ0 androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x 00004000@0x00004000(kernel),0x00008000@0x00008000( boot),0x00010000@0x00010000(recovery),0x00020000@0 x00020000(backup),0x00300000@0x00040000(system),0x 000FC000@0x00340000(cache),0x00004000@0x0043C000(a df),0x00100000@0x00440000(apd),0x00002000@0x005400 00(kpanic),0x00002000@0x00542000(hidden),-@0x00544000(userdata)
                  With my method, on adb shell i have :

                  mmcblk0 (NAND) with all => mmcblk0p1 p2 p3 p4 p5 p6 ... to p13.
                  mmcblk1 (SDCARD) with only mmcblk1p1 => i can mount it by "ls" give me a list for file with bizarre charactere ?

                  I think i must mixte my method and your and i can boot android from sdcard ? But i need help with you

                  echo -e "o\nw" | fdisk ${SDCARD} > /dev/null 2>&1
                  echo -e "40,16,c
                  ,36,83
                  ,1024,83
                  ,,5
                  ,8192,83
                  ,16,83
                  ,36,83
                  ,125,83
                  ,16,83
                  ,,83" | sfdisk --in-order -uM ${SDCARD} > /dev/null 2>&1
                  Thanks in advance if you could help me ?

                  Comment


                    #10
                    So, i have boot with a mixte of your solution and my own one. Android is booting but there is no sound, and so tactile ?

                    Comment

                    Working...
                    X