Unofficial TWRP 3.2.3-0 UA

sudokamikaze

Inactive Recognized Developer
Jan 1, 2017
375
668
0
Rivne
I currently am on the official 3.1.xx TWRP version, can i just flash this as a zip from the current recovery? will that just replace the old one with this one, or do I need to first flash stock recovery?
You can use following methods:
1. Use app flasher like Flashfire or something like that
2. Use PC to write recovery (better variant)
PC method instructions are in OP post.
 

Noeljunior

Senior Member
Sep 17, 2013
126
140
0
Coimbra
Does anyone tried encryption? Well, encryption itself is working with no problems on unofficial LOS16.0 but I can't open data partition on TWRP 3.2.3-1 (from here) : the pattern is always wrong. What can I do to be more helpful?
 

walteweiss

Member
Nov 23, 2019
12
8
0
Bootlooped in TWRP

I've just installed this TWRP 3.2.3-0 on my Nexus 4, using fastboot. Before doing that I've unlocked my bootloader via fastboot as well. The process was like this:
Code:
fastboot oem unlock
  • OKAY [ 69.482s]
  • Finished. Total time: 69.482s

Code:
fastboot erase recovery
  • Erasing 'recovery' OKAY [ 0.039s]
  • Finished. Total time: 0.043s
Code:
fastboot flash recovery twrp-mako-3.2.3-0.img
  • Sending 'recovery' (10262 KB) OKAY [ 0.327s]
  • Writing 'recovery' OKAY [ 0.535s]
  • Finished. Total time: 0.867s
Got no errors, but I haven't loaded the OS (very old CM 14.0 with Android 7, haven't used the phone for a long time). Previous recovery was TWRP, but I don't remember the version.

Now I'm bootlooped into TWRP, on this stage:

Could not mount /data and unable to find crypto footer.
Failed to mount '/data' (Invalid argument)
Unable to recreate /data/media folder.
Updating partition details...
Failed to mount '/data' (Invalid argument)
...done
Unable to mount storage
Failed to mount '/data' (Invalid argument)
Full SELinux Support is present.
wipe_data_via_recovery
Unable to mount /data/media/TWRP/.twrps
Running Recovery Commands
Failed to mount '/data' (Invalid argument)
Formatting Cache using make_ext4fs...
Done processing script file
Renamed stock recovery file in /system to prevent the stock ROM from replacing TWRP.
Photo

Fastboot Mode info
Variant - mako 16GB
Bootloader version - MAKOZ30f
HW Version - rev_11
Baseband version - M9615A-CEFWMAZM-2.0.1701.07
Signing - production
Secure Boot - enabled
Lock State - unlocked


Update: Installed official TWRP (twrp-3.3.1-0-mako.img) and it has the same issue. So it's more likely to be not this very TWRP, but me doing something wrong.
 
Last edited:

dahawthorne

Senior Member
Nov 15, 2014
1,919
1,765
143
Brighton
Guessing here, but have you checked the Mount tab in TWRP to ensure that all partitions are mounted, and also unchecked the "Mount system read-only"? Also format the data partition and wipe everything. While still in TWRP you can copy the ROM and Gapps (try Nano Arm, not Arm64). If you manage to boot successfully you can install Magisk if you want root. The Nexus 4's system partition is too small for PIE but should be ok for an Oreo 8.1 version.
Stream-of-consciousness as I write... :). Just reading your post again I see you unlocked, which wipes data, so perhaps there is no ROM to boot into, which is why you end up in TWRP. This shouldn't happen, since unlocking should leave you with a clean installation of your ROM - just a thought.
Keep trying and asking... :)
Edit: at the worst you should be able to flash the last L version from Google:
https://developers.google.com/android/images#occam
If you want to do this I can provide the flashing step-by-step guide which I used to use before they started sideload OTAs. The flash-all script didn't seem to work too well, but the step-by-step was 100% fireproof. After you get a working device you can move on to upgrading the ROM.
 
Last edited:
  • Like
Reactions: walteweiss

walteweiss

Member
Nov 23, 2019
12
8
0

Edit: at the worst you should be able to flash the last L version from Google:
https://developers.google.com/android/images#occam
If you want to do this I can provide the flashing step-by-step guide which I used to use before they started sideload OTAs. The flash-all script didn't seem to work too well, but the step-by-step was 100% fireproof. After you get a working device you can move on to upgrading the ROM.

Hello, thank you for your stream-of-consciousness! :)
I have tried to flash stock everything right after I posted, and it was playing the circles animation. But I couldn't load into the system for ~2 hours. I decided not to wait any longer, since I'm not going to keep the original Android 5 anyway, and I re-flashed this TWRP the same way I did it before the unlocking my bootloader, and it works fine so far. By the way there is a huge guide about going back to factory image, but I haven't used it, just used flash-all.sh from the zip (I'm on a Mac), it did the job well and quick.

I have resized my partition following this guide: https://forum.xda-developers.com/nexus-4/general/guide-increase-nexus-4s-partition-space-t3800264

