Moto x4 Magisk OTA updates - Moto X4 Questions & Answers

Has anyone gotten OTA updates to work using the magisk a/b tutorial? I've never gotten it to take an OTA, I usually have to find a recent firmware download and reflash, then go through all the OTAs until I'm done, then reroot with magisk. There's got to be a better way to do it.
I'm wondering if the problem is that I'm installing magisk via TWRP (not flashing twrp, just booting to it). Anyone have any advice?

I do not get OTAs because of unlocked bootloader. But at least I just installed an update to slot B, rebooted to A and rooted B with the Magisk app successfully.
As long as I find updates here, that's ok, I think. Updates do not come often. It's not a Xiaomi in beta test mode.

You can get OTA with an unlocked bootloader. My bootloader has been unlocked since shortly after I got my phone. I might end up doing what you suggest; I know how to get the OTA package from the logs on the phone, so I could just download the OTA and install myself. I was just hoping to get the super snazzy method that magisk allows working.
This latest update was weird. I tried my usual technique (reflash everything without wiping userdata to the last stock ROM, which removes magisk, then update with OTA), but it failed. The new version's ROM was uploaded though, so I could just use that one.
I tried something different this time in that I used the "patch boot image" method instead of installing through TWRP. I'll see if that makes a difference or not next time the updates occur.
And you're right, at least I only have to fiddle with it once a month or so.

This is from/for Lineage 15.1: https://forum.xda-developers.com/showpost.php?p=78722460&postcount=830
Sounds like you need to reflash TWRP after every update but magisk sticks.

I have gotten exactly one OTA with unlocked BL, a security patch for 8.1.
Since then, installation of every downloaded OTA failed.
I once had pulled the OTA file to my PC, but I failed to turn it into a flashable image. I have posted a question about it in the X4 forums.
EDIT: it was 8.0. => click

dougo007 said:
This is from/for Lineage 15.1: https://forum.xda-developers.com/showpost.php?p=78722460&postcount=830
Sounds like you need to reflash TWRP after every update but magisk sticks.
Click to expand...
Click to collapse
I don't have TWRP flashed anymore (I wasn't using it for anything). The problem is that it's not taking the OTA update at all. It says update failed due to unspecified error. When I look through the logs, I see that it's failing because the system partition hash isn't matching what's expected, despite me not modifying the system partiton at all (as far as I know). All I use magisk for is root for adblocking (adguard) and call recording (call recorder), and I used the vanced module from the repo. I don't think any of that should make my /system not match, but I'm not really sure.

oz42 said:
I have gotten exactly one OTA with unlocked BL, a security patch for 8.1.
Since then, installation of every downloaded OTA failed.
I once had pulled the OTA file to my PC, but I failed to turn it into a flashable image. I have posted a question about it in the X4 forums.
Click to expand...
Click to collapse
As far as I know, you can't just directly flash OTAs. You have to go into TWRP and do the sideload thing, though I could be mistaken. It's been a long time since I've tried doing it that way.

tjololo12 said:
As far as I know, you can't just directly flash OTAs. You have to go into TWRP and do the sideload thing, though I could be mistaken. It's been a long time since I've tried doing it that way.
Click to expand...
Click to collapse
I am ~90% sure that OEM OTAs (it sounds like that is what you are discussing) are installed via ADB sideload.

tjololo12 said:
When I look through the logs, I see that it's failing because the system partition hash isn't matching what's expected
Click to expand...
Click to collapse
I wonder if there's a way we can bake in the updated hash value of the system partition to trick the OTA into loading. which log file did you find this in?

trevorcobb said:
I wonder if there's a way we can bake in the updated hash value of the system partition to trick the OTA into loading. which log file did you find this in?
Click to expand...
Click to collapse
I'm not sure honestly, I just did "adb logcat" and watched it while I ran the update. I'm perfectly willing to help you or anyone troubleshoot this. I have a version of Android I can flash before the last update, if you want me to look into something. Otherwise, we can wait until the next one.

Good thread so far. Anyone find a solid work around for this last OTA?
Sent from my moto x4 using Tapatalk

