yashsingh1/xdaforums huggingface dataset:
[Moto G 4G Android Development] mooms:
Dude, you are wrong two times:

1/ The flashable zips found here

don't

flash the modem....The problem was more likely because I

haven't

flashed the modem !

2/ Several owners of the XT1039 have successfully flashed the full 5.1 SpainROM (including modem), read the last pages in this thread..

ssirK's post quoted below is also the proof that we can flash an other ROM, as long as the cid is the same.

Thanks, but he OTA for the Eu is finally out, see here.

I will wait the availability of the full Eu ROM anyway, I prefer a clean flash.
[Moto G 4G Android Development] lost101:
I think it's already been established in the factory firmware images thread that you can safely flash another Model's radio firmware. It's certainly okay to do it with non-LTE Moto G.

I posted instructions earlier on how to only flash the radio firmware included with the factory firmware images:

http://xdaforums.com/showpost.php?p=61538427&postcount=13​

Maybe I've missed it, but MultiROM has not yet been ported to Peregrine. When that happens, these ROMs should work with it.
[Moto G 4G Android Development] J4mps:
that's what i was thought! good to know this rom supports it! thanks!
[Moto G 4G Android Development] lost101:
I'd appreciate it if someone can provide a few screenshots if any of the ROMs work for them. In particular, a shot of the contents of app drawer.
[Moto G 4G Android Development] wurstel:
did anyone try?
[Moto G 4G Android Development] lost101:
[MENTION=3412132]wurstel[/MENTION] - While this probably can be done, you are missing the point of the Optimized ROMs. Files that should be removed won't be.
[Moto G 4G Android Development] aveyer:
Perhaps this is the wrong thread for the issue, however I already did wipe everything, as well as flash stock via mfastboot so it's a totally clean install. Might be a bug with stock.
[Moto G 4G Android Development] lost101:
When flashing via fastboot, did you include the command: mfastboot erase userdata ?
[Moto G 4G Android Development] aveyer:
Yep, ran all the commands as listed in the stock firmware thread.
[Moto G 4G Android Development] lost101:
Sounds like a bug then.
[Moto G 4G Android Development] eruji:
Trying to flash the XT1045 US optimized and get: error executing updater binary in zip, i thought i had a bad download, redownloaded and the same, then tried the untouched and the same. Im unable to flash either. CM flashes fine. Was on stock 5.1 image OTA. using latest twrp from socom which is 2.8.7.0 . is this a recovery version issue?
[Moto G 4G Android Development] lost101:
Please see post #2 - Bugs: When flashing, I get the following: "E:Error executing updater binary in zip"?
[Moto G 4G Android Development] eruji:
damnt, sorry. i did actually search the thread, specifically for "error executing" and it didnt have any results. I will restart recovery and try again, i did however format userdata though.
[Moto G 4G Android Development] bedalus:
[MENTION=1006674]lost101[/MENTION]

Do you have the time to put together a stock optimised 5.1 for 1039 GB?
[Moto G 4G Android Development] lost101:
I'll do it if there is justification for it, for example XT1039 Retail EU doesn't support all 4G Bands used in GB.
[Moto G 4G Android Development] vences31:
Update for xt1040 ?
[Moto G 4G Android Development] lost101:
It will be uploaded shortly.
[Moto G 4G Android Development] lost101:
All Optimized ROMs have now been updated.

Changelog:

Tweaked: Low Memory Killer (LMK) made less agressive

Restored: Many of the system files are now the versions included in the Firmware Image

Removed: DM Service

Removed: OMA Provisioning​

Notes:

When reporting issues, please state Model number and ROM.​
[Moto G 4G Android Development] mike102871:
Forgive me if this has been asked. But why do we get the screen flicker on the xt1045.
[Moto G 4G Android Development] lost101:
On Moto G Falcon, it's because the Phone has KitKat Bootloader. Turn screen off once to fix until next reboot. I've been doing so since January - no harm is caused. Simply upgrade Bootloader to permantely fix.

