yashsingh1/xdaforums huggingface dataset:
[Motorola Photon Q 4G LTE] tobby88:
On a Xeon E3-1275v3 (like a Haswell Core i7) with 4 Cores and 8 Threads, 12 GB RAM and SSD storage I remember build times of 20-45 mins, when CCACHE was enabled. First build or without CCACHE was more like 1 hour, maybe up to 1,5 hours when the server was doing some more stuff.

On a build server with a much older Xeon and an HDD I think it took about 3 to 5 hours.

But first checkout of all repos before the first build can take hours on slow internet connection or slow storage (HDD) as well.
[Motorola Photon Q 4G LTE] GDorn:
We should probably pick one CM13 thread and stick with it, but I just installed the pico opengapps package (ARM, 6.0, pico) and now I'm stuck in a "Setup Wizard has closed" loop.

It's frustrating enough to be required to install google play services to use any google app (even gmail? come on...), but now I can't get into the phone at all.

Edit: Some research revealed this is a common problem on android 6.0 due to a chicken-and-egg problem with the new permissions system. If you don't install both CM13 and Gapps at the same time after a factory reset and instead boot up once, various google apps don't have permissions that they need. The fix I used was in two parts:

First, since I was already building CM13 from source, I incorporated TeamExodus's super-hacky super-insecure patch to deal with the problem: https://github.com/TeamExodus/frameworks_base/commit/9c36be651e83fb039a262682839bd920b033007a

This didn't fix everything and the FCs were still happening, so more research led me to open an adb shell while the infinite FCs were happening and granting permissions there:

Other people have been writing init scripts to do these automatically. CM has largely been ignoring the problem but might deal with it eventually.
[Motorola Photon Q 4G LTE] Loader009:
I've built cm13 and commented out the zram-line in fstab.qcom before.

Good thing is that zram isn't mounted after boot anymore and the disksize is 0.

But I am not sure if the ram is given free, before and after the this build ram is 792MB. (Using free -m)

Is that normal? (zram is allocated within the available ram that "free" shows)

Or could it be that I have to dig deeper? (the zram module is still loaded)
[Motorola Photon Q 4G LTE] kabaldan:
Zram is using the kernel memory as it needs it.

You can check the real numbers as they are reported in /sys/block/zram0 nodes.

A real world example:

419430400 (disksize)

347742208 (orig_data_size)

110561659 (compr_data_size)

116781056 (mem_used_total)

=> zram is currently using 116781056 bytes of ram (=of those 792MB) to store 347742208 bytes of data in a virtual swap drive of a virtual 419430400 bytes size.

Btw., I'm currently evaluating a zram/zsmaloc backport from 4.7rc kernel (over 100 commits) that should refresh the older backport we're currently using. I'll push it to our cm-13.0 kernel repo hopefully soon, if I'm satisfied with its performance.
[Motorola Photon Q 4G LTE] Loader009:
Since my problem is existing with cm12.1 I make the post with my log here.

On logcat I have one line which repeats very often (spams the log).

E/qdhwcomposer( 180): Failed to call ioctl MSMFB_OVERLAY_SET err=Out of memory

dmesg (4 lines repeating)

<3>[ 135.628322,1] mdp4_overlay_pipe_alloc: ptype=2 FAILED
<3>[ 135.628444,1] mdp4_overlay_req2pipe: pipe == NULL!
<3>[ 135.628475,1] mdp4_overlay_set: mdp4_overlay_req2pipe, ret=-12
<3>[ 135.628597,1] msmfb_overlay_set: ioctl failed, rc=-12

Right before this problem I had another problem:

The phone was up and running for hours (almost all day). Suddenly the screen was black except the top bar (with the clock, Wifi/Cell-Signal, battery level etc.) and the navigation bar, they were showed. I am able to swipe down the top bar and try to go to the settings but the rest of the screen stays black. Sometimes when I press the multitask button (the right one) of the navigation bar I see for barely a second the window-name of a program.

Now I hold power and the power-menu appeared, I rebooted. I got the annoying black screen problem and made a logcat+dmesg dump.

Since the logcat have personal information I won't post it here.