trevorcobb said:
I wonder if there's a way we can bake in the updated hash value of the system partition to trick the OTA into loading. which log file did you find this in?
Click to expand...
Click to collapse
Here's the section from adb logcat
Code:
04-02 07:39:11.716 1447 1447 I update_engine: [0402/073911.715938:INFO:delta_performer.cc(385)] Opening /dev/block/bootdevice/by-name/boot_a partition without O_DSYNC
04-02 07:39:11.716 1447 1447 I update_engine: [0402/073911.716773:INFO:delta_performer.cc(129)] Caching writes.
04-02 07:39:11.716 1447 1447 I update_engine: [0402/073911.716954:INFO:delta_performer.cc(397)] Applying 2 operations to partition "boot"
<unrelated things here>
04-02 07:39:13.065 1447 1447 E update_engine: [0402/073913.065604:ERROR:fec_file_descriptor.cc(30)] No ECC data in the passed file
04-02 07:39:13.065 1447 1447 E update_engine: [0402/073913.065821:ERROR:delta_performer.cc(432)] Unable to open ECC source partition boot on slot B, file /dev/block/bootdevice/by-name/boot_b: Invalid argum
ent
04-02 07:39:13.065 1447 1447 E update_engine: [0402/073913.065902:ERROR:delta_performer.cc(1042)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean th
at the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
04-02 07:39:13.065 1447 1447 E update_engine: [0402/073913.065954:ERROR:delta_performer.cc(1047)] Expected: sha256|hex = AD67C3189DCBFF888499FF8E6D9CCF77D162421ABBB684AD93CD4D74B29D742D
04-02 07:39:13.066 1447 1447 E update_engine: [0402/073913.066004:ERROR:delta_performer.cc(1050)] Calculated: sha256|hex = CF6389937B1AD2F683C710FDA74CA518851F8DF71372C5E4A1349092E3CE25DE
04-02 07:39:13.066 1447 1447 E update_engine: [0402/073913.066057:ERROR:delta_performer.cc(1061)] Operation source (offset:size) in blocks: 0:3336,3576:1985
04-02 07:39:13.066 1447 1447 E update_engine: [0402/073913.066130:ERROR:delta_performer.cc(1345)] source_fd != nullptr failed.
04-02 07:39:13.066 1447 1447 E update_engine: [0402/073913.066183:ERROR:delta_performer.cc(301)] Failed to perform BROTLI_BSDIFF operation 244, which is the operation 0 in partition "boot"
04-02 07:39:13.066 1447 1447 E update_engine: [0402/073913.066238:ERROR:download_action.cc(337)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the
received payload -- Terminating processing
04-02 07:39:13.075 1447 1447 I update_engine: [0402/073913.075061:INFO:delta_performer.cc(317)] Discarding 18435331 unused downloaded bytes
04-02 07:39:13.077 1447 1447 I update_engine: [0402/073913.077715:INFO:multi_range_http_fetcher.cc(172)] Received transfer terminated.
04-02 07:39:13.077 1447 1447 I update_engine: [0402/073913.077897:INFO:multi_range_http_fetcher.cc(124)] TransferEnded w/ code 206
04-02 07:39:13.077 1447 1447 I update_engine: [0402/073913.077950:INFO:multi_range_http_fetcher.cc(126)] Terminating.
04-02 07:39:13.078 1447 1447 I update_engine: [0402/073913.078002:INFO:action_processor.cc(116)] ActionProcessor: finished DownloadAction with code ErrorCode::kDownloadStateInitializationError
04-02 07:39:13.078 1447 1447 I update_engine: [0402/073913.078056:INFO:action_processor.cc(121)] ActionProcessor: Aborting processing due to failure.
04-02 07:39:13.078 1447 1447 I update_engine: [0402/073913.078106:INFO:update_attempter_android.cc(470)] Processing Done.
04-02 07:39:13.079 1447 1447 I update_engine: [0402/073913.079041:INFO:update_attempter_android.cc(495)] Resetting update progress.
04-02 07:39:13.079 1447 1447 D NetdClient: setNetworkForTarget(0)
04-02 07:39:13.079 8128 17008 D OtaApp : UpdateEngineCallbackImplementation: StatusUpdate 0 percentage 0.0
04-02 07:39:13.080 1447 1447 I update_engine: [0402/073913.080598:INFO:update_attempter_android.cc(655)] metrics:({
04-02 07:39:13.080 1447 1447 I update_engine: "downloadPercentageAdminApn": 0.0,
04-02 07:39:13.080 1447 1447 I update_engine: "downloadPercentageCellular": 0.0,
04-02 07:39:13.080 1447 1447 I update_engine: "downloadPercentageWifi": 5.0,
04-02 07:39:13.080 1447 1447 I update_engine: "downloadTotalSize": 20279759,
04-02 07:39:13.080 1447 1447 I update_engine: "downloadTotalTime": 4435.0,
04-02 07:39:13.080 1447 1447 I update_engine: "errorCode": 20,
04-02 07:39:13.080 1447 1447 I update_engine: "networkId": 634765889549.0,
04-02 07:39:13.080 1447 1447 I update_engine: "networkType": "WIFI",
04-02 07:39:13.080 1447 1447 I update_engine: "sessionAttemptNumber": 1.0,
04-02 07:39:13.080 1447 1447 I update_engine: "sessionAttemptResult": 1,
04-02 07:39:13.080 1447 1447 I update_engine: "sessionDownloadDuration": 121005476.0
04-02 07:39:13.080 1447 1447 I update_engine: })
Does that help track things down? Any other way I can help look into things?

There's already a method explained in the FAQs thread for installing official OTAs on rooted stock. TWRP has to be reinstalled after though.
Are you just trying to search for a more efficient solution?

Neffy27 said:
There's already a method explained in the FAQs thread for installing official OTAs on rooted stock. TWRP has to be reinstalled after though.
Are you just trying to search for a more efficient solution?
Click to expand...
Click to collapse
Exactly what post in the FAQ are you referring to??
Sent from my moto x4 using Tapatalk

SR3TLAW said:
Exactly what post in the FAQ are you referring to??
Click to expand...
Click to collapse
Here...
Neffy27 said:
...
12. I am rooted and now Official OTAs don't install
This is a known issue with no fix. Your only option is to wait for copy of latest firmware to be available and manually flash it without the erase userdata to keep your data. Another option is if you are receiving the OTA notification, manually re-flash current firmware build without the erase userdata to keep your data and proceed to accept the OTA (You will have to re-install TWRP/re-root.)
...
Click to expand...
Click to collapse

Related

Nokia 8 (TA1012) fails to update to October 2018 Security Patch

I get this error message:
Error applying update: 20 (ErrorCode::kDownloadStateInitializationError)
Any ideas?
7cherubin said:
I get this error message:
Error applying update: 20 (ErrorCode::kDownloadStateInitializationError)
Any ideas?
Click to expand...
Click to collapse
root and or twrp installed?
2WildFirE said:
root and or twrp installed?
Click to expand...
Click to collapse
Nope.
Never flashed TWRP.
However, I did have root. But I uninstalled it and performed a hard reset.
After that, I also locked the bootloader.
Then try flash matching boot.img after that update again.
? Bootloader isn't needed I update every month with open bootloader
7cherubin said:
I get this error message:
Error applying update: 20 (ErrorCode::kDownloadStateInitializationError)
Any ideas?
Click to expand...
Click to collapse
+1 The same happens to me (stock boot flashed in slot b - september and a -august). No way to update.
Did you guys ever figure it out ? I'm having the exact same problem when trying to flash the November update from Stock Recovery (I tried that because normal OTA errors out). Thanks !
Hi @7cherubin would you send me the post to root TA-1012?
I have the same problem. TA-1004, trying to apply November security update.
After getting the "Installation problem" error message in the update UI, which is not very verbose, I checked the log with adb logcat. The following is what I have found:
Code:
update_engine: [1114/144758:INFO:delta_performer.cc(368)] Applying 8158 operations to partition "system"
update_engine: [1114/144758:ERROR:delta_performer.cc(1065)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
The phone's bootloader was unlocked using the official method.
TWRP has been installed, then removed (by flashing the stock boot image to both slots A and B).
The update seems to fail with or without TWRP.
Also, Magisk has been installed, then removed. Same result: update fails with or without Magisk.
Judging by the error message from the log, the problem is somehow related to the system partition and not the boot partition (where the boot image resides, and which would be affected by TWRP and/or Magisk).
The Nokia 8 doesn't seem to have a separate recovery partition, the recovery image is stored also on the boot partition (proof for this being that if you flash stock boot image, you get back the stock recovery).
Temporarily booting an image with fastboot boot <img> also doesn't work on this phone (at least if you are already on 8.1.0 with October security patch), so installing TWRP is only possible by flashing it to one of the boot slots and forcing the phone to boot from that particular slot.
Neither OST 6.0.4 nor OST 6.1.2 is able to flash the phone.
Sorry if this got too long, I am trying to stick in this post all the info that I have learned in the hopes that someone will have an idea how to fix this.
I had the same problem and had to go back to stock. I had only rooted and flashed the boot images, no TWRP. I had messed up at one point though and flashed both slots and that's where I think the problem lies. The boot images seem to be personalized to the device (keys ?) and the OTA checks for that so if you flash one with a prerooted image, then apply Magisk to the other one and ugrade on that one (after temporarily deactivating Magisk) then you're ok. After going back to stock I was able to verify this "theory", well at least it let me do the OTA multiple times.
Can someone post the link yo root TA-1012 ^_^
webvan said:
I had the same problem and had to go back to stock. I had only rooted and flashed the boot images, no TWRP. I had messed up at one point though and flashed both slots and that's where I think the problem lies. The boot images seem to be personalized to the device (keys ?) and the OTA checks for that so if you flash one with a prerooted image, then apply Magisk to the other one and ugrade on that one (after temporarily deactivating Magisk) then you're ok. After going back to stock I was able to verify this "theory", well at least it let me do the OTA multiple times.
Click to expand...
Click to collapse
Here is what I have, Nokia 8 TA-1004:
- on slot A I have Android 8.1.0 with October security patch
- on slot B I have Android 8.1.0 with September security patch
Neither of these would apply the OTA (slot A November patch, slot B October patch).
I got rid of previous root attempts by flashing:
- stock October boot image to slot A
- stock September boot image to slot B
At this point I am back to as stock as possible.
Then I tried to follow your suggestions, flashed:
- prerooted October boot image to slot A
- stock September boot image to slot B
Set the active slot to A.
Reboot.
Install Magisk from MagiskManager to the "other slot", this switches the active slot to B.
Reboot.
Check that Magisk is installed: yes. Check root with RootChecker: there is root.
Uninstall Magisk from MagiskManager with the Restore Images option, this should restore the stock boot image on the active slot, which at this point is B.
Without reboot, try to apply the OTA update to upgrade to November security patch.
Update fails. Here are a few relevant lines from the log (retrieved with adb logcat):
Code:
11-27 16:56:59.961 1107 1107 I update_engine: [1127/165659:INFO:delta_performer.cc(368)] Applying 5 operations to partition "abl"
11-27 16:56:59.965 1107 1107 I update_engine: [1127/165659:INFO:delta_performer.cc(661)] Starting to apply update payload operations
11-27 16:56:59.970 1107 1107 E update_engine: [1127/165659:ERROR:delta_performer.cc(1065)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that
the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
11-27 16:56:59.970 1107 1107 E update_engine: [1127/165659:ERROR:delta_performer.cc(1070)] Expected: sha256|hex = 1376DA9AFC602B63352F6611917129A8FEC841070A5A44B657826B25D3BAED0D
11-27 16:56:59.970 1107 1107 E update_engine: [1127/165659:ERROR:delta_performer.cc(1073)] Calculated: sha256|hex = 658502232C3D562E1883E66BB2C4BED4F48E98CB02B983DC43DB6D9B05ABF939
11-27 16:56:59.970 1107 1107 E update_engine: [1127/165659:ERROR:delta_performer.cc(1084)] Operation source (offset:size) in blocks: 1:1,3:1,36:14,51:16
11-27 16:56:59.970 1107 1107 E update_engine: [1127/165659:ERROR:delta_performer.cc(1250)] ValidateSourceHash(source_hasher.raw_hash(), operation, error) failed.
11-27 16:56:59.970 1107 1107 E update_engine: [1127/165659:ERROR:delta_performer.cc(288)] Failed to perform SOURCE_BSDIFF operation 1, which is the operation 1 in partition "abl"
11-27 16:56:59.970 1107 1107 E update_engine: [1127/165659:ERROR:download_action.cc(325)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
Then I went back to stock boot images again, and tried the whole process the other way around: switching slots.
Stock image on slot A.
Prerooted image on slot B.
The rest of the process is the same as above.
This time I get a different error in the log:
Code:
11-27 17:07:30.788 1050 1050 I update_engine: [1127/170730:INFO:delta_performer.cc(368)] Applying 5 operations to partition "abl"
11-27 17:07:30.794 1050 1050 I update_engine: [1127/170730:INFO:delta_performer.cc(661)] Starting to apply update payload operations
11-27 17:07:30.834 1050 1050 I update_engine: [1127/170730:INFO:delta_performer.cc(368)] Applying 22 operations to partition "bluetooth"
11-27 17:07:30.841 1050 1050 E update_engine: [1127/170730:ERROR:delta_performer.cc(1065)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that
the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
11-27 17:07:30.841 1050 1050 E update_engine: [1127/170730:ERROR:delta_performer.cc(1070)] Expected: sha256|hex = 73D9DD6F7FCBA3C7A6900599BB66C5D321C9F77B74808FD1ADEB50DD8CE475D2
11-27 17:07:30.841 1050 1050 E update_engine: [1127/170730:ERROR:delta_performer.cc(1073)] Calculated: sha256|hex = BEFE956EC57F320FA6F96067CCDF81DEF88D227A15D7E5412B2064A941E8E7BF
11-27 17:07:30.841 1050 1050 E update_engine: [1127/170730:ERROR:delta_performer.cc(1084)] Operation source (offset:size) in blocks: 4:1,11:1
11-27 17:07:30.841 1050 1050 E update_engine: [1127/170730:ERROR:delta_performer.cc(1250)] ValidateSourceHash(source_hasher.raw_hash(), operation, error) failed.
11-27 17:07:30.841 1050 1050 E update_engine: [1127/170730:ERROR:delta_performer.cc(288)] Failed to perform SOURCE_BSDIFF operation 11, which is the operation 6 in partition "bluetooth"
11-27 17:07:30.841 1050 1050 E update_engine: [1127/170730:ERROR:download_action.cc(325)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
As you can see in the first case it is complaining about the "abl" partition, in the second case it is complaining about the "bluetooth" partition.
webvan, what is your phone model? Is it TA-1004? What security patch levels were you working with in your case?
Mine is a TA-1052.
By "go back to stock" I meant fully reflashing the Oreo update with OTLA because like you nothing I tried with the boot images helped. Since I was rooted I did a backup with Titanium so it wasn't too painful.
I managed to update to 5.15d by sideloading using adb the full ROM (5.15) then sideloading 5.15a and 5.15b, I didn't sideload 5.15c I directly sideloaded 5.15d OTA update and it worked!
I have the same problem.
Slot A : stock boot with sp 2019-04 (5150)
Slot B (active): stock boot with sp 2019-05 (515A)
I tried to sideload OTA (515B with sp 2019-06) on slot B, while the "Error applying update: 20 (ErrorCode::kDownloadStateInitializationError)" message appeared.
By checking the log report, it was just after the operations to partition "system" that I had the line "the hash of the source data on disk for this operation doesn't match the expected value."
Anyone has ideas? Thanks in advance.

Updating to January security patch (OTA)

I have a unlocked TA-1004, rooted with Magisk (running stock recovery). Today I got the notification for the January Security patch.
I restored the boot image with Magisk and proceeded to download and install the OTA, however I'm getting an "Couldn't update - Installation problem" error.
After that I tried reinstalling Magisk, rebooting the phone, restoring the boot image again and retrying the update, it still fails.
Any ideas on what to do? (I didn't want to use a custom recovery solely for keeping the ability to receive further OTA updates, now for whatever reason I can't :S)
TA-1004 here, stock, updated to PIE via beta leak, can't install the update too
yandoo said:
TA-1004 here, stock, updated to PIE via beta leak, can't install the update too
Click to expand...
Click to collapse
I sideloaded the full version (not the beta leak), makes no sense either way tho
I'm having the same issue with a TA1012. Quite fast after downloading the update an error message and "Installationsproblem" in red font.
any solution yet?
ILoveAndroid77 said:
I'm having the same issue with a TA1012. Quite fast after downloading the update an error message and "Installationsproblem" in red font.
any solution yet?
Click to expand...
Click to collapse
I have same issue on my Nokia 8 (TA-1004).
Is Anyone have solution for this?
ADB output shows
01-31 12:40:06.785 1128 1128 E update_engine: [0131/124006.785297:ERROR:delta_performer.cc(990)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
01-31 12:40:06.785 1128 1128 E update_engine: [0131/124006.785480:ERROR:delta_performer.cc(995)] Expected: sha256|hex = 945B60FBC44A481C5F003C140ABBEC14F0CE2C8E142E9843BE83F67905453399
01-31 12:40:06.785 1128 1128 E update_engine: [0131/124006.785520:ERROR:delta_performer.cc(998)] Calculated: sha256|hex = CB0DA98B7D9BC6DF8B98A6323A3079588EA975088DBAB0461404E90809FC67F6
01-31 12:40:06.785 1128 1128 E update_engine: [0131/124006.785563:ERROR:delta_performer.cc(1009)] Operation source (offset:size) in blocks: 0:1,2140:877,3018:10099
01-31 12:40:06.785 1128 1128 E update_engine: [0131/124006.785628:ERROR:delta_performer.cc(1191)] ValidateSourceHash(source_hash, operation, source_fd_, error) failed.
01-31 12:40:06.785 1128 1128 E update_engine: [0131/124006.785670:ERROR:delta_performer.cc(298)] Failed to perform BROTLI_BSDIFF operation 27, which is the operation 0 in partition "boot"
01-31 12:40:06.785 1128 1128 E update_engine: [0131/124006.785711:ERROR:download_action.cc(337)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
Pie (installed via OTA) is on slot B.
On slot A should be the may oreo NB1-488B-0-00WW-B04.nb0. I went back to this with OST and I think the OTA update for pie is not intended to upgrade Oreo May.
Is there a full stock pie image that we could install via OST?
How about your other slot, what's installed there?
1- download this Firmware NB1-488B-0-00WW-B04.qlz Via this link https://bit.ly/2CZS4Z2
2- Flash via NOST https://github.com/StollD/NOST/releases
3- download and flash thes ota update via adb sideload https://bit.ly/2Rs4y0Y
Now you can install January security patch Without any problems
iyadengle said:
1- download this Firmware NB1-488B-0-00WW-B04.qlz Via this link https://bit.ly/2CZS4Z2
Click to expand...
Click to collapse
Does not work - following this link I receive a microsoft sharepoint login site of helmholtzschule. Don't have credentials.
But i think I did this some weeks ago. This should be the full may oreo rom?
iyadengle said:
3- download and flash thes ota update via adb sideload https://bit.ly/2Rs4y0Y
Click to expand...
Click to collapse
Whats this update?
What I did with my phone: install May oreao. after booting and setup it directly went to the pie update.
So i think i have first pie rom on slot B and may on slot A. And may oreo slot A can not be updated with a 76Mb OTA to pie.
If I follow your steps, shouldn't I have the same result as now?
Got a solution for me, described here: https://forum.xda-developers.com/showpost.php?p=78811216&postcount=4

Need Belutooth partition backup of Moto one power device having January 1st Patch

Hi all,
Can anybody please share the twrp backup of bluetooth partition of Moto One Power device having the Pie January 1st Patch? My bluetooth partition got formatted while restoring the twrp backup and restore got failed. Now I'm not able to use the bluetooth. I have got the OTA with face unlock, But thile installing the OTA I started getting bluetooth partition block verification failed saying partition got mounted rw. And while restoring the earlier backup it got formatted :crying:
Got it fixed after a hell lot of research
Hi all,
Finally after searching a lot in net, flashed the bluetooth partition with the img file available in the following site ( Phenotypically ) -> mirrors[dot]lolinet[dot]com[slash]firmware[slash]moto[slash]chef[slash]official[slash]RETIN
The root cause for getting the partition formatted is gettiing the following error, to solve it I tried to restore bluetooth partition and it resulted currupt. Hope it may help somebody who will be get the same issue and stumble upon this page.
I was getting "Update Failed" error in Moto updator. While checking for the logs via adb observed the following error :
Code:
update_engine: [0306/081413.872062:INFO:delta_performer.cc(397)] Applying 8 operations to partition "bluetooth"
update_engine: [0306/081413.885946:ERROR:fec_file_descriptor.cc(30)] No ECC data in the passed file
update_engine: [0306/081413.886903:ERROR:delta_performer.cc(432)] Unable to open ECC source partition bluetooth on slot A, file /dev/block/bootdevice/by-name/bluetooth_a: Success
update_engine: [0306/081413.887044:ERROR:delta_performer.cc(1042)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
update_engine: [0306/081413.887251:ERROR:delta_performer.cc(1047)] Expected: sha256|hex = 9F69430D4BED82B26E49AAA81E0F1E823687605099AD61F45A361A96E7BE6FEE
update_engine: [0306/081413.887321:ERROR:delta_performer.cc(1050)] Calculated: sha256|hex = 734059C0A03A2B2E61CBF3302F2982F3811FD243064D434A6CFC0FAEBDBC0E85
update_engine: [0306/081413.887393:ERROR:delta_performer.cc(1061)] Operation source (offset:size) in blocks: 0:1,6:2,34:1,101:30
update_engine: [0306/081413.887487:WARNING:mount_history.cc(66)] Device was remounted R/W 1 times. Last remount happened on 2019-03-05 03:36:34.000 UTC.
update_engine: [0306/081413.887573:ERROR:delta_performer.cc(1340)] source_fd != nullptr failed.
update_engine: [0306/081413.887652:ERROR:delta_performer.cc(301)] Failed to perform BROTLI_BSDIFF operation 4604, which is the operation 0 in partition "bluetooth"
update_engine: [0306/081413.887721:ERROR:download_action.cc(337)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
update_engine: [0306/081413.888372:INFO:delta_performer.cc(317)] Discarding 301 unused downloaded bytes
update_engine: [0306/081413.894845:INFO:multi_range_http_fetcher.cc(172)] Received transfer terminated.
update_engine: [0306/081413.895113:INFO:multi_range_http_fetcher.cc(124)] TransferEnded w/ code 206
update_engine: [0306/081413.895166:INFO:multi_range_http_fetcher.cc(126)] Terminating.
update_engine: [0306/081413.895224:INFO:action_processor.cc(116)] ActionProcessor: finished DownloadAction with code ErrorCode::kDownloadStateInitializationError
update_engine: [0306/081413.895278:INFO:action_processor.cc(121)] ActionProcessor: Aborting processing due to failure.
Since Moto One Power is having A/B Partition and seemless update support, It looks like the incremental security update was checking for the checksum of the corresponding partition before applying the incremental update. To fix this I flashed the bluetooth and other failing partitions with the apropriate images available in the above shared link.
Hi there, i'm facing the same issue. Can u please tell me which img to flash from stock firmware?

[ROM][10.0][TREBLE] LineageOS 17.1 [UNOFFICIAL] [microG version also available]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
LineageOS is a free, community built, aftermarket firmware distribution of Android 10 (Q), 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.
Base source code is available in the LineageOS Github repo. And if you would like to contribute to the project, please visit our Gerrit Code Review.
Known issues:
You tell me
Moto Mods:
Moto Mods Hasselblad Camera are unknown to work.
All the other Moto Mods work
Instructions:
Always have a backup of the EFS partition made with TWRP stored somewhere, as you may lose IMEI. Restore it if you get 0 as IMEI when booted into the ROM
You will need Pie Firmware to use this ROM, here's an automated script to install it: https://www.androidfilehost.com/?fid=17248734326145714283
Download Official TWRP from twrp.me
Flash the TWRP via fastboot
Enter TWRP, go to wipe menu and Wipe Dalvik, Cache, Data, System and Internal Storage.
In TWRP Wipe Menu, do Format Data, then reboot into recovery
Flash the latest build
Flash eventual GApps and Magisk
Reboot
Downloads:
Latest Unofficial build: AFH
Latest Unofficial build with microG: AFH
Notes
TWRP
If the touchscreen doesn't work when rebooting into recovery, press the power button twice to turn off and on the screen. The touchscreen will now work just fine.
GSIs
This LineageOS build ships with Project Treble compatibility, meaning you can flash a GSI as System Image from TWRP. Please don't report GSI bugs here, report them instead to the GSI's maker. A Format Data from TWRP is required after flashing a GSI in order to avoid problems.
Use Arm64 AB GSIs.
Wanna help?
If you find a problem or a bug, please share a logcat with us, alongside an explanation of the problem and steps to reproduce. We won't accept bug reporting without a logcat. Collect logcat with:
Code:
adb logcat -b all > logcat.txt
You can also join our Telegram Channels:
Global: https://t.me/z2play
Custom ROMs: https://t.me/Z2PlayGSI
There's a guide made by a user to install the ROM, written in both Portuguese and English, here it is: https://telegra.ph/Como-instalar-LOs-160-How-to-install-LOs-160-08-04
Thanks
Many thanks to @marcost22 for the pair-working we are doing, although this time he did most of the work
Sources
Device tree
Vendor tree
Kernel
XDA:DevDB Information
LineageOS 17.1, ROM for the Moto Z2 Play
Contributors
EmaMaker, marcost22, rahulsnair, @erfanoabdi @vache @jeferson1979
ROM OS Version: 10.x
ROM Kernel: Linux 3.x
ROM Firmware Required: ALBUS_RETAIL_9.0_PPS29.133-30_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC
Version Information
Status: Stable
Current Stable Version: 17.1
Stable Release Date: 2021-02-24
I have been running on LOS 15.1 earlier, which has been working fine. I decided to try to update my Z2 play to this rom.
It installs fine, but when booting the first time it boots forever. I have been waiting 30 min but without success. I restarted, and waited 15 min again, but still without success.
I decided to give lineage-18.1-20210110-UNOFFICIAL-albus a shot, and it also installed fine. It also booted fine and setup ran without errors. However, on that ROM the sim-card is not detected.
So I guess I am heading back to 15.1 which is the only one that has been working, although a bit old..
lungan said:
...
Click to expand...
Click to collapse
Did you flashed stock Pie before install? All these android 10 roms are not compatible with Oreo firmware.
meelten said:
Did you flashed stock Pie before install? All these android 10 roms are not compatible with Oreo firmware.
Click to expand...
Click to collapse
I thought I did it, using the script (autoinstall) in the post. However I got some errors, and then I did it manually. Somehow it started to work then. I will write a longer post later on and tell more about my experience.
So far working very well! How nice to be on Android 10 instead of 8... Thanks!
Hello. I tried out your ROM. Since the script only works on Windows, I manually flashed fsg.mbn NON-HLOS.bin adspso.bin and logo.bin prior to trying to boot it. And my WiFi is broken. I did not install a SIM-Card yet.
Here is a log excerpt from when trying to connect to public WiFi:
Spoiler
02-24 18:32:48.093 8186 8186 D WifiSettings: onAccessPointChanged (singular) callback initiated
02-24 18:32:48.507 2575 2575 V KeyguardUpdateMonitor: onSubscriptionInfoChanged()
02-24 18:32:49.997 1195 6806 D WificondControl: Scan result ready event
02-24 18:32:50.033 8186 8186 D WifiSettings: onAccessPointChanged (singular) callback initiated
02-24 18:32:50.035 8186 8186 I sysui_multi_action: [757,804,799,settings_wifi_speed_labels,801,0,802,1]
02-24 18:32:50.093 8186 8186 I chatty : uid=1000(system) com.android.settings identical 20 lines
02-24 18:32:50.093 8186 8186 D WifiSettings: onAccessPointChanged (singular) callback initiated
02-24 18:32:50.097 8186 8186 D WifiSettings: onAccessPointsChanged (WifiTracker) callback initiated
02-24 18:32:50.094 8186 8186 I chatty : uid=1000(system) com.android.settings identical 2 lines
02-24 18:32:50.129 8186 8186 I sysui_multi_action: [757,804,799,settings_wifi_speed_labels,801,0,802,1]
02-24 18:32:50.312 8186 8186 I sysui_multi_action: [757,135,758,4,759,1]
02-24 18:32:50.314 1195 6806 I WifiService: getWifiServiceMessenger uid=1000
02-24 18:32:50.316 1195 2515 D WifiService: AsyncChannelExternalClientHandler.handleMessage ignoring msg={ when=0 what=69632 [email protected] target=com.android.server.wifi.WifiServiceImpl$AsyncChannelExternalClientHandler }
02-24 18:32:50.317 1195 2515 D WifiService: CONNECT nid=-1 config=* ID: -1 SSID: "Vodafone Homespot" PROVIDER-NAME: null BSSID: null FQDN: null PRIO: 0 HIDDEN: false PMF: false
02-24 18:32:50.317 1195 2515 D WifiService: NetworkSelectionStatus NETWORK_SELECTION_ENABLED
02-24 18:32:50.317 1195 2515 D WifiService: hasEverConnected: false
02-24 18:32:50.317 1195 2515 D WifiService: trusted
02-24 18:32:50.317 1195 2515 D WifiService: macRandomizationSetting: 1
02-24 18:32:50.317 1195 2515 D WifiService: mRandomizedMacAddress: 02:00:00:00:00:00
02-24 18:32:50.317 1195 2515 D WifiService: KeyMgmt: NONE Protocols:
02-24 18:32:50.317 1195 2515 D WifiService: AuthAlgorithms:
02-24 18:32:50.317 1195 2515 D WifiService: PairwiseCiphers:
02-24 18:32:50.317 1195 2515 D WifiService: GroupCiphers:
02-24 18:32:50.317 1195 2515 D WifiService: GroupMgmtCiphers:
02-24 18:32:50.317 1195 2515 D WifiService: SuiteBCiphers:
02-24 18:32:50.317 1195 2515 D WifiService: PSK/SAE:
02-24 18:32:50.317 1195 2515 D WifiService: Enterprise config:
02-24 18:32:50.317 1195 2515 D WifiService: IP config:
02-24 18:32:50.317 1195 2515 D WifiService: IP assignment: UNASSIGNED
02-24 18:32:50.317 1195 2515 D WifiService: Proxy settings: UNASSIGNED
02-24 18:32:50.317 1195 2515 D WifiService: cuid=-1 luid=-1 lcuid=0 userApproved=USER_UNSPECIFIED noInternetAccessExpected=false
02-24 18:32:50.317 1195 2515 D WifiService: recentFailure: Association Rejection code: 0
02-24 18:32:50.317 1195 2515 D WifiService: uid=1000 name=android.uid.system:1000
02-24 18:32:50.317 1195 2516 E WifiConfigManager: Cannot add/update network before store is read!
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: CONNECT_NETWORK adding/updating config=* ID: -1 SSID: "Vodafone Homespot" PROVIDER-NAME: null BSSID: null FQDN: null PRIO: 0 HIDDEN: false PMF: false
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: NetworkSelectionStatus NETWORK_SELECTION_ENABLED
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: hasEverConnected: false
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: trusted
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: macRandomizationSetting: 1
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: mRandomizedMacAddress: 02:00:00:00:00:00
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: KeyMgmt: NONE Protocols:
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: AuthAlgorithms:
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: PairwiseCiphers:
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: GroupCiphers:
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: GroupMgmtCiphers:
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: SuiteBCiphers:
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: PSK/SAE:
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: Enterprise config:
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: IP config:
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: IP assignment: UNASSIGNED
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: Proxy settings: UNASSIGNED
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: cuid=-1 luid=-1 lcuid=0 userApproved=USER_UNSPECIFIED noInternetAccessExpected=false
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: recentFailure: Association Rejection code: 0
02-24 18:32:50.318 1195 2516 E WifiClientModeImpl: failed
02-24 18:32:50.400 8186 8186 I sysui_multi_action: [757,804,799,settings_wifi_speed_labels,801,0,802,1]
And other WiFi related looking stuff from the boot phase
Spoiler
04-13 23:06:21.927 0 0 I : [ 43.688519,2] 'opened /dev/adsprpc-smd c 228 0'
04-13 23:06:21.935 0 0 E : [ 43.699248,7] wcnss_wlan invalid size to write 5220
04-13 23:06:21.935 0 0 I : [ 43.699609,7] pil-q6v5-mss 4080000.qcom,mss: modem: Brought out of reset
04-13 23:06:21.942 0 0 E : [ 43.700544,3] wcnss_wlan invalid size to write 6148
04-13 23:06:21.942 0 0 E : [ 43.705924,7] scm_call failed: func id 0x72000206, ret: -1, syscall returns: 0x0, 0x0, 0x0
04-13 23:06:24.612 0 0 I [ 46.374504,2] ueventd: firmware: loading 'wlan/prima/WCNSS_qcom_wlan_nv.bin' for '/devices/soc/a000000.qcom,wcnss-wlan/firmware/wlan!prima!WCNSS_qcom_wlan_nv.bin'
04-13 23:06:24.625 0 0 I [ 46.387030,7] ueventd: loading /devices/soc/a000000.qcom,wcnss-wlan/firmware/wlan!prima!WCNSS_qcom_wlan_nv.bin took 12ms
04-13 23:06:24.625 0 0 I [ 46.387040,0] wcnss: NV bin size: 31719, total_fragments: 11
04-13 23:06:24.625 0 0 E [ 46.387075,0] wcnss: no space available for smd frame
04-13 23:06:24.647 0 0 E [ 46.410101,0] wcnss: no space available for smd frame
02-24 18:25:04.931 0 0 W [ 123.652964,7] wlan: module is from the staging directory, the quality is unknown, you have been warned.
02-24 18:25:04.947 0 0 I [ 123.666688,4] wlan: loading driver v3.0.11.85.9
02-24 18:25:04.955 494 2556 D vold : Remounting 10034 as mode default
02-24 18:25:04.961 0 0 I [ 123.680556,4] ueventd: firmware: loading 'wlan/prima/WCNSS_qcom_cfg.ini' for '/devices/soc/a000000.qcom,wcnss-wlan/firmware/wlan!prima!WCNSS_qcom_cfg.ini'
02-24 18:25:04.961 0 0 I [ 123.681726,4] ueventd: loading /devices/soc/a000000.qcom,wcnss-wlan/firmware/wlan!prima!WCNSS_qcom_cfg.ini took 1ms
02-24 18:25:04.961 0 0 E [ 123.682858,4] wcnss_get_wlan_nv_name: No NV name
02-24 18:25:04.965 494 2556 D vold : Remounting 10017 as mode full
02-24 18:25:04.974 0 0 I [ 123.695632,4] ueventd: firmware: loading 'wlan/prima/WCNSS_qcom_wlan_nv.bin' for '/devices/soc/a000000.qcom,wcnss-wlan/firmware/wlan!prima!WCNSS_qcom_wlan_nv.bin'
02-24 18:25:04.974 0 0 I [ 123.695984,4] ueventd: loading /devices/soc/a000000.qcom,wcnss-wlan/firmware/wlan!prima!WCNSS_qcom_wlan_nv.bin took 0ms
02-24 18:25:04.974 494 2556 D vold : Remounting 10017 as mode full
02-24 18:25:04.993 494 2556 D vold : Remounting 10151 as mode default
02-24 18:25:05.009 494 2556 D vold : Remounting 10151 as mode default
02-24 18:25:05.017 494 2556 D vold : Remounting 10293 as mode default
02-24 18:25:05.025 494 2556 D vold : Remounting 10293 as mode default
--------- beginning of events
02-24 18:25:05.062 1195 1195 I commit_sys_config_file: [package-session,1]
02-24 18:25:05.077 1195 1195 I boot_progress_ams_ready: 123799
02-24 18:25:05.077 1195 1231 I dvm_lock_sample: [system_server,1,android.display,5,ActivityManagerService.java,6488,java.lang.String com.android.server.am.ActivityManagerService.checkContentProviderAccess(java.lang.String, int),-,8951,void com.android.server.am.ActivityManagerService.systemReady(java.lang.Runnable, android.util.TimingsTraceLog),1]
02-24 18:25:05.080 1195 1195 I configuration_changed: 1073742084
02-24 18:25:05.094 0 0 I [ 123.814558,7] wlan: WCNSS WLAN version 1.5.1.2
02-24 18:25:05.094 0 0 I [ 123.814571,7] wlan: WCNSS software version CNSS-PR-4-0-3-214-202983-1
02-24 18:25:05.094 0 0 I [ 123.814576,7] wlan: WCNSS hardware version WCN v2.0 RadioPhy vIris_TSMC_4.0 with 48MHz XO
02-24 18:25:05.094 0 0 I [ 123.816051,5] hdd_get_feature_caps_cb: Firmware feature capabilities received
02-24 18:25:05.094 0 0 I : [ 123.816067,7] DefaultCountry is 00
02-24 18:25:05.100 684 684 I [email protected]: Wifi HAL started
02-24 18:25:05.101 0 0 I [ 123.816452,7] country: 00 and initiator 0
02-24 18:25:05.101 0 0 I [ 123.820480,7] wlan_logging_sock_activate_svc: Initalizing FEConsoleLog = 1 NumBuff = 32
02-24 18:25:05.101 0 0 I [ 123.820548,7] wlan_logging_sock_activate_svc: Initalizing Pkt stats pkt_stats_buff = 16
02-24 18:25:05.101 0 0 I [ 123.820828,7] wlan: driver loaded
02-24 18:25:05.107 0 0 I [ 123.827542,7] init: Received control message 'interface_start' for '[email protected]::ISupplicant/default' from pid: 490 (/system/bin/hwservicemanager)
02-24 18:25:05.107 0 0 I [ 123.828199,7] init: starting service 'wpa_supplicant'...
02-24 18:25:05.109 0 0 I [ 123.830755,5] init: Created socket '/dev/socket/vendor_wpa_wlan0', mode 660, user 1010, group 1010
Try flashing complete rom, not just modem. You'll find link in Resurrection Remix thread.
Boot into stock once to ensure all works.
meelten said:
Try flashing complete rom, not just modem. You'll find link in Resurrection Remix thread.
Boot into stock once to ensure all works.
Click to expand...
Click to collapse
Thank you. Tried that but nope, no luck.
Oh and btw, the settings app closes itself whenever I try to access the system section in settings. Info shows that I have two IMEIs, a WiFi MAC, but no Bluetooth MAC. And turning on bluetooth crashes settings.
Update: I reflashed back to Stock 8 and then to Stock 9 again. Now I finally got somewhere and WiFi works again. I will test mobile once I got my new SIM
Here is my story:
I have previously successfully installed
lineage-15.1-20200211-UNOFFICIAL-albus.zip
MindTheGapps-8.1.0-arm64-20180808_153856.zip
Magisk-v20.4.zip
using TWRP 3.2.2-r23. On that version, but middle (gesture/fingerprint) button on the phone didn't work, also there were no virtual "on screen" buttons. However, this was solved using buildprop and adding a line of code there. Thus this setup has been working very very fine, no problems at all (except the navigation/fingerprint button then).
However, with Android 8 (LOS 15.1) being quite old, I thought that at least from a security point of view it might be a good idea to not stay with Android 8 (maybe someone with knowledge of the security can comment on this?). There are of course other reasons as well.
I have been waiting for a new version to work. So when I saw this post I thought I'd give it a shot.
I installed the lineage-17.1-20210224-UNOFFICIAL-albus.zip using the same TWRP 3.2.2-r23 version without success. The installation went fine, but the first boot kept on forever (> 30 min). Using the script to flash the firmware in fastboot, I thought it was OK, but what I did later on was to manually take the commands from the script and just run the commands manually. I have no idea why the automated script didn't work, but when I did enter the commands manually (I just copy pasted them, Ubuntu 20.04) it worked.
So currently I have installed
lineage-17.1-20210224-UNOFFICIAL-albus.zip
open_gapps-arm64-10.0-stock-20210304.zip
Magisk-v20.4.zip
using the same old version of TWRP 3.2.2-r23. This has worked flawless on my phone. And to my big surprise, even the gesture/fingerprint button is working, which I really do like since I save some space on the screen when I don't need to have the virtual navigation buttons.
I use the powerpack (the part why I like the phone is the long battery time). And the Moto powerpack seems to be working very well as well.
Furthermore, I am located in Europe and thus run a Europe-compatible phone.
Edit: I have one question. I see that now when I use the fingerprint sensor for unlocking, it seems that the phone is reacting on the fingerprint sensor while I have the phone in my pocket? There is a feature "Prevent accidental wake-up", that I have activated, but I still have a sense of the phone being woken up. I don't have any good information here, but maybe someone have an answer if there is a possibility for me to deactivate the fingerprint sensor in a way that I need to press the power button first to activate the phone, and then having the fingerprint sensor active?
I would like to thank EmaMaker and all contributors for this.
Gonna try it out now, seems promising. Curious though, what's the reason this isn't official? Everything works right?
Update: I've tried it, it's awsome. I only noticed 2 minor things that could be polished: the charging led thing (z2 doesn't have one) and the Moto TV seems to do nothing.
Otherwise flawless, just what this phone needed.
Update 2: I found an issue, after encrypting storage the phone bootloops. Reflashed the stock rom to use the stock encryption too, then flashed Los, but it didn't solve the problem. Also, didn't install magisk and the issue still occured.
lungan said:
Here is my story:
I have previously successfully installed
lineage-15.1-20200211-UNOFFICIAL-albus.zip
MindTheGapps-8.1.0-arm64-20180808_153856.zip
Magisk-v20.4.zip
using TWRP 3.2.2-r23. On that version, but middle (gesture/fingerprint) button on the phone didn't work, also there were no virtual "on screen" buttons. However, this was solved using buildprop and adding a line of code there. Thus this setup has been working very very fine, no problems at all (except the navigation/fingerprint button then).
However, with Android 8 (LOS 15.1) being quite old, I thought that at least from a security point of view it might be a good idea to not stay with Android 8 (maybe someone with knowledge of the security can comment on this?). There are of course other reasons as well.
I have been waiting for a new version to work. So when I saw this post I thought I'd give it a shot.
I installed the lineage-17.1-20210224-UNOFFICIAL-albus.zip using the same TWRP 3.2.2-r23 version without success. The installation went fine, but the first boot kept on forever (> 30 min). Using the script to flash the firmware in fastboot, I thought it was OK, but what I did later on was to manually take the commands from the script and just run the commands manually. I have no idea why the automated script didn't work, but when I did enter the commands manually (I just copy pasted them, Ubuntu 20.04) it worked.
So currently I have installed
lineage-17.1-20210224-UNOFFICIAL-albus.zip
open_gapps-arm64-10.0-stock-20210304.zip
Magisk-v20.4.zip
using the same old version of TWRP 3.2.2-r23. This has worked flawless on my phone. And to my big surprise, even the gesture/fingerprint button is working, which I really do like since I save some space on the screen when I don't need to have the virtual navigation buttons.
I use the powerpack (the part why I like the phone is the long battery time). And the Moto powerpack seems to be working very well as well.
Furthermore, I am located in Europe and thus run a Europe-compatible phone.
Edit: I have one question. I see that now when I use the fingerprint sensor for unlocking, it seems that the phone is reacting on the fingerprint sensor while I have the phone in my pocket? There is a feature "Prevent accidental wake-up", that I have activated, but I still have a sense of the phone being woken up. I don't have any good information here, but maybe someone have an answer if there is a possibility for me to deactivate the fingerprint sensor in a way that I need to press the power button first to activate the phone, and then having the fingerprint sensor active?
I would like to thank EmaMaker and all contributors for this.
Click to expand...
Click to collapse
Hi, thank you for sharing your experience! I myself live in europe so yes, this is a europe friendly rom and phone. The update I published today allows the mod battery level to be viewed as a notification, just like in other arrow and aicp roms. The rom also includes overlay to turn the on-screen navbar on and off from Settings>System>Buttons, so no need to modify build.prop. If you want another approach, on the Custom ROMS telegram group there's a twrp script to do the same thing, but I recommend using android settings
Arcline said:
Gonna try it out now, seems promising. Curious though, what's the reason this isn't official? Everything works right?
Update: I've tried it, it's awsome. I only noticed 2 minor things that could be polished: the charging led thing (z2 doesn't have one) and the Moto TV seems to do nothing.
Otherwise flawless, just what this phone needed.
Update 2: I found an issue, after encrypting storage the phone bootloops. Reflashed the stock rom to use the stock encryption too, then flashed Los, but it didn't solve the problem. Also, didn't install magisk and the issue still occured.
Click to expand...
Click to collapse
Hi! It looks strange, last time I tried encryption it worked fine, maybe try with the just published update? The rom isn't official for quite a simple reason, and it is that I unfortunately lack time to follow all the things an official dev needs to do for los, maybe I will try official for other minor roms in the future, just for the sake of publishing an official rom. But I do not think an official los for albus will come from myself in the near future
Changelog:
24/03/2021: Enabled battery mod level (show perfecentage of battery mod as notification, like Arrow and AICP). Reintroduce led notification light. Recompiled in a clean environment on a new machine: https://www.androidfilehost.com/?fid=2188818919693770548
24/02/2021: First release: https://www.androidfilehost.com/?fid=17248734326145743552
EmaMaker said:
Changelog:
24/03/2021: Enabled battery mod level (show perfecentage of battery mod as notification, like Arrow and AICP). Reintroduce led notification light. Recompiled in a clean environment on a new machine: https://www.androidfilehost.com/?fid=2188818919693770548
24/02/2021: First release: https://www.androidfilehost.com/?fid=17248734326145743552
Click to expand...
Click to collapse
Stupid question maybe, but how do I update to this? Do I need to make a clean install (like when I installed the previous build with twrp) or is it possible to "just update" like in the official releases?
lungan said:
Stupid question maybe, but how do I update to this? Do I need to make a clean install (like when I installed the previous build with twrp) or is it possible to "just update" like in the official releases?
Click to expand...
Click to collapse
Just install through TWRP on top of old one. No clean install required when updating the same ROM. Just wipe cache and dalvik before.
meelten said:
Just install through TWRP on top of old one. No clean install required when updating the same ROM. Just wipe cache and dalvik before.
Click to expand...
Click to collapse
Thank you for the answer. So I just wipe cache and dalvik. Then I install the rom, without anything more. What about MindTheGapps and Magisk etc? No need to reinstall them?
1) Wipe cache and Dalvik in TWRP
2) Install the new build in TWRP
3) Reboot
4) The phone will be like "before", but with the updated build of the ROM? Thus no need to (re)-install MindTheGapps, Magisk etc?
lungan said:
Thank you for the answer. So I just wipe cache and dalvik. Then I install the rom, without anything more. What about MindTheGapps and Magisk etc? No need to reinstall them?
1) Wipe cache and Dalvik in TWRP
2) Install the new build in TWRP
3) Reboot
4) The phone will be like "before", but with the updated build of the ROM? Thus no need to (re)-install MindTheGapps, Magisk etc?
Click to expand...
Click to collapse
Magisk have script that should automatically rebuild it after flashing ROM. If it won't work you'd need install it manually.
Reinstalling gapps is not needed, all applications and user data is intact.
EmaMaker said:
Hi! It looks strange, last time I tried encryption it worked fine, maybe try with the just published update? The rom isn't official for quite a simple reason, and it is that I unfortunately lack time to follow all the things an official dev needs to do for los, maybe I will try official for other minor roms in the future, just for the sake of publishing an official rom. But I do not think an official los for albus will come from myself in the near future
Click to expand...
Click to collapse
I see, I'll try it out now and will let you know if it works. I got a small request if I may, since this is gonna stay unofficial, could you add signature spoofing for Micro G?
.
hi, I managed to install this rom and works perfectly except for the mobile data.
Looks like the phone reads the SIM card and I can unlock it and everything but it doesn't seem to get any signal. I get a "No service" text after unlocking the SIM and I have no idea how to make it work. Also made sure to flash the Android Pie modem.
does anyone here have any idea of what could it be? sorry if I'm missing any detail, I'm pretty much lost.
I'll try to attach some clean logs later if that gives any help.
edit: ok after some more investigation i've realised that i have the chinese model (XT1710-08) and i'm not supposed to flash the modem, since i'm coming from the nougat ZUI rom, nor erase the modemst parts, so my fault on that. In any case now i'm concerned about "android 10 not being compatible with oreo firmware", which someone above pointed out. Is there any way to get around this other than maybe sticking with LineageOS 16 or am I out of luck?

How To Guide How to upgrade the OS with another Android "distribution"

While doing my tests and development with the OmniROM OS it's sometimes useful to update an installed original OmniROM to one of my self-compiled OmniROM images without reinstalling the phone from scratch.
Doing this using the local file feature of the SystemUpdate app from the OmniROM will fail with the error message "Updated failed with error 26". This is a not really understandable error message but checking the output of logcat will print some more infos about the error:
Spoiler: update_engine error messages
Code:
ASUS_I006D:/ $ logcat -d | grep update_engine
06-11 17:08:46.906 1356 1356 I update_engine: [INFO:update_attempter_android.cc(567)] Enabling performance mode.
06-11 17:08:46.913 1356 1356 I update_engine: [INFO:update_attempter_android.cc(322)] Using this install plan:
06-11 17:08:46.914 1356 1356 I update_engine: [INFO:install_plan.cc(80)] InstallPlan:
06-11 17:08:46.914 1356 1356 I update_engine: type: new_update
06-11 17:08:46.914 1356 1356 I update_engine: version:
06-11 17:08:46.914 1356 1356 I update_engine: source_slot: A
06-11 17:08:46.914 1356 1356 I update_engine: target_slot: B
06-11 17:08:46.914 1356 1356 I update_engine: initial url: file:///sdcard/Download/omni-13-20230611-zenfone8-MICROG.zip
06-11 17:08:46.914 1356 1356 I update_engine: hash_checks_mandatory: true
06-11 17:08:46.914 1356 1356 I update_engine: powerwash_required: false
06-11 17:08:46.914 1356 1356 I update_engine: switch_slot_on_reboot: true
06-11 17:08:46.914 1356 1356 I update_engine: run_post_install: true
06-11 17:08:46.914 1356 1356 I update_engine: is_rollback: false
06-11 17:08:46.914 1356 1356 I update_engine: rollback_data_save_requested: false
06-11 17:08:46.914 1356 1356 I update_engine: write_verity: true
06-11 17:08:46.914 1356 1356 I update_engine: Payload: 0
06-11 17:08:46.914 1356 1356 I update_engine: urls: ()
06-11 17:08:46.914 1356 1356 I update_engine: size: 1286948403
06-11 17:08:46.914 1356 1356 I update_engine: metadata_size: 94417
06-11 17:08:46.914 1356 1356 I update_engine: metadata_signature:
06-11 17:08:46.914 1356 1356 I update_engine: hash: B4F09617B4E7B8E37799BE83DDBB9CC96F8567A3AA4E2EF7721A9DD473987A3C
06-11 17:08:46.914 1356 1356 I update_engine: type: unknown
06-11 17:08:46.914 1356 1356 I update_engine: fingerprint:
06-11 17:08:46.914 1356 1356 I update_engine: app_id:
06-11 17:08:46.914 1356 1356 I update_engine: already_applied: false
06-11 17:08:46.915 1356 1356 I update_engine: [INFO:postinstall_runner_action.cc(95)] postinstall mount point: /postinstall
06-11 17:08:46.916 1356 1356 I update_engine: [INFO:metrics_utils.cc(318)] Number of Reboots during current update attempt = 0
06-11 17:08:46.917 1356 1356 I update_engine: [INFO:metrics_utils.cc(326)] Payload Attempt Number = 1
06-11 17:08:46.919 1356 1356 I update_engine: [INFO:metrics_utils.cc(343)] Update Monotonic Timestamp Start = 1/1/1970 0:04:33 GMT
06-11 17:08:46.920 1356 1356 I update_engine: [INFO:metrics_utils.cc(352)] Update Boot Timestamp Start = 1/1/1970 0:04:33 GMT
06-11 17:08:46.921 1356 1356 I update_engine: [INFO:update_attempter_android.cc(840)] Clearing update complete marker.
06-11 17:08:46.922 1356 1356 I update_engine: [INFO:update_attempter_android.cc(720)] Scheduling an action processor start.
06-11 17:08:46.923 1356 1356 I update_engine: [INFO:action_processor.cc(51)] ActionProcessor: starting UpdateBootFlagsAction
06-11 17:08:46.924 1356 1356 I update_engine: [INFO:update_boot_flags_action.cc(45)] Marking booted slot as good.
06-11 17:08:46.944 1356 1356 I update_engine: [INFO:action_processor.cc(116)] ActionProcessor: finished UpdateBootFlagsAction with code ErrorCode::kSuccess
06-11 17:08:46.945 1356 1356 I update_engine: [INFO:action_processor.cc(143)] ActionProcessor: starting CleanupPreviousUpdateAction
06-11 17:08:46.946 1356 1356 I update_engine: [INFO:cleanup_previous_update_action.cc(149)] Starting/resuming CleanupPreviousUpdateAction
06-11 17:08:46.947 1356 1356 I update_engine: [INFO:cleanup_previous_update_action.cc(189)] Boot completed, waiting on markBootSuccessful()
06-11 17:08:46.948 1356 1356 I update_engine: EnsureMetadataMounted does nothing in Android mode.
06-11 17:08:46.950 1356 1356 I update_engine: Read merge statistics file failed: No such file or directory
06-11 17:08:46.951 1356 1356 I update_engine: [INFO:cleanup_previous_update_action.cc(261)] Waiting for any previous merge request to complete. This can take up to several minutes.
06-11 17:08:46.952 1356 1356 E update_engine: Read state file failed: No such file or directory
06-11 17:08:46.953 1356 1356 E update_engine: Read state file failed: No such file or directory
06-11 17:08:46.953 1356 1356 E update_engine: Read state file failed: No such file or directory
06-11 17:08:46.954 1356 1356 I update_engine: CheckMergeState for snapshots returned: 0
06-11 17:08:46.955 1356 1356 I update_engine: ProcessUpdateState handling state: 0
06-11 17:08:46.956 1356 1356 I update_engine: [INFO:cleanup_previous_update_action.cc(297)] Can't find any snapshot to merge.
06-11 17:08:46.957 1356 1356 E update_engine: Read state file failed: No such file or directory
06-11 17:08:46.958 1356 1356 I update_engine: [INFO:cleanup_previous_update_action.cc(130)] Stopping/suspending/completing CleanupPreviousUpdateAction
06-11 17:08:46.959 1356 1356 I update_engine: [INFO:cleanup_previous_update_action.cc(479)] Not reporting merge stats because state is None
06-11 17:08:46.960 1356 1356 I update_engine: [INFO:cleanup_previous_update_action.cc(130)] Stopping/suspending/completing CleanupPreviousUpdateAction
06-11 17:08:46.961 1356 1356 I update_engine: [INFO:action_processor.cc(116)] ActionProcessor: finished CleanupPreviousUpdateAction with code ErrorCode::kSuccess
06-11 17:08:46.963 1356 1356 I update_engine: [INFO:action_processor.cc(143)] ActionProcessor: starting InstallPlanAction
06-11 17:08:46.964 1356 1356 I update_engine: [INFO:action_processor.cc(116)] ActionProcessor: finished InstallPlanAction with code ErrorCode::kSuccess
06-11 17:08:46.965 1356 1356 I update_engine: [INFO:action_processor.cc(143)] ActionProcessor: starting DownloadAction
06-11 17:08:46.966 1356 1356 I update_engine: [INFO:install_plan.cc(80)] InstallPlan:
06-11 17:08:46.966 1356 1356 I update_engine: type: new_update
06-11 17:08:46.966 1356 1356 I update_engine: version:
06-11 17:08:46.966 1356 1356 I update_engine: source_slot: A
06-11 17:08:46.966 1356 1356 I update_engine: target_slot: B
06-11 17:08:46.966 1356 1356 I update_engine: initial url: file:///sdcard/Download/omni-13-20230611-zenfone8-MICROG.zip
06-11 17:08:46.966 1356 1356 I update_engine: hash_checks_mandatory: true
06-11 17:08:46.966 1356 1356 I update_engine: powerwash_required: false
06-11 17:08:46.966 1356 1356 I update_engine: switch_slot_on_reboot: true
06-11 17:08:46.966 1356 1356 I update_engine: run_post_install: true
06-11 17:08:46.966 1356 1356 I update_engine: is_rollback: false
06-11 17:08:46.966 1356 1356 I update_engine: rollback_data_save_requested: false
06-11 17:08:46.966 1356 1356 I update_engine: write_verity: true
06-11 17:08:46.966 1356 1356 I update_engine: Payload: 0
06-11 17:08:46.966 1356 1356 I update_engine: urls: ()
06-11 17:08:46.966 1356 1356 I update_engine: size: 1286948403
06-11 17:08:46.966 1356 1356 I update_engine: metadata_size: 94417
06-11 17:08:46.966 1356 1356 I update_engine: metadata_signature:
06-11 17:08:46.966 1356 1356 I update_engine: hash: B4F09617B4E7B8E37799BE83DDBB9CC96F8567A3AA4E2EF7721A9DD473987A3C
06-11 17:08:46.966 1356 1356 I update_engine: type: unknown
06-11 17:08:46.966 1356 1356 I update_engine: fingerprint:
06-11 17:08:46.966 1356 1356 I update_engine: app_id:
06-11 17:08:46.966 1356 1356 I update_engine: already_applied: false
06-11 17:08:46.967 1356 1356 I update_engine: [INFO:download_action.cc(86)] Marking new slot as unbootable
06-11 17:08:46.985 1356 1356 I update_engine: [INFO:multi_range_http_fetcher.cc(45)] starting first transfer
06-11 17:08:46.986 1356 1356 I update_engine: [INFO:multi_range_http_fetcher.cc(74)] starting transfer of range 3920+1286948403
06-11 17:08:46.989 1356 1356 I update_engine: [INFO:delta_performer.cc(113)] Completed 0/? operations, 16384/1286948403 bytes downloaded (0%), overall progress 0%
06-11 17:08:46.991 1356 1356 I update_engine: [INFO:delta_performer.cc(344)] Manifest size in payload matches expected value from Omaha
06-11 17:08:46.992 1356 1356 I update_engine: [INFO:delta_performer.cc(884)] Verifying using certificates: /system/etc/security/otacerts.zip
06-11 17:08:46.995 1356 1356 I update_engine: [INFO:payload_verifier.cc(102)] signature blob size = 267
06-11 17:08:46.996 1356 1356 I update_engine: [INFO:payload_verifier.cc(118)] Truncating the signature to its unpadded size: 256.
06-11 17:08:47.004 1356 1356 I update_engine: [INFO:payload_verifier.cc(191)] Failed to verify the signature with 1 keys.
06-11 17:08:47.006 1356 1356 E update_engine: [ERROR:payload_verifier.cc(137)] None of the 1 signatures is correct. Expected hash before padding:
06-11 17:08:47.006 1356 1356 I update_engine: [INFO:utils.cc(414)] Logging array of length: 32
06-11 17:08:47.007 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x00000000 : ce ce cc 61 4e 77 30 ae 2e 25 f7 fb 0d 5e 45 45
06-11 17:08:47.008 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x00000010 : 6d 84 c2 1e d5 65 72 55 45 10 20 10 83 5c 76 ba
06-11 17:08:47.009 1356 1356 E update_engine: [ERROR:payload_verifier.cc(140)] But found RSA decrypted hashes:
06-11 17:08:47.010 1356 1356 I update_engine: [INFO:utils.cc(414)] Logging array of length: 256
06-11 17:08:47.011 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x00000000 : 0b 52 c0 e7 5a ea 17 45 fa 16 88 24 d1 49 50 1d
06-11 17:08:47.012 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x00000010 : ac 7b bb 2f ce 3d 6f d5 d1 4d 05 2b 43 20 6b 67
06-11 17:08:47.013 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x00000020 : a3 11 04 81 11 d1 69 de 34 bc 6a 4e 3c 0d e5 4a
06-11 17:08:47.014 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x00000030 : d0 6e b3 e5 fc 69 57 24 b5 42 c3 bd f9 91 f5 dc
06-11 17:08:47.015 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x00000040 : 63 ac 7d 17 65 f7 c9 82 13 a5 7f 49 f7 e4 94 f2
06-11 17:08:47.016 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x00000050 : 13 aa 91 39 a3 c9 7e 66 f2 7b 93 77 84 72 9c 70
06-11 17:08:47.017 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x00000060 : 8d c4 4e bf 32 96 2f a2 14 0d 44 c3 f2 37 c3 28
06-11 17:08:47.018 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x00000070 : 8f 2d fd 46 e1 35 4a 32 ac 6b 41 2f 02 13 ec 30
06-11 17:08:47.019 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x00000080 : dc 01 9c 40 d8 a5 62 1e d1 e7 f9 07 f0 0a a7 dc
06-11 17:08:47.020 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x00000090 : f0 06 1a 63 d0 5e a3 67 d0 03 33 97 04 c2 f6 ac
06-11 17:08:47.021 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x000000a0 : d2 97 4d 0e 95 98 e9 eb 18 38 34 82 34 5e 3f aa
06-11 17:08:47.022 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x000000b0 : a9 3f f0 7e a0 eb 6e 0b bf 09 03 f6 24 85 e3 5f
06-11 17:08:47.023 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x000000c0 : 11 a2 e4 be c6 4d d3 ff f7 4d f2 63 16 e6 d5 e2
06-11 17:08:47.024 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x000000d0 : 69 23 b2 f7 8a 4d bc 6b f8 22 69 78 59 10 ae 4d
06-11 17:08:47.025 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x000000e0 : 79 1d 34 cc 17 65 ce 9d 1a 75 29 dd 74 78 b3 b9
06-11 17:08:47.026 1356 1356 I update_engine: [INFO:utils.cc(431)] 0x000000f0 : 24 b8 db 5b 15 3b 5a ab 39 e1 c7 3d e2 ad 95 2d
06-11 17:08:47.027 1356 1356 E update_engine: [ERROR:payload_metadata.cc(214)] Manifest hash verification failed.
06-11 17:08:47.028 1356 1356 E update_engine: [ERROR:delta_performer.cc(372)] Mandatory metadata signature validation failed
06-11 17:08:47.028 1356 1356 E update_engine: [ERROR:download_action.cc(227)] Error ErrorCode::kDownloadMetadataSignatureMismatch (26) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
06-11 17:08:47.029 1356 1356 I update_engine: [INFO:delta_performer.cc(215)] Discarding 94684 unused downloaded bytes
06-11 17:08:47.031 1356 1356 I update_engine: [INFO:multi_range_http_fetcher.cc(177)] Received transfer terminated.
06-11 17:08:47.031 1356 1356 I update_engine: [INFO:multi_range_http_fetcher.cc(129)] TransferEnded w/ code 200
06-11 17:08:47.032 1356 1356 I update_engine: [INFO:multi_range_http_fetcher.cc(131)] Terminating.
06-11 17:08:47.033 1356 1356 I update_engine: [INFO:action_processor.cc(116)] ActionProcessor: finished DownloadAction with code ErrorCode::kDownloadMetadataSignatureMismatch
06-11 17:08:47.034 1356 1356 I update_engine: [INFO:action_processor.cc(121)] ActionProcessor: Aborting processing due to failure.
06-11 17:08:47.035 1356 1356 I update_engine: [INFO:update_attempter_android.cc(584)] Processing Done.
06-11 17:08:47.038 1356 1356 E update_engine: Read state file failed: No such file or directory
06-11 17:08:47.039 1356 1356 I update_engine: [INFO:metrics_reporter_android.cc(159)] Current update attempt downloads 0 bytes data
ASUS_I006D:/ $
So the update_engine refuse to update the OS using the image /sdcard/Download/omni-13-20230611-zenfone8-MICROG.zip because there is no matching certificate for the new OS image in the file /system/etc/security/otacerts.zip of the running OS.
This is quite a useful feature, but not really necessary for my development phone, so I would like to disable it.
That can be done like this on phones wit installed Magisk:
Create a Magisk Module to replace the file /system/etc/security/otacerts.zip with a zip file with certificates from the original OmniROM image and the self-compiled OmiROM image.
To create that file do:
First copy the file /system/etc/security/otacerts.zip from the original OmniROM installed to the directory /sdcard/Download and then to your local workstation via adb pull command.
The file otacerts.zip for the self-compiled OmniROM image for the ASUS Zenfone 8 is in the directory ./out/target/product/zenfone8/system/etc/security in the build tree for the OmniROM.
Extract the certificate testkey.x509.pem from the file otacerts.zip in the build tree, rename it, add it to the file otacerts.zip from the original OmniROM image, and upload the changed file otacerts.zip to the phone:
Spoiler: Example instructions to create a new otacerts.zip file
Code:
#
# download the file /system/etc/security/otacerts.zip from the installed OS
#
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $ adb pull /system/etc/security/otacerts.zip
/system/etc/security/otacerts.zip: 1 file pulled, 0 skipped. 0.5 MB/s (2116 bytes in 0.004s)
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $
#
# list the contents of the file otacerts.zip from the original OmniROM
#
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $ unzip -t otacerts.zip
Archive: otacerts.zip
testing: testkey.x509.pem OK
No errors detected in compressed data of otacerts.zip.
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $
# extract the certificate from the file otacerts.zip from the local build tree for the OmniROM OS
#
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $ unzip ../OmniROM_13.0/out/target/product/zenfone8/system/etc/security/otacerts.zip
Archive: ../OmniROM_13.0/out/target/product/zenfone8/system/etc/security/otacerts.zip
inflating: testkey.x509.pem
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $ ls -ltr
total 8
-rw-r--r--. 1 xtrnaw7 xtrnaw7 1675 Jan 1 2008 testkey.x509.pem
-rw-r--r--. 1 xtrnaw7 xtrnaw7 1023 Jun 11 11:17 otacerts.zip
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $
# the name of the certificate for both versions of the OmniROM is the same therefor we rename the certificate from the self-compiled OmniROM
#
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $ mv testkey.x509.pem my_testkey.x509.pem
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $
# add the certificate from the self-compiled OmniROM to the file otacerts.zip from the original OmniROM
#
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $ zip -u otacerts.zip my_testkey.x509.pem
adding: my_testkey.x509.pem (deflated 44%)
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $
# check the result
#
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $ unzip -t otacerts.zip
Archive: otacerts.zip
testing: testkey.x509.pem OK
testing: my_testkey.x509.pem OK
No errors detected in compressed data of otacerts.zip.
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $
# copy the changed file otacerts.zip to the phone
#
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $ adb push otacerts.zip /sdcard/Download/
otacerts.zip: 1 file pushed, 0 skipped. 21.5 MB/s (2116 bytes in 0.000s)
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $
Now open an adb shell on the phone and create a dummy Magisk Module to replace the file /system/etc/security/otacerts.zip with the new zip file:
Spoiler: Instructions to create the dummy Magisk Module to replace the file otacerts.zip
Code:
#
# these commands must be done by the user root
#
ASUS_I006D:/data/develop1 # id
uid=0(root) gid=0(root) groups=0(root) context=u:r:magisk:s0
ASUS_I006D:/data/develop1 #
# create the dummy magisk Module
#
ASUS_I006D:/data/develop1 # mkdir -p /data/adb/modules/add_certificate/system/etc/security
ASUS_I006D:/data/develop1 # cp /sdcard/Download/otacerts.zip /data/adb/modules/add_certificate/system/etc/security
ASUS_I006D:/data/develop1 #
ASUS_I006D:/data/develop1 # chmod 644 /data/adb/modules/add_certificate/system/etc/security/otacerts.zip
ASUS_I006D:/data/develop1 #
ASUS_I006D:/data/develop1 # ls -lZtr /system/etc/security/otacerts.zip
-rw-r--r-- 1 root root u:object_r:system_file:s0 1023 2009-01-01 01:00 /system/etc/security/otacerts.zip
ASUS_I006D:/data/develop1 #
ASUS_I006D:/data/develop1 # ls -ltrZ /data/adb/modules/add_certificate/system/etc/security/otacerts.zip
-rw-r--r-- 1 root root u:object_r:system_file:s0 2116 2023-06-11 11:21 /data/adb/modules/add_certificate/system/etc/security/otacerts.zip
ASUS_I006D:/data/develop1 #
Next reboot the phone to activate the dummy Magisk Module.
Check the result after the reboot:
Code:
ASUS_I006D:/ $ unzip -t /system/etc/security/otacerts.zip
Archive: /system/etc/security/otacerts.zip
testing: testkey.x509.pem OK
testing: my_testkey.x509.pem OK
No errors detected in compressed data of /system/etc/security/otacerts.zip.
ASUS_I006D:/ $
Now you can update the installed original OmniROM image with a self-compiled OmniROM image and vice versa using the local file functionality of the SystemUpdate App from the OmniROM OS as long as the dummy Magisk module is installed.
It's recommended to create a complete Magisk Module for this replacment if used on a regular base.
Notes
The certificate for the OmniROM OS is valid until March 2041:
Code:
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $ keytool -printcert -file testkey.x509.pem 2>/dev/null | grep "Valid from:"
Valid from: Fri Oct 25 04:40:22 CEST 2013 until: Tue Mar 12 03:40:22 CET 2041
[ OmniRom 13 Dev - [email protected] /data/develop/android/otacerts ] $
Therefor the new zip file with the certificates should work for a while.
This method only works with compatible OS images - e.g. you cannot use it to update the OmniROM image with the original Android image from ASUS or an image with the LineageOS.
(well, you can -- but after the update the new OS will not boot ...)
Temporary allow updating another OS image
To only temporary allow the update to another compatible OS via SystemUpdate App you may use a bind mount. bind mounts need root access therefor an installed Magisk or any other tool to get root access is required.
The steps necessary for this temporary solution are:
First copy the file /system/etc/security/otacerts.zip from the OS image to install to the phone, e.g.:
Code:
adb push otacerts.zip /sdcard/Download/my_otacerts.zip
Then create a temporary bind mount on the phone for the file /system/etc/security/otacerts.zip :
Code:
su - -c mount -o bind /sdcard/Download/my_otacerts.zip /system/etc/security/otacerts.zip
Now the update via SystemUpdate app will work.
Note:
bind mounts are only temporary and will not survive the reboot
Trouble Shooting
The error message "Update failed with error 51" is printed by the SystemUpdate App when the new OS image is older then the installed OS image. I did not yet find a method to disable that test.
To get a more detailed error message for the errors of the SystemUpdate app use this command in an adb shell:
Code:
ASUS_I006D:/ # logcat -d | grep update_engine | grep ERROR
06-11 11:30:32.154 1428 1428 E update_engine: [ERROR:delta_performer.cc(1046)] The current OS build timestamp (1686434647) is newer than the maximum timestamp in the manifest (1683475334)
06-11 11:30:32.155 1428 1428 E update_engine: [ERROR:download_action.cc(227)] Error ErrorCode::kPayloadTimestampError (51) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
Disclaimer
This procedure should NOT be performed on phones in productive use. -- the procedure is intended for testing and development only.

Categories

Resources