yashsingh1/xdaforums huggingface dataset:
[Moto X4 Guides, News, & Discussion] :
People who aren't receiving updates and are on a non-retus update channel, I have something for you to try.

Plug your phone into a computer and launch a command/terminal window and begin an adb shell, then type "motsettings put global channel_id retus" without the quotes. Then reboot and see if you can get updates.

Edit: you can check if the setting change has taken by typing: motsettings get global channel_id
[Moto X4 Guides, News, & Discussion] sleeptab:
Thank you. But doesn't work:

C:\Android>adb shell
payton_sprout:/ $ motsettings put global channel_id retus
Security exception: Permission denial: writing to settings requires:com.motorola.permission.WRITE_SECURE_SETTINGS

java.lang.SecurityException: Permission denial: writing to settings requires:com.motorola.permission.WRITE_SECURE_SETTINGS
at com.motorola.android.providers.settings.MotorolaSettingsProvider.enforceWritePermission(MotorolaSettingsProvider.java:1076)
at com.motorola.android.providers.settings.MotorolaSettingsProvider.mutateGlobalSetting(MotorolaSettingsProvider.java:664)
at com.motorola.android.providers.settings.MotorolaSettingsProvider.insertGlobalSetting(MotorolaSettingsProvider.java:647)
at com.motorola.android.providers.settings.MotorolaSettingsProvider.call(MotorolaSettingsProvider.java:240)
at android.content.ContentProvider$Transport.call(ContentProvider.java:403)
at com.motorola.android.providers.settings.MotSettingsService$MyShellCommand.putForUser(MotSettingsService.java:371)
at com.motorola.android.providers.settings.MotSettingsService$MyShellCommand.onCommand(MotSettingsService.java:269)
at android.os.ShellCommand.exec(ShellCommand.java:96)
at com.motorola.android.providers.settings.MotSettingsService.onShellCommand(MotSettingsService.java:42)
at android.os.Binder.shellCommand(Binder.java:573)
at android.os.Binder.onTransact(Binder.java:473)
at android.os.Binder.execTransact(Binder.java:674)
255|payton_sprout:/ $
[Moto X4 Guides, News, & Discussion] :
Looks like you may have to root to modify that setting.
[Moto X4 Guides, News, & Discussion] sunilnair007:
----------------------------------------------------------------------------------------------------------------------

got same message :

Z:\Desktop\ROM- mobile\moto x 4 6gb\adb fastboot\ADB fastboot + Script>adb shell

payton:/ $ motsettings get global channel_id

retin

payton:/ $ motsettings put global channel_id retus

Security exception: Permission denial: writing to settings requires:com.motorola.permission.WRITE_SECURE_SETTINGS

java.lang.SecurityException: Permission denial: writing to settings requires:com.motorola.permission.WRITE_SECURE_SETTINGS

at com.motorola.android.providers.settings.MotorolaSettingsProvider.enforceWritePermission(MotorolaSettingsProvider.java:1076)

at com.motorola.android.providers.settings.MotorolaSettingsProvider.mutateGlobalSetting(MotorolaSettingsProvider.java:664)

at com.motorola.android.providers.settings.MotorolaSettingsProvider.insertGlobalSetting(MotorolaSettingsProvider.java:647)

at com.motorola.android.providers.settings.MotorolaSettingsProvider.call(MotorolaSettingsProvider.java:240)

at android.content.ContentProvider$Transport.call(ContentProvider.java:403)

at com.motorola.android.providers.settings.MotSettingsService$MyShellCommand.putForUser(MotSettingsService.java:371)

at com.motorola.android.providers.settings.MotSettingsService$MyShellCommand.onCommand(MotSettingsService.java:269)

at android.os.ShellCommand.exec(ShellCommand.java:96)

at com.motorola.android.providers.settings.MotSettingsService.onShellCommand(MotSettingsService.java:42)

at android.os.Binder.shellCommand(Binder.java:573)

at android.os.Binder.onTransact(Binder.java:473)

at android.os.Binder.execTransact(Binder.java:674)

255|payton:/ $
[Moto X4 Guides, News, & Discussion] jsis83:
it works with this command and changes the software channel to retus:

su -c 'motsettings put global channel_id retus'

