How to Unencrypt your Poco - Xiaomi Poco F1 Guides, News, & Discussion

WARNING!!! By doing this you are voiding your warranty. I am not responsible of bricked devices or any other problem that may arise
Hi guys,
After having lost about 3 hours of my life trying to unencrypt my phone, I have finally made it and I wanted to share with you what made me take so long.
Why unencrypting your phone?
Unencrypting your phone may be useful if you are a ROM changer junkie. It saves you some trouble in passing your data from ROM to ROM. It is also necessary for some tweaks and mods. Also, by mere logic, an encryption will reduce the speed of the reading and writing of the data, so unencrypting it will improve the speed of your device (don't get surprised if it feels faster, it will because I have told you so, however the difference is merely technical, it won't be noticeable, so that speed is being constructed in your mind by my suggestion...).
How to Unencrypt your Phone?
0. Do a backup of everything you don't want to lose in an external drive (such as an sdcard)
1. Download and flash the latest twrp.img (many people have turned to different recoveries with some extra functionalities such as Orange Fox (me, myself, I, too), however, THIS METHOD WON'T WORK ON THEM (or at least it hasn't worked for me). I spent several hours trying to flash different Disable Force Encryption files, older Magisk versions, etc. but the result was always the same: bootloop).
2. Wipe Dalvik and Cache
3. Flash DisableForceEncryption.zip (https://androidfilehost.com/?fid=6006931924117915021])
4. Flash the latest Magisk
5. Format (not wipe) Data
6. Go back and in reboot select turn off
7. Turn on the phone and cross your fingers
8. In the begging, it will seem like it ha gone into a bootloop. Wait a bit. If it continues rebooting after some time, get into recovery and cleanflash the stock recovery (not fastboot) ROM (https://xiaomifirmwareupdater.com/archive/miui/beryllium/)
8.b. If it does not enter a bootloop, go and try to distract yourself doing any other thing, because this first boot will take about 20 min.
I hope that this guide has been helpful for you guys!
Javier

Related

[Q] Best Nexus S GSM Rom.

Hi, I'm new to the forum, so please excuse any stupidity on my behalf.
I have a Australian, vodafone GSM Nexus S, currently running 4.0.3.
I am currently feeling stock android to be very limited, and want to move a custom rom, but I have never done any rooting/modding before. So just a couple of questions.
1) How do you root and install a custom rom? Does anybody have any video (I prefer video as I am less prone to making mistakes) tutorials for rooting and installing a custom rom for Nexus S GSM ICS 4.0.3?
2) What is the best rom, kernal etc, as I want to get my phone as smooth as ios or pretty dam close to it. Also I like changing customizing home screens, etc and would also like on screen buttons. Also I would like it to be very very stable.
3) Would it be possible to reverse all this in case my nexus screws up as the sides of my nexus are kinda creaky, and though this doesn't really effect my usability, I might end up rma'ing my phone in the future, so I would like to be able to reverse all this so it doesn't void my warranty.
4) Is there any point is overclocking and undervolting a phone. My PC is overclocked, but I have a huge fan, so overclocking would mean more heat + more battery use, and on the other hand you are lowering the voltage. Wouldn't this be very unstable?
This is my first post, so I apologize for anything I did wrong, and I did try searching, but all the roms look very good, there are some very talented devs here, and I say thanks for the help in advance.
Cheers,
Continuum
EDIT: INSTRUCTIONS ON HOW TO UNLOCK BOOTLOADER + INSTALL CLOCKWORK RECOVERY TOUCH
1. Download the CyberGR-MOD|NS.NGN ICS v8 HYBRID
http://clockworkmod.com/rommanager/d...le Nexus S
Why Cyber, seems fast, stable, and is not a beta.
2. Download and install the windows drivers for my phone (I'm on windows 7)
http://downloadandroidrom.com/file/N...ussrootICS.zip
3. Follow these until step 7
http://nexusshacks.com/nexus-s-root/...r-gingerbread/
n.b: don't worry about the cd \nexussrootthing. Just go to that folder, shift + right click, and click start command prompt instead.
4. Download clockwork recovery touch
(Link: http://downloadandroidrom.com/file/N...overytouch.zip )
and follow these instructions:
http://nexusshacks.com/nexus-s-hacks...or-nexus-s-4g/
5. Go into clockwork recovery (while still plugged into pc) and perform a nandroid back up
and click the following after:
data/factory reset
under mount and boot
format /boot
format /system
Next mount usb, and copy CyberGR-MOD|NS.NGN ICS v8 HYBRID over to sdcard, and unmount USB.
6. Plug out cable, and flash rom by going into clockwork recovery and clicking install zip from sdcard, to flash rom
7. Reboot phone and enjoy
1. NexusSHacks.com has a video tutorial on how to unlock your bootloader and Root the phone. Rooting won't be necessary to go to a custom ROM, but unlocking the bootloader is highly recommended for doing so. You will lose all personal data (including from internal SD card) once you unlock.
2. Best ROM and Kernel are the ones that fit your needs. Try a few of them, you'll find a sweet spot somewhere. The Nexus S has some of the (if not THE) best ROMs and kernels of any android, in quality, features, speed and stability.
3. All reversible from a software side. Hardware issues are covered for 1 year under warranty even if you've rooted it, technically. You can lock the bootloader and flash a stock ROM very easily.
4. Overclocking can give a significant performance increase at the cost of battery life and possibly stability. Undervolting uses very slightly less power, but generally not significant enough to notice, especially with the instability risk (rebooting will use far more power than undervolting will save you). Some chips are made more perfect than others, so some can handle high OC and extreme UV, some gag at the thought of 25mV less.
Also, remember to do a backup via recovery (NANDROID backup) when you want to try something new and when you are happy and stable with a ROM/Kernel/Settings combo. This can save lots of wasted time
Hi Harbb, thanks for the reply.
1. Sorry new to xda so couldn't link url, but I think I got it thanks, and I found one for unrooting. But how do you install a custom rom without rooting?
2. Well I was looking into roms, and codename looks good but does not come with Gapps. CM9 also looks good, but still in beta, I think I'll wait for the final release of CM9. Got any specific ones you like? Also what is the point in changing kernel?
3. Since there is a vodafone flag under your name I presume you work for voda aus? So do I have to flash it back to stock to rma it, or can I just give it in, rooted + custom rom, and expect them to replace it for me granted the phone is still <1yr, and if it is not, I guess it costs a bit to fix it.
4. But wouldn't overclocking cause your phone to overheat. Sometimes my stock nexus is sunning really hot, and other times the screen is not responsive, and I presume overclocking will just add to that. I see undervolting as a benefit, but you could just configure your phone to go into aeroplane mode/turn of 3g/etc using timerifficor tasker if battery is an issue.
Thanks for the help, but whats a NANDROID backup. Also, isn't there another one called titanium or something?
Cheers,
continuum
Nandroid is a backup you make in ClockworkMod Recovery.
Titanium Backup is a backup of all your apps (+ data).
1. Once you have an unlocked bootloader, you are given permission to use "fastboot" to flash a custom recovery. The custom recovery has, practically, full access to the rest of the system (which is essentially what root/su is). From the new custom recovery you can flash the .zip file which is the ROM, or kernel, or backup all of your files that you couldn't even access before, or format several partitions to your liking. Rooting is just copying over the su command so you can have access to the entire system, which you can't have without it.
2. CodeName Android has a seperate gapps .zip file, it's linked in the thread somewhere. Just wipe (a full wipe includes data/factory reset, format /system and format /boot, i recommend doing this between different ROMs), flash the ROM .zip first, then gapps.zip second, then reboot into your new ROM. I really liked stock. Recently i moved to Slim ICS. It's all about preference, features, etc. All of the devs here are great and there is no harm in trying out a handful of ROMs, say for about 2 days each. See which one you feel at home with. Same with kernels. Pick a handful with the features you want and try them for a couple of days.
3. No, I don't work for Vodafone. That just says which carrier I'm with. With regard to warranty, put it this way. Unless you get some serious hardware failure or storage failure, you will be able to put the phone back into the locked and stock state. If the phone just up and dies one day, feel free to send it in as-is and they should sort it out for you as it is a hardware problem. This -could- be due to overclocking, and they can argue it, but i can't recall anyone having issues like that so nothing to stress about, just don't abuse your phone. Otherwise, you can usually be able to bring it back to a locked state and in this case i would do that just in case. You can find the warranty policy here. It's quite broad, but so long as it's a manufacturing problem it is clearly covered.
4. Possibly, yes. As i said before, different CPUs are better in general than others due to variances in manufacturing. Lowering voltage may lower temperatures too, so if it is stable this could be an upside to UVing. It's all about being stable though, if your phone can't handle 1200mhz, don't OC it. If it is and you are happy with the battery life and possible lessened lifetime of the phone while stable, go right ahead. Generally no harm in trying, just go up (or down) incrementally. I'll note that while not in use, the phone should be in "Deep Sleep", which completely shuts off nearly all components of the phone aside from the radio (for cellular reception). Undervolting or Overclocking has no effect whatsoever here.
Icecoldmeat said:
Nandroid is a backup you make in ClockworkMod Recovery.
Titanium Backup is a backup of all your apps (+ data).
Click to expand...
Click to collapse
Cheers, so basically its like a windows recovery image. But for the nexus s 19203 (I think, its the slcd one), nexus hacks is saying to use TWRP. Can you still do nandroid backup with that?
Harbb said:
1. Once you have an unlocked bootloader, you are given permission to use "fastboot" to flash a custom recovery. The custom recovery has, practically, full access to the rest of the system (which is essentially what root/su is). From the new custom recovery you can flash the .zip file which is the ROM, or kernel, or backup all of your files that you couldn't even access before, or format several partitions to your liking. Rooting is just copying over the su command so you can have access to the entire system, which you can't have without it.
Click to expand...
Click to collapse
So for a beginner, your suggesting it would be easier to unlock the bootloader, and load a custom rom with root already incuded, such as CM9, right?
Harbb said:
2. CodeName Android has a seperate gapps .zip file, it's linked in the thread somewhere. Just wipe (a full wipe includes data/factory reset, format /system and format /boot, i recommend doing this between different ROMs), flash the ROM .zip first, then gapps.zip second, then reboot into your new ROM. I really liked stock. Recently i moved to Slim ICS. It's all about preference, features, etc. All of the devs here are great and there is no harm in trying out a handful of ROMs, say for about 2 days each. See which one you feel at home with. Same with kernels. Pick a handful with the features you want and try them for a couple of days.
Click to expand...
Click to collapse
So essentially:
1. Find a rom, and the drivers for my device, store these on my pc
2. Wipe phone (I presume by going into settings and pressing factory reset? and then wiping everything)
3. Turn off phone
4. Follow the nexusshacks to fastboot oem unlock and TWRP recovery
5. Nandroid backup??
6. Flash the rom
7. Flash Gapps
8. Reboot, disconnect from pc, and then let everything initialize.
9. Enjoy
Harbb said:
3. No, I don't work for Vodafone. That just says which carrier I'm with. With regard to warranty, put it this way. Unless you get some serious hardware failure or storage failure, you will be able to put the phone back into the locked and stock state. If the phone just up and dies one day, feel free to send it in as-is and they should sort it out for you as it is a hardware problem. This -could- be due to overclocking, and they can argue it, but i can't recall anyone having issues like that so nothing to stress about, just don't abuse your phone. Otherwise, you can usually be able to bring it back to a locked state and in this case i would do that just in case. You can find the warranty policy. It's quite broad, but so long as it's a manufacturing problem it is clearly covered.
Click to expand...
Click to collapse
Ahh, my bad, new to this forum, and though you were a voda rep
So I guess as long as your not extreme overvolting, you'll be fine.
Harbb said:
4. Possibly, yes. As i said before, different CPUs are better in general than others due to variances in manufacturing. Lowering voltage may lower temperatures too, so if it is stable this could be an upside to UVing. It's all about being stable though, if your phone can't handle 1200mhz, don't OC it. If it is and you are happy with the battery life and possible lessened lifetime of the phone while stable, go right ahead. Generally no harm in trying, just go up (or down) incrementally. I'll note that while not in use, the phone should be in "Deep Sleep", which completely shuts off nearly all components of the phone aside from the radio (for cellular reception). Undervolting or Overclocking has no effect whatsoever here.
Click to expand...
Click to collapse
I'll try mucking about eventually, but am a bit scared about heat build up.
Also, any word on when the full CM9 will come out?
I believe the initial estimation was around march, and by how early CM9 ROMs are going i tend to believe them. Likely more toward the end, though, before a stable is released.
A NANDROID backup basically copies: /system, /boot, /data, /cache, the recovery, kernel and .android_secure (on the sdcard). Pretty much everything android on your phone is backed up and you can go back to that exact state anytime you want by restoring, or restore each one individually. I personally recommend the ClockWorkMod, TWRP isn't in development anymore and CWM now has a touch version too, though i still prefer the non-touch myself. Just make sure to get the latest version from here.
You can feel when the phone gets hot as long as you don't have a full cover, and some apps can tell you what the battery temperature is too. Stick to what is comfortable for you. Don't be worried though, you can always just clock it back to stock speeds and volts.
Harbb said:
I personally recommend the ClockWorkMod, TWRP isn't in development anymore and CWM now has a touch version too, though i still prefer the non-touch myself. Just make sure to get the latest version from here[/URL].
Click to expand...
Click to collapse
Ok, so this is what I am going to do:
1. Download the CyberGR-MOD|NS.NGN ICS v8 HYBRID, from the link you gave me, I presume this works for i9023
2. Download and install the windows drivers for my phone
3. Root my phone, with TWRP, according to that method shown by nexusshacks
4. Then install clockwork recovery touch using fastboot flash recovery ,also shown by nexus s hacks
5. Preform a nandroid back up ?? not sure how to do this
6. Flash rom ?? not sure how to do this either
7. Reboot phone and enjoy
I am presuming Gapps in included with the rom.
Please correct anything wrong, and also, how do I get onscreen buttons? The code name rom looks like it comes with them.
!!!
I recommend you to use the latest CyanogenMod Nightlie (it's already smooth and stable enough) and some great custom kernel: AirKernel of Matrix kernel
novic_dev said:
I recommend you to use the latest CyanogenMod Nightlie (it's already smooth and stable enough) and some great custom kernel: AirKernel of Matrix kernel
Click to expand...
Click to collapse
Cool, but would I have to do the whole process all over again, once the final CM9 comes out, and does it update automatically, or must you update manually?
No need for twrp, you can flash cwm straight away. Before unlocking remember to backup all your data that you can (you will lose save games and app settings). Make sure to do the wipes I told you about or your phone may not boot or be very unstable. Copy the from .zip to sdcard and while in recovery choose to install a .zip and choose which one. It's quite simple, I'm sure you'll figure it out. Backing up is done by clicking backup of course.
There is a thread in development dedicated to onscreen buttons, that might be of use. I haven't tried it before.
Harbb said:
No need for twrp, you can flash cwm straight away. Before unlocking remember to backup all your data that you can (you will lose save games and app settings). Make sure to do the wipes I told you about or your phone may not boot or be very unstable. Copy the from .zip to sdcard and while in recovery choose to install a .zip and choose which one. It's quite simple, I'm sure you'll figure it out. Backing up is done by clicking backup of course.
Click to expand...
Click to collapse
Well I don't have much data on there, so I'm just going to copy a couple of photo's, and then factory reset, but I thought to flash cwm you have to have root first? My nexus is just pure, stock.
Harbb said:
There is a thread in development dedicated to onscreen buttons, that might be of use. I haven't tried it before.
Click to expand...
Click to collapse
Thanks, but I can't post there yet.
http://[www].androidegis.com/how-to/now-root-your-nexus-s-in-one-click-root-method/ Is this any good?
Unsure if that one still works for ICS, possibly not. There are other methods to root 4.0.3 though without unlocking the bootloader, but it often makes it much harder to do some things. Since we don't get scalded for unlocking the bootloader (and it can be undone, AND it's easy), it is the best and preferred way by most accounts. It saves alot of hassle and we are free to use fastboot if anything goes awry. Much better than needing to do that rooting procedure again, then flashing recovery within android, etc. Since you have nothing on your phone, definitely just unlock the bootloader. Nothing like freedom
Unlocking the bootloader allows you to use fastboot, as i said. fastboot allows you to flash a custom recovery (and boot with a custom kernel, and some other less-used things). TWRP and CWM are both custom recoveries, so as long as you can use fastboot (via "fastboot flash recovery recovery.img") you can replace recovery.img with twrp.img, cwm.img and so on. Same process, different file.
I'll give you another hint since you'll probably run into this eventually: Stock recovery has an android and exclamation (!) mark as a splash screen. You have to press a volume key and power button to go through that splash screen. The main time you'll see this is if you flash an official Stock ROM. There is a script that reinstalls the stock recovery on boot in Stock ROMs. To get rid of it, you'll need to rename the file /system/etc/install-recovery.sh to something else (like install-recovery.sh.bak), or just delete it. You need su to do this, of course.
Harbb,
is it "OK" before reverting to a previous NANDROID backup in CWM recovery to do format system/boot/data/cache/dalvik and factory defaults ? or not or harmful ?
What is the word on that ?
Alright, thanks guys, I will try this soon.
mahanddeem said:
Harbb,
is it "OK" before reverting to a previous NANDROID backup in CWM recovery to do format system/boot/data/cache/dalvik and factory defaults ? or not or harmful ?
What is the word on that ?
Click to expand...
Click to collapse
No need to, it is done automatically before restoring. Essentially it doesn't make a difference either way.
continuum51 said:
Alright, thanks guys, I will try this soon.
Click to expand...
Click to collapse
You're welcome, it'll all make alot more sense once you're doing it.
Ok guy, about to do it now. These are the steps I'm taking,
1. Download the CyberGR-MOD|NS.NGN ICS v8 HYBRID
http://clockworkmod.com/rommanager/...CyberGR-MOD|NS-NGN.&deviceName=Google Nexus S
Why Cyber, seems fast, stable, and is not a beta. Only question is how are updates going to work?
2. Download and install the windows drivers for my phone (I'm on windows 7)
http://downloadandroidrom.com/file/NexusS/rooting/nexussrootICS.zip
3. Follow these until step 7
http://nexusshacks.com/nexus-s-root/how-to-root-nexus-s-or-nexus-s-4g-on-ics-or-gingerbread/
4. Then install clockwork recovery touch (Link: http://downloadandroidrom.com/file/NexusS/cwm/nexussrecoverytouch.zip)
and follow these instructions:
http://nexusshacks.com/nexus-s-hack...orkmod-touch-on-rooted-nexus-s-or-nexus-s-4g/
5. Preform a nandroid back up, I'm guessing this is a part of clockwork recovery, and click the following after:
data/factory reset
format /boot
format /system
From advanced, click reboot recovery, and wipe data/factory reset & cache again.
Next, storage select, format /system /data /cache /boot & format /sdcard, mount usb, and copy CyberGR-MOD|NS.NGN ICS v8 HYBRID over to sdcard.
6. Plug out cable, and lash rom by going into clockwork recovery and clicking install zip from sdcard, top flash rom
7. Reboot phone and enjoy
Before I go ahead, if something screws up, and the phone completely dies (software side), is there a way to force it back to stock? And are these steps correct?
continuum51 said:
Ok guy, about to do it now. These are the steps I'm taking,
1. Download the CyberGR-MOD|NS.NGN ICS v8 HYBRID
http://clockworkmod.com/rommanager/...CyberGR-MOD|NS-NGN.&deviceName=Google Nexus S
Why Cyber, seems fast, stable, and is not a beta. Only question is how are updates going to work?
2. Download and install the windows drivers for my phone (I'm on windows 7)
http://downloadandroidrom.com/file/NexusS/rooting/nexussrootICS.zip
3. Follow these until step 7
http://nexusshacks.com/nexus-s-root/how-to-root-nexus-s-or-nexus-s-4g-on-ics-or-gingerbread/
4. Then install clockwork recovery touch (Link: http://downloadandroidrom.com/file/NexusS/cwm/nexussrecoverytouch.zip)
and follow these instructions:
http://nexusshacks.com/nexus-s-hack...orkmod-touch-on-rooted-nexus-s-or-nexus-s-4g/
5. Preform a nandroid back up, I'm guessing this is a part of clockwork recovery, and click the following after:
wipe data/factory reset
wipe/cache partition
And download the following Dalvik-wiper.zip, and wipe Cache. ?? for this, do I put it on phone sd card?
From advanced, click reboot recovery, and wipe data/factory reset & cache again.
Next, storage select, format /system /data /cache /boot & format /sdcard, mount usb, and copy CyberGR-MOD|NS.NGN ICS v8 HYBRID over to sdcard.
6. Plug out cable, and lash rom by going into clockwork recovery and clicking install zip from sdcard, top flash rom
7. Reboot phone and enjoy
Before I go ahead, if something screws up, and the phone completely dies (software side), is there a way to force it back to stock? And are these steps correct?
Click to expand...
Click to collapse
Data/factory reset also formats /cache. For a full wipe: data/factory reset, format /boot, format /system. No need to worry about any wiping .zips. No reason to do it twice either, but if you really want peace of mind do as you wish. This is ALL you need to do for wiping.
They are correct, but also somewhat redundant. Follow my wiping directions and you will be perfectly fine. If you ever want to flash a new kernel, you only need to wipe dalvik cache prior to flashing it.
Thanks mate. I've edited step 5, and am doing it now.
As i said too, no need to do the wiping again as you have at the bottom of step 5. Also note that data/factory reset formats /data, /cache and .android_secure (on sdcard), so doing the separate formats is essentially the same as doing the data/factory reset.
There is a sticky at the top of the general section with all of the stock OTA ROMs (Full and Update ones). Just wipe and flash one of the Full ROMs and you'll be back to stock in no time.

cannot use adb to solve oneplus one rebootloop

I have oneplus one came from chineese retailer already rooted and with adware. always meant to reflash with straight CM or with a version of AOSP, but ended up use adb (which I have for development, though I am NOT experienced in using adb, flashing rom or what ever only programming) to disable a number of apps and it seemed to be stable.
More recently I had a phone crash following the crash of an app that I think is the CM app launcher, something begining with t, trebuchet?, i dont recall. Since then the phone keeps rebooting and I cannot seems to use adb, the device is either not present or offline.
I can boot to cyanogen recovery which offers:
- reboot system now
- apply update
- apply from adb
- choose from internal storage
- wipe data/factory reset
- wipe cache partition
- wipe media
If I select apply from adb then the device is nolonger offline but in sideline mode, but I don't think this is what I want.
I never liked CM and I had always thought that I might try to flash with a version of AOSP if possible and I wondered if now was the time. I thought TWRP might be useful for this and the first step to installing this was:
C:\...\Downloads>adb reboot bootloader
but I get
error: closed
I briefly see the debugging notification before the phone reboots but in adb it is always not present or offline.
How do I get to the point of either solving my repeating reboot at least or preferably installing a version of AOSP that would be compatible with OnePlus One, preferably without destrying data. I think the data is in a different partition or something but I have forgotten the little I learnt about this a few years ago.
I would be so grateful of some help and learning, right now to all intents and purposes I have a nice looking brick.
MAYDAY!
My phone keeps rebooting too.
Did you already fix it?

[GUIDE] The Noob's Guide to A/B Partitions and Other OP6 Idiosyncrasies

If you've just arrived on the phone modding scene, or are coming from another phone that uses traditional approaches to flashing, you've likely come across people talking about the "A/B partitions." If you don't have any experience with this arrangement, it can be intimidating, because it fundamentally changes a lot of things related to flashing and updates.
What is a Partition?
Let's start with the basics. A partition is a discrete, contiguous, but non-overlapping section within the phone's storage where data is stored. There are partitions for bootloaders, various firmware, user data, OS files, and so on. For the most part, these files live in their own partitions, and you can wipe, format, and edit them without affecting files on other partitions.
There are 72 different partitions on the OP6. If you've worked with partitions on previous phones, you're probably thinking, "That's a lot," and it is. But there's a reason why there are so many: Many of them are duplicated, and that brings us to A/B partitions. Google moved to A/B partitioning for a specific reason: It allows for what are known as "seamless" updates. The following is from Google's explainer for devs, but it's fairly straightforward:
A/B system updates use two sets of partitions referred to as slots (normally slot A and slot B). The system runs from the current slot while the partitions in the unused slot are not accessed by the running system during normal operation. This approach makes updates fault resistant by keeping the unused slot as a fallback: If an error occurs during or immediately after an update, the system can rollback to the old slot and continue to have a working system. To achieve this goal, no partition used by the current slot should be updated as part of the OTA update (including partitions for which there is only one copy).
Each slot has a bootable attribute that states whether the slot contains a correct system from which the device can boot. The current slot is bootable when the system is running, but the other slot may have an old (still correct) version of the system, a newer version, or invalid data. Regardless of what the current slot is, there is one slot that is the active slot (the one the bootloader will boot form on the next boot) or the preferred slot.
Each slot also has a successful attribute set by the user space, which is relevant only if the slot is also bootable. A successful slot should be able to boot, run, and update itself. A bootable slot that was not marked as successful (after several attempts were made to boot from it) should be marked as unbootable by the bootloader, including changing the active slot to another bootable slot (normally to the slot running immediately before the attempt to boot into the new, active one).
Click to expand...
Click to collapse
What does all this mean? Well, one thing (the main thing, really) that it allows you to do is take an OTA while you are booted up and using your phone. (Even if you're rooted? Yes, but more on that in a moment.) The system update engine will download and install the update to the inactive slot in the background, then ask you to reboot. When you reboot, you'll be fully updated without the need to boot to bootloader and wait for it to install. This approach makes updating a lot safer: If the update breaks something, the system won't boot to that slot. It will return to the old slot and let you know the update failed. The days of having an OTA bork your phone out of the blue are mostly over. That's good!
But What About My Data?
Though there are two versions of many partitions (boot_a, boot_b, system_a, system_b, and so on) there's only one userdata partition. So your data isn't affected by the update.
You may need to log back into certain apps as if using them for the first time, but your data and settings will all still be where they were before the OTA.
What A/B Means for Rooting
The wrinkles, however, start coming when you unlock and root your phone. To understand why, we need to talk about something called the kernel. The kernel is a key part of any computer operating system. It is the tool that applications use to talk to the hardware and vice versa, and it governs how the CPU operates, how memory is used, and on smartphones how things like the screen, radio, speakers, and so on function. Without the kernel, or with a broken kernel, applications have no way to function. If you've heard the term "kernel panic," it's a situation in which the kernel stops the system either because of a hardware fault or a software problem that's taken the system into a state that the kernel can't get it out of.
Non-A/B Android phones actually had two kernel images. One lived in the recovery partition, while the other lived in the boot partition. This allowed the phone to boot into recovery and make major changes to the rest of the system. But the A/B approach gets rid of the separate recovery partition and integrates it into the boot partition. Why? Probably because on stock phones, the recovery is only used for system updates, and with the A/B arrangement, it's no longer necessary to have a separate dedicated recovery since updates happen directly to the inactive partition.
This creates a challenge for phone modding, however. Without a separate recovery partition, the stock recovery has to be replaced with a custom recovery, inside the boot partition where the kernel lives. But on Android, you cannot modify partitions through fastboot – you can only flash over them. So installing a custom recovery like twrp for the first time requires you to fastboot boot into twrp from your computer, then flash an installer once you are booted. .
There's another problem: Rooting via magisk makes modifications to the boot sector. So does flashing xposed or (obviously) a custom kernel. With recovery and these other custom mods now all living together in the same partition, it is possible for one of them to overwrite files used by another mod. This is why you may need to reflash magisk after updating a custom kernel or custom recovery, and why not doing so can result in a bootloop. You've overwritten files magisks uses for root, so your phone can no longer boot (this isn't the case with all mods; many are now coded to avoid this problem).
Updates on a Rooted OP6 with A/B Partitions
If you've been following along so far, you're probably now seeing another issue: Isn't a seamless update going to overwrite all of my mods? The answer is yes, it will (more accurately, it won't copy them over to the new slot). If you're cringing now, have faith. This isn't as big a deal as it sounds, and it's actually a good thing once you see how it all works.
Here's what happens when your OP6 gets an update notification. The update engine detects root and downloads the full update instead of the incremental update. This is very important and you should not try to frustrate or block it from doing so (unless you want to update manually via twrp, see below). Taking the incremental update on a rooted phone could result in a brick, or more likely, an unbootable slot. Like it says in that Google quote above, the updater installs the new version in the inactive slot. The key thing here is that it installs a fresh, fully stock version. Your data gets pulled over, but none of your mods go with it. To get them back, you have to install them all again. There are various ways of doing this, and this isn't the place to repeat the guides that are already posted on how. Just understand that you have to do it to keep root, twrp, and your other mods.
It works more or less the same way if you download the full update manually and flash in twrp. You'll get a fully stock installation on the other slot, and you'll boot into it unrooted unless you reinstall your mods first. You also should note that this makes for an easy way to go back to stock if that's what you want, and I recommend keeping a zip of the stock OS on your phone just in case you need to do it.
Note that you can manually switch the active slot in twrp, but I don't recommend doing so until you know what you're doing. After a couple of updates and flashes, what remains on the inactive slot is not necessarily going to be bootable, or it may boot with things like wifi broken. And if you've never updated at all, there may be nothing on the inactive slot, which means your phone will reboot into the void of a black screen. (But don't worry – there's a tool to fix this here.)
Here are a couple of guides that I recommend for further reading on the specifics:
[RECOVERY] HOW TO INSTALL OFFICIAL TWRP & MAGISK OOS 5.1.5 to 5.1.8
[OFFICIAL] OxygenOS 5.1.8 OTA for the OnePlus 6
If all this seems like some extra work, it is. But remember it ensures you're getting a clean and fully functional updated system. Once you get the hang of doing it this way, you'll appreciate the advantages.
Some Other Things to Be Aware of
In addition to the other changes, the cache partition has been removed. It now resides in the data partition and is no longer used for anything related to updates. One result is that wiping cache in twrp no longer does anything. If you want to clear cached data go into Settings>Storage & memory, then tap Cached data at the bottom and then tap OK.
Otherwise, you don't need to worry much about it. (Why did Google do this? Apparently to save space that was taken up by having to duplicate many other partitions. They also halved the system partitions by playing some clever games with app odexing, but that's beyond the scope of this guide – the only user effect is a slower first boot after factory reset.)
That's Cool! I Want to Know More!
This article on the XDA portal covers everything you could possibly want to know about A/B partitions and what they do.
Good luck and happy modding.
(Note: Devs and experienced users are encouraged to submit corrections if any of this is a bit off.)
Thanks to @jisoo for a guide in the Pixel forums I adapted some of this from.
Very informative and I'd even recommend this read for users who already know a bit about the partitions!
Excellent guide. Can I link it?
lollyjay said:
Excellent guide. Can I link it?
Click to expand...
Click to collapse
Of course, your guide is linked here too. :highfive:
A quick read over this and I can't find anything glaringly wrong with it. Nice write up. Considering adapting it for the Portal if you're okay with that, OP.
MishaalRahman said:
A quick read over this and I can't find anything glaringly wrong with it. Nice write up. Considering adapting it for the Portal if you're okay with that, OP.
Click to expand...
Click to collapse
Feel free!
iElvis said:
Of course, your guide is linked here too. :highfive:
Click to expand...
Click to collapse
Done! And thank you.
Still little confused here.so if I flashed full ROM zip(not ota zip) from twrp then I have updated system or my phone will soft brick?
vikasb32 said:
Still little confused here.so if I flashed full ROM zip(not ota zip) from twrp then I have updated system or my phone will soft brick?
Click to expand...
Click to collapse
Flashing the full rom zip will give you an updated system, but stock unless you follow by reinstalling twrp, etc.
No other words than THANK YOU! You've clarified our minds!
Nice write up. I did have a question though. If I flash the full stock rom in TWRP does it automatically flash to the non-active partition? I've had a couple of unexpected issues when flashing.
Man that's something
Any way Thank you
I was lazy to search and read about the whole thing , but you help to provide what I need to know .
Sent from my ONEPLUS A6003 using Tapatalk
texasaggie1 said:
Nice write up. I did have a question though. If I flash the full stock rom in TWRP does it automatically flash to the non-active partition? I've had a couple of unexpected issues when flashing.
Click to expand...
Click to collapse
Correct. When you flash the full stock rom, it will install to the inactive slot, and it will mark that slot as the new active slot, which means that if you reboot right after flashing, you will boot onto a fully stock slot without twrp. This is why you need to immediately flash the twrp installer (which always flashes to both slots), then reboot to recovery, which will get you onto the new slot, with twrp, from which you can reflash magisk, etc.
Ah ok. I just ended up flashing the stock ROM twice, once to each partition. Then I ran the Twrp installer. Then I flashed magisk twice, once to each partition and that fixed my issues
iElvis said:
Correct. When you flash the full stock rom, it will install to the inactive slot, and it will mark that slot as the new active slot, which means that if you reboot right after flashing, you will boot onto a fully stock slot without twrp. This is why you need to immediately flash the twrp installer (which always flashes to both slots), then reboot to recovery, which will get you onto the new slot, with twrp, from which you can reflash magisk, etc.
Click to expand...
Click to collapse
Excellent write up :good:
iElvis said:
Correct. When you flash the full stock rom, it will install to the inactive slot, and it will mark that slot as the new active slot, which means that if you reboot right after flashing, you will boot onto a fully stock slot without twrp. This is why you need to immediately flash the twrp installer (which always flashes to both slots), then reboot to recovery, which will get you onto the new slot, with twrp, from which you can reflash magisk, etc.
Click to expand...
Click to collapse
Awesome writeup!!! this needs an sticky big time.
One question, why does TWRP flash stuff on current slot but full roms on the other slot (and changes slot then?). It is because it replicates the Update Engine protocol or something with entire stock roms only?
PS: I wish there was a more detailed version after the initial setup, like when **** happens and slots get disabled by the bootloader and such. I wonder if when an slot is disabled you can twrp enable/change into it or only flashing stock image works? There's a lot of stuff like this, like what happens if you manage to make both slots unusable (even if bootloader partition works, fastboot wouldn't be reachable right? :S).
This seems like just a hell of an environtment to control compared to the simple old partition scheme.. yeah, here you can have 2 systems set up incase something breaks, great, but you do not control the boot process, the bootloader does, and this is not good for us. Something that affects both slots at the same time like TWRP can go wrong (for example a bugged release of TWRP) and derp you both systems and let you without an unusable phone without even fasboot?... yeah qualcomm protocol but come on..
You'd add on the guide that you can disable seamless updates on developer options. This is very important!! I think that the manual OTA flashing is the way to go if we want to not get into ****..
And you're right, this is ultra intimidating, I've never ever had any problems rooting and such my first android phone.. it was an easy read explaining that bootloader->kernel->system->user, 1) unlock 2) twrp 3) flash root and mods and do nandroids... and if something goes wrong, if you never touched the bootloader partition you could always go into fastboot and fix, or into TWRP and fix even if system bootloops. Here if system bootlops you can't even use TWRP or fastboot on that slot???? wtf... super intimidating.
You added most of the good stuff on the first post.. how about a new section "the bad side" or something like that with all the stuff im saying and more bad stuff that I don't even know yet? You will evade most people getting onto those situations and post here asking about that stuff.
Thanks!
RusherDude said:
One question, why does TWRP flash stuff on current slot but full roms on the other slot (and changes slot then?). It is because it replicates the Update Engine protocol or something with entire stock roms only?
Click to expand...
Click to collapse
I assume because it's coded to flash to both slots. The stock rom updates are set up to use Google's A/B approach, which sets out a specific process for flashing updates.
PS: I wish there was a more detailed version after the initial setup, like when **** happens and slots get disabled by the bootloader and such. I wonder if when an slot is disabled you can twrp enable/change into it or only flashing stock image works? There's a lot of stuff like this, like what happens if you manage to make both slots unusable (even if bootloader partition works, fastboot wouldn't be reachable right? :S).
Click to expand...
Click to collapse
The A/B info page I linked explains exactly what happens:
The current slot (or "source slot") is marked as successful (if not already marked) with markBootSuccessful().
The unused slot (or "target slot") is marked as unbootable by calling the function setSlotAsUnbootable(). The current slot is always marked as successful at the beginning of the update to prevent the bootloader from falling back to the unused slot, which will soon have invalid data. If the system has reached the point where it can start applying an update, the current slot is marked as successful even if other major components are broken (such as the UI in a crash loop) as it is possible to push new software to fix these problems.
The update payload is an opaque blob with the instructions to update to the new version. The update payload consists of the following:
Metadata. A relatively small portion of the update payload, the metadata contains a list of operations to produce and verify the new version on the target slot. For example, an operation could decompress a certain blob and write it to specific blocks in a target partition, or read from a source partition, apply a binary patch, and write to certain blocks in a target partition.
Extra data. As the bulk of the update payload, the extra data associated with the operations consists of the compressed blob or binary patch in these examples.
The payload metadata is downloaded.
For each operation defined in the metadata, in order, the associated data (if any) is downloaded to memory, the operation is applied, and the associated memory is discarded.
The whole partitions are re-read and verified against the expected hash.
The post-install step (if any) is run. In the case of an error during the execution of any step, the update fails and is re-attempted with possibly a different payload. If all the steps so far have succeeded, the update succeeds and the last step is executed.
The unused slot is marked as active by calling setActiveBootSlot(). Marking the unused slot as active doesn't mean it will finish booting. The bootloader (or system itself) can switch the active slot back if it doesn't read a successful state.
Post-installation (described below) involves running a program from the "new update" version while still running in the old version. If defined in the OTA package, this step is mandatory and the program must return with exit code 0; otherwise, the update fails.
After the system successfully boots far enough into the new slot and finishes the post-reboot checks, the now current slot (formerly the "target slot") is marked as successful by calling markBootSuccessful().
Click to expand...
Click to collapse
You can see there are multiple stages here, and if the bootloader can't even load, that slot won't be marked as active.
There's an even more detailed version here: https://source.android.com/devices/tech/ota/ab/ab_implement
As I understand it, twrp can change active slots, but if the slot has been marked unbootable (because it's not bootable), then it probably has to fixed with a clean reflash.
Unless the slot is completely empty, you should still be able to get to bootloader. Obviously, if the bootloaders are corrupted on both slots, you have a brick, but you can do that on non-A/B phones too.
This seems like just a hell of an environtment to control compared to the simple old partition scheme.. yeah, here you can have 2 systems set up incase something breaks, great, but you do not control the boot process, the bootloader does, and this is not good for us. Something that affects both slots at the same time like TWRP can go wrong (for example a bugged release of TWRP) and derp you both systems and let you without an unusable phone without even fasboot?... yeah qualcomm protocol but come on.
Click to expand...
Click to collapse
I'm not sure the situation is that dire. A bad release of twrp could bork a non-A/B phone the same way? Here you've got two slots instead of one.
You'd add on the guide that you can disable seamless updates on developer options. This is very important!! I think that the manual OTA flashing is the way to go if we want to not get into ****..
Click to expand...
Click to collapse
I'm not seeing an option to disable A/B updates anywhere.
And you're right, this is ultra intimidating, I've never ever had any problems rooting and such my first android phone.. it was an easy read explaining that bootloader->kernel->system->user, 1) unlock 2) twrp 3) flash root and mods and do nandroids... and if something goes wrong, if you never touched the bootloader partition you could always go into fastboot and fix, or into TWRP and fix even if system bootloops. Here if system bootlops you can't even use TWRP or fastboot on that slot???? wtf... super intimidating.
Click to expand...
Click to collapse
I don't think this is true. If you're simply in a system bootloop, you can still get into bootloader.
Thanks
iElvis said:
The A/B info page I linked explains exactly what happens:
You can see there are multiple stages here, and if the bootloader can't even load, that slot won't be marked as active.
There's an even more detailed version here: https://source.android.com/devices/tech/ota/ab/ab_implement
As I understand it, twrp can change active slots, but if the slot has been marked unbootable (because it's not bootable), then it probably has to fixed with a clean reflash.
Unless the slot is completely empty, you should still be able to get to bootloader. Obviously, if the bootloaders are corrupted on both slots, you have a brick, but you can do that on non-A/B phones too.
I'm not sure the situation is that dire. A bad release of twrp could bork a non-A/B phone the same way? Here you've got two slots instead of one.
I don't think this is true. If you're simply in a system bootloop, you can still get into bootloader.
Click to expand...
Click to collapse
All this is related to the same doubt. On the flow on the page you linked, it tries to boot, if it fails N times it sets the slot as unbootable and changes to the other. You cannot just change to the previous slot and enter fasboot there since the bootloader won't boot that already unbootable boot. It is considered unbootable even if its a system issue with bootloader/kernel working.. or I'm getting that wrong? On a normal partitions phone, you won't ever get locked to enter fasboot because system won't boot, here it will happen per the flow diagram on the site...
iElvis said:
I'm not seeing an option to disable A/B updates anywhere.
Click to expand...
Click to collapse
Not A/B updates, but automatic updates. I don't have the phone, but I've been told in this sub that there's an option to disable automatic updates there.
RusherDude said:
All this is related to the same doubt. On the flow on the page you linked, it tries to boot, if it fails N times it sets the slot as unbootable and changes to the other. You cannot just change to the previous slot and enter fasboot there since the bootloader won't boot that already unbootable boot. It is considered unbootable even if its a system issue with bootloader/kernel working.. or I'm getting that wrong? On a normal partitions phone, you won't ever get locked to enter fasboot because system won't boot, here it will happen per the flow diagram on the site...
Click to expand...
Click to collapse
I think I see what you may be missing here. One slot being unbootable doesn't lock you out of fastboot. You can get into fastboot on the other slot, where you can flash anything you want to either slot. So you're not locked out of it if it fails to boot, you just can't boot up on that slot and the system will boot on the other slot.
Not A/B updates, but automatic updates. I don't have the phone, but I've been told in this sub that there's an option to disable automatic updates there.
Click to expand...
Click to collapse
Ah, yes, you can indeed disable automatic upgrades. You can also just download the OTA and not reboot, which I've done several times. Download, stop the process, reboot to recovery before the slot switches over.
iElvis said:
I think I see what you may be missing here. One slot being unbootable doesn't lock you out of fastboot. You can get into fastboot on the other slot, where you can flash anything you want to either slot. So you're not locked out of it if it fails to boot, you just can't boot up on that slot and the system will boot on the other slot.
Click to expand...
Click to collapse
In that scenario, yes you could reflash from slot B, but if you manage to then also bootloop on slot B, you end up with 2 slots with bootloader & kernel partitions working properly, system not booting and unable to enter fastboot or twrp on any of those? My doubt here is if bootloader/fastboot is "always there" even if you derp on both slots or not. If there isn't and you're reduced to qualcomm protocol having 2 correct aboot/fastboot partitions it is the most idiotic measure I have seen done by Google in a long time.
iElvis said:
Ah, yes, you can indeed disable automatic upgrades. You can also just download the OTA and not reboot, which I've done several times. Download, stop the process, reboot to recovery before the slot switches over.
Click to expand...
Click to collapse
I'm interested in that. Which process do you kill? And after rebooting to recovery, you just reboot normal and the slot change and such is ignored and system ignores the download ota and such? or from now on you can't reboot normally again?

Restore stock op7 pro

Hi i wiped all in my op7 pro with the twrp :silly:
And now i want to reinstall a full rom stock but how?
please help me
Easiest option is download the fastboot rom for whatever version you need and run the flash-all.bat through command prompt while in fastboot mode.
Here is the relevant thread.
Maybe already lessons learned. But seems like you ignored several "best practices" for phone modding, which I'm constructively posting for your consideration and information:
1) First thing that should be done after installing TWRP, and before messing with anything (wipe, root, mods, etc.) is to make a TWRP backup of your stock ROM. Doing so would have given you a simple way to restore from the current situation. Or alternately, read up and understand how to restore to stock with stock recovery image (such as that posted in the previous reply). And have the needed files ready to go. In short, you have know how to return to stock before messing with the phone. Give yourself an escape plan always. Otherwise, you're metaphorically jumping into a deep hole, without having any plan on how to get out.
2) Don't mess with the "advanced" wipe options in TWRP unless you know exactly what the result will be. It's called "advanced" for a reason. And it says right on the TWRP main Wipe screen that the default wipe (data, cache, Dalvik) is the only wipe you need most of the time". Again, it says for a reason. I've seen far too many posts on these forums along the lines of "I wiped system and now the phone won't boot to OS" when such a result should have been obvious (system is the OS, after all). And if the result is not obvious to you, don't wipe it!
Simply said, a little reading and knowledge, and a bit of planning, will prevent a lot of headaches when modding these devices.
Now on a side note, is there some problem of issue you were trying to address when you did the TWRP wipe?

