yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] vortex-5:
For those that are having problems copying off nandroid backups after rebooting into their phone you can run the following flashable zip after making your backup.

All it does is set chown media_rw:media_rw /sdcard

which seems to be where the problem is.

Unsure if this is equivalent to TWRP fix contexts.

Maybe someone can advise on that.
[Samsung Galaxy Nexus] osm0sis:
I've had a more advanced version of that in my Odds and Ends thread for ages.
[Samsung Galaxy Nexus] Regina Rainbow:
Thanks, just the info I came to this thread for! I stumbled over this error after upgrading from 2.8.7 official to 3.0.2 official. For me it's only boot.emmc.win and efs.emmc.win that can't be copied after backup, no problems with system.ext4.win, data.ext4.win, logs and hashfiles etc. Also this does not happen on TWRP 3.0.2 for my Moto G (falcon), so this might be some device/build specific quirk.

Did you follow this thread closely, is one of the maintainers aware of this bug, so it would be fixed in a future release?
[Samsung Galaxy Nexus] vortex-5:
I put up the but on their github issue tracker I'm not sure if the maintainers read it. There have been no updates so I don't know if there's a plan to fix it.
[Samsung Galaxy Nexus] ribizly:
Hi,

What can I do with an i9250 device, if after the newest (or any of the older ones) TWRP install it just freeze after the recovery boot. It stuck at the recovery start screen and nothing can be done?

The basic issue was that it got into a cyclic reboot (couple months ago) and now we tried to do something with the phone. I have already flashed the TWRP 3.0.0, 2.2.0, 2.8.7, 2.8.3, but none of them started to work at all (freezed after the boot).

BR,

Gyorgy
[Samsung Galaxy Nexus] runekock:
Try removing TWRP folder from internal storage.

That's where TWRP stores its settings. Sometimes they become corrupted.
[Samsung Galaxy Nexus] Regina Rainbow:
Thanks for answering my question as well as reporting the bug! Where exactly did you file the bug? Would you mind to share the link? (Here?: https://github.com/TeamWin/Team-Win-Recovery-Project/issues)
[Samsung Galaxy Nexus] vortex-5:
https://github.com/TeamWin/Team-Win-Recovery-Project/issues/749

I Adjusted the title the old title wasn't as descriptive for the issue.
[Samsung Galaxy Nexus] bamtan2:
FYI [MENTION=2633638]Ziyan[/MENTION] [MENTION=912474]Dees_Troy[/MENTION]
[Samsung Galaxy Nexus] phaleg:
Shouldn't the thread name be updated to official 3.0.0.2 for maguro?
[Samsung Galaxy Nexus] osm0sis:
Yup. [MENTION=912474]Dees_Troy[/MENTION] needs to add the thread back to his Project templated threads for it to stay updated automatically like the others again.
[Samsung Galaxy Nexus] xxSAKISxx:
Hey guys.oh i have long time to mess with flashing and testing and i kinda miss it.family keep me away for some time but now that i have a little spare time i decide to "pimp" my gnex again.i m stuck to kk 4.4.4 and i see that already Nougat come out for our veteran so as i use to do the old days i need to update my recovery first.i run 2.8.7.0 now and i download the 3.0.0.2.i flash it with flasify right? Nothing change.oh btw i use a theme niw i hope dont mess things up with the new build.happy to come back to the xda community again
[Samsung Galaxy Nexus] bamtan2:
You can flash the new TWRP from the old TWRP :) Flashify will just instruct TWRP to do this :)

Upgrading to a new ROM will destroy everything in your old ROM because they are not compatible. Your pictures and videos will stay, but you will need to do a "factory reset" which will wipe all your app data. So you need to back up what is important!! Or, "don't fix what is not broken" and stay on 4.4 ;)
[Samsung Galaxy Nexus] xxSAKISxx:
Thank you my friend for the replay.

