yashsingh1/xdaforums huggingface dataset:
[Moto G Android Development] rgnicholas:
Just Another CDMA User...

Hey there classic757, I feel your pain. I have had much the same experience... bought the Boost CDMA, flashed it to PagePlus (Verizon) and started the search for a ROM that would actually work on my phone. Even though many of the ROMs here on XDA claim to be "unified," most will not work well on our devices. I enjoy trying the new builds and I jump from thread to thread searching for the magic ROM that will actually work. I really appreciate folks like bharat_goku who are trying to include us. Maybe, if we could find someone that would start a specific sub-forum for CDMA users exclusively? That would be nice ;)
[Moto G Android Development] mightysween:
Instead of being provided with a working ROM, look at this as participating in the process of creating it.

I am not sure there is even an official device maintainer for CM Falcon... the nightlies are just bot-builds with no specific changes for our devices (other than XT1032).

The solution will likely come from this thread and be pushed to CM...not the other way. So please stick around and help test the next round of builds from bharat's new laptop! :)
[Moto G Android Development] russ722:
Just a heads up ,but I flashed the official nightly and I can't get past the startup logo. I'm on xt1031
[Moto G Android Development] classic757:
I hear you. I have flashed more than my share of roms on my xt1028 until I am weary of it. In my flashing roms experiences I have found them all to have one bug or another. But you are right about [MENTION=4125857]bharat_goku[/MENTION]. Man, that dude has worked tirelessly to try and get cm12 working on CDMA devices and I commend him for that, and everyone else helping out as well. At this point I am not sure if there is a "magic" rom for the moto g. I will just wait for Verizon to release their version of lollipop.
[Moto G Android Development] classic757:
Yeah I got bootloop too but you have to flash cm11 reboot and then dirty flash cm12 over it then it will boot. But I will warn you that I tried the official nightly on my xt1028 CDMA Moto G and no go. No data/calls. Same problems as unofficial cm12.
[Moto G Android Development] russ722:
Thanks for the heads up! Save me some time.
[Moto G Android Development] classic757:
Not a problem. Anytime. :good:
[Moto G Android Development] tandon.ayush:
I can't get any signal on xt 1033

