yashsingh1/xdaforums huggingface dataset:
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Samwayfd:
servicefile.xml

RJ, I read about the servicefile.xml and see it in the zip, but how do you utilize this in order to keep data?

Thanks!

---------- Post added at 09:40 AM ---------- Previous post was at 09:36 AM ----------

I flashed the stock image and they are gone. Just trying to figure out how to use this "servicefile.xml" to keep user data, for next time, because when I flashed the zip it wiped all data.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
you select the servicefile.xml in rsdlite then flash the firmware. it flashes all the new firmware but doesnt wipe the data.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] gecko316:
What to do if on Windows 10 and can't use rsdlite?

I want to flash using the service file.xml

---------- Post added at 09:26 PM ---------- Previous post was at 09:26 PM ----------

What to do if on Windows 10 and can't use rsdlite?

I want to flash using the service file.xml
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
then use this tool

[YOUTUBE]dqAGWVPYmNo[/YOUTUBE]
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Samwayfd:
So unzip the file, then select servicefile.xml and it'll take it from there?

Like this?

Thanks for the response!
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] gecko316:
Thank you, the above video worked

Only thing now is I get occasional ads below my text message notification when the screen is locked

Not sure if that's Amazon or Textra, but I upgraded to Textra pro, so no idea what it is or how it can be removed
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] jimberkas:
its definitely amazon. if you click it, it takes to to the amazon website. I have the same thing.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] gecko316:
Nothing happens when I click it

Is there a way to remove it?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
wipe data factory reset the device
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] jimberkas:
dumb question, im sure, but if i do this, will i lose my APN settings and such, or just my app data and personal data?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] gecko316:
thanks, that did it!
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] jimberkas:
how did you do the wipe data/factory rest?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] gecko316:
Settings, backup & reset, factory data reset
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] andrewmaixner:
Hopefully this question hasn't ben already covered, i tried to read and search through the thread:

Can a new/current Amazon-Ads version still be flashed with the stock OEM.img using the motorola tool, without an unlocked bootloader, as it could the first week or two?

(I have two phones done that way, but one went through the laundry, so the screen has waterspots and lost the backlight. It's cheeper and easier to get a new one and flash it if that still works, than to replace the full screen and battery. All I really care about is removing the ads/bloat. )

Thanks in advance!
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Samwayfd:
Yes, you can do that, I did it with the factory image that RootJunky has on his site.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] andrewmaixner:
Thanks! I presume that means future stock ROM updates will also be manually flashable this way, as far as we can tell?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Samwayfd:
I believe I read in another thread that he said as long as he gets them from Motorola he will update them.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
yes that is true :)
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] rodsayd:
Guys sorry for the question, I've read all the pages but I still have doubts. I have a Amazon Moto G4 with LOCKED bootloader but I'm planning to give it away. Is there any way to remove ads and keep OTA updates working? Because I don't want the other person to brick their devices if they get an OTA [MENTION=4246643]Tomsgt[/MENTION]
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
Nope that can't be done at this time.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] rodsayd:
Ok thanks. But I've read that we can flash some stock firmware (without ads), where can I find it? And it is safe? I think it's this one in your page: ATHENE_MPJ24.139-49_cid50_subsidy-DEFAULT_CFC.xml.zip Where can I find steps on how to flash it?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
Yes that is try but it will kill the ota updates. And look at my site there directions on it.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] patt2k:
Just got the amazon version for a friend. Did amazon lock the bootloaders? is it safe to update to newest version so security patches are newest and then attempt to remove ads, if bootloader is locked?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
Yes that is fine.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] patt2k:
Is there any update after the May security patches? I did the removal of ads before try to update the device.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] fajarlazuarding:
[MENTION=4246643]Tomsgt[/MENTION] hi, waiting for my devices in a day or so, just for preparation, what is the differences between yours and filefactory file ?

Yours (the one with 139.48) :

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

FileFactory :

http://www.filefactory.com/file/3t2...PJ24.139-48_cid50_subsidy-DEFAULT_CFC.xml.zip

Thanks for the help.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] primetime34:
I'm sorry for the ignorance (I've spent some time reading this thread and can't find an answer), but is it impossible to root the Amazon version of the G4 now that the bootloader can't be unlocked? Thanks!
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
That's right, the ad screen version from Amazon can't be rooted.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] fajarlazuarding:
Hi mate, i've read entire posts and decided your "path" to do with this device.