Now I'm heading into trying a Custom ROM, hope I'll be fine.
My time in this very thread is done, since the issue is gone. Again, in short, what helped me is to flash stock image (I flashed everything, I think; I had no sensitive data to backup).
 
  • Like
Reactions: dahawthorne

dahawthorne

Senior Member
Nov 15, 2014
1,919
1,765
143
Brighton
If you've resized your system partition, LineageOS 16 works fine on the Nexus 4. I know because I've done it on my two N4s. I like Nexuses. Nexi. Whatever... :)
Edit again: A final thought. The TWRP UA version was (I read) amended to handle the altered partition sizes. I have no clue what difference it makes, but personally I'll leave the UA version on my N4s & N5s just in case the "real" TWRP doesn't work properly with the changed partitions.
 
Last edited:
  • Like
Reactions: walteweiss

walteweiss

Member
Nov 23, 2019
12
8
0
If you've resized your system partition, LineageOS 16 works fine on the Nexus 4. I know because I've done it on my two N4s. I like Nexuses. Nexi. Whatever... :)
Edit again: A final thought. The TWRP UA version was (I read) amended to handle the altered partition sizes. I have no clue what difference it makes, but personally I'll leave the UA version on my N4s & N5s just in case the "real" TWRP doesn't work properly with the changed partitions.
I have read it should be Nexi :)

What do you mean by the difference with this one and Official version? I have this one 3.2.3-0 and the official one is 3.3.1.-0, and the ROM developers say I need to have the latest TWRP. Is it a mandatory, or more like a best-practice? I assume 3.2.3-0 isn't that old, is it?

I have tried to install CarbonROM | CR-7.0 and then LineageOS 16, both with GApps (Arm, pico) and with no luck.

The recovery.log is here: https://paste.ubuntu.com/p/txvrwvjPFH/, and as far as I understand, this log is not just for my current attempt, but for my previous bootloop issue, as you can see a lot of the same MTP-messages.

And two screenshots indicating Error-7. I have Googled about this Error and it's recommended to remove verification. Here comes the question: is this protection mechanism is against me failing to download the right ROM, or is it also against the wrong TWRP? As this TWRP is not the latest, but — again — I assume it's not a huge difference, is it?

Also, my time is wrong, it's the year 1970 for my Nexus 4, and as far as I got it from the relevant thread it's so for everyone, isn't it? I cannot change the date and time due to my touchscreen is partially broken, as you may know it's infamous issue of the Nexi 4 line. It's so broken I barely can swipe for installing anything in TWRP, but I've learned the trick how to make it work, so it works at least till the point my touchscreen won't get worse.

---------- Post added at 07:45 PM ---------- Previous post was at 07:29 PM ----------

And two screenshots indicating Error-7. I have Googled about this Error and it's recommended to remove verification. Here comes the question: is this protection mechanism is against me failing to download the right ROM, or is it also against the wrong TWRP? As this TWRP is not the latest, but — again — I assume it's not a huge difference, is it?
Well, I decided to give that a try, and did as it was recommended in the thread I have linked, in short:
  1. Unzip Archive
  2. Find`META-INF/com/google/android/updater-script`
    • Get rid of the line starting with “assert” to next semi-colon. Usually this is the first line or one of the first lines at the top of the text file. Just delete them.
    3. Zip The Archive back

The line was:
Code:
assert(getprop("ro.product.device") == "mako" || getprop("ro.build.product") == "mako" || abort("E3004: This package is for device: mako; this device is " + getprop("ro.product.device") + "."););
Didn't help, got the same error 7:
Code:
Updater process ended with ERROR: 7
Error installing zip file '/sdcard/lineage-166.0-20191120-UNOFFICIAL-mako-signed-FIXED.zip'
Updating Partition details...
...done
I'm attaching all the errors I have mentioned as screenshots, just in case I've missed something valuable. They're available here: https://imgur.com/a/GCftlVJ

Pardon me if it's not relevant to this TWRP, I just don't know whether it is or it is not.

---------- Post added at 07:49 PM ---------- Previous post was at 07:45 PM ----------

Also I have just checked and Carbon ROM that I've mentioned here earlier has no 'assert line' in its updater-script. So it may be either irrelevant, or just TWRP shows wrong error, or anything else.

---------- Post added at 07:55 PM ---------- Previous post was at 07:49 PM ----------

Yeah, seems like the problem is in this TWRP, I have tried to nuke this TWRP with
Code:
fastboot erase recovery
, then install the newest one with
Code:
fastboot flash recovery twrp-3.3.1-0-mako.img
and it all went just fine, screenshot attached.
 
Last edited:

dahawthorne

