root in order to backup data and migrate (bl unlocked) - ONE Q&A, Help & Troubleshooting

Hi,
I have a OPO that I want to backup in order to migrate to another phone.
Backup suites I researched either need a Windows computer or root.
I plan to use Titanium Backup or Migrate.
I do not have a Windows computer easily accessible. A Linux machine with adb and fastboot is there.
This is the situation:
The OS is a Cyanogenmod 13.1.2ZNH2KAS3P0-bacon
The bootloader is unlocked. (good!)
The recovery seems to be a "cyanogen recovery" delivered with some past update. (less good)
In the settings, the phone claims to be encrypted (maybe not so good either)
- Can I safely flash a TWRP and boot or decrypt the "phone" aka cyanogenos and /data? (At least some versions had trouble to decrypt)
- Can I boot TWRP via
Code:
fastboot boot twrp.img
and then install the su*.zip?
- Can I install magisk instead of su, one way or the other?
- Is there a way to decrypt the phone in the settings?
- Can I install su or magisk via the update mechanism in the cyanogen recovery?
thnx

Related

Installing CM11.M11 on Nexus 5

Hi,
I'm about to install CM11 (cm-11-20141008-SNAPSHOT-M11-hammerhead.zip) on my Nexus 5, but wanted to be sure I'm not about do something obviously stupid. I tried using the CM Installer, but it said 'firmware not supported'.
I have
- Minimal experience.
- LG Nexus 5, hammerhead
- unlocked and rooted. (it did a factory reset on unlocking)
- Fresh Android 5.1.1 with bootloader version HHZ12h.
- TWRP 2.8.7.1 (took a backup and copied the whole TWRP folder to my laptop), flashed manually using fastboot flash recovery twrp.img.
- Latest TWRP manager installed from Play Store.
- standalone adb and fastboot installed on my Windows 7 laptop. No SDK. 'adb devices' lists the phone when connected.
- cm-11-20141008-SNAPSHOT-M11-hammerhead.zip downloaded to my phone under /sdcard/.
- cm-11-20141008-SNAPSHOT-M11-hammerhead.zip is also present in same folder as adb.exe and fastboot.exe.
Questions are:
- Hope this build of CM is compatible with my Nexus 5 & the bootloader version and whatever else there might be compatibility issues.
- How should I do this: According to "official CM installation on Nexus 5 guide" on wiki.cyanogenmod.org it seems like I'm supposed to push the zip file to /sdcard/0, but /sdcard seems to be a link to /sdcard/emulated/legacy, which contains no folder named '0'. Should I create it and put it there?
If you're coming from a ROM with Android 4.2 or newer to CyanogenMod 10.1 or newer: adb push update.zip /sdcard/0/
Click to expand...
Click to collapse
OR
Given that "cm-11-20141008-SNAPSHOT-M11-hammerhead.zip downloaded to my phone under /sdcard/", can I just: boot to recovery, click on Install, select the zip file and swipe to flash?
Finally a general query: Is there any reason I have to connect the phone to my laptop and run any adb, fastboot commands except to transfer the zip file from laptop to phone and to boot into bootloader or recovery with fastboot command? I already have TWRP running.
Thanks
Kashyap
Edit - before you flash, create a backup in twrp, including your efs, and copy it to your laptop for peace of mind.
I don't use cm, but that sounds like the right file. It doesn't matter which location the zip file is on your sdcard as far as I know, I think they've just said /sdcard/0 to make it easy to find from within twrp. Sounds to me like you've covered all your bases, nice to see someone manually flashing a nexus as a start. I'd go ahead and flash the zip, don't forget to factory reset if you're coming from stock. Also, you may want to find a gapps package if you haven't already. Since you seem to have taught yourself the right way, and your PC is setup for fastboot already, it should be easy to flash back to stock/restore under twrp. You don't even need adb to push files to your phone, you can just download them straight to the device. I generally only use my PC for fastboot flashing to stock,or transferring large amounts of data. Good luck, enjoy your nexus - first boot will generally take just long enough that you'll start wondering if its broken.
Thanks for the quick response.
scissors_cut_paper said:
don't forget to factory reset if you're coming from stock.
Click to expand...
Click to collapse
Just curious why?
If i do a factory reset, will it not delete /sdcard/cm-11-20141008-SNAPSHOT-M11-hammerhead.zip? Do I just copy it from laptop to phone after reset and proceed to flashing? Or there is some way to not wipe 'sdcard' during factory reset?
scissors_cut_paper said:
Edit - before you flash, create a backup in twrp, including your efs, and copy it to your laptop for peace of mind.
Click to expand...
Click to collapse
I did do a TWRP backup, but selected what to backup in the TWRP manager app, there is no option called EFS. Anyway, I'm creating a new using the recovery UI, where there is a check box called EFS. Thanks!
scissors_cut_paper said:
nice to see someone manually flashing a nexus as a start.
Click to expand...
Click to collapse
Didn't know there was any other more automated option/way. , is there? Only thing I knew was the CM Installer, which said the firmware isn't supported. .
scissors_cut_paper said:
Also, you may want to find a gapps package if you haven't already.
Click to expand...
Click to collapse
Yes, I was planning to, but taking it step at a time. .
I was planning to get gapps-kk-20140606-signed.zip from cyanogenmod.org, but lets see. I'll probably post another question here asking which is the compatible one.
Factory reset just wipes data/cache/dalvik, it should leave your sdcard storage intact. Just out of interest,why cm11? KitKat is pretty long in the tooth, and I've always found aosp based ROMs to perform better than cm on nexus 5. The problem with having no gapps will be no access to play store/google account services, so you'll have to get apps from less trustworthy sources.
Worked
Thanks.
It worked fine. Though it was totally useless without either the play store or basic CM apps. Couple of notes:
- After wipe/factory-reset (from TWRP Recovery UI) /sdcard was untouched.
- Installed the ROM using TWRP Recovery UI -> Install -> Select the zip file from /sdcard and swipe.
- CM Installer on Windows 7 laptop worked fine once the CM was installed. But it downgraded the build from Nov to Aug-2014.
- Also CM Installer removed my TWRP and replaced it with CWM. Not happy.
So actually all that's needed is:
- Unlock the bootloader and root.
- Install TWRP Manager
- Try to use the TWRP Manager's "Install TWRP" to install the TWRP Custom Recovery. If that doesn't work then do it manually. Download twrp.img
- Install ADB and fastboot, you don't need the whole 1GB Android SDK. Just search for "ADB Fastboot without SDK".​- Enable USB debug, connect the phone and ensure that 'adb.exe devices' prints a device.​- fastboot flash recovery twrp.img​- Download the ROM zip file you wanna install on the phone itself, no need to involve the laptop.
- Boot into recovery (e.g. using TWRP Manager -> Reboot options) and do what I did above.
Once you've installed Cyanogenmod, DO NOT use CM Installer. This is written in July'2015. May be things would improve in future.

