yashsingh1/xdaforums huggingface dataset:
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
I disagree, you should always be able to flash a factory image. That doesn't require unlocking. If a factory rom is available for the XT1625 then it will flash, whether it was originally an Amazon phone or a normal G4.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LeifEricson:
According to the support email I've been contacting (the Amazon Prime phone department) they have "confirmed" that the Standard Amazon version without ads is indeed the factory Motorola phone. They claim they haven't tampered with it at all. Just a note for anyone considering it.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] granny smith:
Sorry to bug you about this....I just want to confirm if the ROM at File Factory is completely stock Amazon with all of the ads? I want to get my phone back to factory condition so that I can get the OTA updates. I only flashed the Amazon de-bloat thing and want to undo it. Thanks for you help!
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Caltinpla:
Thanks for your links, I just updated my phone to the latest firmware without any problems.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] yaconsult:
Then why don't all those Verizon Moto G owners that never got an update do that? Does the update channel set in the rom not mean anything?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LinuxHippy:
I don't know if this totally worked for me. My bootloader is already unlocked and then I rooted it already. So, I just used the instructions here for fastboot. I used the oem.img file from "Bloat-Ads-Remover-Without-RSDLITE". I still see an old ad on my lock screen for dog food when PIN is enabled for a lock screen but I see no ads if I disable the lock screen which I couldn't do before. So it did do something but I'm stuck with the old ads??

This is what I did from the unlocked bootloader from Ubuntu Linux:

sudo fastboot flash oem oem.img

Marty
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
I'm not sure if anyone knows exactly why the update channel doesn't change when the factory rom is flashed. I'm on AT&T and I flashed over the Amazon stuff with no problem but I'm still on the AMZ software channel. I don't think it's set in the rom. Like I mentioned somewhere else, that doesn't bother me because I won't touch an OTA.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] xtermmin:
Check the size of the oem.img file. It's it's 600MB+, it's the Amazon oem image. If it's 120MB, it's the Motorola oem image.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LinuxHippy:
It appears to be the right file but a little bit bigger. Here's the md5sum too:

-rwxr-xr-x 1 tux tux 122M Jun 5 13:18 oem.img

tux@Helm:~/MotoG4/XT1625-Amazon-Bloat-Ads-Remover-Without-RSDLITE/XT1625-Amazon-Bloat-Ads-Remover-Without-RSDLITE$ md5sum oem.img

0c1716f14585c30053e22ce23c725d7e oem.img

Marty
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] xtermmin:
Try using the Remove-Amazon-Bloat.sh Linux script in the XT1625-Amazon-Bloat-Ads-Remover-Without-RSDLITE.zip download. It has some extra commands that might be important to the process.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
I did a factory reset and the consumer celluar stuff is gone. My baseband is M8952_70009.08.03.45R ATHENE_RETUSA_CUST

Is this what I should be seeing? Or do I need to get another file to be on fully stock Motorola?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Caltinpla:
I flashed the latest firmware update and my phone software channel still shows amz, but my build prop shows the version codename is Retail/Rel US. Nowhere Amazon/amz to be found??? Is this something

# begin build properties

# autogenerated by buildinfo.sh

ro.build.id=MPJ24.139-49

ro.build.version.incremental=49

ro.build.version.sdk=23

ro.build.version.preview_sdk=0

ro.build.version.codename=REL

ro.build.version.all_codenames=REL

ro.build.version.release=6.0.1

ro.build.version.security_patch=2016-05-01

ro.build.date=Sun Jun 19 12:04:20 CDT 2016

ro.build.date.utc=1466355860

ro.build.type=user

ro.build.user=hudsoncm

ro.build.host=ilclbld35

ro.build.tags=release-keys

ro.product.model=Moto G (4)

ro.product.brand=motorola

ro.product.name=athene_retail

ro.product.device=athene

ro.product.board=msm8952

# ro.product.cpu.abi and ro.product.cpu.abi2 are obsolete,

# use ro.product.cpu.abilist instead.

ro.product.cpu.abi=armeabi-v7a

ro.product.cpu.abi2=armeabi

ro.product.cpu.abilist=armeabi-v7a,armeabi

ro.product.cpu.abilist32=armeabi-v7a,armeabi

ro.product.cpu.abilist64=

ro.product.manufacturer=motorola

ro.product.locale=en-US

ro.wifi.channels=

ro.board.platform=msm8952

# ro.build.product is obsolete; use ro.product.device

ro.build.product=athene

# Do not try to parse description, fingerprint, or thumbprint

ro.build.thumbprint=6.0.1/MPJ24.139-49/49:user/release-keys

ro.build.characteristics=default

ro.mot.build.device=athene

ro.mot.build.system.product=athene_retail

