yashsingh1/xdaforums huggingface dataset:
[Desire 816 Android Development] chaosreaper95:
I can tell you I only got it to work by playing with it but i think your hypothesis is true about the preferred-apn.XML getting changed and screwing with it. however I never have that many problems after I delete the THREE FILES it works fine for a while (haven't had any issue whatsoever connecting since first post about this.) and also go into developer setting>always keep cellular data on. Since i have done that i have had much less issues with the LTE for me in my area(maybe it has something to do with when it changes it method of connecting? changes to files there?). I would suggest the developer settings thing and removing all three files

(currently my fix for this issue.) But again it could be your area as well i might just have better luck where i am compared to where you are so on and so forth.
[Desire 816 Android Development] GreyCelt:
OK, this is what I do when my LTE won't turn on automatically when I turn off WiFi. I don't know if it will work for you but here you go.

Go to Settings > Cellular networks > Tap "Carrier Settings" at the bottom and you'll see an error pop-up as it takes you back to the main Settings page.

Quickly tap OK to dismiss the error message and then quickly toggle Cellular networks off then back on with the switch on the far right.

You should then see a pop-up asking you to choose your SIM card. I choose the Virgin Mobile option and my LTE turns back on.

Like I said, I don't know if this will work for you but it is what I have discovered that works for my device. :)
[Desire 816 Android Development] bigsupersquid:
Now this is development thread grade conversation.

Experimentation, sharing results and tweaks.

Thanks.
[Desire 816 Android Development] steppinthrax:
When I've selected carrier settings I do get the error message as well but when the SIM CARD screen comes up I get no options, no VM options nothing. It has a greyed out radio button with no title next to it.

---------- Post added at 03:02 PM ---------- Previous post was at 02:54 PM ----------

This is the text within my preferred_apn.xml

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>

<map>

<long name="apn_id1310120043400118" value="1251" />

<long name="apn_id1" value="-1" />

</map>
[Desire 816 Android Development] GreyCelt:
I've noticed that it does that sometimes as well. I think it might do that if you're not in a strong enough connection area. If this happens then I make sure my WiFi is off, toggle Airplane Mode a couple times, reboot the phone, and make sure I'm in an area that I know I've had a good LTE signal in the past. Then I go through the outlined steps from my other post again.

Of course, this won't work for some of us that don't have a good LTE signal to begin with... :( sorry [MENTION=2980661]bigsupersquid[/MENTION]

Also, if that doesn't kick it in then I'll turn on Airplane Mode and reboot the phone while Airplane Mode is on. Then turn off Airplane Mode once the phone is done rebooting and run through the steps from my other post again.

I think what it's doing when you tap Carrier Settings is resetting the APN to a null value and then searching for the best/appropriate APN based on your location and what's programmed into your phone/SIM card. Of course, if you have a bunk SIM card then I think you'd be SOL.
[Desire 816 Android Development] GreyCelt:
Question...

In the July 8th build, is it taking longer to wipe cache for anyone else? On the Feb build it wouldn't take any time at all to wipe Dalvik cache and cache in TWRP but on the July 8th build it takes quite a bit longer.

I'm currently flashing the July 11th build and I'll see if it does the same thing but I was just wondering if anyone else noticed that or if it was just me.

*edit* Yep, it's doing it on the July 11th build as well. Is it just me? Is my phone dying on me?
[Desire 816 Android Development] bigsupersquid:
your hardware is fine

July 6 build was dexpreopt (odexed) so all system apps have dalek cache stuff prebuilt.

Saves space saves on first boot time.

Adds build time and these last two were experimental so I turned off dexpreopt.

I'll turn it back on when I build it next time (no eta, using my evo3d cause the no lte aggravated me enough to switch phones a while.)
[Desire 816 Android Development] blackmamba:
MSL

Hi - installed the ROM and it works great. No issues that I have encountered. Now, I ported the MEID and ICCID to RingPlus and it seems to be active there. The problem is I'm unable to manually program the phone to connect. The ##MSL# from dialer does not work and there's no other way (that I know) to manually program. Any thoughts or ideas?

Thanks!
[Desire 816 Android Development] fajita3053:
Where exactly are these files? I found telephony.db but the other 2 are not present. I deleted it and now have no data.
[Desire 816 Android Development] chaosreaper95:
The journal file should be in the same directory as telepony.db as for the XML go to data/data/com.android.providers.telephony/shared_prefs/preferred-apn.XML the last of that being the XML you want to delete and for perfect clarity /data/data/com.android.providers.telephony/databases/ in that one you'll find telephony.db and right below it should be telephony.db-journal if not I wouldn't worry about it much but MAKE SURE YOU REBOOT after you delete these it allows it to rebuild that database otherwise nothing will happen since it never refreshed itself
[Desire 816 Android Development] bigsupersquid:
You'll have to use a stock backup for phone programming functions, then restore cm.
[Desire 816 Android Development] chaosreaper95:
[MENTION=2980661]bigsupersquid[/MENTION] [MENTION=2001489]fajita3053[/MENTION] [MENTION=6766129]steppinthrax[/MENTION] Ive tagged the two who asked questions relevant to this fix. I've also tagged developer of ROM to refer people to video for future reference if I don't catch it first

https://www.youtube.com/watch?v=X23GrMj7Jew

this link will take you to an awful video i made but it shows the proof and the process on how i fix it and my results. the description provides the time to skip to if you don't want to watch the real time results (skips the reboot process.) hope this helps everyone!
[Desire 816 Android Development] ajones23:
I actually broke my LTE and tried your fix it worked. All my messages were still there,data was restored. So fix does work,if you follow the video. Big Thanks to you.:good:
[Desire 816 Android Development] bigsupersquid:
Later today or this evening I'll make a flashable zip for recovery that removes those three files to simplify.

Thanks again for the information and testing.
[Desire 816 Android Development] fajita3053:
Found those 3 files. Thank you. Deleted them, now I'm 100%
[Desire 816 Android Development] blackmamba:
Thanks a ton. I followed your instructions from the first page and did the following:

1) Flashed Stock Recovery

2) Locked Bootloader (status is now "RELOCKED" in HBOOT screen)