I think that the word 'derstoy' is not the right on.maybe 'wipe' is better.i know what will happent when i upgrade to a new rom.As far i remember every time i flash a new rom the old days ALWAYS i make a clean install even the devs say that is ok to flash over the old one.every time i wipe system cashe data so i start brand new.anyway thanks again for your replay.New twrp is flashed ok.niw i have to find a new 'stable' rom to try.
[Samsung Galaxy Nexus] senolsenol1:
how install with odin?
[Samsung Galaxy Nexus] KemikalElite:
As far as I know there isn't a way to install TWRP on this phone with ODIN.

Because this is a Google Nexus and not a typical Samsung, most everyone just uses ADB/fastboot to install recovery.

Follow these instructions to install TWRP.

http://www.xda-developers.com/how-to-install-twrp/
[Samsung Galaxy Nexus] bamtan2:
try:

http://xdaforums.com/galaxy-nexus/development/toolkit-wugs-nexus-root-toolkit-v1-8-3-t2208863

or

http://xdaforums.com/galaxy-nexus/development/gnex-toolkit-v11-1-0-drivers-backup-t1392310
[Samsung Galaxy Nexus] ExecutorElassus:
I've been trying to boot into that recovery all morning. It asks for a password to unlock encrypted storage, gets to "updating partition table", then freezes and reboots.

Question: All I really need to do is sideload new ROMs. Can I bypass this step and still sideload to the system partition?

UPDATE: apparently I can. Huh. That saves me a lot of grief. Cheers.
[Samsung Galaxy Nexus] KemikalElite:
Yes. Just tap cancel when it asks for the password.

Personally, I've been using Chainfire's Flashfire app.

https://play.google.com/store/apps/details?id=eu.chainfire.flash&hl=en

It flashes ZIPs without recovery, does backup/restore, and auto installs supersu. Its very useful in this situation where I want to flash updates without a PC but can't load data in recovery.
[Samsung Galaxy Nexus] nailyk:
f2fs decrypt maguro twrp 3.0.2

any news for f2fs decryption?

I remember something about test build with a flag change. I can try but what flag should I change?
[Samsung Galaxy Nexus] konnarides:
I have come across something , j made a backup of my phone in TWRP3.0.2.0 and all worked ok. When trying to copy the file to my Windows pc via usb cable the file would not copy to pc.

Flashed back to twrp2.8.7.0 and copying the backup file to pc worked ok.

Why?
[Samsung Galaxy Nexus] nailyk:
It is a know issue with 3.0. Backup files are created with root rights instead of user so mtp refuse to copy them.
[Samsung Galaxy Nexus] konnarides:
I don't like this idea, but you say adb pull should work.
[Samsung Galaxy Nexus] vortex-5:
Yay my issue got mentioned I feel accomplished :)
[Samsung Galaxy Nexus] konnarides:
It should be priority to be able to copy backup files to pc right as the file can be quite big, mine was 4.6gb.

TWRP 2.8.7.0 was able to do this.

This issue should be addressed asap.
[Samsung Galaxy Nexus] vortex-5:
For the time being I'm using my work around View attachment SdcardPermissionsFix.zip It's not the best solution but if you "install" this zip after a backup then when you reboot you'll be able to copy the file off your /sdcard.

It also allows you to copy your file off your /sdcard while still in TWRP.

If you're wondering all my script does it it changes the owner of the /media directory and all sub directories to sdcard_rw from root. And that seems to resolve the issue.
[Samsung Galaxy Nexus] nailyk:
Patch pending for the binary backups.

But I can't get rid of the f2fs encrypted partition reboot.
[Samsung Galaxy Nexus] bamtan2:
Thank you for your work!

The encrypted f2fs defect is unfortunate, but because encryption on Galaxy Nexus is so slow, the number of users affected by this bug is probably small.
[Samsung Galaxy Nexus] coliito:
I have this problem on my moto g falcon sense updated to the last twrp, any fix?

For the last few weeks i cannot mount the usb OTG. I am using latest recovery 3.0.2-0

In TWRP i get the following message:

updating partition details...

E: Unable to mount '/usb-otg'

E: Unable to mount '/usb-otg'

E: Unable to mount '/usb-otg'

Any idea how to solve this issue? Am i missing any drivers?

---------- Post added at 14:23 ---------- Previous post was at 14:19 ----------

