Update 11-26-2012
The issue that this procedure was designed to overcome has been resolved in the latest version of CWM (6.0.1.9 or newer). Please view http://forum.xda-developers.com/showthread.php?t=1781899 for details and download links. If you do not want to upgrade to the latest CWM the directions below will still work but you should really just update.
Background
Due to the multi-user support capabilities of Android 4.2(+) the clockworkmod directory created by ClockworkMod and used to store downloads and backups is being created in /data/media. Unfortunately this directory is not accessible to individual users and therefore backups created in recovery can not be viewed or modified by ROM Manager and vice versa. ROM Manager will look for the directory /data/media/<user number> (e.g. /data/media/0) to which /sdcard is mounted when you are logged in as the user whose number is <user number> (e.g. 0).
Requirements
ClockworkMod Recovery installed and functioning
ROM Manager
ADB installed on your computer and functioning
Willingness to accept that you are on your own and I am not responsible if you mess something up!
Solution
1. Boot into CWM recovery
2. Attach your Nexus 7 to your computers USB port
3. Open an ADB shell using a console from your computer
Code:
adb shell
4. Confirm that you have a clockworkmod directory at /sdcard/clockworkmod (I am using user number 0 for the rest of this procedure, if you wish to use a different user substitute 0 with your user number)
Code:
cd /data/media/0
ls
4a. If you do not see a clockworkmod directory create one with the command below, otherwise proceed to step 5
Code:
mkdir /data/media/0/clockworkmod
5. See if you have a clockworkmod directory at /data/media
Code:
cd /data/media
ls
5a. If you see a clockworkmod directory type the command below, otherwise proceed to step 6
Code:
mv clockworkmod clockworkmod_bak
6. Create the symbolic link
Code:
ln -s /data/media/0/clockworkmod/ clockworkmod
7. If you already had backups in clockworkmod (now clockworkmod_bak) you can move them to the new folder by executing the following command
Code:
mv clockworkmod_bak/backup/ clockworkmod/
mv clockworkmod_bak/blobs/ clockworkmod/
mv clockworkmod_bak/download/ clockworkmod/
WARNING: I tested a backup from recovery and verified the backup was in ROM Manager, renamed the backup in ROM Manager, and confirmed the backup was renamed in recovery. Due to time constraints I did not restore the backup though I can't imagine why it would fail. As mentioned above do this at your own risk. If you do not have a unix/linux experience I would suggest that you wait for someone with experience to follow these steps (I wrote them after I did the procedure so they haven't been vetted) before you attempt it yourself.
Very helpful, i was wondering what they did to mess up clockwork mod
been trying to undo 4.2 for hours as i dont quite like it
truehybridx said:
Very helpful, i was wondering what they did to mess up clockwork mod
been trying to undo 4.2 for hours as i dont quite like it
Click to expand...
Click to collapse
I am on the fence about 4.2 myself and when I couldn't see my 4.1.2 backup I had a panic moment. I have to admit that either 4.2 is growing on me or I am already forgetting how good 4.1.2 was .
sandnap said:
I am on the fence about 4.2 myself and when I couldn't see my 4.1.2 backup I had a panic moment..
Click to expand...
Click to collapse
+1! Panic indeed! LOL
Great tutorial. Thanks and have a happy thanksgiving
Is there a way to do this without using adb? I don't know how to get it working.
It looks like you are just moving all the files from one location to another, right? If thats the case can I just move them with a file explorer? Also where are the back-ups from pre 4.2 stored, I thought it was sdcard/clockworkmod/ Can I move the back-ups from there to a data/media/clockworkmod folder?
StarOrc said:
Is there a way to do this without using adb? I don't know how to get it working.
It looks like you are just moving all the files from one location to another, right? If thats the case can I just move them with a file explorer? Also where are the back-ups from pre 4.2 stored, I thought it was sdcard/clockworkmod/ Can I move the back-ups from there to a data/media/clockworkmod folder?
Click to expand...
Click to collapse
Please see my update to the original post. Once you update to the latest CWM you can copy any existing backups to the new backup and blobs folders under /data/media/clocworkmod. This is discussed in more detail in the thread I linked to.
Code:
mv clockworkmod_bak/backup/ clockworkmod/
mv clockworkmod_bak/blobs/ clockworkmod/
mv clockworkmod_bak/download/ clockworkmod/
This is me just being nit picky, but this looks better:
Code:
mv clockworkmod_bak/* clockworkmod/
I guess for people not confident in their linux abilities that '*' misplaced could be deadly though...anyway thanks for the simple and great workaround/explanation.
Wiping/ Factory resets (in CWM or TWRP) don't erase this data folder? Are we confident in this?
255|[email protected]:/data/media/clockworkmod # mv backup/ /sdcard/clockworkmod/
failed on 'backup/' - Cross-device link
How are you able to move the directories?
This seriously annoys me. Despite the recent surge of newer android devices not containing any sd card slots for secure file storage away from ROM flashing, everything is now embedded. I have had several accidental internal storage deletions containing backups and roms and no the clockworkmod is even harder to locate and backup conveniently through usb/ftp. Thanks for the tut.
TheAtheistReverend said:
Wiping/ Factory resets (in CWM or TWRP) don't erase this data folder? Are we confident in this?
Click to expand...
Click to collapse
Yeah i am wondering that too.it doesnt feel safe for me that the backups are in the system but not in sdcard.
nexus file locations
On the nexus devices (certainly the 7, which has no external sdcard), the only real mounted portions are cache, system and data. Locations like /sdcard/ /storage/emulated/0 etc. are all fuse mounted from /data/media
Supposedly most of the data portion will survive flashing new ROMs and recoveries, everything except unlocking the boot loader, which wipes data f to meet the android security model.
Doesn't feel very safe, though.
amp said:
This seriously annoys me. Despite the recent surge of newer android devices not containing any sd card slots for secure file storage away from ROM flashing, everything is now embedded. I have had several accidental internal storage deletions containing backups and roms and no the clockworkmod is even harder to locate and backup conveniently through usb/ftp. Thanks for the tut.
Click to expand...
Click to collapse
I would use TWRP. I have switched and never looked back. It has quite a few more advanced options that I didn't see with clockworkmod, and overall has be MUCH more reliable.
The clockworkmod recovery issue stated in this thread does not affect TWRP at all.
Thanx for this, it seems to work even for the latest CWM.
Sent with desire from My One
angusc said:
Thanx for this, it seems to work even for the latest CWM.
Sent with desire from My One
Click to expand...
Click to collapse
Iget an error: Read-only File system :crying:
fokus said:
Iget an error: Read-only File system :crying:
Click to expand...
Click to collapse
If doing commands with adb did you remember to use
adb shell
And check that your command line starts with #......
Sent with desire from My One
angusc said:
If doing commands with adb did you remember to use
adb shell
And check that your command line starts with #......
Sent with desire from My One
Click to expand...
Click to collapse
Yes, that is exactly what i did.
I am on ARHD 11.0
S-off
ElementalX 2.2
I'm on ARHD 11.0 as well.
Strange, I followed the OP from step 1 to 6. I couldn't get step 7 to work so I just used my root explorer to copy the directory contents across in to the newly created clockworkmod folder, then deleted the clockworkmod.bak directory and all was good.
Tip: copy and paste each cmd from the OP in to your adb commands window......
Sent with desire from My One
angusc said:
I'm on ARHD 11.0 as well.
Strange, I followed the OP from step 1 to 6. I couldn't get step 7 to work so I just used my root explorer to copy the directory contents across in to the newly created clockworkmod folder, then deleted the clockworkmod.bak directory and all was good.
Tip: copy and paste each cmd from the OP in to your adb commands window......
Sent with desire from My One
Click to expand...
Click to collapse
THX. That is what i did. I also tried it via Terminal on the device - same error: System read only... hmmm
EDIT: Works fine now after e vew reboots. THX
Related
**Disclaimer** If you don't understand what follows, don't attempt this. I'm not responsible for you softbricking your device,
This is a quick guide for how to install the new android without losing anything. You'll need fastboot for this. Also, before doing this, be sure to download the supersu cwm update zip, and have it on your sdcard. Make sure you also already have a custom recovery installed (I did twrp, but i'm sure cwm will work just as well). I would also suggest having a backup done, through titanium backup and through recovery, just incase.
First, download the factory images for the n7 from google's website. Decompress them (if you're in windows, you'll need winrar or something similar.) After you decompress the archive, there'll be another one inside (image-nakasi-jop40c.zip), decompress this one as well. Under here, you'll see the .img files for all the partitions. For now, go up one directory. You'll also see here bootloader-grouper-4.13.img. Once you have all this, reboot into the bootloader.
Once you're in the bootloader, you can update the bootloader to the new version (this step isn't needed, but I did it anyways). Plug into your pc, and type fastboot devices. Make sure it's not blank. If it is, you have to update drivers. If you can see the device, open up a command prompt, and cd to the directory that has the bootloader-grouper file. Type the following:
fastboot flash bootloader-grouper-4.13.img
then, after it's done, type:
fastboot reboot-bootloader
Now, you'll be booted back into the bootloader, it'll say 4.13. On to the rom.
cd into the folder image-nakasi-jop40c (make sure you see the files system.img and boot.img before you continue. If you don't see them, the next steps will do nothing but erase your kernel and system parition.)
now, you see the image files. Type the following (still in the bootloader)
fastboot erase system
fastboot flash system system.img
wait until it completes, then type:
fastboot erase boot
fastboot flash boot boot.img
Once this is done, hit the volume up on the device until it shows recovery mode on the top. When it does, push the power key and you'll boot into your recovery (shouldn't be touched.) Inside here, flash the supersu cwm zip file, which'll flash the superuser binary, and supersu. Once this is done, do a factory reset (removing your data and cache.) Boot into the rom.
Once it's booted, you'll notice your internal sd card appears to be empty (mine did, I was worried at first.) For some odd reason, it moved the entire contents of my sdcard into a folder on it called 0. When you get back into android, simply move the folder all up one level so they're in the proper place. You now have the rom booted, rooted, with all your data. Now, you can do a titanium restore to get all your stuff back.
My first boot got stuck for some reason. if it happens to you, just hold the power button and hard reboot. (I did this on 2 devices, it only happened to one of them, so I figured I'd give you all warning.)
Links:
SuperSu binary: https://docs.google.com/open?id=0B7a8xHNJlpgTR0ZkR1pWZWR2VzA
Google Factory Images: https://developers.google.com/android/nexus/images
Thanks for this.
I flashed the 4.2 ota in the dev section and I lost root. Can I just flash the supersu binary in cwm to regain root?
Thanks for this.. Apparently you found out too a clean 4.2 isn't rootable via typical methods.
That SuperSU package did the trick. I have to remember to keep a SuperSU binary on hand for these kinds of situations that SuperUser fails..
jefferson9 said:
Thanks for this.
I flashed the 4.2 ota in the dev section and I lost root. Can I just flash the supersu binary in cwm to regain root?
Click to expand...
Click to collapse
Yes. If you do it though cwm, you're not using any exploits, you're just inserting the superuser binary and supersu.apk into the proper places on the rom. On any nexus device, any rom, this will root it.
mstrk242 said:
Once it's booted, you'll notice your internal sd card appears to be empty (mine did, I was worried at first.) For some odd reason, it moved the entire contents of my sdcard into a folder on it called 0. When you get back into android, simply move the folder all up one level so they're in the proper place.
Click to expand...
Click to collapse
DANGER WILL ROBINSON!!
The "odd reason" is called "multiple users" - add a second user and they get a folder called 10.
tehSmoogs said:
DANGER WILL ROBINSON!!
The "odd reason" is called "multiple users" - add a second user and they get a folder called 10.
Click to expand...
Click to collapse
Exactly.
If everything goes right we should have an AOSP prerooted build in about *looks at watch* 20 minutes.... Unless there is a compile error or SU error. *laff*
Back to watching the scrolling terminal window
Just got this working on a mac...
did not update bootloader(couldnt get it to)
other than that, same commands except all fastboots are ./fastboot on a mac
the only other trick is i needed the fastboot and abd files in the jop40c folder...seems to have worked like a charm....im deff on 4.2 with su installed... and it looks like my data is still there...once google is done restoring i'll know just how sucessfull it is, but so far, seems to work!!!
kwhee07 said:
Just got this working on a mac...
did not update bootloader(couldnt get it to)
other than that, same commands except all fastboots are ./fastboot on a mac
the only other trick is i needed the fastboot and abd files in the jop40c folder...seems to have worked like a charm....im deff on 4.2 with su installed... and it looks like my data is still there...once google is done restoring i'll know just how sucessfull it is, but so far, seems to work!!!
Click to expand...
Click to collapse
I did this all on linux, just kind of adapted the guide for windows. I figured all the linux users would understand how to do it on their own. Glad to know it's the same for mac as well.
OK where did they put the developer options? Not in settings on my 32GB 4.2 device
Never mind. This: http://www.androidpolice.com/2012/1...hidden-in-android-4-2-heres-how-to-find-them/
rootbrain said:
OK where did they put the developer options? Not in settings on my 32GB 4.2 device
Never mind. This: http://www.androidpolice.com/2012/1...hidden-in-android-4-2-heres-how-to-find-them/
Click to expand...
Click to collapse
Settings - about tablet - build number
push it a few times and it will enable dev options
You have .bat file in the package.
Why so complicated?
I downloaded 4.2 from here:
http://android.clients.google.com/p...gned-nakasi-JOP40C-from-JZO54K.094f6629.zipia
I then just flashed it from recovery via CWM.
Done.
CWM asked me if I wanted to maintain root and of course I chose the correct answer on this, so now my N7 is running on a rooted 4.2.
Here is my method:
1. Download official 4.1.2 from http://forum.xda-developers.com/showthread.php?t=1929270 and 4.2 OTA image from http://forum.xda-developers.com/showthread.php?t=1989188
2. Boot into CWM (i have CWM touch installed)
3. Clear data and install 4.1.2, don't forget to turn on root in the installer
4. reboot check that root is fully working
5. reboot into recovery install 4.2
6. before reboot CWM will ask to disable recovery flash and protect root. Ansver yes to both questions
I'm confused, it says if you are already on a custom rom, just flash as usual.
What makes this different?
I was on stock ROM rooted with some system modifications, and this wwadd the only way I could get the update working...
Sent from my Nexus 7 using xda app-developers app
mstrk242 said:
For some odd reason, it moved the entire contents of my sdcard into a folder on it called 0. When you get back into android, simply move the folder all up one level so they're in the proper place. You now have the rom booted, rooted, with all your data. Now, you can do a titanium restore to get all your stuff back.
Click to expand...
Click to collapse
So I'm at the step listed above. I have 4.2 on my device but I can't seem to find this "0" folder. I'm browsing the /sdcard folder via adb shell. Am I looking at the wrong place? Do I have have the incorrect permissions? Or might it not be there?
Thanks.
Ill have to wait until a rooted rom is created, I have no comp.
Sent from my Nexus 7 using XDA Premium HD app
can I install image-nakasi-jop40c.zip directly without upgrading bootloader?
Zuk. said:
So I'm at the step listed above. I have 4.2 on my device but I can't seem to find this "0" folder. I'm browsing the /sdcard folder via adb shell. Am I looking at the wrong place? Do I have have the incorrect permissions? Or might it not be there?
Thanks.
Click to expand...
Click to collapse
Not advisable to move this folder - if it got moved to a new location by the o/s then there's probably a good reason why - maybe like 4.2 introducing multiple users
Each user appears to get their own "home" directory created in /mnt/shell/emulated/
Default user dir is "0"
Second user dir is "10"
Each contain the standard dir's from 4.1 and earlier.
Travelawyer said:
Why so complicated?
I downloaded 4.2 from here:
http://android.clients.google.com/p...signed-nakasi-JOP40C-from-JZO54K.094f6629.zip
I then just flashed it from recovery via CWM.
Done.
CWM asked me if I wanted to maintain root and of course I chose the correct answer on this, so now my N7 is running on a rooted 4.2.
Click to expand...
Click to collapse
You had two extra characters at the end of your link, but I fixed it above and it's good to go for others in the future. Just flashed it in TWRP, it didn't ask if I wanted to maintain root, hit reboot when it was complete and lost root, so it doesn't work for everyone - good news is that all my data remained intact without having to resort to advanced restoring my data from a backup....
When I tried the SuperSU binary root flash trick, I finally got root back. But don't think it's as easy to get to recovery! I had to obtain the TWRP Recovery one more time since it wiped it and put in place a recovery that did absolutely nothing but reboot the device after a few minutes, so you'll have to
Code:
fastboot flash recovery openrecovery-twrp-2.3.1.1-grouper.img
to get TWRP back.... Hope that helped everyone!
My current situation is as follows:
ROM on it is bad and bootloops
Storage was wiped for a pure clean install
TWRP 2.5.0 doesn't seem to have any method to mount while in Recovery
As a result, I cannot boot it up to add the good files and I cannot mount it in Recovery to add the good files
I am at work and as such cannot use ADB.
If I can get it to mount, I can copy over the known good backups or just a known good ROM I can flash. There just doesn't seem to be any way to get it to mount in Windows 7 or 8. Does anyone have any suggestions?
rougegoat said:
My current situation is as follows:
ROM on it is bad and bootloops
Storage was wiped for a pure clean install
TWRP 2.5.0 doesn't seem to have any method to mount while in Recovery
As a result, I cannot boot it up to add the good files and I cannot mount it in Recovery to add the good files
I am at work and as such cannot use ADB.
If I can get it to mount, I can copy over the known good backups or just a known good ROM I can flash. There just doesn't seem to be any way to get it to mount in Windows 7 or 8. Does anyone have any suggestions?
Click to expand...
Click to collapse
Your only option now is to run the Stock ruu and return to stock. Theres plenty of threads on this forum that describe the procedure. You should never wipe the storage just for this reason. its much easier and less time consuming to flash a nandroid backup than having to revert back to stock via the ruu. Good luck and I hope everything works out
wranglerray said:
Your only option now is to run the Stock ruu and return to stock. Theres plenty of threads on this forum that describe the procedure. You should never wipe the storage just for this reason. its much easier and less time consuming to flash a nandroid backup than having to revert back to stock via the ruu. Good luck and I hope everything works out
Click to expand...
Click to collapse
I managed to find a machine I have sufficient privileges on for ADB. I can now push files to it. Do you know off hand what the path needed for TWRP backups is?
rougegoat said:
I managed to find a machine I have sufficient privileges on for ADB. I can now push files to it. Do you know off hand what the path needed for TWRP backups is?
Click to expand...
Click to collapse
should be /mnt/sdcard0/twrp/backups
but you wiped storage. Can you boot into fastboot? if so you can run the fastboot command
fastboot flash nameofrom.zip
you'll have to place the rom zip in the same directory as fastboot but fastboot should interrogate the zip file and flash the correct partitions
wranglerray said:
should be /mnt/sdcard0/twrp/backups
but you wiped storage. Can you boot into fastboot? if so you can run the fastboot command
fastboot flash nameofrom.zip
you'll have to place the rom zip in the same directory as fastboot but fastboot should interrogate the zip file and flash the correct partitions
Click to expand...
Click to collapse
I can get there. The issue is the one zip I have on hand doesn't seem to like being pushed that way. Rather than sit through a gig download I was just going to push a backup of stock I have on hand into the proper folder. At the very least I'd attempt it while downloading a stock+root rom.
rougegoat said:
I can get there. The issue is the one zip I have on hand doesn't seem to like being pushed that way. Rather than sit through a gig download I was just going to push a backup of stock I have on hand into the proper folder. At the very least I'd attempt it while downloading a stock+root rom.
Click to expand...
Click to collapse
ok the correct path according to my phone's file system is /sdcard/TWRP/BACKUPS
if those files don't exsist you can create them from adb shell
mk dir sdcard
cd sdcard
mk dir TWRP
cd TWRP
mk dir BACKUPS
exit out of adb shell by issuing the command exit
the
adb push nameofbackup.win /sdcard/TWRP/BACKUPS
wranglerray said:
ok the correct path according to my phone's file system is /sdcard/TWRP/BACKUPS
if those files don't exsist you can create them from adb shell
mk dir sdcard
cd sdcard
mk dir TWRP
cd TWRP
mk dir BACKUPS
exit out of adb shell by issuing the command exit
the
adb push nameofbackup.win /sdcard/TWRP/BACKUPS
Click to expand...
Click to collapse
Giving it a shot now.
Sorry my syntax was off it's mkdir without a space
Sent from my HTCONE using Xparent BlueTapatalk 2
wranglerray said:
Sorry my syntax was off it's mkdir without a space
Sent from my HTCONE using Xparent BlueTapatalk 2
Click to expand...
Click to collapse
No worries, I'm versed enough commandline wise to know what you were getting at. Unfortunately it seems that random number path for the device chunk has changed since I did my backup(probably because of my wiping and being an overall idiot). The stock+root zip of a rom finished downloading though, so I'm flashing that now. Hopefully that ends this ordeal.
(Edit) Success getting it to be usable again. Now to start from scratch. (/edit)
rougegoat said:
No worries, I'm versed enough commandline wise to know what you were getting at. Unfortunately it seems that random number path for the device chunk has changed since I did my backup(probably because of my wiping and being an overall idiot). The stock+root zip of a rom finished downloading though, so I'm flashing that now. Hopefully that ends this ordeal.
Click to expand...
Click to collapse
good luck! post your results i'd be interested in knowing how it ends up.
Hey rogue.... went through this same problem about four days ago, almost blew my brains out because I thought I would have to smash my phone and return it through the best buy protection plan. Anyways... the ONLY way to fix your problem is to use the Sprint HTC One RUU. Boot your phone into fastboot usb mode and run the RUU. Takes about 10-15 minutes, and will have you COMPLETELY back to stock. From there, you need to start from scratch unlocking and installing the recovery. ViperRom is the only rom that won't bug out your sprint phone atm. Also be sure you relocked your phone before you run the RUU. I'm super busy atm and can't go find the RUU links, but google it and i'm sure you can find it. If not, i'll get you the links later if you pm me. Peace bro and good luck.
---------- Post added at 09:57 PM ---------- Previous post was at 09:51 PM ----------
cburch85 said:
Hey rogue.... went through this same problem about four days ago, almost blew my brains out because I thought I would have to smash my phone and return it through the best buy protection plan. Anyways... the ONLY way to fix your problem is to use the Sprint HTC One RUU. Boot your phone into fastboot usb mode and run the RUU. Takes about 10-15 minutes, and will have you COMPLETELY back to stock. From there, you need to start from scratch unlocking and installing the recovery. ViperRom is the only rom that won't bug out your sprint phone atm. Also be sure you relocked your phone before you run the RUU. I'm super busy atm and can't go find the RUU links, but google it and i'm sure you can find it. If not, i'll get you the links later if you pm me. Peace bro and good luck.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2250904
I know another person suggested this earlier, but failed to mention that sideloading once you're caught in this loop won't work. Run the RUU, unlock, and flash ViperRom.
Boot TWRP, then select “Mount”, then select only “Data” and connect your HTC One to your computer.
Considering you have adb.exe (Windows, part of fastboot.zip) or on Linux:
cd Downloads\ROM.zip
adb push ROM.zip /sdcard/
Replace ROM.zip with the ROM filename you copied earlier to Downloads (or any other) folder, then install the ROM.
It should be nearly same running CWM recovery. Hope that helps.
Rooted HTC one, no os, don't know how to push rom
I accidently wiped my os while putting a new rom on. I am INCREDIBLY inexperienced with this and really had no business fooling around with it. Regardless, I have the HTC One rooted with TWRP but cant get the new rom on to the phone. I'm on a mac and android file transfer is not recognizing my phone. Any help anyone could give would be great.
Try putting the rom on a usb stick and using an otg cable then mount it under twrp and flash from there?
Sent from my HTC One using xda app-developers app
Good Info
EazyVG said:
Boot TWRP, then select “Mount”, then select only “Data” and connect your HTC One to your computer.
Considering you have adb.exe (Windows, part of fastboot.zip) or on Linux:
cd Downloads\ROM.zip
adb push ROM.zip /sdcard/
Replace ROM.zip with the ROM filename you copied earlier to Downloads (or any other) folder, then install the ROM.
It should be nearly same running CWM recovery. Hope that helps.
Click to expand...
Click to collapse
Thanks for the Info
[SOLVED]
Verizon Developer Edition. I just did a complete reset to 4.4, stock recovery and all. Booted up, got the 4.4.2 update, installed that. Flashed custom boot logo, then flashed TWRP again. Went to go wipe data/cache and accidentally wiped system. Now I've got no OS.
What do I do now? I've updated to 4.4.2 from 4.4 and can't revert back.
You'll need a good friend who can make a backup in TWRP of just the System partition. This friend probably should have an identical phone, in my case, we both have Verizon Developer Editions. He also needs to be giving you a TWRP system backup that matches what you most recently had flashed. In my case, I had just taken the 4.4.2 update. Luckily he had too already. A TWRP backup of the system partition from someone on 4.4 or 4.2.2 would, I'd guess, brick you. So best to find someone with an identical phone to you and matching software, otherwise I don't know what'd happen. There should be 3 files, a recovery.log, system.ext4.win, and system.win.md5. This is about 1GB so it'll take time to transfer/download/upload around the place.
I had downloaded the adb tools a while back from step 1 here: http://www.elementalxdesigns.com/ec...our-Moto-X-Developer-Edition-and-install-TWRP
You need adb and all the drivers and crap working for this
Put the 3 files in that folder, where adb is.
Next, boot into TWRP on your phone with no OS and make a backup of everything, should go quick as there's no system and I'd guess data is probably pretty empty...
Next, go back to TWRP main page and go to mounts, then mount the /Data partition.
Shift and right click in Windows Explorer where adb is and open command prompt, type in adb shell and you should get a prompt. Type ls and hit enter, should see contents of the /Data partition
Type cd sdcard/TWRP/BACKUPS and hit enter, then type ls and hit enter, you should see another folder named T something, this is the phone's serial number. Type "cd serial" where serial is the name of that T folder and hit enter again.
Type ls again and you should see a folder starting with 2014- or whatever year you may be reading this in... that's the folder that has the backup files you just made.
Type mkdir A and hit enter followed by typing ls again, now you should see that 2014- folder and another folder named A
Type exit to get out of shell. Now type adb push recovery.log /sdcard/TWRP/BACKUPS/XXXXXXXX/A where XXXXXXX is that T serial number, then hit enter. Should say it pushed a file in like .005s or something.
You can type adb shell again, enter, and navigate to the directory to make sure there's a recovery.log file in the A folder. If there is, good. If not, no good, you did something wrong. Don't forget to type exit to get out of shell and back into Windows command.
Now do the same for the next small file, so type adb push system.ext4.win.md5 /sdcard/TWRP/BACKUPS/XXXXXXXX/A where XXXXXXX is that T serial number, then hit enter. Should say it pushed a file in like .007s or something.
Finally, the big file. Don't panic like I did, it'll take some time, like 4 minutes maybe. Type adb push system.ext4.win /sdcard/TWRP/BACKUPS/XXXXXXXX/A where XXXXXXX is that T serial number, then hit enter. Should say it pushed a file in like 380s or something.
So, now you should have your TWRP system partition backup files in the A folder in the proper folder hierarchy. Now on the phone, just back out of mounts (hit middle button) and shut phone down and it'll warn you about there not being an OS.
Reboot recovery, Restore, you should now see the folder named A as an option. Hit that, and it should auto select System and nothing else. I did md5 check option. Slide to restore. Wait. Wait. Wait. Reboot.
If you're lucky, you'll see the boot animation and hopefully boot back into Android. It'll take a while the first go too so be patient.
Or, I have a buddy with a Verizon Dev Edition in close proximity... can he just make a backup in TWRP and then I could restore it?
Or is there a way to pull the System.img from his device and flash to mine?
Or how about the system.img from T-mobile? Could I flash that? Or... that wouldn't help would it...
CartlandSmith said:
according to this thread, you can:
[Q] Can you restore a nandroid backup on a different device?
But he needs to be on 4.4.2.
Click to expand...
Click to collapse
Yeah, he's on 4.4.2 already as well. He's making a TWRP backup of just System. So I guess I need to figure out how to get the folder hierarchy and the TWRP backup files onto my device. I assume through ADB somehow?
Also, I did grab the 4.4.2 OTA zip file before doing all this, so I have the update zip, but I don't think that helps me either does it?
Am I missing something, can't you just flash back system images from moto?
https://motorola-global-portal.custhelp.com/app/standalone/bootloader/recovery-images
Just realized only 4.4 images are posted.
fml
yeah, I realized I could just make a TWRP backup of my empty partitions to get the folder hierarchy made. So now all I should need to do is figure out how to either:
A. Push a folder and sub-folders/files via ADB or
B. Create folders in ADB then push the files to the folders
Sounding good?
GloryUprising said:
Am I missing something, can't you just flash back system images from moto?
https://motorola-global-portal.custhelp.com/app/standalone/bootloader/recovery-images
Click to expand...
Click to collapse
From all I've read and understand, once you upgrade to 4.4.2, the bootloader also gets updated, and the new bootloader isn't backwards compatible, so you can't flash any images older than 4.4.2 else you'll brick somehow.
Just out of curiosity, anyone know how long it takes for factory images to be posted? I assume a metric &#@$ tonne of crap has to be done to get the files and poo from Verizon to Motorola to host.
Yeah. I'm pretty sure TWRP has already made the folder hierarchy for me. I think I just need to get my buddy's TWRP files and then push that folder to the device via ADB with "adb push /TWRP/BACKUPS /mnt/sdcard/TWRP/BACKUPS"
Yeah, I think maybe it's a folder with the device's serial number? T-something?
Okay so can you post the hierarchy I need to make? TWRP>BACKUPS>SERIAL#>BACKUPNAME>Backup Files?
Okay, I've got his TWRP backup of just system downloaded, 3 files. I booted into TWRP recovery and in the mounts sections, I mounted data. Now I can navigate the data folders via ADB shell. I've created a new backup folder "B". Now I think I just need to push the 3 backup files into that folder. Backup folder "A" was the one I made to get TWRP to auto-make the folder hierarchy.
How do I unmount now that I've pushed files?
Not that I can find.
I've got all the files/folders pushed and made. My phone is connected via USB and is in TWRP recovery. If I hit a volume button I get a gray screen with just "Updating partition details... Full SELinux support is present." I don't know what to do from here. I can still do "adb shell" and see my data partition in my command window...
Haven't tried, afraid to lose what I've done so far. If I back out to Restore in TWRP, the directories/backups don't show. I think it's cause my /data is mounted and being used by my PC so TWRP can't see the partition?
Believe it or not, I did this exact something, not paying attention and boom system wiped. I have been a lurker on XDA for years and years and never needed an account because I have never made a stupid mistake like this in the past.
I contacted Moto to see if they would bail me out, but if not I will just wait out the factory image its a tough lesson.
I have reverted back to my my old AOKPs3 until i can get this all figured out.
*I will be watching this to see if you figure it out, and if so maybe you can help me.
GL.
Fingers crossed. Backed out to main TWRP home screen, powered off. Booted back into recovery, Restore tab, my folder showed up with the System backup in there, restoring now...
Success!!!
CartlandSmith said:
there should be a popup warning saying when you wipe your system you run the risk of losing your OS or whatever something shorter, but enough of a warning that it would cause people to stop and think if this was what they intended to do.
Click to expand...
Click to collapse
There wasn't one for me. That or I just completely missed it flying through like I thought I owned those menus...
Mike7143 said:
There wasn't one for me. That or I just completely missed it flying through like I thought I owned those menus...
Click to expand...
Click to collapse
Me either.
Mike, Could you send me the file? Im in the same boat as you "were"
Hello,
I am hoping someone can assist with interpreting my log file or provide suggestions on how to convert my backups into a usable format that can be flashed back to the phone thus recovering it to a usable state. I have a logcat and dmesg in a text log file. I have put the file up on Google drive, the link is here-
https://drive.google.com/file/d/0B9e...ew?usp=sharing
I also spent time reading and studying the post about using logcat and dmesg posted here-
http://forum.xda-developers.com/showthread.php?t=2274119
I believe the last operation I tried before softbricking was installing the Xposed framework module for my device (running Lollipop 5.1.1).
I have tried one solution so far, go into recovery, clear cache and reboot.
To recover from this issue I think I have two basic options-
#1 restore from backup
#2 locate the problem that is causing the system to hang at startup in the first place
At the end of the day I am trying to find the simplest, quickest method to get back up and running. Both methods are acceptable to me. I am not worried about losing any data.
My phone is a BLU Studio C 5+5 LTE and therefore can't use TWRP or CWM (At least that is my assumption, maybe someone knows different). Before getting into the softbrick state I took 3 different types of backups in the hopes that one of them could be used in case it was needed. (like this)
Type 1 - I did an ADB shell backup from a completely stock device (unrooted). I used this command-
adb backup -apk -all -f fullbackup.adb
For this method I followed this guide here-
https://linuxiswonderful.wordpress.com/2015/04/04/full-backup-of-nonrooted-android/
Type 2 - I used Titanium backup and performed a complete system and application backup
Type 3 - I rooted the phone and backed up all partitions using dd after reviewing the partition layout of the device. For example, to backup the system partition I did the following at an ADB shell-
dd if=/dev/block/mmcblk0p21 of=/storage/sdcard1/firmware-img/system.img
I am able to still communicate to my device using ADB and I can get an ADB shell or enter fastboot mode.
My challenge/sticking point is how to turn my backups into a usable format to get me back on track or understand the boot process enough to get out of the boot loop. I am familiar with how Linux boots as I am a SysAdmin. I know Android is similar but just different enough to make me research this further.
The first thing I tried was mounting my raw image files created from the dd process. I followed this guide-
https://samindaw.wordpress.com/2012/03/21/mounting-a-file-as-a-file-system-in-linux/
I ran these commands-
#losetup /dev/loop0 /path/to/my/system.img
# mkfs -t ext3 -m 1 -v /dev/loop0
# mount -t ext3 /dev/loop0 /mnt
# cd /mnt
# ls
The various image files I created all seemed to mount "ok" OK meaning that the loopback mount process worked but it appears there is nothing but a lost+found folder in the mounted image. (I'm not sure why that is.)
I am still researching methods to turn my other backups into something usable for recovery purposes.
For using the adb backup file I created, this is what my understanding is-
Adb backup uses a type of compression (don’t remember what kind). I would need to uncompress the file first. After uncompressing and being able to view the file contents I would think I should be able to put together a flashable zip file of some sort.
I think the process for Titanium backup would generally be the same- uncompress/convert file format, create/assemble a flashable zip file
If there is any other info you need to see, please let me know. I made a lot of notes about the system architecture, partition layout, etc.
Many Thanks in Advance for your Advice!
Found my answer. Used ADB shell and mounted /system in RW mode. Changed /system/bin/dex2oat filename and the device booted normally. Issue solved!
as usual, if anything goes wrong, no responsibility etc
The official update tutorial for rooted users doesn't keep app data, only internal storage! This tutorial keeps EVERYTHING
This method allows updating from 4.5.15 (unlocked, encrypted, rooted) to 5.0.2 without any data (sys settings + app data + user data) loss
A FAQ section is present at the end of this post and will be regularly updated.
List of files to download while doing the following steps:
OOS 5.0.2 ROM
Codeworkx TWRP recovery
Latest Magisk
Terms and software used in this guide:
Fastboot / Bootloader = bootloader of the phone, it's a very low level mode of the phone that allows booting into recovery. Can be accessed by using the advanced reboot menu (enable in dev options) or by "adb reboot fastboot".
Recovery = a small operating system on the phone that allows you to do various operations even when the main OS (Android) is broken. This includes flashing ROMs, modifying stuff on the storage, etc. It's the Android swiss army knife. If you can get a phone to boot TWRP, then you can do almost anything.
Magisk = rooting software that uses a systemless method to keep SafetyNet working. Systemless = instead of modifying the system, every change is put in a separate image that is mounted "over" the system. When the system tries to access a file modified by Magisk, instead of reading it from the partition, it reads it from Magisk. It's recommended to use Magisk instead of SuperSU as of 2018.
ADB = tool that allows controlling the phone from your PC through USB. You can use it when you're in Android if USB debugging is enabled in the settings, or when you're in TWRP. Here, we mostly use it for transferring files directly (without MTP) and running commands (using "adb shell")
Note: For this guide you will be required to download and install Magisk. If you don't want your phone to be rooted, then at the end of this guide reboot into TWRP, wipe both caches and re-flash the OS. This will uninstall Magisk and any other root patch. Beware: it will reflash stock recovery, so if you ever want to re-root, you'll need to reboot to fastboot and flash TWRP manually.
Convention for commands that you will have to run:
a command line starting with "C:" means that it should be run on your PC
a command line starting with "~ #" means that it should be run on your phone (through adb shell) while in TWRP
a command line starting with "OnePlus5:/ $" means that it should be run on your phone (through adb shell) while in OxygenOS
Although the commands start with "C:", this is just for readability purposes. You should run everything from inside an empty directory with enough disk space and writing access.
Your phone will have to be plugged in to your PC from the beginning to the end. Also, make sure it has at least 80% battery before beginning, just in case.
I know, the tutorial is huge. This is simply due to the fact that if I just wrote "make a nandroid backup of this and that, flash, and restore the backup while doing this", then some people may encounter problems because not everyone knows how to do a nandroid backup, restore it, etc. Also, there are a lot of things that need to be done precisely that way and not another way, which explains why the tutorial is huge. Also, you may notice that there is a lot of commands to run throughout the tutorial, this is because that way, I'm sure that at the end, you will have done everything like I did it on my phone, so that if you have a problem it's much easier to figure out where it comes from.
Summary of what you need to do (this is only a SUMMARY to give you a preview of what the whole thing looks like, you shouldn't follow it except if you're really an expert since a lot of things need to be done precisely, instead you should follow the easier complete steps below):
Make a Nandroid backup of /data
Backup files on internal storage
Wipe everything (internal storage + /data + system + caches), and then format data (important!)
Push and flash the OOS zip
Wipe caches and reboot (to Oreo!)
When it reboots, make sure everything (features, like Wi-Fi and fingerprint sensor) works. Don't "save anything" though, everything you do will be erased when we'll restore your backup. This is just a "test drive" for Oreo.
Reboot to TWRP, wipe Data and restore the /data backup
Run the three commands to fix Wi-Fi and fingerprints
Reboot (to System) and check everything works (don't do anything, don't change any setting, just make sure it works)
Reboot to TWRP, rename the "Android" folder to "Android_oreo" on sdcard, delete everything else on sdcard and restore your internal files
Rename the freshly restored Android (nougat) folder to "Android_nougat" and rename "Android_oreo" to "Android".
Flash Magisk, wipe dalvik+cache and reboot to System
When in Android, everything should work except some apps won't have their data. This is normal. Open a terminal (either on your phone using Termux or from your PC using adb shell), elevate using su and rename "Android" to "Android_oreo" and "Android_nougat" to "Android" (this is so that it correctly restores permissions)
If everything works fine, delete the "Android_oreo" folder
First, if you have Xposed Framework (systemless or not) installed, uninstall it. Next, if needed, uninstall any Magisk module that is "Nougat-only" to prevent any problems afterwards.
Boot the phone to bootloader/fastboot (either using advanced reboot, or by using volume down button when you start your phone) and boot to the TWRP recovery by doing
Code:
C:\> fastboot boot twrp-3.2.1-0-oreo-8.1-codeworkx-cheeseburger.img
from your PC.
Next, in TWRP, make a backup of /data (using the Backup button). Then, still while in TWRP, run the following commands:
Code:
C:\> adb shell
~ # cd /sdcard
/sdcard # tar cvf twrp.tar TWRP
/sdcard # md5sum twrp.tar
<< md5 checksum of twrp.tar >>
/sdcard # exit
C:\> adb pull -p /sdcard/twrp.tar
When the above command has finished, make sure that the checksum of the received twrp.tar file matches the one previously displayed.
If it doesn't match, delete the file and run adb pull again. Don't continue following this guide until you have received a 1:1 (checksum-wise) backup of /data.
Code:
C:\> adb shell
<< WARNING: dangerous command! double check the following line is correct before pressing enter! >>
~ # rm -rf /sdcard/TWRP
~ # rm /sdcard/twrp.tar
That was for /data. Now, the backup for the internal storage:
Code:
~ # cd /sdcard
/sdcard # du -csh
<< you should see here the total size of sdcard, that'll give you an idea of how long it'll take >>
/sdcard # tar cvf sd.tar element1 element2 element... elementN
<< in the command above, replace "element1..N" by a space-separated list of what you want to have in the backup.
Keep in mind that your list HAS to contain the element "Android" (case is important). It contains the app data.
Let's say for example you want to keep only the photos you have taken (and nothing, nothing else that was on internal storage).
The photos are in the folder DCIM, so the command will look like this:
tar cvf sd.tar Android DCIM
(because you want DCIM, and Android has to be in the list, no matter where)
>>
/sdcard # md5sum sd.tar
<< md5 checksum of sd.tar >>
/sdcard # exit
C:\> adb pull -p /sdcard/sd.tar
When the above command has finished, make sure that the checksum of the received sd.tar file matches the one previously displayed.
If it doesn't match, delete the file and run adb pull again.
Keep in mind that anything you don't put in that list will not be backed up and will be lost!
Now, you have a backup for all the important stuff so we can start doing the real sh*t.
Now, the important step:
Go back to the TWRP home screen, press "Wipe", "Advanced Wipe" and there check "Dalvik / ART Cache", "Cache", "System", "Data" and "Internal Storage". Confirm using the slider at the bottom of the screen. Press the home button, then "Reboot" and "FastBoot". Now, type the same fastboot command as in the previous step to boot the recovery image. You'll enter the recovery as before.
Now, on your PC, in the terminal, type
Code:
adb push -p OnePlus5Oxygen_23_OTA_029_all_1801292040_d71af3d.zip /sideload
(note: here, we are not using "adb sideload", we are really using "adb push"). In TWRP, click Install, in the file manager go to /sideload and select the OOS zip file. Confirm by sliding. If you get an error, go back to home, click Mount and ensure System is not checked. Then try installing again. If it still does not work, reboot to fastboot, type command again, get to the recovery and install again.
When the zip-file is installed, go home, click "Wipe", "Advanced Wipe" and check both caches and confirm. Then, go home, click "Wipe" and then "Format Data". Then, go home, click "Reboot" and then "System". Your phone will now reboot to Oreo. It will take a long time, but do not turn off the phone. Let it run. On my phone, it took on average 2 minutes for that boot.
You'll be greeted by the "first boot" page. It'll ask you if you want to restore a backup or start anew, choose start anew. Connect to your Wi-Fi network and Google account. Follow all the instructions until you get to the home screen. There, make sure everything works (especially Wi-Fi and fingerprint sensor). Don't save your fingerprints yet, they will be erased afterwards. If everything works, you can continue following these instructions. If not, post a comment down there.
Now that you're at the home screen, go in the settings, About Android and click the build number 8 times to enable Developer Options. Go in there and enable advanced reboot. Then, reboot your phone into fastboot/bootloader using the power button. Type the exact same command as before to start TWRP. Once that you are in TWRP, run the following commands:
Code:
C:\> adb push -p twrp.tar /sdcard/
C:\> adb shell
~ # cd /sdcard
/sdcard # tar xvf twrp.tar
/sdcard # cp /data/misc/wifi/WifiConfigStore.xml /sdcard/
In TWRP, click "Wipe", "Advanced Wipe" and check only the "Data" partition. Confirm. Press home, then "Restore" and choose the backup in the list. Confirm to restore. Back to the terminal, we need to run the following commands otherwise Wi-Fi and fingerprints won't work:
Code:
/sdcard # cp WifiConfigStore.xml /data/misc/wifi/
/sdcard # rm /data/misc/wifi/wpa_supplicant.conf
<< WARNING: dangerous command! double check the following line is correct before pressing enter! >>
/sdcard # rm -rf /data/system/users/0/fpdata
/sdcard # rm /data/system/users/0/settings_fingerprint.xml
Note: the command above are ran from your PC in an adb shell while the phone is still in TWRP.
Reboot the phone to system and ensure Wi-Fi and fingerprints are still working. Right now you should already see your old home screen and all your apps, but the internal storage isn't there yet. Reboot in fastboot, run the command to get in TWRP.
Once TWRP has booted, run the following commands:
Code:
C:\> adb push -p sd.tar /sdcard/
C:\> adb shell
~ # cd /sdcard
<< WARNING: dangerous command! double check the following line is correct before pressing enter! >>
/sdcard # rm -rf Alarms Albums DCIM Download Movies Music Notifications Pictures Podcasts Ringtones
/sdcard # ls
<< now, look at the list of files that were printed, and rm anything left that is not called "Android" or "sd.tar"
<< WARNING: dangerous command! double check everything is correct before pressing enter! >>
if when you do rm <the thing> it tells you it's a directory, then do: rm -rf <thething>
if there's a folder called SomeFolder, do "rm -rf SomeFolder"
next, run this:
/sdcard # ls
Android sd.tar <-- expected output
/sdcard # mv Android Android_oreo
/sdcard # tar xvf sd.tar
/sdcard # mv Android Android_nougat
/sdcard # mv Android_oreo Android
If you don't have Magisk somewhere on your sd card, download it and upload it using MTP or adb. Then flash it using the Install button. Clear dalvik/cache and reboot to system.
When the phone has booted (again, it might take time), make sure USB debugging is enabled and run the following commands:
Code:
C:\> adb shell
OnePlus5:/ $ su
<< here, you might see a Magisk screen asking for superuser access. Allow. >>
OnePlus5:/ $ cd /sdcard
OnePlus5:/sdcard $ mv Android Android_oreo && mv Android_nougat Android
Now, try some apps and make sure all the data is there (especially games and Netflix/Hulu/etc). If everything is there, and the phone works properly, go back in the terminal and type:
Code:
OnePlus5:/sdcard $ rm -rf Android_oreo
Optionally, start the TWRP app and flash it, it can always be useful. You can also reboot to fastboot to do that.
Now reboot your phone (normal reboot) one last time.
There, working OOS 5.0.2 / Android 8.0.0 phone with no data loss.
Frequently Asked Questions
How long does the whole thing take?
Highly depends on the amount of data you have on your phone. Since it the USB port only supports USB 2.0, it may take 4 or 5 hours in total.
Will doing this void my warranty?
No.
Will I be able to install future OTA updates using the regular download-reboot-flash-twrp procedure?
Yep. Just use the regular method as you would have on Nougat.
Will I lose my data?
If you follow all the instructions, no. Even if you don't follow them, as soon as you have made a backup of /data and internal storage, then no matter how bad you screw up you could always get a working phone back.
I followed the instructions and now my phone doesn't work
Boot in TWRP, wipe everything, reflash.
questions will be added there in the future
Having WiFi and fingerprint issues
You sure it is a good idea to just delete those files? I would have guessed that I need to replace these (nougat version from backup) with the oreo version to have it working just like before the restore.
Code:
/sdcard # rm /data/misc/wifi/wpa_supplicant.conf
/sdcard # rm -rf /data/system/users/0/fpdata
/sdcard # rm /data/system/users/0/settings_fingerprint.xml
I'm having the issues with wifi and fingerprints. Neither one is working. I'll try to figure out how to fix this.
@zdimension Thanks for this guide, I don't have time to test it yet, but I have a question
pdluke said:
Code:
/sdcard # rm /data/misc/wifi/wpa_supplicant.conf
/sdcard # rm -rf /data/system/users/0/fpdata
/sdcard # rm /data/system/users/0/settings_fingerprint.xml
Click to expand...
Click to collapse
At this point in the procedure, adb shell is still using root (before flashing magisk) ? How is that possible ? Does the adb /sideload preserve root ?
olivier380 said:
@zdimension Thanks for this guide, I don't have time to test it yet, but I have a question
At this point in the procedure, adb shell is still using root (before flashing magisk) ? How is that possible ? Does the adb /sideload preserve root ?
Click to expand...
Click to collapse
These commands should be run while the phone is in TWRP. Also note that adb /sideload is not used here, only adb push.
pdluke said:
You sure it is a good idea to just delete those files? I would have guessed that I need to replace these (nougat version from backup) with the oreo version to have it working just like before the restore.
Code:
/sdcard # rm /data/misc/wifi/wpa_supplicant.conf
/sdcard # rm -rf /data/system/users/0/fpdata
/sdcard # rm /data/system/users/0/settings_fingerprint.xml
I'm having the issues with wifi and fingerprints. Neither one is working. I'll try to figure out how to fix this.
Click to expand...
Click to collapse
If you delete them, they will be generated automatically at the next system boot. But you could also make a backup of those three files before wiping /data, store that somewhere, restore Nougat /data and then restore your backup of those three files. The result would be the same.
Note: actually, not exactly. Erasing the first file won't change anything since it's not used anymore in Oreo, but the two other files contain the fingerprint configuration (list of saved fingerprints). So,
Either you remove the files and you have to save your fingerprints again at next boot
Either you restore them from an Oreo backup and you'll get the fingerprints you had saved during the "first boot" procedure when you rebooted the phone right after flashing the OS
But the result is mostly the same: everything works. Deleting the files ensures you get something clean. If you restore from an Oreo backup I can't guarantee the result (as it may interfere with other files from the Nougat backup).
10 bucks to make a script to do this all for me haha.
@zdimension Thanks for the clarification Another thing you might add to the files to download would be Magisk (optionally). In this kind of guide, I've always find it useful to download everything first.
olivier380 said:
@zdimension Thanks for the clarification Another thing you might add to the files to download would be Magisk (optionally). In this kind of guide, I've always find it useful to download everything first.
Click to expand...
Click to collapse
Oops, forgot to add it
I added the link, and also instructions for how to un-root afterwards for those who would want it.
To improve the guide, here are some ideas :
- You should highlight that rm -rf is a very dangerous command, and that it needs to be checked twice (especially the targeted folder)
- It could be useful to use the du -csh command to check the size of a folder (to estimate the backup time for example).
- As a safety measure, one could md5sum the tar file before and after using adb pull
What do you think ?
olivier380 said:
To improve the guide, here are some ideas :
- You should highlight that rm -rf is a very dangerous command, and that it needs to be checked twice (especially the targeted folder)
- It could be useful to use the du -csh command to check the size of a folder (to estimate the backup time for example).
- As a safety measure, one could md5sum the tar file before and after using adb pull
What do you think ?
Click to expand...
Click to collapse
Thanks for the ideas! I updated the post (and I added a changelog at the bottom for future reference).
Followed guide for successful upgrade from 4.5.15 encrypted, unlocked bootloader w/ Magisk root.
One note, after the first complete wipe and flash of the full ROM, it was getting stuck on first boot and never completed. Discovered that I needed to not just wipe the Data partition but Format it in TWRP, to clear out the old encryption I think. Magisk wouldn't install either until I did this.
@debork thanks for the positive feedback (all the merit goes to @zdimension of course)
@zdimension there are many people in the other thread https://forum.xda-developers.com/oneplus-5/how-to/official-oxygenos-4-5-2-7-1-1-ota-t3627003 that tried (unsucessfully) to upgrade from 4.5.15 to 5.0.1, maybe a link to this topic could be useful for them (if it's not too late).
Regarding the
Go back to the TWRP home screen, press "Wipe", "Advanced Wipe" and there check "Dalvik / ART Cache", "Cache", "System", "Data" and "Internal Storage".
Click to expand...
Click to collapse
I think it should be highlighted in red, since it is the actual "clean flash" (AFAIU, correct me if I'm wrong).
if we only have the BL unlocked non root and stock recovery can we only ota without any loss of data ?
debork said:
Followed guide for successful upgrade from 4.5.15 encrypted, unlocked bootloader w/ Magisk root.
One note, after the first complete wipe and flash of the full ROM, it was getting stuck on first boot and never completed. Discovered that I needed to not just wipe the Data partition but Format it in TWRP, to clear out the old encryption I think. Magisk wouldn't install either until I did this.
Click to expand...
Click to collapse
Thanks for feedback, I will add that to the guide (although it worked with just Wipe for me )
zdimension said:
Thanks for feedback, I will add that to the guide (although it worked with just Wipe for me )
Click to expand...
Click to collapse
Have you rooted the 4.5.15 with Magisk or SuperSU (which is not compatible with Oreo anymore) ?
olivier380 said:
Have you rooted the 4.5.15 with Magisk or SuperSU (which is not compatible with Oreo anymore) ?
Click to expand...
Click to collapse
I stopped using SuperSU when it was sold to that shady company. Also, Magisk is better imo.
quick05 said:
if we only have the BL unlocked non root and stock recovery can we only ota without any loss of data ?
Click to expand...
Click to collapse
Official OnePlus support said that nothing is guaranteed if your bootloader is unlocked. But since you're on stock recovery + non rooted, you could always try. But backup everything first. Some people here on XDA have reported that it doesn't work, though.
Just followed your guide with no problems. Thank you very much!! I can confirm also that you need to format data after the wipe otherwise it gets stuck in a bootloop!
Thanks so much for this. I was able to successfully follow the guide and get upgraded to 5.0.1 without losing any data. In fact, I even messed up one step by failing to include the Android directory in the sdcard.tar backup (perhaps that should be more explicit), but it doesn't seem to have affected everything; all of my apps seem to have retained their data.
A few notes:
1. The file size of twrp.tar was ~14GB but when executing the pull command, it recognized it as only ~1.3 GB. As a result, the pull was not complete until it reached over 1000%. All the more reason to do the md5 check.
2. As others stated, I needed to format the data partition, not just wipe it.
3. I might recommend also including a "summary" version somewhere on what this guide does. Scrolling through the guide the first time, it seemed pretty daunting, but really all that you're doing is: backing up data partition and internal storage; wiping device; flashing Oreo ROM; tweaking a few files; and restoring backed up data and internal storage.
Thank you again so much! Glad to finally be on Oreo.
elight3 said:
Thanks so much for this. I was able to successfully follow the guide and get upgraded to 5.0.1 without losing any data. In fact, I even messed up one step by failing to include the Android directory in the sdcard.tar backup (perhaps that should be more explicit), but it doesn't seem to have affected everything; all of my apps seem to have retained their data.
A few notes:
1. The file size of twrp.tar was ~14GB but when executing the pull command, it recognized it as only ~1.3 GB. As a result, the pull was not complete until it reached over 1000%. All the more reason to do the md5 check.
2. As others stated, I needed to format the data partition, not just wipe it.
3. I might recommend also including a "summary" version somewhere on what this guide does. Scrolling through the guide the first time, it seemed pretty daunting, but really all that you're doing is: backing up data partition and internal storage; wiping device; flashing Oreo ROM; tweaking a few files; and restoring backed up data and internal storage.
Thank you again so much! Glad to finally be on Oreo.
Click to expand...
Click to collapse
Thanks for the feedback! I'll add a summary to the guide.