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.96k stars 741 forks source link

Regression flashing Lineage OS 14.1 in TWRP 3.0.2 #841

Open fangly opened 7 years ago

fangly commented 7 years ago

Hi guys,

I wanted to report difficulties flashing Lineage OS 14.1 (https://www.androidfilehost.com/?fid=529152257862693084) using TWRP 3.0.2 on my Sony Xperia Z3 compact.

  1. First, I got a This package is for device D5803; this device is .. Somehow the device was not reported properly. I got around this issue by removing the line that performs this check in the ZIP file's META-INF/com/google/android/updater-script

  2. Then, I tried again with the modified ZIP file and got a could not detect filesystem error. img_0006

These issues were resolved by downgrading to TWRP 3.0.1.

Best,

Florent

nailyk-fr commented 7 years ago

How do you boot recovery? This is kernel related. I think you changed rom, between two twrp test, or you boot them differently (one with purple led at boot, other with key combination when off).

fangly commented 7 years ago

To boot in recovery, I:

  1. started with the phone off,
  2. pressed the power button,
  3. then I pressed volume up/down.

I did try to flash two different ROMS, as stated in my first post: 1) lineage-14.1-20170106-UNOFFICIAL-z3c.zip 2) then the same ROM, with a single line change (to flash, I disabled ZIP verification for this one) I think I must have rebooted the phone (to prepare the modded ROM) between the two attempts .

nailyk-fr commented 7 years ago

The way you boot is recovery in boot arrangement and cause a lot of trouble (volume rocker while light bring up) because it mix kernels. If you can, I highly recommend you to upgrade your bootloader and use the normal recovery boot. If not, you should be able to use this workaround:

  1. extract boot.img from Lineage,
  2. flash the boot.img,
  3. flash the corresponding recovery,
  4. reboot into recovery Flashing zip should work.

I don't think this issue is TWRP related, please ask into @doriandiaconu xda thread instead.

smith901 commented 7 years ago

Google searching this problem led me here. Same thing I was seeing except the error message was different. Found out the problem is in the updater-script in the META-INF folder. Searched for a way to list the partitions in this format: format("ext4", "EMMC", "/dev/block/mmcblk0p5", "0", "/system"); as described in this link from XDA: https://forum.xda-developers.com/android/development/guide-how-to-port-lollipop-based-roms-t3223938 because this format: /dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/ was not working. It worked for porting TWRP 3.0.

Then I read /proc/mounts to get the device mappings because I couldn't do it from Terminal Emulator, Termux, or adb while the phone was booted. Used this command: cat /proc/mounts > /external_sd/mounts.txt to save it to my SD card.
Also used adb pull /external_sd/mounts.txt to save it to my laptop for reference.

The updater-script worked, only error was that it couldn't unmount. Didn't take a screenshot of that one. ROM didn't work, probably because I don't have the boot partition mapping, still working on how to pull that one.

Hope this helps.