Didn't convert to GPE
[Moto G Android Development] rgnicholas:
Agreed... I know that some of us watch from a distance and hope for a real working ROM while other folks do all the work. It is hard for the devs to be all things to all people. Wish I had more time to really understand the inner workings of ROM building / tweaking... :cool: maybe in the future. We'll see. For now, I will try to jump in and give insight / logs as I can... and still watch as things develop. Love this phone and hope to see the big L soon.
[Moto G Android Development] pico hackr:
Tried official CM 12 just before no dual sim support , it seems official CM pissed us away . They should change the name of device from falcon to xt1032 , its useless for us
[Moto G Android Development] sanchit0403:
It takes 10 minutes to boot the device
[Moto G Android Development] ImmU94:
Me too having the same problem, Any Solutions?:confused:
[Moto G Android Development] rgnicholas:
WHEW... I tried it on my device, (Boost to PagePlus) and let it loop for 20 minutes before I gave up... started getting a bit warm. Maybe next time :(
[Moto G Android Development] MasterAwesome:
Wont work for 2 reasons.

1. CyanogenMod hasn't merged msim patches

2. Haven't incorporated these patches to framework.

Hence that system doesn't know what to do with the sim when offered two. As I posted in my logs the sim is getting detected along with the carrier information but no signal.
[Moto G Android Development] fireball0093:
Kind of the same boat with CDMA. It's getting mildly irritating because god only knows how long we are going to have to wait for the carrier to get it pushed out.
[Moto G Android Development] mightysween:
The carrier is probably waiting for the community to figure it out first so they don't have to pay a developer. Haha :)

But seriously, I think it will get figured out. May be a few more weeks
[Moto G Android Development] bharat_goku:
That's kinda easy to fix u need to redeclare the unsol properly for

qmi_ril_parse_oem_hook_header in a custom ril function and keep a handle send back the cm12 way to stock,look at the HTC desire 816 tree ull c the way they handled unsols ull be good to fix in no time
[Moto G Android Development] MasterAwesome:
I already tried doing something similar to this it didn't quite work as I planned although I'll look at the HTC desire tree and compare it to mine. Thanks

Are you saying the only changes are to the java part to handle the unsolicited requests? Or do i need to define an unsolicitated request and handle it with ril_unsol_commands.h and access it using Java?
[Moto G Android Development] bharat_goku:
Not really we aren't using cm libril we are using vendor libs so just a custom ril class matching the unsold thrown and find the similar cm12 unsol return it from ur class as that

I'm installing Ubuntu now should be up to working speed again today
[Moto G Android Development] MasterAwesome:
Ill try that out then. What exactly do you mean by a similar unsol request, like OEM_HOOK? What would I he returning in the case statement? A value from the RILConstants?
[Moto G Android Development] bharat_goku:
Yes OEM_hook type

The returning value would be the constant u find in the logs

Case 52xxxx return the unsol as needed

I hope it helps can't really explain this very well :(
[Moto G Android Development] MasterAwesome:
Yeah I got it. Thanks. Builds almost complete, I'll check and tell you.
[Moto G Android Development] bharat_goku:
It took me a long time to figure out this the dudes an HTC forum just told me find ril constants which I didn't catch onto for a while
[Moto G Android Development] Lucas Eugene:
Hi you should look here for cdma
[Moto G Android Development] MasterAwesome:
I didn't either did some research and found out how the RIL works and how it interacts with the system. I still don't understand the difference between a sol and an unsol request.
[Moto G Android Development] mightysween:
CDMA 3g/LTE has been working for OMAP4 for awhile... have it on an XT875 (Bionic).

Different hardware for XT1031 so different methods and naming conventions for interface... bharat is on the right track, it will come together soon.
[Moto G Android Development] bharat_goku:
I feel your pain,i'm still breaking my head over the unsols stuff,hopefully we can figure it out soon,

i've started a new build,i've look into your log and tried fixing the unsols first build on a new system is probably gonna take time i'll update this post with the changes i made for you to review
[Moto G Android Development] MasterAwesome:
Sounds great I ended up sleeping before the build completed I'm going to flash it now so, hopefully I'll get it working.

New Error @_@

E/RILQ ( 433): (1/433): RIL[1][rild] qcril_db_init: Could not create table 5 database is locked

vendor Library problem?

Also fixed the unsol issue

D/RILJ ( 3421): Oem ID in RIL_UNSOL_OEM_HOOK_RAW is QOEMHOOK
D/RILJ ( 3421): OEM ID check Passed
D/RILJ ( 3421): Response ID in RIL_UNSOL_OEM_HOOK_RAW is 525298

Im getting commmand exceptions now. Well, atleast not this error in this build

E/RILQ ( 298): (0/298): RIL[0][main] qmi_ril_parse_oem_hook_header: Received un-handled/oem command id = 524323
[Moto G Android Development] bharat_goku:
Here's the approximate changes which are required to get UNSOLS solved,beware i only looked at your earlier logs and tried fixing it accordingly,
[Moto G Android Development] MasterAwesome:
I've edited my previous post check the new errors im getting.
[Moto G Android Development] bharat_goku:
Seems to be better now ,share entire log? Seems like a permission issue somewhere
[Moto G Android Development] bharat_goku:
Cm11 had no actual method ,there's a lot to consider honestly for starters the fact that radio works on xt1032 which shouldn't happen if it was library issue in ur build I noticed ur rild socket wasn't detected did u add konstat's commits?that might be interfering too I can try recreating using cm libril instead if blobs but that will most likely break support for xt1032 as well
[Moto G Android Development] MasterAwesome:
I was dumping the obj for libril-qc-hook-oem.so

DYNAMIC SYMBOL TABLE:
00000000 DF *UND*	00000000 __cxa_finalize
00000000 DF *UND*	00000000 __cxa_atexit
00000be8 g DO .rodata	00000004 CDMA_OEM_HOOK_START
00000bec g DO .rodata	00000004 OEM_HOOK_HEADER_MIN_SIZE
000007d0 g DF .text	0000000e qcrilhook_oem
00000000 DF *UND*	00000000 __aeabi_unwind_cpp_pr0
000007e0 g DF .text	00000040 mothook_oem
00000000 DF *UND*	00000000 __android_log_print
00000000 DF *UND*	00000000 processOemRequest
00000820 g DF .text	00000044 mothook_oem_ex
00000000 DF *UND*	00000000 processOemRequestEx
[B][U]00000864 g DF .text	00000056 mot_parse_oem_hook_header[/U][/B]
00000000 DF *UND*	00000000 strncasecmp
000009b8 g DF .text	00000108 getOemHookRequestCode
000008bc g DF .text	00000014 shareRilEnv
00000000 DF *UND*	00000000 saveRilEnv
000008d0 g DF .text	000000e8 parseOemGenericHeader
00000ac0 g DF .text	00000088 parseOemStringsHeader
00000000 DF *UND*	00000000 strncpy
00000b48 g DF .text	00000010 shareCoreRilState
00000000 DF *UND*	00000000 saveCoreRilState
00000b58 g DF .text	00000030 qcrilUpdDataState
00000000 DF *UND*	00000000 UpdDataState
00000b88 g DF .text	00000030 qcrilUpdAPMState
00000000 DF *UND*	00000000 UpdAPMState
00000bb8 g DF .text	00000030 qcrilUpdVoiceCallCount
00000000 DF *UND*	00000000 UpdVoiceCallCount
00002004 g D *ABS*	00000000 _edata
00002004 g D *ABS*	00000000 __bss_start
00002004 g D *ABS*	00000000 _end

The parsing of the hook is from here and no other library. No, I DID NOT add any other patches to my device tree other than addition of the RIL. I saw your source on GitHub and realised you're using the BOARD_PROVIDES_LIBRIL :=true this won't work.

Same with cm11 long ago, it wasn't working in XT1033 but XT1032 until the MSIM patch where the fixed something, I'm trying to view their commits trying to figure out what they've changed. And rild should be started not by using CM's rild but mm-ril-daemon so maybe that's an issue?
[Moto G Android Development] bharat_goku:
Hmmm i've changed my tree alot haven't been updating it now

try this build i've handled unsols differently from what ur sources have done

Test Build on new lappy :P

There weren't actual msim patches in cm11 it was just adding all devices with their own network and numerics in the init.falcon.c file

My next build will be by not invoking the vendor provided blobs directly let compiler build cm12 based ril files let's c if helps
[Moto G Android Development] MasterAwesome:
Tried cm provided libril.so doesnt work. Push to tree to github.
[Moto G Android Development] bharat_goku:
what happens with ril using cm libril?
[Moto G Android Development] MasterAwesome:
Framework force closes on the account of Telephony package exceptions... What way have you dealt with the unsols?
[Moto G Android Development] bharat_goku:
Hmmmm ,check a couple of posts back i've added my ril patch
[Moto G Android Development] MasterAwesome:
Ah, you've added in the device tree... I directly patched the source RIL.java to accept the values.
[Moto G Android Development] bharat_goku:
Yea more or less,the thing is over rides declared in device tree work more effectively than the ones declared in the source RIL.java
[Moto G Android Development] MasterAwesome:
New build's almost done... Unsols should be solved along with that permission error. Anyway, i was looking at the regular logcats without the *:E filter and i saw this

D/GsmDCT ( 1259): [MSimDCT:0] setInitialApn: defaultApnSetting=[ApnSettingV2] Aircel, 911, 40441, aircel, null, null, null, null, null, -1, default | supl, IP, IP, true, 0
D/GsmDCT ( 1259): [MSimDCT:0] setInitialAttachApn: using mPreferredApn
D/GsmDCT ( 1259): [MSimDCT:0] setInitialAttachApn: X selected Apn=[ApnSettingV2] Aircel, 911, 40441, aircel, null, null, null, null, null, -1, default | supl, IP, IP, true, 0
D/RILJ ( 1259): Set RIL_REQUEST_SET_INITIAL_ATTACH_APN [SUB0]
D/RILJ ( 1259): [3790]> RIL_REQUEST_SET_INITIAL_ATTACH_APN, apn:aircel, protocol:IP, authType:-1, username:null, password:null [SUB0]

The carrier is seen in the logs, which is weird @_@ when i dont get the signal.
[Moto G Android Development] bharat_goku:
Well there u go [emoji14]

Now it can be a card status issue ,still just for kicks try deleting qcril msg tunnel.apk and restart phone wanna know if it's permissions in app which causes ril failure ,theoretically it should cause system fc if it does than at least we'll know the unsol is working right,

Oh and try reducing mqan elements to 5? Like most other ril patches ?
[Moto G Android Development] MasterAwesome:
I've increased it to 7 so radio buffer overflow won't happen and to stop continuous reboots. I'll try with 5. You've set it to 5 right? Let me try your build...
[Moto G Android Development] bharat_goku:
that's something could u try deleting qcrilmsgtunnel.apk from /system/app and see what happens?
[Moto G Android Development] MasterAwesome:
You do realise that this error still exists in the log right @_@

For both the SIMS now.

E/RILQ ( 299): (0/299): RIL[0][main] qmi_ril_parse_oem_hook_header: Received un-handled/oem command id = 524323
E/RILQ ( 448): (2/448): RIL[2][main] qmi_ril_parse_oem_hook_header: Received un-handled/oem command id = 524323

com.android.phone has stopped recursive force stop is what will happen if you delete qcrilmsgtunnel.apk
[Moto G Android Development] bharat_goku:
Argh slipped that Odd i've handled it in my java file though

Nevermind i haven't atleast both sims seem to be facing same issue something worked..

Edit : wait i have? in a different manner though :\ guess i'll try merging my changes with ur git and rebuild

Edit:Rectified again try the attachment,rebuilt a little more based on samsung based qcom devices
[Moto G Android Development] MasterAwesome:
I've commited into my git a localised RIL.java file. The previous error log in my build did not notify both the SIM's RIL status since i had disabled dsds as the multisim config to check if it works for 1 sim. So not much of a change; For that error to disappear i added my custom RIL file at source/framework/opt/telephony/src..../internal/FRIL.java.

And I totally forgot that the Cyanogenmod CM12 is pretty new and they havent updated the CAF-sources. The code-aurora telephony java files need to merged to the tree, im doing that currently, ill build it soon.
[Moto G Android Development] bharat_goku:
There haven't been alotta changes since December before which everything is merged btw grand 2usws same soc as us n they've fixed dual mukulsoni is the guy his sources don't really help much but I got his java class and attached it in my previous post along with changes for our unsols he didn't seem to have updated to cad though although there is this file named libsecril.so which I think is how he got it by naming convention that seems to be Samsung ril so not too helpful if u can send me the obj dump for all ril related files on pm I've left a new build to start before I left home

If we can get all unsols and set em as needed I think we can fix ril with whatever we've done today
[Moto G Android Development] MasterAwesome:
I'm not at my workstation right now. Just do a

arm-linux-androideabi-objdump -xDesTR libril.so >> output

or copy all ril related files to a folder 'ril' and

cd ril
arm-linux-androideabi-objdump -xDesTR *.so >> output

Looks like he handled the return of the UNSOLS better by assigning to a different statement and the writing it back.
[Moto G Android Development] mykehdoom:
Any progress on CDMA support?
[Moto G Android Development] bharat_goku:
Haha never mind i reached home before u so i'll do it now :P
[Moto G Android Development] Nishblueweapon:
Working right?

Y not attach some screenies to the op.

To be sure the patch works with xt1033 variant right.

Plz mention in the op.

Thank u.

Checked changelog :thumbup:
[Moto G Android Development] mightysween:
you guys see this one?

http://review.cyanogenmod.org/#/c/84267/

haha, never mind just saw you in comments. :)
[Moto G Android Development] gbb14:
great work guys, all the respect for you.