# end build properties
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LinuxHippy:
OK-I only seem to get 3 ads that keep recycling. 2 protein powders and one dog food. I took a screenshot. If I select no lockscreen then I don't see these.

I'll try your suggestion-thanks :)
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] xtermmin:
Technically you're on the stock Moto OS, but if you look under Settings > About Phone, it says Software Channel: amz still. That Software Channel setting must be set somewhere else (like one of the persistent partitions that does not get overwritten when flashing ROMs). At this point, we're still unsure if we're getting OTAs from Amazon, or Moto, or if we're stuck in some weird in-between where we can't get OTAs from either. Time will tell. Hopefully we'll be able to find a way to change that channel to retus.

---------- Post added at 02:21 PM ---------- Previous post was at 02:20 PM ----------

It must be set somewhere else, somewhere outside of the normal partitions that get overwritten when flashing ROMs. We're gonna have to dig deeper to find it.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
Perfect. I'm just glad I'm on stock now. didn't some say early on that there was a small update that came through right after they changed to stock? Or did I misunderstand what they were stating?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] xtermmin:
Whoops, sorry, I was thinking I was in another topic. If all you did was the Amazon-Bloat-Ads-Remover, you're technically still on the Amazon ROM, but the pre-installed Amazon apps are no longer present, so they don't load. If you want to be on the Moto ROM, you need to flash the complete Moto ROM (Amazon-Bloat-Ads-Remover just replaces one part of the ROM). If you don't have an unlocked bootloader, however, once you go Moto you can't go back to Amazon. (at this point. maybe someone will get a hold of a signed Amazon ROM later)

The update that came out seems to only be available OTA to full-Amazon devices. I don't think anyone with a never-Amazon or previously-Amazon device has received an OTA yet. If you have a previously-Amazon device and an unlocked bootloader, you can flash the Amazon ROM and disable the ads via rootjunky's custom oem.img (which only removes the ads, hence why an unlocked bootloader is needed) and still receive Amazon's OTAs.

A stock ROM (for never-Amazon devices?) which includes the update was uploaded a few days ago. Unsure when it'll be pushed out OTA to never-Amazon devices.

(If I'm wrong with something here, someone please correct me. This is getting so confusing! :eek: )
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LeifEricson:
Yes, you're right. Once you get rid of ads, there's no going back without a bootloader unlock.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
Ummm, I don't know what the heck just happened but I signed in to my wifi network and set it to update the installed stock apps. Went back an hour later and the phone was a brick. I can't turn it on at all.

Yes I tried with and without AC power.

EDIT

Had to hold down the power button for almost 2 minutes but it finally restarted battery was at 59% so that wasn't the issue. Now it won't connect to the Play store even with my wifi working and connected. it wants me to check my connection and again and retry but it never connects.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
Did you hold the power button down long enough, like 15 to 20 seconds?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
Had to hold down the power button for almost 2 minutes but it finally restarted battery was at 59% so that wasn't the issue. Now it won't connect to the Play store even with my wifi working and connected. it wants me to check my connection and again and retry but it never connects.

EDIT

the phone bricking out caused the date settings to get completely jacked up. Once I updated the date and time manually the play store started working again.

Now I'm really concerned over what caused it to brick out in the first place.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LeifEricson:
So let me get this straight, have you removed the ads? And were just trying to update the stock apps? Or is it unmodified and it still bricked?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
ads were removed and I was on Motorola stock. Only thing I was doing at the time was updating stock apps when it died. Its functioning again but I have no idea what caused it to go dead like that. Especially with the battery at 59%.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LeifEricson:
Hmm. That is very strange. Maybe something to do with the phone still being on the amz channel? No idea, could've just been a random bug.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
hope it was just a one time bug. Never seen a phone do that before.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
If it were me I think I'd chance a factory reset. Of course the chance would exist of it going crazy from doing that and it's a pain reinstalling everything. Do you remember what apps were updating?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
This happened after I had already factory reset it. I don't know the specific apps that were updating but it was only the apps that were part of the factory reset.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
This will give me something to think about if I ever think about a reset. Possibly using fastboot to erase the caches beforehand.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] mcdonsco:
Does this restore the bootloader as well? Since I did this I have the twrp bootloader now, would that remain?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] aznindguy4u:
hi rootjunky,

good news! i got the xt1625 motorola g4 standard edition without amazon prime ads (states "retus" in the software channel), and I was able to UNLOCK this device as soon as I got it. This is good news for people who want to get their hands on this device and unlock it and still get the $50 instant rebate from amazon.

As i got this device, I decided to root it as well using your one-click root script. While using the bat, I saw that twrp was successfully flashed (it seemed so during the boot). The bat got stuck at flashing supersu on its own, so I manually did it using twrp and located supersu 2.76 on the disk.