Also in my laptop doesn't show any more the phone in the drives, sounds when i plug it in but don't show
[Samsung Galaxy Nexus] nailyk:
That is why I try to fix it: I am one of this users ;)

And really thinking about taking my maguro as daily driver :s

I think OTG are kernel specific. You should try asking on your device TWRP thread or on #twrp irc chan.
[Samsung Galaxy Nexus] coliito:
thx, i did that but no one answer me in that post :/
[Samsung Galaxy Nexus] PGHammer:
CXWM worked, but TWRP failed?

I used 2.8.7.0 to get my own GNex to CM13 (where I am today) (as opposed to CM13's own recovery) - rather cute, that.
[Samsung Galaxy Nexus] massima:
A newer version is available.
[Samsung Galaxy Nexus] osm0sis:
But not yet for us.. :(

Don't feel so bad though, even the Nexus 7 2013 didn't get 3.1.0 yet.

[MENTION=912474]Dees_Troy[/MENTION] should add this thread back to his template though, so the OP gets updated, since we have been kept up to date by [MENTION=2633638]Ziyan[/MENTION].
[Samsung Galaxy Nexus] Ziyan:
Now for us too ;)
[Samsung Galaxy Nexus] guest4711:
Thanx, installed without any problems...
[Samsung Galaxy Nexus] n_petr:
Thank you very much. I did a successful installation of UA 7.1.2 with twrp-3.1.0-0-maguro.img. Everything was OK, but MTP still do not work. OTG works well. (I guess that I have all partitions with ext4; no F2FS partitions.)
[Samsung Galaxy Nexus] kwayne-:
Hi everyone.

First of all, a big thank you for all the people who have contributed to what has led to the newest TWRP release!

I would like to report my problems with using TWRP on a maguro phone running CM 13 with an encrypted filesystem.

I used to use the twrp-3.0.2-0-maguro-decrypt-test.img image, as it was linked in this thread, and at first, it seemed to work fine. However, for a number of months now, when I try to boot into TWRP and enter my encryption password, I get the message that the decryption was successful, but then the phone hangs for a short period of time and ultimately reboots, without showing me the user menu. I don't know what changed between the time when decryption worked and now. You can find an example /proc/last_kmsg here:

nopaste.linux-dev.org/?1124306

(sorry for not providing a proper link, as a new user I'm apparently not allowed to link to external sites)

which has been dumped right after such a involuntary reboot. I hope it helps in debugging this. If you need more information, please let me know.

I've tried the new release now, but it won't accept my encryption password at all. I'm sure I entered it correctly.

I would greatly appreciate it if you could help me out here! Thanks!
[Samsung Galaxy Nexus] nailyk:
I have the same problem because my /data partition is f2fs formatted.

Check if it is ext4 or f2fs.
[Samsung Galaxy Nexus] kwayne-:
Hello,

when I run "mount", the output says that /data is ext4.

Thanks!
[Samsung Galaxy Nexus] nailyk:
the official one on twrp.me had been updated with ext4 crypt support. Have you tested it?
[Samsung Galaxy Nexus] kwayne-:
Hi,

yes, I've tried 3.1.0-0, and it won't even accept my password for decryption and claim it is wrong. I've tried numerous times, so I'm sure it's not that I just mistyped my password.

Thanks!
[Samsung Galaxy Nexus] PiggyFlooper:
Is there a custom recovery for gt-p3113, and what is yhe nickname of my device
[Samsung Galaxy Nexus] guest4711:
espressowifi. for twrp see twrp.me/devices
[Samsung Galaxy Nexus] PiggyFlooper:
In Twrp app there is recovery for p3110, which wouldn't flash, it failed!! I'll check wherever you guide me to, thanks bro, I'm new to this device, I mean today new to device

I'm looking for a recovery.tar.md5
[Samsung Galaxy Nexus] smart-t78:
i know this is a nice community, but its the wrong forum for you. this is samsung galaxy nexus forum. you should better ask your questions in tab 2 forum:)
[Samsung Galaxy Nexus] PiggyFlooper:
There's nothing there to help me, needing good dwnloads
[Samsung Galaxy Nexus] bamtan2:
Try: https://xdaforums.com/galaxy-tab-2/galaxy-tab-2-unified/rom-cyanogenmod-13-cm13-0-t3303798

It says to use this http://andi34.github.io/recoveries_tab2.html and this https://wiki.lineageos.org/devices/espressowifi/install
[Samsung Galaxy Nexus] kwayne-:
Hello again,

I've now tried the new twrp-3.1.1-0-maguro.img, but unfortunately, the problem persists. The recovery image tries to decrypt my data partition, and then claims my password is wrong. I am sure I entered it correctly, and of course I am still able to boot into the "proper"/"main" android using that password.

[MENTION=2633638]Ziyan[/MENTION], do you maybe have an idea why that could be?

Any help is greatly appreciated!
[Samsung Galaxy Nexus] nailyk:
Twrp 3.1.1 use hardware based encryption.

IIRC HW based encryption where included into cm-13.0 only a few month ago, before it was software only.

Maybe you encrypted your device before (so with SW encrypt), and this version is not bot compatible?

I cannot help more as the actual twrp I have is not able to decrypt my f2fs partitions.
[Samsung Galaxy Nexus] kwayne-:
I am running CM 13.0-20160820-SNAPSHOT-ZNH5YAO0J5-maguro, and have enabled encryption on that version (possibly even an older one). So if hardware-based encryption has been added to CM only in 2017, I definitely don't use that.

Maybe there's another way to accomplish what I'm after: I would like to back up the state of my phone, in its entirety if possible. This is because I would like to try installing LineageOS, and if that fails, I would like to be able to restore my phone to the state it is currently in. Maybe I don't even need to decrypt the /data partition then, and can backup/restore it in its encrypted form? If so, I'd be very grateful for hints on how to do that.

Thanks!
[Samsung Galaxy Nexus] nailyk:
Yes HW encrypt was added during the cm to lineage move IIRC.

So you could be still SW encrypted. Also the recent build of twrp I made is encryption broken anyway, whatever you used.

Have you tried an older twrp version?
[Samsung Galaxy Nexus] kwayne-:
I had used an older version more than one year ago, but unfortunately I don't remember which one it was. Either way, that version didn't work either with encryption.

Could you let me know which version(s) you suspect could work, so that I can try them and report back?

Thanks!
[Samsung Galaxy Nexus] nailyk:
I did not have it anymore and my internet search fail to find it. But just when writing this am wondering if it is the version someone provided into this thread.

Also am not 100% this is your problem. You should be able to know if you are hardware or software encrypted into the 'security' setting menu.

Please provide /tmp/recovery.log after trying to decrypt your data (maybe adb still working before the reboot)

Also please provide /proc/last_kmsg _after_ the twrp crash & reboot.

If you are really not hardware encrypted, any version previoius https://xdaforums.com/showpost.php?p=67975081&postcount=2014 should work. But this is weird because twrp should support both versions (SW&HW). Am wondering if the encryption footer did not move one day... Never moved.
[Samsung Galaxy Nexus] kwayne-:
Hello,

in the security settings, it says my credential storage type is "Hardware-backed".

Here's the /proc/last_kmsg I copied after the last crash: nopaste.linux-dev.org/?1124306

It's the same I posted initially. If it doesn't contain the data you need, or does not use the version of twrp you need, please let me know and I'll try and produce a different one.

Here's a /tmp/recovery.log after I tried twice to decrypt on twrp 3.1.1-0: https://nopaste.linux-dev.org/?1158935

Thanks!
[Samsung Galaxy Nexus] nailyk:
Oh!

Looks like the same bug as me. Is your dm-crypt f2fs? Into the rom:

mount | grep -i dm

Because the actual recovery isnot f2fs capable.
[Samsung Galaxy Nexus] kwayne-:
Hi,

I'm not using f2fs, but rather ext4:

shell@maguro:/ $ mount | grep -i dm
/dev/block/dm-0 on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,nomblk_io_submit,data=ordered)

