• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][Official][Nightly] LineageOS 18.1 for OnePlus 3/3T

Search This thread

Super Jamie

Senior Member
Oct 2, 2009
189
8
I have a OP3T which has been running LineageOS 16. I'm trying to update to 18.1 but I keep getting the error:

Code:
E1001: Failed to update system image.
Updater process ended with ERROR: 1

I'm running latest TWRP twrp-3.5.2_9-0-oneplus3.img. I tried extracting boot.img from the ROM and flashing that to boot with TWRP. I tried Formatting and Repairing all filesystems with TWRP. I tried flashing the latest 9.0.6 firmware (iirc I had done this before anyway). I tried flashing the current 20211108 and previous 20211101 official images and the unofficial microG version, same error so it doesn't seem like a bad download. I tried both adb sideload and copying the ROM to the phone with MTP. I tried flashing latest OxygenOS and LineageOS 17, but they both fail with Error 7.

Any help would be appreciated.
 
Last edited:

kash_si

Senior Member
Oct 19, 2014
191
112
Thanks for the suggestion. I made sure I had System unmounted, and selected the TWRP option to unmount System before flashing any zip. Still no luck.
Thanks for your feedback. Out of curiosity you are Not Encrypted, Correct ?

In TWRP, I always Wipe ALL Partitions and then Format Data Partition. Then I flash the Rom, GApps.

I have successfully flashed multiple Custom Roms on my OP3/3T over the years and never received any error message like yours.
 

Super Jamie

Senior Member
Oct 2, 2009
189
8
Thanks for your feedback. Out of curiosity you are Not Encrypted, Correct ?
Correct, I've never had encryption enabled. I am also doing those same steps as you. I also tried old TWRP 3.4.0 but same result.

I'm starting to wonder if the phone has faulty storage and I just haven't noticed because I haven't flashed a ROM since the LineageOS 16 which I put on there many years ago. I've used the phone daily until recently, but that doesn't mean the storage is all working.
 

nvertigo67

Senior Member
Dec 28, 2011
6,031
12,354
I have a OP3T which has been running LineageOS 16. I'm trying to update to 18.1 but I keep getting the error:

Code:
E1001: Failed to update system image.
Updater process ended with ERROR: 1

I'm running latest TWRP twrp-3.5.2_9-0-oneplus3.img. I tried extracting boot.img from the ROM and flashing that to boot with TWRP. I tried Formatting and Repairing all filesystems with TWRP. I tried flashing the latest 9.0.6 firmware (iirc I had done this before anyway). I tried flashing the current 20211108 and previous 20211101 official images and the unofficial microG version, same error so it doesn't seem like a bad download. I tried both adb sideload and copying the ROM to the phone with MTP. I tried flashing latest OxygenOS and LineageOS 17, but they both fail with Error 7.

Any help would be appreciated.
Did you check the downloaded zip's sha256 checksum? Whats the complete error message in the recovery log?
 

Super Jamie

Senior Member
Oct 2, 2009
189
8
Did you check the downloaded zip's sha256 checksum? Whats the complete error message in the recovery log?
Good idea, I didn't see the checksum there. I can verify the checksum is correct.

Edit: I see what you mean, here is the relevant recovery log:

Code:
Patching system image unconditionally...performing update
blockimg version is 4
maximum stash entries 0
creating stash /cache/recovery/2bdde8504898ccfcd2c59f20bb8c9c25f73bb524
234991616 bytes free on /cache (0 needed)
/cache/recovery/last_command doesn't exist.
erasing 320699 blocks
writing 1024 blocks of new data
writing 1024 blocks of new data
...
writing 1024 blocks of new data
writing 1024 blocks of new data
Decompression failed with BLOCK_LENGTH_2
missing 2136618 bytes of new data
failed to execute command [new 2,271343,272367]
script aborted: E1001: Failed to update system image.
E1001: Failed to update system image.error: 1001
Updater process ended with ERROR: 1

