yashsingh1/xdaforums huggingface dataset:
[X 2014 Original Android Development] mikeoswego:
Time stamps - part 2

Did some more research on this topic.. TWRP uses ats_1 when the CM rom is installed and ats_2 when the Moto rom is installed. There is no ats_2 file created by the CM rom. I took the /data/time/ats_2 file from my Moto rom install and put it into my CM install and TWRP now uses that file to set the correct time when CM is the installed rom. At least there is a workaround!

More info: I learned that the Qualcom chips have a blob for getting the RTC that was problematic in the past.

I think that each device would have different data and my ats_2 file would not be correct for someone else's phone.

Depending on how much drift there is, eventually I'll want to get a new ats_2 file from the Moto install; don't know if that is days, weeks, or months down the road where the drift becomes annoying for the TWRP time stamps.

There are 3 ats_* files created by CM all with different time stamps, 5 created by the Moto rom all with the same time stamp.

Moto's ats_1 and ats_2 have the same content, the two files must not be different time formats, etc.

Following is the file list and hexdump of the ats_* files on my phone with the CM rom, then the Moto rom:

CM:
root@victara:/ # ls -la /data/time
-rw------- system net_raw 8 2015-09-16 00:00 ats_1
-rw------- system net_raw 8 2015-09-18 03:13 ats_13
-rw------- system net_raw 8 2015-09-16 01:31 ats_8

root@victara:/ # hexdump /data/time/ats_1
0000000 5265 cfca 014f 0000
0000008
root@victara:/ # hexdump /data/time/ats_13
0000000 3ac3 d83b 014f 0000
0000008
root@victara:/ # hexdump /data/time/ats_8
0000000 7ec7 d83b 014f 0000
0000008

Moto:
root@victara:/ # ls -la /data/time
-rw------- system net_raw 8 2015-09-18 04:07 ats_1
-rw------- system net_raw 8 2015-09-18 04:07 ats_12
-rw------- system net_raw 8 2015-09-18 04:07 ats_13
-rw------- system net_raw 8 2015-09-18 04:07 ats_2
-rw------- system net_raw 8 2015-09-18 04:07 ats_8

root@victara:/ # hexdump /data/time/ats_1
0000000 3a37 d83b 014f 0000
0000008
root@victara:/ # hexdump /data/time/ats_12
0000000 3b8b d83b 014f 0000
0000008
root@victara:/ # hexdump /data/time/ats_13
0000000 3b8b d83b 014f 0000
0000008
root@victara:/ # hexdump /data/time/ats_2
0000000 3a37 d83b 014f 0000
0000008
root@victara:/ # hexdump /data/time/ats_8
0000000 80cf d83b 014f 0000
0000008

---------- Post added at 12:51 PM ---------- Previous post was at 12:26 PM ----------

After looking at those hexdumps again, I tried copying CM's ats_13 file to ats_2 and got the correct time stamp in TWRP. So it is not needed to get the correct data from the Moto ROM, CM is creating the proper data but possibly not putting it in the correct file(s).
[X 2014 Original Android Development] Aroch925:
My xt1096 keeps dropping connection. Every once in a while I'll look at it and it will have no bars and say no service but itll come back a few seconds later. I tested it on all the nightlies that are currently on the download site and this happens on all of them.
[X 2014 Original Android Development] :
Bluetooth issues with CM-12.1.20150918-NIGHTLY

For some reason, I am unable to pair my bluetooth headset.

When I try to pair my headset it does not show up... so something

really bad happened.
[X 2014 Original Android Development] tacosrdelicioso:
I'm not experiencing this issue. Although I'm not running an official nightly. I'm still running the build mikeoswego built right after the fix. Not that it should matter
[X 2014 Original Android Development] tacosrdelicioso:
Also upload logs
[X 2014 Original Android Development] joaste:
Hi there