Senior Member
Nov 15, 2014
1,919
1,765
143
Brighton
I'll try to cover as many points as I can. I'm no tech expert by any means; I stand on the shoulders of proper developers who actually know what they're doing. You know more about this than I do. Since I have rarely had any major problem (just lucky, I guess... :)) I've never learned to dig into logs.
The "special" repartitioned TWRP I mentioned is from this thread:
https://forum.xda-developers.com/nexus-4/orig-development/repartition-nexus-4-repartition-t3844383
From memory, Error 7 is partition size or TWRP version - I can't remember exactly. This UA version may help if it actually handles the different partition sizes better than the official N4 TWRP, which I guess is expecting particular stock partition sizes. Try flashing this one, format and wipe, transfer ROM & Gapps to your device, and have another go.
Some of my TWRP versions have had the correct time, some haven't, but it's never caused me any problems. I just rename backups to the correct date.
I don't know which TWRP fix method you've used for your broken N4 screen. Nitin Chobhe pointed me to this one:
https://forum.xda-developers.com/showpost.php?p=80750207&postcount=537
My screen and his have a half-inch vertical strip of dead pixels, which makes it impossible to type commands properly, and this temporary resizing of the TWRP screen moves all the buttons to the left of the dead area so that TWRP becomes usable.
And as for your PM question about recommending a particular ROM, I've tried lots of them and it really comes down to personal preference. My main device, my Nexus 6, is running Nitin's excellent Colt OS, which is on temporary break while Nitin works on an Android 10 version. My two N4s, two N5s, N10 & Lenovo Tab 8 Plus are all on LineageOS 16, which I find to be very good and (importantly) regularly maintained.
Good luck...
 
  • Like
Reactions: walteweiss

walteweiss

Member
Nov 23, 2019
12
8
0
Well, my final notes for today. I have tried to install LineageOS 16, but had no luck, it just rebooted into TWRP after 10 or 20 minutes of boot animation. After which I have decided not to dig deeper, since I'm too tired for today, and it's relatively late for me now, so if I want to continue, I'll get back to this task later, hopefully tomorrow, which I'm not sure of. So, I have decided to give Carbon ROM a try as well. It went just fine (as well as LOS16 did as of TWRP). The only difference is this second time I chose not to install TWRP as a system app at all (do I need it as an app? I can manually check whether it's the latest version of TWRP I have or not, as me installing new ROMs is quite seldom occasion). Could that be the thing? I don't know, I think it's not, but I just mention this for someone who may know all this better.

So, at this very point I have Carbon Rom at the start 'Hi there' menu. I'll try to dig into it (I have never used a Carbon ROM before, only different LOSes, and Cyanogens before), and will report if I have any relevant problems here or in the respective Carbon ROM thread.

Thank you @dahawthorne for your participation.

For today my watch has ended :)
 

dahawthorne

Senior Member
Nov 15, 2014
1,919
1,765
143
Brighton
Is it tomorrow now?
One thing I read recently is NOT to install TWRP as a system app. That advice came from a very experienced developer, Elektroschmock, who I believe is a/the main developer for LineageOS, so it's an opinion you can trust.
In your shoes I'd probably regard my N4 as a paperweight, nothing to lose, and repartition again as described in the thread I mentioned, then go on to flash the TWRP UA and then ROM & Gapps. Best read the repartition thread in case there's something in there that specifically states that the repartition works only on a stock device; I don't think that's the case, but I don't believe the thread is too long to scan before you actually push the button.
Good luck.
Edit: (I should get it right first time, right?) - here is the thread containing Elektroschmock's comment:
https://forum.xda-developers.com/nexus-6/orig-development/rom-lineageos-16-0-nexus-6-shamu-t3906045
And he specifically states:
"DON'T install the TWRP app as system app. Otherwise your device won't boot".
 
Last edited:
  • Like
Reactions: walteweiss

walteweiss

Member
Nov 23, 2019
12
8
0
Hey @dahawthorne, thank you for linking the thread, I have no idea why TWRP app is better to be avoided installed, but since I don't like unneeded apps on my system, I'm happy to not having it installed.


In your shoes I'd probably regard my N4 as a paperweight, nothing to lose, and repartition again as described in the thread I mentioned, then go on to flash the TWRP UA and then ROM & Gapps. Best read the repartition thread in case there's something in there that specifically states that the repartition works only on a stock device; I don't think that's the case, but I don't believe the thread is too long to scan before you actually push the button.
Yeah, frankly I had no idea what do I need my N4 for, because it just had a very old battery that shuttered the back screen, so I had to remove it, so I ordered a new one, changed it, and decided I can reflash it then. So now I have fully functional CarbonROM with Android 9 (quite snappy, btw!) and no idea what to use it for, considering 1/4 or 1/3 of my touch screen doesn't work.

I can reinstall the system to LineageOS 16, but I have no idea what was wrong with my previous install. I have the repartition thing already done, before flashing Carbon ROM, so LOS16 should have worked as well.
 
Last edited:

dahawthorne

Senior Member
Nov 15, 2014
1,919
1,765
143
Brighton
Glad you're up and running. Thanks for the update.
I have two spare N4s, one with an iffy screen, and a lovely N5, the nicest phone ever made. I keep them because it's good to have a backup in case my family lose or break their phones, which happens regrettably frequently... :)