It's failing to decompress the image. So either the download is corrupt or the internal storage is corrupt.

Edit 2: SUCCESS! I formatted the internal storage and copied the image over new. It flashed successfully first time. I guess somehow that internal storage filesystem had become corrupt.

Your prompting to find the full recovery log led me to the solution. Thank you so much, I really appreciate your help!
 
Last edited:
  • Like
Reactions: mad_hat

borisSweden

Senior Member
May 10, 2021
115
7
I don't see the relation to the init extension. Please explain what's wrong with the model setting in the init extension.
How do I check it? I did a fresh install of 18.1 hardened as the issue was still present in 17.1 hardened edition. My MVNO carrier finally activated VoLTE and VoWifi so I was ready to spoof the network. I can explain how I got to PDC to work. Also when I go to mbn_ota all profiles are present but when I go to the update setting it say my last update was 1970 January 01.

  1. USB debug active.
  2. Opened CMD admin.
  3. adb shell su
  4. script to get to prop and activate diag mode. setprop sys.usb.config diag,serial_smd,rmnet_ipa,adb
  5. pdc admin
  6. no carrier profile
 

nvertigo67

Senior Member
Dec 28, 2011
6,031
12,354
How do I check it? I did a fresh install of 18.1 hardened as the issue was still present in 17.1 hardened edition. My MVNO carrier finally activated VoLTE and VoWifi so I was ready to spoof the network. I can explain how I got to PDC to work. Also when I go to mbn_ota all profiles are present but when I go to the update setting it say my last update was 1970 January 01.

  1. USB debug active.
  2. Opened CMD admin.
  3. adb shell su
  4. script to get to prop and activate diag mode. setprop sys.usb.config diag,serial_smd,rmnet_ipa,adb
  5. pdc admin
  6. no carrier profile
First of all: this is the official los 18.1 thread. It's not for discussing unofficial hardned builds. There is an own thread for that.

I still doesn't understand, why you quoted me on init extension. The code I've quoted is just fpr determine and setting the actual model.
 

nvertigo67

Senior Member
Dec 28, 2011
6,031
12,354
Good idea, I didn't see the checksum there. I can verify the checksum is correct.

Edit: I see what you mean, here is the relevant recovery log:

Code:
Patching system image unconditionally...performing update
blockimg version is 4
maximum stash entries 0
creating stash /cache/recovery/2bdde8504898ccfcd2c59f20bb8c9c25f73bb524
234991616 bytes free on /cache (0 needed)
/cache/recovery/last_command doesn't exist.
erasing 320699 blocks
writing 1024 blocks of new data
writing 1024 blocks of new data
...
writing 1024 blocks of new data
writing 1024 blocks of new data
Decompression failed with BLOCK_LENGTH_2
missing 2136618 bytes of new data
failed to execute command [new 2,271343,272367]
script aborted: E1001: Failed to update system image.
E1001: Failed to update system image.error: 1001
Updater process ended with ERROR: 1

It's failing to decompress the image. So either the download is corrupt or the internal storage is corrupt.

Edit 2: SUCCESS! I formatted the internal storage and copied the image over new. It flashed successfully first time. I guess somehow that internal storage filesystem had become corrupt.

Your prompting to find the full recovery log led me to the solution. Thank you so much, I really appreciate your help!

Reading logs is not a strange fetish but just usefull... ;)

You can download the sha256 sum from the los download page. Safe it to <rom-file-name.zip>.sha256sum place it in the same directory as the rom-file-name.zip and check signature verification in twrp. This way the actually flashed file is checked and you can exclude fs-damage, corupption during (later, e.g. from pc to op3/t) transfer etc.
 
  • Like
Reactions: kash_si

borisSweden

Senior Member
May 10, 2021
115
7
First of all: this is the official los 18.1 thread. It's not for discussing unofficial hardned builds. There is an own thread for that.