Thanks for the help!
[Samsung Galaxy Nexus] nailyk:
At least this is the exact same error I got.

I tried the well known mount system then decrypt but crashed anyway.

I just notice a 'defaultcrypto' service started into lineage (am still on a old version).

Will try to look at this. Just waiting for some answer into the lineage thread to fork the repos.

1|root@maguro:/ # tail -30 /proc/last_kmsg
[ 46.761962] tf_aes_save_registers: aes_state([COLOR="red"]c2981e40[/COLOR]) <- paes_reg(c9400000): CTRL=0x00000028
[ 46.761962] tf_crypto_disable_clock: clock_paddr=0x4A0095A0
[ 46.761962] tf_clock_timer_stop
[ 46.761962] tf_crypto_enable_clock: clock_paddr=0x4A0095A0
[ 46.761962] tf_clock_timer_start
[ 46.761993] tf_aes_restore_registers: paes_reg(c9400000) <- aes_state(c2981e40): CTRL=0x00000028
[ 46.762023] aes_dma_stop(c7aa0780)
[ 46.762023] tf_aes_save_registers: aes_state(c2981e40) <- paes_reg(c9400000): CTRL=0x00000028
[ 46.762023] tf_crypto_disable_clock: clock_paddr=0x4A0095A0
[ 46.762023] tf_clock_timer_stop
[ 46.762023] tf_crypto_enable_clock: clock_paddr=0x4A0095A0
[ 46.762054] tf_clock_timer_start
[ 46.762054] tf_aes_restore_registers: paes_reg([COLOR="Red"]c9400000[/COLOR]) <- aes_state(c2981e40): [COLOR="RoyalBlue"]CTRL=0x00000028[/COLOR]
[ 46.762084] aes_dma_stop(c7aa0780)
[ 46.762084] tf_aes_save_registers: aes_state(c2981e40) <- paes_reg(c9400000): CTRL=0x00000028
[ 46.762084] tf_crypto_disable_clock: clock_paddr=0x4A0095A0
[ 46.762084] tf_clock_timer_stop
[ 46.762115] tf_crypto_enable_clock: clock_paddr=0x4A0095A0
[ 46.762115] tf_clock_timer_start
[ 46.762115] tf_aes_restore_registers: paes_reg(c9400000) <- aes_state(c2981e40): CTRL=0x00000028
[ 46.762145] aes_dma_stop(c7aa0780)
[ 46.762145] tf_aes_save_registers: aes_state(c2981e40) <- paes_reg(c9400000): CTRL=0x00000028
[ 46.762145] tf_crypto_disable_clock: clock_paddr=0x4A0095A0
[ 46.762176] tf_clock_timer_stop
[ 46.762695] tf_crypto_enable_clock: clock_paddr=0x4A0095A0
[ 46.762725] tf_clock_timer_start
[ 46.762725] tf_aes_restore_registers: paes_reg(c9400000) <- aes_state(c2981e40): CTRL=0x00000028
[ 46.762756] aes_dma_stop(c7aa0780)
[ 46.762756] tf_aes_save_registers: aes_state(c2981e40) <- paes_reg(c9400000): CTRL=0x00000028

