Easy Way to Edit script.bin in NAND Android Image?

4,893 views
Skip to first unread message

George Ioakimedes

unread,
Jan 22, 2013, 10:08:11 PM1/22/13
to cubie...@googlegroups.com
I'm trying to do some testing and looking for an easy way to test different configurations out quickly and easily. I can do this easily when I create a Linux install on the SD Card but that takes a long time to boot and is slow.

How can I access the script.bin file so I can download it on my development machine, use bin2fex, edit the file, then fex2bin, and finally transfer it back into the NAND?

Lawrence Sheed

unread,
Jan 23, 2013, 12:24:50 AM1/23/13
to cubie...@googlegroups.com
George, I think the best way for fast testing is to use NFS rather than flash the NAND or write to SD each time.
There was a thread on that already.

To access the script.bin on the NAND, you need to mount the boot partition on the NAND, copy the file elsewhere ( or edit / decompile in situ)., then put back on the NAND.



Lawrence Sheed

COMPUTER SOLUTIONS
Room 401-402 Han Wen Xuan Building 2
No.14, 955 Yan An Middle Road 
Shanghai China 200040


Tel:
       +86 400 820 0919
Fax:      +86 21 62890700
Mobile:  +86 13901 802 269
Skype:  computersolutions.cn

On 23 Jan 2013, at 11:08 AM, George Ioakimedes <georg...@gmail.com> wrote:

I'm trying to do some testing and looking for an easy way to test different configurations out quickly and easily. I can do this easily when I create a Linux install on the SD Card but that takes a long time to boot and is slow.

How can I access the script.bin file so I can download it on my development machine, use bin2fex, edit the file, then fex2bin, and finally transfer it back into the NAND?


--
You received this message because you are subscribed to the Google Groups "Cubieboard" group.
To unsubscribe from this group, send email to cubieboard+...@googlegroups.com.
Visit this group at http://groups.google.com/group/cubieboard?hl=en.
 
 

Kaspter Ju

unread,
Jan 23, 2013, 1:45:44 AM1/23/13
to George Ioakimedes, cubie...@googlegroups.com
Hi George,

I use this script update sys_config file only. Maybe It can help you.

sys_config()
{
printf "update sys_config ....\n"
PACK_DIR=${CUR_DIR}/lichee/tools/pack
cd $PACK_DIR/out/

cd $PACK_DIR/chips/sun4i/configs/crane/${1}
$PACK_DIR/pctools/linux/mod_update/script sys_config.fex
$PACK_DIR/pctools/linux/mod_update/script sys_config1.fex

#ls
#adb shell mount -o remount,rw /system
#adb shell mount -o remount,rw /

adb shell mkdir /mnt/sdcard/kernel
adb shell mount -t vfat /dev/block/nanda /mnt/sdcard/kernel
adb push sys_config.bin /mnt/sdcard/kernel/script0.bin
adb push sys_config1.bin /mnt/sdcard/kernel/script.bin

adb shell sync
#read -p "wait reboot..."

adb shell reboot
cd $CUR_DIR
}


--
Kaspter Ju

George Ioakimedes

unread,
Jan 23, 2013, 7:36:46 PM1/23/13
to cubie...@googlegroups.com, George Ioakimedes
Hi Kasper:

Do you run this in a shell on the Cubie (or SSH into the Cubie)? Do you need the Android SDK to run this?

vasu devan

unread,
Apr 26, 2013, 2:15:15 AM4/26/13
to cubie...@googlegroups.com
  $adb shell
   mkdir /mnt/tmp
   mount -t vfat /dev/block/nanda /mnt/tmp
   exit

   $adb pull /mnt/tmp/script.bin
  
convert script.bin to script.fex with the help of windows program "fexc.7Z" ( If u need i will send it to ur email id)
   
 
In Windows cmd prompt:

   copy script.bin script0.bin
   $adb push script.bin /mnt/tmp
   $adb push script0.bin /mnt/tmp
   
   $adb shell
    busybox umount /mnt/tmp
    exit

Patrick Wood

unread,
Apr 26, 2013, 9:45:39 AM4/26/13
to cubie...@googlegroups.com
Adb is an SDK command on Linux and windows. This code would need to be run on Linux.
Reply all
Reply to author
Forward
0 new messages