I've got logcat+dmesg from before the reboot (almost everything black except the top/navigation bar) and after the reboot (black screen).

edit: cm 12.1-20151007-UNOFFICIAL_xt897 -- this is tobbys cm-mod with the sdcard as internal memory mod.
[Motorola Photon Q 4G LTE] Logos Ascetic:
All links are dead

Took [MENTION=420530]arrrghhh[/MENTION]'s advice and installed:

CyanogenMod 12.1 Lollipop 5.1 cm-12.1-20151007-SNAPSHOT-YOG4PAO339-xt897.zip

I want the latest CM 12.1 build, which [MENTION=438797]Al936[/MENTION] uploaded to google drive on March 23rd, 2016 for [MENTION=5919917]enigma9o7[/MENTION] in this post:

The link is dead. Can anyone upload/link/send me the the last nightly or snapshot for CM 12.1?
[Motorola Photon Q 4G LTE] Yakimus:
https: //droid.cs.fau.de/Official_CM_Builds/xt897/
[Motorola Photon Q 4G LTE] C D:
I uploaded the file to my Google Drive - cm-12.1-20160323-NIGHTLY-xt897.zip. I hope this is the one you're looking for. Let me know if this works as I happened to save it a while back just in case but never actually used it myself.
[Motorola Photon Q 4G LTE] adabwana:
couple questions:

1) since in the first post there is a separate gapps download, does that mean the cm12.1 base is gapps free?

2) is cm12.1 microg compatible? (found requirements in this post's installation instructions: https://xdaforums.com/android/apps-games/app-microg-gmscore-floss-play-services-t3217616)

3) How does this compare with the cyanogenmod 13.0 nightly build? (found here: https://cyanogenmodroms.com/xt897/)

thank you :)
[Motorola Photon Q 4G LTE] palmbeach05:
All cm builds, or even lineage builds, do not come with gapps. Gapps are needed to be flashed separately, or use microG.
[Motorola Photon Q 4G LTE] turbozapekanka:
Update:

something went wrong last time I formatted file system

There was some "unable to mount" errors

So I just reformat everything from scratch and now it works.

time for the first boot: 10 minutes
[Motorola Photon Q 4G LTE] mrvek:
I get the same issue. Can't enter SIM PIN (rild is crashing). Need to reboot n times before it succeedes. The odd thing is that I've never had this after new install, not sure why (dexopt is lenghty :-/)

[MENTION=1258660]---UFO---[/MENTION]

run in term.:

su
setprop persist.log.aplogd.enable 1

Complete set of logs will be automatically saved in /data/aplogd/
[Motorola Photon Q 4G LTE] turbozapekanka:
Has anyone tried sending a photo using Android Beam with NFC?

it does not work for me
[Motorola Photon Q 4G LTE] kabaldan:
Somehow I failed to mention here that I've uploaded a new build to that hated devhost site - http://d-h.st/a4ns

But it doesn't matter now as the first official 12.1 nightly for xt897 should get built in a few hours time anyway.

I'll try to have a look at the rill issues (well, just the gsm part...) during the next days. Though it has been working for me rather fine so far, I see some strange stuff in the logs nevertheless, so it's worth exploring.
[Motorola Photon Q 4G LTE] palmwangja:
Thanks for making this CM12.1 happen!!!

Always appreciate it!

However, I still don't know what makes GoogleSearch/Google+ not work at all on our CM12.1

Is it just me? or anyone using CM12.1 on Photon Q? or the entire CM12.1 problems??

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

Google+ seems just fixed with the recent 5.3 version :)

Google Search is still only working with the first launch after app data wipe.
[Motorola Photon Q 4G LTE] ilichva:
cm-12.1-20150418-NIGHTLY-xt897.zip
[Motorola Photon Q 4G LTE] ---UFO---:
Thanks.

Is there any progress with 3.4 kernel?
[Motorola Photon Q 4G LTE] comstyle:
And there is still the missing widget in window mode.

What should that look like? Is it also gsm related?

edit: of course kudos to you for realizing the builds :D

