I am frustrated that everytime an new release is out gotta reprogram my phone.
rm -rf /system/sd/*
search
sillyshyme said:
I am frustrated that everytime an new release is out gotta reprogram my phone.
Click to expand...
Click to collapse
Wiping your ext should not be an issue unless you're using Drizzy's "builds". If you're switching ROMs then you will have to wipe - get over it, but there should be "no wipe" updates when updating the a new version of the same ROM.
sillyshyme said:
I am frustrated that everytime an new release is out gotta reprogram my phone.
Click to expand...
Click to collapse
so i just noticed you had 27 posts, and im pretty sure all 27 have been about not wanting to wipe when switching roms, or complaining that you keep getting a boot loop. its just the dirty truth, if you wanna avoid a bootloop follow the info in the thread in my signature. if you dont wanna wipe, then dont switch, plain and simple.
SEARCH!!!!
palosjr said:
so i just noticed you had 27 posts, and im pretty sure all 27 have been about not wanting to wipe when switching roms, or complaining that you keep getting a boot loop. its just the dirty truth, if you wanna avoid a bootloop follow the info in the thread in my signature. if you dont wanna wipe, then dont switch, plain and simple.
SEARCH!!!!
Click to expand...
Click to collapse
Oh snap tellin it like it is..
I feel nice today, you're in luck, but this is the only post I'm writing to explain this procedure to you:
1. Reboot into recovery (Home + Power)
2. Backup NANDROID (or switchrom if you know how)
3. Enter into the console (alt+x)
4.
Code:
mount /system/sd
rm -rf /system/sd/app_s
rm -rf /system/sd/dalvik-cache
5.
Code:
ums_enable
6. Go into sdcard thru windows or whatever and then grab the data.img from the nandroid folder or switchrom folder depending on which one you used and place it in the same folder as fastboot (Go search if you don't know how)
7.
Code:
ums_disable
8.
Code:
recovery
9. Repair Filesystems (alt+f) (I think...)
10. Wipe data (alt+w)
11. Flash ROM of choice. (I've done this with practically every Hero flavor out there, should be no problem unless you cut corners in my directions some where... shame on you...)
12. Reboot phone when it finishes.
13. Wait for phone to get to setup page. Then, once there, reboot your phone again, but this time into bootloader (Camera + Power). You must wait for it to load the setup or this won't work.
14. Once fastboot is connected to the phone and can detect it (From connected PC):
Code:
fastboot flash userdata data.img
fastboot reboot
15. Wait for phone to boot up.... and bam, all wallpapers, lockscreen, program settings, mms, sms, contacts, etc. are already set up and your old settings + new ROM is ready to rock.
Firstly, my nexus one is Locked + Rooted with Stock FRF91.
OK, So I rooted with 1-click, installed a custom recovery (first Clockwork then Amon RA 1.8.0.0).
Did a full backup
Tried out a couple of Roms
Reverted to Stock from backup. All good!
Now 1 week later, I really want to try MiUI Rom so I power on phone with VOL-, select Recovery - all I see is the yellow exclamation in a white triangle with a green Android below. Isn't that normal / stock recovery???
Could the FRG83 OTA that I have not installed (it is still bugging me to do so ) have restored the stock recovery?
Did I clear something / do something wrong when performing the Stock backup or restore?
TIA for any advice.
The OTA update did install, and in the process replaced install-recovery.sh and recovery-from-boot.p, which meant that the stock recovery was automatically reinstalled by the OS on reboot.
Hi rusty, thanks for the reply. I have not installed the update, it is still asking to be installed. I even checked the build number in about phone - frf91.
Are you saying that with out my explicit permission the ota has modified my phone and restored the stock recovery - that certainly would explain it.
I misread your post, sorry about that.
However, restoring your backup is probably the cause, due to the same reasons above.
To simplify, you can lose your recovery in this fashion:
Start with stock ROM
Root
Install custom recovery without removing the .sh and .p files mentioned
Boot up phone
Now, if you install custom recovery using several automated methods, OR manually remove the files previously mentioned in thread, no problem. But if those files remain the stock ROM will automatically run them and restore the recovery image. Happens to a lot of people.
So likely that's what happened; restoring and using your stock ROM had those scripts in the image.
khaytsus said:
To simplify, you can lose your recovery in this fashion:
Start with stock ROM
Root
Install custom recovery without removing the .sh and .p files mentioned
Boot up phone
Now, if you install custom recovery using several automated methods, OR manually remove the files previously mentioned in thread, no problem. But if those files remain the stock ROM will automatically run them and restore the recovery image. Happens to a lot of people.
So likely that's what happened; restoring and using your stock ROM had those scripts in the image.
Click to expand...
Click to collapse
Thankyou both for your help. It makes a bit more sense now.
So in order to get back to a custom recovery, will I need to reinstall it or will removing these .sh and .p files do the trick?
Ps, what is the exact location of these and how would I delete them (i assume they are system/ protected)
Thanks, Steve.
You'll have to remove/rename the files and flash it again.
They are: /system/recovery-from-boot.p and /system/etc/install-recovery.sh
You could rename them:
Code:
mv /system/recovery-from-boot.p /system/recovery-from-boot.p.bak
mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak
or remove them altogether
Code:
rm /system/recovery-from-boot.p
rm /system/etc/install-recovery.sh
My advice would be to rename, just incase you feel like stock recovery again at some point.
Rusty! said:
You'll have to remove/rename the files and flash it again.
They are: /system/recovery-from-boot.p and /system/etc/install-recovery.sh
You could rename them:
Code:
mv /system/recovery-from-boot.p /system/recovery-from-boot.p.bak
mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak
Click to expand...
Click to collapse
Perfect. Understood.
I'll try to remember to update this thread with how I get on once i'm done but even if I dont, I think the info contained is pretty clear.
Thanks Rusty & khaytsus.
Also I'm pretty sure that if you use ROM Manager to flash custom recovery, it automatically zaps the files that would otherwise revert you to stock recovery.
Sent from my Nexus One using XDA App
I did use rom manager and I have since done clockworkmod through rom manager but when I go into recovery I get the stock one. that's why I did the manual process installing ra after clockwork the first time round.
Anyone else has that where rom manager seems to install the custom recovery but then when you go there its stock?
I found the following warning in a Rooting guide for Milestone:
If you applied an OTA update before, there is a script run at every system boot that checks and re-flashes the recovery when its checksum doesn't match. In such case, you have to avoid booting to android after the vulnerable recovery flash. Boot directly to recovery when RSD Lite restarts the phone (hold camera button) and from there remove the /system/etc/install-recovery.sh file.
rm -f /system/etc/install-recovery.sh
Could someone provide me detailed information on how to access the recovery and delete the install-recovery.sh file? Also does this reflashing occur on all Milestone which has received any OTA update?
Over 30 views, and still not a single reply. Come on guys, I know you are better than that...
uptheironsrafi said:
I found the following warning in a Rooting guide for Milestone:
If you applied an OTA update before, there is a script run at every system boot that checks and re-flashes the recovery when its checksum doesn't match. In such case, you have to avoid booting to android after the vulnerable recovery flash. Boot directly to recovery when RSD Lite restarts the phone (hold camera button) and from there remove the /system/etc/install-recovery.sh file.
rm -f /system/etc/install-recovery.sh
Could someone provide me detailed information on how to access the recovery and delete the install-recovery.sh file? Also does this reflashing occur on all Milestone which has received any OTA update?
Click to expand...
Click to collapse
First copy AOR to the root of sdcard.
Flash the VR. When the phone reboots and before it shows the M logo, press and hold the "x" key for a few seconds till the M logo is seen, then release. It should show you the triangle with exclamation mark. Press up volume button + camera button. It will show you recovery menu. Choose second option " apply sdcard update ".
After AOR menu is shown, choose console and type the command.
Done.
i first update my Milestone to the official 2.2.1.
Then copied the AOR 3.3 to sd card.
Then flash VR. then directly start to the recovery and flash the AOR.
After a while AOR starts and i type rm -f /system/etc/install-recovery.sh in the console and then "exit"
But i have to flash the AOR every time, because the stock recovery starts when i press camera button while startin (bootloade 90.74)
In the froyo menu, select Install Open Recovery at boot
After you select that, it will load AOR automatically if you hold the camera button (or X for 90.78 bootloader)
If you wipe caches, then you lose that so you would just Install OR at boot again
I flashed vulnerable recovery, flashed AOR and rooted my phone, and deleted the install-recovery.sh using the console command. I also selected the Install open recovery at root from the Froyo menu. However, my phone returns to the previous recovery menu every time i enter the recovery, and I have to flash AOR all over again.
Is there anyway to prevent this?
I'm having the exact same problem. Still looking for a solution. When I used root explorer to try and find install-recovery.sh BEFORE i started the whole process of trying to install VR, i couldn't find it (I previously used SuperOneClick to root after doing the official 2.2.1 update from Telus/Motorola). I suspect the file has been renamed and moved with this new 2.2.1 update.
This'll fix it but good http://forum.xda-developers.com/showthread.php?t=796679&page=26
zeppelinrox said:
This'll fix it but good http://forum.xda-developers.com/showthread.php?t=796679&page=26
Click to expand...
Click to collapse
Like someone said in that thread, I love you right now!
If you are new to rooting your phone, there are simple ways to go about getting clockwork mod onto your LG thrill
You can root it easily with the 1 click root tool (I dont have the link on hand) after installing the LG Drivers from the LG Website.
Then, Download Rootexplorer, Rom manager (which i think is installed with 1 click root along with superuser)
First thing, download the recovery.img here after installing ADB guide is located here
After downloading recovery image, go to your pc's user folder C:\users\yourname and move it to there, that way there is no mistaking its location for adb
Now, on your phone you first need to go into root explorer, go to the /data folder, long click and go to permissions and select all available boxes and also make sure your device is in R/W mode not R/O mode.
Run CMD as administrator and do the following:
adb push recovery.img /data
then type:
SU
(this makes superuser active)
then:
dd if=/data/recovery.img of=/dev/block/mmcblk0p6 bs=4096
then after clockwork is flashed to finalize the settings type:
rm /data/recovery.img
reboot
Presto, Clockwork Mod is installed, remember you can access the clockwork menu via rom manager menu, or 3D+Volume Down +Power releasing the power button when the LG screen appears.
I will soon post onto this, how to update to gingerbread just making sure it works well on my own first. also, working on ICS as well.
Hope this helps anyone who has had trouble with it!
kobos311 said:
If you are new to rooting your phone, there are simple ways to go about getting clockwork mod onto your LG thrill
You can root it easily with the 1 click root tool (I dont have the link on hand) after installing the LG Drivers from the LG Website.
Then, Download Rootexplorer, Rom manager (which i think is installed with 1 click root along with superuser)
First thing, download the recovery.img here after installing ADB guide is located here
After downloading recovery image, go to your pc's user folder C:\users\yourname and move it to there, that way there is no mistaking its location for adb
Now, on your phone you first need to go into root explorer, go to the /data folder, long click and go to permissions and select all available boxes and also make sure your device is in R/W mode not R/O mode.
Run CMD as administrator and do the following:
adb push recovery.img /data
then type:
SU
(this makes superuser active)
then:
dd if=/data/recovery.img of=/dev/block/mmcblk0p6 bs=4096
then after clockwork is flashed to finalize the settings type:
rm /data/recovery.img
reboot
Presto, Clockwork Mod is installed, remember you can access the clockwork menu via rom manager menu, or 3D+Volume Down +Power releasing the power button when the LG screen appears.
I will soon post onto this, how to update to gingerbread just making sure it works well on my own first. also, working on ICS as well.
Hope this helps anyone who has had trouble with it!
Click to expand...
Click to collapse
All of this is already posted as is the instructions on how to update to gingerbread.
i have install CWM by as your guide. but when i use Rom Manager to Back up , message pop up that install CWM first to complete this action. i am new to these things.
Thanks
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.