yashsingh1/xdaforums huggingface dataset:
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] tjololo12:
Ah, too late. I already reset lol. I had a TWRP backup, but apparently it was empty because I had no data. Oh well. Once I get my device back to normal I can do some more testing, it's just app installs at this point.

EDIT: Thanks for the offer though! That probably would have fixed me up just fine.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] SiddharthHarishkumar:
I tried unlocking my Moto X4 (Indian variant). I got only 1 line of data for unlocking. And moto website says "PUID NOT FOUND". help
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] SiddharthHarishkumar:
I tried Unlocking Moto X4 and this error showed up.

this ---> "E:\Motorola\ADB>fastboot oem get_unlock_data

(bootloader) slot-countta: not found

(bootloader) slot-suffi: not found

...

FAILED (remote: unknown command)

finished. total time: 0.002s"
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
I am glad you are operational... and your experience here may prove useful in figuring some things out :)
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] caain:
I'm hopeful that we will at least get a Fi-specific image when the next update drops from Moto (or Google, or whoever is actually handling that). I'd love to flash back to the Fi build.

For now, I'll try out this firmware and see if I run into any bugs.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] hotpl8:
So I found the step by step process, I am not sure where to start I started at flashing the partition, but it failed so I am guessing that I missed something first not sure what to do above that. Any help here would be appreciated.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
You may be best off searching for threads about restoring firmware with fastboot... there are hundreds, if not thousands, and hoping to avoid this thread becoming a repeat of so many of them :)
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] caain:
X2, that's what I did. And followed the flashing instructions in the XML file after checking all the sums.

I can't say I really recommend anyone flash this firmware unless it's an emergency. Maybe you would have different results since you're on a retail X4 anyway, but it wasn't an improvement over the stock Fi rom I came from. Retail Moto doesn't seem to have the 'fi magic' apps, and I'm not sure auto network switching or wifi calling works. I wish I'd just waited for TWRP and made a nandroid, but hindsight is 20/20. I had one guy contact me through PM who sounded pretty upset about the phone being borked. I'm not actually sure he tried flashing the modded boot.img though.. it sounded more like something went wrong with a factory reset.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
As I mentioned before, factory resetting a rooted stock device has been a nightmare for many, many years... not sure it should ever be done.

I am working as much as I can on TWRP. Hard with no existing device trees or proprietary files to pull from, but I am hoping to make some progress this week.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] caain:
And this is something I should have known. I've been sheltered with Nexus devices for so long, I didn't even think it would be an issue to factory reset a rooted phone. Whenever I've made errors in the past, I would just re-flash a stock image or new rom and move on. Lesson learned! :)

I wish I could do something to help with TWRP. I wouldn't even know where to begin though, so all I can do at the moment is say thank you for all of your hard work.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] DiDGR8:
I got my phone from Project Fi. But after [MENTION=2916830]caain[/MENTION] recovered from his "misadventures" he has seen some "features" on his that are only on the Retail version (like sold at Best Buy). In particular he says he had the Wireless Sound System (Tempow Audio Profile) for multiple BT speaker streams. So I'm not convinced the images we have are truly Fi specific. I didn't see anything in the image that mentions Fi. The subsidy lock is DEFAULT and the regulatory info is DEFAULT, so that doesn't tell us anything (except that it's probably not an Amazon Ads phone!).
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Right. It looks like a retail build, not Fi
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
FYI, I would recommend for now switching off automatic updates in Developer settings if you have root... not sure yet how it will work out.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] bwtmanagement:
Verified on latest version of ota And on Verizon..
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] enriquejones666:
So, does this CfAutoRoot only patch /system, or is it also making changes to the boot.img (the one on your device)?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Seems to change /system and some kernel permissions, though I am not clear on whether the kernel change is only runtime or permanent.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] DreXor:
Mr mightysween,

I figure I would touch base as you'd requested information to builds, variants etc.

you'd ordered your project fi phone and received it roughly the first of nov? I got mine 10/31, everything noted in the root img matched mine (model, build, variant, version etc) the image dumped mine into a boot loop, I know there's a few reboots required on the root I gave it an hour while researching a recovery. .. in regards to that thank you SO much for that recovery img, saved my @$$. if you'd like any stats on mine to figure out how yours worked and mine bombed, I would be more than happy to help with your endeavour and I'd really like a root :)

drex

edit

saw the other thread with the device names (sprout) where would I pull that from?

/edit
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Device name should be somewhere in build.prop.

It is very strange that some have had trouble... I have booted and flashed dozens of boot images that I have altered, many that borked the device and caused loops and other problems, but reflashing the stock boot image has returned me to working order 100% of the time. I guess in the long run it may be good to know why, but if I get TWRP running it may become irrelevant anyway :)