just to make sure, which ROM did you flash with locked bootloader ?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] lllGurulll:
Have there been any new updates from Moto for this phone that can be downloaded. I'm having an issue with my static bottom row of icons disappearing after about 3 days of up time then I have to reboot the phone to get them to show up again. Not sure what is going on to cause this.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
That sounds like more of a launcher problem. Have you tried another launcher or forced stopped the launcher in app settings? There have been two versions of the full firmware posted for some models.

Sent using XDA-Developers Mobile App
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Danny1976:
Motorola posts factory image for Moto G4, removes all the other ones

http://www.androidpolice.com/2016/09/02/motorola-posts-factory-image-moto-g4-removes-ones/

Firmware Link: https://motorola-global-portal.custhelp.com/app/standalone/bootloader/recovery-images#

ATHENE_AMZ_MPJ24.139-64_65_cid50_amz.tgz

https://mega.nz/#!V99VHAwR!VfH7Zg3a5_HJ1jHsR-TqHNEOva61vbkpWFM3ZJsmEqQ

Whats the difference between the Motorola Firmware MPJ24.139-64 and RootJunkie MPJ24.139-49 image version?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Danny1976:
I got the XT1625 with the Amazon Ads today and your method removed all the Ads and Bloat Ware. I can confirm its working on a locked bootloader.

I was concerned when I tried to remove the ads by unlocking the bootloader, but later found out on the Motorola site that this bootloader was unlockable. Thanks to you RootJunkie, I have an ad free phone. Cant thank you enough.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] eriklee95:
Yup, it's in fastboot mode
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Danny1976:
If I flash the stock google firmware, Can the bootloader be unlocked?

Edit: I can confirm, that once you flash the Stock Google Firmware the bootloader becomes unlocked.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Rafy186:
Excellent tutorial. Worked for me. Now if I can only get AMZ off my update channel I'll be happy. Feel as if Amazon can OTA new firmware installing all bloatware once again.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
awesome thanks for the report hopefully i will hear from a couple other users soon
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
that is a good question but if you flashed the entire firmware file i listed then the device should be 100% official motoorla and i thnk that AMZ in about phone is just left over and doesnt really do anything any more.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] objektive_1:
So we can flash stock firmware and have a stock XT1625?

I don't want to be tech support on this for my mom. :D:D:D:D
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] GaBuzz:
I can also confirm that you can flash both the bloat remover or full ROM image while on a locked bootloader, I flashed both and everything is working perfect, thanks
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
awesome thanks for reporting in on this i figured that was the case but hearing more and more reports is great thanks
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] madscientistdam:
Answer to fix no o.s

Dont panick i did the exact samething wiped my o.s but i followed this tutorial on youtube simply download the stock Moto G4 XT1625 firmware from the link provided above then follow this guys tutorial to install the stock firmware and i guarantee your phone will be up and running in no time https://www.youtube.com/watch?v=_yiKhnFP2O0
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] splat matt:
I'm getting mine tomorrow.

I won't do a remote connection - instead would you provide the steps to extract Amazon OEM IMG?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] brockwitting:
Thanks for the work! I like the de-bloat, but I actually wish it only removed the lockscreen. I liked most of the Amazon apps. I tried re-downloading them, but I swear even downloading the Underground store is different than the Amazon app that shipped with the phone. Could you make a lockscreen only remover? Also, once you flash this, what happens if you factory reset the phone? Do you get everything back?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] montesn:
I did the exact same thing yesterday. It appears that version of SuperSU isn't compatible. Download the TWRP stock backup from this site:

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

