yashsingh1/xdaforums huggingface dataset:
[Moto G General] tpa-moto:
[MENTION=6495692]garrymar[/MENTION] I'm glad it worked.

I can take care of the APN. It seems that Google has that in their APN list, but they are not setting the user and the password:

<apn carrier="Perfectum Mobile"
mcc="434"
mnc="06"
apn="default"
type="default,supl"
/>

but I think I'll add the user and password fields, as shown on the website you linked. In any case this is CDMA, the APN is more of a formality, you could type whatever you wanted and it would still work.

EDIT: Actually, could you check if the APN I wrote works for you (you'll have to delete the database to force a reload)? I think it's better to use the one used by Google.
[Moto G General] ShapeShifter499:
Sorry I took a bit to get back to this but I just got the build completed. 3G data now works but I cannot set a APN, I get "Access Point Name settings are not available for this user"
[Moto G General] tpa-moto:
Isn't there a "+" in the action bar along with the overflow button? If yes, can you do anything with them. For some reason, if there are no APNs Android shows that string.
[Moto G General] ShapeShifter499:
Yes I tried to save a profile for "FreedomPop" and it didn't save.
[Moto G General] tpa-moto:
OK, thanks for trying. I guess I'll remove the APN preferences since they don't work and I can't really debug the problem. I'll see if I can bring back the dummy APN profile to at least get mobile data working without messing with apns-conf.xml, but that's not going to be fun without a device to test with.

---------- Post added at 12:05 ---------- Previous post was at 11:44 ----------

[MENTION=2022267]ShapeShifter499[/MENTION]

If I ignore some code to handle RUIM records, the patch is quite simple: https://review.lineageos.org/#/c/164162/

Would you be able to try that?

vendor/cm/build/tools/repopick.py 164162
cd frameworks/opt/telephony
mkap telephony-common
adb shell restart # probably done automatically by mkap

Please try that without your APN and/or your numeric.
[Moto G General] ShapeShifter499:
I got a bunch of errors, here is my log https://gist.github.com/ShapeShifter499/d929e015e7de669162ebc58baf023aa0 I ran 'mka telephony-common' instead of mkap because this was inside of a systemd-nspawn container running ubuntu 16.04 and I couldn't get adb working inside of it, I was planning to manually copy it over.

---------- Post added at 05:44 AM ---------- Previous post was at 05:39 AM ----------

[MENTION]@tpa-moto[/MENTION] I'll be on #lineageos-dev and #lineageos channels over at Freenode under the same username if you want to message me quicker.
[Moto G General] garrymar:
It would be greatly appreciated! Thank you!

Unfortunately, 3G doesn't work when I remove user/password from APN settings. I've attached both radio logs, one showing successful connection (APN with user/pass), and the other one showing connection failure (APN without user/pass).
[Moto G General] tpa-moto:
https://review.lineageos.org/#/c/164178/
[Moto G General] garrymar:
No comments.

I'm happy to use software maintained by people like you, Gabriele! Thank you!
[Moto G General] ShapeShifter499:
[MENTION=6937116]tpa-moto[/MENTION] I recompiled a new ROM yesterday and I can confidently say that cherry picking only https://review.lineageos.org/#/c/163954/ was all I needed for 3G data to start working. But I have another question, did [MENTION=6495692]garrymar[/MENTION] need the same patch as me to get 3G working? Or did I do something else wrong?
[Moto G General] tpa-moto:
Are you sure you aren't talking about https://review.lineageos.org/#/c/164162/?

All garrymar did was setting the right operator numeric and add the corresponding APN to apns-conf.xml. The patch I linked should make that unnecessary: in case no APN is found, Android creates a dummy APN. I don't know why you need the patch, I should see the radio logcat to maybe know what's happening.
[Moto G General] ShapeShifter499:
I'll be on irc again if you want to go back and forth on it.
[Moto G General] ShapeShifter499:
[MENTION=6937116]tpa-moto[/MENTION] I seem to be having issues again but this time on LineageOS 14.1. The logs seem to suggest that it's trying to go GSM though I have a CDMA Falcon Moto G. Attached is a logcat taken during the crashing.
[Moto G General] tpa-moto:
Uh, that's strange. If you haven't built LineageOS in a while, try reverting these two (random guess):

https://review.lineageos.org/#/c/164162/

https://review.lineageos.org/#/c/169021/

AFAIK there haven't been other relevant changes in the telephony subsystem.
[Moto G General] ShapeShifter499:
I'll give a shot but I'll have to download the entire repository again, so might take me a while. I'll probably post about it tomorrow.
[Moto G General] ShapeShifter499:
I'm sorry it took me so long to give a reply. Seems I had a billing issue with the cellular provider Freedompop. Everything has been resolved and things are working just fine again, it was not an issue with LineageOS.
[Moto G General] tpa-moto:
Well, I decided to make a new build. I only applied http://pastebin.com/raw.php?i=K7RLNdLS as I can't see how https://github.com/CyanogenMod/andr...mmit/3c019b06a3f479c1e9691295f058108b120b533d can do something. I was taking for granted it did, until I actually tried to apply it.

It wasn't a clean build, but I don't think it was needed.

Here it is: https://mega.nz/#!6RAgXRpJ!IAf0fFfAnQUv1yb2qqh2f_uA0LioGvXfe-vM239aSic

PS: I removed the radio assert.

PPS: I don't have a CDMA device, so I can't test whether the change does something or not.

EDIT: Actually, the dummy NV commit might do something, but the code is quite different now, so I'm not sure it's actually needed. I prefer to first try my change alone.
[Moto G General] :
I flashed your build, still no data or calls and settings are all still greyed out. Here's some logs.
[Moto G General] mightysween:
struggling here...lots of module errors first attempt. On to the next :)
[Moto G General] tpa-moto:
Sorry, I was wrong. I can see that dummy NV commit is still needed (the uuic is not getting recognized). I was hoping the new changes in Android 6.0 made that unnecessary, but now I can see Google simply moved some code around, so in the end little changed.