Now, I'm unable to boot into the phone to re-enable access via ADB to push 0P9CIMG.zip

Am stuck in HBOOT menu upon restart

I tried the following:

1) fastboot erase cache

2) fastboot oem rebootRUU

It does boot into RUU with HTC logo

I then tried to send:

fastboot flash zip 0P9CIMG.zip

That didn't work. I get the following:

sending 'recovery' (16384 KB)...

OKAY [ 1.646s]

writing 'recovery'...

(bootloader) signature checking...

FAILED (remote: 12 signature verify fail)

finished. total time: 2.805s

Can you help me: a) boot back into phone so I can re-enable USB ADB access or b) somehow get 0P9CIMG.zip flashed into phone or at the least written to /sdcard/

Thanks a ton!
[Desire 816 Android Development] bigsupersquid:
Sorry about that. Hadn't really intended this to be a 'revert to stock' instruction set too, but it's ended up that way because of the firmware.

Nothing else I use but htc devices need all this runaround to root or flash.

I rearanged the instructions in the OP to say copy the file first and remove the card, so hopefully nobody else will end up in the same mess.

You'll have to somehow move the 0P9CIMG.zip to an sdcard without the phone, then insert the sdcard and boot into hboot, I use either a card reader or another phone for that if the htc I'm using is messed up.

or use Window$ to run the full RUU_A5_CHL_L50_DESIRE_SENSE60_MR_Sprint_WWE_VM_2.33.652.5_Radio_1.47.40.0224_NV_SPCS_0.57_003_release_448526_signed_2.exe from htc in fastboot.
[Desire 816 Android Development] blackmamba:
Will try with microSD card - don't have a Windows machine (Mac user). If that does not work, I will try it on a buddy's Windows machine. Thanks again!
[Desire 816 Android Development] aftertzf:
FWIW, I have the network dropout happen always (so far) when leaving my house and having WiFi turned on.

When it drops the WiFi it dies. No network etc.

I just deleted the preferred-ap.xml file and twiddled with sim data on/off, then did a soft reboot and it worked fine on reboot.

I have the XML file when OK vs Nok here, there is a small size difference... And modify timestamp matches when it died..

,https://drive.google.com/folderview?id=0BwAiOvGClyUWZHVtQlg5djBqU3c

Hope itbhelps.

I'll try turning off WiFi when leaving, see how it acts..
[Desire 816 Android Development] jimmybuttons:
went and tried this fix and i now have my MMS back and everything is working (for now anyway, i JUST rebooted)

thanx again to everyone working on this and especially [MENTION=2980661]bigsupersquid[/MENTION] for all the time and effort. you are much appreciated!
[Desire 816 Android Development] aftertzf:
Turned WiFi off at home, no network.

APN file had changed.