edit2: The missing widget is from google search so it is probably related to that issue.
[Motorola Photon Q 4G LTE] espeon:
There appears to be no "expanded tile" version of the mobile network carrier for this device, for some reason.

According to http://review.cyanogenmod.org/#/c/93272/ there should be some expanded settings of some sort (it should look something like this, but instead, I'm just dumped into the Data Usage screen, with no way to toggle mobile data on or off.

I'm on a non-sim-modded phone. Dunno if this is also the case for people with sim-modded phones, but it doesn't work as it should on stock phones.
[Motorola Photon Q 4G LTE] comstyle:
Fyi: It's working with sim-mod.
[Motorola Photon Q 4G LTE] tobby88:
I am trying to compile CM12.1 for Photon Q myself with this instructions: http://wiki.cyanogenmod.org/w/Build_for_xt897

So I did a

repo init -u https://github.com/CyanogenMod/android.git -b cm-12.1

followed by a

repo sync -c

Now I do a

source build/envsetup.sh

and then I try

breakfast xt897

But this stops with the following error message

Fetching projects: 100% (3/3), done.

Looking for dependencies
Dependencies file not found, bailing out.
Looking for dependencies
Dependencies file not found, bailing out.
Looking for dependencies
Dependencies file not found, bailing out.
Done
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/motorola/xt897/cm.mk]]: "vendor/motorola/msm8960_jbbl-common/msm8960_jbbl-common-vendor.mk" does not exist. Schluss.

** Don't have a product spec for: 'cm_xt897'
** Do you have the right repo manifest?

What am I doing wrong?
[Motorola Photon Q 4G LTE] arrrghhh:
You need the vendor blobs which go in vendor/motorola.

This is covered on that wiki page. See http://wiki.cyanogenmod.org/w/Build_for_xt897#Extract_proprietary_blobs
[Motorola Photon Q 4G LTE] tobby88:
Ah damn it! :laugh: There were already some files in that folder after "breakfast", so I thought, all blobs were pulled from git. ^^

Is there any way to get these blobs without using the script? Because I have a few problems with my Photon Q. My USB port is broken and often doesn't get a proper connection and also passthrough of USB-devices on my virtual machine (KVM) I created for compiling also doesn't work properly. It'll find the phone via "lsusb", but can't connect via MTP or ADB.

Can I get these blobs on a different way?
[Motorola Photon Q 4G LTE] arrrghhh:
Wait, how are you going to flash anything? Sounds dangerous.

I don't know if I should spill these beans, but search github for the muppets. Good luck.
[Motorola Photon Q 4G LTE] Fr4gg0r:
I get sim pin operation failed, anyone else?

I can now only operate the phone without sim card, I cannot even switch to airplane mode.^^
[Motorola Photon Q 4G LTE] comstyle:
Yes, a few of us have this issue, too. Had to downgrade from 04-21 to 04-18 after trying to get a connection for hours. Got it working after a few tries with 04-18 and I hope the phone will not restart xD
[Motorola Photon Q 4G LTE] pizzulicchio:
Same for me!

I can confirm that using 04-18 build , all is working perfectly... with 04-21 my photon with sim mod has not cellular line connection...

SMALL UPDATE: I have try to set the phone in "Global" instead of "GSM/WCDMA auto or preferred" and after about 10-15 minutes the cellular line is back... very very strange
[Motorola Photon Q 4G LTE] Elanzer:
I updated from 04-18 to 04-21 with cyandelta just fine without new issues using sim mod, however my sim is WCDMA and not GSM
[Motorola Photon Q 4G LTE] tzuba12:
Yeah the not being able to connect to mobile data is a big issue for me. I'm on Ting and use the data to make google voice calls and hangout messages when I'm out. Saves money. Can't do that with any of the CM12.1 Nightlies. Tried to go back to CM12 but found they are not available to download anymore.
[Motorola Photon Q 4G LTE] kabaldan:
I've updated the TWRP link in OP to a new build with fixed mtp file access on xt897 (2.8.6.1).

https://dl.orangedox.com/5H4H2lGx4ZfPpCAaOX/TWRP-2.8.6.1-xt897.img

Btw., I really like the materialized TWRP themes much better than the default theme.