But when you flash the Android One version, change the channel to reteu again. :(
[Moto X4 Guides, News, & Discussion] sleeptab:
Okay that's good to hear. And after you flashed Android One and changed it again, is it possible to flash OTA or not because you did root?
[Moto X4 Guides, News, & Discussion] jsis83:
Steps that I have followed:

- Flash firmware Android One

- Root (method 2)

- Change Software channel

- Unroot

And no updates appear for install. :confused:
[Moto X4 Guides, News, & Discussion] jsis83:
Another command to try?
[Moto X4 Guides, News, & Discussion] :
Unfortunately not. I just rooted last week and was exploring around to find a way to turn off gesture navigation on the Android One software. Found the motsettings binary and the channel_id property and thought it might help this situation.
[Moto X4 Guides, News, & Discussion] jsis83:
There must be another property that identifies the version. If you find something else we'll try it. Thank you.

Enviado desde mi moto x4 mediante Tapatalk
[Moto X4 Guides, News, & Discussion] jsis83:
In adb shell, I have detected the following entries:

command: getprop ro.carrier

result: reteu

command: getprop ro.oem.key1

result: reteu

In "/system/build.prop"

.

.

import /oem/oem.prop ro.carrier

import /oem/oem.prop ro.carrier.oem

.

.

ro.carrier = unknown

.

.

But in "/oem/oem.prop" there isn't entry "ro.carrier"

If I add "ro.carrier = retus" in "build.prop" and/or "oem.prop", restart and run again "adb shell getprop ro.carrier" it returns "reteu".

I don't understand anything.
[Moto X4 Guides, News, & Discussion] :
I have searched all over for where those property values could be coming from and have come up empty. I wonder if they could be overwritten with Magisk?

I created a very simple module that sets those two properties to retus. I haven't tested it since I wouldn't be able to tell if it worked, but it's not doing anything other than setting the ro.carrier and ro.oem.key1 properties so it should be safe.
[Moto X4 Guides, News, & Discussion] sleeptab:
Thank you! Searching showed me OPWS 27.1.1. Trying to install it now.

What I don't understand but probably it's interesting for you: System-Information on my phone and ADB command "motsettings get global channel_id" still showing "reteu" as my update-channel :confused:

EDIT: It shows retus after giving the adb-command you gave us earlier. But not able to install the Update. And after flashing original boot it says again there's no update available.
[Moto X4 Guides, News, & Discussion] :
There must be other things Moto is looking for when doing the update checks. I wonder if a logcat would reveal anything?
[Moto X4 Guides, News, & Discussion] sleeptab:
Where is logcat?

Do you know if it's even possible to update with unlocked bootloader?

In which file is data stored you changed with the Magisk Module? I wanted to modify it via Texteditor now. This might stay even with stock boot.img
[Moto X4 Guides, News, & Discussion] sleeptab:
Sorry for Doubleposting. I hope this is enough, had some problems with WLAN while updating so I started a second Logcat. It's in the attachment. Would be nice if you could see the problem because my knowledge isn't enough for this :eek:
[Moto X4 Guides, News, & Discussion] :
The file is common/system.prop within the module. You can put any properties in there an it will overwrite the default values in memory without modifying the build.prop or oem.prop directly.
[Moto X4 Guides, News, & Discussion] sleeptab:
Okay.. That's what I was thinking about but I haven't found the carrier in build.prop earlier now I have and editited it.. However, I also din't read jsis83 already did it in #79. Sorry for not being helpful ;)

At this point: I changed Channel with your given ADB-Command and then edited build.prop manually to have Retus. This made me able to reflash stock boot.img and after that still finding the update. But not able to flash it. I hope you see something in my earlier logcat.

And after I reflashed ROM: No update available again.

EDIT: Doing the same as I wrote above: Again no update. Now I'm confused. And feeling ultimately useless.
[Moto X4 Guides, News, & Discussion] :
Here's where things are failing with the OTA:

03-28 18:16:30.574 E/update_engine( 1316): [0328/181630:ERROR:delta_performer.cc(1099)] 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.

03-28 18:16:30.574 E/update_engine( 1316): [0328/181630:ERROR:delta_performer.cc(1104)] Expected: sha256|hex = AFC50AE5DEFA373C2BA882848B1022A19EAA445D2EECB544DB0B1F5767864BFC

03-28 18:16:30.574 E/update_engine( 1316): [0328/181630:ERROR:delta_performer.cc(1107)] Calculated: sha256|hex = D2C9524B2523F570831A581A420744EE67E1B92E1CF3AF18E575567408EB3A5D

03-28 18:16:30.575 E/update_engine( 1316): [0328/181630:ERROR:delta_performer.cc(1118)] Operation source (offset:size) in blocks: 0:2

03-28 18:16:30.575 E/update_engine( 1316): [0328/181630:ERROR:delta_performer.cc(1193)] ValidateSourceHash(source_hasher.raw_hash(), operation, error) failed.

03-28 18:16:30.575 E/update_engine( 1316): [0328/181630:ERROR:delta_performer.cc(289)] Failed to perform SOURCE_COPY operation 23, which is the operation 0 in partition "fsg"

03-28 18:16:30.575 E/update_engine( 1316): [0328/181630:ERROR:delta_performer.cc(310)] Not a ext partition fsg

03-28 18:16:30.575 E/update_engine( 1316): [0328/181630:ERROR:download_action.cc(274)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing

I don't know what this "fsg" partition contains or why it doesn't match.
[Moto X4 Guides, News, & Discussion] sleeptab:
I don't know either, however it's stock fsg.mbn from the ROM. Seems to have an a- and b-Side I flashed both and still update failed. Another Catlog reveals now it's an error in boot-partition... And here it's tricky.

Original boot: Doesn't show update.

Fake boot with Magisk: Shows update but error because Partition is changed.

I inserted a new Catlog as attachment but I think I was able to read it this time
[Moto X4 Guides, News, & Discussion] :
https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md#ota-installation-tips should help. You may need to root by booting the official TWRP and installing Magisk so it has a backup of the original boot image available.
[Moto X4 Guides, News, & Discussion] sleeptab:
Okay thank you. I just tried it but flashing Magisk with TWRP ends in a bootloop with my device. At the moment I'm trying to find out where backups are stored so it might be possible to pack original boot.img so Magisk recognize it. But I don't know didn't find anything. And no backup available after flashing magisk boot with fastboot again.

Btw FlashFire isn't supported by X4 at the moment I already tried to patch boot with it.

EDIT: Okay I got my problem. First I'm replying too fast. Second I didn't know there's a bootable TWRP for x4. Next try. But even though in Recovery they're saying boot.img was backupped, Magisk manager says there is no backup.

EDIT2: It seems to be a bug, would be interesting if other users are affected to. But we found a bypass in MagiskThread.
[Moto X4 Guides, News, & Discussion] sleeptab:
Okay, I reflashed ROM to make a new start and did everything. But still OTA failing. However, no update_engine in Catlog. As it's xda I can't look at you like a cute little puppy now.. But would you please go on and recheck this catlog for me now?
[Moto X4 Guides, News, & Discussion] mzeshanhakeem:
Has anyone succeeded installing OTA through sideload?
[Moto X4 Guides, News, & Discussion] mujju85:
Check out below link and try out and let us know is it working or not

https://www.androidsage.com/2018/03/15/moto-x4-receives-android-8-1-oreo-ota-download-install/
[Moto X4 Guides, News, & Discussion] sleeptab:
No, still not possible..

This is exactly what we did.. But after firmware is on we don't receive OTA or have to flash jhotman's magisk but OTA won't install (see logs in earlier posts). So nothing new at the moment.
[Moto X4 Guides, News, & Discussion] jsis83:
hello friends, any news? Can I do some test ?.
[Moto X4 Guides, News, & Discussion] juliovieira:
HI Users,

First, tks for share.

I flash the Project Fi firmware from fastbot on my "brazillian Variant" with locked bootloader and It's work fully.

I only don't can receive OTA update or flash updates from stock recovery with ADB Sideload.

maybe I gonna unlock firmware and root, but, I think that I don't need, yet , :P

Tks again

Bye

---------- Post added at 02:36 PM ---------- Previous post was at 02:35 PM ----------

If anyone know how install OTA updates for security patchs and/or 8.1 update.

I'm be happy

:D
[Moto X4 Guides, News, & Discussion] jsis83:
For now we are still stuck. We can not completely change the regular version to android one to recieve ota. The person who gets it will be my idol. :laugh:
[Moto X4 Guides, News, & Discussion] sleeptab:
Yeah, nothing new on this topic :/

However, a new ROM of Android 8.0.0 with March 2018 security patch is online: https://androidfilehost.com/?fid=673956719939834159

No new recovery with enabled sideload or ota.zip from SD-Card options.

Additionally, there's a line called "flashing_unlocked" in my bootloader ahead "Software Status: official". Don't know if it was there before or not, haven't ever noticed it yet.
[Moto X4 Guides, News, & Discussion] juliovieira:
Ohh, tks for share the march update.

I will flash now
[Moto X4 Guides, News, & Discussion] jsis83:
Any news with the March patch? do the otas work?

Enviado desde mi moto x4 mediante Tapatalk
[Moto X4 Guides, News, & Discussion] sleeptab:
No new OTA at the moment. But in Recovery there's no option working and after flashing it told me OTA failed so I don't think so.
[Moto X4 Guides, News, & Discussion] juliovieira:
Hi people, I can flash this update today, this work well with my locked bootloader of XT1900-06.

really have march update.

for flash, I use fastboot script ;)

Hope 8.1 update come flashable from fastboot too..
[Moto X4 Guides, News, & Discussion] smmankad:
I have the XT1900-1 RETUS (Non-FI) version. I flashed the FI image and everything works, including OTA. Unfortunately, only Android Pay doesn't work (says custom rom, blah blah). Any tips to solve that? I only have the 7.1.1 stock boot img available.
[Moto X4 Guides, News, & Discussion] :
At what point do you get that error? I also flashed the A1 image onto the same x4 and I can open Google pay app and all.
[Moto X4 Guides, News, & Discussion] smmankad:
Oh wow. That's awesome! I am able to open the app, but can't add cards (thats the point where it says "You are using a custom rom, etc."). I have been using the exact steps as given in this thread to flash that build. Tried using both mfastboot and fastboot. Wiped using both TWRP, stock recovery. I've tried every possible thing. So, for now, am back on the 7.1.1 stock image which has Pay working (but no OTAs for some reason - stuck on the November security patch and tells me I'm already latest, lol). I'm puzzled as to what's missing. And this is certainly not my first Android (or my first time flashing). I've had Moto G's in the past and have been a long time CM/Lineage user on those too - of course, no Pay on those for obvious reasons. I bought this specific Moto specially so I could use NFC/Pay. :|