After doing all of this, i rebooted my phone and now it's stuck in a bootloop. I also tried to boot into the modified recovery (TWRP), but it displays the error "No Command" ( I assume twrp is not working as it should).

Now I'm unable to boot successfully into the phone or use twrp to flash any rom (including motorola stock firmware).

What are my options? I currently am using a windows 10 pc (don't own a linux or mac for RSDLITE). Is there something I could do to fix this before requesting replacement?

edit: I booted into fastboot and successfully flashed twrp again and it is working! however, i'm still stuck in a bootloop? What is precisely the next step to take?

thanks!
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] MadGoat:
The allow bootloader ulockn option might not have been activate in the OS before you flashed. The system might be bootloader locked at this point and not booting. Might need to stock flash it and start with the bootloader unlock again.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] dumbduck:
I followed the instructions on how to unlock the bootloader and I get the same message everytime: Your device does not qualify for booloader unlocking. Did I just throw down $150 for a locked phone?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] joemossjr:
echo SYSTEMLESS=true>>/data/.supersu type this in on twrp on terminal in advanced- and then flash twrp you should be fine

---------- Post added at 01:37 AM ---------- Previous post was at 01:37 AM ----------

Supersu
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] aznindguy4u:
hi,

i was able to flash my phone using rsdlite and the stock firmware file from rootjunky's site and get my phone working. the best i could do so far is flash twrp, have bootloader unlocked(verified this in fastboot mode and i get a warning dialog pop up at boot). i also have the "oem unlocked bootloader" option set on by default in the developer options.

but every time i root and declare the "systemless command" in the twrp terminal prior to flashing supersu, i get stuck on bootloop.

i guess i have to wait for someone to upload a prerooted flashable zip usable with twrp or any compatible recovery before I can enjoy using root. don't want to deal with manually doing root constantly especially with the systemless requirement, which i am new to.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
Hmmm, new problem. MMS doesn't work. I can receive and sent texts but photos won't send or receive. APN is correct and my other phone pulls in MMS just fine. I had this same problem when I had a ZTE ZMAX 2. I have to turn off wifi to get the message to come throught.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
That's why I use a different app for messaging. It's called the T-Mobile fix in most messaging apps. I use Chomp SMS and one of the MMS settings is that fix where it will turn off wifi when sending MMS and re-enable it after sending. A lot of other apps do the same thing.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
Ugh. I really like the google texting app. The other good ones are all pay to get features. So I still have to remember to turn off wifi before sending and receiving?

---------- Post added at 08:26 PM ---------- Previous post was at 08:20 PM ----------

This creates a new problem using a differnt texting app. For some dumb reason you can only set ringtones for calling and not for texting on the contacts book. What am I missing?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LinuxHippy:
This might help somebody like me where old ads are still appearing on the lock screen after doing the windows bat file, linux script and fastboot in linux flashing the Motorola img. Go to security in settings and then choose swipe. Then go back to pattern and after u input a pattern it takes u to a screen called Notifications where "Show all notification content" is checked. Change this to "Don't show notifications at all" and then no more old lock ads.

Marty
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] xtermmin:
The Amazon ad-supported version cannot be bootloader unlocked anymore.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LinuxHippy:
I just got mine last week and it does unlock. I got the same message a bunch of times at the Motorola site. I played around with the output and finally got my sequence to work. It only gives 4 relevant lines rather than 5 and it needs all the # signs in the code.

Marty
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] PalmCentro:
Please elaborate. Are you actually spoofing Motorola into giving you a unlock code??
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LinuxHippy:
No spoofing. I just went to the Motorola unlock site after making an account:

https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-b

I made a thread here:

http://xdaforums.com/moto-g4/help/amazon-moto-g4-bootloaders-unlocked-t3419911

Put your device in fastboot mode (power off, then press the power and volume down buttons simultaneously).

On your desktop, open a command prompt or terminal, and go to the directory where you installed the Android SDK tools (or make sure fastboot is in your $PATH)

At the prompt, type $ fastboot oem get_unlock_data

The returned string will be used to retrieve your unlock key.

*******************

For me, that code was only 4 lines.

tux@Helm:~$ sudo fastboot oem get_unlock_data

...

(bootloader) Unlock data:

(bootloader) 3A45210407248602#

(bootloader) 5A59323233433246534C004D6F746F2047200000#

(bootloader) 1095EFAB6000EDC14660539C503A04F7900B9A01#

(bootloader) 9F93C800000000000000000000000000

I put this into 1 line as:

3A45210407248602#5A59323233433246534C004D6F746F2047200000#1095EFAB6000EDC14660539C503A04F7900B9A01#9F93C800000000000000000000000000

Put that code back into the Motorola site. That was for my device, yours will be different but use the same process.