looping forever.

If CTRL=0x00000028 is the returned error code it is ENOSPC (no space left).
[Samsung Galaxy Nexus] hga89:
I just installed L13 nightly from July 1 on my GN and after testing it opted to do a filesystem encryption. Just like others, I found that TWRP fails to recognize my password. Said password works fine booting into L 13. I did see some posts whether an older version of OS using SW encryption might have been installed previously and that is not the case, it was a fresh install of L13 above.

Bug in TWRP?

I also found another possible bug. When rebooting from TWRP it is not possible to change any of the two settings for the TWRP app, they default to on. If anything, they should be default to off and the user should be able to change them before TWRP reboots.
[Samsung Galaxy Nexus] nayiZ:
Exactly what I did. With clean flash and fresh L13 nightly also from July (supposed to be with hardware accelerated encryption).... no chance to decrypt in TWRP...

Both true, right? :confused: :crying:
[Samsung Galaxy Nexus] hga89:
Do you know if an earlier release of TWRP is able to decrypt and encrypted filesystem? By the way, I just tried to use the L upgrade system to upgrade to the "nightly" from July 22nd but because it relies on booting into recovery and TWRP cannot decrypt the filesystem, it is not possible to upgrade the OS.
[Samsung Galaxy Nexus] bamtan2:
There have been known bugs with encryption/decryption for a while. You guys will need to either work around it, or group together and set a $$$ bounty to fix it, because I don't think the people with the talent to fix this are working on it!
[Samsung Galaxy Nexus] nailyk:
Am not tallented at all. Anyway am waiting for some [MENTION=4695183]zeelog[/MENTION] feedbacks to setup jenkins then start working on 14.1 and encryption.
[Samsung Galaxy Nexus] bamtan2:
This is good news, I hope everyone can work together!
[Samsung Galaxy Nexus] nailyk:
Am waiting for write perm on the github to be able to setup the gerrit and allow everyone working on it :)
[Samsung Galaxy Nexus] hga89:
That is extremely disappointing to hear - does this mean that /all/ phones/tablets running TWRP suffer from encryption/decryption bugs? Is this a bug recently introduced or has it been around for a long time? Is it connected to, what I understand, the introduction of hardware-based encryption in Marshmallow?