(Side note: on booting, I do get the "your phone is loading a different OS" message - but that doesn't seem to be the issue because it comes even on the stock 7.1.1 - I'm guessing that message stays permanently considering I did unlock the bootloader even though I've relocked it now)

---------- Post added at 03:19 AM ---------- Previous post was at 03:17 AM ----------

PS: Did you sideload the A1 build? Or fresh install? I've only fresh-installed it. Interestingly, I get the same Pay rejection behavior when I use the "non-Fi" Oreo stock image floating around here.
[Moto X4 Guides, News, & Discussion] :
I was able to add a card to gpay. I was on stock 7.1.1 and I sideloaded the A1 Oreo update through fastboot I think. After that I just let the rom boot and then factory reset thought recovery. I haven't actually used gpay but I'm assuming it works seeing as how I went through the whole process of adding a card successfully.
[Moto X4 Guides, News, & Discussion] smmankad:
Now that I didn't do. I was constantly trying to fresh-flash the A1 Oreo image - I think that's why it kept breaking. I did not try to sideload it over stock 7.1.1. By sideload, I assume you mean "adb sideload" from stock recovery? Thank you so much!
[Moto X4 Guides, News, & Discussion] cal4877:
Flash thru bootload mode?

So how I flash this? Through bootloader mode or what? I already downloaded the necessary files...
[Moto X4 Guides, News, & Discussion] Ritesh Mhatre:
https://xdaforums.com/moto-x4/development/flash-official-frmware-moto-x4-t3730750
[Moto X4 Guides, News, & Discussion] davinder5549:
anyone has the OPW28.46-13 image flashable A1 us
[Moto X4 Guides, News, & Discussion] Ritesh Mhatre:
8.1, I want too
[Moto X4 Guides, News, & Discussion] juliovieira:
Hi people,

I found this image on Mi A1 forum

https://xdaforums.com/mi-a1/how-to/february-update-t3743872

Tks for who shared beta image

I will try flash when I have some time,

If someone with unlocked bootloader want try too (me is locked), are good.
[Moto X4 Guides, News, & Discussion] davinder5549:
we are talking about motorola firmwares not Mi A1 FYI, i think u r very fast forward:D
[Moto X4 Guides, News, & Discussion] juliovieira:
LoL.

Yeh, a little.

:D
[Moto X4 Guides, News, & Discussion] cal4877:
My question is how did you guys get the bootloader unlocked for the xt 1900-01 when the Motorola website says it's not unlockable? I tried my self and can't do it I'm starting to think all of you are giving miss leading info...I've tried to flash the Android ONE ROM with locked bootloader since on ops says that many of you have done it with a locked bootloader...I tried and brick my phone 3 times luckily I was able to get it back up and running again
[Moto X4 Guides, News, & Discussion] Ritesh Mhatre:
We are talking about Moto X4
[Moto X4 Guides, News, & Discussion] davinder5549:
You can flash with locked bootloader also, but keep in mind only Moto x4 signed images I'll be flashed. Either is blocked/bricjed
[Moto X4 Guides, News, & Discussion] cal4877:
So where is the signed Moto x4 image
[Moto X4 Guides, News, & Discussion] davinder5549:
https://androidfilehost.com/?a=show&w=files&flid=229118
[Moto X4 Guides, News, & Discussion] mfg81:
My notification bar shows 8.1 is available, and when I download it, it just sits at 0% -- anyone else?
[Moto X4 Guides, News, & Discussion] davinder5549:
Hi, anyone has the 8.1 fi build with full stock image of OS ? like 8.0 fi with March update ???? Thanx in advance :good:
[Moto X4 Guides, News, & Discussion] ptn107:
Mine did that for a long time (xt1900-1 on fi rom). Turned out even though I was connected to cell and wifi reception in the area of the building was poor. When I went upstairs it started to download.

However my install failed every time during step 3 with "sorry update failed to install, no changes were made".

I reflashed 8.0 (fi rom) and took all three security patches. Now I'm not even offered the update.
[Moto X4 Guides, News, & Discussion] mfg81:
Mine eventually downloaded. I'm on 8.1 now.
[Moto X4 Guides, News, & Discussion] Membrillo007:
Any issues with USB connection? (ADB/fastboot/file transfer)
[Moto X4 Guides, News, & Discussion] jhedfors:
Work-around found. See this post:

https://forums.lenovo.com/t5/Moto-X...ast-Security/m-p/4066835/highlight/true#M3187
[Moto X4 Guides, News, & Discussion] mfg81:
Ugh... now that you mention it, yes. Not a big deal for me if its resolved quickly. I'll go post on the moto forums too so we get some traction.
[Moto X4 Guides, News, & Discussion] brianhardy:
Flashed Fi to retail variant a while back. Got the 8.1 notification today and downloads and fails on installation step 3 any ideas ?
[Moto X4 Guides, News, & Discussion] SchmilK:
I"m having the same problem on my Fi version with unlocked bootloader. All other OTA flashed fine, but starting with March update and trying OTA 8.1, it fails.
[Moto X4 Guides, News, & Discussion] brianhardy:
Same for me it's the first OTA that failed after flashing Fi. Wonder if they patched it so you couldn't flash Fi to retus. Maybe someone will work their magic and make it work.
[Moto X4 Guides, News, & Discussion] SchmilK:
I bought my phone through Project Fi last week. I'm really happy with battery life and camera performance, but man...wtf is up with the firmware updates? And again - starting with January and updating each month OTA, got to 28.1 and "there was a problem."
[Moto X4 Guides, News, & Discussion] brianhardy:
So your saying the 8.1 update failed to install on an actual Fi variant ?
[Moto X4 Guides, News, & Discussion] SchmilK:
That's correct. Outside of relocking bootloader I've tried everything.

My wife's fi phone with locked.bootloader installed fine via ota. Haven't had a chance to try usb.
[Moto X4 Guides, News, & Discussion] brianhardy:
Well I got the OTA to install had to keep rebooting and check for updates about 20 times and it would get a little further each time in the background installation process. Not sure if the reason it was failing was the update seems to be some different software...... The kernel says pre release and some verity logging message pops up on boot. Doesn't even say software status official anymore in fastboot. Not sure if someone uploaded the wrong OTA or what...... Can anyone that installed the OTA verify what the kernel says ?https://photos.app.goo.gl/l5eS4JP3yNX5pK4B2

---------- Post added at 03:07 AM ---------- Previous post was at 03:05 AM ----------

[IMG="weird"]https://photos.app.goo.gl/qqyrSyBdRSGKpih42[/IMG]
[Moto X4 Guides, News, & Discussion] rekids:
I can confirm same OTA that you posted. Mines is a Fi phone from Fi, got two of them during the special for a backphone while one of the kids needed a phone.

My bootloader is still locked (have unlock key but not unlocked as of yet) and I have made a mistake before and to cut out all the updates flashed a retail version of the software only to have to go back and flash the A1 version of the software (March update full image) and mine updated fine as as soon as the OTA was available.

Want to say I read somewhere that OTAs tend to fail if the bootloader is unlocked maybe if it has ever been unlocked, can't remember for sure but seams that is why I held off at the time to unlock my bootloader.

I know nothing solid but hope it helps a little.
[Moto X4 Guides, News, & Discussion] brianhardy:
So the kernel on yours also says prerelease dirty in about phone ?
[Moto X4 Guides, News, & Discussion] rekids:
Yep