does this mean that the dual sim works now?
[Moto G Android Development] MasterAwesome:
You don't have a XT1033 or a Moto G?
[Moto G Android Development] bharat_goku:
I have but I'm stuck on gpe5.0.1 till I can figure out a way to shift back to xt1033 stock I don't personally use dual so no biggie...

Btw started a new build with the gpe vendor files for ril maybe it'll fix the bunch of unsols which are needed ,if your building try this -decompile qcrilmsgtunnel.apk of stock KitKat look at the qcril folder in smali folder one of the smali files have all the unsols which qcril throws but it's a frustrating job debugging n matching em
[Moto G Android Development] MasterAwesome:
NO!!! Stalhp. Dont view the Smalis if the apk isnt encrypted much you can view the source java classes let me try it
[Moto G Android Development] bharat_goku:
It doesn't matter much the unsols are straight forward pretty much in smali either way
[Moto G Android Development] MasterAwesome:
switch (i)
{
case 525297:
case 525298:
case 525301:
default:
Log.d("QcrilMsgTunnelSocket", "Response ID " + i + " is not served in this process.");
Log.d("QcrilMsgTunnelSocket", "To broadcast an Intent via the notifier to external apps");
case 525296:
case 525299:
case 525300:
case 525302:
case 525303:
}
}