Here another (dirty) build: https://mega.nz/#!6dxllDZI!4_k1QOwyUddHa78VYPu6CfDtKYGJ-XHc3cFhDhkFepA

Changes:

http://pastebin.com/raw.php?i=K7RLNdLS

http://pastebin.com/raw.php?i=gfnJB8La
[Moto G General] mightysween:
is this a missing declaration in CdmaServiceStateTracker.java ??

In 12.1 we get this around line 135:

/** Contains the name of the registered network in CDMA (either ONS or ERI text). */

protected String mCurPlmn = null

CM13 refs this variable several times, but where is the declaration? Either moved up the hierarchy or it is missing...
[Moto G General] tpa-moto:
CdmaServiceStateTracker extends ServiceStateTracker, which is where mCurPlmn is defined.
[Moto G General] mightysween:
ahh, thanks. Certainly a lot of stuff moved around here
[Moto G General] mmims24:
You guys going forward with 6.0.1? I tried a 6.0 build but it would not finish compiling. Thinking of just skipping and trying 6.0.1.
[Moto G General] mightysween:
Yes...built it, but it wont boot for me. Just get a black screen after the bootloader.
[Moto G General] mmims24:
OK I'm going to try 6.0.1 build. But you were right they have moved so much. It's like a puzzle
[Moto G General] mightysween:
what surprises me is that everything compiles fine...no warnings or errors, but then will not boot...something is awry.
[Moto G General] tpa-moto:
Both the builds I posted are based on 6.0.1.

EDIT: and to make it clear, I test them before posting the links.
[Moto G General] inyourface09:
The build I have is very stable, voice and mms are perfect no FC or NPE now, Gapps doesnt freak out anymore.
[Moto G General] tpa-moto:
I'm quite sure http://pastebin.com/raw.php?i=K7RLNdLS is needed and should fix the "SIM not loaded" error.
[Moto G General] :
There seems to be no change with this build. Here's more logs.
[Moto G General] tpa-moto:
Thanks.

