TeamWin / Team-Win-Recovery-Project

Core recovery files for the Team Win Recovery Project (T.W.R.P) - this is not up to date, please see https://github.com/TeamWin/android_bootable_recovery/
http://twrp.me
1.95k stars 741 forks source link

LG G3 D855 3.1.0.0 fails to decrypt /data from Stock ROM #889

Open msrv opened 7 years ago

msrv commented 7 years ago

I am trying to mount the /data partition in TWRP 3.1.0.0, but it always "fails to decrypt /data". I am using latest Stock ROM V30n.

However, if I use LineageOS (latest nightly) with encrypted /data, TWRP is able to mount the partition with my supplied PIN.

There seems to be a difference in stock encryption and LineageOS encryption that prevents TWRP to mount the partition.

Any Ideas?

steadfasterX commented 7 years ago

this is known issue for many devices. stock rom encryption is often proprietary and so not supported by TWRP. Has that ever worked with stock for this device?

ZjemCiKolege commented 7 years ago

In next build encryption fixed in twrp... anyway check this recovery https://www.androidfilehost.com/?fid=817550096634753040

msrv commented 7 years ago

Thank you both for your replies.

The TWRP from androidfilehost trys to mount the /data partition but fails. It says "Password failed" but it is 100% correct.

ZjemCiKolege commented 7 years ago

Probably stock rom have other decryption than lineages build

NightTsarina commented 7 years ago

Similar issue with maguro here. CM13 works perfectly with passphrase, but TWRP (3.1.0-0-76958ae9) does not accept it. I've tried with the UI and with the command line, multiple times.

Selected extracts from recovery.log:

BOARD_HAS_NO_REAL_SDCARD := true                
RECOVERY_SDCARD_ON_DATA := true     
TW_NO_USB_STORAGE := true                                     
TW_INCLUDE_CRYPTO := true                           

/data | /dev/block/mmcblk0p12 | Size: 0MB                                  
   Flags: Can_Be_Wiped Can_Be_Backed_Up Wipe_During_Factory_Reset Wipe_Available_in_GUI IsPresent Can_Be_Encrypted Is_Encrypted Has_Dat
   Symlink_Path: /data/media                                      
   Symlink_Mount_Point: /sdcard                               
   Primary_Block_Device: /dev/block/mmcblk0p12         
   Crypto_Key_Location: /dev/block/platform/omap/omap_hsmmc.0/by-name/metadata
   Display_Name: data                                         
   Storage_Name: Internal Storage                      
   Backup_Path: /data                                       
   Backup_Name: data                                   
   Backup_Display_Name: Data                           
   Storage_Path: /data/media                               
   Current_File_System: emmc                           
   Fstab_File_System: ext4                                                                                                             
   Backup_Method: dd                                                                  
   MTP_Storage_ID: 65537                                                        

I:Is encrypted, do decrypt page first                         
I:Switching packages (TWRP)                         
I:Set page: 'decrypt'                                                            
I:Set page: 'trydecrypt'                            
I:operation_start: 'Decrypt'                                   
crypt_ftr->fs_size = 28397534                                       
Using scrypt with keymaster for cryptfs KDF                   
Trying to convert ascii string of odd length                                                                                           
Failed to convert passwd from hex, using passwd instead       
could not find any keystore module                                                                                                     
Failed to init keymaster                                                   
Signing failed                                                                                                                         
kdf failed                                                        
failure decrypting master key                                 
Failed to decrypt master key                           
crypt_ftr->fs_size = 28397534                                                 
Using scrypt with keymaster for cryptfs KDF                   
could not find any keystore module                     
Failed to init keymaster                                    
Signing failed                                         
kdf failed                                             
failure decrypting master key                              
Failed to decrypt master key                           
Failed to decrypt data.                                                                                                                
nailyk-fr commented 7 years ago

IIRC the official one never get encryption patch merged. (It is still pending into zyan repo)

Le 4 avril 2017 17:07:04 GMT+02:00, "Martín Ferrari" notifications@github.com a écrit :

Similar issue with maguro here. CM13 works perfectly with passphrase, but TWRP (3.1.0-0-76958ae9) does not accept it. I've tried with the UI and with the command line, multiple times.

Selected extracts from recovery.log:

BOARD_HAS_NO_REAL_SDCARD := true                
RECOVERY_SDCARD_ON_DATA := true     
TW_NO_USB_STORAGE := true                                     
TW_INCLUDE_CRYPTO := true                           

/data | /dev/block/mmcblk0p12 | Size: 0MB                              

Flags: Can_Be_Wiped Can_Be_Backed_Up Wipe_During_Factory_Reset
Wipe_Available_in_GUI IsPresent Can_Be_Encrypted Is_Encrypted Has_Dat
  Symlink_Path: /data/media                                      
  Symlink_Mount_Point: /sdcard                               
  Primary_Block_Device: /dev/block/mmcblk0p12         
Crypto_Key_Location:
/dev/block/platform/omap/omap_hsmmc.0/by-name/metadata
  Display_Name: data                                         
  Storage_Name: Internal Storage                      
  Backup_Path: /data                                       
  Backup_Name: data                                   
  Backup_Display_Name: Data                           
  Storage_Path: /data/media                               
  Current_File_System: emmc                           
Fstab_File_System: ext4                                                

Backup_Method: dd                                                      

MTP_Storage_ID: 65537                                                  

I:Is encrypted, do decrypt page first                         
I:Switching packages (TWRP)                         
I:Set page: 'decrypt'                                                  

I:Set page: 'trydecrypt'                            
I:operation_start: 'Decrypt'                                   
crypt_ftr->fs_size = 28397534                                       
Using scrypt with keymaster for cryptfs KDF                   
Trying to convert ascii string of odd length                           

Failed to convert passwd from hex, using passwd instead       
could not find any keystore module                                     

Failed to init keymaster                                               

Signing failed                                                         

kdf failed                                                        
failure decrypting master key                                 
Failed to decrypt master key                           
crypt_ftr->fs_size = 28397534                                          

Using scrypt with keymaster for cryptfs KDF                   
could not find any keystore module                     
Failed to init keymaster                                    
Signing failed                                         
kdf failed                                             
failure decrypting master key                              
Failed to decrypt master key                           
Failed to decrypt data.                                                

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/TeamWin/Team-Win-Recovery-Project/issues/889#issuecomment-291529754

-- Envoyé de mon appareil LineageOS avec K-9 Mail. Veuillez excuser ma brièveté.