Bootloader Upgrade Utility: http://xdaforums.com/moto-g/development/falcon-bootloader-upgrader-tool-t3093793
[Moto G 4G Android Development] mike102871:
Ugh. Flashed the untouched zip on my xt1045. WiFi will not turn on and imei is unknown. Ugh where to start first. This is my back up phone as I regularly use a nexus 6. Least this isn't a critical thing.
[Moto G 4G Android Development] lost101:
Flash the XT1045 Retail US 5.1 Radio Firmware from post #1 by following the instructions in post #2.
[Moto G 4G Android Development] mike102871:
Ugh this is giving me so much trouble. I e given up for tonight. My nexus seems much easier. Why can't radio and boot loader be twrp flashable?
[Moto G 4G Android Development] cpvm:
Yeah with the nexus is really really easy to flash and its almost impossible to brick a nexus.

Sent from my Moto G LTE.
[Moto G 4G Android Development] lost101:
Apologies. I've been caution about creating custom recovery flashable zips of the Radio Firmware as I did not want to damage anyone's phone.

Could you try this recovery flashable zip: http://xdaforums.com/devdb/project/dl/?id=13667
[Moto G 4G Android Development] tc2k:
Used the updated 5.1 Optimised EU on an Australian XT1039 model (uses eu roms) and it worked fine so far.

Updated from a stock 4.4 rooted rom (cannot remember which, sorry)

No errors at all so far.

1) updated my TWRP to 2.8.7.0 from Socomm's post

2) wiped data/cache (twrp factory reset)

3) installed rom using TWRP

4) rebooted to bootloader

5) used mfastboot to install new radio (5.1 eu)

6) booted normally

Have not installed much except the apps i use, a few root things, everything has worked all day. Had some screen flicker on first boot, have not seen it since. Will wait a while and see if i need to update the bootloader.

Thanks, it seems good so far, will return if i have any issues.
[Moto G 4G Android Development] real_complex:
XT1040 radio doesn't work.

Hey!

I just flashed the newest optimized ROM (in OP), Brazil retail version, for the XT1040 from recovery, and it works really well. I also flashed the radio firmware for XT1040 using mfastboot (following instruction in OP FAQ), but the radio doesn't work... Wifi and GPS work, and the SIM card is recognized. In Settings/About Phone/Status/SIM Status/, the phone number is correctly displayed, but the network is "unknown" and the Service Status is Off/Off.

Rebooting a couple of time doesn't help, nor does removing the SIM card and inserting it again. In fact, it seems that the SIM card is not recognized after removal / insertion until next reboot.

Any ideas? Could it be that the problem is because I actually have a Canadian carrier, not Brazilian? (The Brazilian ROM version is the only one available for the XT1040.)

Thank in advance.
[Moto G 4G Android Development] lost101:
Try this custom recovery flashable zip for the XT1040 Retail Canada Radio: http://xdaforums.com/devdb/project/dl/?id=13669
[Moto G 4G Android Development] real_complex:
Do I just run: "mfastboot flash modem NON-HLOS.bin" since that's the only relevant file in the .zip?

Thanks for the quick help!
[Moto G 4G Android Development] lost101:
No, you flash this in TWRP.
[Moto G 4G Android Development] real_complex:
Hmmm, looks like that doesn't work. The result is exactly the same as before. Anything else I can try?
[Moto G 4G Android Development] lost101:
It's probably because fsg.mbn is also required.

Try flashing both files in this zip via fastboot: http://xdaforums.com/devdb/project/dl/?id=13670
[Moto G 4G Android Development] real_complex:
Aaahh, you have downloads for everything, you're a hero! It works now, thank you so much for the help. Made my day :D
[Moto G 4G Android Development] lost101:
XT1040 Retail Canada 5.1 ROM (Untouched) is now available.

Note:

This is the first attempt at fixing DM Service / OMA Provisioning script issue - feedback appreciated.​
[Moto G 4G Android Development] lost101:
XT1040 Retail Canada 5.1 ROM (Optimized) v1.0 is now available.

