fastboot erase userdata and ROM Hopping - Moto G Stylus (Moto G Pro) Questions & Answers

I've got a question. I understand that it's necessary when going from one rom to another to wipe user data. Is there anyway we can simply use the command in fastboot instead erasing the internal storage?
I'm still not 100% clear on how this A/B system works even after reading the documents on Google.
fastboot erase userdata
I think that's the right one..
Thanks

Related

is it possible to recreate the Data partition ?

Hello everyone,
i bricked my a511 because i had the stupid idea to set go back factory defaults with the old cwm.
so, i know that the problem is the damaged data partition, is it possible to recreate this partition ?
I had the same Problem. I flashed a data.img. This works. you can even mount the system partition? and the cache?
The Fastboot commands are "fastboot flash userdata C:\[your path to the data.img]" and "fastboot flash system C:\[your path to the data.img]"
and "fastboot flash cache C:\[your path to the data.img]"
Webitu
No, it's not the partition that's damaged, but the NAND chip itself.

DATA and Dalvik corrupted need nvflash help!

Hi guys yesterday i tried flashing a img to my microSD wich i though was mmcblk0p8 but i think i was wrong and my device restarted and when it booted up it said "encryption unsucessfull" i tried to boot TWRP and it said "please enter password" i pressed cancel and went to wipe and i can say that i'm able to wipe system cache but if fails on DATA and Dalvik partitions
now I do have nvflash setup with all the blobs and a full backup but i don't know how to fix my DATA and dalvik partitions i tried to format my data partition using NVFLASH --format_partition 10 but it is stuck on Nvflash started!
please help me
noahvt said:
Hi guys yesterday i tried flashing a img to my microSD wich i though was mmcblk0p8 but i think i was wrong and my device restarted and when it booted up it said "encryption unsucessfull" i tried to boot TWRP and it said "please enter password" i pressed cancel and went to wipe and i can say that i'm able to wipe system cache but if fails on DATA and Dalvik partitions
now I do have nvflash setup with all the blobs and a full backup but i don't know how to fix my DATA and dalvik partitions i tried to format my data partition using NVFLASH --format_partition 10 but it is stuck on Nvflash started!
please help me
Click to expand...
Click to collapse
Dalvik stored on data partition. Try to format it with fastboot.
Code:
fastboot -i 0x0B05 -w -u
or
fastboot -i 0x0B05 erase userdata
Graiden05 said:
Dalvik stored on data partition. Try to format it with fastboot.
Code:
fastboot -i 0x0B05 -w -u
or
fastboot -i 0x0B05 erase userdata
Click to expand...
Click to collapse
Thanks man!!!!! I can't believe such a tiny command can do the job I tried a full nvflash restore and that didn't work
Sent from my C5303 using xda app-developers app
noahvt said:
Thanks man!!!!! I can't believe such a tiny command can do the job I tried a full nvflash restore and that didn't work
Sent from my C5303 using xda app-developers app
Click to expand...
Click to collapse
And just to let You know: internal user memory presented in file explorer as sdcard is a folder inside data partition(mmcblk0p8). And external microsd is mmcblk1p1.

crombi-kk e: unable to mount /sd-ext data2sd with f2fs

Hello, I have an issue that will hopefully be resolved with some help from you guys.
I have a tf300t, a 64gb class 10 sandisk card, and I was running cromi 5.3 with data2sd before switching to crombi-kk. I used gparted and formatted the second partition on my microsd to fsfs. I then did the following to start fresh on the tablet
fastboot erase system
fastboot erase recovery
fastboot erase userdata
fastboot erase boot
fastboot erase misc
fastboot erase cache
fastboot -i 0x0B05 flash system c:\adb\TF300t\blob
fastboot -i 0x0B05 reboot
I then flashed twrp 2.7.0.1 omni version from the link on the tf300t crombi-kk page.
I then installed crombi with data2sd with f2fs. I used that kernel. Install went fine and went to the wipe dalvik,home, buttons were at the bottom and it said updating partioning details or whatever.
It then said e:unable to mount /sd-ext and a bunch more e: ones. I rebooted and the penguins showed up and it said
Well I couldn't remember what the first one had said but the second said
Data on i/data on microsd for data2sd/rom2sd
/system on microsd for rom2sd
And it booted up normally and I setup crombi.
I now keep getting freezes and I find myself having to hit the power button and enter my pin. Sometimes I will get the message systemui has stopped or something, do you want to wait? Or something along those lines.. I guess the only thing I didn't do is factory reset before installing crombi-kk. I am going to reformat the f2fs partition on the microsd in gparted again, then I will do all of this
fastboot erase system
fastboot erase recovery
fastboot erase userdata
fastboot erase boot
fastboot erase misc
fastboot erase cache
fastboot -i 0x0B05 flash system c:\adb\TF300t\blob
fastboot -i 0x0B05 reboot
And flashed twrp 2.7.0.1 omni version. Then factory reset. Should I have anything extra checked off in the advanced section of the factory reset page?
Then I will install crombi with data2sd option with f2fs and use _that kernel in the aroma installer.
I will report back
Thanks for the help!