12-08 16:44:47.473 D/DCT ( 2546): [0]isDataAllowed: not allowed due to - Attached= false - SIM not loaded - SIM not loaded and not NV subscription - defaultDataSelected= false

This is not OK. It means that the dummy NV commit didn't do its thing. Plus, I can't see the expected lines that are associated to it, so either I did something wrong, or I need to do a clean build.

[MENTION=4785615]inyourface09[/MENTION] did you get phone calls and MMS simply applying http://pastebin.com/raw.php?i=gfnJB8La? If so, could you also try http://pastebin.com/raw.php?i=K7RLNdLS?

If you take a better at the code, you'll see that the part which assigns the value to "allowed" doesn't make much sense.

Why would one check both "recordsLoaded" (which I guess is always false for CDMA phones) and "(subscriptionFromNv || recordsLoaded)"? Also, the code indentation clearly shows that "(subscriptionFromNv || recordsLoaded)" was meant to replace "recordsLoaded". Finally, just take a look at the same change in CM-12.0/CM-12.1.
[Moto G General] inyourface09:
Ill add that in and run a build, THIS fixes NPE of reverse call back in phone. Also gapps doesnt crash anymore due to attempting connection.
[Moto G General] tpa-moto:
As I PMed you, are you sure that that's the fix and not http://review.cyanogenmod.org/#/c/123070/? I'm just asking, I haven't seen any log and I know that the reverse lookup was causing issues to anyone.
[Moto G General] tpa-moto:
[MENTION=5768732]amarc78[/MENTION]

You may need to add the following prop:

ril.subscription.types=NV,RUIM

This should enable the CDMA options.
[Moto G General] :
I will try that and let you know the results later when I get home from work.
[Moto G General] rluebke1984:
Following
[Moto G General] mightysween:
been working alot...not much time. Just did a make clobber + sync and have have builds booting. Hope to get some test time in tomorrow
[Moto G General] mmims24:
Sorry I've been MIA for a few days, been busy with work and sick children. Got build environment set up hoping to get a couple of test builds done over the next few days.
[Moto G General] mrfeh:
+1 I'd really like to have CM13 on my phone.

Once things are working, how quickly do things generally get rolled into a CM nightly?
[Moto G General] :
This did enable all the data options. I have signal bars instead of no sim icon. I also have calls and SMS working and it even says Boost Mobile for carrier label, but no data. Some logs
[Moto G General] tpa-moto:
Thanks! Now I wonder how things are working in cm-12.1, considering that without the prop the options are grayed out...

Anyway, I noticed something strange in your log. It seems that either Google or CAF is ditching CDMA phones in favor of LTE over CDMA phones. Now, the class that handle LTE over CDMA is maybe making the one that handles CDMA phones unnecessary, but I find strange that both of them are there and they are quite different. So, before reading thousands of lines of code and log, I'd try with this simple patch and see if things change: http://pastebin.com/raw.php?i=ktPPR6wZ

I just built the affected component, but if you prefer, I can upload an complete build. This is the file: /system/framework/telephony-common.jar
[Moto G General] mightysween:
The root problem is still lack of SIM slot or integrated ICC. This is one of very few devices like this...

The fix will be mainly feeding dummy SUB...not rebuilding how CDMA is handled.

---------- Post added at 01:37 PM ---------- Previous post was at 01:36 PM ----------

check out two most recent proposed commits... this is the right track to be on

http://review.cyanogenmod.org/#/c/123512/
[Moto G General] mightysween:
I am away from my PC, but it would be great if someone from here could review that code on gerrit...looks good
[Moto G General] :
I tried this and it booted to a black screen with nothing showing but the power menu when holding power.
[Moto G General] tpa-moto:
Damn, I really hope this is because I was too lazy to make a build. I will try to make a new build and if it keeps happening, then I'd probably need to debug the problem.

