Jump to content

Executing commands in ADB Shell


Recommended Posts

Guest isambard
Posted

i wanted to try to directly dump a partition from an ADB shell with command:

dd if=/dev/block/mtdblock1 of=/sdcard/adb.img

but get error:

dd: /dev/block/mtdblock1: Input/output error

anyone know how this can be acheived?

Guest Arr Too
Posted
i wanted to try to directly dump a partition from an ADB shell with command:

dd if=/dev/block/mtdblock1 of=/sdcard/adb.img

That's boot, isn't it? Try:

dd if=/dev/mtd/mtd1 of=/sdcard/dump_boot.img bs=4096

(And remember not to use dd to dump the YAFFS2 partitions!)

Guest isambard
Posted
That's boot, isn't it? Try:

dd if=/dev/mtd/mtd1 of=/sdcard/dump_boot.img bs=4096

(And remember not to use dd to dump the YAFFS2 partitions!)

actually - a good point. is there already a tool to make a yaffs2 dump e.g. for /system partition?

Guest isambard
Posted

found something called nandread. will try it out...

Guest isambard
Posted

bleh. why am i bothering? i'll just tar the files.

Posted
actually - a good point. is there already a tool to make a yaffs2 dump e.g. for /system partition?

dd needs a blocksize.

eng builds include a tool called dump_image, but I don't think its in user builds. You should be able to pull a bin from somewhere (its in clockworkmod).

cat works for boot/recovery, but I dont think it will work for the yaffs partitions.

cat /dev/mtd/mtd1ro > /sdcard/boot.img

Guest isambard
Posted

here's what i'm doing for the system partition.

tar -cf - /system/ |lzop > /sdcard/system.tar.lzo

my dd wasn't working because i got the device name wrong. i typed ls /dev/mt* and got the following which always tricks me:

/dev # ls /dev/mt*

mtd0 mtd1 mtd2 mtd3 mtd4 mtd5 mtd6 mtd7

mtd0ro mtd1ro mtd2ro mtd3ro mtd4ro mtd5ro mtd6ro mtd7ro

Guest isambard
Posted

while we're on the subject, can someone explain why this doesn't work:

ls -Ss /system/app > /sdcard/applist.txt

Posted
while we're on the subject, can someone explain why this doesn't work:

ls -Ss /system/app > /sdcard/applist.txt

It works for me. If you're doing it from recovery did you mount system and sdcard first?

Guest isambard
Posted
It works for me. If you're doing it from recovery did you mount system and sdcard first?

hmm. i remapped the ls command to use busybox and for some reason it seems that the busybox ls doesn't produce any output when piped...

Posted
hmm. i remapped the ls command to use busybox and for some reason it seems that the busybox ls doesn't produce any output when piped...

I was using busybox when I tested it.

Guest isambard
Posted
I was using busybox when I tested it.

thanks. what i meant was that i hardlinked ls to the busybox binary. i guess the original was either a standalone exe or linked to toolbox.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.