[HOW TO] Backup and Restore all your data (16 GB or 32 GB size) with OTG - G2 General

I don't know where I inspired to do this but it is most efficent way to backup and restore opinion.
Sometimes backuping and restoring partitions like /system /data etc. messing up the device. This method bootup normally all the time after restoring.
krezee:
Complete and foolproof bkp step. Ignoring possibility of typo.
Ability to recover completely as long as recovery is working
Yes thats right so be careful when typing!
You need 16 GB or 32 GB USB memory (formatted with exfat) and OTG CABLE
16 GB or 32 GB depends on memory size which you are using.
Begin with %100 battery every time you backup and restore
because using the OTG takes a lot of power and this process takes 30-40 minutes or more.
Backup Process
Connect your USB memory with OTG cable type it in Terminal emulator
Code:
su
Code:
dd if=/dev/block/mmcblk0 of=/mnt/media_rw/USBstorage1/mmcblk0 bs=4k
Optionally you can turn on flight mode while backupping
If process finished terminal emulator looks like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Restore Process
1. Connect the OTG cable
2. Boot up to the TWRP recovery
3. Check OTG and /system mounted or not (if not Reboot > Recovery then check again)
4. Advanced > Terminal Command
5. While in root folder " / " press select
6. type:
Code:
dd if=/usb_otg/mmcblk0 of=/dev/block/mmcblk0 bs=4k
It will takes some time and sometimes TWRP lockscreen blinks, locks over and over again. Sometimes you can't unlock lockscreen because it is 5 times locked(or more) It is ok. Leave the phone and check after 20 min.
After process done boot up
Q: Why it is useful so much?
A: This process backup all your partitions in ONE partition --> mmcblk0 and one file.
Q: Can I use for IMEI lost problems
A: Definitely yes.
Q: I will try another rom but what if I don't like?
A: Take a backup like that install your rom and you don't like it restore your backup without messing your phone!

Also HDD/SSD can be used. With external box or usb converter for sure.

Yes you can I would prefer SSD, HDD sounds like power drainer.
In addition you have to format it exfat your SSD or HDD I think, if not device cannot mount the drive.
Edit: You can use mini partition tool to partition and create a partition ext4 and backup in there. Now it doesn't take so long with bs=4k you can use that method with external hdd or maybe ssd.

Complete and foolproof bkp step. Ignoring possibility of typo.
Ability to recover completely as long as recovery is working
Thanks

krezee said:
Complete and foolproof bkp step. Ignoring possibility of typo.
Ability to recover completely as long as recovery is working
Thanks
Click to expand...
Click to collapse
Very important point yes if recovery not working you can't restore
And typo may cause memory full error when recovery process is running
Checking file size can be useful (16 gb or 32 gb when its done)
Thanks for your attention I added to thread.

Related

[SHARE]Online Nandroid Backup / Nandroid Backup without re-booting by ameer1234567890

Sorry if repost and i just copy/paste from original thread.
Nandroid backups are usually performed in recovery mode. This means you would have to turn off your phone and reboot in recovery mode, which wastes a whole lot of time rebooting and a lot more time offline. For me, this has been a killer as I do regular nandroid backups. Having to reboot in recovery and finding missed calls, sms from my wife and friends is totally not accepatable for me. So, I set to develop an online nandroid backup tool which can do nandroid backups without switching off my phone.
Today, I am releasing it to public, as it may serve good for some others too. This tool is specifically for Xperia phones, but should work with any model of android phones.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This tool backups /system , /data , /cache & .android_secure partiotions to /sdcard/clockworkmod/backup directory. The date format used for folder name is the same used by CWM itself and nandroid backups created with this tool can safely be restored using CWM. If you would want to have a custom name for backup folder, pass an argument with the name to the script and it will use the name.
Feedback (especially ideas to improve) are most welcome.
Requirements
1. Rooted android phone
2. A terminal emulator installed on phone
3. Busybox
4. A working CWM based recovery installed
5. Some patience
Installation
1. Download and copy zip file to SD card
2. Reboot into recovery
3. Choose install zip from SD card, select zip and flash .
4. Reboot!
Usage
1. Open terminal emulator
2. Type su to obtain root
3. Type onandroid
4. Wait and watch
Custom Backup Name
* Example:
Code:
onandroid custom_name
* Please be careful not to include characters not allowed in filenames.
Timezone modifier
* Example: Use home/phone timezone for backup file name
Code:
onandroid -h
* Example: Use UTC (default) for backup file name
Code:
onandroid -u
* Note: UTC is used as default (if no timezone modifier is passed). This is to comply with CWM nandroid backups.
Download:
onandroidv3.0.zip
Tested and working in NeoThanks to ameer1234567890
Original thread:- http://forum.xda-developers.com/showthread.php?t=1620255
I will be testing this when i get home back to my wifi!!!!
Excellent work.