I still doesn't understand, why you quoted me on init extension. The code I've quoted is just fpr determine and setting the actual model.
As the topic was relevant I thought it was a good idea. Well back to OxygenOS then. Its a hopeless issue.
 

kash_si

Senior Member
Oct 19, 2014
191
112
Reading logs is not a strange fetish but just usefull... ;)

You can download the sha256 sum from the los download page. Safe it to <rom-file-name.zip>.sha256sum place it in the same directory as the rom-file-name.zip and check signature verification in twrp. This way the actually flashed file is checked and you can exclude fs-damage, corupption during (later, e.g. from pc to op3/t) transfer etc.
@nvertigo67 ,

Thank you for "proper" explanation and expert viewpoints. Always look forward to log analysis and solutions from experts like you and others on XDA that makes users happy and successful in flashing Custom Roms.

👍 👏
 
  • Like
Reactions: nvertigo67

Andrea224

Senior Member
Jan 18, 2016
803
479
Rome

Attachments

  • op3_8.1.xml
    36.1 KB · Views: 15

Andrea224

Senior Member
Jan 18, 2016
803
479
Rome

Attachments

  • photo_2021-11-18_01-09-40.jpg
    photo_2021-11-18_01-09-40.jpg
    36.2 KB · Views: 40
  • Like
Reactions: spaniard

denver04