Note:

This XT1040 ROM contains two extra system apps not present in the Retail Brazil ROM:

system/priv-app/AttCbsLoader

system/priv-app/InvisibleNet​

I expect one or both are AWS related and not necessary, but if someone wants to try deleting them and observe the effect.​
[Moto G 4G Android Development] Sparubens:
Hey lost101, I'm sorry to ask but what did you mean with ''system files restored''? Did you delete Moto's system files and replace them with other files? What files are exactly changed in comparison with the untouched ROM?

Are there still any issues/FC's or is it safe to flash? And also: "more ram available'' : isn't free ram wasted ram? I read somewhere that RAM is there to be used and not to be left free.

Sorry for the annoying questions haha, just want to be sure before I flash. Also: how can I unlock advanced camera settings in stock camera (ladybug icon)?

Thanks in advance mate :)
[Moto G 4G Android Development] lost101:
The ROMs are based on Factory Firmware Images, and sometimes I will update the version of certain system apps such as Google Play Services, Webview and Google Play Store. For now, I'm not updating the apps until the ROMs prove to work without issue. Sometimes updating these apps can make the ROM unstable.

Compared to the Untouched ROMs, the Optimized ROMs are debloated - most Google apps have been removed - but are still available in Play Store. Also Motorola Assist and other Motorola apps / services have been removed - but again are available in Play Store. The OP covers the main features of the Optimized ROMs - do a Google search on any you don't understand.

Regarding the statement "more ram available'': there are simply less apps and services pre-installed and running in the background. Also because of the ZIpaligning, pre and post-install - you can run more apps because RAM is being used more efficiently.

Modified Motorola Camera app with advanced settings:

[Mod][How to][Updated Camera 3.3.20.8]Unlock Advanced Camera Settings | Non-Root/Root​
[Moto G 4G Android Development] coltonbauman:
So, to be clear, If I flash the xt1040 onto my phone, it'll wipe whatever I had on it previously, correct?
[Moto G 4G Android Development] lost101:
To get the benefits, you have to wipe clean.
[Moto G 4G Android Development] coltonbauman:
So to be clear, I wipe it all, install the rom, then fastboot the radio firmware, and I should be good to go?
[Moto G 4G Android Development] lost101:
Yes. Factory reset in TWRP, and if possible format /data - note that you should backup anything important to SDCARD and remove it. The Lollipop Bootloader does not appear to be a requirement.
[Moto G 4G Android Development] Sparubens:
Thanks for the response, really helpful. Will give it a try!
[Moto G 4G Android Development] coltonbauman:
EDIT: I figured out how to start, but right off the bat with mfastboot i get the error saying cannot load NON-HLOS.bin: No error. On my phone it says cmd: getvar:max-sparse-size. Anyone have any ideas.
[Moto G 4G Android Development] lost101:
Is mfastboot.exe in the same folder as NON-HOLS.bin and fsg.mbn?
[Moto G 4G Android Development] coltonbauman:
Yes it is. I have it all in c:\android\sdk\platform-tools

Another thing, running lollipop, even without these radios, I have lines running through the screen. Like a wave that runs from the bottom to the top of the screen, and it'll flash and jitter. Anyone else have this issue?
[Moto G 4G Android Development] lost101:
Copy and paste what results you get from when using those mfastboot commands. The wave is common, and is due to not having the Lollipop Bootloader. Turn screen off once to fix.
[Moto G 4G Android Development] coltonbauman:
I've reverted back because I need my phone in about 45 minutes. The mfastboot result just said target max-sparse-size: 256MB, cannot load 'NON-HLOS.bin: No Error. Is there not enough room in that area to add the firmware?
[Moto G 4G Android Development] lost101:
Does your phone have a 5" screen? I suspect you might have a Moto G LTE (2nd Gen)
[Moto G 4G Android Development] coltonbauman:
I have the moto g lte xt1040 from FIDO in canada. It's the 4.5" screen one.
[Moto G 4G Android Development] lost101:
Ok, I've attached a zip with different versions of fastboot to try.
[Moto G 4G Android Development] coltonbauman:
So to use these, my commands are just things like fastboot flash, mfastboot flash, fastboot-moto-windows flash. Sorry but I"m a totally noob to this stuff lol.