cases in .java source
[Moto G Android Development] russ722:
Anybody on CDMA try build 34 yet?
[Moto G Android Development] felipeap:
Seriously are you stuck? I did this procedure yesterday : Flash the Moto 5.0.1 gpt.bin to avoid the Partition is too Small when flashing system (it can be found in the OTA zip file) and then you flash the Moto 4.4.4 via fastboot skipping the motoboot and gpt (the version required by the Moto 5.0.1 OTA is Brazil Retail KXB21.14-L1.40_38)
[Moto G Android Development] mightysween:
Tried, bootloops at animation and cant connect with adb to pull logs.
[Moto G Android Development] russ722:
Ahh..... OK thanks for the reply.
[Moto G Android Development] MasterAwesome:
Dude, I'll upload a build today can you check in that?

---------- Post added at 07:15 AM ---------- Previous post was at 07:11 AM ----------

We're trying to make this build work on dualsim without changing radio partitions to match gpe.
[Moto G Android Development] shadie21:
I also have had problems trying to install the latest builds and getting boot looped.

solution: dirty flash over cm11, just wipe cache and dalvik and install this or one of the nightly's then 5.0 gapps package, and it should boot right up, I waited on boot for 15mins before trying this method. This method booted in less then 3mins.

Device: XT1031 Boost Mobile
[Moto G Android Development] russ722:
Did you try build 34 ,and did data/calls work?
[Moto G Android Development] igortski:
XT1033 on latest build