Also... the root method seems to work fine. If you believe you have a different boot image to start, you could try using the fimware.mobi tool to create your own package -- but as it was labeled "payton_retail", I think the boot image is pretty standard across the different variants.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] DreXor:
thank you kindly for the information, I unfortunately am less than literate, informed enough to to be very hazardous.

I would really enjoy learning, if there's anything info wise that would be of benefit from.my device/build, I would be happy to help with the on goings. but I'll avoid you having to be a preschool teacher to get me there .

I look forward to your updates and progress :)
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] johnjingle:
Got a Fi version of this phone. Root worked perfect NPW26.83-34-0-1, XT1900-1.

Ready for any testing and excited!!!
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] blowingoff:
i have a xt1900-6 (not really sure what the differences are) and my moto version is npw26.83-34-0-1 and build number is npw26.4

i'm willing to test but i'm getting very confused between so much versions of our phone.

and just one question: anyone know if there is any factory image or if i could flash another in case anything goes wrong?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] johnjingle:
From what I read, your phone, for example, has 4GB of RAM and 64GB of storage, also the ability for dual sim cards, also less supported cellular networks. I have no idea how that may change anything. Also, the xt1900-6 is a Brazilian model not the USA/Canadian model that is the xt1900-1.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] blowingoff:
yeah, I know. but probably I could flash another stock image.

and its 3GB rom and 32gb
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] blowingoff:
and my question is more like do I have something to flash if rooting goes wrong??
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
There's a thread about factory image... there is only one, and it is retail, not the Fi version.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Also, OTA is being pushed as we speak... may not play well with root!

For backup, I recommend FlashFire from the Play Store... you can create fastboot flashable backups of your device.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] DiDGR8:
Tried to update Android One OTA (on ProjectFi) and it downloads the 90MB package and then fails on rooted unlocked and UNrooted unlocked. Gonna back everything up with Flashfire now (thanks for the reminder [MENTION=3683732]mightysween[/MENTION]) and try locking the bootloader again and see if it applies.

Has anybody captured the OTA yet? I have no idea how to grab it.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
I have not received it yet, but in the past we could let it download (but not install) and then open FlashFire. It automatically detected the OTA file and could install it without losing root.

BUT, with this new partition scheme, who knows if that is still possible...
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] gee one:
Yes, catching the ota will be very insightful to see how it handles the partitions. Hopefully they will be available on the web soon.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] DiDGR8:
It seems like Flashfire can't see the OTA update. The OTA update start loading "in the background" immediately upon completion of download. Then it never finishes.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] johnjingle:
Same thing happened to me. BTW, I live on Marco Island, pretty close to you.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
If you get a notification that an update is available, don't click it... just plug into PC and issue "adb logcat" and within that file we should be able to find the URL for the update.

Search for "SystemUpdateService", and in that section should be the URL to directly download the OTA.

That said, I am not certain how the OTA is handled/installed on the new A/B system... will need to browse the Pixel forums and see how they handled it.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] tgwitmodt:
Here is my ota zip file (I can't post the link right because my account is new):

drive/google/com/open?id=

1LFx7giUUXn40PyalTR6g7XBbCdkhck0a

---------- Post added at 06:15 PM ---------- Previous post was at 06:09 PM ----------

Also, here is where I got the link from on the log file (replaced . with \):

drive\google\com/open?id=1LMASh9nDSKYoHQNB7_GpSrU9zcNXIe09
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Thanks! Here is the link reassembled:

http://drive.google.com/open?id=
1LFx7giUUXn40PyalTR6g7XBbCdkhck0a
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
What model of the X4 are you using?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] tgwitmodt:
Android One Version on Project Fi
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] gee one:
I was able to download from this link.

https://drive.google.com/file/d/1LFx7giUUXn40PyalTR6g7XBbCdkhck0a/view
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Worked as in installed correctly?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] gee one:
[/COLOR]

Sorry, I meant I was able to get to the download site. I wasn't successful downloading yet, but I'm on mobile.

I still don't have the phone.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
I have the OTA tried placing it in /data and running FlashFire with no luck...am researching now on how to apply it properly on A/B partition via adb, but am really more interested in getting my device tree built so I can get rid of stock altogether :)
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] tgwitmodt:
Would the log file during the ota update be helpful?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] AjkayAlan:
Sideloading Works

I was able to sideload this without issue on my Android One Project Fi variant.

Disclaimer: I only did this with the Android One variant, and assume no responsibility for any issues you may encounter.

Here are the steps that I did:

1. Installed Motorola Device Manager

2. Enabled USB Debugging on my phone, plugged in my phone via USB, and authorized it