Help! How do i install a custom ROM the proper way and Root the device aftwerwards?

Hi, I am new to custom ROM's and Rooting my device. And i hope you can help me with my Problem. I have a OnePlus A6003
What i tried so far:
Before i tried installing CustomROM's my device was on OOS 10.3.0
Then i needed to use the "twrp-3.3.1-16-enchilada-Q-mauronofrio.img" to get into TWRP
in TWRP i followed the Instructions from the LinageOS site:
Now tap Wipe.
Now tap Format Data and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage.
Return to the previous menu and tap Advanced Wipe, then select the System partition and then Swipe to Wipe.
Sideload the LineageOS .zip package:
On the device, select “Advanced”, “ADB Sideload”, then swipe to begin sideload.
On the host machine, sideload the package using: adb sideload filename.zip
(Optionally): If you want to install any additional add-ons, run adb reboot sideload, then adb sideload filename.zip those packages in sequence.
info_outline
Note: If you want Google Apps on your device, you must follow this step before booting into LineageOS for the first time!
(Optional): Root your device by installing LineageOS’ AddonSU, (use the arm64 package) or by using any other method you prefer.
Once you have installed everything successfully, run ‘adb reboot’.
Click to expand...
Click to collapse
I was sure this wasn't the right way cause after i rebooted the device i couldn't get to LinageOS.
After that i could get the "twrp-installer-3.3.1-2-enchilada.zip" (The official version from the TWRP site to work)
Flashed LinageOS the proper way (that's what i thought, lol) through install in TWRP
after that i had the same problem i could boot one time into LinageOS and that was it.
Current State of the Phone:
Bootloader unlocked (check)
Recovery Mode starts LinageOS Recovery
Fastboot is working fine
TWRP is not installed
What i am basically trying to do is:
Install a Privacy Focused ROM (open for Suggestions but i think LinageOS is good)
Root with Magisk
Flash NanoDroid Packages
Flash AFWall+
Flash AdAway
Some questions that i have
Do i need the customized TWRP because my phone did originally run OOS 10.3.0?
Whats the proper way to install a ROM on this device and Root it afterwards with Magisk?

Fail to permanent install and access TWRP due to encryption

Recently I just downgraded my Mi Mix 2s to MIUI V9.6.4.0.ODGMIFD via Miflash and planning to stay on this (global) rom. However, after flashing the latest twrp from the official link (v3.1.1-1) it did not ask for the lockscreen password upon entering the interface and my files just showed up with random filenames.
After some reading, I suppose my device is encrypted and twrp did not let me to decrypt it (without asking for lockscreen password). The random filenames still happens even I remove the lockscreen password before flashing twrp meaning the device is still encrypted. Before I could do anything else (flashing zip files, making backups, etc) I must format data to remove the encryption, but twrp will disappear after I booted into system and did the initial phone configuration. Tried different versions (from 3.2.3-0 to 3.3.1-1) but to no avail. The only way I can retain twrp after booting into system is to flash Magisk zip right after formatting data, but if I enter twrp again the filenames are still in random characters as before and I couldn't do anything in it.
So my question is how can I properly install twrp into my device without having the encryption issues? Could it be the rom that caused the problem or did I missed out any steps that fails to disable the encryption? Thanks for your attention.
WannaFly3721 said:
Recently I just downgraded my Mi Mix 2s to MIUI V9.6.4.0.ODGMIFD via Miflash and planning to stay on this (global) rom. However, after flashing the latest twrp from the official link (v3.1.1-1) it did not ask for the lockscreen password upon entering the interface and my files just showed up with random filenames.
After some reading, I suppose my device is encrypted and twrp did not let me to decrypt it (without asking for lockscreen password). The random filenames still happens even I remove the lockscreen password before flashing twrp meaning the device is still encrypted. Before I could do anything else (flashing zip files, making backups, etc) I must format data to remove the encryption, but twrp will disappear after I booted into system and did the initial phone configuration. Tried different versions (from 3.2.3-0 to 3.3.1-1) but to no avail. The only way I can retain twrp after booting into system is to flash Magisk zip right after formatting data, but if I enter twrp again the filenames are still in random characters as before and I couldn't do anything in it.
So my question is how can I properly install twrp into my device without having the encryption issues? Could it be the rom that caused the problem or did I missed out any steps that fails to disable the encryption? Thanks for your attention.
Click to expand...
Click to collapse
Guess I've found a workaround for this by installing the OrangeFox recovery project (ofrp). For those who stuck at the same issue as mine this is what I did:
1. Flash twrp img through adb fastboot.
2. Format data to remove encryption.
3. Paste ofrp zip file into the device and flash it via twrp, which boots the phone into ofrp interface.
4. Paste the recovery zip file into the device and flash it via ofrp. Under setting - MIUI OTA it should show 'enabled' (for android 9 and above might need to uncheck disable dm-verity first according to ofrp page, but my rom is at android 8 so I left it checked as default before flashing).
5. Reboot to system and complete the initial configuration.
6. Reboot to recovery again and ofrp should remain installed. From there I was then able to perform a backup.
Btw, under phone settings it says my device is still encrypted although I can access to ofrp without having the encryption issue as in twrp (random filenames, cannot transfer files or create backups, etc). Anyhow I now have a working custom recovery on the stock rom, cheers.

Modified OP6, wasn't sure what I changed. Found a txt file with the answer- Bootloader, TWRP Blue_spark, Magisk. They reset, so very uncertain here.

Okay, so as above. I modified my OnePlus 6 in summer 2019 when I bought it, and kept Lineage OS (unsure what version if it matters); I modified the bootloader, installed TWRP Blue_Spark for recovery and rooted using magisk. I made a nandroid backup but it was on the sd card partition and I've at some point wiped it.
Again, no custom rom. I only know because I thankfully made a text file explaining what I did. I used this thread.
OnePlus 6: Unlock Bootloader | Flash TWRP | Root | Nandroid & EFS Backup !!
OnePlus 6: Unlock Bootloader | Flash TWRP | Root | Nandroid & EFS Backup !! Before you start, OTA up to the latest System Update available. Settings > System Updates > Download & Install the latest available Thank You all for your...
forum.xda-developers.com
If you click the text file copied into the spoiler you can see pretty much exactly what I did, if you want:
Spoiler: Click here to see text document, including links to XDA threads, about what I did.
Models: A6000 (Asian model which I have), A6003 (which is for EU, where I live).
Warning: Do not flash partial update OTAs (under 1 GB) on a modified device!
If you want to use partial OTAs, you must first flash a full OTA that it applies to
and then flash the partial OTA from stock recovery.
Flashing partial OTAs from TWRP will either fail or soft brick your device.
You can return to a usable state by flashing full zips in recovery.
OnePlus 6: Unlock Bootloader | Flash TWRP | Root | Nandroid & EFS Backup !!
OnePlus 6: Unlock Bootloader | Flash TWRP | Root | Nandroid & EFS Backup !! Before you start, OTA up to the latest System Update available. Settings > System Updates > Download & Install the latest available Thank You all for your...
forum.xda-developers.com
Used this guide to:
1. unlock OnePlus 6 Bootloader
2. flash TWRP as a custom recovery (I used Blu_Spark TWRP as it had better backup options)
3. Magisk root (unrooter)
If you need to run CMD from a directory then check file:
How to open CMD command window in specific directory -Noted.txt
The versions of TWRP Blu_Spark I used were:
twrp-3.2.3-x_blu_spark_v9.91_op6.img
twrp-3.2.3-x_blu_spark_v9.91_op6.zip
Always make sure you use latest version, but make sure you're updated to the latest oxygenOS
NANDROID Backup (from https://forum.xda-developers.com/oneplus-6/how-to/oneplus-6-unlock-bootloader-flash-twrp-t3792643):
Create:
1. Boot into TWRP Recovery .
2. Go to Backup Menu and select all the listed partitions.
3. Name the Backup if needed (Optional)
4. Swipe to take Backup.
This proces should take 5 to 7 minutes depending upon the size of data.
5. Reboot System when done.
Your Nandroid will be stored in the Backup Folder inside TWRP Folder /sdcard/TWRP/BACKUPS
NANDROID RESTORE:
1. Boot into TWRP Recovery
2. Go to Restore Menu and select the backup you want to restore.
3. Select the partitions you want to restore.
4. Swipe to Restore. The process will take 5 to 7 minutes.
5. Reboot system once done
Found this, not sure if its relevant to OTA updates deleting twrp (blu_spark version, FTR)
Just to add a note to you for next ota.
After ota is installed go to magisk manager
Press download
Search for twrp a/b
Install (don't reboot)
Now go to main screen and press install
Choose to inactive slot (after ota)
This way you keep both twrp and root
My problems (potentially): I was getting OTA lineage updates and people said they were actually fine with this and wouldn't cause a problem, and they certainly seemed to be fine for a time.
However, at some point over two years my recovery has been reverted to presumably stock recovery and TWRP is missing. I'm not 100% sure how this happened but I'm assuming it was when I installed Android 10 OTA, or potentially did some kind of reset. I'm now unsure if I can simply install TWRP without some kind of problem.
Any Insite into what likely caused that and if it could be problematic would be appreciated. It's definitely gone. I didn't install to both A/B.
My root also stopped working as I can remember substratum themes breaking permanantely after an update, but they just became disabled and substratum remained benign and installed. I'm assuming this was with the Android 10 update, or when I lost TWRP (?) - but I'm not sure how I installed Magisk as I don't mention in the instructions file I found in the spoiler. According to the thread:
Gaining Root Access
You can gain root by either flashing via recovery a pre-rooted custom rom, or flashing a zip containing the SuperSU binaries or by Flashing Magisk Zip for a system less root. A custom recovery is necessary to do this.
Click to expand...
Click to collapse
My bootloader remains unlocked and I have USB debugging enabled.
TLDR: I was just wondering whether my Android version 10.3.10, the fact my TWRP recovery has been reset, my magisk root is gone and I'm not sure if it persists, means that I might encounter problems installing TWRP, Magisk and custom ROMS.
Will they be persistent and problematic somewhere or are they gone?
Should I unlock my bootloader again when request, or skip that step. Would it matter?
Also any reccomendations on a decent custom ROM for the OnePlus 6? I'm ideally looking for security/privacy and to move away from google as much as possible. I've always flashed ROMS and loved LineageOS, or moreso, CyanogenMod on Nugget iirc was the peak for me, but I never bothered on this phone for some reason.
I'm sick of feeling my data is being stolen, whether that be anaytics, physically, etc etc. It seems like it's being pepetually eroded further and further and I want to feel my phone is free and cool like I used to.

How to reinstall Magisk/root after updating to MIUI 12.5.2?

I should have expected this but after updating to MIUI 12.5.2, Magisk/root is no longer installed and the Magisk App only offers the option to "Select and Patch a File" , which I understand requires a full wipe and I don't want to do that.
Orangefox is also corrupted. I can still boot to it but it doesn't prompt me for my encryption code, so it can't access the data partition. Maybe I can just reflash that but can I flash Magisk from there after that to restore root without having to wipe the phone?
So it appears that the problem is MIUI 12.5 (or any MIUI ROMS based on Android 11), prevent decryption working in recovery mode. https://wiki.orangefox.tech/en/guides/encryption
I tried flashing TWRP and that doesn't decrypt the storage and just shows gibberish filenames too.
So, if we can't decrypt in recovery mode, we can't make backups and we can't install Magisk to restore root to make backups with apps like Titanium, what are we supposed to do?

Categories

Resources