See the thread: http://xdaforums.com/android/themes/theme-twrp-materialised-dark-light-play-t2915584

Use the 720 / 286X themes: https://basketbuild.com/devs/z31s1g/720/TWRP 286X_v1

EDIT:

The reported rild segfaults are still under investigations.

Pushing the /system/lib/libril.so from a moto_msm8960_jbbl CM11 build or from a xt897 CM12 build to xt897 CM12.1 system/lib appears to be the current workaround for the rild segfaults / connectivity issues.
[Motorola Photon Q 4G LTE] timekiller_9:
Based on this hint, I put together this workaround for the failing connection. Works fabulously with my AT&T (GSM). Connects in 10-12 seconds now on bootup of CM 12.1, no looping or other messing around. If you want to try it, here's the process. Please only attempt this if you know what you are doing and feel capable of digging yourself out if you go wrong! I'll tell you to reflash if you reply that it messed up!

Take my attached zip here and uncompress it onto your external SD card.

From a shell/command prompt on your PC with the Photon Q connected via USB:

adb shell

su

mount -o remount,rw /system /system

cd /system/lib

mv libril.so libril.so.backup

cp /external_sd/libril.so .

cd /system/bin

mv rild rild.backup

cp /external_sd/rild .

chown root.shell rild

chmod 755 rild

Reboot your Photon Q. Enjoy quick and reliable mobile network connectivity. If you flash a new 12.1 nightly you'll have to re-do this of course until the root problem is fixed in 12.1.

These files are from cm-11-20150216-NIGHTLY-moto_msm8960_jbbl.zip. I tried the very same thing with the files from cm-12-20150417-NIGHTLY-xt897.zip, but no dice. Seemed to behave about the same with the cm-12 nightly.

I hope this helps someone out. I'm certainly pleased as punch at the moment!
[Motorola Photon Q 4G LTE] tzuba12:
Still not working. Actually, now I don't have any service at all :(
[Motorola Photon Q 4G LTE] mrvek:
Setting selinux context worked for me.

Execute:

busybox ls -laK /system/bin/rild

If context is not "rild_exec" run

su
mount -o remount,rw /system
chcon u:object_r:rild_exec:s0 /system/bin/rild

and reboot device.
[Motorola Photon Q 4G LTE] tzuba12:
This.. is just not working. -sigh-
[Motorola Photon Q 4G LTE] ---UFO---:
Here is Recovery-flashable RILD fix based on timekiller_9 files.

Just flash it on top of CM12.1 from recovery.

Tested on CM12.1 20150418 and TWRP 2.8.6.1. It has fixed my RILD issues.
[Motorola Photon Q 4G LTE] Fr4gg0r:
Does it also fix "sim pin operation failed"?
[Motorola Photon Q 4G LTE] timekiller_9:
All I can say is that it fixed the lengthy fight getting connected to my network provider. I don't use a sim pin and so have never seen this error. It's probably worth a try if you're comfortable flashing the file that ---UFO--- put together (much easier than the hacky process I first wrote up!) Worst case scenario you just flash back the whole nightly to get back to where you are.
[Motorola Photon Q 4G LTE] ---UFO---:
Yes, it has also fixed that issue for me.
[Motorola Photon Q 4G LTE] timekiller_9:
FWIW, if it helps diagnose root cause in the 12.1 rild, the issue of the phone saying "No Service" on the lock screen even when it's connected to my network provider is also solved by this workaround, at least in my case. The phone now happily reports "AT&T" on my lock screen.
[Motorola Photon Q 4G LTE] tobby88:
I am building my own TWRP with a few changes - can you tell me, what you changed to get MTP working so I can include it in my own build? :)
[Motorola Photon Q 4G LTE] kabaldan:
Just a few android_usb parameters written:

- on fs

- on property:sys.usb.config=mtp,adb

- on property:sys.usb.config=adb