Phone is Extremely Weirdly Bricked

So first, I transferred a file to my phone. I was quite low on storage (about 3 gb left) before the transfer, but the file was around 2.4gb, so it fit. I wanted to transfer that file to another computer, so when I plugged it in the other computer, a local disk drive shows up as opposed to mtp. I figure that it was probably a glitch. When I restart the phone, it boots, but instead of having 600 mb of free space left, it has 1134mb left. Somehow the available space just increased, so I decide to reboot again. The bootloader shows up, but then it simply goes to a black screen with no boot logo. When I plug my phone back into the computer, it opens 4 disk drive prompts saying I need to format the drive so that it can be used, and one that shows something. When I go in the "drive", there is one folder called image, and in the folder there is a bunch of files like modem.b00 as shown in the image attached..
It seems that instead of mounting the internal storage, it is mounting the firmware.
I am able to boot into recovery however, but nothing I have done seems to help. I have tried flashing several firmwares again with different recoveries (2.8.7.0.5 and 3.0.0) and restoring the efs partition again. I cannot delete any files off my phone through recovery as it yields an ERROR=1 and through MTP when I delete a file, it appears the file is deleted, but when I unplug and plug the phone back in, the file is back. I can however transfer files from my phone to the computer, but not vice versa.
It is also able to read but not write, meaning that my internal storage may be faulty, or that the file caused a corruption on my phone. If anyone has any ideas on how to fix it or has any experience with this, please let me know.
Can you access fastboot?
Sounds like it may be an issue with the userimage data try a reflash using the link below but edit the bat file (or .sh file) to only include the following line:
Code:
fastboot flash userdata userdata_64G.img (or userdata.img if you have a 16GB model)
you can grab a zip with the entire OS here and you will need to setup fastboot drivers properly (which sounds like you would have already done)
Return OPO to 100% Stock
itechy said:
Can you access fastboot?
Sounds like it may be an issue with the userimage data try a reflash using the link below but edit the bat file (or .sh file) to only include the following line:
Code:
fastboot flash userdata userdata_64G.img (or userdata.img if you have a 16GB model)
you can grab a zip with the entire OS here and you will need to setup fastboot drivers properly (which sounds like you would have already done)
Return OPO to 100% Stock
Click to expand...
Click to collapse
Yep, fastboot works and I already have the drivers set up. Do I only need to restore the userdata?
f41lbl0g said:
Yep, fastboot works and I already have the drivers set up. Do I only need to restore the userdata?
Click to expand...
Click to collapse
Flashing the userdata partition via fastboot will wipe all data so I hope you have your stuff backed up. Best solution now is to fastboot flash COS12.1.1 and see if it turns on
Sent from my A0001 using Tapatalk
Renosh said:
Flashing the userdata partition via fastboot will wipe all data so I hope you have your stuff backed up. Best solution now is to fastboot flash COS12.1.1 and see if it turns on
Sent from my A0001 using Tapatalk
Click to expand...
Click to collapse
I'm currently in the process of backing everything up, but can't I just format /data through recovery since TWRP works?
Tried flashing the userdata_64G.img, here is what I get:
C:\adb>fastboot flash userdata userdata_64G.img
target reported max download size of 1073741824 bytes
erasing 'userdata'...
OKAY [ 3.829s]
sending 'userdata' (56 KB)...
OKAY [ 0.016s]
writing 'userdata'...
FAILED (remote: Bogus size sparse and chunk header)
finished. total time: 3.860s
f41lbl0g said:
I'm currently in the process of backing everything up, but can't I just format /data through recovery since TWRP works?
Click to expand...
Click to collapse
You can try that but no guarantees it will work.
You can either wipe everything (/system /data /internal storage /cache and /dalvik) with advanced wipe for TWRP 2.8.6.0 (recommended version) then transfer the flashable version of COS12.1.1 from link below and flash
http://forum.xda-developers.com/showthread.php?t=2906746
Or you can fastboot flash the entire COS12.1.1 fastboot using commands manually from the previous link the other poster gave you. You will run into some problems if you decide you wanna try some AOSP ROMs after flashing the userdata from COS12.1.1 but if you stick to CM you'll be fine
Sent from my A0001 using Tapatalk
Renosh said:
You can try that but no guarantees it will work.
You can either wipe everything (/system /data /internal storage /cache and /dalvik) with advanced wipe for TWRP 2.8.6.0 (recommended version) then transfer the flashable version of COS12.1.1 from link below and flash
http://forum.xda-developers.com/showthread.php?t=2906746
Or you can fastboot flash the entire COS12.1.1 fastboot using commands manually from the previous link the other poster gave you. You will run into some problems if you decide you wanna try some AOSP ROMs after flashing the userdata from COS12.1.1 but if you stick to CM you'll be fine
Sent from my A0001 using Tapatalk
Click to expand...
Click to collapse
Ok I had to fastboot flash the entire COS2.1.1, and it is working well now. Why is there an issue with AOSP roms after flashing the userdata?
f41lbl0g said:
Ok I had to fastboot flash the entire COS2.1.1, and it is working well now. Why is there an issue with AOSP roms after flashing the userdata?
Click to expand...
Click to collapse
I don't know what is up with the userdata image for COS12.1.1 but its corrupted in some way and you cannot flash ROMs like Omni and OxygenOS. It acts as if you've encrypted the OS when you haven't, solution is to wipe using an older userdata partition like the one from COS12.1 or earlier.
Sent from my A0001 using Tapatalk
Renosh said:
I don't know what is up with the userdata image for COS12.1.1 but its corrupted in some way and you cannot flash ROMs like Omni and OxygenOS. It acts as if you've encrypted the OS when you haven't, solution is to wipe using an older userdata partition like the one from COS12.1 or earlier.
Sent from my A0001 using Tapatalk
Click to expand...
Click to collapse
Do you have a link to an old userdata partition?
f41lbl0g said:
Do you have a link to an old userdata partition?
Click to expand...
Click to collapse
Sorry I don't you'll have to download from the link I shared earlier an entire fastboot zip to be able to do it
Sent from my A0001 using Tapatalk