This is exactly what I get each time I try the command:

On my phone it reads "cmd: getvar:max-sparse-size"
[Moto G 4G Android Development] bb709394:
I have a few questions:

1) Your bootloader is unlocked?

2) Which version of TWRP are you using? The last successful one I used was 2.8.3 (there is a special peregrine version) and I have not bothered upgrading this version

3) Did you run the sdk manager to ensure you have the latest drivers (including fastboot, etc.)?

4) You were running stock Kitkat and didn't modify the kernel, running Xposed module, etc?

5) Did you root Kitkat?
[Moto G 4G Android Development] lost101:
No offense intended here but only points (1) and (3) play any possible role. Technically, Bootloader can be locked - as that is the environment of how fastboot images are intended to be flashed - by engineers prior to handsets being sold.

[MENTION=5186731]coltonbauman[/MENTION] - to keep things simple - create a new folder with only mfastboot.exe, NON-HLOS.bin and fsg.mbn.

mfastboot devices

mfastboot flash modem NON-HLOS.bin

mfastboot erase modemst1

mfastboot erase modemst2

mfastboot flash fsg fsg.mbn​

Post a log of each command being done manually.

EDIT: Run CMD as ADMINISTRATOR
[Moto G 4G Android Development] Aarondk1:
So I've flashed this rom and everything is working except I dont have 4G/3G.

My wifi works, I can call and receive text messages but no data connection works. There's an exclamation mark by the signal.

I did the mfastboot commands, I think I have the latest bootlader (used the BUT.exe).

Other people in the house have the same provider and their data connection is working. Now with other ROMs I had issues in the past my phone might be faulty.

Any ideas?
[Moto G 4G Android Development] lost101:
Settings > Data usage > Cellular data > Enable​
[Moto G 4G Android Development] Aarondk1:
Yeah checked that the first time :/ It's enabled.

Restarted multiple times, put it in aeroplane mode no differnence.
[Moto G 4G Android Development] lost101:
With Fastboot; it's very easy to think flashing was completely successful - when in reality it didn't work at all. I'd like to see a log of your doing the commands.
[Moto G 4G Android Development] Aarondk1:
C:\Users\Aaron>fastboot devices

TA98601NQK fastboot

C:\Users\Aaron>mfastboot flash modem NON-HLOS.bin

target max-sparse-size: 256MB

error: cannot load 'NON-HLOS.bin': No error

C:\Users\Aaron>mfastboot flash modem c:\NON-HLOS.bin

target max-sparse-size: 256MB

sending 'modem' (60232 KB)...

OKAY [ 1.911s]

writing 'modem'...

OKAY [ 1.588s]

finished. total time: 3.501s

C:\Users\Aaron>mfastboot erase modemst1

erasing 'modemst1'...

OKAY [ 0.023s]

finished. total time: 0.023s

C:\Users\Aaron>mfastboot erase modemst2

erasing 'modemst2'...

OKAY [ 0.023s]

finished. total time: 0.024s

C:\Users\Aaron>mfastboot flash fsg fsg.mbn

target max-sparse-size: 256MB

error: cannot load 'fsg.mbn': No error

C:\Users\Aaron>mfastboot flash fsg c:\fsg.mbn

target max-sparse-size: 256MB

sending 'fsg' (517 KB)...

OKAY [ 0.072s]

writing 'fsg'...

OKAY [ 5.657s]

finished. total time: 5.731s

C:\Users\Aaron>

I have to specify the path to the files because otherwise he doesnt find the files.
[Moto G 4G Android Development] lost101:
[MENTION=6847241]Aarondk1[/MENTION] - What Model / Country is your phone and what Radio Firmware are you flashing?
[Moto G 4G Android Development] Aarondk1:
It is the XT1039/ Belgium Moto G 4G 4,5inch screen.

And im flashing the XT1039_Retail_EU_5.1_Radio
[Moto G 4G Android Development] lost101:
[MENTION=6847241]Aarondk1[/MENTION] - On the fastboot screen on phone, is version number: 41.1A?
[Moto G 4G Android Development] Aarondk1:
It does.

Should I reflash?
[Moto G 4G Android Development] lost101:
No. I have seem this problem before. When installing the ROM, did you factory reset in TWRP? Did you format /data?
[Moto G 4G Android Development] Aarondk1:
I use CWM (old habit), but i did do that yes.

Thx for the help already btw!
[Moto G 4G Android Development] EpiccSkillZz:
can i dirty flash this build over the old one? (v1.0 eu xt1039)
[Moto G 4G Android Development] lost101:
Because there are so many possible reasons, it's best to make sure the ROM has actually flashed correctly. I have seen instances where CWM has not done so. Latest versions of TWRP is here: http://xdaforums.com/moto-g/4g-development/collection-somcom3xs-experimental-corner-t2996266
[Moto G 4G Android Development] lost101:
No. Files supposed to have been removed won't be, because they will remain from your previous install.
[Moto G 4G Android Development] RLNTLSS:
[MENTION=1006674]lost101[/MENTION] Look at the radio link of xt1039 Brazil , this is radio?

I looked for another model had only 30 MB , this has 300 MB
[Moto G 4G Android Development] AndreiSant:
yes, i already tested :)
[Moto G 4G Android Development] bloodviper:
Lost recovery

After trying the optimized for XT1039 EU variant, I thought there was an issue with the Bluetooth, I went for the Stock variant.

Through flashing the stock, I forgot to wipe caches, booted up to receive an error, that I now forget the exact name of (DM___ something missing).

I wanted to reboot to Recovery to flash SuperSU, only to find that after accessing Recovery through bootloader, no Recovery is evident. I see an Android logo with the words "No Command" displayed.

I've been searching for over an hour to find similar faults, but find nothing.

Have you had this before? Can anyone advise on how I can reinstall a recovery.
[Moto G 4G Android Development] lost101:
Apologies. Link fixed now.
[Moto G 4G Android Development] lost101:
Please explain more clearly which ROMs you have flashed.
[Moto G 4G Android Development] bloodviper:
Retail EU 5.1 ROM (Untouched) (532mb)
[Moto G 4G Android Development] lost101:
The ROM includes a file that can restore the Stock Recovery - which it has done in this case. Simply reflash a custom recovery via fastboot.

DM Service and OMA Provisioning is a known issue and has been discussed in previous posts. I recommend flashing the ROM with the latest version of TWRP from the link below and reporting back if you still have Bluetooth issues.

http://xdaforums.com/moto-g/4g-development/collection-somcom3xs-experimental-corner-t2996266​

EDIT: DM Service | OMA Provisioning Fix (Flash in custom Recovery)
[Moto G 4G Android Development] XEpiccSkillzz:
Can I flash this over then without wiping /data? Just wiping cache and systems?
[Moto G 4G Android Development] lost101:
Yes.
[Moto G 4G Android Development] EpiccSkillZz:
Thanks man it worked.. :p first install had the same error .. after reboot of the recovery was fine and i was on my way :)
[Moto G 4G Android Development] bloodviper:
Ok, sorted that, thanks for the guidance. Flashed the DMService fix too.

I am still having the bluetooth issues though..
[Moto G 4G Android Development] lost101:
Explain exactly what is happening with Bluetooth?
[Moto G 4G Android Development] polytek:
Flashed untouched ROM and radios last night. XT1040 Canadian retail by Fido(Rogers)

Motorola Boot Services claims incompatible for me as well.

Flashed with CMW

did not wipe /data

device was rooted and has lost root now (gonna have to fix that, but not sure how yet)