Could this timestamp issue explain why when I reboot, the date/time switches back to the build date (I'm supposing it is the build date). It is only when I get a mobile network data connection (i.e. not wifi), that the date/time switches to the correct date. If I reboot in an area without data covereage, I cannot know what time it is... Would be exceptional of course, but still not normal in my opinion.

I already mentioned this issue, but didn't get any feedback. I have it on all CM12.1 based roms.

Cheers
[X 2014 Original Android Development] Aroch925:
Here's a log

https://drive.google.com/file/d/0B6kWVVJhYz9KdmwyNTZwb0VleVk/view?usp=sharing
[X 2014 Original Android Development] mikeoswego:
Time stamps - part 3

Yes, I'm sure the problem I'm talking about has something to do with it. Are you sure it is the build date, or is it just a date a few days in the past? You have given me the clue to prove that this is not a TWRP problem.

Anyone can replicate this issue. Put your phone in airplane mode and do a full reboot (not soft reboot). When the phone comes back up, your time will be wrong by some amount. In my case, this morning 2015.09.21 @ 10-:00am, the phone went to 2015.09.19 @ 6:35pm when doing this test. This is the same amount of time difference I've been posting about when going into TWRP. Everyone will probably have a unique difference due to how the time setting system works. This seems fairly serious for people who fly and might turn off/reboot their phone after setting airplane mode and then have the time wrong until they land and can turn their radios back on (or in an area with no coverage.)

Some more info I've learned about this problem:

The time_daemon binary that creates the ats_* files in the CM rom is identical to the one in the Moto ROM, that must make it a "blob."

The context on the time_daemon file is u: object_r:time_daemon_exec:s0

The Moto rom has a file in /system/bin named timedexec, interesting that the file name is similar to the context on time_daemon. Simply placing timedexec with the same permissions as the Moto rom into the CM rom has no effect.

I've asked in the TWRP thread if TWRP can be modified to use the ats_13 for the time setup instead of ats_1 when ats_2 isn't found. That would take care of how this problem mostly affects me personally, and copying the ats_13 file to ats_2 also works for me. (Having the ats_2 file in place fixes TWRP but not the CM reboot with airplane mode set.)

Just some more trivia for those interested: As near as I can tell, phones do not have a clock chip like a computer that keeps track of the time when it is turned off. Instead, it keeps track of how much time has passed since it was turned on for the first time. Then, the software, once it has the correct time from the network, sets up these ats_* files that contain various types of offsets from the phones timer to what the real world time is. That is why each phone will be off by varying amounts, it depends on exactly when it was turned on for the first time. Before smartphones, there was no reason to store the time, the phone has to be synced to the network time to work properly so no reason for it to keep time independently. Smartphones are phones first and the time setting works in a compatible way to the old system.
[X 2014 Original Android Development] kokotron:
Rotation Vector update

I have one bonus bit of information to share on the Rotation Vector sensor issue, in case someone cares to fix or regress this.

I have currently installed another rom based on an older CM build, it's Ressurection Remix v5.5.2. (released sometime in July)

I checked with the Sensors app and the information on the sensor are different on this build compared to the newer builds.

Newer builds with broken sensor report 'Motorola' as the vendor, while this older build (that has a working sensor) displays the following:

So, I hope this can prove usefull to anyone willing to do something about the issue.

Thank you.
[X 2014 Original Android Development] invisiblek:
Moto switched to their own implementation rather than relying on the AOSP ones as they're apparently no longer actively maintained. source

We never pulled in the permissions for the new nodes. Easy fix =P

http://review.cyanogenmod.org/#/c/110142/
[X 2014 Original Android Development] kokotron:
Party time!!

Thank you thank you thank you.
[X 2014 Original Android Development] crpalmer:
I told you that invisiblek dude was a waaaay better maintainer...
[X 2014 Original Android Development] biggreen:
What setting is blocking ambient display - it worked before and now i see https://goo.gl/photos/ZZD8nFq1iXJxzvNf8 this ( Help plz
[X 2014 Original Android Development] :
Settings, Display and Lights, Ambient Display? If it's off, turn it on...
[X 2014 Original Android Development] biggreen:
Yes )) Thank you )
[X 2014 Original Android Development] :
Rotation Vector works

View attachment 3485117View attachment 3485118View attachment 3485119
[X 2014 Original Android Development] Tinchoska:
Is yhere an h chance to have full y working stock moto camera (with drivers and stuff)working here? Cause Image quality is worst than stock

Enviado desde mi SM-T700 mediante Tapatalk
[X 2014 Original Android Development] slogar25:
Here you go. Just flashed this myself. I believe he just updated it to the latest camera update from playstore

http://xdaforums.com/showthread.php?t=3172783
[X 2014 Original Android Development] adm1jtg:
Pretty sure you can now download direct from playstore the moto camera. Have been able to for a few weeks now.
[X 2014 Original Android Development] halfsoul:
On 9/23 nightly I still have bluetooth problems.