Marty
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] xtermmin:
He didn't spoof anything, he was manually cleaning the get_unlock_data output instead of using Motorola's web cleaning tool, which is why it failed for him the first few times. In another topic, he said he deleted some # signs or something.

Even though I already got my key and unlocked my bootloader, I tried re-submitting the request anyway, and I now get the rejected notice (and I know I did it correctly too, because the get_unlock_data that I submitted the first time was still auto-saved in the submission form).

Moto turned off the bootloader unlock for the Amazon models on Monday. His posts indicate that he unlocked his bootloader on the 17th, Sunday.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
WRONG!
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LinuxHippy:
I fixed my post so it's right now.

xtermmin, how do u know Motorola locked these 1 day after I got it working?

Marty
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] xtermmin:
http://xdaforums.com/showpost.php?p=67807582&postcount=151

Late on the 18th (in the US), I was seeing posts saying that people weren't able to unlock their Amazon models, so I tried re-submitting my unlock request (original request was submitted the day the G4 was released, got my unlock key after 5min), but it was rejected saying it was ineligible for unlock. You got the unlock key right in the nick of time! :p
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LinuxHippy:
Wow-I got in under the wire on something :)

---------- Post added at 12:59 PM ---------- Previous post was at 12:46 PM ----------

Maybe Motorola knows they already sent u an unlock code so u don't qualify for another? It did take 4 tries for me to get it.

Marty
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] PalmCentro:
I know how to unlock a bootloader ;)

I just thought that you where successful even after they started rejecting Amazon Bootloader's.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LinuxHippy:
So u just got the bootloader unlocked?

Marty
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
Got my hopes up for nothing. lol

To be honest, now that I've got things working again, I'm perfectly fine on vanilla android. Its where I have wanted to be for a long time. While I liked LG phones, I hated their OS layover. Even if I can't unlock, I think I'm happy with it as it is. That is, as long as I can still flash updates to it when they come out. With any luck, the motorola OTA will work and override the Amazon OTA.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LinuxHippy:
I reread stuff and see that people really can't get the BL unlocked now. I went through this for 2 yrs with a Verizon s3 and there was a workaround to get twrp but the kernel was locked so u had to stay with a vanilla kernel.

All I can say is-why Motorola, why :eek:

Marty

Edit:

A modified safe strap was the workaround. Also, this was a Samsung Galaxy s3 that Verizon locked to KitKat with OTA.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] yaconsult:
All I can say is-why Motorola, why :eek:​

Because you bought an ad-supported phone, subsidized by amazon, in order to save money. If you want complete freedom with your phone, return it and buy the retail U.S. version. Then you can unlock the bootloader and be on the motorola upgrade channel. It's that simple.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
I realize I did that, my only gripe with it all is that should have been noted from the beginning instead of letting it go for a few days then blocking it. I'm sure it was because most of the people I've talked to at Amazon are less than clueless and no one even realized their bloat could be bypassed. Looking at it from their side it would seem hard to narrow it down to only phones purchased after a certain date, but I think it would be easier than it looks because the early sells eligible for unlocking would just have their IMEI tagged as unlockable.

Oh well, eventually when they come out with the Moto G12 running Android Tootsie Roll, they'll unlock them for sure. :D
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
Most of the people in that ship in this thread don't have the option to return the phone or they would. I'm fine with my purchase, but if I wanted to return it for the non amazon version I couldn't since I removed the ads already but missed the unlock code.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] xtermmin:
Nah, you can re-submit unlock requests multiple times and still receive the key, it's not just a one-and-done deal. For example, I bootloader unlocked my Moto E2 a year ago via Moto, and even now I'm able to request the unlock key again.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] jonnybb1:
Well I can confirm no unlock code is available for me as of today. I've been sitting on this phone waiting for some time-of to geek-out on my devices and now I have to return it. That SUCKS!@
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
Well the Motorola Device Software Update tool doesn't even recognize my device. Guess that means there will be no updating through standard channels.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] panax_yuka:
Hello I flashed motorola stock rom, and I need to recover to amazon factory state. Is this possible now?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] xtermmin:
At the moment, no. There are no signed Amazon ROMs available.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] LinuxHippy:
Are there any Moto g4 ROMs yet that don't have Amazon's thumbs up? I'm either no good at searches or this phone is still too new, but I didn't find any ROMs that could be installed with TWRP.

Marty
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Danny1976:
I can confirm, that once you flash the Stock Google Firmware the bootloader can be unlocked. I tried unlocking it with the Amazon version with just removing the ads and Moto site said the bootloader could not be unlocked. Then I flashed the phone with the stock Motorola firmware and used RSDLite. After I flashed the stock rom, I was able to follow the steps for to get the code for the moto site and was able to get the bootloader unlocked.

Stock Firmware:

http://rootjunkysdl.com/files/?dir=Moto G 4th Gen XT1625/Firmware