[OFFICIAL] LineageOS 16.0

Search This thread

optimumpro

Senior Member
Jan 18, 2013
6,390
13,874
Hi there. So yesterday I removed encryption to test some GSI based ROMs. But now I want to revert back to having encrypted data. I installed LineageOS and I have everything set up correctly, but when I try to encrypt data it simply soft-reboots back to the lockscreen.

Does anyone know why I can't encrypt data anymore? Previously I have used encryption on LineageOS for months without problem.

Official TWRP has a wrong data partition size: it is more than the actual physical size. So, the logcat during encryption reports 'partition size overlaps cryptofooter region - unable to encrypt'.

To be able to use encryption, you must use unofficial TWRP and do a factory reset (where you are prompted to enter 'Yes' to confirm). However, sinse the device maintainer is the same for the official TWRP and Lineage, Lineage also has the wrong data partition size. So, most likely, you can't encrypt on Lineage for Zuk.
 

DD3Boh

Recognized Developer
Feb 16, 2017
305
1,335
Voghera
Official TWRP has a wrong data partition size: it is more than the actual physical size. So, the logcat during encryption reports 'partition size overlaps cryptofooter region - unable to encrypt'.

To be able to use encryption, you must use unofficial TWRP and do a factory reset (where you are prompted to enter 'Yes' to confirm). However, sinse the device maintainer is the same for the official TWRP and Lineage, Lineage also has the wrong data partition size. So, most likely, you can't encrypt on Lineage for Zuk.
Uh, that's pretty weird as I've tested encryption multiple times before going official with lineage as that's one of the crucial points to go official with it. I tested after formatting data with fastboot, which gave broken encryption (not reserving the crypto footer of course) and then formatting with my official TWRP, which got everything working just fine.
I'll test this again in something like 3 weeks as I'm going on holidays pretty soon.
Although if you're so sure about this issue in official TWRP, make a fix and push it on teamwin Gerrit. I'll take a look :)
 

optimumpro

Senior Member
Jan 18, 2013
6,390
13,874
Uh, that's pretty weird as I've tested encryption multiple times before going official with lineage as that's one of the crucial points to go official with it. I tested after formatting data with fastboot, which gave broken encryption (not reserving the crypto footer of course) and then formatting with my official TWRP, which got everything working just fine.
I'll test this again in something like 3 weeks as I'm going on holidays pretty soon.
Although if you're so sure about this issue in official TWRP, make a fix and push it on teamwin Gerrit. I'll take a look :)

"I'll take a look"

LOL.

Do yourself a favor: boot in recovery, connect to PC and do:

cat /proc/partitions, then
ls -l /dev/block/bootdevice/by-name/

Data is /dev/block/mmcblk0p48, and on my Z2 it shows 56770275, which translates into 56G 770MB. That's the physical size. Anything equal to or more will preclude encryption. So, the correct size should be 56770275 minus 16,384 or so for cryptofooter.

Your test might have been good, either because you were already encrypted on another rom, or you have never done format/factory reset on official TWRP. Data partition size in the rom tree is not important, because userdata doesn't get flashed during install. So, if someone used another TWRP (with the right size), he/she might encrypt.

If you want to fix it, you know what to do. Plus, you can keep the authorship. LOL again.

Cio.
 
  • Like
Reactions: GopalKaul

DD3Boh

Recognized Developer
Feb 16, 2017
305
1,335
Voghera
"I'll take a look"

LOL.

Do yourself a favor: boot in recovery, connect to PC and do:

cat /proc/partitions, then
ls -l /dev/block/bootdevice/by-name/

Data is /dev/block/mmcblk0p48, and on my Z2 it shows 56770275, which translates into 56G 770MB. That's the physical size. Anything equal to or more will preclude encryption. So, the correct size should be 56770275 minus 16,384 or so for cryptofooter.

Your test might have been good, either because you were already encrypted on another rom, or you have never done format/factory reset on official TWRP. Data partition size in the rom tree is not important, because userdata doesn't get flashed during install. So, if someone used another TWRP (with the right size), he/she might encrypt.

If you want to fix it, you know what to do. Plus, you can keep the authorship. LOL again.

Cio.
Actually just like done by every device and just like our recovery and bootimage partition sizes it's the partition size on /proc/partitions * 1024, and that's the value needed there
The other value for userdataimage partition was apparently pulled out of no where, or better to say that it was pulled out of the oneplus3 device tree during the bringup years ago.
I actually tried formatting with my TWRP and encrypting instead of just taking, and it did work.
So that's it ;)
Bye
 

optimumpro

Senior Member
Jan 18, 2013
6,390
13,874
Actually just like done by every device and just like our recovery and bootimage partition sizes it's the partition size on /proc/partitions * 1024, and that's the value needed there
The other value for userdataimage partition was apparently pulled out of no where, or better to say that it was pulled out of the oneplus3 device tree during the bringup years ago.
I actually tried formatting with my TWRP and encrypting instead of just taking, and it did work.
So that's it ;)
Bye

"The other value for userdataimage partition was apparently pulled out of no where, or better to say that it was pulled out of the oneplus3 device tree during the bringup years ago."