Once you restore that with TWRP, use the SuperSU .zip located on that same site to flash. I'm up and working on the same procedure.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
You can factory reset the device and the Amazon apps will still be gone they have been removed at the partition level. I am sure I could make a script that just removes the lock screen ads. But just not sure if I feel like it lol
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
Well thanks for the offer. I will either work on directions to pull the image or find someone that will let me remote in and grad it which is 10 times easier.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
I see you like my work ;)
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] montesn:
Yes, sorry, I wasn't sure who to credit for that one. I found it on a Google search. You quite literally saved me from owning a paperweight 2 hours after receiving it in the mail, so thank you!!
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] splat matt:
OK well I get it tomorrow - PM me on coordinating details and I will allow a remote connection.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
Cool please go ahead and unlock the bootloader first then let in boot up. After that dont touch anything and I will pull the Amazon OEM.img so that people can restore it if they really want too.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] brockwitting:
Ok, thanks Tomsgt! I should have helped you grab the Amazon OEM image first. :( Oh well, looks like Splat Matt will be grabbing it so I can flash that back if I want. Thanks everyone!
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tomsgt:
since is is marked as AMZ that means it should contain the AMZ OEM.img and people that want to return to the amazon ads and ota update path should be able to flash it and have there device fully working again.

NOTE: my guess is that this will also lock the device to AMZ only firmware flashes and the OEM.img that you flash to remove ads will not work anymore. but that needs to be tested to be sure.

yep I just downloaded the firmware and they have removed the oem.img and all the amazon bloat is now part of the system.img which basically locks it on the device unless you are bootloader unlocked and can remove it with root.

My thoughts don't use it and in the words of Admiral Ackbar "ITS A TRAP"

i found this to be interesting

IMPORTANT!

DO NOT USE THESE IMAGES/PACKAGES ON NON-DEVELOPER EDITION DEVICES OR ON DEVICES WITH A LOCKED BOOTLOADER.

Again this is Motorola's attempted to get those couple people that slipped under the radar and unlocked there amazon moto G4 bootloaders. This makes me wonder if the firmware is even signed by motorola properly. They should work just fine on devices with a locked bootloader if they are signed correctly.

Link to Motorola Amazon Firmware HERE
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Danny1976:
I don't plan to use it, but if I ever were to flash a firmware that locked bootloader. Couldn't I unlock the bootloader with the unique code I got emailed from Motorola?

Are there any improvements with this update?

---------- Post added at 01:47 PM ---------- Previous post was at 01:26 PM ----------

Tomsgt, Here is proof of what the firmware does to those who who were able to unlock the bootloader with the stock firmware.

http://xdaforums.com/showpost.php?p=68508920&postcount=9
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] acejavelin:
Yes, the code is unique to the device, not ROM or version. The same code will work again... Unless an update specifically changes it so you can't, but we have no way of knowing that.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] xtermmin:
People seem to be looking at this all wrong. The image that was posted on Moto's website is for the XT1624, the Indian Moto G4. In India, the Moto G4 series was only made available via Amazon.in, hence the AMZ in the file name. People with US variants (XT1625/XT1644) should not be flashing this on their devices in the first place.

(And as far as I know, even though the Indian model was only sold via Amazon.in, there was not any Amazon bloatware, hence why there is no oem.img)
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
It's not the same phone, but I probably flashed my Moto G3 over 75 times testing various roms, some stock some not, and I never came across an instance where a flash relocked the bootloader. I don't see how that would be even possible. Maybe Motorola could do it with some super duper secret code which I doubt because it would have leaked by now if it existed.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] gyannelis:
Did Amazon/Motorola change their agreement on unlocking bootloaders or something? I just got the amazon version of the XT1625. I was able to remove the amazon bloatware with the directions/video at the beginning of this thread (thank you btw) problem I have is if I try to unlock the boatloader I get a message from the motorla website that says "Your device does not qualify for bootloader unlocking". if I click on the link on that page to see if my model can be unlocked it says "Bootloader unlock codes are not available from Moto or Amazon for the Prime Exclusive Moto G (4th Gen.) devices."

Am I missing something???

Thank you in advanced!

George

****Edit it looks like they did change this, so is there any way to root this phone now?

Thanks
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
No, there is no way to unlock so it can't be rooted.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] gyannelis:
thanks man, well at least I removed the adds, I installed n launcher to give the phone the proper feel I wanted, I'm happy anyway! :)
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] ANDROIDRAZRM:
If I remove the Amazon ads via this script, will OTA update notifications still appear? I'd prefer that they don't appear at all so I can just upgrade the firmware manually without that annoying icon in the notification bar.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] HKSpeed:
My experience removing bloat on Amazon Moto G4

My experience doing this on an Amazon G4 (stock) with RSDlite on my Windows 10 machine (with anniversary update). I didn't try the non-RSDlite method since it was more complex.:

*First try: The first time I installed the remove-amazon-bloat.xml file nothing was removed. I still had lockscreen ads and all Amazon apps. The Consumer Cellular and Prip (2 of them) apps were installed.

**Second try: I installed the same XML file again and it removed lockscreen ads and Amazon Video app. I still have Amazon Underground, Amazon Photos, and Amazon Music. Although lockscreen ads were gone, I still had ads with my notifications.

***Third try: Notification ads gone, but 3 Amazon apps from 2nd try remain. I noticed I could uninstall the Amazon Offers and Amazon Widget apps, so I uninstalled them from Settings>Apps. Was I able to uninstall them because of this process or is it always an option? These apps show up on my Google Play apps list.

I'm happy with the final results since my goal was to remove the lockscreen and notification ads. I use the 3 Amazon apps, so I would've reinstalled them if removed.