Strange symbol name in CWM backup folder (errors..?)

Guys, this is just happened.. I backup my stock ROM with Full Backup with TAR format and External SD as location, when I wanna take a look the MicroSD in my PC (run on linux), the contents of clockwordmod folder is bunch of files with strange symbol name..? errors..?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I can't delete it in any OS because of that name symbols. Any solution..?
Motorola RAZR MAXX (XT910 GSM), BMM 0.3.4, ICS 4.0.4 (Stock), Liquid Smooth 4.2.2 (3rd slot)
tridentcore said:
Guys, this is just happened.. I backup my stock ROM with Full Backup with TAR format and External SD as location, when I wanna take a look the MicroSD in my PC (run on linux), the contents of clockwordmod folder is bunch of files with strange symbol name..? errors..?
I can't delete it in any OS because of that name symbols. Any solution..?
Click to expand...
Click to collapse
chkdsk may be of help. UNIX tools (Linux. MacOS X etc.) such as dosfsck aka fsck.vfat are usually unable to fix badly corrupted FAT. However, the best solution would be to format the card (which will reinitialise the FAT) and restore data from backup.
Vatazhka said:
chkdsk may be of help. UNIX tools (Linux. MacOS X etc.) such as dosfsck aka fsck.vfat are usually unable to fix badly corrupted FAT. However, the best solution would be to format the card (which will reinitialise the FAT) and restore data from backup.
Click to expand...
Click to collapse
Before this, already happened once and I tought is there's a problem with my MicroSD filesystem and after that I backup all of my data and do full format overwrite using Linux Mint and copy all of my data back to MicroSD. And this time happened again.
Any chance my MicroSD got hardware errors..?
You can check kernel log after you test your card e.g. by issuing the following command: dd if=/dev/block/mmcblk1 of=/dev/null bs=128k (it's a read-only test, superuser is required).
Did you notice any sudden reboots? Is your device overclocked and/or undervolted? These can contribute to data loss.
Vatazhka said:
You can check kernel log after you test your card e.g. by issuing the following command: dd if=/dev/block/mmcblk1 of=/dev/null bs=128k (it's a read-only test, superuser is required).
Did you notice any sudden reboots? Is your device overclocked and/or undervolted? These can contribute to data loss.
Click to expand...
Click to collapse
nope, everything is still default stock ROM with most of system apps freezed.. no sudden behavior or anything, everything is work fine in my stock ROM except the BMM Full Backup result in the screenshot above... I wanna try to buy another MicroSD as backup storage in case the one I'm using is defected.

MeLE A200 Internal Storage not mounted

I've MeLE A200 HTPC (single core A10S SoC, FW Android 4.0.4 v1.2b rooted, Board HMC-G41A03WL). Recently after installing a small app, something went wrong, the box Internal Storage changed from 10% full to 0.0B, meaning its not mounted anymore on device reboot. I've no access to previously installed packages, and can't install any new package that requires access to Internal Storage ( Data partition) or root access. I tried soft recovery from Settings and Hard recovery by pressing the device button, but they didn't fix the issue.
I earlier installed CWM ROM Manager, but was unable to find Recovery image for this device. Wanted to re-install original firmware, but official links are dead. Mele Support never answers any emails, and they block registration emails on the company forum, so no way to ask a question on the forum. They posted an updated firmware v1.3 for "A200 upgraded version" device on the forum, but that device hardware has 1GB RAM, and mine only 512MB, and there may be other differences. So I'm not sure, it will boot, and if it doesn't I'll get a brick.
I installed Terminal package, and can access the box partitions from PC using ADB via Wi-Fi, since USB Recovery option is not showing in the device Settings, and Mele provides no USB Windows driver. I can see that Data, Cache, and probably some other partitions are not mounted. I mounted them OK manually, but lost Wi-Fi access after that, probably because the device lost access to Data folder on root it was using instead of Data partition on NAND.
This picture has proper links, since I can't post them here so far:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
My questions are:
1. Can anyone point to a link to A200/A210 original firmware? I need:
A200_Mele_HTPC_20130117_V1.3.1
A200 Mele_HTPC_ Home _20121220_V1.2
2. What are my chances to get a brick, if I flash the above mentioned v1.3 for "A200 upgraded version" device? Can I unpack & modify that firmware to fit my device - how?
A200升级版_A10_SDK1.6_V1.3_20140715.img
3. If I flash that FW to the device, will it erase original Recovery partition? If Yes, and the device can't boot after flash, could I recover it by pressing Hard Recovery button? Does it mean, Hard Recovery partition is stored separately in NAND, and never erased when a new FW is flashed from SD Card?
4. May be I can change some automount rules via ADB? So far, I found that /etc/vold.fstab has no automount rules for any system partitions, only for SD Card and USB partitions. So what file contains automount rules for Data and Cache?
5. What else can lead to Data not being mounted, what else can I check or do to fix the device? I can post some debug and dmesg logs saved by the system if needed. How I can fully backup or recover the device from full backup in this situation?
Update: the only resolution I found was reinstalling factory firmware procured from Mele upon request.
Does your device have a custom recover? Flash a new rom

Re-partition Internal Storage (user data)

4 this kind of guys x)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Code:
Warning:
Your device will never boot :D
Does this enough?
Ok jk but consider its possible
So don't blame me,
not responsible for anything
Trick:
Read 2nd Post First
(if u think necessary)(i would)
Why ?? :
Cuz u want to increase/decrease size on internal storage/internal sd card/nand/emmc.
So u can play Asphalt 8:AirBorne
I.e. default internal storage will increase from 4.6 GB to 5.5 GB
Sounds cool ?
Go ahead
Tools required:
0. Nandorid Backup ,
back up everything every way you can/know
1. Rooted Phone
2. Custom Recovery with ADB Sideload
3. Minimal ADB and Fastboot Tools(for Computer)
4 parted utilities.zip (download from below)
5. Computer should recognise device for that install necessary drive
6. brain, commen sense, patients,calm etc.
---> PROCEDURE/STEPS
(will add screen shot, Rewrite again )
1.
Extract 'parted' from zip copy to "/system/bin"
(if can't Open Es FILE EXPLORER app> find & tape Root explorer option>mount r/w option> mount system to r/w (read/write allow)
2.
Put phone in TWRP Recovery
3.
Connect to computer
On command line interface
(Windows>Run>CMD>enter)
#commands:
adb shell
su
parted /dev/block/mmcblk0
you will see the following screen
4.
On5 re-partition
Parted command
Rm mmcblk20,21,22,23
Name ,21,22,23
Re Size command
Mkpart primary start Size end Size
Format using
Mke4fs.
Restore twrp backup
Reboot to recovery

Incorrect internal storage information with Magisk (16 instead of 128 GB)

Hi there.
I have a Galaxy A50 (SM-A505FN) with 128GB. I rooted it with magisk (original firmware from sammobile (link below), modified on unrooted phone with magisk manager, flashed through download mode and odin).
The issue is that the phone now says it only has 16GB of storage.
Conneced to my PC it also only finds 16GB of internal storage.
I added a picture of what the terminal says the partitions are.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I read about correcting partitions with twrp but since i dont have that i want to ask if there is another way to fix this.
Thanks!
www sammobile com/samsung/galaxy-a50/firmware/SM-A505FN/DBT/download/A505FNXXU3ASL6/309345/
i can only see 10 GB on your screenshot. check one of the following
Code:
cat /proc/mtd
cat /proc/partitions
cat /proc/dumchar_info
you can download parted binary and check
Code:
parted /dev/block/sda print
note that the 6263-3234 block in the first screenshot is the sd card. i dont have it encrypted so im wondering why it seems to be mirrored in the /mnt/secure/asec block. i did however click the 'copy files from sd card' when it popped up i believe. but even if that did something, it could only block 64 of my 128 gb.
displaying partitions worked, heres the result:
i see that sda shows the 128gb capacity and sda32 seems to be whats is usable for the phone after taking out all the neccessary partitions.
unfortunately i don't know how knox works, all i can see is /data is not mounted, maybe knox prevents
try to uninstall KNOX with su -c pm disable com.sec.knox.seandroid or something
@mirfatif same problem here, must be something new. i have never seen before. maybe permission problem with magisk or some sort of disk quota
data is mounted /sbin/.magisk/mirror/data
(or /sbin/.magisk/block/data)
aIecxs said:
@mirfatif same problem here, must be something new. i have never seen before. maybe permission problem with magisk or some sort of disk quota
data is mounted /sbin/.magisk/mirror/data
(or /sbin/.magisk/block/data)
Click to expand...
Click to collapse
No idea. Can't conclude anything unless OP performs some troubleshooting steps. Whatever the case is, "/data" must be a mount point. May be something to do with SELinux, or mount namesapce, or new Magisk changes for Android 10. I'm using old Magisk release on Android 9. So may be missing something new.

Categories

Resources