When you have the actual device, you use cat or grep commands to read the actual sizes. This way, you don't have to 'pull' anything from anywhere. :)

By the way, I was responding to your user who couldn't encrypt on Lineage with official TWRP. Encryption also didn't work on my rom, until I loaded a different TWRP. But whatever - you do what you do. :)

Cio.
 
Last edited:
  • Like
Reactions: GopalKaul

DD3Boh

Recognized Developer
Feb 16, 2017
305
1,335
Voghera
"The other value for userdataimage partition was apparently pulled out of no where, or better to say that it was pulled out of the oneplus3 device tree during the bringup years ago."

When you have the actual device, you use cat or grep commands to read the actual sizes. This way, you don't have to 'pull' anything from anywhere. :)

By the way, I was responding to your user who couldn't encrypt on Lineage with official TWRP. Encryption also didn't work on my rom, until I loaded a different TWRP. But whatever - you do what you do. :)

Cio.

"When you have the actual device, you use cat or grep commands to read the actual sizes. This way, you don't have to 'pull' anything from anywhere. :)"
What I am saying, is that before I fixed the sizes of userdata partition, the size was just OnePlus 3's. You're probably the one not knowing what those values in the boardconfig should actually be, as for all the devices it's the partition size in /proc/partitions * 1024.
Oh, also, I've done a format data from my official TWRP and encrypted just now, all working correctly.

But you can say whatever you want as you won't listen :)
 

optimumpro

Senior Member
Jan 18, 2013
6,390
13,874
Actually just like done by every device and just like our recovery and bootimage partition sizes it's the partition size on /proc/partitions * 1024, and that's the value needed there
The other value for userdataimage partition was apparently pulled out of no where, or better to say that it was pulled out of the oneplus3 device tree dur -ing the bringup years ago.
I actually tried formatting with my TWRP and encrypting instead of just taking, and it did work.
So that's it ;)
Bye

"/proc/partitions * 1024,"

If you calculate the size, the max number would be 58132761600. That's exactly what you have in your device tree. But for encryption to work, you must preserve at least 16384 for cryptofooter. Otherwise, encryption will fail with a message: partition size overlaps cryptofooter region. And that's what happens when you format data with the official TWRP (unless you select remove files, instead of format, which is possible) and try to encrypt.

The correct size should be no more than 58132745216 (58132761600 - 16384)

Cio.
 

poled

Senior Member
May 9, 2011
294
46
I missed 2 features in this rom when I tried it...