If I turn off bluetooth, and then back on again, I can connect to devices normally.

Inevitably, after some (unknown) time has passed, it doesn't connect anymore. At this point I have to turn my bluetooth off and on again.

It is so frequent that now I turn my bluetooth off and on again every time I get in the car.

Hopefully this weekend I'll be able to find time to do a factory reset, to see if that resolves it.

But this will be tedious to check effectiveness, since I don't know how much time needs to pass in order to trigger the issue.

So, just to check: Does anyone else have bluetooth connectivity problems?
[X 2014 Original Android Development] :
Gello Browser

Gello Browser

Was it already released? I can't tell because I usually replace the stock CM Browser.
[X 2014 Original Android Development] kokotron:
I have some issues with bluetooth connectivity too, not only on MotoX but on another device I use with CM12.1 as well. Sometimes indeed it will be impossible to reconnect to a saved device. From there I choose to "forget" the device and redo the pairing, but the device will not appear as available in the list any more, as if it was blacklisted or something. Turning off and on bluetooth doesn't solve this, so eventually I have to use a terminal emulator and run " rm -rf /data/misc/bluetoothd/* " as root to reset bluetooth settings, then it works like a charm again.
[X 2014 Original Android Development] joaste:
I don't have issues with connecting to previously paired devices, but I do have regular issues whe trying to discover devices. I need to turn off BT and/or restart pairing process from the other device. It is a bit of a lottery when trying to pair though...
[X 2014 Original Android Development] SurlyDuff:
Is anybody else having issues with the modem/radio? I came from stock Moto software a few weeks ago and everything seemed to be working fine. However, since switching to CM, I've had connectivity issues. On a regular basis, my connection goes down to almost no phone connectivity, then back to almost full, rinse and repeat.

[IMG="Mobile network signal"]http://i.imgur.com/pdwMCME.png[/IMG]

This is while working in my office (listening to music, so disregard the awake time). I usually had a fairly regular yellow or green network signal on stock Motorola software.

I tried flashing the NON-HLOS image modem, then the erase modemst1/modemst2 command again just to be sure that wasn't the problem, but the connection still looks really spotty. Here's a modem log since the reboot (please let me know if there's any identifying info in there...but there shouldn't be).

Anybody have any idea how to fix the issue?
[X 2014 Original Android Development] tacosrdelicioso:
No network connectivity issues but I do have the finding Bluetooth devices issue. I have no issues with paired devices connecting automatically
[X 2014 Original Android Development] Aroch925:
I had a similar issue and to fix it I just flashed the stagefright patched modem from mikeoswego 's thread. Here's the link http://xdaforums.com/attachment.php?attachmentid=3471006&d=1442052355
[X 2014 Original Android Development] SurlyDuff:
Hmm that seems to be for the XT1096 if it's from the same thread I'm looking at and I'm on the XT1095. Unless there's some thread I'm not noticing...I'd rather keep my modem for the right device.
[X 2014 Original Android Development] adm1jtg:
Also on xt1095 but not having any connectivity issues at all. Running nightly from the 25th
[X 2014 Original Android Development] Danz207:
Hey guys,

My Moto X XT1092 is gonna be delivered on Monday and I thought about loading CM on it but I'd love for once to own a phone and not void the warranty straight away, but I was curious about a few things:

1. Can the notification LED/light be used in CM? Since it can be activated on stock with root and some tweaks; can it be used out of box on CM12.1?

