Related
A few days ago I got my Atrix HD and immediately rooted and subsequently unlocked the bootloader. Later I successfully flashed EcHoFiiVe's paranoidAndroid port... I didn't really like it because of the aspect ratio (too tiny) so I tried to flash back to a stock ROM. I lost and later accidentally deleted the backup I had made of the stock ROM that came on the device so that is now out of the question but for some reason, no matter what I do, I can't make changes to /system from the recovery or from the bootloader using fastboot commands. I've tried inputing
Code:
fastboot erase system -w
and it told me that I didn't have sufficient permissions and that the command failed. Therein lies my problem. Fortunately, I have a runnable backup (PA) I just really wish to try something different and the device is adamantly against the idea. According to the bootloader the device is unlocked with status code 3. Any help will be greatly appreciated!
read this
http://forum.xda-developers.com/showthread.php?t=2226527
frog1982 said:
read this
http://forum.xda-developers.com/showthread.php?t=2226527
Click to expand...
Click to collapse
I've read through that and I can now see a line that I missed that said that it was a common issue for that particular command to not work but I still don't know what to do about my inability to flash a different ROM. I have tried to mount /system before flashing and I've tried wiping /system using the recovery before flashing, all without avail. Do you have any advice on how to wipe the system partition?
you do not have to wipe it just fastboot flash Mex retail to overwrite it and you will be starting over.
frog1982 said:
you do not have to wipe it just fastboot flash Mex retail to overwrite it and you will be starting over.
Click to expand...
Click to collapse
to be clear, are you saying I can just do this:
Extract the zip
Open a terminal to the extracted zips directory
Reboot into fastboot
Type the following commands in this order
Code:
fastboot flash boot boot.img
fastboot flash devtree device_tree.bin
fastboot flash system system.img
fastboot -w
fastboot reboot
sparkplugDev said:
to be clear, are you saying I can just do this:
Extract the zip
Open a terminal to the extracted zips directory
Reboot into fastboot
Type the following commands in this order
Code:
fastboot flash boot boot.img
fastboot flash devtree device_tree.bin
fastboot flash system system.img
fastboot -w
fastboot reboot
Click to expand...
Click to collapse
yes but make sure you also have the snap-fastboot files in the folder you are working in or in your path
Hey guys I'm mostly a lurker not too much of a poster I would respond to "BHUNDVEN"'s thread ([TOOL] Moto X FXZ Flashing Script (100% back to stock) [10/03/2013]) over on the OG Android development sections but alas my "Post count" is too low.
I keep getting this when trying to run the final command "moto-x-flash [insert .xml file]"
Any help? Thanks!
Last login: Thu Nov 7 00:31:17 on ttys001
jeffreys-mbp:~ jeffreymarshall$ cd desktop/moto-x-tools-0.2.0
jeffreys-mbp:moto-x-tools-0.2.0 jeffreymarshall$ sudo python setup.py install
running install
running build
running build_py
running build_scripts
running install_lib
running install_scripts
changing mode of /usr/local/bin/moto-x-flash to 755
running install_egg_info
Removing /Library/Python/2.7/site-packages/moto_x_tools-0.2.0-py2.7.egg-info
Writing /Library/Python/2.7/site-packages/moto_x_tools-0.2.0-py2.7.egg-info
jeffreys-mbp:moto-x-tools-0.2.0 jeffreymarshall$ moto-x-flash VZW_XT1060_4.2.2-13.9.0Q2.X-116-MX-17-53_CFC_1FF.xml
Traceback (most recent call last):
File "/usr/local/bin/moto-x-flash", line 24, in <module>
tree = ET.parse(firmware_xml)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
parser.feed(data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 2
jeffreys-mbp:moto-x-tools-0.2.0 jeffreymarshall$
I'm not to sure I have the python pkg installed correctly. Had to use the "sudo" command to get it to take.
AceBoonKoon said:
I'm not to sure I have the python pkg installed correctly. Had to use the "sudo" command to get it to take.
Click to expand...
Click to collapse
i cant help you with that toolkit as i don't use it. But if you are merely trying to flash your phone to stock then find the rsd back to 100% stock thread and do that. Just as simple as any other tool you can find.
But honestly, if you spent say 4 hours reading and installing things for adb/fastboot stuff, you won't ever need one of those tools and you won't ever again spend countless hours trying to figure out how to get some tool someone created to work correctly for your phone. The simple sometimes becomes the most time consuming.
Once you figure out a few commands and realize whats going on, you will understand how simple all of that stuff is, and then will be confused as to why anyone ever created a tool for that simple task. Not bashing on the people that created the toolkit, that helps hundreds of people out I'm sure that dont feel like reading a little bit.
memapp can
I would but this [TOOL] is for mac.
No windows machine ala no rsdlite. I did however see that I needed to rename the .xml file to a .zip file ... Then extract the contents and move them over to the moto-x-tools folder and tried flashing it that way but got a "Command not found" error.
jeffreys-mbp:moto-x-tools-0.2.0 jeffreymarshall$ moto-x-flash VZW_XT1060_4.2.2-13.9.0Q2.X-116-MX-17-53_CFC_1FF.xml
Running: fastboot oem fb_mode_set
/bin/sh: fastboot: command not found
Running: fastboot flash partition gpt.bin
/bin/sh: fastboot: command not found
Running: fastboot flash motoboot motoboot.img
/bin/sh: fastboot: command not found
Running: fastboot flash logo logo.bin
/bin/sh: fastboot: command not found
Running: fastboot flash boot boot.img
/bin/sh: fastboot: command not found
Running: fastboot flash recovery recovery.img
/bin/sh: fastboot: command not found
Running: fastboot flash system system.img
/bin/sh: fastboot: command not found
Running: fastboot flash modem NON-HLOS.bin
/bin/sh: fastboot: command not found
Running: fastboot erase modemst1
/bin/sh: fastboot: command not found
Running: fastboot erase modemst2
/bin/sh: fastboot: command not found
Running: fastboot flash fsg fsg.mbn
/bin/sh: fastboot: command not found
Running: fastboot erase cache
/bin/sh: fastboot: command not found
Running: fastboot erase userdata
/bin/sh: fastboot: command not found
Running: fastboot erase customize
/bin/sh: fastboot: command not found
Running: fastboot erase clogo
/bin/sh: fastboot: command not found
Running: fastboot oem config carrier vzw
/bin/sh: fastboot: command not found
Running: fastboot oem fb_mode_clear
/bin/sh: fastboot: command not found
Flashing was successful!
Running: fastboot reboot
/bin/sh: fastboot: command not found
jeffreys-mbp:moto-x-tools-0.2.0 jeffreymarshall$
jayboyyyy said:
i cant help you with that toolkit as i don't use it. But if you are merely trying to flash your phone to stock then find the rsd back to 100% stock thread and do that. Just as simple as any other tool you can find.
But honestly, if you spent say 4 hours reading and installing things for adb/fastboot stuff, you won't ever need one of those tools and you won't ever again spend countless hours trying to figure out how to get some tool someone created to work correctly for your phone. The simple sometimes becomes the most time consuming.
Once you figure out a few commands and realize whats going on, you will understand how simple all of that stuff is, and then will be confused as to why anyone ever created a tool for that simple task. Not bashing on the people that created the toolkit, that helps hundreds of people out I'm sure that dont feel like reading a little bit.
Click to expand...
Click to collapse
In response to the fastboot commands suggestion - I have already tried using the adb/fastboot methods didn't work. Did a search for people with similar issues and found that it has something about it being on a mac or some other nonsense. That's the reason for the [TOOL] I think. It's a workaround.
AceBoonKoon said:
In response to the fastboot commands suggestion - I have already tried using the adb/fastboot methods didn't work. Did a search for people with similar issues and found that it has something about it being on a mac or some other nonsense. That's the reason for the [TOOL] I think. It's a workaround.
Click to expand...
Click to collapse
don't know where you fastboot is but i believe its trying to call it and its not in the directory that the cmd is pointed to.
Ok I've went down the list and manually flashed each command.
When I get to ./fastboot flash system system.img
I keep getting this error
"Mismatched PIV partition name for system
Invalid PIV image: system"
I can successfully flash all other commands except this one. I went into the .xml file and deleted the "getvar" portion already. Any help?
AceBoonKoon said:
Ok I've went down the list and manually flashed each command.
When I get to ./fastboot flash system system.img
I keep getting this error
"Mismatched PIV partition name for system
Invalid PIV image: system"
I can successfully flash all other commands except this one. I went into the .xml file and deleted the "getvar" portion already. Any help?
Click to expand...
Click to collapse
not sure about the error sorry. also you might want to click on the reply button so it appears as a notification for me or i might not ever look at the thread again if i forget, jsut fyi.
are you sure you are using the right fxz for your phone? also when you run manual commands in fastboot, the xml file doesn't matter. that file is just there for rsd and other programs to use (it is basically just a script of commands that gets called on by programs to run). i don't know if you are typing "./fastboot" instead of just "fastboot" in cmd prompt but you only need to type "fastboot flash system system.img"
jayboyyyy said:
not sure about the error sorry. also you might want to click on the reply button so it appears as a notification for me or i might not ever look at the thread again if i forget, jsut fyi.
are you sure you are using the right fxz for your phone? also when you run manual commands in fastboot, the xml file doesn't matter. that file is just there for rsd and other programs to use (it is basically just a script of commands that gets called on by programs to run). i don't know if you are typing "./fastboot" instead of just "fastboot" in cmd prompt but you only need to type "fastboot flash system system.img"
Click to expand...
Click to collapse
Thanks for the fyi didn't know. I've tried flashing both fxz's for my phone and nothing both keep saying the same error Mismatched PIV. Thanks for the schooling on the xml file didn't know that. Going to keep searching.
AceBoonKoon said:
Thanks for the fyi didn't know. I've tried flashing both fxz's for my phone and nothing both keep saying the same error Mismatched PIV. Thanks for the schooling on the xml file didn't know that. Going to keep searching.
Click to expand...
Click to collapse
both? you can't just flash both like that. are you sure you are doing all of this right? one for your phone is a different FW version than the other one. This could be why you are getting this mismatch. Also, you would need to unzip and move all of the files to the directory that your fastboot is in. Then if you were trying to flash a different fxz, you would need to remove the old files from that directory and replace them with the new fxz files.
Finally, the commands to run manually will be found at this link. http://forum.xda-developers.com/showthread.php?p=46712761&highlight=flash+stock#post46712761
jayboyyyy said:
both? you can't just flash both like that. are you sure you are doing all of this right? one for your phone is a different FW version than the other one. This could be why you are getting this mismatch. Also, you would need to unzip and move all of the files to the directory that your fastboot is in. Then if you were trying to flash a different fxz, you would need to remove the old files from that directory and replace them with the new fxz files.
Finally, the commands to run manually will be found at this link. http://forum.xda-developers.com/showthread.php?p=46712761&highlight=flash+stock#post46712761
Click to expand...
Click to collapse
Now it's saying that can't downgrade when trying to flash the bootloader and it still won't flash the system.img same error.
I think I messed up when I tried to flash the "newer" FXZ. To see if I could get it to go through.
AceBoonKoon said:
I think I messed up when I tried to flash the "newer" FXZ. To see if I could get it to go through.
Click to expand...
Click to collapse
ya you can't flash the old one anymore. it will fail. you should be able to flash the new system img though. just make sure you are using the right one for your device. couldn't find anything on the internet for that particular error. So not many people run into it. It has to be something you are doing. try redownloading the fxz (the correct new fxz for your phone) and then start over from the beginning of the code and flash all the new stuff.
jayboyyyy said:
ya you can't flash the old one anymore. it will fail. you should be able to flash the new system img though. just make sure you are using the right one for your device. couldn't find anything on the internet for that particular error. So not many people run into it. It has to be something you are doing. try redownloading the fxz (the correct new fxz for your phone) and then start over from the beginning of the code and flash all the new stuff.
Click to expand...
Click to collapse
The fastboot flashes through every command flawlessly all EXCEPT the system.img. Keeps saying the bootloader preauthorization failed. I've flashed it every which way, straight through, at random, only the recovery, bootloader, and system.img. Can't get it to play nice.
I did read somewhere that mac fastboot had an issue with how large the system file was for VZW's moto x and couldn't flash it. Someone said that rsd lite breaks it up into smaller pieces in order to get it to flash. I wonder if there is a manual way to do this?
AceBoonKoon said:
The fastboot flashes through every command flawlessly all EXCEPT the system.img. Keeps saying the bootloader preauthorization failed. I've flashed it every which way, straight through, at random, only the recovery, bootloader, and system.img. Can't get it to play nice.
I did read somewhere that mac fastboot had an issue with how large the system file was for VZW's moto x and couldn't flash it. Someone said that rsd lite breaks it up into smaller pieces in order to get it to flash. I wonder if there is a manual way to do this?
Click to expand...
Click to collapse
forgot you were using a mac. just throw that thing away and get a big boy computer. lol. jk. don't need to start hearing a bunch of people chime in but here is a link to a fastboot file that splits it up for you. don't know if it will help or not.
http://forum.xda-developers.com/showthread.php?t=2489249
jayboyyyy said:
forgot you were using a mac. just throw that thing away and get a big boy computer. lol. jk. don't need to start hearing a bunch of people chime in but here is a link to a fastboot file that splits it up for you. don't know if it will help or not.
http://forum.xda-developers.com/showthread.php?t=2489249
Click to expand...
Click to collapse
I went and downloaded the "motofastboot-olympus" file and extracted the Linux fastboot file and placed in my folder replacing the current fastboot and now when I try to run a fastboot command I get "./fastboot: cannot execute binary file" I've tried the "Darwin" fastboot as well same thing.
AceBoonKoon said:
I went and downloaded the "motofastboot-olympus" file and extracted the Linux fastboot file and placed in my folder replacing the current fastboot and now when I try to run a fastboot command I get "./fastboot: cannot execute binary file" I've tried the "Darwin" fastboot as well same thing.
Click to expand...
Click to collapse
i see that you actually searched for this answer because i went to that mac thread i remembered seeing to see if there was a solution there. so you can just factory reset the device right? you don't need the system.img there to factory reset i don't think. just try a factory reset.
just found this. try downloading the nexus for stuff. pull the fastboot-mac file or whatever it is out of it. run all your commands with the "./fastboot-mac" and see if it works now.
jayboyyyy said:
i see that you actually searched for this answer because i went to that mac thread i remembered seeing to see if there was a solution there. so you can just factory reset the device right? you don't need the system.img there to factory reset i don't think. just try a factory reset.
Click to expand...
Click to collapse
I've been searching all day for all of these answers. Just thought it would help to ask as well.
I found the solution to my problem. For any of those who are having trouble flashing back to stock ON A MAC It will not flash because the system.img file is TOO BIG you need the CORRECT version of Moto-Fastboot. Here's the link that you can download and place it in your "Fastboot" folder. http://forum.xda-developers.com/showthread.php?t=1138092
I suggest you hold on to that fastboot for future flashes/return to stock. Thank you for your help jayboyyyy!
AceBoonKoon said:
I've been searching all day for all of these answers. Just thought it would help to ask as well.
I found the solution to my problem. For any of those who are having trouble flashing back to stock ON A MAC It will not flash because the system.img file is TOO BIG you need the CORRECT version of Moto-Fastboot. Here's the link that you can download and place it in your "Fastboot" folder. http://forum.xda-developers.com/showthread.php?t=1138092
I suggest you hold on to that fastboot for future flashes/return to stock. Thank you for your help jayboyyyy!
Click to expand...
Click to collapse
nice find. im going to update that thread i made with this link instead of the link i had because it seems to have fastboot for everyone.
Hey guys. So I've been trying to manually update with no success so far. I was going to sideload, but I got the November security update ota and there is no ota file for LMY48X to Marshmallow (as far as I know). So I bit the bullet and unlocked the bootloader yesterday, and got the adb and fastboot set up and tried to run the ./flash-all.sh command. (I'm on a Mac) Everything was going fine until I came across an error. So I basically gave up and restored all my user data.
Today I figured I'd try again since I have already unlocked my bootloader and have nothing to lose. mra58k didn't work, so I figured I'd try the mra58n image and removed the -w command from the flash-all.sh and tried again. This is what I got:
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
fastboot(69137) malloc: *** mmap(size=2094391296) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
failed to allocate 2092296104 bytes
error: update package missing system.img
Can anyone help me out? I have a feeling I won't be getting the ota through my phone anytime soon.
I may be wrong as this is a pure guess, but did you check the download to confirm it met the checksum? You might just try deleting your download and redownloading the latest version.
haibane said:
I may be wrong as this is a pure guess, but did you check the download to confirm it met the checksum? You might just try deleting your download and redownloading the latest version.
Click to expand...
Click to collapse
No it is Google. Same here. Flashall.bat stops after flashing m-bootloader and m-radio.
After that it is needed to extract all the images and fastboot flash every image.
Don't use the flash-all.sh file to flash, flash the files manually. Plenty of guides outline the commands to use. Plus, make sure that you're Android SDK Tools is updated to the latest version.
RMarkwald said:
Don't use the flash-all.sh file to flash, flash the files manually. Plenty of guides outline the commands to use. Plus, make sure that you're Android SDK Tools is updated to the latest version.
Click to expand...
Click to collapse
Thanks for the reply. So I went ahead and followed your advice and tried to do it manually. I checked everything was up to date. I flashed the bootloader, radio, recovery and boot images and rebooted the bootloader between every flash with no incident. Then I tried to flash the system.img and it first everything seemed to be ok but the terminal is stuck at "sending sparse 'system' " and hasn't done anything in 20 minutes. I'm afraid to do anything right now. Is it ok to close terminal, reopen it and try flashing the system.img again?
ICStevenC. said:
Thanks for the reply. So I went ahead and followed your advice and tried to do it manually. I checked everything was up to date. I flashed the bootloader, radio, recovery and boot images and rebooted the bootloader between every flash with no incident. Then I tried to flash the system.img and it first everything seemed to be ok but the terminal is stuck at "sending sparse 'system' " and hasn't done anything in 20 minutes. I'm afraid to do anything right now. Is it ok to close terminal, reopen it and try flashing the system.img again?
Click to expand...
Click to collapse
Hmmm...the system.img does take time but shouldn't take 20 minutes. Did you flash all the .img files separately, or did you use the command:
Code:
fastboot -w update image-shamu-mra58n.zip
?
I've never done any of this from a Mac, only Linux and Windows, but here's what I do when flashing manually. I extract the contents of the factory image zip, AND the image-shamu-mra58n.zip into my SDK directory (see image attached).
Once everything is extracted, after backing up things I wanna save on my device, I boot to the bootloader and go to town:
Code:
fastboot erase boot
Code:
fastboot erase cache
Code:
fastboot erase recovery
Code:
fastboot erase system
Code:
fastboot erase userdata
Code:
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.15.img
Code:
fastboot reboot-bootloader
Code:
fastboot flash radio radio-shamu-d4.01-9625-05.27+fsg-9625-02.104.img
Code:
fastboot reboot-bootloader
Code:
fastboot flash system system.img
Code:
fastboot flash boot boot.img
Code:
fastboot flash recovery recovery.img
Code:
fastboot flash cache cache.img
Code:
fastboot flash userdata userdata.img
Code:
fastboot reboot
RMarkwald said:
Hmmm...the system.img does take time but shouldn't take 20 minutes. Did you flash all the .img files separately, or did you use the command:
Code:
fastboot -w update image-shamu-mra58n.zip
?
Click to expand...
Click to collapse
No, I decompressed that zip and flashed them all separately using the
Code:
./fastboot flash
command and dragging the files directly to the terminal and then using
Code:
./fastboot reboot-bootloader
in between every flash.
ICStevenC. said:
No, I decompressed that zip and flashed them all separately using the
Code:
./fastboot flash
command and dragging the files directly to the terminal and then using
Code:
./fastboot reboot-bootloader
in between every flash.
Click to expand...
Click to collapse
Okay, seems like you're on the right path. See my post above. You'll erase everything first, then flash everything back one by one, kinda like what you are already doing. I've never had issues doing it this way ever, it may be overkill and it will wipe your phone completely, but if you've backed things up (pictures, docs, music, etc) beforehand, no biggie. The only times I reload the bootloader is after flashing the bootloader, and then the radio.
The system.img will take the longest, and userdata will take a little time too, but the others should be almost instant.
RMarkwald said:
Okay, seems like you're on the right path. See my post above. You'll erase everything first, then flash everything back one by one, kinda like what you are already doing. I've never had issues doing it this way ever, it may be overkill and it will wipe your phone completely, but if you've backed things up (pictures, docs, music, etc) beforehand, no biggie. The only times I reload the bootloader is after flashing the bootloader, and then the radio.
The system.img will take the longest, and userdata will take a little time too, but the others should be almost instant.
Click to expand...
Click to collapse
The terminal doesn't appear to be responding to any command now. I tried erasing boot and after pressing enter, nothing happened. Closing it and reopening it doesn't help. Should I try restarting my computer?
ICStevenC. said:
The terminal doesn't appear to be responding to any command now. I tried erasing boot and after pressing enter, nothing happened. Closing it and reopening it doesn't help. Should I try restarting my computer?
Click to expand...
Click to collapse
Yeah, give that a shot. As long as you have bootloader access you will be okay.
RMarkwald said:
Yeah, give that a shot. As long as you have bootloader access you will be okay.
Click to expand...
Click to collapse
I am now on 6.0 and everything appears to be functional. Thank you so much for all your help! I really appreciate it.
Awesome man! Glad I could help.
I have been away from Android for a little while - but I'm coming to sell my Nexus 6, and so I'm attempting to flash the latest OS from google.
I downloaded 6.0.1 from google, and then worked through these steps:
fastboot flash bootloader C:/image-shamu-XXXXXX/bootloader.img
fastboot reboot-bootloader
fastboot flash radio C:/image-shamu-XXXXXX/radio.img
fastboot reboot-bootloader
fastboot flash system C:/image-shamu-XXXXXX/system.img
Yes, there are more steps, but I just can't get to them! Once I flash system I get the following...
target reported max download size of 536870912 bytes
sending sparse 'system' (517178 KB)...
OKAY [ 25.080s]
writing 'system'...
OKAY [ 7.142s]
sending sparse 'system' (515137 KB)...
OKAY [ 25.155s]
writing 'system'...
OKAY [ 7.346s]
sending sparse 'system' (515644 KB)...
Thats it, thats as far as it ever goes, then I just sit there waiting, waiting, and nothing happens.
Any suggestions?
Updated Android SDK Tools to make sure you have the latest fastboot? If you haven't updated, update these.
Here's the commands I run, keep in mind this will completely wipe all data/apps/files from the device, so backup anything you want saved to a computer before doing this. Is it overkill? Sure, but I've never had an issues across multiple devices, so since, for me at least, if it isn't broke I'll keep doing this:
Erase:
Code:
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot erase userdata
Flash bootloader:
Code:
fastboot flash bootloader "name of bootloader"
fastboot reboot-bootloader
Flash radio:
Code:
fastboot flash radio "name of radio"
fastboot reboot-bootloader
Flash img files:
NOTE: The system.img is large, so if your Android SDK tools isn't updated, you could get an error. This part does take a few minutes to do, so be patient and give it time to complete.
Code:
fastboot flash system system.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
Reboot device:
Code:
fastboot reboot
Just a thought, prompted by the commands in the original post referring to the C: drive. I didn't even know you could do this, though I suppose it makes sense. The easier method IMO is to copy or move all the image files to the ADB/Fastboot folder, rename them if necessary for simpler typing, then just "fastboot flash system system.img", etc., as RMarkwald says.
I doubt that it will make any difference, but since you appear to be stuck it might be worth trying - worst case, it fails again...
And just for curiosity, did you try flash-all.bat? I know that people have trouble with it and fall back on the separate flashing steps - just wondering if that's why you're doing it this way.
dahawthorne said:
Just a thought, prompted by the commands in the original post referring to the C: drive. I didn't even know you could do this, though I suppose it makes sense. The easier method IMO is to copy or move all the image files to the ADB/Fastboot folder, rename them if necessary for simpler typing, then just "fastboot flash system system.img", etc., as RMarkwald says.
I doubt that it will make any difference, but since you appear to be stuck it might be worth trying - worst case, it fails again...
And just for curiosity, did you try flash-all.bat? I know that people have trouble with it and fall back on the separate flashing steps - just wondering if that's why you're doing it this way.
Click to expand...
Click to collapse
Good call on the movement of files to the adb/fastboot folder, as that is what I do when flashing these files, and the flash-all.bat potentially causing his issues.
RMarkwald said:
Updated Android SDK Tools to make sure you have the latest fastboot? If you haven't updated, update these.
Here's the commands I run, keep in mind this will completely wipe all data/apps/files from the device, so backup anything you want saved to a computer before doing this. Is it overkill? Sure, but I've never had an issues across multiple devices, so since, for me at least, if it isn't broke I'll keep doing this:
Erase:
Code:
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot erase userdata
Flash bootloader:
Code:
fastboot flash bootloader "name of bootloader"
fastboot reboot-bootloader
Flash radio:
Code:
fastboot flash radio "name of radio"
fastboot reboot-bootloader
Flash img files:
NOTE: The system.img is large, so if your Android SDK tools isn't updated, you could get an error. This part does take a few minutes to do, so be patient and give it time to complete.
Code:
fastboot flash system system.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
Reboot device:
Code:
fastboot reboot
Click to expand...
Click to collapse
Having all kinds of trouble rerooting my 6. Will this relock the bootloader? Wanted to keep user data but if a fresh start is what I need then OK. TIA
Mongo23ny said:
Having all kinds of trouble rerooting my 6. Will this relock the bootloader? Wanted to keep user data but if a fresh start is what I need then OK. TIA
Click to expand...
Click to collapse
No, you have to run "fastboot oem lock" to lock the bootloader, not recommended.
You perform above steps, boot device and go through setup, enable USB debugging, boot to bootloader and flash TWRP, boot to TWRP. You will need to clean up some space to flash SuperSU (you'll have to remove apps from /system/app or /system/priv-app), as there will not be any space on /system to install/flash anything that needs to live there, it either won't work or error out. Once you have removed system apps and create space on /system, you can flash your SuperSU zip, then reboot the phone.
RMarkwald said:
No, you have to run "fastboot oem lock" to lock the bootloader, not recommended.
You perform above steps, boot device and go through setup, enable USB debugging, boot to bootloader and flash TWRP, boot to TWRP. You will need to clean up some space to flash SuperSU (you'll have to remove apps from /system/app or /system/priv-app), as there will not be any space on /system to install/flash anything that needs to live there, it either won't work or error out. Once you have removed system apps and create space on /system, you can flash your SuperSU zip, then reboot the phone.
Click to expand...
Click to collapse
I don't wanna relock the bootloader. Not sure what to remove from system apps, etc. This was not this difficult the first time I rooted. Thanks for any and all help.
This is off-topic from the original question, but let's go with it...
Personally I've never had to remove anything from system. Clean install, flash TWRP (or just temporarily boot into it), flash SuperSU v2.67. Job done. Since it (probably) doesn't try to install into system, there shouldn't be any problem.
@dannstarr - you haven't answered my question.
dahawthorne said:
This is off-topic from the original question, but let's go with it...
Personally I've never had to remove anything from system. Clean install, flash TWRP (or just temporarily boot into it), flash SuperSU v2.67. Job done. Since it (probably) doesn't try to install into system, there shouldn't be any problem.
@dannstarr - you haven't answered my question.
Click to expand...
Click to collapse
Do I keep system read only in twrp 3.0.0.0?
Disregard, did everything suggested by rmarkwald and dahawthorne. Worked well, took some security update that happened to get rid of the corrupt phone boot message. Flashed twrp 3.0.0.0 and installed SuperSU 2.67 with no problems. Thanks all.
I can't work out what's going on.
My phone lost it's root a few days ago - I only noticed when Magisk said it had a new one. So here's the lowdown:
My TWRP is out of date.
Magisk is out of date.
I've downloaded both the magisk.zip file and an img file of the latest TWRP.
I put them on the deskop, in the adb folder (in C drive) and on the phone under "downloads".
Boot into recovery, but when I navigate to install a zip file, it can only see the system files, no "downloads" folder or pictures or anything. I can't seem to change that.
Use Powershell to try and sideload the TWRP zip and it says "waiting for device" - that seems good. However, when i then boot into fastboot mode, Powershell tells me "error: cannotload twrp... .img"
So I try and look at Magisk, but I can only download the zip (of which I've done and can't flash it via recovery), or patch boot file, of which I can't navigate to as I'm currently not rooted so it can't find the boot file anyway.
What do I type into Powershell to flash the latest Magisk (I guess I can then update TWRP after using the in-
built updater?)?
When in TWRP, I click on the three lines on the right, which say:
Could not muont /data and unable to find crypto footer.
Failed to mount '/data' (no such process)
Unable to recreate /data/media folder,.
Updating partition details
Failed to mount '/data' (no such process)
... done
Unable to mount storage
Failed to mount '/data' (no such process)
Full SELinux support is present
Unable to mount /data/media/TWRP/.twrps
MTP Enabled
Failed to mount '/data' (no such process)
Click to expand...
Click to collapse
What can be causing all of this?
Probably rip UFS chip, if
Code:
fastboot format userdata
won't help, then you should send your phone for repair
Hmm.
So the only fix is to format all the data?
What data gets deleted?
I don't really want to do that if I can help it but I guess it's the only way to fix it.
Strange how it's just done it by itself.
anotherxdauser said:
Hmm.
So the only fix is to format all the data?
What data gets deleted?
I don't really want to do that if I can help it but I guess it's the only way to fix it.
Strange how it's just done it by itself.
Click to expand...
Click to collapse
Is the system bootable? If yes, then you can make a backup, if not, then you can consider your data gone.
"format userdata" removes everything you have stored on the phone
Yeah, I can boot to my Resurrection Remix rom and see everything, all my files, it's fine.
I can connect to a PC and move files to and fro the device.
It's just TWRP doesn't seem to see the storage. When looking, it just says 0Mb :S
Does Userdata mean the apps and stuff as well?
I saw a video of someone formatting the userdata to ex2, then back to ex4 but if it means I'd have to reinstall RR then it's a lot of work for something that may happen again in the near future.
I have Titanium Backup but of course, it needs root, of which I can't gain :/
Sounds a lot like a failed decrypt of an encrypted userdata partition, this is common in this phone with TWRP and custom ROMs.
Skickat från min ONEPLUS A3003 via Tapatalk
pitrus- said:
Sounds a lot like a failed decrypt of an encrypted userdata partition, this is common in this phone with TWRP and custom ROMs.
Click to expand...
Click to collapse
Is there non-destructive way to fix?
Oh, ok, I thought that the system is broken too. That's ok then, your memory chip is fine.
Can you boot an up-to-date TWRP from fastboot and try to access data?
Try with
Code:
fastboot boot twrp-3.2.3-0-oneplus3.img
Which TWRP version do you have exactly?
Sent from my ONEPLUS A3003 using Tapatalk
przemcio510 said:
Oh, ok, I thought that the system is broken too. That's ok then, your memory chip is fine.
Can you boot an up-to-date TWRP from fastboot and try to access data?
Try with
Code:
fastboot boot twrp-3.2.3-0-oneplus3.img
Click to expand...
Click to collapse
Yeah, try this first. Problably you have a twrp lower than 3.2.0? I think below that it cannot decrypt Oreo encrypted Partitions.
Second thing is. Probably you have to format Data (not Userdata) anyway. I think you probably tried to upgrade Magisk because you lost root. But Magisk hat a bug in 17.0. That corrupted the permission Database. I had the same problem and was not able to get root again until formatted data. You will loose every app and its setting when formatting it. But everything under sdcard/ will still be there. So the download folder should be fine and everything. So when you make a titanium backup of your most valuable apps. You can restore them after renewing your phone.
TLDR:
1. Make Titanium Backup if you have it and want to have your apps back as before.
2. Try przemcio510 suggestion to get new TWRP. (most important)
3. backup your partitions and copy them to your pc
4. backup everything importantto you on your "SDCard" Volume (Where Download is and everything)
5. format DATA, Cache, Dalvik/ART Cache, System
4. Reflash Full OxygenOS 5.0.5
(optional) 5. Flash Rom of your flavor (with/without Gapps)
(optional) 6. Flash magisk
7. boot up your device
przemcio510 said:
Oh, ok, I thought that the system is broken too. That's ok then, your memory chip is fine.
Can you boot an up-to-date TWRP from fastboot and try to access data?
Try with
Code:
fastboot boot twrp-3.2.3-0-oneplus3.img
Click to expand...
Click to collapse
Did this. ADB said it was "waiting for device" so I rebooted to fastboot but then the ADB window shows some options (see quote below), nothing to show it's done anything.
I put the img file on the sim card on the phone and in the directory of the adb.
Code:
PS C:\WINDOWS\system32> fastboot twrp-3.2.3-0-oneplus3.img
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
PS C:\WINDOWS\system32>
RASTAVIPER said:
Which TWRP version do you have exactly?
Click to expand...
Click to collapse
3.1.1-0
S4RGE said:
TLDR:
1. Make Titanium Backup if you have it and want to have your apps back as before.
2. Try przemcio510 suggestion to get new TWRP. (most important)
3. backup your partitions and copy them to your pc
4. backup everything importantto you on your "SDCard" Volume (Where Download is and everything)
5. format DATA, Cache, Dalvik/ART Cache, System
4. Reflash Full OxygenOS 5.0.5
(optional) 5. Flash Rom of your flavor (with/without Gapps)
(optional) 6. Flash magisk
7. boot up your device
Click to expand...
Click to collapse
My Titanium Backup needs root to work :/
It might have been when I upgraded RR Rom to the Oreo release, but it's only been the past week when I mysteriously lost root access.
anotherxdauser said:
Did this. ADB said it was "waiting for device" so I rebooted to fastboot but then the ADB window shows some options
Click to expand...
Click to collapse
To be clear, I think you mean fastboot whenever "ADB" is mentioned above. adb and fastboot are related, but 2 different things, with different usages and requirements. So it's best to refer to them in correct and distinct terms.
adb: Needs debugging enabled. Will work only in OS or custom recovery. Will not work in bootloader (even in fastboot mode) - maybe this is why you have "waiting for device"?
fastboot: Does not need debugging enabled. Only works in bootloader-fastboot mode.
fastboot is what you want for booting/flashing TWRP. Not adb (at least for the commands/methods suggested here).
anotherxdauser said:
PS C:\WINDOWS\system32> fastboot twrp-3.2.3-0-oneplus3.img
Click to expand...
Click to collapse
When command prompt shows you the list of command, this almost always means your command syntax is incorrect.
In your case, you used typed "fastboot" and a file name, without telling it what to do with that file name. The suggested command was "fastboot boot filename" (no quotes) or another usage option is "fastboot flash filename".
A little confusing I know, "fastboot" in itself is not a full command/action. I has to be "fastboot boot". Think of fastboot as a "thing" instead of an action. Thus, you still need to tell fastboot to perform an action ("boot").
anotherxdauser said:
...
3.1.1-0
My Titanium Backup needs root to work :/
It might have been when I upgraded RR Rom to the Oreo release, but it's only been the past week when I mysteriously lost root access.
Click to expand...
Click to collapse
Ah right I forgot.
As redpoint73 mentioned you have to be in fastboot mode.
When you start up your phone and the unlock Warning ist triggered. Push the volume up or down button and go to fastboot.
When you are in there the fastboot command should work.
As redpoint73 pointed out it is very important that you type "fastboot boot (ImagePath)".
To make it easier for you, you should copy the image where fastboot is.
Then you have only to enter
fastboot boot twrp-3.2.3-0-oneplus3.img
This should do the trick. If you still need help. Don't hesitate to ask.
redpoint73 said:
To be clear, I think you mean fastboot whenever "ADB" is mentioned above. adb and fastboot are related, but 2 different things, with different usages and requirements. So it's best to refer to them in correct and distinct terms.
In your case, you used typed "fastboot" and a file name, without telling it what to do with that file name. The suggested command was "fastboot boot filename" (no quotes) or another usage option is "fastboot flash filename".
Click to expand...
Click to collapse
Sorry my explanation isn't that great.
Whenever I've mentioned adb it's the dos/command prompt window.
Fastboot is that small menu where it shows whether the device bootloader is locked or not isn't it?
At any rate, tried "fastboot boot twrp-3.2.3-0-oneplus3.img" and the command prompt window shows "waiting for device". My device is on, at the homescreen, doing nothing. The command prompt window stays like that until I boot into fastboot mode, where it then just shows the large list of commands quoted above.
HOWEVER, a development!
When in fastboot mode and using the "fastboot boot twrp-3.2.3-0-oneplus3.img" command, the window now says "cannot load 'twrp-3.2.3-0-oneplus3.img': No such file or directory". So I tried typing the exact file path (C:\adb\twrp... img), which has now allowed me to boot into the updated TWRP.
Does this mean it's just booted into it, but not updated to it?
I'm able to see the contents of my sdcard now. So flashed the latest 17.1 magisk zip and... success! I'm now on the latest magisk and have been able to flash the latest TWRP to recovery.
Just to say, I really appreciate the help with this.
I know I could factory reset but it's helping me learn more.
anotherxdauser said:
Whenever I've mentioned adb it's the dos/command prompt window.
Fastboot is that small menu where it shows whether the device bootloader is locked or not isn't it?
Click to expand...
Click to collapse
You confuse some terms. adb and fastboot are programs, command prompt is the interpreter of the commands you give to these programs.
And yes, the fastboot is that mode.
anotherxdauser said:
At any rate, tried "fastboot boot twrp-3.2.3-0-oneplus3.img" and the command prompt window shows "waiting for device". My device is on, at the homescreen, doing nothing. The command prompt window stays like that until I boot into fastboot mode, where it then just shows the large list of commands quoted above.
Click to expand...
Click to collapse
Fastboot mode is meant to be used while phone is booted into fastboot mode
anotherxdauser said:
When in fastboot mode and using the "fastboot boot twrp-3.2.3-0-oneplus3.img" command, the window now says "cannot load 'twrp-3.2.3-0-oneplus3.img': No such file or directory". So I tried typing the exact file path (C:\adb\twrp... img), which has now allowed me to boot into the updated TWRP.
Click to expand...
Click to collapse
"no such file" means that you could have not copied the img file to the same folder as the adb binary (this is not the case when adb and fastboot binaries are installed with %PATH% variable added, then you can use these commands all over the filesystem).
anotherxdauser said:
Does this mean it's just booted into it, but not updated to it?
Click to expand...
Click to collapse
Fastboot boot command, which I have provided earlier is used to boot temporarily, one time an image you tell it to.
anotherxdauser said:
Just to say, I really appreciate the help with this.
Click to expand...
Click to collapse
Just kindly informing that there is a button on the lower-right hand corner for this
anotherxdauser said:
Whenever I've mentioned adb it's the dos/command prompt window.
Fastboot is that small menu where it shows whether the device bootloader is locked or not isn't it?
Click to expand...
Click to collapse
Both adb and fastboot are command prompt functions. They are both "bridge" tools used to communicate from computer to the phone.
The phone menu screen you are referring to is bootloader. Fastboot is one of the choices on that (bootloader) menu. It puts the phone in fastboot mode, which is specifically intended for fastboot commands (only mode fastboot command will work). The response will always be "waiting for device" if you try fastboot commands, and not in fastboot mode.
If the command is "fastboot . . . " you are issuing fastboot commands (not adb).
If the command is "adb . . . " you are issuing adb commands.
Again, they are both related, but different. Different requirements and usages for adb versus fastboot. It is important to understand the distinction, so you don't waste more time trying command in the wrong mode (which will never work).