I also installed CM11 and then did a dirty flash with the latest build (34). Previous to this I tried the official CM12 (8/1) and both SIMS appear to be detected on it. Even though it gave me the option to select either "Telstra Mobile" or "Optus" it doesn't get a network connection and said something like "You are not allowed to connect to this network". This was when trying to select "Telstra Mobile" as I'm with a Telstra reseller.

On the latest build of your ROM it detects both SIMS but does not find any networks.

Hope this helps.
[Moto G Android Development] mightysween:
Yes, will be up a few more hours tonight...and definitely have time in the morning (i am in GMT -5 time zone)

Can boot this way, but logs are no longer reliable for debugging as there may be mixed elements of CM11 and CM12.
[Moto G Android Development] W3ND31:
I will install now the build. Afterwards i will take logcats, dmsgs and other things that may help the OP!

----------------------------Edit 1 ----------------------------------------

Installing from the 5.0.1 BR Soak Test. Full Wipe (even the sd card). Booting...

-------------------------------edit2

booted. both Sim card with the signal bar empty, no network.

Logs : https://drive.google.com/open?id=0Bwray3U603G8ZmRhWnluWGhoaVU&authuser=0
[Moto G Android Development] Flashhhh:
Did u flash the moto 5.0.1 gpt.bin while on gpe 5.0.1??