2. Any weird problems people are having (especially on international variants)? I know the stock X software is pretty much identical to AOSP but I do like the added tweaks to CM and will eventually load when support runs out (and after Motorola's Marshmallow update list, that may be sooner rather than later).

I have run CM12.1 on a few other devices (N5, M8, S4, S5) and never ran into debilitating issues, is it safe to assume Moto X is the same? And is there any proprietary features that won't work or be utterly horrible on CM (for example, BoomSound speakers on M8)?

Thanks!
[X 2014 Original Android Development] kokotron:
I have an XT1092 bought in Greece, which was probably imported from some other European country but I can't tell exactly.

1. The notification led already works out of the box on CM12.1. The bad part is it cannot be customized in any way except from turning completely off (this means it will just be on until you see the notification, no customizable blinking or anything).

2. Current nightly builds have no deal-breaking issues. The latest stable build had one of the sensors broken, so I wouldn't recommend that. Current build I'm using (Sept. 30th) has a weird issue with landscape mode in games: Occasionally, the navigation buttons cannot be accessed and there's no way to exit the game. It's like the phone is stuck in portrait layout even if the status bar has moved accordingly.

3. (bonus#1). I prefer the Resurrection Remix rom to CM12.1. RR is based on CM builds, with additional customization settings and optimizations. It also has a MUCH better organized settings layout, it's so much easier to find the customization you need. But I would wait for their next build to pop-up, because the last one (5.5.6) is based on the CM version that has the broken sensor.

4. (bonus#2). I think there's no easy way to go back to completely stock once you've unlocked bootloader/rooted/customrominstalled. But I'd love someone to tell me otherwise, pointing to a nice guide someplace which is proven to work for XT1092 specifically.

EDIT: There WAS an issue with bass sound lacking but it was fixed in recent builds. Also, since recently you can also install official Motorola Apps from the Play Store, which means you can get the wonderful MotoX camera which is really great (has a great and fast HDR feature, nice manual exposure control, digital zooming)
[X 2014 Original Android Development] Danz207:
Thanks for your answer!

I plan on making a system and recovery backup before tinkering, but there is a guide on converting any Moto X variant to the XT1095 Pure Edition (can be found in MX General page). I would really prefer CM12.1, but does Resurrection Remix offer more notification LED options or is it the same? Does CM12.1/RR at least offer that feature where you wave your hand over the screen to see notifications?

According to reports, most Moto X variants have had the Marshmallow update certified so I might wait for that to be release to update the modems and any other things then switch to CM. Hopefully that brief period will give me enough time to ensure there aren't any issues with the phone that require a warranty repair.

I also saw online that a message pops up during boot if you have an unlocked bootloader, do you get that?

Thanks :)
[X 2014 Original Android Development] kokotron:
Well, Lollipop came with several months delay on MotoX 2014, and it had some pretty bad battery draining bugs, which were fixed even more several months later with the 5.1 update. So patience is a virtue if you go down that lane. Of course a proper CM version of Marshmallow might take even longer.

Indeed there is an unlocked bootloader annoying (only because of its whiteness and brightness though!) screen. There are ways to substitute it with something else though as far as I know (though I didn't bother to do it).

Well making it an xt1095 wouldn't really work if you need to do it for warranty reasons, like we could easily do with the Nexuses.

RR has exactly the same functionality with the LED. Both roms have many LED settings, but they are either locked or they don't work. My guess is there's a hardware restriction with the MotoX led and all those settings are leftovers for other devices. Also both roms offer the original MotoX gestures (wave to wake, wake on pickup, keep screen on when looking at it, gestures to open camera or flashlight, wave to silence - though I didn't get that last one to work lately). Waking on wave or motion can get a bit annoying on occasion, for example when I'm at work and my phone is on my side, many times just a small motion AROUND the phone will wake the screen. Good thing both roms have a tile to turn on and off this functionality easily. Another thing I liked in RR is that I can turn Data on or off with a single Tile tap, while on CM it takes a tile tap and another toggle tap. What I miss in both roms is the ability to switch to more mobile networks, currently the network switching tile switches between 4G and 3G, but many times I like to switch to GPRS to conserve battery or get a better signal.
[X 2014 Original Android Development] Danz207:
How long roughly does the message last for? Does it replace a previous boot logo or is it added to the boot process after the unlocking bootloader?

May I ask what you currently run on your phone? RR?
[X 2014 Original Android Development] kokotron:
To be honest I'm not entirely sure if it's added to the boot process or if it replaces something. I'm currently running CM, I will consider going back to RR once they do a new release with all the recent CM fixes (including the broken sensor)
[X 2014 Original Android Development] :
Stock firmware has a file called "logo.bin", which contains five images for this phone. After unlocking the bootloader, the phone just switches to a secondary boot logo. The logo.bin file can be edited, and the images replaced, then it can be flashed with fastboot, or a custom recovery flashable zip can be made. The remaining 3 images are for battery status.
[X 2014 Original Android Development] gnowak84:
Thanks for info. Have you had any issues flashing CM? CM recovery doesn't seem to boot on mine 1092, and TWRP won't flash the zip.

Thanks!
[X 2014 Original Android Development] Tinchoska:
Guys any of you are from Argentina? If so, on personal do you have lte using cm?

Enviado desde mi SM-T700 mediante Tapatalk
[X 2014 Original Android Development] kokotron:
No issues ever at all. I flashed TWRP right from the start and it works fine with anything I've tried.
[X 2014 Original Android Development] ny-hardcore:
I think i had to do a full wipe before flashing the first time.
[X 2014 Original Android Development] :
AOSP MarshMallow released:

https://android.googlesource.com/platform/build/+/marshmallow-release

Nexus Factory Images 6.0.0 released:

https://developers.google.com/android/nexus/

Looking forward to CM Android 6.0

Thank You.
[X 2014 Original Android Development] :
Cm13.0 source is online on github, looks promising
[X 2014 Original Android Development] raptir:
Wow, that was fast.
[X 2014 Original Android Development] kokotron:
Meh, just installed today's new stable version over the Sept. 30th build and the phone keeps restarting right after lockscreen appears, after an "com.android.phone" crash error. I'm going to flash 09/30 build and see if I can save this, otherwise I'd really hate to do yet another full wipe...
[X 2014 Original Android Development] adm1jtg:
Anyone been able to get 10/6 nightly to work with xposed? If I load xposed framework bootloop city.
[X 2014 Original Android Development] nanca:
same here. =/

did you do a dirty flash as well? tried a clean install?
[X 2014 Original Android Development] adm1jtg:
I tried a dirty flash update of my current with the 10/6 weekly, and also a completely clean flash of the snapshot. Cannot make xposed work at all, So for now I guess I am back to my 9/25 working backup.

EDIT: Just found this:

https://github.com/rovo89/Xposed/issues/71
[X 2014 Original Android Development] nanca:
yap. i saw that as well. the only reason for me to use xposed framework is the greenify module. however, i can't get any significant battery improvement with it like i used to. I'm gonna try this nightly without it and see what happens.

do you use this module? it works for you?
[X 2014 Original Android Development] adm1jtg:
I use greenify, amplify, powernap and render kernel and get amazing standby battery life. Like .1%/hr drop for inactive phone but still connected
[X 2014 Original Android Development] nanca:
found out that rovo89 is aware of the problem with exposed. for those who uses the xposed, he asked to not update to the last nightly, its incompatible.

https://github.com/rovo89/Xposed/issues/71
[X 2014 Original Android Development] Aroch925:
How did you get it this good??? I've been trying forever to get mine this low from the Extreme battery thread and i can only get it too like 1.1%/hr. Maybe its my kernel settings for Render Kernel. Do you mind if I ask what your settings for the kernel are?
[X 2014 Original Android Development] crpalmer:
By "incompatible", he means has Google security patches applied that fix vulnerabilities. Aka, a good thing to upgrade.
[X 2014 Original Android Development] adm1jtg:
Xposed has been updated and seems to work now.

BTW anyone tested the latest snapshot and is the sound working properly for the bass and all
[X 2014 Original Android Development] raptir:
The snapshot seems to be based on a version older than that. For example it doesn't even have the app icon on the toast notifications feature. Generally going from Nightly -> Snapshot/Stable is not going to end well unless you're on a very old nightly.
[X 2014 Original Android Development] adm1jtg:
Doing a factory format and reinstalling apps will work as well but I agree snapshots are almost always older.

Update: looking at the repo it looks like the soundfix and sensor fix are NOT present in the latest snapshot. Back to nighties for me.
[X 2014 Original Android Development] Tinchoska:
Hi guys, question, I can't get lte working, anyone else?

Enviado desde mi XT1097 mediante Tapatalk
[X 2014 Original Android Development] Tommebaas:
Does the render kernel gives you more battery life? I het about 3.5 to 4 hours SOT.

Sent from my Moto X
[X 2014 Original Android Development] adm1jtg:
Battery life is very subjective and varies greatly by person. You need to just try and see what works for you but overall a custom kernel will usually run more efficiently then a stock one.
[X 2014 Original Android Development] abhay6547:
Hey crpalmer, any word on CM13 development for the X 2014?
[X 2014 Original Android Development] craftyguy:
http://review.cyanogenmod.org/#/q/status:open
[X 2014 Original Android Development] abhay6547:
Awesome! Hopefully it's not long before nightlies begin to roll out :D
[X 2014 Original Android Development] kloan:
Just tried Oct 7 snapshot. Phone got stuck in reboot loop... Would show com.android.phone stopped responding, then would reboot... Phone got exceptionally warm as well. Went back to sept 29th for now.

How's the latest nightly build, OK?