in init.rc.
[Motorola Photon Q 4G LTE] tobby88:
Thank you very much :) Works.
[Motorola Photon Q 4G LTE] tzuba12:
The flashable data/service fix does not work for me. Don't know if its because I don't have a sim mod (on Ting which is CDMA) or what. Had to go back to a really old backup.
[Motorola Photon Q 4G LTE] espeon:
Not working for me either; I'm also on a (different) Sprint mvno.
[Motorola Photon Q 4G LTE] kabaldan:
That's bad. I have no way to debug anything CDMA related.

You need someone with Photon Q on CDMA network who is able to provide logs or better yet, do some debugging work.

That being said, the telephony code in CM12.1 is still a mess, as it's based on CAF code which hasn't been fully rebased on AOSP 5.1 code yet(?).

It looks like CAF (read Qualcomm) ragequit during AOSP 5.1 merging process... CM 12.1 is currently partially AOSP 5.1, partially old CAF hybrid mess.

Is the CM 12.0 telephony working fine for you or is it also messed up?
[Motorola Photon Q 4G LTE] espeon:
12.0 worked fine for me; the only cdma-related issue I had was with the mobile data toggle not working properly.

I haven't the time now to switch back and get logs, but if it's still an issue a month from now after I graduate I'll start working on that.
[Motorola Photon Q 4G LTE] arrrghhh:
I can attempt to pry the Q out of my roomie's hands and install cm12. Was hoping others would step up and provide some logs / attempts at resolution... It's on Ting, but shouldn't be any different from Sprint as far as the radio is concerned.

Let me know. Sounds like it did work for others on 12.0, so your suspicions are likely correct.
[Motorola Photon Q 4G LTE] huatz84:
Not working for me either. I'm using Smartfren in Indonesia. Only data won't show up even I have activated mobile data. Calls and text work flawlessly.
[Motorola Photon Q 4G LTE] ilichva:
For me, the mobile data work flawlessly ... (I use СM12.1)

I add a line in build.prop: ro.сdma.home.operator.numeric = 25504

My mobile operator Intertelekom: MCC = 255, MNC = 04
[Motorola Photon Q 4G LTE] mrvek:
Ragequit? What happend? Do you know where I could find more info?
[Motorola Photon Q 4G LTE] palmwangja:
is this also related to google search not working properly?

in my case, my modded 3g data is good, with/wihtout the temp fix, but still no carrier name nonetheless.

other than the google search, no peculiar malfunction yet.
[Motorola Photon Q 4G LTE] arrrghhh:
I mentioned the Google Search issue happened on CM11 as well so I have no idea why you would think that is related.
[Motorola Photon Q 4G LTE] huatz84:
It works now. Thanks a lot. Finally I can enjoy a fully working calls,texts and data of Lollipop on my old Photon Q. You just save my day. :D
[Motorola Photon Q 4G LTE] timekiller_9:
huatz84 -

Try the latest Nightly (20150428). It includes several changes for Smartfren which just might fix your data issues. If you're using the connectivity workaround ---UFO--- and myself put together you'll need to reapply it after flashing the nightly. (If I understand correctly though, this workaround is only effective for those having problems with GSM and I think Smartfren is CDMA).
[Motorola Photon Q 4G LTE] kabaldan:
That added line does nothing as it's read only property and it's set by init lib before build.prop is parsed.

(see https://github.com/CyanogenMod/android_device_motorola_xt897/blob/cm-12.1/init/init_xt897.c#L79 )

Check the effective value of that property in terminal app or adb shell:

su
getprop ro.сdma.home.operator.numeric
[Motorola Photon Q 4G LTE] arrrghhh:
kabaldan... I wonder if this would explain the breakings on Sprint MVNO's, if they have different mnc/mcc?

Although, this would have been broken on CM11 as well then (I would think).
[Motorola Photon Q 4G LTE] huatz84:
I'm using ilichva's method and my data works stable. Will try the latest nightly for sure. Thanks for the info. :)

It works on mine. Before I added that line,my data didn't work. Smartfren mcc and mnc is 510-28.
[Motorola Photon Q 4G LTE] comstyle:
Installing Google Search app version 4.5 solved the "no internet connection" issue for me.

Download it from apkmirror f.e.