That's me actually.
[Moto G General] mightysween:
Ahhh...

So, if that all works, it seems like the only piece missing compared to CM12 is the "lte capable" config.
[Moto G General] tpa-moto:
http://review.cyanogenmod.org/#/c/123512/ depends on http://review.cyanogenmod.org/#/c/123920/ and I'm starting to think that it simply makes http://review.cyanogenmod.org/#/c/123835/ unnecessary.

This could explain why the prop (http://review.cyanogenmod.org/#/c/123835/) wasn't needed in CM-12.1 and http://review.cyanogenmod.org/#/c/123920/ could explain why we had to set the prop to get CDMA working. The dummy NV commit changes the CDMAPhone class, which is simply not used right now.

[MENTION=5768732]amarc78[/MENTION]

Did you need to manually set CDMA to get rid of the no SIM error? Did you ever need to do it with CM-12.1?
[Moto G General] :
Yes, I had to set it to NV. It was set to RUIM/SIM by default. I don't remember for sure about earlier CM12.1, but newer builds were always set to NV, and everything was working right away on first boot so it would go through setting up your Google account and all that. I will try unzipping that last build and adding the file and flashing it again and see what happens before you go through the trouble of another build. I'll let you know shortly.
[Moto G General] tpa-moto:
Sorry, my previous post wasn't really related to yours.

Things changed, and the "LTE capable" thing should no longer be needed, but I'm not sure to be honest. There's too much to look at and not having a phone to debug with makes everything more complicated.

Anyway, the "lte capable" flag affected the following:

https://github.com/CyanogenMod/andr...nternal/telephony/uicc/IccCardProxy.java#L226

and now we have:

https://github.com/CyanogenMod/andr...nternal/telephony/uicc/IccCardProxy.java#L172

OK, this means that the dummy NV commit automatically sets NV.

And don't bother testing the jar, I'll make a new build.
[Moto G General] tpa-moto:
I intentionally excluded "ril.subscription.types=NV,RUIM". I'd like to see if the dummy NV commit makes that unneecesary. This require a clean flash of the build, otherwise the previous setting is automatically applied. If necessary, add the prop and select the correct mode.

Let's see if it works now.

https://mega.nz/#!HMYgXLST!99GAEYY51C8EQcvOco7h09QS8Ny8tzaKRFWYbruzfu0
[Moto G General] Lucas Eugene:
Hey I tried your build on xt1031 I got the no sim error no calls SMS 3g etc what are the build prop edits though
[Moto G General] tpa-moto:
The prop is

ril.subscription.types=NV,RUIM

You need to manually select NV somewhere in the settings after it's set.

Could you grab a logcat (radio) without this prop first? Maybe reboot first, to keep it short.
[Moto G General] mmims24:
I made a build with same commits but I included the NV commit. I get boost mobile, APN is correct, calls and SMS are iffy but no data.
[Moto G General] :
Here you go, I had the same results as last time.
[Moto G General] tpa-moto:
Thanks!

I can see in your log the same lines inyourface09 posted, but at least now the right class is used and the dummy SUB commit is actually doing something.

Basically DcTracker is expecting an APN of type 'default', but you only have one of type 'mms'. The APN list is basically the same as the one in cm-12.1, so even there you only have an APN of type 'mms'.

Could someone provide a radio logcat from cm-12.1? I'd like to see what happens there and how the lack of an APN of type 'default' is handled.

You may get around this problem (no mobile data) by appending ',default' to 'mms' to the existing APN, but I'm not sure this is right way to "fix" the problem.
[Moto G General] :
[MENTION=6937116]tpa-moto[/MENTION] here's a CM12 .1 log.
[Moto G General] hhp_211:
[MENTION=6937116]tpa-moto[/MENTION]

If helpful here's my radio log on a fresh boot

Rom: Broken Os

Android 5.1.1

cdma: Verizon/PagePlus

View attachment 3574542
[Moto G General] :
I tried yesterday, but it didn't seem to do anything.
[Moto G General] tpa-moto:
If possible, could you grab a logcat for this case too?

Meanwhile, I'll try to understand why the dummy APNs are no longer created.
[Moto G General] hhp_211:
Oh yeah, I remember that I add/change these build.prop lines

I don't remember whether they are all necessary,,, but I do remember using these back when cdma was getting worked on and fixed in cm12.1 and I basically do it now for any ROM I flash to ensure Verizon things work properly.

ro.cdma.homesystem=64,65,76,77,78,79,80,81,82,83

ro.com.android.dataroaming=false

ro.cdma.home.operator.isnan=1

ro.cdma.otaspnumschema=SELC,1,80,99

ro.cdma.data_retry_config=max_retries=infinite,0,0,10000,10000,100000,10000,10000,10000,10000,140000,540000,960000

ro.gsm.data_retry_config=default_randomization=2000,max_retries=infinite,1000,1000,80000,125000,485000,905000

ro.gsm.2nd_data_retry_config=max_retries=1,15000

ro.cdma.home.operator.numeric=310004

ro.cdma.home.operator.alpha=Verizon

ro.telephony.default_network=4

ro.com.google.clientidbase.ms=android-verizon

ro.com.google.clientidbase.am=android-verizon

ro.com.google.clientidbase.yt=android-verizon

ro.gsm.sim.operator.alpha=Verizon

ro.gsm.sim.operator.numeric=310004

ro.gsm.operator.alpha=Verizon

ro.gsm.operator.numeric=310004

ro.gsm.sim.operator.iso-country =US

ro.gsm.operator.iso-country=US
[Moto G General] tpa-moto:
[MENTION=983303]hhp_211[/MENTION]

You APNs are part of the list included in CyanogenMod (https://github.com/CyanogenMod/android_vendor_cm/blob/cm-12.1/prebuilt/common/etc/apns-conf.xml). All the necessary props should be already set by init: https://github.com/CyanogenMod/andr...lcon/blob/cm-12.1/init/init_falcon.c#L91-L124

Thanks. For some reason only the 'mms' APN is available and mobile is not working because there's no 'default' APN, so same as before.
[Moto G General] tpa-moto:
So, the CDMAPhone class change looks wrong now, I can see that a bunch of other things expects CDMALtePhone and GSMPhone only. So I think we need to switch back to CDMALtePhone (which extends CDMAPhone) and use https://github.com/CyanogenMod/andr...mmit/31b4840288f1bbda9f1f108102a15e710c23fcad as I initially said. However, we should still hit the APN issue.

[MENTION=5768732]amarc78[/MENTION]

One condition to have the dummy APNs created is not to have them in the first place. What happens if you remove the only APN you have and reboot? (according to the logs, you only have one APN).

https://mega.nz/#!nUYjTD7S!3x1Zhdrt2kbYBI0MxpyYV6bpvrmm0uFlOAALxgg5u_w
[Moto G General] :
Just got word from a dev on Android Forums who makes an awesome unofficial CM and PA rom, and

says he's working with CM13 Falcon maintainers to get the CDMA issue fixed. I'm sure we'll have data working soon one way or another.
[Moto G General] inyourface09:
Awesome work so far guys. I'd help more but im starting a new job and im having to learning alot on my spare time.

This is the commit we are needing guys. I've tried to add it in but resulted in hellish compiling errors which I wasn't sure how to fix. Wasn't sure we needed it to begin with.

Fix APNs
[Moto G General] :
Here's another one.

Edit: forgot something.
[Moto G General] tpa-moto:
That's an old hack (this should be the original commit: https://github.com/CyanogenMod/andr...mmit/a7df42250243eb508a99d131760963de51950d6c) and it was reverted (https://github.com/CyanogenMod/andr...mmit/76e8804a224dbb13aeea0ad4df25ef8ac34fdca7) in favor of https://github.com/CyanogenMod/andr...mmit/a09b9dc42d0c89e0b04762a5a24a7ef8ba3eed9c, which is a better solution. FYI the errors you got are probably due to the fact that APNSetting needs an additional argument in Android 6.0.

The problem here is different though. The dummy APNs are not created because there exists an APN and for some reason deleting it doesn't work, or at least that's my understanding reading the log that amarc78 posted. I don't know why cm-12.1 doesn't load the APN from the list, but here it does.

Let's see what happens changing the order of the function calls. I'm not sure this is a good solution, because dummy APNs might be created even when valid APNs are available (and maybe needed). For instance, with this change hhp_211's phone ends up with dummy APNs.

https://mega.nz/#!CMhTiQJC!GB0eUE-51SLLuiLHT5-Gf0bzpPCNvobvu9i6a2ju6F4

Change: http://pastebin.com/raw.php?i=z4HGBhfh

Disclaimer: I didn't have the time to test it, but I used the same sources as the last time, so it should be fine.
[Moto G General] :
Who's got that N.A.S.A gif? I have data!! [MENTION=6937116]tpa-moto[/MENTION] I don't know where you came from, or why you wanted to help with this, but thank you ever so much! Here's one last log to see how it's working now. Nice work!

Edit: thanks a lot to all you other guys for the help also!
[Moto G General] tpa-moto:
OK, but this is not over yet.

First, I don't think we should use "ril.subscription.types=NV,RUIM", because if I understood correctly you don't have a SIM tray, so this option is pointless and wrong. Second, you had to manually select NV.

I wonder what happens now that all the needed patches are included if you remove the prop, perform a data wipe and reboot.

Lastly, I have to check whether my last change is fine or not, because I have some doubts on that and I'm not really familiar with CDMA and US carriers.

My goal is to get cm-13.0 automatically select the right mode.
[Moto G General] hhp_211:
That so awesome to hear data is working,

Do you have the" roaming indicator off"

When on the lock screen like cm12.1 had?

I'm gonna try things out again later tonight [MENTION=6937116]tpa-moto[/MENTION]

Ditto on this,,, I don't know where you came from or what compels you to plug away on this for us, but many thanks!!!!
[Moto G General] :
It actually said Boost Mobile. [MENTION=6937116]tpa-moto[/MENTION] I was thinking the same about this fix after the fact. I got a little exited seeing the CM update notification pop up suddenly. I did what you said and I ended up back to square one with no data or anything, and all network settings greyed out again. Here's a log after doing that.
[Moto G General] tpa-moto:
Thanks, I think I know what's wrong now, we need to change this to true: https://github.com/CyanogenMod/andr...e/res/res/values-mcc310-mnc004/config.xml#L38 (this is Boost Mobile, I have to do the same for the other carriers we support)

EDIT:

Sorry, I think that won't work.
[Moto G General] :
I was thinking the same thing when I looked at that commit.
[Moto G General] hhp_211:
311870 is Boost

310004 is Verizon
[Moto G General] inyourface09:
what is the last commit you added in [MENTION=6937116]tpa-moto[/MENTION]
[Moto G General] hhp_211:
Just clean installed latest ( cm-13.0-20151214-UNOFFICIAL-falcon ),

edit: and switched setting to NV

and got 3g data right away, texting worked too!! but not MMS.

My sim status screen showed boost mobile.

Loaded up my normal and previously posted build.prop edits

Booted back up,

That got status showing unknown network and MMS still didn't work, so I installed an older messaging app that I knew worked in 5.1.1 and mms worked fine with it, made a successful test phone call too.

Freakin excited to see 6.0 completely working on our Moto G!

[MENTION=6937116]tpa-moto[/MENTION]
[Moto G General] n0ts0smart:
Awesome work guys. Been following this thread since the beginning and hats off to everyone who took time out of their real lives to work on this.

Just wondering, not in a huge rush or anything, but any idea on a timeframe when the fix will get merged? Or do things still need cleaned up before that's even a possibility?