yashsingh1/xdaforums huggingface dataset:
[Moto G General] tpa-moto:
Thanks.

01-20 21:52:23.602 D/CdmaSST ( 1511): [CdmaLteSST] RIL_REQUEST_OPERATOR.response[2], the numeric, is bad. Using SystemProperties 'ro.cdma.home.operator.numeric'= 310000

Wait, ro.cdma.home.operator.numeric=310000? Weird.

I downloaded the Boost Mobile factory image and indeed ro.cdma.home.operator.numeric isn't in the build.prop. Looking better at it, I found that Sprint based carriers use /system/bin/Omadmloadproperty which takes care of settings few props. Extracting the strings from that binary I can see that it reads stuff from /persist, where there are probably two sort of mini build.prop files. It would be nice to have a look at a dump of /persist of an XT1031. Keep in mind that there might be information one would not like to share. For instance, in my /persist there's stored the WiFi MAC address and BT MAC address. Maybe CDMA phones have more.

If you are OK with sharing it, you can create a dump with the following command (run it as root):

dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.dump

Be careful with dd. The dump will be in /sdcard/persist.dump.

You can email it to me (you can get the address from one of my commits, do it through XDA or ask for it via PM. I'd prefer not to post the address in clear here, cause you know, SPAM) or PM it to me if you don't want to post it here.

01-20 21:52:24.635 D/RILJ ( 1511): [3699]< OPERATOR {000000, , 000000, , , } [SUB0]

Good, even stock gets 000000, which leads to a numeric equals to 310000.

01-20 21:52:28.550 D/DCT ( 1511): [0]getPreferredApn: apnSetting=[ApnSettingV3] Sprint, 2382, 310000, null, , <web url omitted>, 68.28.31.7, 80, , 3, default | mms | fota, IPV4V6, IPV4V6, true, 4, -1, false, 0, 0, 0, 0, ,
01-20 21:52:28.550 D/DCT ( 1511): [0]getPreferredApn: apnSetting=[ApnSettingV3] Sprint, 2383, 310000, null, , <web url omitted>, 68.28.31.7, 80, , 3, default | mms | fota, IPV4V6, IPV4V6, true, 5, -1, false, 0, 0, 0, 0, ,
01-20 21:52:28.550 D/DCT ( 1511): [0]getPreferredApn: apnSetting=[ApnSettingV3] Sprint, 2384, 310000, null, , <web url omitted>, 68.28.31.7, 80, , 3, default | mms | fota, IPV4V6, IPV4V6, true, 6, -1, false, 0, 0, 0, 0, ,
01-20 21:52:28.550 D/DCT ( 1511): [0]getPreferredApn: apnSetting=[ApnSettingV3] Sprint, 2385, 310000, null, , <web url omitted>, 68.28.31.7, 80, , 3, default | mms | fota, IPV4V6, IPV4V6, true, 7, -1, false, 0, 0, 0, 0, ,
01-20 21:52:28.550 D/DCT ( 1511): [0]getPreferredApn: apnSetting=[ApnSettingV3] Sprint, 2386, 310000, null, , <web url omitted>, 68.28.31.7, 80, , 3, default | mms | fota, IPV4V6, IPV4V6, true, 8, -1, false, 0, 0, 0, 0, ,

So, given that the numeric is 310000, it uses the Sprint APN with mcc=310 and mnc=000.
[Moto G General] :
[MENTION=6937116]tpa-moto[/MENTION] I pm'd you with a persist dump.
[Moto G General] tpa-moto:
I didn't receive anything, but HandsomeOne gave me his persist dump, so no problem.

Anyway, this is yet another game changer. This is what I planned to do: init will first look for androidboot.carrier=vwz to detected converted XT1031. If vwz is not found, it will check whether /persist/prop/ro_cust.prop exists or not. If it does, it starts Omadmloadproperty, which will take care of setting the right numeric and operator name in base of what there's in /persist (this is for Sprint MVNOs). In all the other cases, the numeric and the operator name is not set. I can't do much without more information unfortunately.

If you are not on a Sprint MVNO, please tell me if also have /persist/prop/ro_cust.prop, because in that case I'd need to make the carrier detection a bit smarter..
[Moto G General] tpa-moto:
Here a "release candidate".

I updated the APN list, it now includes all the Sprint entries of the stock apns-conf.xml. I also re-added the 'bearer_bitmask' field to the APNs, which is not really needed, but I wanted the list as close as possible to the stock one. For the same reason, I removed the 'dun' type to the APN for Verizon. This is needed for tethering. If tethering was possible, but it isn't anymore, just tell me and I'll readd 'dun'.

As for Omadloadproperty, I think it always sets the numeric to 31000 and the operator name to Chameleon (plus some other props), so nothing I can't do manually. However, I included it in this build to verify this. All you have to do is to get the output of 'getprop' and post it somewhere.

Also, if you try this build, please grab the radio logcat, logcat and the dmesg.

Lastly, try to remove the following files from recovery before rebooting, just to be extra sure:

/data/data/com.android.providers.telephony/databases/telephony.db-journal
/data/data/com.android.providers.telephony/databases/telephony.db

Link: https://mega.nz/#!qNAjDZbQ!kuYR8Nk9FBl3J5_rDc2BrSUvTS0yKO0kjO-dL3P7ak0

EDIT: There's a problem with SELinux, flash this kernel on top of this build: https://mega.nz/#!OVYUSTZQ!QSc4MehqArcBN6Xc817xFIqzXfXUCSGX2Jx9qE-Mzpg

EDIT: See http://xdaforums.com/showpost.php?p=64929188&postcount=258

[MENTION=5768732]amarc78[/MENTION] [MENTION=983303]hhp_211[/MENTION] [MENTION=1367165]HandsomeOne[/MENTION]
[Moto G General] hhp_211:
Cool, I hope to try this out tonight,,, been crazy day or two for me.

Here is a zip that will clean those telephone database

View attachment 3618126

.
[Moto G General] :
Data works, but no MMS with stock or 3rd party apps. 8sms reads the apns and you can edit them, but now it isn't.
[Moto G General] tpa-moto:
Something's wrong with mutilrom and SELinux. There are quite some denials in the dmesg, including these:

[ 8.551854,3] init: avc: denied { set } for property=com.google.clientidbase.ms scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service
[ 8.552040,3] init: sys_prop: permission denied uid:0 name:ro.com.google.clientidbase.ms
[ 8.553590,3] init: avc: denied { set } for property=com.google.clientidbase.am scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service
[ 8.553841,3] init: sys_prop: permission denied uid:0 name:ro.com.google.clientidbase.am
[ 8.554138,3] init: avc: denied { set } for property=com.google.clientidbase.yt scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service
[ 8.554398,3] init: sys_prop: permission denied uid:0 name:ro.com.google.clientidbase.yt
[ 8.554653,3] init: avc: denied { set } for property=cdma.home.operator.numeric scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service
[ 8.554905,3] init: sys_prop: permission denied uid:0 name:[COLOR="Red"]ro.cdma.home.operator.numeric[/COLOR]
[ 8.555217,3] init: avc: denied { set } for property=cdma.home.operator.alpha scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service
[ 8.555502,3] init: sys_prop: permission denied uid:0 name:ro.cdma.home.operator.alpha
[ 8.556591,3] init: avc: denied { set } for property=tether.denied scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service
[ 8.556790,3] init: sys_prop: permission denied uid:0 name:ro.tether.denied
[ 8.557074,3] init: avc: denied { set } for property=mot.hw.uaprof scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service
[ 8.557316,3] init: sys_prop: permission denied uid:0 name:ro.mot.hw.uaprof
[ 8.557583,3] init: avc: denied { set } for property=persist.sprint.dm.uaprof scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service
[ 8.557826,3] init: sys_prop: permission denied uid:0 name:persist.sprint.dm.uaprof

EDIT: sorry, I think I didn't include one change for SELinux...

---------- Post added at 11:49 AM ---------- Previous post was at 11:30 AM ----------

I'm sorry, I definitely forgot to re-apply one change after I synced the sources.

Flashable zip (kernel): https://mega.nz/#!OVYUSTZQ!QSc4MehqArcBN6Xc817xFIqzXfXUCSGX2Jx9qE-Mzpg

[MENTION=5768732]amarc78[/MENTION], still, there are some denials that IMO shouldn't be there.
[Moto G General] :
It's probably because with SELinux set to enforcing, CM13 can't access sdcard as a secondary rom until it's set to permissive. Maybe [MENTION=3132221]sub77[/MENTION] can figure something out. Without Multirom, it would take me much longer to install and post logs.
[Moto G General] tpa-moto:
[OT]

audit2allow generated the following rules. They won't probably fix all the problems, but it's a good start. I don't know how multirom works, never looked at it, so I don't know where one should apply these rules. (Usually 'getattr' is followed by 'open' or 'use', so I'm sure these are not enough)

#============= init ==============
allow init blkid_exec:file getattr;
allow init clatd_exec:file getattr;
allow init dex2oat_exec:file getattr;
allow init dnsmasq_exec:file getattr;
allow init hostapd_exec:file getattr;
allow init ppp_exec:file getattr;
allow init procrank_exec:file getattr;
allow init runas_exec:file getattr;
allow init sdcardd_exec:file getattr;
allow init sgdisk_exec:file getattr;
allow init system_file:file setattr;
allow init userinit_exec:file getattr;

#============= sdcardd ==============
allow sdcardd unlabeled:file { read open };

#============= system_server ==============
allow system_server persist_file:dir read;

[/OT]

EDIT:

To be more clear, multirom is fine to test this.
[Moto G General] tpa-moto:
I made another build, this time without Omadloadproperty.

Same as http://xdaforums.com/showpost.php?p=64922188&postcount=252

init will set the following props for Sprint MVNOs:

ro.mot.build.customerid=sprint
ro.cdma.home.operator.alpha=Chameleon
ro.cdma.home.operator.numeric=310000
ro.com.google.clientidbase.ms=android-sprint-mvno-us
ro.com.google.clientidbase.am=android-sprint-mvno-us
ro.com.google.clientidbase.yt=android-sprint-mvno-us

If you are not using a Sprint MVNO, this and the previous build are equivalent.

Link: https://mega.nz/#!iM4WTCCS!icq1LwX7WudDjt8V082hPgZ0RpZvrfJbHEr710uZy3k

Verizon typo edition - Link: https://mega.nz/#!iRYxxBzQ!O1nO2TKDYy7oX8fjgXrS6_uJMQJpuVI9nETNpYpf7Rs

EDIT: Crap, I noticed a typo for Verizon. The old builds now have NOVERIZON appended to the name, so that you can recognize them.
[Moto G General] hhp_211:
So that's your secret!
[Moto G General] tpa-moto:
And I must say that I'm really happy he is using MultiROM, probably It would have taken me a lot more without his logs.

Anyway, I don't know if users get notified when mentioned after an edit, so please take a look at the edit of my previous post.
[Moto G General] hhp_211:
Don't seem to get notified on editing a post.

Yeah, sorry I've been horrible on speed for installing roms and getting logs

Yes backups take forever now that dalvik is included in data, I could wipe before, but that defeats the purpose...
[Moto G General] :
[MENTION=6937116]tpa-moto[/MENTION] here's logs from the last build. I think flashed the right one. Data works fine, no MMS with stock app, but working with 3rd party app.
[Moto G General] HandsomeOne:
Same here used 8sms OK , stock app ng
[Moto G General] tpa-moto:
Good. I'd say MMS are broken for CDMA (NV at least) and unfortunately the logs don't say enough to allow me fix them remotely. At least you can rely on third party apps.

Last thing. I decided to include the support also for USC. Looking at the factory image, I found that they have the following directory "/pds/public/usc/". Could you please check that you (Sprint MVNO) don't have it? Because this is how it the detection will work:

If "ro.boot.carrier=vzw", then set Verizon
If "/pds/public/usc" exists, then set US Cellular
If "/persist/prop/ro_cust.prop" exists, then set Sprint

The higher in the list, the higher the priority. I gave "/pds/public/usc" a higher priority simply because it looks more specific than "/persist/prop/ro_cust.prop".

Anyway, I just have to decide whether to use the custom APN list or not, then I think I'll enable the nightlies.
[Moto G General] HandsomeOne:
Ringplus MVNO does not have /pds/public/usc/ .
[Moto G General] mmims24:
Boost does not have /PDS/public/USC.

I'm not sure what was added but around the 01/19 builds, I lost ability to send MMS with 3rd party app. True for CyanPop and AICP. Data still works using flashable APN fix, and can receive MMS but sending MMS is out.
[Moto G General] mmims24:
https://drive.google.com/file/d/0BwKhuaoXFMbHaDhUWmsya0ozWUU/view?usp=docslist_api

Here is logcat, dmesg, and kmesg from AICP, 20160119 build, just in case there's something useful here.
[Moto G General] hhp_211:
[MENTION=6937116]tpa-moto[/MENTION]

yes on 1/22 build, as others have said Data works fine, no MMS with stock app, but working with 3rd party app.

here is a full on boot adb logcat

started with wifi enabled, switched to 3G, then tried stk mms (which fails), switched to awsms (sent/received test mms)

thanks
[Moto G General] Phrodini:
There's new builds of resurrection for CDMA? How Would I be able to get the normal resurrection rom and make it work with my CDMA phone?
[Moto G General] tpa-moto:
Take a look a tomorrow's nightly changelog ;)

Thank you for your help, [MENTION=5768732]amarc78[/MENTION] in particular.
[Moto G General] :
Your very welcome. It was a pleasure. But, it was you who was helping us! Thank you!
[Moto G General] hhp_211:
Woo Hoo!! Thanks So much CDMA users rejoice!:highfive::good:
[Moto G General] HandsomeOne:
Yeah 01/23 flashes fine i have data and text, no mms stock apk but third party sms ok ? But i'am am using Ringplus mvno, Maybe i can make manual adjustments. Thanks
[Moto G General] Phrodini:
Where is this located?
[Moto G General] :
http://www.cmxlog.com/13/falcon/
[Moto G General] Phrodini:
Thanks
[Moto G General] tpa-moto:
I have one more patch that I found some time ago and just remembered.

It should fix whatever needs the SIM state to be 'READY' (it's constantly 'ABSENT' for you and only momentarily 'READY').

Patch: https://android-review.googlesource.com/#/c/83482/ (interestingly, this is from a Motorola employee and I can see that it's used in their stock ROMs).

Here attached a flashable zip. Backup /system/framework/telephony-common.jar, just in case, or reflash the build you are currently using.
[Moto G General] mrfeh:
please let us know...

I'd appreciate it if somebody watching the CM nightlies would let us know when these changes are baked into CM.

I'm running the 1/14 nightly (with changes provided from this thread), and I'm occasionally seeing spurious reboots.

Thanks.
[Moto G General] :
They've been merged since the 1/23 nightly. Cyanpop and Resurrection Remix are good to go also. AICP will be with the next build.

Edit: AICP should be good to go now with the 1/25 nightly.
[Moto G General] mmims24:
[MENTION=5768732]amarc78[/MENTION] you are correct, I flashed said AICP and it is good to go. Also the new BlisdPop M builds are good to go for CDMA as well.
[Moto G General] n0ts0smart:
[MENTION=6937116]tpa-moto[/MENTION] [MENTION=5768732]amarc78[/MENTION]

Nice to finally flash CM13 based ROMs without having to edit the updater script anymore. You guys are awesome...Thank you.

I do have a question though and thought maybe someone with more sense than me could help. Is there a workaround/flashable zip to get CDMA working with Slim based ROMs? For example the new Tesla build 1-25. The updater script allows you to flash the ROM but no mobile data.

Not expecting you to work on it or anything but thought maybe you would have some idea of what could be done. Any ideas?
[Moto G General] :
I'll have to check out that Tesla build and see if I can get it working. I don't know if Flashhh missed a commit or what, but I couldn't get data on the 1/25 AICP build.
[Moto G General] n0ts0smart:
I had to flash the "delete database edit apn list add prop fix" zip you provided to get the 1-25 AICP build running with data. That same zip did not work on the Tesla build though.
[Moto G General] Phrodini:
By bad for the ignorance but where are resurrection remix and such are located for CDMA phones, from the official threads themselves?
[Moto G General] tpa-moto:
If you try http://xdaforums.com/showpost.php?p=64975899&postcount=277, please tell me if the APN settings become available (and if possible, post a radio logcat).

That zip works only in case all the needed patches for CDMA NV mode (except for one that is not really relevant) are in the framework. If that doesn't work, you have to use a patched telephony-common.jar, but I'd advise against using one of another ROM since that could easily lead to bootloops (it depends on how different the ROMs are).
[Moto G General] n0ts0smart:
I flashed the zip from your post to try and see if i coulf edit the APN however it caused bootloop. I have also just for the sake of trying replaced the telephony-common jar from AICP because it was handy, but unfortunately that resulted in continuous FC's from android.com.phone.

Thanks so much for your help if you need me to try anything else or need logs I can provide.
[Moto G General] mmims24:
I updated from 0119 build which I had flashed with the fix zip by [MENTION=6937116]tpa-moto[/MENTION], to the 1025 AICP nightly. Flashed nightly, wiped dalvik and cache and rebooted. Data works fine for me.
[Moto G General] :
Strange, I tried it 2 or 3 times and only got full signal bars but no 3G icon. What model and carrier do you have?
[Moto G General] mmims24:
I'm on XT1031 and boost is my carrier. It could be that I dirty flashed the update and the telephony. db was already correct from me flashing the older nightly with the database fix.
[Moto G General] tpa-moto:
The zip in my last post replaced your telephony-common.jar with a one for CyanogenMod, which, as said, is something you should avoid.

Is there someone still using cm-13.1 that can try http://xdaforums.com/showpost.php?p=64975899&postcount=277? [MENTION=1367165]HandsomeOne[/MENTION] maybe?
[Moto G General] :
I still get no sim in the status bar until 3G connects, then only says roaming indicator off.
[Moto G General] tpa-moto:
That's good. You get "Roaming Indicator Off" because the framework is instructed to get the operator name from the eri files, but since the numeric is 310000, nothing is found and it uses a default string. I just need to flip a bool for that and the operator will (or at least should) not show up. This is also what Motorola is doing and it makes sense since 310000 == multiple carriers.

How about the attached zip, flashed on top of the previous one?
[Moto G General] :
Same as above.
[Moto G General] tpa-moto:
Sorry, I just noticed that the flag doesn't do anything in our case. I guess I need to use an empty string instead of the operator name. I can see that Motorola did some modification, because there are options such as config_spn_on_roamind_off (set to true) that don't exist in Android.

I have use the Sprint ERI as base and did as follows:

<EriInfo RoamingIndicator="0" IconIndex="0" IconMode="0" EriText="[COLOR="Red"]Domestic Roaming[/COLOR]" CallPromptId="0" AlertId="0" DataServiceSupport="1" />
<EriInfo RoamingIndicator="1" IconIndex="1" IconMode="0" EriText="" CallPromptId="0" AlertId="0" DataServiceSupport="1" />
<EriInfo RoamingIndicator="2" IconIndex="2" IconMode="1" EriText="[COLOR="Red"]International Roaming[/COLOR]" CallPromptId="0" AlertId="0" DataServiceSupport="1" />

'Roaming Indicator Off' should be the second one here above. That is normally used for 'Sprint', but here I used an empty string since using 'Sprint' is probably not the best. The others in red are other possible things you might see and kept whatever is used for Sprint.

PS: logs should be needed this time.
[Moto G General] mmims24:
Do we need to flash this zip on a specific nightly?
[Moto G General] mmims24:
I just flashed the 20160124 Bliss official zip and data works out of the gate. But with this ROM we get "Roaming indicator off". Any files or logs would help? I remember testing for [MENTION=221668]luca[/MENTION]040200 with getting the boost overlays merged into cm12.1. Maybe he could give us some insight on doing the same for cm13. [MENTION=6937116]tpa-moto[/MENTION] let me know if a certain file or log would be of any help to you.
[Moto G General] :
Ihad to reflash the ROM and then the zip because I got a bootloop flashing over the other zips. Carrier label says no service in quick settings, and status bar says no sim.
[Moto G General] tpa-moto:
Everything I post is for CM-13.0. And yeah, I know about the overlays, they are still there. The thing is that Android picks them depending on the numeric and there's nothing that matches 310000.

The SIM state is 'ABSENT', so I guess you didn't use the patched telephony-common.jar for this.

As for the carrier label, I can see that it's initially set to 'No service.', but I see that it's then set to an empty string, at least according to the log. Maybe it needs the SIM status to be READY to actually update the value displayed (an empty string in this case). Either this or it doesn't like the empty string.

I now wonder how this worked in cm-12.1.

PS: I guess the patched telephony-common.jar for the SIM status didn't do anything for MMS and APN settings, am I right?
[Moto G General] HandsomeOne:
You are correct still no MMS .
[Moto G General] :
Your right, I forgot to flash the telephony-common.jar. This time I did and have nothing in the status bar and no service in quick settings. No mms with stock app.

Edit: if you'd like, I can flash CM12.1.
[Moto G General] mmims24:
This is from /android-device-motorola-falcon/init/init_falcon.c from github for cm12.1

INFO("CDMA variant=%s", cdma_variant);

********if (ISMATCH(cdma_variant, "verizon")) {

************/* xt1028 */

************property_set("ro.product.device", "falcon_cdma");

************property_set("ro.build.description", "falcon_verizon-user 4.3 14.10.0Q3.X-84-14 16 release-keys");

************property_set("ro.build.fingerprint", "motorola/falcon_verizon/falcon_cdma:4.3/14.10.0Q3.X-84-14/16:user/release-keys");

************property_set("ro.build.product", "falcon_cdma");

************property_set("persist.radio.multisim.config", "");

************property_set("ro.mot.build.customerid", "verizon");

************property_set("ro.cdma.home.operator.alpha", "Verizon");

************property_set("ro.cdma.home.operator.numeric", "310004");

************property_set("ro.com.google.clientidbase.ms", "android-verizon");

************property_set("ro.com.google.clientidbase.am", "android-verizon");

************property_set("ro.com.google.clientidbase.yt", "android-verizon");

********} else {

************/* xt1031 */

************property_set("ro.product.device", "falcon_cdma");

************property_set("ro.build.description", "falcon_boost_edf-user 5.0.2 LXB22.99-18 9 intcfg,release-keys");

************property_set("ro.build.fingerprint", "motorola/falcon_boost_edf/falcon_cdma:5.0.2/LXB22.99-18/9:user/intcfg,release-keys");

************property_set("ro.build.product", "falcon_cdma");

************property_set("persist.radio.multisim.config", "");

************property_set("ro.mot.build.customerid", "sprint");

************property_set("ro.cdma.home.operator.alpha", "Boost Mobile");

************property_set("ro.cdma.home.operator.numeric", "311870");

********}

********property_set("ro.telephony.default_network", "4");

********property_set("ro.telephony.gsm-routes-us-smsc", "1");

********property_set("persist.radio.vrte_logic", "2");

********property_set("persist.radio.0x9e_not_callname", "1");

********property_set("persist.radio.skip_data_check", "1");

********property_set("persist.ril.max.crit.qmi.fails", "4");

********property_set("ro.cdma.home.operator.isnan", "1");

********property_set("ro.cdma.otaspnumschema", "SELC,1,80,99");

********property_set("ro.cdma.data_retry_config", "max_retries=infinite,0,0,10000,10000,100000,10000,10000,10000,10000,140000,540000,960000");

********property_set("ro.gsm.data_retry_config", "default_randomization=2000,max_retries=infinite,1000,1000,80000,125000,485000,905000");

****} else if (ISMATCH(radio, "0x5")) {
[Moto G General] mmims24:
[MENTION=6937116]tpa-moto[/MENTION] didn't know if that's what you were wondering about cm12.1