Had to put good copy back, reboot then switch from LTE to 3g as preferred, then back to LTE.
[Desire 816 Android Development] blackmamba:
All is good. was successful to RUU flash back to stock, update PRL and settings and flash back to CM13. Also flashed the APNs for Ringplus. Working fine so far. Ever so often the LTE disappears (no icon or connection) when I'm off WiFi. Have to toggle Airplane mode to get it back on - other than that it's all good.
[Desire 816 Android Development] GreyCelt:
Anyone else getting random reboots on this latest 7/11 build? I seem to be getting several per day now that I've been on the 7/11 build for a few days. Not sure if it's the ROM or something else.
[Desire 816 Android Development] ajones23:
Yes I've gotten a few reboots. And on some apps it freezes.
[Desire 816 Android Development] bigsupersquid:
While I haven't gotten any reboots or freezes myself, it could still be the rom.

It could be something installed though.

I'm not using Xposed or Gapps, actually only have 18 user apps installed, and at least four of those are home built for testing things.

If you can grab last _kmsg after a reboot that might have clues.

Terminal:

su

cat /proc/last_kmsg > /sdcard/kmsg.txt

ADB:

adb root

adb shell cat /proc/last_kmsg > kmsg.txt
[Desire 816 Android Development] jimmybuttons:
once in a while i'll get a freezup after a restart where it might actually freeze a few times upon booting before a successful boot, but no freezups or reboots during general use. am using gapps, not using xposed.
[Desire 816 Android Development] rklatte:
So far, I've had no random reboots. I've had a couple apps I've installed force close (Tapatalk and Weather Underground) and that's all, no other issues.

Regarding restoring LTE, I've experimented with all of the great suggestions mentioned in this thread (thanks!!). I wanted to share what I've found to be the fastest reliable way for me to restore LTE:

1) Delete the preferred-apn.xml file (/data/data/com.android.providers.telephony/shared_prefs/preferred-apn.xml)