[HELP] XT1039 TWRP 3.0 Stuck at splash screen, can't format cache or userdata

Hello, I would really appreciate your kind help solving a bit of a problem I have with my Moto G 4G
I had a problem with my google account where it wouldn't sync anymore and play store sopped working (says no connection even though is there).
Since I already encountered this problem before and solved it once by formatting cache, and data I tried to go into Recovery.
Here the oddities begin: TWRP doesn't load and gets stuck on splashscreen;
I searched for it and read that formatting cache and userdata would solve also this problem, so I guessed that formatting them from bootloader would have done the trick.
Unfortunately when I enter the command fastboot format cache or fastboot format userdata I get this:
formatting is not supported for filesystem with type 'raw'
Are some of my partitions corrupted?!
How can I solve this??
BTW I can boot into system and all is fine except the problem with the google account that led me to these findings.
albmanzi said:
Hello, I would really appreciate your kind help solving a bit of a problem I have with my Moto G 4G
I had a problem with my google account where it wouldn't sync anymore and play store sopped working (says no connection even though is there).
Since I already encountered this problem before and solved it once by formatting cache, and data I tried to go into Recovery.
Here the oddities begin: TWRP doesn't load and gets stuck on splashscreen;
I searched for it and read that formatting cache and userdata would solve also this problem, so I guessed that formatting them from bootloader would have done the trick.
Unfortunately when I enter the command fastboot format cache or fastboot format userdata I get this:
formatting is not supported for filesystem with type 'raw'
Are some of my partitions corrupted?!
How can I solve this??
BTW I can boot into system and all is fine except the problem with the google account that led me to these findings.
Click to expand...
Click to collapse
Have you tried reflashing TWRP through fastboot, like this
Code:
fastboot flash recovery recoveryimage.img
You could then wipe, or format these partitions in TWRP.
Professor Gibbins said:
Have you tried reflashing TWRP through fastboot, like this
Code:
fastboot flash recovery recoveryimage.img
You could then wipe, or format these partitions in TWRP.
Click to expand...
Click to collapse
I tried that already, albeit just reflashig TWRP 3.0 and not other recoveries... it didn't work, still keeps getting stuck at splash screen :crying:
Did you use
Code:
fastboot format cache
or
Code:
fastboot erase cache
Because the format seems to give that error and erase should not.
UPDATE: After reading your post it says you did indeed use format, not erase, so use
Code:
fastboot erase cache
fastboot erase userdata
Thanks, unfortunately it worked to solve just the recovery getting stuck, and I f*ed up other things in the process.
I still can't access to Google accounts, or create another, says connection error with google servers.
Since I had the SD card as internal storage before, erasing userdata caused the SD card to not be recognised anymore... I could format it to solve the problem, but I didn't have a recent backup so now I also need to try recovering that data. I know. I'm an idiot.
The strange thing is I even wiped Cache, Dalvik, Data and System and proceeded to flash a new ROM, and google account still doesn't work
There are so many variables that could be causing the Google account issue. Although, did you flash the stock rom or a custom rom?
I flashed 6.0.1 custom rom, Resurrection Remix
Google account issue got solved by simply doing another wipe and ROM flashing.
Now I have to deal with the corrupted microsd card issue I caused when i erased userdata...
I don't want to format the card before I can restore the data that was in there, there's still important stuff there, and last backup is too old.
When I'm in recovery with the phone connected to PC I can see the drive and windows says it has only 590MB of free space from a 7.42GB total; problem is when I open the drive it says it's empty.
When I put the microsd in a card reader instead, it does get a drive letter assigned but when I try to open it windows asks me to insert a disk.
Data is still there, it didn't got wiped with userdata... did it?!
I tried the method described in this guide http://forum.xda-developers.com/galaxy-s4/general/guide-internal-memory-data-recovery-t3093292 to recover mmcblk1p1 and mmcblk1p1p2 but the recuva scan I did to the generated virtual hard disk reported no deleted files and just the file indexervolumegrid in system volume information folder.
Now I'm going to try to use testdisk to see if i can repair the partition, but i'm no expert so I'm not sure how to do that.
albmanzi said:
Google account issue got solved by simply doing another wipe and ROM flashing.
Now I have to deal with the corrupted microsd card issue I caused when i erased userdata...
I don't want to format the card before I can restore the data that was in there, there's still important stuff there, and last backup is too old.
When I'm in recovery with the phone connected to PC I can see the drive and windows says it has only 590MB of free space from a 7.42GB total; problem is when I open the drive it says it's empty.
When I put the microsd in a card reader instead, it does get a drive letter assigned but when I try to open it windows asks me to insert a disk.
Data is still there, it didn't got wiped with userdata... did it?!
I tried the method described in this guide http://forum.xda-developers.com/galaxy-s4/general/guide-internal-memory-data-recovery-t3093292 to recover mmcblk1p1 and mmcblk1p1p2 but the recuva scan I did to the generated virtual hard disk reported no deleted files and just the file indexervolumegrid in system volume information folder.
Now I'm going to try to use testdisk to see if i can repair the partition, but i'm no expert so I'm not sure how to do that.
Click to expand...
Click to collapse
Unfortunaly the erase userdata command will also erase the internal SD card. This is because the shared internal 'SD card' is actually stored under the userdata partition, in /data/media.
Im not a data recovery expert, but i believe that recovering data deleted on solid state media is much more difficult than a magnetic disk. Also, that tutorial appears to be for a Samsung phone, so those are not the correct partitions.
As for repairing the partition, the userdata partition, and the /data/media directory inside it, is recreated when booting into a ROM.
Professor Gibbins said:
Unfortunaly the erase userdata command will also erase the internal SD card. This is because the shared internal 'SD card' is actually stored under the userdata partition, in /data/media.
Im not a data recovery expert, but i believe that recovering data deleted on solid state media is much more difficult than a magnetic disk. Also, that tutorial appears to be for a Samsung phone, so those are not the correct partitions.
As for repairing the partition, the userdata partition, and the /data/media directory inside it, is recreated when booting into a ROM.
Click to expand...
Click to collapse
Yeah, I can't find anything even with testdisk.... I am at a loss, fortunatyely the lost data isn't mission critical, nevertheless it forces me to repeat many hours of work.
Going to format the card.
Sorry to hear that. Although I suppose it's a good reminder of the importance of regular backups.

Categories

Resources