How can I remove the Prip and Consumer Cellular ads? Since I cant root my Amazon G4, is my only option to disable them?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] xtermmin:
Try doing a factory reset now.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] HKSpeed:
Good idea. Can I clear cache/factory reset via the stock recovery? I don't see any option.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] yaconsult:
Don't the ads come back after a reboot?

In terms of bootloader unlocking, it's just like a carrier phone - no unlocking or working exploit.

On the Amazon Blu R1 HD, they have been trying to lock it down with the latest updates. But many of us reflashed the phone to the OEM version with SPFT.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] HKSpeed:
For me the ads don't come back after reboot. Strange the debloat file installs Consumer Cellular and PRIP apps. Even RootJunky's phone (on Youtube) has those apps. I'm still happy with the results. Thanks to RootJunky. :good:
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] mel2000:
Can someone straighten this out for me? Nothing on RootJunky's website seems to have changed regarding the download files, and his OP to this thread hasn't changed either. Is it still possible to revert the adware XT1625 to the Motorola OEM version by flashing the Moto XT1625 OEM firmware? I'm under the impression that that firmware supports an unlockable bootloader by default.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
You can flash the factory firmware to remove the adware. As long as it's a factory firmware the unlockable bootloader doesn't matter. It will still be on the Amazon update channel and I don't know if it will ever auto update. If it did I suspect it would go back to an Amazon ad phone. I hope that future factory firmware will continue is to be available for manual updating.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] natesc0tt:
G4 Play (XT1607)

Will this process work for the play edition (XT1607) to remove the Amazon Ads? I'm just catching up to all the talk about G4. Apparently NO bootloader unlock available. Thanks Amazon! This is the same problem I had with Verizon Moto E (XT1528). Here we have another Carrier-unlocked, bootloader-not-unlockable, almost-perfect, concept. Amazon is loosing cool points. :(
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] mel2000:
Thanks for your reply. It confirms what I read that the adware can be flashed over, which will leave the phone unlockable and rootable. Don't care about OTA as long as I can flash updated firmware.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] umrdyldo:
I am in the same boat as you. I have an XT1607 Moto G4 Play from Amazon and can't find the correct OEM image.

The one in this thread doesn't work. It gets 3/5ths of the way through the flash and then quits.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
No, it will only remove the ads. You will not be able to unlock and root because Amazon had unlocking blocked by Motorola. It's unknown whether it will ever be unlockable.

---------- Post added at 06:29 PM ---------- Previous post was at 06:27 PM ----------

You are unzipping the image before flashing it aren't you? You can't flash a factory image as a zip file.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] mel2000:
I'm not just interested in removing ads, I'm interested in completely overwriting the Amazon firmware with pure Moto G4 firmware. Why would the phone not have an unlockable bootloader after that flashing?
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] umrdyldo:
I tried the RSD lite version and it failed on the flash. I tried the bat file no RSD way. Yes I unzipped and ran from command like bat file.

I don't think this works on the XT1607.

I want to try flashing to flash a different model full image.

Do I have to unzip the 1.1GB stock image file and flash each piece individually or can I flash an XML.zip via RSD
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
Because the unlock is tied to a deeper level than flashing a bootloader will get you. There is no way around it, you'll never unlock until Amazon wants you to.

Sent using XDA-Developers Mobile App
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] mel2000:
I thought the bootloader config came with the firmware. I guess that settles it. Thanks.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] umrdyldo:
Still looking at the XT1607 G4 Play.

I found 3 images for this phone.

Stock amazon and

XT1607_HARPIA_RETUS_MPI24.241-2.35-1_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

XT1607_HARPIA_CCAWS_MPI24.241-2.35_cid50_subsidy-CCAWS_regulatory-DEFAULT_CFC.xml.zip

The problem I'm having is when I try to flash an oem.img from one of the other phones I get a validation check error and the phone fails.

Will the oem.img files from the other images not work on my phone or do i have to unlock the bootloader for that. Which we don't have an unlocked bootloader for the amazon XT1607
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] acejavelin:
oem.img would require an unlocked bootloader, this is why you will always be in the AMZ software channel no matter what you flash.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] umrdyldo:
So how does the trick in this thread work without an unlocked bootloader? Or am I mistaken and it doesn't? Because it seems like a lot of people were just flashing stock files and it was working.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] Tel864:
Flashing a factory bootloader will remove the ads but it won't change the update provider which is Amazon. The update channel is set at a deeper level than no one can change outside Motorola and that's also what makes it unlockable. It will work and look like any factory original G4 except for the update channel and unlocking.
[Moto G4 ROMs, Kernels, Recoveries, & Other Develop] ANDROIDRAZRM:
Bump.