-fingerprint unlock after reboot
-expanded desktop (I'm not sure if this was missing)

Are they available now?
 

l2azoredge

Senior Member
Oct 8, 2011
107
4
New Delhi
Just flashed this rom. This is the smoothest & best battery life(running it on efficency and balanced, even then it is super smooth) i have ever experienced on my device. My device is comparably smooth to my galaxy s7. Your sir have made my z2 a oneplus!! Thank you so much for this!
 

l2azoredge

Senior Member
Oct 8, 2011
107
4
New Delhi
I have a low earpiece and speaker volume. Will doing the following increase the volume on this rom?

manually increase volume -

1. Go to *root* > vendor > etc
2. Open mixer_paths_tasha.xml in editor.
3. To increase speaker volume -
Find "RX7 DIGITAL VOLUME" and change it's value from 84 to 87
4 to increase earpiece volume -
Find "RX0 DIGITAL VOLUME" and change it's value from 84 to 100
5.For headphones volume -
Find HPHL and HPHR and change their values from 12 to 15.

FYI mixer_paths_tasha.xml location differ in every rom but u will find it under etc folder it may be
"root/system/etc/" or "root/sys/etc"
 

samartht

Senior Member
Mar 15, 2016
375
102
I have a low earpiece and speaker volume. Will doing the following increase the volume on this rom?

manually increase volume -

1. Go to *root* > vendor > etc
2. Open mixer_paths_tasha.xml in editor.
3. To increase speaker volume -
Find "RX7 DIGITAL VOLUME" and change it's value from 84 to 87
4 to increase earpiece volume -
Find "RX0 DIGITAL VOLUME" and change it's value from 84 to 100
5.For headphones volume -
Find HPHL and HPHR and change their values from 12 to 15.

FYI mixer_paths_tasha.xml location differ in every rom but u will find it under etc folder it may be
"root/system/etc/" or "root/sys/etc"
You can just flash zero audio patch it works great but yeah this will work as well
 

l2azoredge

Senior Member
Oct 8, 2011
107
4
New Delhi
Could someone please guide me on how to root this rom?

i tried flashing magisk but it said vendor partiion not found..

Edit: got the vendor partition by flashing the respective zip. flashed magisk again.. got a boot loop..

Edit: nevermind..got it working :p
 
Last edited:

Ruddy06

Member
Feb 15, 2015
15
3
On lineage 16.0(12 July build) battery is not charging using pc usb/powerbank, charging icon is displayed. Same cable is working fine with normal charger. Tried with different cable /pc, same issue. Any suggestions to sort this issue?
Also ph media is not showing in windows explorer.
 
Last edited:

stryderpoa

Member
Mar 14, 2013
9
0
I'm installing this ROM for the fisrt time on my device.
Unlocked bootloader, installed TWRP 3.3.1-0 but after I flash the ROM it gets in a bootloop with a blue screen.
I still can get on recovery and fastboot, but it always go to this bootloop.
I tried the nightlies of August 3 and 6.

Please help.
 

panicker666

Senior Member
Dec 18, 2017
170
115
Mumbai
I'm installing this ROM for the fisrt time on my device.
Unlocked bootloader, installed TWRP 3.3.1-0 but after I flash the ROM it gets in a bootloop with a blue screen.
I still can get on recovery and fastboot, but it always go to this bootloop.
I tried the nightlies of August 3 and 6.

Please help.

You need to QFIL zui 3.5. to avoid blue screen.
You can find videos on YouTube for our device.

If not
Stick to 3.18 kernel ROMs
 

Top Liked Posts

  • There are no posts matching your filters.
  • 59
    I'm very glad to announce that LineageOS for Zuk Z2 is now Official!
    Go check it out on https://download.lineageos.org/z2_plus
    Enjoy the update ;)
    55
    2okPze5.png

    Code:
    /*
     * Your warranty is now void.
     *
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     */

    LineageOS is a free, community built, aftermarket firmware distribution of Android 9 (Pie), which is designed to increase performance and reliability over stock Android for your device.

    LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

    All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review. You can also view the Changelog for a full list of changes & features.

    Bugs :
    • None

    Instructions :
    • Download the latest build and gapps
    • Reboot to recovery
    • Flash the latest build, (magisk) and gapps
    • Reboot

    Downloads :

    Notes :
    • Only Clean Installation Please
    • Bug Report Without logs means nothing

    Reporting Bugs :
    • DO NOT Report bugs if you installed Xposed
    • Grab a logcat right after the problem has occurred. (Please include at least a few pages of the log, not just the last few lines, unless you know what you're doing.)
    • If it is a random reboot, grab /sys/fs/pstore/console-ramoops and /sys/fs/pstore/dmesg-ramoops-0. (Do not bother getting a logcat unless you can get it just before the reboot. A logcat after a reboot is useless)

    Remember to provide as much info as possible. The more info you provide, the more likely that the bug will be solved. Please also do not report known issues. Any bug not reported in the bug report format below may be ignored.

    Sources :

    XDA:DevDB Information
    LineageOS 16 for z2_plus, ROM for the Lenovo ZUK Z2 (Plus)

    Contributors
    DD3Boh, davidevinavil, kubersharma, kenny3fcb, YaroST12
    ROM OS Version: 9.x Pie
    ROM Kernel: Linux 4.x
    ROM Firmware Required: ZUI 3.5 bootloader
    Based On: AOSP

    Version Information
    Status: Stable

    Created 2019-03-04
    Last Updated 2019-05-04
    28
    IMPORTANT INFORMATION

    How to flash treble roms having /factory instead of /vendor?

    * First time custom rom flasher/ coming from ZUI / Never flashed treble rom / Never flashed factory2vendor patch
    1. Flash Treble TWRP ( which supports /factory )
    ( https://twrp.me/zuk/zukz2.html )
    2. Flash ROM + GApps etc


    * Coming from roms for which you had done factory2vendor conversion

    1. Flash Vendor2factory zip
    ( https://androidfilehost.com/?fid=962187416754475514 )
    2. Flash new TWRP with /factory support
    It will work for both non treble like zui , and treble roms having /factory instead of vendor support
    ( https://twrp.me/zuk/zukz2.html )
    3. IMPORTANT STEP : Reboot to new TWRP
    4 Flash rom
    5. No need to wipe if coming from same rom

    Or
    1. Flash ZUI via QFIL
    2. Flash TWRP ( which supports /factory )
    3. Flash rom
    updated information on 03/02/2019

    Credits to @kubersharma for the quick guide
    28
    Hey everyone. A new update finally came by :)

    24/03/2019 build
    Changelog:
    - Kernel rebased over 8996 4.4 caf tag (instead of sdm660 tag that was being used before)
    - Switched to the new haptics driver present in the new kernel tag
    - Switched back to HMP, now that the powerhal for it has been fixed up it performs just awesomely
    - Power profiles added back (under battery settings)

    Download: https://drive.google.com/file/d/1csUuN3tpztbCq6fLcAmYUvI88bn1QGxr

    Enjoy :D
    28
    New build! 10/04/2019

    Changelog:
    - April security patches
    - Graphics stack updated to LA.UM.7.5.r1-03700-8x96.0
    - Fix WiFi Display (miracast)
    - Update daisy blobs stacks
    - Switch back to ZUI IMS blobs to fix VoLTE randomly disappearing
    - Disable input boost (the device is smooth enough with touchboost only and powerhal boosting)
    - Switch to cfq instead of bfq, which is still available as scheduler tho
    - Update kernel to the latest 8996 CAF tag LA.UM.7.5.2.r1-02000-8x96.0

    Download: https://drive.google.com/open?id=189ERwZ0gdDajKWUkQoK0B4UTwf8e2UCq

    Enjoy :)
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone