yashsingh1/xdaforums huggingface dataset:
[X 2014 Android Development] mikeoswego:
Currently I'm running the ROM in this thread. I've run CM 12.1 extensively and like it but have had occassional spontaneous reboots and occasional inability to have the dialer come up and have to reboot to make a call; this is not to condemn the CM rom and maybe it is my device, combination of apps, etc. But, those things never happen on the stock based rom and this is my daily driver.

I've not tried cm13 yet in part because I haven't been able to get my own copy to build. (I know now why this is and the fix has to do with security settings.) There is a new article on XDA: Marshmallow Is What Lollipop Should Have Been, but XDA Made Lollipop Better and right now, Marshmallow doesn't really offer anything that I don't already have aside from the cool factor of running the latest.

I wouldn't have expected any problem with data from running CM13 and then going back to stock or CM12.1 I presume you did the Stagefright patch update. You could try running these fastboot commands to see if things clear up:

fastboot erase modemst1
fastboot erase modemst2
fastboot erase DDR

If you're not sure about having the Stagefright patched modem files you can follow the instructions here: post 895.
[X 2014 Android Development] RyanBRZ:
Thanks. Same here pretty much, I'm back on your 5.1 now and it does everything I need. I do like the occasional change in rom though so I thought I'd make the transition to 6. I tried flashing all that stuff in the stage freight folder and it wouldn't even boot..i get stuck on the first Motorola logo. I think this might be because I flashed it after I already flashed cm13/gapps? Idk.

I hope someone gets 6.0 working good on the moto x 2014
[X 2014 Android Development] mikeoswego:
I'm sure that we will have 6.0 at some point. I had a small contribution to CM11 on the first gen MotoX and will play with cm13 more when the really smart guys get things more smoothed out.

Do you mean you had cm13 installed and then flashed those files including boot.img? If so, that was the problem, cm13 uses a different boot.img which is included in the installer zip files. I thought you had reverted to this rom. If your phone still won't boot, you can use the steps here: post 885.
[X 2014 Android Development] RyanBRZ:
Yes, what I did is unlocked with sunshine, installed twrp, then backed up your rom and flashed cm13/gapps. All was fine except no mobile data in cm13. So I tried flashing that stuff hoping it would help but I ended up getting stuck. I restored my backup and my phone works, but I get no 4g lte, only 3g. Any ideas for how to fix this?
[X 2014 Android Development] mikeoswego:
Ok, so the phone works but only on 3g and you did the fastboot erase modemst1 and modemst2.

I don't have much else to offer. You could go into Settings->More (under Wireless & networks)->Cellular network settings and try toggling the Preferred network type. The default is Global but you could try LTE/CDMA and then reboot.

Another possibility is that Verizon is coincidentally having a problem right now in your area.
[X 2014 Android Development] RyanBRZ:
Tried that stuff already. I wonder what governs my phone getting 4G, I would think modem but what do I know.
[X 2014 Android Development] GatorsUF:
Not sure the cause but my phone send to turn off suddenly once it gets around 15-20%. It seems to occur frequently and it should have some battery left.

Thoughts?
[X 2014 Android Development] RyanBRZ:
I noticed this as well, very annoying.

Does anyone know if a 100% back to stock rom exists for this phone? I remember back in my galaxy s3 days there was a rom that could be flashed using odin to go back to stock completely. I'm trying to get 4g service back.
[X 2014 Android Development] mikeoswego:
The full FXZ file for the current stock Moto rom has never been leaked so that route isn't available. However, in post 885 that I linked earlier are instructions for how to get your phone to stock (aside from recovery, and if you want that it was mentioned just above what I'm quoting below) with the Stagefright patch, this is identical to using a factory FXZ:

I don't have anything helpful on the phone shutdown with 15-20% battery. I don't think I've ever gotten below 40% on this phone since I'm rarely far from power.
[X 2014 Android Development] RyanBRZ:
Thank you.. Will that wipe everything on my phone (pics, download, etc)? Going to try this later.. And this will not affect my unlocked bootloader I assume
[X 2014 Android Development] mikeoswego:
Those steps will not wipe /data /sdcard (where pics, etc. are stored) or affect the bootloader.