This is such a crucial functionality!
[Samsung Galaxy Nexus] nailyk:
HW Based encryption require a lot of proprietary stuffs. As usual proprietary mean closed sources, not (publicly) documented and mostly with a lot of bugs.

When device are software encrypted everything goes fine if TWRP is built with encryption support.

All of this is on charge of your device maintainer. Omnirom for TWRP and maintainer of your rom. You should tell them in case of problems.
[Samsung Galaxy Nexus] hga89:
I would expect software encryption to require more resources, i.e. shorter battery life, than hardware encryption. Thus, if hardware encryption is available it should be used rather than software encryption. Unless I am misinformed, the iPhone has been using hardware encryption for a very long time, no reason why Android should not also. If it does not, Android phones are less secure than the iPhone (and the impression I get is that they are not really secure at all compared to the iPhone...)

I am not sure how the ROM is responsible: is not the encryption functionality a kernel function - dm-crypt? - and thus a basic functionality?
[Samsung Galaxy Nexus] nailyk:
Indeed HW encryption allow better battery life because less cpu usage. However it rely on bad algorythm and flawed blobs.

SW encryption consume a bit more power (but tbh I always guessed my DD was HW encrypted) but on recent device it doesn't really matters.

There are two point in android encryption:

dm-crypt is created with a hash of 'default_password' who is stored with keystore.

HW acceleration happens on the dm-crypt encryption algo, or not.

Hash is stored into TEE/keymaster when available (HW so some other flaws) or into software keystore. This part is locked with the 'boot password'.

So your blobs need to support instruction set to get 'dm-crypt improvements instructions set' and your TZ some functions to manage HW keystore.

And this is only FDE, FBE is another story ;)
[Samsung Galaxy Nexus] hga89:
Thank you for the explanation. I do, however, disagree with your semi-dismissal of hardware encryption as being less important for newer devices. First, all of us are not running newer devices - this thread after all is for the GN phone - and even if we were, the most efficient method should be used. Imaging if video decoding were to be done in software instead of hardware with the rationale that newer devices are faster...
[Samsung Galaxy Nexus] nailyk:
I disagree with you. No need to encrypt if the HW encryption is broken because of backdoored or flawed blobs. But this is my opinion and will stop here that OFF-topic discuss :)

Open a specific thread about this if you wanna talk further or switch to PM.
[Samsung Galaxy Nexus] hga89:
Well, if encryption/decryption is broken, it should be fixed. In 2017 there should not be any need to accept an insecure environment.
[Samsung Galaxy Nexus] musical_chairs:
Please contact Samsung and Google and get them to fix it for us then. Or get them to give us the source code for the proprietary pieces of our phones. This phone was made in 2011, not 2017.
[Samsung Galaxy Nexus] hga89:
Encryption worked in CM 10.2 although I believe that was software-based encryption.
[Samsung Galaxy Nexus] nailyk:
CM-14.1 custom gerrit setup

Post about gerrit creation into 13.0 thread