If yes pls provide the gpt.bin file bcoz all gpe 5.0.1 users are unable to install any rom!!

Your help is needed!!
[Moto G Android Development] felipeap:
Yes I did, two times now... I only did it because I got Partition is Too Small error trying to downgrade directly from GPE 5.0.1 to Moto 4.4.4 in the system partition. The GPT.BIN I used is from the Moto 5.0.1 OTA Zip. There are some guides in the general section who works, but they guide to downgrade to GPE 4.4.4 first then Moto 4.4.4 ... this way is more direct. Here's the file: https://db.tt/Yy1YvqW3
[Moto G Android Development] Flashhhh:
Are u sure it won't hardbrick?
[Moto G Android Development] felipeap:
Dude, I'm just sharing my own experience... if you're unsure is better to not do it. I'm only responsible for my own device =) We shouldn't hijack this thread, there are plenty of downgrade guides in the general section... I only commented here because OP said he was stuck in GPE 5.0.1 for some reason.
[Moto G Android Development] bharat_goku:
ah i wasn't able to flash 4.4.4 gpt earlier it got bricked when i tried so gave it to service center figured won't risk again ,i'll try ur method today and get back to dual sim mode..
[Moto G Android Development] MasterAwesome:
Hi,

Download from Here:

Give me the logcats, debug info

Regards
[Moto G Android Development] mightysween:
Same behavior as build 34... XT1031 makes it to boot animation but stuck there and adb not seeing device.
[Moto G Android Development] MasterAwesome:
Are you using linux or windows
[Moto G Android Development] mightysween:
linux (debian based)
[Moto G Android Development] MasterAwesome:
Plug in during boot animation and then type lsusb to verify if it's not connecting.
[Moto G Android Development] mightysween:
Sorry, got sidetracked... phone does not show up in lsusb. On boot with working CM12 I can connect adb about 15-20 seconds into boot animation. So whatever is causing the loop must be pretty early in boot sequence... not to mention my old linux beast is very finicky :)

Lots of SIM and telephony merges in CM today...anyone tested latest on XT1033?

EDIT: those changes are actually for the next nightly... 1/10
[Moto G Android Development] MasterAwesome:
Wait for it to boot for a while, if it doesn't, go to the recovery and pull /proc/last_kmsg.

Edit: kind if modified the entire framework to run the sim card even if there are exceptions and added log at every place so I should be able to figure it out now.
[Moto G Android Development] bharat_goku:
I'll push a build I made yday with updated vendor files of ril might be easier to solve with them since I noticed there are alotta header files probably missing in the old ril which I didn't consider as possibilities ull notice the difference in ril.h file of cm11 and cm12 that headers have changed a lot..
[Moto G Android Development] MasterAwesome:
All I changed was the rild to connect to kernel even if there were errors. More like uncaught exceptions. So, where did you get your updated vendor rils from? Code Aurora? I patched my source with msim patches also, so I'll test it soon.
[Moto G Android Development] bharat_goku:
Na the blobs from gpe release