Bricked my OP7P - Can't decrypt data partition anymore

Hey Guys,
this could propably be posted in r/TIFU as well since I think I screwed up big time today -.-
I basically just wanted to update my rooted OP7P to 10.0.5 (EU) using the latest OTA - so I followed the usual steps as always:
Uninstall Magisk
Install OTA - No Reboot
Install TWRP retention script in Magisk
Re-Install Magisk
Reboot
This procedure worked fine the last 2 times an OTA was released but this time I'm not able to boot into the system anymore. TWRP is still in places but won't read the data partition anymore - it also doesn't ask for my pattern to decrypt it. Problem is that idiot-me of course didn't do a backup before (yea, I know -.-) and obviously doesn't want to loose the data on it.
I of course checked the forum and googled my ass of trying to find a non-destructive way to access the system but couldn't find anything fitting my scenario. So my last resort is to ask you guys directly: Did anybody ever encounter such a situation and if yes, how did you resolve it? Right now any support would be much appreciated
//Edit: Symptoms and current behaviour:
Boot into system (partition A) ends in the OP logo cirling endlessly
Boot into system (partition B) sends me directly to TWRP
TWRP doesn't ask for encryption pattern
The answer to TWRP's initial question (Keep System r/o) is not persisted
Fastboot/ADB are working (but obviously w/o access to /data)
I'm technically running a stock OxygenOS with Renovate ICE. I know technically its instuctions say to install the OTA directly from within TWRP and and then re-flash TWRP and Magisk but that wasn't neccessary the last times... one idea of mine is to just do that now and see where it leads me but I really don't wanna risk my data.
the.cybertronic said:
Hey Guys,
this could propably be posted in r/TIFU as well since I think I screwed up big time today -.-
I basically just wanted to update my rooted OP7P to 10.0.5 (EU) using the latest OTA - so I followed the usual steps as always:
Uninstall Magisk
Install OTA - No Reboot
Install TWRP retention script in Magisk
Re-Install Magisk
Reboot
This procedure worked fine the last 2 times an OTA was released but this time I'm not able to boot into the system anymore. TWRP is still in places but won't read the data partition anymore - it also doesn't ask for my pattern to decrypt it. Problem is that idiot-me of course didn't do a backup before (yea, I know -.-) and obviously doesn't want to loose the data on it.
I of course checked the forum and googled my ass of trying to find a non-destructive way to access the system but couldn't find anything fitting my scenario. So my last resort is to ask you guys directly: Did anybody ever encounter such a situation and if yes, how did you resolve it? Right now any support would be much appreciated
//Edit: Symptoms and current behaviour:
Boot into system (partition A) ends in the OP logo cirling endlessly
Boot into system (partition B) sends me directly to TWRP
TWRP doesn't ask for encryption pattern
The answer to TWRP's initial question (Keep System r/o) is not persisted
Fastboot/ADB are working (but obviously w/o access to /data)
I'm technically running a stock OxygenOS with Renovate ICE. I know technically its instuctions say to install the OTA directly from within TWRP and and then re-flash TWRP and Magisk but that wasn't neccessary the last times... one idea of mine is to just do that now and see where it leads me but I really don't wanna risk my data.
Click to expand...
Click to collapse
The bad news is once twrp loses access to data. The only fix is to format data and everything will be fixed.
So... you're basically telling me I ****ed up completely and my data is gone? Never was a profile picture more fitting than yours right now :/
What I'm wondering is that, from a technical perspective and on a working phone, the decryption takes place not during the boot but only after you've entered your code/passphrase/pattern on OS level. Meaning the system should theoretically be able to boot up to there without /data access. TThat's why I had the idea to flash a clean stock Oxygen from TWRP (no root), boot the system and hopefully be able to access the data this way. Respectively any encryption can be broken somehow, can't it? Even if it might take quite some time to do so this should theoretically be possible...
I mean... I definetly don't know enough about Android internals to understand its encryption mechanics completely but from a technical perspective it should be possible.... like the saying "there is no such thing as 100% security"
the.cybertronic said:
So... you're basically telling me I ****ed up completely and my data is gone? Never was a profile picture more fitting than yours right now :/
What I'm wondering is that, from a technical perspective and on a working phone, the decryption takes place not during the boot but only after you've entered your code/passphrase/pattern on OS level. Meaning the system should theoretically be able to boot up to there without /data access. TThat's why I had the idea to flash a clean stock Oxygen from TWRP (no root), boot the system and hopefully be able to access the data this way. Respectively any encryption can be broken somehow, can't it? Even if it might take quite some time to do so this should theoretically be possible...
I mean... I definetly don't know enough about Android internals to understand its encryption mechanics completely but from a technical perspective it should be possible.... like the saying "there is no such thing as 100% security"
Click to expand...
Click to collapse
Dude try flashing the stock rom from twrp onto both slots by mounting an otg drive..or adb sideload(very slow I think..still worth a try if you don't wanna lose data)..stock rom can manage the encryption I suppose.
Encryption is an issue when you flash different roms(I think so..I am no expert,just my experience so far).
Breaking encryption is not like what you think..it might take ages to break using brute force (again from what I heard..I lost my data a lot of time flashing roms without twrp backup..nowadays I just backup my apps using tb coz restorings the apps is really a pain in the ass process)
the.cybertronic said:
So... you're basically telling me I ****ed up completely and my data is gone? Never was a profile picture more fitting than yours right now :/
What I'm wondering is that, from a technical perspective and on a working phone, the decryption takes place not during the boot but only after you've entered your code/passphrase/pattern on OS level. Meaning the system should theoretically be able to boot up to there without /data access. TThat's why I had the idea to flash a clean stock Oxygen from TWRP (no root), boot the system and hopefully be able to access the data this way. Respectively any encryption can be broken somehow, can't it? Even if it might take quite some time to do so this should theoretically be possible...
I mean... I definetly don't know enough about Android internals to understand its encryption mechanics completely but from a technical perspective it should be possible.... like the saying "there is no such thing as 100% security"
Click to expand...
Click to collapse
The reason that format is the only answer is because when twrp does not ask for password. It believes you are unencrypted. What has happened is the file that store your password and encryption key is corrupted so any answer you give is wrong.
There's nothing you can do but format data. I've encountered this issue already.
You can try to salvage personal photos and videos using an otg drive (external ssd, hdd, sd card reader...), also back in 6t days I had this encryption problem twice, I remember that one time flashing the stock rom from the otg fixed it but I don't remember if I rebooted to recovery of the other slot.
Anyway, for the others, if he used DM verity removal and so decrypted data, he would have never face this problem again?
Joker123## said:
Dude try flashing the stock rom from twrp onto both slots by mounting an otg drive..or adb sideload(very slow I think..still worth a try if you don't wanna lose data)..stock rom can manage the encryption I suppose.
Encryption is an issue when you flash different roms(I think so..I am no expert,just my experience so far).
Breaking encryption is not like what you think..it might take ages to break using brute force (again from what I heard..I lost my data a lot of time flashing roms without twrp backup..nowadays I just backup my apps using tb coz restorings the apps is really a pain in the ass process)
Click to expand...
Click to collapse
vegetaleb said:
You can try to salvage personal photos and videos using an otg drive (external ssd, hdd, sd card reader...), also back in 6t days I had this encryption problem twice, I remember that one time flashing the stock rom from the otg fixed it but I don't remember if I rebooted to recovery of the other slot.
Anyway, for the others, if he used DM verity removal and so decrypted data, he would have never face this problem again?
Click to expand...
Click to collapse
I just tried flashing the stock Oxygen yesterday but to no satisfying result... afterwards it just showed a clean default-structure on the SD. Long story short: I accepted the fate that my data is gone and learned a valuable lesson... first thing I installed after rooting was Titanium^^
Zhuang zhuang said:
There's nothing you can do but format data. I've encountered this issue already.
Click to expand...
Click to collapse
As hard as it is to admit, you were completely right... I just lost 6 months worth of photos incl. my last vacation in Vietnam - fml.
the.cybertronic said:
I just tried flashing the stock Oxygen yesterday but to no satisfying result... afterwards it just showed a clean default-structure on the SD. Long story short: I accepted the fate that my data is gone and learned a valuable lesson... first thing I installed after rooting was Titanium^^
As hard as it is to admit, you were completely right... I just lost 6 months worth of photos incl. my last vacation in Vietnam - fml.
Click to expand...
Click to collapse
For future reference, brick means a brick. Like, can't boot to fastboot/twrp/or use msmtool
the.cybertronic said:
As hard as it is to admit, you were completely right... I just lost 6 months worth of photos incl. my last vacation in Vietnam - fml.
Click to expand...
Click to collapse
In the recent OS (10.0.5 & beta 13) I think Oneplus they add something that prevent user from using the TWRP retention script. I always use this solution for lower version and have no issue but with both 10.0.5 and beta 13 have the same issue
Zhuang zhuang said:
In the recent OS (10.0.5 & beta 13) I think Oneplus they add something that prevent user from using the TWRP retention script. I always use this solution for lower version and have no issue but with both 10.0.5 and beta 13 have the same issue
Click to expand...
Click to collapse
damn, good to know if I ever install OOS again - I now switched to Havoc... even though I had to skip rooting it all together after I couldn't get Magisk running with the latest safety net changes (thanks Google -.-)

Categories

Resources