Member
Jun 14, 2017
6
0
Hello, quick question about upgrading: I want upgrade an old OP3 with 17.1 to 18.1 (latest image) but I'm unsure about the google apps. According to the wiki article about upgrading I need to flash a new version of google apps aswell but there's a little problem: I don't know which google apps version I flashed on 17.1 a year ago, is there any way to figure that out? I don't want to flash the wrong one during the upgrade.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    I'm wondering if @dianlujitao (or anyone else) has begun work on bringing LineageOS 19.0 to the 3/3T (or if it's even possible). I know that there are likely a lot of people who'd like to upgrade their devices to the New Hotness, and as for myself, I use my old 3T (which has a broken auto-focus, which is why it's no longer my daily driver) as a test bed for developing my own personal fork of LineageOS. If 19.0 is in the development or planning stages, excellent news (and if not, I'll probably have to grab a different phone to use as my test bed, as I need my main phone too much to risk using it in that capacity).
    Not at all. On one hand, I've been busy with my real-life works recently and don't have spare time for such things. On the other hand, porting S to legacy devices is non-trivial due to missing bpf support on old kernels.
    1
    i see @dlas.dl working on 4.4 kernel here https://github.com/dlasdl/msm-4.4. is there any progress?
    It was dropped afaik. He told in Telegram that he dropped it
  • 45
    LineageOS is a free, community-built, aftermarket firmware distribution of Android 11, which is designed to increase performance and reliability over stock Android for your device.
    Code:
    #include <std_disclaimer.h>
    
    /*
    * Your warranty is now void.
    *
    * We are 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 us for messing up your device, we will laugh at you.
    *
    */
    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. You will need to provide your own Google Applications package (gapps). 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 our Gerrit Code Review. Your changelog is whatever was merged into gerrit.

    Important information:
    This thread is for LineageOS 18.1 builds for OnePlus 3/3T. The following will not be supported here:
    • Custom kernels
    • Mods
    • Xposed

    We don't support Xposed and any logcat which includes an Xposed module will be ignored. You're kindly invited to not report bugs if you:
    • Flashed a custom kernel
    • Installed or did mods from untrusted sources
    • Modified system files

    Tips:
    • You need at least OxygenOS 9.0.2 firmware, otherwise you'll get error 7 when installing the zip. Latest firmware is recommended.

    Installation:
    First time flashing LineageOS 18.1 on your device, or coming from another ROM?
    1. Download the zip(s)
    2. Install a compatible Recovery (Official TWRP 3.4+ is highly recommended: https://dl.twrp.me/oneplus3/)
    3. Perform a nandroid backup of your current ROM (Optional)
    4. Wipe data/factory reset
    5. Flash LineageOS
    6. Optional: Install the Google Apps addon package
    7. Reboot

    Source code:

    Credits:
    • LineageOS Team & Contributors
    • Code Aurora Forum
    • ......

    Changelog and Download:
    Known issues:​
    • This build is HIGHLY EXPERIMENTAL and NOT WELL TESTED.
    • Wifi display not work, don't ever attempt to use it or the system will crash.
    • VoLTE is not tested and I don't know if it ever works, please give feedback if you're able to verify.
    • Fixed the sensor_SMD wakelock
    • Fixed ringtone when bluetooth headset connected
    13
    Regarding the sensor_SMD wake lock:
    Generally, the rom can go for long periods without this wake lock showing up:
    View attachment 5215977View attachment 5215981
    But the wake lock can start at random times:
    View attachment 5215983View attachment 5215985
    And when it starts, it will stop the device from going into deep sleep (look at the "Awake (Screen off)" figures). This will drain the battery a lot faster than normal. See 210209-174541-log.zip for logs.

    However, I find that the wake lock will always start when the phone is fully recharged (I usually do this just before I go to bed). See 210209-174541-log.zip for logs.
    View attachment 5215983View attachment 5216001

    Fortunately, a reboot gets rid of the wake lock.
    Nice finding. Just check the source and that should be the Significant Motion Detector if I'm not wrong. Dunno if there are any drawbacks but you should be able to disable it by adding " ro.vendor.sensors.smd=false" to /vendor/build.prop, please try if it helps.
    13
    I've been running this rom for a week now. I've not had any problems with it - no system reboots, no system FCs, no performance lags or stutters (though I don't play games).
    Battery life is not quite as good as 17.1, but I still only charge the phone once a day. Of course this is with the fix for the sensor_SMD wake lock from https://forum.xda-developers.com/t/...s-18-1-for-oneplus-3-3t.4230665/post-84465491
    The only other minor annoyance than the issues I mentioned in https://forum.xda-developers.com/t/...s-18-1-for-oneplus-3-3t.4230665/post-84456483 is that there's no "Mark as read" option on SMS notifications.

    Great work @dianlujitao! This is now my daily driver. I look forward it becoming an official version.
    12
    Regarding the sensor_SMD wake lock:
    Generally, the rom can go for long periods without this wake lock showing up:
    Screenshot_20210210-044409_BBS.pngScreenshot_20210210-044354_BBS.png
    But the wake lock can start at random times:
    Screenshot_20210209-174523_BBS.pngScreenshot_20210209-174531_BBS.png
    And when it starts, it will stop the device from going into deep sleep (look at the "Awake (Screen off)" figures). This will drain the battery a lot faster than normal. See 210209-174541-log.zip for logs.

    However, I find that the wake lock will always start when the phone is fully recharged (I usually do this just before I go to bed). See 210209-174541-log.zip for logs.
    Screenshot_20210209-174523_BBS.pngScreenshot_20210209-202825_BBS.png

    Fortunately, a reboot gets rid of the wake lock.
    12
    I just built LOS 18.1 (see attached roomservice.xml for OP3/3T and OP5T) for testing (with the March security update - see attached screenshot).
    I successfully flashed LOS 18.1 on official LOS 17.1 via a dirty flash (wipe system/caches + flash build & MindTheGapps-11.0.0-arm64-20210220_140101).
    Note that I didn't flash Magisk and that safetynet passed (see attached screenshot - my BL is locked)
    Download :
    - Build 0312 : https://androidfilehost.com/?fid=2188818919693753932
    - MindTheGapp : https://wiki.lineageos.org/gapps.html

    Thanks for the great job @dianlujitao !
    DOWNLOAD:
    * Build type : unofficial ... daily or weekly ... it depends on LOS gerrit
    * Synced LineageOS sources
    * All credit goes to LOS Team and @dianlujitao
    ==> https://androidfilehost.com/?w=files&flid=323965&sort_by=date&sort_dir=DESC