I've thought about this a bit more.. You made a TWRP backup of your phone before you installed the CM13 rom. TWRP defaults to backing up Boot, System, and Data and you can also select EFS. After running CM13 and having problems, you should have been able to use TWRP to restore your backup with everything selected and that should have put you back to where you were before doing anything. I do this regularly when switching between CM12.1 and the stock rom. If you select EFS when doing the backup, you'll actually have 2 different EFS backups (one is probably the modems partition with the other being /persist or its equivalent. I wouldn't normally restore the EFS partitions, but would as a last resort.

If you did the full restore and that didn't fix things. I would first try wiping Data in TWRP. Then reboot and see if you get 4G; if yes, then something got messed up there and you just need to set your phone up again. If still no 4G then go ahead and do the restore back to stock.

If something about the full stock rom fixes things, that will be a good data point and you should be able to then restore your TWRP backup if you want and not need to setup your phone again, re-download all the apps, etc.
[X 2014 Android Development] redwings73:
Same here.
[X 2014 Android Development] mikeoswego:
One other thing as I was reminded in another thread. Use TWRP to wipe /cache and /dalvik-cache and reboot to see if that fixes anything before going through the flash to stock.
[X 2014 Android Development] RyanBRZ:
Trust me I've tried everything I could think of. I've been flashing modded roms for years now and my brother builds his own so between the two of us none of our ideas have been able to resolve this.

I just saw that you responded in the CM13 thread. I just downloaded that one that you linked and also downloaded delta gapps. Have you tried this combo yet?
[X 2014 Android Development] mikeoswego:
Have you guys tried wiping /cache in TWRP or "fastboot erase cache"?

I did have a similar problem with my RAZR a couple years ago and it was the battery. When I took it out to install the replacement, it was a swollen, almost oozing mess. I realized afterward that the back cover on the phone had bulged out which would have been another sign of the problem. I hope we all don't have crappy batteries that only last a year!
[X 2014 Android Development] mikeoswego:
I just installed and tested this combo. When I installed the rom and then restored my cm12.1 data partition (to simulate an upgrade), it never got beyond the boot animation. So, I wiped /data and rebooted. The phone booted up fine and I was able to complete setup.

Google correctly restored contacts & calendar but did not prompt to restore apps and app settings.

The status bar showed an R instead of 4G or LTE but I did have an LTE connection judging by Speedtest showing 5 ms ping, 18 MB/s download and 8 MB/s upload speeds.

I was able to set a PIN but the phone continued to think it was set to swipe, it would ask for the pin when I tried to change the lock method and then settings would FC. After a reboot, it was still on swipe for the lock.

I made a call with no problem. Call recording was not available as it is supposed to be (and is in cm12.1)

I didn't try tethering or bluetooth.

Ascending ringtone volume didn't work although the settings for it were active.

Many things did work and this will be a nice rom in a few more weeks.

I like being cutting edge but at this point cm13 is bleeding edge (and not claimed to be otherwise.)

I've restored my backup without problems, 4G still works, etc.
[X 2014 Android Development] redwings73:
I do wipe the cache often. I have not really investigated the problem deeper, because, like you, I rarely let the battery fall below 50 or 40%. When I do so, the phone will turn off around 15%.
[X 2014 Android Development] drewski_1:
oddly, Exchange2 somehow disappeared from my phone yesterday. was working fine since i did the Stagefright update . . . reflashed and it's working AOK again . . . :confused:
[X 2014 Android Development] mikeoswego:
I ran my battery down to 3% while on CM12.1 charged a bit, and then down to 8% on the stock based rom. With both of them a warning appeared at 15% asking if I wanted to enable Battery Saver. The phone kept running so I'm not seeing the same problem reported by others.
[X 2014 Android Development] Haxxa:
So I am seeing terrible battery life on CM13 with random wakelocks etc. - really unusable (lasts 3-4 hours on fresh install - phone constantly hot). With the Brazilian release of Marshmallow do you think its possible to install the Rom with radio working or any other alternative to CM13 running 6.0?
[X 2014 Android Development] mikeoswego:
Invisiblek, one of the CM maintainers for the Victara (Dan Pasanen in the CM changelogs) and probably an XT1096 owner since he is on Verizon, has been uploading unofficial nightlies. I installed his 11/13 build with Open Gapps (they are somewhat based on TK GApps, same config file layout, also Aroma available.) It worked good enough that I backed it up to continue playing with it, one of the problems I found with that build (an FC in settings) should be fixed in the 11/14 build he's posted according to the changelogs. I didn't get around to running Antutu but one thing I noticed was that fling scrolling was noticeably faster. Bluetooth and tether worked fine. The message about factory resetting the device when rebooting is gone. I couldn't find how to enable the right side pull down for the QS tiles but didn't try holding down the settings gear for 5 seconds to get into the UI tuner. SElinux enforcing is now enabled unlike the earlier builds where it was disabled if you care about such things. Invisiblek follows and sometimes posts in this XDA thread: [ROM] [5.1.x] Official CM-12.1 nightly releases

Invisiblek's builds: http://www.invisiblek.org/roms/cm-13.0/victara

Open GApps: http://opengapps.org
[X 2014 Android Development] Aroch925:
Just out of curiosity, where do you find the changelogs?
[X 2014 Android Development] mikeoswego:
They're here: http://www.cmxlog.com/13

Since there are no nightlies yet, these are the changes for all the versions of CM13 not just the ones relevant to the Victara version.
[X 2014 Android Development] redwings73:
I (finally) flashed the newest 5.1 image and I have let the battery drain below 5% a few times, so whatever issue there was before seems to be fixed....

On a side note, I now have frequent screen freezes and reboots....anyone else having these issues? I feel like it could be an app, but I haven't determined if that's true or which app....I haven't installed anything different since moving to the newest 5.1 image.
[X 2014 Android Development] donslade:
I've have using xt1096-5.1-23.32-25-5_4 since I set up my phone a few weeks ago. No issues, no FC's, no reboots, runs very stable and great battery life.
[X 2014 Android Development] drewski_1:
grab the "/proc/last_kmsg"

it should have detail on what was going on when the phone rebooted
[X 2014 Android Development] mikeoswego:
Presuming you also flashed the modems zip firmware along with the image, the update to the Stagefright patched image shouldn't have broken anything, it wasn't really that major of a change.

Like drewski_1 says, the /proc/last_kmsg might give some clues as to what app or process is failing.
[X 2014 Android Development] redwings73:
Will do....It hasn't happened yet today, but I'll grab that file if/when it does. I assume I should grab it after a screen freeze or random reboot, correct?
[X 2014 Android Development] mikeoswego:
Right. From a code.google.com page:

Or use your root file explorer to get the file.
[X 2014 Android Development] jeremy702:
I'm seeing the same problem. I went from a MoFo image to a BL unlocked reisntall per the instructions, wiped cache and devlik and now around 15-20% the phone just turns off, no low power warning or anything else. And once power gets applied and the phone is back on, the power is already at 10-15%

I've attached a screen show showing the power drop and then the quick recovery.

Screenshot
[X 2014 Android Development] redwings73:
Alright guys, the random reboots have happened a number of times since I've posted.... I finally grabbed the last_kmsg using terminal emulator. URL Attached. https://drive.google.com/file/d/0B2Q-2XIJotzMTXg2dEtlMEhKYWs/view?usp=docslist_api
[X 2014 Android Development] mikeoswego:
My knowledge of these kmsg files is not complete but I can tell you a few things about the one you've posted. First, this kmsg is the one for the boot following the first boot after the random reboot.

In the kmsg file the numbers in the first column surrounded by [ ] are the time stamps in seconds since boot of the logged events. The log you've posted starts at 3.2 seconds into the boot and all those entries up to around 3.7 are fsck (like chkdsk in windows) fixing the file system system after a sudden reboot leaving files open, etc.

At 538 the power key was pressed for 0.15 seconds. At 540 it was pressed for 0.2 seconds. At 541 the log shows it was pressed but no release log entry possibly meaning the power menu was displayed.

At 543 the phone restarted presumably from selecting reboot on the power menu.

All the lines at the end without the [ ] are the beginning of the next boot.

It looks like something happened and your phone rebooted leaving the file system dirty. The phone rebooted, cleaned the file system and then you rebooted the phone. Then when it came back up, you collected the last_kmsg file which unfortunately is showing us the record of the clean up rather than the record of the events leading up to the spontaneous reboot.

The last_kmsg file that we need to see would have been the one captured before the phone was rebooted manually.
[X 2014 Android Development] redwings73:
Hmmm. Both of the reboots from this morning are random .... This is from the second random reboot. I did not manual reboot...

I had the phone in my hand when it happened both times....the power menu did not come up prior to reboot either time. I was trying to capture the first random reboot last_kmsg.txt when it happened for a second time.

I'm lost as to what is going on here!

Thanks for looking it over though.
[X 2014 Android Development] RyanBRZ:
I'm sure this has been covered at some point in this thread, but I do not want to dig through 95 pages. How do I get xposted back after unlocking with Sunshine? Can I install the framework directly with TWRP? I tried this and it failed. I would assume I should no longer need to install a pre-xposed ROM to make this work.
[X 2014 Android Development] drewski_1:
Should be able to flash in TWRP. I have v74 installed & working

How did it fail? What version and error messages?

Might be better with in Xposed thread.
[X 2014 Android Development] mikeoswego:
The ROM in post 781 already has Xposed in it. I've flashed the latest, v78 via TWRP with no problems. Make sure you get the correct version which is this one: xposed-v78-sdk22-arm.zip
[X 2014 Android Development] RyanBRZ:
Thanks, I was trying to install the wrong version
[X 2014 Android Development] redwings73:
The random reboots have happened a few more times since I posted this, but a last_kmsg has not been generated in any instance.... Any ideas?
[X 2014 Android Development] mikeoswego:
If you look in /proc, you should see a file named kmsg, this is the current kernel log file which only grows to a certain size and older entries are dumped as new entries are added at the end. On boot-up, I the existing kmsg is copied/moved to last_kmsg. There should always be a last_kmsg file. In the last_kmsg that you posted previously, there was a lot of file system checking/repairing going on, it is possible that the last_kmsg wouldn't be created if there was sufficient file system corruption.

Some clues might be found if the log file can be captured. Since that also resets on reboot, it will take some steps to capture.

One way would be to use the free Catlog app from the Playstore. It has a function where you can record the system log to a file on your sdcard/internal storage. The potential problem here is that the app might not write the file out to the very end depending on how/why the phone is rebooting.

Another way to collect that log would be to capture it to a file on your PC. From a command window you would enter

adb devices
adb shell logcat > phonelog.txt

to begin writing the log to that file on your PC hard drive. The first line just makes sure ADB is fired up and ready to go. The second line will write the output of logcat to the file, nothing will appear on your screen because the output is being redirected to the file. This method avoids any problems with the file system on the phone but depends on ADB on the phone side staying alive until the end.

Then, you probably already know, a potential cause for this type of problem is that one of your apps has a corrupted data store or other issue. If no fault in a log can be found to point the way then you're going to have to do a backup and then clean install with only the essential apps to see if the phone works ok then start reinstalling apps one by one until the problem reoccurs.
[X 2014 Android Development] redwings73:
Perfect!... I'll see if I'm able to grab that file through ADB!
[X 2014 Android Development] redwings73:
Alright captured a last_kmsg after a random reboot: https://drive.google.com/file/d/0B2Q-2XIJotzMaFBBRC1YRml0X3M/view?usp=docslist_api
[X 2014 Android Development] mikeoswego:
That doesn't look good. There shouldn't be any "garbage" characters in that log, it should all be text. This looks like a hardware problem. Maybe a battery connection or ribbon cable. It wouldn't hurt at some point to do a factory reset or TWRP Format Data in Advanced Wipe to rule out file system corruption causing the problem.
[X 2014 Android Development] redwings73:
Thanks Mike.

Crap. I don't know anything about last_kmsg text interpretation, but even I thought that didn't look good.

I might send it to a general Android forum and see if I can get more info.
[X 2014 Android Development] jeremy702:
As I'm trying to watch my kmsg also to help solve the problem, I have seen some of mine be corrupted too. It isn't every time, but sometimes. I was going to do a wipe when I get some free time for backup and recovery so see of that went away.

I will say that the reboot around 20% seems very hit and miss. One time it went from 20-1 and stayed St q% for 15 minutes, then I put it on a charge and it jumped back up to 12 really quickly. Its odd.
[X 2014 Android Development] redwings73:
I'm no expert at interpreting these, but this is the first one I've seen with foreign characters. Which I assume means it's corrupted. I will add that I only get a last_kmsg about 40 or 50% of the time the reboots happen.
[X 2014 Android Development] redwings73:
Would you mind giving more details about the TWRP Format Data process?....I'll remain rooted with TWRP and your most recent 5.1.1 image after this process, correct?

I can't figure why the reboots occur a number of times over the course of a day, so I thought I'd give the Format Data a shot.

Thanks!
[X 2014 Android Development] mikeoswego:
I think I'd try the battery connector first. Here is a video (for replacing the screen) that shows how to get to the battery connector: https://www.youtube.com/watch?v=fidHKn-J-0M In it, he mentions that a poor connection at the battery connector can cause weird problems with the phone power cycling, etc. The video shows how to get the back off and then there are two lego like connectors under rubber caps. One of those goes to the battery, the other goes to the power & volume buttons. The video shows removing the logo piece and disconnecting the ribbon cables for the power / volume buttons, don't mess with that for now, just the 2 lego connectors under the rubber caps. I'm saying to unplug / replug and examine both of those because in the one log you posted it said the power button had been pressed multiple times so maybe something in that connector is causing the problem in addition to what the guy says about the battery connector. If the problem continues after these steps, you might go ahead and disconnect / reconnect those ribbon cables and pull out the buttons to check for garbage in there causing false button presses. You won't need any special tools to get the back off or unplug the lego connectors. You will need a T3 torx driver to get the button retainer bracket screw out if you decide to go that far (same driver for all the other screws.) If you have compressed air, you could blow out the area around and behind the power / volume buttons while the back is off with or without removing the button retainer bracket and buttons. You can turn the phone on with the back removed and see if gently wiggling the ribbons going to the buttons or the two lego connectors causes any problems. The back will just stick back on when your done.

Then on the formatting of Data, that would be kind of a hail mary.. I recently had a file get corrupted in data from an ill-advised experiment, the phone wouldn't boot, TWRP couldn't wipe data so that I could restore a backup and I had to format.

TWRP always formats System, boot and cache if selected, but for data it just erases everything except for /data/user/media which is also know as sdcard or internal storage because formatting would erase that. Formatting will remove any possibility of data corruption causing a problem.

You would still have TWRP, your bootloader will remain unlocked. Root is part of the image in System so that will remain. You could try restoring a backup of data after formatting but if the problem continues you'll want to try setting up the phone again with a clean data partition.
[X 2014 Android Development] redwings73:
Got it...I'll give it a shot and check the battery connection when I get a chance! Thanks for your help!
[X 2014 Android Development] redwings73:
I managed to grab another last_kmsg (attached)....haven't had a chance to check the battery connection yet.

EDIT: Also, my phone says "No SIM card - Emergency Calls Only" scrolling at the top of the lock screen...What The??