3. Downloaded the Android SDK Platform Tools and extracted them to a folder

4. Downloaded the quoted file and place it in the same directory as the extracted platform tools

5. Opened CMD (I am a windows user) and CD'd to the platform tools directory where I extracted everything

6. Used ADB to reboot into bootloader:

adb reboot bootloader

7. Used the volume rockers on my phone to scroll to Recovery, and then tapped the power button to select it

8. Once the Android guy shows up with a red exclamation, hold the power button then quickly tap volume up then release the power button. You should see a menu

9. Select "Apply update from ADB" by using the volume rockers to scroll and power to select

10. Run the following command from your command window on your computer:

adb sideload Blur_Version.26.51.1.payton_fi.google_fi.en.US.zip

The sideloading took around 5 minutes to complete, and installed successfully. For some reason on verification it threw the following error:

Failed to open driver control: no such file or directory

However, I rebooted and it rebooted fine. It took another few minutes for the phone to boot (it took awhile on the white android one screen), but worked without issue. Here is my about phone information

Model: Moto X4
Software Variant: Google Fi
Software Channel: Retus
Android Version: 7.1.1
Android Security Patch Level: November 1, 2017
Baseband Version: M660_7020.05.01.52.01R PAYTON NA CUST
Kernel Version: 4.4.21-perf-g1d8c4e6-00080-gf5bf9a1
Kernel Build Date: Friday Oct 20
Build Number: NPW26.83-41
Motorola Version: NPW26.83-41
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] DiDGR8:
Are you rooted (modified boot.img)? This is where I can't follow. My "recovery" never comes up. The only "unmodified" boot.img that I can create is a US retail version. If anyone has a "stock" Fi boot image, I'd appreciate a copy :o
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] AjkayAlan:
Unfortunately no, I was/am completely stock. Is there any way to pull a boot.img off of stock?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] johnjingle:
So, I went to try and get the update image and my device now says "Background installation in progress". Luckily it is not going through for .26, how do I get that to cancel and stop showing up? There is nothing in the cache folder using Root Explorer and/or ADB.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Wait... you cant even boot stock recovery? Just try boot.img from the firmware thread... I am on Fi and have flashed it probably 25 times to recover after testing custom boot/recovery images that I compiled.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] DiDGR8:
I've got a bit of a Frankenstein on my hands. The logo.bin file seems to have something to do with it. I've tried both the rooted and unrooted boot.img file (both of which originated in the factory image if that matters). My original Fi boot.img may have been exactly the same file, but I don't know (and don't have a copy anymore).

I've loaded the entire factory (retail image) and that worked. I did this because I wanted to test the "Wireless Sound System". For the record, it works great :angel:

I can use Flashfire Full Restore to go back to rooted Fi, but when I do, I get a quick glimpse of the RETAIL logo (pale blue with red letters) before the warning message about my bootloader being unlocked followed by the Android one boot animation. Once it's up it looks like a pure Fi phone, but there is that one little vestigal retail screen at the beginning. If I reboot into "recovery" I get that retail motorola logo and the screen is unresponsive.

These are the steps I used to load the factory (retail) image:

1) mfastboot flash partition gpt.bin

2) mfastboot flash bootloader bootloader.img

3) mfastboot reboot-bootloader - (optionally)

4) mfastboot flash modem NON-HLOS.bin

5) mfastboot flash fsg fsg.mbn

6) mfastboot erase modemst1 - (optionally)

7) mfastboot erase modemst2 - (optionally)

8) mfastboot flash bluetooth BTFM.bin

9) mfastboot flash dsp dspso.bin

10) mfastboot flash logo logo.bin

11) mfastboot flash boot boot.img - (or rootedboot.img)

12) mfastboot flash system system.img_sparsechunk.0

13) mfastboot flash system system.img_sparsechunk.1

14) mfastboot flash system system.img_sparsechunk.2

15) mfastboot flash system system.img_sparsechunk.3

16) mfastboot flash system system.img_sparsechunk.4

17) mfastboot flash system system.img_sparsechunk.5

18) mfastboot flash system_b system_b.img_sparsechunk.0

19) mfastboot flash system_b system_b.img_sparsechunk.1

20) mfastboot flash system_b system_b.img_sparsechunk.2

21) mfastboot flash system_b system_b.img_sparsechunk.3

22) mfastboot flash oem oem.img

23) mfastboot erase carrier - (optionally)

24) mfastboot erase userdata - (optionally)

25) mfastboot erase ddr - (optionally)

I got these from the xml files in the factory image.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Well, you probably​ don't want​ to mess with it, but here is a FlashFire backup of the Fi stock logo partition...

https://drive.google.com/folderview?id=1yhX4KZczuLYBpFoQ6BqhUaLnvZkaxYGr

