Data decryption and dm-verity while rooting the device? - General Questions and Answers

Hi guys!
I've come to a spot in the OP5 rooting guide which states For Users who want to Decrypt Data have to Format Data & Flash No Verity OP5 Zip. However I'm a bit at loss to why to do this or don't, what benefits does it bring and what is the relation between data encryption/decryption and DM-Verity. I googled a lot, but found no definitive answer
Any insight is welcomed (and please don't answer with questions like "Why do you want to root the phone", thanks )

Related

Is being rooted a security risk on an encrypted device?

Before anyone yells at me and links different threads on encryption i've spent the past 3 hours already researching and trying to find an answer to this. I am also aware that custom recoveries can not be used as well as flashing being the only way to revert.​
I'm debating on whether or not doing a full disk encryption would be any less secure if the device was rooted since the root is isolated under the encryption. So my question is does being rooted allow for any sort of way to bypass the encryption or execute any sort of security vulnerability or at least help break the encryption? Or is it irrelevant since the root resides in the /data and that would be encrypted?
I want to the device to be as secure as possible and yes I know I will have to use a 16 char key phrase password to prevent the brute force attacks that have been shown effective on pins since the device uses your device password for the key.
Can anyone shed some light on this? I'm thinking it would be best to go back to stock without a root and encrypt from there, but if rooting is not a security risk on an encrypted device i'd very much like to keep the device rooted.
Thank you for your time.

[Completed] WhatsApp key (rooting)

Hello there,
I'm trying to decrypt backups from WhatsApp. I want to root my phone right now to make it pretty easy to find the key and so I'll be able to decrypt all backups easily.
My question is if the rooting process will change the decryption key of my whatsapp that's currently installed. Because that's the key I'll be needing to decrypt the backups.
P.S. I'll be using a root method that won't delete any data of my phone.
Thanks for the help in advance !
Hi,
I found a few threads on the whatsapp decrypting subject,
http://forum.xda-developers.com/showthread.php?t=2689911
http://forum.xda-developers.com/showthread.php?t=1583021
http://forum.xda-developers.com/showthread.php?t=2770982
As far as your question of rooting changing the key, I would look through these threads, especially the first post or more, and ask in one of those threads if you don't find an answer.
Good luck!

Encryption and question

Hi everyone!
Hope you all have a great new year! Just got a pixel 2 and I was wondering if the automatic device encryption hinders my ability to do anything in relation to root apps, xposed when it comes out, magisk modules or nandroid backups etc.
My previous devices were all unencrypted and I haven't been able to find any info regarding this.
Crapping_Bricks said:
Hi everyone!
Hope you all have a great new year! Just got a pixel 2 and I was wondering if the automatic device encryption hinders my ability to do anything in relation to root apps, xposed when it comes out, magisk modules or nandroid backups etc.
My previous devices were all unencrypted and I haven't been able to find any info regarding this.
Click to expand...
Click to collapse
I have the same question but I'm more concerned about being able to access the internal storage drive to copy files if the OS ever fails to boot. While they remain encrypted and unavailable to me?
PuffDaddy_d said:
I have the same question but I'm more concerned about being able to access the internal storage drive to copy files if the OS ever fails to boot. While they remain encrypted and unavailable to me?
Click to expand...
Click to collapse
Totally agree with you on that one! Does anyone have any input? Also does the current 15.2 magisk prevent the forced encryption?

[TWRP] Regarding the decryption pin/pwd request

Guys, apologies if the question is silly / already asked somewhere i wasn't able to locate.
As per thread title, what is that all about? 1. It's an expected behaviour / feature of TWRP, or is it kind of a bug? 2. Is there any way to avoid / disable it?
It's quite annoying during these days of frequent flashing as development is speeding up fast for this little beast.
If you have a pin or pattern set up it will always ask you for it.
sting5566 said:
If you have a pin or pattern set up it will always ask you for it.
Click to expand...
Click to collapse
Well, thanks for pointing that out.
I've been outside of the flashing world for a while with my old phone (OP2), but i'm pretty sure to recall that i was using TWRP 3.X and the pin was setup (due to fingerprint usage for unlocking) and the recovery was not asking for any decryption pwd.
Maybe the OP2 was not encrypted and that's the point. So wondering if future development will change this (are custom ROMs usually decrypted?)
It's something completely outside of my knowledge, so i could just be trashtalking here.
ca110475 said:
Well, thanks for pointing that out.
I've been outside of the flashing world for a while with my old phone (OP2), but i'm pretty sure to recall that i was using TWRP 3.X and the pin was setup (due to fingerprint usage for unlocking) and the recovery was not asking for any decryption pwd.
Maybe the OP2 was not encrypted and that's the point. So wondering if future development will change this (are custom ROMs usually decrypted?)
It's something completely outside of my knowledge, so i could just be trashtalking here.
Click to expand...
Click to collapse
If you don't want to enter anything when twrp starts under security , screen lock change that to none and you shouldn't have to put anything in when twrp starts.
ca110475 said:
Guys, apologies if the question is silly / already asked somewhere i wasn't able to locate.
As per thread title, what is that all about? 1. It's an expected behaviour / feature of TWRP, or is it kind of a bug? 2. Is there any way to avoid / disable it?
It's quite annoying during these days of frequent flashing as development is speeding up fast for this little beast.
Click to expand...
Click to collapse
It is a security issue. If you need pass/pin/pattern to keep your phone secure then logically you should have it required in twrp to prevent unauthorized access to your phone through twrp. You can disable pass/pin/pattern from the twrp file manager
Sent from my OnePlus6 using XDA Labs
Just decrypt your phones storage. You want be asked for a pattern / pin anymore in twrp
matze19999 said:
Just decrypt your phones storage. You want be asked for a pattern / pin anymore in twrp
Click to expand...
Click to collapse
How?
mikex8593 said:
How?
Click to expand...
Click to collapse
I'm not so sure you can actually decrypt the phone's storage and the reason I believe this to be so is the day I received my phone I was going through all of the settings. If you go into security and lock screen and scroll to the bottom you will see that your phone is encrypted. My phone was like this from day one without entering any fingerprint or PIN code. I may be wrong about decrypting the storage however the OnePlus 6 does have an EFS (encrypted file system) which stores meid, imei, serial number, config, diag settings and radio settings, etc in an encrypted format at the file system level.
If you do manage to decrypt your storage your phone will most certainly be vulnerable
dgunn said:
I'm not so sure you can actually decrypt the phone's storage and the reason I believe this to be so is the day I received my phone I was going through all of the settings. If you go into security and lock screen and scroll to the bottom you will see that your phone is encrypted. My phone was like this from day one without entering any fingerprint or PIN code. I may be wrong about decrypting the storage however the OnePlus 6 does have an EFS (encrypted file system) which stores meid, imei, serial number, config, diag settings and radio settings, etc in an encrypted format at the file system level.
If you do manage to decrypt your storage your phone will most certainly be vulnerable
Click to expand...
Click to collapse
I've always been decrypt with previous phones. There is no decryption method with the 6 yet because of the a/b partitioning. You need to flash a modified boot img.
mikex8593 said:
I've always been decrypt with previous phones. There is no decryption method with the 6 yet because of the a/b partitioning. You need to flash a modified boot img.
Click to expand...
Click to collapse
If you were to decrypt your data (and you can through either adb or fastboot - but I,m not going into that here), you would wipe it at the same time.
There's no way around this.
carlos67 said:
If you were to decrypt your data (and you can through either adb or fastboot - but I,m not going into that here), you would wipe it at the same time.
There's no way around this.
Click to expand...
Click to collapse
With that, I am aware of the wipe, but it would be a prepared and willing wipe, but you are right, this is not the place for the discussion.

Backup problems and questions

Hi, first of all, thank you for reading me.
I think i messed up big time.
I had Havoc OS 4.1 installed since more than a year and it was kinda messy e.g. the sim card card wasnt recognized anymore so wasnt able to make calls because i played to much in the settings.
Having some stupid but incredibly addictive games on this smartphone i decided to keep it like this and since i'm a complete n00bs and being afraid of security risk of rooting my device i never rooted it.
Big mistake.
So, recently, one games needed an update (like they all do at least once a week) and since i'm anti-google/f***book (no comment please) i nvever saved my progress in the cloud and "that" game required absolutely an update.
I installed the update from an alternative apk source and , (applause if you want and laugh), it screwed up the game.
Now the nightmare begin.
Since the device isnt rooted i made a backup of /data partition. Gone crazy and before i might explode in an uncontrollable fury and madness i used LMSA to rescue the phone. And myself, lol.
Now i have stock android and i am googled to the bone. My butt hurts. My head too.
THE (first) simple question is : how can i restore this backup because i have the error 255?
Notes and observations; logically i would say because the device is back with stock rom and doesnt have the same os/rom installed and/or the partition and whatever is not the same wich may explain the error 255.
SECOND QUESTION: can i extract/uncompress this backup and take the precious data wich is my games progresses and restore it somehow?
I know i have to give as much information possible but i dont what else to give. If you need logs, or everything else just say it nicely and i will give it to you with immense pleasure.
Oh yeah, model : XT2113-2 5g Kiev RETCA 128gb a/b type and maybe was crypted before because twrp asked me the password to make backup or else.
Thank you in advance and i really hope somebody would help, if not i just loosed 1.5 years of stupid gaming because i messed up like an idiot. (A lesson well learned, the hard way...)
Thank you so much for not answering this simple question.
Kerplunk83 said:
Thank you so much for not answering this simple question.
Click to expand...
Click to collapse
The problem is it's a Motorola with a Qualcomm chip.
If you find a solution I would love to see it.
Finally a sign of life from someone here.
Thank you sd_shadow
sd_shadow said:
The problem is it's a Motorola with a Qualcomm chip.
If you find a solution I would love to see it.
Click to expand...
Click to collapse
These precious brief and concise 2 lines of a simple answer is immensely welcomed.
Wich point me to reply that to my knowledge i interpret it as a security chip with big chances that its in relation to the knox technology.
It also point me to ask WHY, if i cant back up because of that, why/how is it possible to install a custom rom or gsi (sorry i still dont make the difference because i dont understand it) on this very protected smartphone?
That must explain why i had problems trying to root it and fail each time.
Finally i think that i should use another device for android gaming since i dont want to depend on f***book and google.
Thanks again sd_shadow. Even if it was a very simple answer it enlightens me alot.
Note: sorry for my bad english.
Kerplunk83 said:
how can i restore this backup because i have the error 255?
Click to expand...
Click to collapse
This error code means that at some point your backup of /data could not be extracted further. But for more detailed infos you must provide a recovery.log which will be generated when doing a backup of e.g. /boot.
>>> Please DO NOT copy+paste it here!! <<<​Rename it (recovery.log > recovery.log.txt) to be able to upload it within "Attach files".
Kerplunk83 said:
can i extract/uncompress this backup and take the precious data wich is my games progresses and restore it somehow?
Click to expand...
Click to collapse
Yes, use Titanium Backup (TB). Although it's very outdated it still features a restore of single apps out of a TWRP backup. Here's how you do it:
1. IMPORTANT: TB will only search for TWRP backup files on internal storage!! Use the default path created by TWRP, e.g.: /sdcard/TWRP/BACKUPS/ZY322V8K28/2023-04-08--06-53-20/
2. Install and open Titanium Backup.
3. In the upper right corner tap
MENU > scroll down to "Extract from Nandroid backup" > choose your backup folder
##############
Notes:
- Usually a TWRP backup of /data consists of several parts (data.ext4.win000, ~win001, ~win002 etc). TB requires all of them (or at least those ones with the /data/data/ path inside).
- If you are facing this error message:
Could not find any data in this TWRP backup
then your TWRP backup is compressed with gzip. To decompress it you must rename the file
data.ext4.win001 > data.ext4.win001.gz
and extract it with any archiver tool, e.g.:
- ZArchiver (Android)
- 7zip (Windows)
- Problems finding any TWRP backup data with Titanium Backup? Then please check your path!! (see above section)
Good luck!!
Thank you very much WoKoschekk i'll do it as soon i'll have the time for since i'm working today.
Thank you so much again, i'll keep you posted with logs and such.
I'm sorry i didnt gave news since, i'm not doing very well.
there's those 2 question i still have in my head;
1-With all the instructions you gave me is it worthy to continue because when i did the backup i wasnt rooted?
2- i'm sure i read many time to use Titanium Backup (wich is a paid app?) i have to be rooted or have root access.
Ultimately, how can i be rooted if there's a chip preventing me to do so?
I'll keep you posted when i'll be of better health, thank you.
Kerplunk83 said:
-With all the instructions you gave me is it worthy to continue because when i did the backup i wasnt rooted?
Click to expand...
Click to collapse
TWRP backup = *.tar archive
TB unpacks the needed app's data and nothing else. You must be rooted to have access on /data for restoring your apps. But for the backup process it doesn't matter if you were rooted. Root is part of your boot.img.
Kerplunk83 said:
2- i'm sure i read many time to use Titanium Backup (wich is a paid app?) i have to be rooted or have root access.
Click to expand...
Click to collapse
TB is for free. But a paid version unlocks additional features (not related to the TWRP restoring feature).
And yes... root is mandatory for TB. As I said before you must have r/w access on /data/*.
Kerplunk83 said:
if there's a chip preventing me to do so?
Click to expand...
Click to collapse
Which chip?? You already have root access via TWRP. Magisk is only needed in system and just a patched boot.img (custom kernel).
Get well soon!
WoKoschekk thank you for this insanely fast reply.
All those answers and infos have now a gigantic value for me, if only i knew that before.
To describe a bit more my situation i slept only few hours since 5 days, vomiting, heavy coughs and fever.
I'm sure i'm not supposed to but i will anyway, i engage myself and promise to reward you (in particular) and others for the help you're bringing me. It wont be much but very important to me.
I'll go try to get (again) some rest. Just before i go, why was there a mention about my device;
"
The problem is it's a Motorola with a Qualcomm chip.
If you find a solution I would love to see it.
"
I dont ask you (WoKoschekk) or other to explain in the most explicit and endless details of what is exactly this "chip" and all the history that goes with it cause i dont want to be a pain but just why it was mentionned. Only, why?, it has ben mentionned.
I cant wait to get better since i finally see possibilities to get back those files.
Have a nice week-end and thanks again.
@Kerplunk83 To reveal the mystery behind "the chip": Motorola released two variants (Snapdragon/Mediatek CPU) of this model. Since the CPU largely determines the system structure, building a functional TWRP for both of them is very challenging. It seems that TWRP for the SD's variant got some bugs while the MT's variant runs more smooth. Due to this fact the error 255 is caused by something that you weren't be able to fix.
Regarding your problem: To restore an app and its specific app data you need the proper permissions to write in /data/data and /data/app. For this permissions you either need TWRP or Magisk installed. TWRP seems to be unable to write in that specific directory. On the other hand you don't want to install Magisk. I'm sorry but with this setup your problem can't be fixed.
Just out of curiosity, could you provide me a recovery.log showing error 255 during the restore process?
Please DO NOT copy/paste the whole log and post it here!! Instead of this you should rename the file (recovery.log => recovery.txt) because a file called *.log isn't allowed for upload. But a *.txt file is.
Options to create a recovery.log:
1. adb pull /tmp/recovery.log
=> copies a recovery.log into your ADB/fastboot folder
2. Do a backup of sth. like "boot" because the backup process will create a recovery.log by default
3. TWRP mainscreen > advanced > create log (kernel log isn't needed here)
=> log is stored on the default storage (internal or external) that you have choosen for backups etc.

Categories

Resources