2) Tap on carrier settings (Settings > Cellular Networks > Carrier Settings) - as noted this will immediately generate an error message, but seems to trigger a "network update" and usually gets LTE restored (if I'm in an area with good LTE coverage).

It would be nice to be able to script the above actions. Any suggestion(s) on how to do it?
[Desire 816 Android Development] :
Check this out.
[Desire 816 Android Development] bigsupersquid:
Roughly

#!/bin/sh
rm /data/data/com.android.providers.telephony/shared_prefs/preferred-apn.xml
#toggle airplane mode twice
am start -a android.settings.AIRPLANE_MODE_SETTINGS ; input keyevent 19 ; input keyevent 23 ; input keyevent 4
am start -a android.settings.AIRPLANE_MODE_SETTINGS ; input keyevent 19 ; input keyevent 23 ; input keyevent 4

Toggling airplane mode, rather than force closing telephony, will also rebuild the file after toggling.

Airplane mode toggle borrowed from

http://stackoverflow.com/questions/10506591/turning-airplane-mode-on-via-adb

Script attached in zip file if you're lazy like me

Put lte in /system/xbin, rwxr-xr-x (chmod 755)

The you can run it from terminal or whatever at will.

Added to third post by the way. Thanks for puzzling out a solution, y'all.
[Desire 816 Android Development] rklatte:
Thanks! I'll give it a shot next time LTE goes out.
[Desire 816 Android Development] steppinthrax:
Quick question:. What is the difference between "Home" and "Automatic" with Carrier Select. I sometimes find if I toggle between these values I get a connection. What should we set these values at?
[Desire 816 Android Development] bigsupersquid:
It's a roaming setting. Doesn't make any difference on mine though there's supposed to be no roaming on Virgin mobile anyway.
[Desire 816 Android Development] aftertzf:
Has anyone had luck with GPS? I can't get good functionality when satellite high precision is enabled...

Had fun driving to and from holiday... Not!
[Desire 816 Android Development] bigsupersquid:
You can try the gps.conf buried earlier in the thread somewhere, but comment out all the xtra servers or you may have that old data leak problem.

Currently, mine works fine (I've only tested this most "recent" build with microg and apple/Mozilla GPS backends instead of gapps, though. )
[Desire 816 Android Development] icy_gt:
Yea my gps has been bugging too. Let me know if you fix it.
[Desire 816 Android Development] insanelycool:
I used to have this gps problem as well but I resolved it by activating gps on the stock rom before wiping it and flashing any custom rom.

Here are the steps that I have used to fix gps. Make a backup first!

Restore back to stock and (download then) open "gps status test and fix" app, and allow it to "get xtra data" then leave it running for a few minutes, making sure the screen stayed on and that it gets a nice strong lock (you may need to be outside to get line of sight to the gps satellites). Then (download and) launch the "gps test" app and let it get a lock and again leave it running (screen on) for a few minutes and get a stronger lock. Update your profile and PRL for good measure before we flash back to custom roms. Then wipe everything, afterwards you can restore your CM backup. Once it boots up, run the "gps status test and fix" app once again and click on "get xtra data". Then wait for it to get a lock.

Make sure you do not click on Reset Gps in the "gps status test and fix" app as this will make us have to start over.
[Desire 816 Android Development] sirrx7:
Does anyone have any issues with the FM Radio? I rarely use it but I like having it especially during hurricane season. The FM Radio that comes with CM13 loads one station and won't let me scan to add stations. I've come up with a workaround (Go up the dial and manually add all stations found to favorites).

I also tried running NextRadio which normally works for our phone but now I get the "NextRadio won't work on your device" screen on a Play Store downloaded version. If I restore NextRadio from Ti Backup, it scans and populates my stations but plays no audio in headphones or through speaker. It also eventually gives me the "not working on your device" screen.

The CM13 FM Radio workaround works for now so it isn't that big of a deal. I just wanted to know if anyone else had this same problem.
[Desire 816 Android Development] Knitex:
Hey guys, I decided to make an account to personally thank bigsupersquid and everyone who posted fixes. I have the a5 chl and did a successful update from cm 12 nightlies to this cm 13. I went back to stock using the official RUU then kept my data and location on. I unlocked the bootloader again and flashed cm 13 and then 6.0 gapps. The VM fix got my LTE and MMS working like a charm. I also used the facebook fixes. Thanks for everything!
[Desire 816 Android Development] steppinthrax:
Does anyone know how NFC is working with the ROM. I have it enabled but Google wallet won't work with NFC. I'm in a slip on case and I have one of those metal stickers on the back for magnetic mount.
[Desire 816 Android Development] bigsupersquid:
I don't think anything else I own has NFC to test with. I think there was at least one other glitch report with NFC though.
[Desire 816 Android Development] aftertzf:
Slider crashes when I try to enable NFC.

So I don't... :p
[Desire 816 Android Development] bigsupersquid:
That's odd. I can enable and disable it, there's just nothing for me to do with it.
[Desire 816 Android Development] sirrx7:
I was able to Beam a few files to the phone and scan over a few NFC dots so NFC definitely works but I can't say if Android Pay is working with it or not.

BSS, Can you tell me if FM radio issues are known issue. A few posts down I asked and am really just more curious than anything.
[Desire 816 Android Development] bigsupersquid:
Haven't hacked the app to run without headphones plugged in so I've not really tested it myself.

Haven't seen other comments on it.
[Desire 816 Android Development] frank9184:
I tested FM radio before,it worked.

Why don't you test by yourself?

I don't sure that it worked or not because I last tested is in July

BTY [MENTION=2980661]bigsupersquid[/MENTION] 816 android N possible?
[Desire 816 Android Development] ajones23:
I use mine and it does work. Mostly everything works in this ROM. Running this as my daily driver all year.
[Desire 816 Android Development] bigsupersquid:
Brag:

N booting

BT and WiFi working. Location says working, untested. Cell uppity about sim, not working right. No camera. No NFC.

Posting from N via WiFi tethered to evo 3d running liquidsmooth kitkat
[Desire 816 Android Development] frank9184:
I can't believe you did it!!

Thanks for your hard work for making 816 become a long life device

BTY,R U using AOSP or Cyanogen to build?
[Desire 816 Android Development] Ed128:
Amen to that. Was getting desperate for storage but 816 with MM working better than wife's iPhone
[Desire 816 Android Development] ajones23:
That's really great [MENTION=461469]bigsi[/MENTION]persqiud. My 816 runs better than ever on MM. Now Android N,thanks for all your hard work.
[Desire 816 Android Development] Ed128:
Small donation made to express my appreciation for bigsupersquid's hard work and patience
[Desire 816 Android Development] bigsupersquid:
I really appreciate that. Helps make the time even more worthwhile.

CM. Added a screenshot to the earlier post.

Somehow I've barely gotten more-aosp-like trees like omni or aosp-caf to build when I have to adapt a cm device tree, much less work without big malfunctions. Starting with an earlier cm device tree makes cm (comparably) more buildable.

looks like ril is running but init wasn't all patched up yet. nfc looks like firmware hunt for driver. and so on.
[Desire 816 Android Development] frank9184:
Hmm...Sounds great. I can't donate you as long as I don't have a credit card.Bitcoin available?
[Desire 816 Android Development] bigsupersquid:
I hadn't thought about bitcoin in years. looked it up again, can't see any reason not to set it up.

appreciate that too! I'll let you know when I get that together.
[Desire 816 Android Development] hunter_bruhh:
so are you going to continue working on Android N? Can you link me to your sources on GitHub? Can you give me a link to your builds? All of this, and if you need help, I can help out. I work with cm, already have the N device tree and can compile in less than an hour and 45 min most of the time
[Desire 816 Android Development] bigsupersquid:
Yeah, I'm working on it.

bigsuperprojects on GitHub for cm14 branches

I've only had two builds complete without crashing the build system, it's really wanky right now.

I'm not uploading any builds for now. All I've got is one semi functional build without cell service capability, and one that constantly crashes com.android.phone from setting the radio properties in init.
[Desire 816 Android Development] NotRankin:
I seem to have run into an issue. My LTE is missing, but 3G works. I tried the fixes mentioned in this thread, however, I've run into a strange issue, data.android.providers.telephony doesn't exist as a folder, but instead a regular file. Not sure what to do but reflash.
[Desire 816 Android Development] bigsupersquid:
If it's a file instead of directory, delete it and it'll regenerate (on reboot)

You could wipe data instead of reflash unless you've flashed stuff that modifies /system

Or maybe you caught my no lte issue that's still ongoing for several months now.
[Desire 816 Android Development] NotRankin:
Well I tried deleting it, and the phone was stuck in an infinite bootloop.

Ended up just totally wiping the device everywhere, and starting over from absolute scratch, the folder is there now :P
[Desire 816 Android Development] bigsupersquid:
posted a poll for cm14 alpha.
[Desire 816 Android Development] GreyCelt:
So, it's been fun but I am now officially a Nexus 6P owner on Project Fi!

Although there have been GREAT developers such as [MENTION=2980661]bigsupersquid[/MENTION] that has done an amazing job at keeping this phone alive, I am done with my 9 year run as a Virgin Mobile Customer.

Don't worry, you'll still see me around because I'm giving my HTC Desire 816 to my son so I'll still be wanting to keep-up with developments for this phone.

Thanks [MENTION=2980661]bigsupersquid[/MENTION] for being awesome and keeping this phone going and I'm looking forward to flashing Nougat onto it for my son.
[Desire 816 Android Development] GreyCelt:
So, yeah, um.... I know....

After my "Goodbye" post, here I am again.

I'm trying to set-up my a5_chl to give to my son and, of course, one of his requirements is to be able to play Pokemon Go. However, with the latest update to the game it is blocked for Rooted users. There is a work-around using Magisk but it doesn't seem to be compatible with this device on this ROM.

Here is the link to the Magisk thread:

http://xdaforums.com/android/software/mod-magisk-v1-universal-systemless-t3432382

In order to get Magisk to work, it needs to alter the boot.img and I think that's where the problem lies. [MENTION=2980661]bigsupersquid[/MENTION] are you able to shed some light on this?

Does the phone need to be S-off in order for this to work?

Anyone else get Pokemon Go to work on this ROM after the latest update to the game?
[Desire 816 Android Development] bigsupersquid:
Doesn't need to be s off to modify boot img.

Maybe try turning off root access for apps in developer settings then see if it'll run.

Haven't messed with magisk but it did look interesting. May look into it before too long.

Did you try this method? Won't need bump script.
[Desire 816 Android Development] ajones23:
That's new to me,I haven't heard my son complaining. He has Pokemon Go on his 816 with CM 13 same as mine. But sorry to see you go,thats a better phone though.
[Desire 816 Android Development] GreyCelt:
[MENTION=2980661]bigsupersquid[/MENTION] I hadn't seen that or tried it. Thanks for the heads up. What I did was just start with a clean install and not flash SuperSU or any superuser so it makes root unusable at this point. That made PokÃ?Â©mon Go work but now there's no root on his phone. I think he'll be OK with that though because he doesn't really use root for anything anyway.

[MENTION=3951714]ajones23[/MENTION] Yeah, I'm gonna miss my HTC but I'm soooo done with Virgin Mobile. I've been with them since before they had Android and I'm tired of waiting to see what bottom of the barrel or 2 year old phone they're gonna "introduce" this year along with the overpriced flagships and iPhones. :cyclops: