EDIT: March 18th, 2012: See note at bottom regarding upgrade to Honeycomb with CWM installed.
Clockworkmod recovery for the Vizio VTAB1008
As promised here it is.
Use this carefully. Any wrong commands can potentially brick your system
I was able to port Clockwork Mod Recovery to the Vizio and boot into it.
Many thanks to fadefx for testing it.
The zip file is attached to this post. Please unzip and read the instructions in README.txt. It is also given below. Please also read the Caveats below.
### Here is Clockworkmod Recovery for the Vizio VTAB1008 ###
### Released on Dec 11th, 2011 -- rprr ###
### Based on cyanogenmod sources and with some ###
### Vizio VTAB1008 specific mods ###
### Requirements ###
### You need 'adb' access on a rooted device Vizio tablet ###
### AN EXTERNAL MICRO SDCARD MUST BE PRESENT IN ORDER TO ###
### MAKE AND RESTORE BACKUPS. ###
### Installation ###
### The following copies the file to the root of your sdcard ###
adb push recovery-cwm-vtab1008.img /sdcard/recovery-cwm-vtab1008.img
### Login to adb shell ###
adb shell
### Become root ###
su
### The following installs CWM to the recovery partition ###
### Make sure to not make any mistakes here ###
dd if=/sdcard/recovery-cwm-vtab1008.img of=/dev/block/mmcblk0p5 bs=512
### Logout as root ###
exit
### Exit adb ###
exit
### Reboot into recovery ###
### ENJOY !!!! Be careful. ###
### Exercise caution when using this. ###
Click to expand...
Click to collapse
CAVEATS:
Display is in landscape mode only
Cannot restore the kernel and ramdisk backups yet
No ROM manager support yet
Also the edifying scripting has some issues with the mount command. Any commands that begin with
mount(.........)
Click to expand...
Click to collapse
should be replaced as in the following example
run_program("/sbin/busybox", "mount", "/system");
Click to expand...
Click to collapse
Original Recovery
WARNING IF YOU WANT TO UPGRADE to Honeycomb:
Some of us including me have had problems when we attempted to upgrade to Honeycomb with CWM installed. This has resulted in non working devices. It maybe due to CWM. If so, it is possible that you may have to revert back to the stock recovery. I am attaching it to this post. You have to unzip it, move it to the sdcard and then install it. Remember that root will be lost if you follow this.
Code:
dd if=/sdcard/recovery-orig.img of=/dev/block/mmcblk0p5 bs=512
I don't think the bootloader is located on /sdcard/ this partition is fat formatted and the bootloader would be visible to the user in some way either through a filenrowser or when mounted to a windows machine.
FadeFx said:
I don't think the bootloader is located on /sdcard/ this partition is fat formatted and the bootloader would be visible to the user in some way either through a filenrowser or when mounted to a windows machine.
Click to expand...
Click to collapse
Thanks. Using the mmls tool from Ubuntu, I was able to dig up a little further to find unallocated partitions etc. Here is the list.
$ mmls -t gpt mmcblk0.img
GUID Partition Table (EFI)
Offset Sector: 0
Units are in 512-byte sectors
Slot Start End Length Description
00: Meta 0000000000 0000000000 0000000001 Safety Table
01: ----- 0000000000 0000015359 0000015360 Unallocated
02: Meta 0000000001 0000000001 0000000001 GPT Header
03: Meta 0000000002 0000000033 0000000032 Partition Table
04: 11 0000015360 0000017407 0000002048 sm0
05: ----- 0000017408 0000019455 0000002048 Unallocated
06: 07 0000019456 0000035839 0000016384 kernel
07: 00 0000035840 0000052223 0000016384 ramdisk
08: 01 0000052224 0000502783 0000450560 android_system
09: ----- 0000502784 0000666623 0000163840 Unallocated
10: 02 0000666624 0002239487 0001572864 android_data
11: 08 0002239488 0002255871 0000016384 reckernel
12: 04 0002255872 0002272255 0000016384 recovery
13: 05 0002272256 0002273279 0000001024 misc
14: 09 0002273280 0002277375 0000004096 uli_r
15: 10 0002277376 0002281471 0000004096 uli_w
16: 12 0002281472 0002285567 0000004096 HDCP
17: 06 0002285568 0002695167 0000409600 cache
18: 03 0002695168 0007729083 0005033916 mass_storage
19: ----- 0007729084 0007729151 0000000068 Unallocated
Click to expand...
Click to collapse
So far, I have tried various hacks but just cannot get CWM to run on this However, if you are good with Linux/Unix command line stuff and with adb it is possible to make backups of the various partitions. Thus far, I have backed up and restored the recovery partition successfully. This is obviously a very dicey thing to do as it is possible to brick this device.
rprr said:
So far, I have tried various hacks but just cannot get CWM to run on this However, if you are good with Linux/Unix command line stuff and with adb it is possible to make backups of the various partitions. Thus far, I have backed up and restored the recovery partition successfully. This is obviously a very dicey thing to do as it is possible to brick this device.
Click to expand...
Click to collapse
well is there any way we can just modify the existing recovery menu?
plus you did get adb to work with it but that was a simple fix
In order to change the options you have to build the recovery program from the Android source code.
Good Morning! Just a quick note to say thanks for working on this! Keep going...I think you can, I think you can, I can think you can etc etc etc. hahaha
Rprr, i think you have to specify the partition reckernel somewhere in board config as it seams the recovery has its own kernel there and it needs to know where it is located.
Edit: finally obtained root using a win7 64bit machine, pdanet drivers and d00ml0rd v3 and adb files from sdk.
----------------------------------------
tapatalked
Obsolete: Please see OP.
Still no luck with CWM port. Anyway, here is my method for enabling adb when in recovery. This requires linux/unix terminal line usage. On my VTAB the recovery partition is at /dev/block/mmcblk0p5. I assume that this is the case with all Vizio vtab1008 tablets.
Proceed carefully. You can potentially damage your device.
1. Quick Way
Download my recovery-new.img.zip file which is attached to this post and unzip it. You will have a file called "recovery-new.img". Copy this to your sdcard. Then open an adb shell and become root. Run the following command.
Code:
dd if=/sdcard/recovery-new.img of=/dev/block/mmcblk0p5 bs=512
Now reboot into recovery. You will have adb access.
2. Long Way for DIYers
On VTAB using adb as root:
Code:
dd if=/dev/block/mmcblk0p5 of=/sdcard/recovery.img bs=512
On my Mac (in terminal), Should work on linux as well:
Code:
adb pull /sdcard/recovery.img
cp recovery.img recovery.cpio.gz
gunzip -f recovery.cpio.gz
mkdir recovery
cd recovery
cpio -i -F ../recovery.cpio
Edit the 'default.prop' to make the needed changes. It should look like.
Code:
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=1
On my Mac again:
Code:
cpio -i -t -F ../recovery.cpio | cpio -o -H newc -O ../recovery-new.cpio
cd ..
gzip recovery-new.cpio
dd if=/dev/zero of=recovery-new.img count=16384 bs=512
dd if=recovery-new.cpio.gz of=recovery-new.img conv=notrunc
adb push recovery-new.img /sdcard/recovery-new.img
On Vizio using adb as root:
Code:
dd if=/sdcard/recovery-new.img of=/dev/block/mmcblk0p5 bs=512
Now reboot VTAB into Recovery mode. You should have adb access.
PS: If you have made any mistakes, you can reflash the original recovery.
Code:
dd if=/sdcard/recovery-orig.img of=/dev/block/mmcblk0p5 bs=512
PPS: Once you have adb root shell access in recovery, you can backup and potentially restore the /system partition.
PPPS: I am also attaching the original recovery if you would like to flash it back using dd. It is called recovery-orig.img.zip. Please unzip it.
rprr said:
Still no luck with CWM port. Anyway, here is my method for enabling adb when in recovery. This requires linux/unix terminal line usage.
Proceed carefully. You can potentially damage your device.
On VTAB using adb as root:
Code:
dd if=/dev/block/mmcblk0p5 of=/sdcard/recovery.img bs=512
On my Mac (in terminal), Should work on linux as well:
Code:
adb pull /sdcard/recovery.img
cp recovery.img recovery.cpio.gz
gunzip -f recovery.cpio.gz
mkdir recovery
cd recovery
cpio -i -F ../recovery.cpio
Edit the 'default.prop' to make the needed changes. It should look like.
Code:
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=1
On my Mac again:
Code:
cpio -i -t -F ../recovery.cpio | cpio -o -H newc -O ../recovery-new.cpio
cd ..
gzip recovery-new.cpio
dd if=/dev/zero of=recovery-new.img count=16384 bs=512
dd if=recovery-new.cpio.gz of=recovery-new.img conv=notrunc
adb push recovery-new.img /sdcard/recovery-new.img
On Vizio using adb as root:
Code:
dd if=/sdcard/recovery-new.img of=/dev/block/mmcblk0p5 bs=512
Now reboot VTAB into Recovery mode. You should have adb access.
PS: If you have made any mistakes, you can reflash the original recovery.
Code:
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p5 bs=512
PPS: Once you have adb root shell access in recovery, you can backup and potentially restore the /system partition.
PPPS: I am attaching my recovery-new.img. It is in zip format.
Click to expand...
Click to collapse
great tutorial i will give it a try, it would be nice if someone could do this and backup the system partition on a new vtab that way if something goes wrong you can reflash it
additional thoughts could this lead to rom porting as well http://android.modaco.com/topic/348695-guide-how-to-port-a-rom/
dylanparrish said:
great tutorial i will give it a try, it would be nice if someone could do this and backup the system partition on a new vtab that way if something goes wrong you can reflash it
Click to expand...
Click to collapse
Users cannot modify the system partition. Therefore the only difference between a new system partition and after rooting should be the root that were installed such as su, busybox etc.
PS: I assume that all Vizio tablets have the same partition structure with an 8MB recovery partition at /dev/block/mmcblk0p5.
rprr said:
Users cannot modify the system partition. Therefore the only difference between a new system partition and after rooting should be the root that were installed such as su, busybox etc.
PS: I assume that all Vizio tablets have the same partition structure with an 8MB recovery partition at /dev/block/mmcblk0p5.
Click to expand...
Click to collapse
But after root one can modify /system and thus brick the device. If wed have a backup we can dd it back while in recovery mode.
Yes, since there is only one vizio tablet model, all have the same partition layout.
----------------------------------------
tapatalked
Obsolete. Please see OP.
HOWTO: Backup/Recovery of /system using command line tools.
Once you have adb working in recovery mode this is what you can do to backup and recover your /system partition.
### Backup Procedure ###
Boot into recovery mode.
Code:
adb shell
You will get the following error. Ignore it.
Code:
sh: getcwd: No such file or directory
Now do the following. Assumes internal sdcard at mmcblk0p4 and /system at mmcblk0p2
Code:
cd /
mount -o rw -t vfat /dev/block/mmcblk0p4 /sdcard
dd if=/dev/block/mmcblk0p2 of=/sdcard/system.img bs=4096
The system.img file contains a backup of the /system. In principle one can recover from this.
### Recovery Procedure ###
Reboot into recovery.
Code:
adb shell
cd /
mount -o rw -t vfat /dev/block/mmcblk0p4 /sdcard
dd if=/sdcard/system.img of=/dev/block/mmcblk0p2 bs=4096
Reboot into normal mode.
I have not yet had a need to do the recovery part yet so that has not been tested by me.
HTH.
Linked in my howto thread...
----------------------------------------
tapatalked
I have not been able to get this to work. After booting into recovery my win7 sees the vtab as usb storage and not usb composite. I guess this is whats causing ADB to not see it as a device. Any suggestions?
grekco said:
I have not been able to get this to work. After booting into recovery my win7 sees the vtab as usb storage and not usb composite. I guess this is whats causing ADB to not see it as a device. Any suggestions?
Click to expand...
Click to collapse
I have been using a Mac. I don't know what would be causing this issue on Windows. In my situation I need to restart adb.
Good work as always rprr and fade... appreciate the time u guys are putting into this tab, i'm always checking the threads for updates.
error: device not found.
My computer says its connect and ready but adb not recognizing it. Any ideal?
abtxpress said:
error: device not found.
My computer says its connect and ready but adb not recognizing it. Any ideal?
Click to expand...
Click to collapse
Can you try "adb kill-server" followed by "adb start-server" before connecting the device? Then connect the device and do "adb devices".
Unfortunately I don't have easy access to a Windows machine.
Edit: I wonder if the Windows drivers required are different depending on whether one is accessing adb through recovery mode when compared to normal mode.
Update on CWM: Still no luck with CWM porting.
But,
I decided to go back to the android stock source source code for 2.3.2 which is on the Vizio tablet. This time I was able to build the recovery binary and then copy it to the recovery partition. I was able to get this to run but the graphics is all distorted in the following way.
1) I see 4 exclamation symbols in landscape mode and 2 recovery menus (see pic)
2) It does not respond to the volume buttons + power button
I am guessing that there are frame buffer issues + input issues.
Related
I'm trying to find an universal way to read userdata partition(dump partition) without rooting the device.
Assumption :
the device can be boot in fastboot mode
Possible ways :
1. Using fastboot
I've looked into fastboot.c, it taking usb as a usb_handle pointer. I'm trying to move from that point. Fastboot is mostly to write or erase, but I assumed if writing and erasing are possible, reading should be possible as well.
2. Using nvflash, tftp...
It won't be the solution, since it's chip dependent but using chip vendor's download tool to dump partitions.
Go for it!
How does using adb dumping from /dev/mmcblk0p1 sounds?
can I unmount mmcblk0p1, and mount back to readable position?
what device? more info please.
dd if=dev/mmcblk0p? of=data.img bs= 8096 is usually the easiest. (<--just an example)
also this may be helpful:
http://forum.xda-developers.com/showthread.php?t=1247908
chrisrotolo said:
what device? more info please.
dd if=dev/mmcblk0p? of=data.img bs= 8096 is usually the easiest. (<--just an example)
also this may be helpful:
http://forum.xda-developers.com/showthread.php?t=1247908
Click to expand...
Click to collapse
Thanks for the link. using dd command is the exact way I used to dump mmc block as root. Or can it be run under not-rooted phones?
Rooting depends on the kernel version of devices, so when I have to dump various phones, it's very cumbersome to root different kinds of devices and dump.
So I'm finding a way to walk around the problem by using fastboot or if possible adb.
I think fastboot is my best bet so far.
How about adb?
adb shell
df -h
kkiqq1208 said:
How about adb?
adb shell
df -h
Click to expand...
Click to collapse
df -h will only show usage of storage medias. Is there anyway I can read off the actual data?
As already mentioned, dd, but via ADB. I believe that it functions at a low enough level that you should be able to dump mmcblk0 without having to be rooted. If dd can't be directly accessed via adb, you could extract a busybox install from a rooted phone and set it up in your adb directory and then run it from there with busybox (in theory).
Волк said:
As already mentioned, dd, but via ADB. I believe that it functions at a low enough level that you should be able to dump mmcblk0 without having to be rooted. If dd can't be directly accessed via adb, you could extract a busybox install from a rooted phone and set it up in your adb directory and then run it from there with busybox (in theory).
Click to expand...
Click to collapse
Question.
Feels like i'm on the different page from you. If i run dd for /dev/mmcblk0 it does give me an error message saying "Access Denied" of couse mmcblk0 is owned by root. And busybox too(I haven;t tried this), it's just a set of linux commnads, I'm not sure how it can access a file(in this case, a device) which does not have its ownership.
Please correct me if I'm wrong.
Hi All,
There is a way to dump any partition to SD card partition on unrooted device vi ADB.
Paste this couple of lines into the terminal :
adb kill-server
adb wait-for-device
adb shell "echo ro.kernel.qemu=1 > /data/local.prop"
adb reboot
adb wait-for-device
adb shell "mount -wo remount rootfs /"
adb shell "rm /data/local.prop"
adb shell dd if=/dev/block/mmcblk0p1 of=/sdcard/mmcp1.dump
The phone may reboot many time after that, so make sure the file /data/local.prop is deleted after this operation. or execute this :
adb reboot
adb wait-for-device
adb shell "rm /data/local.prop"
adb reboot
hope that helps
__________________
HTC One X (SFR)
Wissam said:
Hi All,
There is a way to dump any partition to SD card partition on unrooted device vi ADB.
Paste this couple of lines into the terminal :
adb kill-server
adb wait-for-device
adb shell "echo ro.kernel.qemu=1 > /data/local.prop"
adb reboot
adb wait-for-device
adb shell "mount -wo remount rootfs /"
adb shell "rm /data/local.prop"
adb shell dd if=/dev/block/mmcblk0p1 of=/sdcard/mmcp1.dump
The phone may reboot many time after that, so make sure the file /data/local.prop is deleted after this operation. or execute this :
adb reboot
adb wait-for-device
adb shell "rm /data/local.prop"
adb reboot
hope that helps
__________________
HTC One X (SFR)
Click to expand...
Click to collapse
Has anyone verified if this works for reading partitions on a non-rooted phone?
This doesn't work on an unrooted, locked device.
Code:
C:\Windows\System32>adb shell "echo ro.kernel.qemu=1 > /data/local.prop"
/system/bin/sh: can't create /data/local.prop: Permission denied
This did not work for my phone.
I got "permission denied" right after
adb shell "echo ro.kernel.qemu=1 > /data/local.prop"
Most of the above will only work on a rooted device with superuser.
The loop holes for shadow copies are mostly fixed since 6.0.
Partitions that can be accessed without root can be dumped with DD through ADB if ADB itself is supported and not internally limited to prevent just this.
Try
Code:
adb reboot recovery
adb root
adb shell
In my device, I can able to read those /data /dev without bootloader unlocking or root.
HemanthJabalpuri said:
Try
Code:
adb reboot recovery
adb root
adb shell
In my device, I can able to read those /data /dev without bootloader unlocking or root.
Click to expand...
Click to collapse
So, ... You are lucky. If I try these commands, I am getting "error: closed". And believe it or not, I have my bootloader UNlocked. It's a doomed chinese tablet, Allwinner 100 SOC.
observingman said:
So, ... You are lucky. If I try these commands, I am getting "error: closed". And believe it or not, I have my bootloader UNlocked. It's a doomed chinese tablet, Allwinner 100 SOC.
Click to expand...
Click to collapse
I found that it is common for many Realme devices to able to use `adb root` in recovery mode.
I have a Realme C12 which has Mediatek Helio G35 MT6765G SoC. So we can also able to `readback` partitions by using SP Flash Tool with the help of MTK-bypass.
This is a (relatively) simple method how to enable ext4 mounting on P5210 with stock, rooted ROM. It should work with any non-stock ROM as well, but it looks like stock is only available for now.
There are two options, fast & easy one and long one.
Fast & easy method
This method involves replacing vold binary with precompiled one. That's usually bad idea as I tested it only on my machines and althought it shouldn't cause any problems in theory, there is no guarantee it will not kill you while sleeping. But, it fast and should work.
So, what to do:
Do backup
Do another backup
Grab vold.ext4support.tar.gz and extract it somewhere
Copy extracted vold binary to device (you can use ADB - adb push vold /storage/sdcard0/)
Open adb shell and mount /system for writing. That's :
$ adb shell
$ su
# mount -o remount,rw none /system/
Create backup of your current vold binary - # cp /system/bin/vold /system/bin/vold.bak
Replace vold binary with one from tarball - # rm /system/bin/vold && cp /storage/sdcard0/vold /system/bin/vold
Make it executable - # chmod 755 /system/bin/vold
Reboot your device.
Now, if everything went fine, you should be able to insert ext4-formated sdcard and get it mounted normaly. Note that sdcardfs will be used to emulate "android-compatibile" filesystem, so user rights are going to be ignored. If you need filesystem with unix rights (for linux in chroot for example), ext4 is mounted to /mnt/obb/extsdcard
If you'r device fails to start (gets stuck on boot screen), just use adb shell to mount /system for writing once again and replace /system/bin/vold with backup you have created in step 6. Or use backups from steps 1-2.
Long method
... invoves compiling android from the source. For real. Because... Why not
Ok, this is for anyone who want's to know what is he putting on his machine or just doesn't believe in random binaries from random guy from internet (and that's actually good way of thinking)
Follow AOSP manual to download Android source code
Follow next part of AOSP manual to build source code, BUT:
Use full_x86 as target
Apply this patch to get vold with ext4 support compilled. Or port your own, from this Cyanogen mod changeset
Compile everything or just vold
Copy your own vold binary from out/target/product/generic_x86/system/bin using Fast method
You can debug everything important here using logcat| grep Vold from Android or, better, adb logcat|egrep "(Vold|DirectVolume|MountService)" from Linux.
Good luck and as usual, I'm not responsible for anything and good at hiding
Note: I'm just sharing the work of the XDA member.This guide was tested on Galaxy Y GT-S5360.Here's a little introduction:
scandiun said:
INFORMATION
This guide is intended to make a full backup of your android phone (the entire memory block with all partitions) or a single partition (including sdcards, etc) directly to your computer, in either
Block level (with dd): for single partitions or whole memory block (all partitions in one piece). The backup always has the same size which is the size of the partition.
File level (with tar): only for individual partitions. This only includes files and folders, so occupies much less space, depending on how much filled is the partition.
It can be done with the phone powered on or from ClockWorkMod Recovery (from both ADB works, while in Fastboot doesn't so won't apply). Unless specified the commands meant to be used from Windows. For Linux and Unix is similar.
REQUIREMENTS
Rooted Android Phone
Busybox installed on your phone
If you are using Linux / OS X you have native tools, for Windows download Cygwin, and install with it netcat, pv and util-linux. Get them from Cygwin's setup.exe
ADB installed.
Make sure adb.exe is in your windows' path. See here and here, or use Path Manager.
Android phone with USB Debugging enabled, and the proper drivers installed on Windows so the phone is recognized. Typing 'adb devices' on a terminal should show your device.
PARTITION IDENTIFICATION
You now have to identify the partition or block device that you want to backup. For a single partition you can use either tar or dd, while for the entire memory block you can only use dd.
For example, on Galaxy Nexus you have the list of partitions here and for Galaxy S2 here.
Usually on android, the entire block containing all partitions is located at /dev/block/mmcblk0 and the data partitions is a subpartition of it. You can push parted with GPT support to your device and see all information on a partition or block.
Whole phone memory -> /dev/block/mmcblk0 (may vary, in some phones this is the sdcard)
Subpartitions -> depends on each device. Usually at /dev/block/platform/dw_mmc/by-name/ there are listed by name linking to the real device.
Back up of the whole memory block (via adb)
Connect the phone in ADB mode and unlock the screen.
Open one Cygwin Terminal and enter (replace mmcblk0 if needed):
Code:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0
You will see the cursor blinking at the left. Now the phone is waiting to send the block over the network.
Open another Cygwin terminal and type:
Code:
adb forward tcp:5555 tcp:5555
cd /path/to/store/the/backup
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw
You will see how the image size is growing until it finishes. Now you have the whole phone backed up in raw format. You can see the contents of the GPT partition with gptfdisk tool, available for windows, linux and such. See official website and sourceforge to get it. You can do it the same from ClockWorkMod Recovery but you have to mount first the /system partition since the busybox included with clockworkmod does not come with netcat and you have to use the one from the system partition.
With further linux tools you could edit or extract single partitions from the whole block.
You can use adb via wifi as well with applications like WiFi ADB.
Back up of the whole memory block (via wifi)
Original post: [Q] Nandroid directly to computer w/o sdcard
We need to install a FTP server on the computer or the other device, configure a user with a password if we want to, and set some port. It uses by default 21 but this example uses 40. We must set a home dir for the user with write permissions.
Usually is a good idea to put myfifo in /cache not in /data because we may overwrite sensitive data in case we want to use that raw image for data recovery.
Open one Cygwin terminal
Code:
adb shell
su
mkfifo /cache/myfifo
ftpput -v -u user -p pass -P 40 COMPUTER_IP block.raw /cache/myfifo
Open another Cygwin terminal
Code:
adb shell
su
dd if=/dev/block/mmcblk0p12 of=/cache/myfifo
Tips:
- Fifos only can be made on linux native filesystems, for example on a FAT partition is not possible.
- Reading from a partition does not modify it.
Now check on Filezilla Server the speed
Back up of the whole memory block (USB tethering, Wifi tethering)
To use tethering you have to disconnect the computer from all networks and connect it only to the phone with the type of connection you want.
Once you connect it, you can view the IP of the computer and the IP of the phone from connection properties. The ip is the computer ip and the gateway is the phone's ip.
Wifi Tethering: Computer Phone Internet
USB Tethering:
Computer Phone Internet
Conputer Phone Internet
This is exactly the same as via wifi, except that the transfer speed is much higher because the computer and the phone are directly connected, instead of using a router as a gateway. In this case, the gateway is the phone. USB tethering has the highest transfer rate.
Back up of a single partition (raw = every bit of the partition)
It is exactly the same as the the previous but replacing mmcblk0 by the corresponding partition. You can use in this particular case several software to read the partition from windows, depending on partition filesystem: DiskInternals Linux Reader, Ext2Read, Ext2 File System Driver for Windows, Ext4Explore, plugin for Total Commander and ImDisk Virtual Disk Driver. You can also use recovery software on individual partitions like Recuva in combination with VHD Tool or command line tools included with operating systems.
Back up of a single partition (tar = only files and folders)
In this case, you need the partition mounted. To see the list of mounted partitions type on Cygwin Terminal
Code:
adb shell mount
Now you need to know where is mounted the partition you want to backup, for example the firmware is mounted on /system, which is the ROM.
In this case you will have to open three terminals, because of android limitations:
Open one Cygwin terminal and create a fifo, in /cache, for example, and redirect the tar there
Code:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/xbin/busybox mkfifo /cache/myfifo
/system/xbin/busybox tar -cvf /cache/myfifo /system
We have to do it this way because redirecting the tar to stdout (with - ) is broken on android and will corrupt the tar file.
Open a second Cygwin terminal and type:
Code:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox cat /cache/myfifo
Open a third Cygwin terminal and type:
Code:
adb forward tcp:5555 tcp:5555
cd /path/to/store/the/backup
nc 127.0.0.1 5555 | pv -i 0.5 > system.tar
You can browse the tar file with Winrar, Total Commander, PeaZip and almost any compression tool. Note that you shouldn't extract files or edit it since the tar format saves the permission and owner data for each file, that is lost when extracted to FAT / NTFS partitions and you will mess things when restoring.
LINKS
[GUIDE] Internal Memory Data Recovery - Yes We Can!
How to Create and Attach a Virtual Hard Disk in Windows 7
[Guide] Types of Android backups
Click to expand...
Click to collapse
Original Thread : http://forum.xda-developers.com/showthread.php?t=1818321
And here is the guide to make nandroid backup through terminal app in android with switching off the phone in sdcard!!!
http://forum.xda-developers.com/showthread.php?t=1620255
Hello
There's a way for making a backup with RAW extension that can be flashed with fastboot in asus fonepad (i don't know about others)
See this: http://forum.xda-developers.com/showthread.php?t=1818321
Back up of the whole memory block (via adb)
Connect the phone in ADB mode and unlock the screen.
Open one Cygwin Terminal and enter (replace mmcblk0 if needed):
Code:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0
You will see the cursor blinking at the left. Now the phone is waiting to send the block over the network.
Open another Cygwin terminal and type:
Code:
adb forward tcp:5555 tcp:5555
cd /path/to/store/the/backup
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw
You will see how the image size is growing until it finishes. Now you have the whole phone backed up in raw format. You can see the contents of the GPT partition with gptfdisk tool, available for windows, linux and such. See official website and sourceforge to get it. You can do it the same from ClockWorkMod Recovery but you have to mount first the /system partition since the busybox included with clockworkmod does not come with netcat and you have to use the one from the system partition.
With further linux tools you could edit or extract single partitions from the whole block.
Click to expand...
Click to collapse
But it's for rooted devices only. how can i make a backup with busybox non-root?
This guide is intended for those who own 16G MI3W which, sadly, often doesn't have enough space to make nandroid backup. This tutorial will show you how you can make nandroid backup directly to your PC and restore it later. Entire procedure will not store any single byte to your phone's internal memory.
Great part of this tutorial (and the whole idea) is taken from scandiun's thread, so some credits go to him.
WAS IT NECESSARY?
As we know, this operation (backup and restore) can, sort of, be done using adb backup command. But this command leaves out sms messages, call logs and some other information. So, backup made with adb backup may not be full, and does not reflect phone's current state.
REQUIREMENTS
This tutorial requires you to have:
ClockworkMod custom recovery installed on your phone
BusyBox installed into /system/xbin directory (your device probably already has it there). But you can check it or install it using this application (requires root).
Linux machine or MS Windows. I recommend linux, but if you're using Windows, please install Cygwin with netcat (nc), pv and util-linux (you can select those binaries in Cygwin setup).
Adb installed into some PATH directory. For windows, adb executable could be put into Windows directory (eg. C:\Windows). For linux, you can use command shown here to install adb, which will automatically put adb into your PATH directory.
Let's get down to business!
Whole philosophy lies behind opening some port on your device, over which will /data, /system or /cache partition be transfered from MI3 to PC's hard drive. Data is also being compressed/decompressed on the fly, so backup size is reduced. You can also see transfer speeds and total amount of data transfered.
Process is tested and it works!
BACKUP
To initiate a backup, we first have to run ADB. Connect USB cable to your phone. Then boot your device into recovery and select system 1. After that, go into Storage and mounts and mount /data, /cache and /system.
Finally, open Cygwin/linux shell and type the following:
Code:
adb kill-server
sudo adb start-server
adb forward tcp:1234 tcp:1234
adb shell
Then open another Cygwin/linux shell and create and enter directory which will hold MI3 backup. I called my directory mibackup.
Code:
mkdir ~/mibackup
cd ~/mibackup
You can see that we are working here with two consoles. First console will always represent phone's memory, and second will always represent our PC.
We will backup total of three partitions: /data, /cache and /system. That is essentially everything you need.
/system holds android system, and /data partition holds internal storage, applications, dalvik-cache and every other data including SMS messages, etc. But be prepared, because backup of this data partition can take up to 12,5GB of PC's hard drive space. It is usually lower because of compression, but just so you know. /system partition can take up to around 600MB, and is also usually lower than that.
/data partition (without internal storage)
Whole backup procedure of /data partition relies on few simple commands. Type this command in your first console, where adb shell is run:
Code:
cd /system/xbin
./busybox tar -pcf - /data --exclude='data/media/0' | ./busybox nc -l -p 1234
And then type command below into another shell:
Code:
nc localhost 1234 | pv -i 0.5 | gzip -c > data.gz
This will start backup process. As you may have noticed, this will backup our /data partition, but without internal storage (internal SD card).
Internal storage backup
After backup is complete, we can also backup our phone's storage (a.k.a. internal SD card), using following commands.
Type these commands in first console:
Code:
cd /system/xbin
./busybox tar -pcf - /data/media/0 | ./busybox nc -l -p 1234
and this command into second console:
Code:
nc localhost 1234 | pv -i 0.5 | gzip -c > sdcard.gz
/cache partition
Cache partition does not hold any important data. But I've noticed that when I wiped it, my current theme reset! This partition can be backed up in a matter of seconds, so why wouldn't we give it a try?
Type these commands in first console:
Code:
cd /system/xbin
./busybox tar -pcf - /cache | ./busybox nc -l -p 1234
and this command into second console:
Code:
nc localhost 1234 | pv -i 0.5 | gzip -c > cache.gz
/system partition
Finally, we can backup our /system partition. But, because BusyBox is located in /system, and we do not want to use this partition while it's in backup/restore phase, we have to copy xbin directory (busybox) to internal SD card.
Type these commands in your first console:
Code:
cp -R /system/xbin /data/media/0
cd /data/media/0/xbin
./busybox tar -pcf - /system | ./busybox nc -l -p 1234
and this command into second console:
Code:
nc localhost 1234 | pv -i 0.5 | gzip -c > system.gz
After the process is done, type following commands in first console to clean up xbin directory from internal storage, and to close adb.
Code:
cd /
rm -rf /data/media/0/xbin
exit
adb kill-server
And you have just created backup of your phone, into chosen directory. Congratulations!
Backup is in this case made of four files: data.gz, sdcard.gz, cache.gz and system.gz.
RESTORE
Before each restore procedure, we should wipe partition we are going to restore. So be careful! It is also important to check if /data, /cache and /system are mounted after each wipe/format.
To prepare things for restoration, open console and type in:
Code:
adb kill-server
sudo adb usb
adb forward tcp:1234 tcp:1234
adb shell
Then open another terminal, and go into directory where backups are stored. When I showed you how to create backup, I used mibackup directory. So, let's go into that directory once again, so we can pull our backups from there.
Code:
cd ~/mibackup
/data partition (doesn't contain internal storage)
If you are going to restore /data and /sdcard, then go to mounts and storage, and choose the last option - format /data and /data/media.
If you are going to restore only phone's data (and not /sdcard), select wipe data/factory reset from CWM menu. Don't skip this step! After that, make sure that /system and /data partitions are mounted.
To restore data partition then, type this commands into first console:
Code:
cd /
/system/xbin/busybox nc -l -p 1234 | tar -px
and this command into second:
Code:
gunzip -ck data.gz | pv -i 0.5 | nc localhost 1234
Internal storage
Make sure that /system and /data are mounted.
If you just restored /data partition, you don't have to wipe/format anything. Otherwise, if you just want to restore your internal SD card, you can type following command into first console, to wipe it first:
Code:
cd /
rm -rf /data/media/0/*
Type these commands into first console to restore your internal SD card (if you've backed it up):
Code:
cd /
/system/xbin/busybox nc -l -p 1234 | tar -px
and this command into second one:
Code:
gunzip -ck sdcard.gz | pv -i 0.5 | nc localhost 1234
/cache partition
Make sure that /system and /cache are mounted, and then format /cache from CWM.
/cache partition will be restored just as fast as it was backed up.
Type these commands into first console:
Code:
cd /
/system/xbin/busybox nc -l -p 1234 | tar -px
and this command into second console:
Code:
gunzip -ck cache.gz | pv -i 0.5 | nc localhost 1234
/system partition
After process is finished, we can restore system partition in a similar fashion we did when we backed it up. Just make sure that /system and /data are mounted, and then format /system from CWM.
Type this commands into first console:
Code:
cp -R /system/xbin /data/media/0
cd /
/data/media/0/xbin/busybox nc -l -p 1234 | tar -px
And this command into second one:
Code:
gunzip -ck system.gz | pv -i 0.5 | nc localhost 1234
After that, we just have to do some housekeeping jobs:
Code:
cd /
rm -rf /data/media/0/xbin
exit
adb kill-server
And last, but not least, if you haven't restored /cache partition, you should format it from CWM recovery.
That's it!