The Play Store still has version 4.4.
[Motorola Photon Q 4G LTE] palmwangja:
Indeed. Thanks
[Motorola Photon Q 4G LTE] Galane:
Can I flash this with fastboot? I unlocked the bootloader, rooted with motochopper, used RASHR to install TWRP. Then I booted to TWRP, wiped dalvik and cache then installed CM 12.1

Now All I get is the animated alien head. Let it sit on that for an hour. Booted back to TWRP and installed it again, this time with Gapps. Nope, still just the alien head with the animated circle. Reminds me of the Buck Rogers TV show intro from 1979. "2015 and an American attempts to install Android 5.1 on an old cellphone. 500 years later it finally boots."

The phone is not currently active on Sprint. I'm just wanting to put 5.1 on it to fiddle with while waiting on Samsprint to release Lollipop for North America on the Galaxy S4. (Would not surprise me at all if they just decide that everyone except US/CA is going to get it on the S4.)
[Motorola Photon Q 4G LTE] arrrghhh:
Make sure you have the latest TWRP from the OP of this thread (install that with fastboot, I have no clue what the heck RASHR is...) and do a clean install (fully wipe all the partitions). At the very least you should do a factory reset.

Also if you're still having issues let it sit for more than an hour, it could be doing the fsck process which can take an exceedingly long time.
[Motorola Photon Q 4G LTE] timekiller_9:
I just flashed the latest nightly (cm-12.1-20150501-NIGHTLY-xt897.zip) which includes the following fix:

MotorolaQualcommRIL: override setDataAllowed

This fixed the GSM connection issues for me, no need for the funky work-around with rild any longer.

As for flashing 12.1, I have to agree with arrrghhh about doing a clean install if you're putting it on top of anything other than another 12.1 nightly that was working. When I tried to dirty flash 12.1 on top of 12 I got that same symptom, Android head indefinitely at boot. I would caution you to read my experience in the Q&A thread first though, as it would seem that there is a bug in some of the later versions of TWRP where it corrupts partitions when attempting to wipe them:

http://xdaforums.com/showpost.php?p=60246532&postcount=2

Once you wipe everything and cleanly install, the Android head should only stick around for about 8-10 minutes.

Good luck.
[Motorola Photon Q 4G LTE] Galane:
RASHR Is a recovery and kernel backup/flasher that runs in Android on an unlocked, rooted device. TWRP didn't wipe the partitions right or something screwed them up and it wouldn't just reformat or wipe them so I did some more digging online and used TWRP to change the file system of Data Cache and System to F2FS then downloaded the latest nightly cm-12.1-20150430-NIGHTLY-xt897 and installed it with TWRP.

Finally got it working but could not make it through the setup without it locking up and rebooting. Finally got it going by just quickly skipping through the setup. So now I have a heavy old phone with Android 5.1.1, which I can't use to make or receive calls. ;) Very nice how smooth and quick it is on this 2 year old phone. The Epic 4G I had before it was a real dog even with just 3.1.2.
[Motorola Photon Q 4G LTE] palmwangja:
with not having the setting menu to set up the cpu frequency anymore, what would be the recommendable way to adjust cpu to be a little bit more performant??
[Motorola Photon Q 4G LTE] espeon:
Not really sure where to post this, but since it happened with the version of twrp in the OP, I guess I'll post here.

I was going to switch to 12.1, but my twrp decided that it'd start throwing this error:

E:unable to mount '/cache'
E:unable to mount '/system'

My old Photon Q did this with CWM but didn't do it when I switched to twrp. Now this phone just started doing this, and I haven't a clue why.

It was working fine (would do backups/restores just fine) until today, where when I tried to wipe /data, /system, /cache, and /dalvik-cache. It then started throwing these errors.

Disregard. It turns out that formatting /cache and /system as f2fs fixed this. Reformatting them as ext4 didn't work.

It turns out that systemui was repeatedly crashing and now system refuses to mount again. No idea what's wrong now.
[Motorola Photon Q 4G LTE] comstyle:
happened to me with nightly from 13th of may, too.

flashed back to nightly from 12th of may.
[Motorola Photon Q 4G LTE] espeon:
Just my luck to decide to flash and it happen to be a borked nightly :P