Which leads to the question, why not just make a full fastboot and/or FlashFire backup of Fi stock to share?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] DiDGR8:
I was able to "straighten out" the logo mismatch by restoring my Full Flashfire BU (I must have not checked all the boxes last time). I eventually got bootloader and boot images lined up where I could get into recovery and try an ADB sideload with the OTA package, but I got an mismatch between device id and it failed. It looked like I was an unrooted Android One device at the time, so I don't know what mismatched the package was payton/sprout and it said I was just payton (but the message appeared truncated).

When I rebooted afterward (as unrooted A1), the system update downloaded, and wouldn't install. So I flashed to a rooted boot image and now the OTA downloads and goes into background preparation. Last time it acted this way it never got past "preparing". I'm going to let it "cook" overnight, but I'm not hopeful. today: still "Preparing". :(
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] 8711:
Looks like things are moving along pretty well for this device, given how new it is and how complicated the new setup seems to be. I really wanted to stick with it, but I can't get used to the smaller size so mine will be going up on Swappa soon since I'm past the return date. Wish I hadn't bought the case and screen protectors and all that, but it'll find a nice home.

I plan to continue following development on here though. You guys seem to know what you're doing and it'll be nice to see what this device is really capable of when custom roms start coming out.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Can you see if there are any logs in:

frameworks/base/services/core/java/com/android/server/pm/

Also, does a logcat show anything about update_engine or update_verifier ?

I still have not received the update...
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] DiDGR8:
The only thing in logcat is a wakelock:

11-12 19:23:50.173 1771 1808 W PowerManagerService: Suspicious wakelock held 60475354ms when sleep: lock=213941154, flags=0x1, tag=Update_Engine, ws=null, uid=10007, pid=8333

/system/framework path does not contain /base/..... Am I looking in the wrong place?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Damn, 6047354ms??? that is 16+ hours in the first part :)

Let me check more into where we might find logs for this...
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] DiDGR8:
Yeah, I TOLD you I was gonna let it "cook" overnight:angel:
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
:laugh:
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
Got the OTA notification today, and am in the same boat... stuck at "preparing" even if I am stock/unrooted. Nothing obvious in logs, but obviously something in the root process has broken the updater.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] SR3TLAW:
Updated to 7.1.1 and then popped in my Verizon SIM.

Should I attempt to unlock boot-loader at this point? Still under the 14-day Best Buy return period lol. Any testing I can help with?

XT1900-1 on Verizon
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] johnjingle:
Why not?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] DiDGR8:
Well, except for rooting, there's not any real benefit to unlocking your bootloader right now. No custom recovery, no ROM development, etc. Rooting seems to be borking the the OTA security updates. It'll probably also prevent the update to Oreo expected before the end of the year. So, I kind of regret rooting right now. Titanium Backup, Root Explorer, and Quick Reboot, even Flashfire really aren't worth not getting Oreo soon.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mightysween:
I agree that there isn't much point now in unlocking/rooting unless you are developing... it does bork the OTA updater.

You could probably flash stock retail and get Oreo when it is released -- but would give up variant specific stuff.

All that said, I have TWRP booting. Just a matter of getting the partitions properly set up.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] gee one:
I haven't researched what's coming in Oreo, but in nougat, the OTA updates are incremental and just patch over the parts that need to be changed. The patch is more like a binary diff at the block level, not the file level. Even something like mounting a file system as read-write will change the metadata and break the nougat update. If I had to bet, this is probably what is interfering with your OTA.

Google puts out the full OTA for their devices that can be used to flash back to stock. This is the full image that is patched unconditionally, so the starting state of the phone doesn't matter. Hopefully we'll get something like this that will give is some insight on how the process works. There are probably some host binaries in the ASOP build tree that will do the same thing.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] DiDGR8:
Unfortunately Google only does this for the Nexus and Pixel devices. Right now we are dependent on Motorola and they are kind of stingy. For example, the only public factory images available are for their "Pure Edition" or "Developer Edition" phones.

The new "seamless" OS updates are really the "joker in the deck" here. All the old methods for updates seem to be obsolete.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] darkdaemon32:
Welp, I tried, please post here if you want to support the effort for a firmware image:

https://forums.lenovo.com/t5/Moto-X4/Moto-X4-Firmware/td-p/3878482

[IMG="Motorola "support""]http://oi68.tinypic.com/1425vfb.jpg[/IMG]
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] blowingoff:
I think you should post this on the firmware image thread we already have going on.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] darkdaemon32:
Yes I posted it there also. I simply posted it here since so much discussion was going on about firmware files etc
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] baker954:
Anyone tried this on NPW26.83-41? (November 2017 security patch)