has flicker/scan line issue on boot-up until screen toggled off/on

System version 23.21.35.peregrine_retca.retca.enCA rcica

Build number LPB23.13-35

Fastboot is 41.13
[Moto G 4G Android Development] rcrobot:
I can't seem to extract the XT1045 untouched zip. Any ideas?
[Moto G 4G Android Development] lost101:
There are multiple factors other than the ROM itself that could create such a problem.

Did you experience DM Service / OMA Provisioning FC during first boot?

The custom recovery you are using may not be flashing ROM correctly.

Not having the Lollipop Bootloader may be causing issues.

Not formating /data prior to flashing may be another consideration.

Bad download or it might be the archive manager you are using. If you are only flashing the ROM, there is no need to extract - flash it via custom Recovery.
[Moto G 4G Android Development] mrjamesbond:
Please Help

Please help Ive updated to Lolipop from this thread and am now faced with the issue of getting the phone into fastboot mode and flashing the radio settings. To enable sim and wifi activity. I have been tearing my hair out trying to get the phone to pair with the computer to try to flash the required commands files can someone please explain how to do this

I have cwm 6.0.4.8 installed on the phone as I previously had a varient of the 12.5 cynagenmod installed, Am in a state of total confusion.on how to get the lolipop radio firmware installed.

I cant get sdk tools to find my phone so am having trouble issuing the required fastboot commands please help
[Moto G 4G Android Development] lost101:
I've updated instructions in post #2 FAQ:

How do I update to the Lollipop Radio Firmware?

Update your current Radio Firmware by downloading and extracting the correct file from OP, and using the following mFastboot commands: (Simply put all files together in same folder - SDK not required) (USB Drivers (Windows))

mfastboot flash modem NON-HLOS.bin

mfastboot erase modemst1

mfastboot erase modemst2

mfastboot flash fsg fsg.mbn​

Related: Minimal ADB and Fastboot​
[Moto G 4G Android Development] mrjamesbond:
Help Please

Hi could you please guide me through this have downloaded my radio firmware & have it in a folder on my desktop extracted. I have also downloaded and installed minimal ADB & Fastboot.

Im unsure how to get the phone to respond to the commands etc please help
[Moto G 4G Android Development] lost101:
Are you using Windows? If so, have you installed the drivers?

Phone must be on Fastboot screen - Power on with vol down.

The test command is: mfastboot devices

EDIT: Run mfastboot in command prompt as an Administrator.
[Moto G 4G Android Development] mrjamesbond:
Help

Hi Im now seeing the device thanks on the fastboot screen I input mfastboot flash modem NON-HLOS.bin and it comes up with cannot load NON-HLOS.bin ive tried step 2 it seems to do as asked and step 3 however step 4 is similiar to step 1 cannot load fsg.mbn I think i have the correct drivers installed unsure where i am erring

Thanks for the help
[Moto G 4G Android Development] lost101:
[MENTION=6210112]mrjamesbond[/MENTION] - Are you opening CMD as Administrator?
[Moto G 4G Android Development] mrjamesbond:
yes I think so running Minimal ADB and Fastboot from the start menu right clicking and running as administrator

typed fatboot to take up fastboot prompt checked my device is present then tried to install the file I have on my phone

fastboot flash modem NON-HLOS.bin with the following response error cannot load NON-HLOS.bin
[Moto G 4G Android Development] lost101:
mfastboot.exe should be in the same folder as NON-HLOS.bin and fsg.mbn

You then have to navigate

within

command prompt to that folder. For example: cd c:/radio_files
[Moto G 4G Android Development] mrjamesbond:
Sorry I am totally confused, ive put these files within a folder on my desktop

fsg.mbn , mfastboot NON-HLOS, now what am I supposed to do to enable my phone to work. Ive had the files sitting on my phone and was having the problems we have previously discussed, im in a state of confusion? I take it ive got to use fastboot to do something to them but im at a loss how to do this. Sorry im having trouble grasping this