yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] siljaer:
locked screen, upper left corner

Settings -> sim cards -> SIM 1 (2) settings

2G, 3G, LTE: what else do youn need?

Since you can use only one card with 3G/4G, that's up to you. YOU select which sim is using 2g only.

---------- Post added at 04:01 ---------- Previous post was at 03:15 ----------

The main difference between stock rom and CM13 is the capability to individually disable each SIM. That has been lost, but it's a CM13 global issue. However, you can disable data for each SIM, and that is more than enough to prevent undesidered data use.

If you pull down the menu, and tap on the SIM, then "more settings" you can access all the options you need, including very fine grained control on data usage.

I think you may have done some strange mistake while flashing, maybe you should wipe everything and retry. Furthermore, cyanogenmod is conceived to offer many more options than stock roms, and that can be overwhelming for some users. If that is your case, then sticking to the stock rom is a better choice for you, at least until you really have a compelling motivation to flash a different rom. There is no such a thing like "fuss" about CM13: it's different from stock roms and it suits the needs of users who like more options and greater flexibility. You look like a different kind of user, probably you should have chosen a different phone, with much better support for the stock rom.

The trunk is a phone made by elephone, that has not a good reputation for updates (though stock rom is not so bad).

Most of us has chosen it because it is cheap, it's 64 bits, it's freely unlockable and shares a platform many tinkerers have experimented with. Many of us have chosen it thinking to flash some alternative firmware and start modifying it, also for the fun of it. You cannot expect an experimental rom without any problem. Furthermore, with custom roms often the priority is adding features over stability. Besides, CyanogenMod is a very complex project: some problems can be global android's problems, some others CyanogenMod's global problems, some others individual platform's problems and some others individual products problems. This project only deals with porting CyanogenMod and solving issues that can arise (mainly hardware related). If you don't like the UI, you should talk about it in CyanogenMod forums.

If you have an absolute need for a 100% reliable phone, you should have chosen a different brand, known for frequent updates and good customer support, so you could write them about any issue youexperience. Even in that case, however, expressions like "totally and utterly disappointed" aren't that helpful in identifying the issue with the precision needed by developers. It's the kind of legitimate remark you could do with a vendor asking for a refund if you meet the deadline for it (they don't have to fix the problem). If also the stock ROM is disappointing you, you could start considering it.
[Miscellaneous Android Development] siljaer:
native voip client and echo

I was curious to try the native echo voip client after the echo fixes. Echo was still here, not surprisingly. However, it was just a matter of adding:

pre_processing {
voice_communication {
aec {
}
}
}

to /vendor/ect/audio_effects.conf (stock rom file also has ns enabled).

Please try using skype or hangout or something else and check whether you experience echo with those apps. If so, we probably need that last fix (it depends on the app, possibily, some of them have their own aec).

However, interestingly, there's also some evidence in the logcat :) do you want to see how echo cancellation works during a voip call? :)

when call starts:

08-14 05:14:04.997 5310 5842 D audio_hw_primary: start_output_stream: exit
08-14 05:14:04.997 5310 6321 V msm8916_platform: platform_update_usecase_from_source: input source :7
08-14 05:14:04.997 5310 6321 D audio_hw_primary: start_input_stream: enter: stream(0xf64cc1c0)usecase(7: audio-record)
08-14 05:14:04.997 5310 6321 V msm8916_platform: platform_get_input_snd_device: enter: out_device(0x1) in_device(0x4)
[B]08-14 05:14:04.997 5310 6321 D msm8916_platform: platform_set_echo_reference: enabling echo-reference[/B]
08-14 05:14:04.998 5310 6321 V msm8916_platform: platform_get_input_snd_device: exit: in_snd_device(handset-mic)
08-14 05:14:04.998 5310 6321 D audio_hw_primary: select_devices: out_snd_device(0: ) in_snd_device(35: handset-mic)
08-14 05:14:04.998 5310 6321 D hardware_info: hw_info_append_hw_type : device_name = handset-mic
08-14 05:14:04.998 5310 6321 D audio_hw_primary: enable_snd_device: snd_device(35: handset-mic)
08-14 05:14:05.003 5310 6321 V msm8916_platform: platform_send_audio_calibration: sending audio calibration for snd_device(35) acdb_id(106)

when call ends:

08-14 05:14:12.792 3869 6327 D AudioGroup: stream[65] leaves group[92]
08-14 05:14:12.792 3869 6327 D AudioGroup: stream[65] is dead
08-14 05:14:12.824 5310 6321 D audio_hw_primary: in_set_parameters: enter: kvpairs=routing=0
08-14 05:14:12.824 5310 6321 D audio_hw_primary: in_standby: enter: stream (0xf64cc1c0) usecase(7: audio-record)
08-14 05:14:12.864 5310 6321 D audio_hw_primary: disable_audio_route: reset and update mixer path: audio-record
08-14 05:14:12.865 5310 6321 D hardware_info: hw_info_append_hw_type : device_name = handset-mic
08-14 05:14:12.865 5310 6321 D audio_hw_primary: disable_snd_device: snd_device(35: handset-mic)
08-14 05:14:12.870 3869 6327 D AudioGroup: stream[93] is dead
08-14 05:14:12.870 3869 6327 D AudioGroup: group[92] is dead
08-14 05:14:12.871 5310 5849 D audio_hw_primary: adev_close_input_stream: enter:stream_handle(0xf64cc1c0)
[B]08-14 05:14:12.871 5310 5849 D msm8916_platform: platform_set_echo_reference: disabling echo-reference
[/B]
[Miscellaneous Android Development] josoft86:
Does not update the date and time also exactly setting time zone and the name of backup generation car of course marks" 1970-01-04--07-22-40_trunk..............." and does not enable the various languages.
[Miscellaneous Android Development] siljaer:
actually we have an issue with hwlock in CM13 too: system time cannot be written to hwclock (hwclock -w or hwclock --systohc). I don't know if you are supposed to do that, though.
[Miscellaneous Android Development] ik8vwa:
Thanks for the reply. If you ever check the stock rom you will see that all the information above are nestly listed. As a consequence, I uninstalled this rom and will try to revert to the stock.
[Miscellaneous Android Development] siljaer:
If you have not made a backup before installing CM13, your only option is to reflash the phone. This link should work: http://firmwarefile.com/elephone-trunk

Follow the instructions carefully. You can brick your phone!
[Miscellaneous Android Development] ik8vwa:
That's very kind of you. I also was thinking to use the twrp backup taken from my other trunk and flash it via recovery. I already did it once and was painless. The interesting thing about reflashing completely as you said is that I would obtain a non root phone able to accept all four firmware updates that elephone released, including the March update. But other people, like you, warned me telling that reflashing via pc is a very risky business with snapdragon phones. What would you do?
[Miscellaneous Android Development] siljaer:
I reflashed only because of a strange recovery error, I would have not done it otherwise. You can restore your backup and do a factory reset and you should be able to upgrade to any firmware update. I don't think that [MENTION=7319300]ottmi[/MENTION]'s ROMs affect partitions other than boot, system and data, so these are the only partitions you should restore if your phone was running on stock ROM before CM13. It works for me. If you have a working backup you should never attempt to reflash with Qualcomm tool.
[Miscellaneous Android Development] ik8vwa:
Ok, thanks for the precious advice. Furthermore, as far as I know, once I'll flash the rooted backup (taken from the other phone) via twrp, it will not be possible to upgrade to the March 1 update. That's because root and stock updates don't go by very well. Anyway now the phone starts only in recovery but goes into bootloop. As soon as I get my hands on a pc by the end of the month, I'll be able to restore. I hope the imei are not affected.
[Miscellaneous Android Development] siljaer:
If you need it, I have a backup of an unrooted march update made with TWRP. I don't know whether it can be posted on xda, though.
[Miscellaneous Android Development] ik8vwa:
Thanks but I think it's not going to complete installation due to the fact that the phone itself is rooted. There's a potential conflict.
[Miscellaneous Android Development] ottmi:
I don't think anybody has fixed this yet? It's an issue with the realtime clock. and a problem on many Qualcomm powered phones, not just the Trunk..

Good catch! Until now I thought the issue was that the msm8916 didn't have a real time clock. But turns out, it has. Reads work fine, but since writes don't, the RTC time at least on my phone is 01/01/1970.. Apparently, writes to the RTC are disabled by default in the driver. I've tried to enable it, but then the kernel crashes during booting.. I will dig deeper..
[Miscellaneous Android Development] siljaer:
for testing purposes, I have often gone back from CM13 to unrooted stock rom and viceversa via TWRP. Each time, stock rom was not rooted. If your stock backup is not rooted you can use it and get a non rooted stock rom phone.
[Miscellaneous Android Development] Bizen-Ya:
you are right, it seems that qcom added a lot more hack to handle the overheat issue.

i don't have the stock rom files anymore so i can't compare now, but it seems that we are missing some parts of the stock rom ( thermal-engine.conf / init.qcom.rc / init.qcom.power.rc )

the thermal-engine itself throotle the CPU frequency to lower the temp of the system.

the init.qcom.power.rc switch the governor to "powersave" when the charger is plugged on.

thank you.
[Miscellaneous Android Development] siljaer:
I have compared stock and cm13 dmesg and logcat, and thermal-lib is working on both. The only difference seems to be:

[ 3.398353] init: cannot find '/vendor/bin/thermal-engine', disabling 'thermal-engine'

in cm13. However, that file cannot be found in stock rom. I have not found thermal-engine.conf / init.qcom.rc / init.qcom.power.rc either, at least not in /etc or /vendor/etc. (march update).

---------- Post added at 06:16 ---------- Previous post was at 05:54 ----------

BTW, I have never experienced any overheating issue. However, my setup is quite different: I don't use Gapps, I use F-droid instead. I can remember that Maps was always on on my old phone, draining quite a lot. I can imagine it can overheat while using car navigation. I am using Osmand (Fdroid version, no limits on maps download) with offline maps, and it works really good.

With K9, Telegram, wifi, 4G and so on, I am getting really outstanding battery life.
[Miscellaneous Android Development] marcachas:
Hi, i reading a post, with the instruction to activate all frequency for 4g on qualcomm soc, i living in Mexico and the 4g dont work, really work this post, you csn implement this?

You are the best developers, the ROM evolution very good, thanks
[Miscellaneous Android Development] siljaer:
Unfortunately, it seems that b4 band used in mexico is not supported by trunk.
[Miscellaneous Android Development] blahmartinblah:
Hi guys

Just wanted to share my experiences in case they help:

1. I think I experienced some overheating on ROM version 20160708. I was on holiday on the nice Spanish island of Minorca so the ambient temperature was around 30degC, and it would shut down after some time holding the phone, browsing the web etc. I can't be certain it was thermal, but the device felt unusually warm at the time. Since returning to the UK, I didn't have the issue.

2. I'm still having issues with my SD Card not being accessible. If I do many reboots, eventually it will work one time and then I try to keep the phone powered on to retain access. [MENTION=7319300]ottmi[/MENTION] What logs and how do I obtain them, to help debug this?

Thanks, Martin.
[Miscellaneous Android Development] siljaer:
I am sorry, I've probably misunderstood your post. You probably meant that you followed a guide to unlock some more LTE frequencies, by writing on NV memory, didn't you? Did it work?

I've read similar posts. I am not sure such a change can be implemented without the specific Qualcomm tools. However, if it worked for you, you could write about your procedure for anyone interested in doing the same.
[Miscellaneous Android Development] ottmi:
So the realtime clock on the CM13 ROM works fine. It's a bit awkward though: the realtime clock only stores a small "deltaT" of the current time (only a few ten thousands of seconds), the larger part is stored in some /data/time/ats_* file. At restart the value in the ats file is added to the value of the realtime clock to set the system time. My interpretation of this: the realtime clock only counts the seconds the device is off.

The current TWRP image doesn't add the value in the ats file and hence only interprets the few seconds of the realtime clock as seconds since epoch. That's why the system time usually show some date in January 1970.

I will have to build a new TWRP that accounts for the ats file. The code is already in TWRP, it just needs to be enabled..
[Miscellaneous Android Development] ottmi:
thermal-engine is there, just not in /vendor/bin but /bin. The init files are in / and if the config file is missing, it will use default values. But that of course requires either moving of thermal-engine or modification of the init file.

I will have the binary in the right place in the next build and also have a proper config file. It also required some modifications to the device tree to properly detect the CPU core topology (although it probably also works without).

Stay tuned..
[Miscellaneous Android Development] Lightsong:
Hello. I'm new in xda, though I have been following this project very closely for a few weeks, and I have some questions. I have been waiting to flash this rom on my elephone trunk, but I don't know much about how is it updated and such. If I flash it right now, will I have to do so every time you update the rom and lose all my data? If that's the case, how much it may take to reach a stable version (yes, I know that's annoying from me, but I don't really know much about this kind of projects)

Thanks in advance.
[Miscellaneous Android Development] ottmi:
1. I think once the thermal-engine works properly, this shouldn't happen anymore. The shutdown is an Android-generic emergency feature triggered once a certain temperature threshold is reached (the default is 68°C). The thermal-engine should start throttling the CPU before that - so the phone might feel slower when hot but it shouldn't shutdown anymore.

2. An adb shell dmesg and an adb logcat right after boot would help.
[Miscellaneous Android Development] siljaer:
When I wrote about missing init files I was refering to stock rom. I have just checked the system backup archive and they are not there. Are they somewhere else (boot?).

---------- Post added at 21:26 ---------- Previous post was at 21:19 ----------

As a general rule, no you won't. [MENTION=7319300]ottmi[/MENTION]'s updates usually can be installed on old releases. However, if you ever need to wipe your data, you have to do it from recovery.
[Miscellaneous Android Development] marcachas:
Thanks for your answer.

I have not been able to run that process, but I'm very curious.

If successful unlock all recuencias 4G network, you could enjoy my phone to 100%.

So I ask before you if it's real, if it can be done, if so, whether it can be implemented in ROM.

A hug.
[Miscellaneous Android Development] ottmi:
As [MENTION=7529884]siljaer[/MENTION] wrote, this requires some magic changes to NVRAM and as far as I understand, this can only be done using some Qualcomm proprietary Windows software. So unless somebody comes up with a method that can be performed under Android I don't see any way to do this in CM. If it's possible at all - I think so far the results have been mixed..
[Miscellaneous Android Development] siljaer:
Actually, I don't know for sure. My guess is that it can work with phones that have been intentionally "crippled" by operators. Trunk looks like a product optimized for Russian and European networks, so I am not that certain it can work. I mean, you can unlock frequencies at chipset level, but I don't know if the rest of the hardware can support that. Besides, it's possibly forbidden by local regulations.

I don't know whether you can write NV with TWRP, so I don't know whether is possible to implement that in a rom that you can flash with TWRP.
[Miscellaneous Android Development] ottmi:
New ROM is up: http://xdaforums.com/devdb/project/dl/?id=19864

It now hopefully includes a working thermal-engine that should fix the overheating problems. Also, I brought back the audio_effects.conf that should enable echo cancellation also for VoIP calls.

I've updated the kernel to reflect the latest changes upstream, including patches against the QuadRooter vulnerabilities. However, the QuadRooter scanner by Check Point still shows the phone as vulnerable to CVE-2016-5340 which is odd since the new kernel includes Code Aurora's patches (see https://www.codeaurora.org/invalid-path-check-ashmem-memory-file-cve-2016-5340). So maybe the patch doesn't fix it properly or the app is buggy. There are similar reports for other phones as well.

I've also uploaded my own build of TWRP 3.0.2 that should fix the issues with the realtime clock. I was able to do a backup with it and also flash the new ROM but apart from that I haven't tested it much. So use at your own risk. But then again, this applies to everything I upload here :)

http://xdaforums.com/devdb/project/dl/?id=19861
[Miscellaneous Android Development] vickdu31:
thanks a lot for your time and effort working on th trunk :)

One of mine is totally dead (died while charging at night..) and the other one is still on stock rom, i have try cm13 with the first one long tim ago (from ark), tomorrow, I flash your rom on the other :)
[Miscellaneous Android Development] siljaer:
There must have been a misunderstanding about VoIP cals: I did not mean that CM13 default audio_effects.conf was not working, but that it only needs to enable aec in the preprocessor, at the end of the file:

pre_processing {
voice_communication {
aec {
}
}
}

it looks like it's still missing, at least in /vendor/etc/audio_effects.conf.

---------- Post added at 09:15 ---------- Previous post was at 08:36 ----------

Maybe I've done something wrong, but I am still getting:

[ 3.401938] init: cannot find '/vendor/bin/thermal-engine', disabling 'thermal-engine'
[Miscellaneous Android Development] siljaer:
[ 3.401938] init: cannot find '/vendor/bin/thermal-engine', disabling 'thermal-engine'

and creating /vendor/bin and copying thermal-engine does not work:

[ 3.416702] init: Warning! Service thermal-engine needs a SELinux domain defined; please fix!
[ 3.416729] init: Starting service 'thermal-engine'...
[ 3.417565] type=1400 audit(729675.049:4): avc: denied { execute_no_trans } for pid=259 comm="init" path="/system/vendor/bin/thermal-engine" dev="mmcblk0p23" ino=15746 scontext=u:r:init:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=0
[ 3.417786] init: Starting service 'wcnss-service'...
[ 3.418138] init: cannot execve('/vendor/bin/thermal-engine'): Permission denied
[ 3.418282] healthd: BatteryTechnologyPath not found
[ 3.418870] init: Starting service 'sensord'...
[ 3.419726] init: Starting service 'zygote'...
[ 3.420499] init: Starting service 'zygote_secondary'...
[ 3.421306] init: Service 'thermal-engine' (pid 259) exited with status 127
[ 3.421338] init: Service 'thermal-engine' (pid 259) killing any children in process group
[Miscellaneous Android Development] ottmi:
That's really strange. Somehow it didn't use my modified audio_effects.conf for the ROM but the CM default. And in case of thermal-engine I messed up my build script, so it went to /system/bin again...

I've created a small patch that should fix both issues. Just flash it after the full ROM:

http://xdaforums.com/devdb/project/dl/?id=19877
[Miscellaneous Android Development] siljaer:
Thanks! Now you have to wait for someone coming back from hot and sunny beaches, reporting about overheating issues :)
[Miscellaneous Android Development] Bizen-Ya:
Thank you ! i will test this ASAP.

i'm back on the stock rom, to check how she is working with the heat issue, and i can go really low with this rom :

I/ThermalEngine( 290): Mitigation:CPU[0]:200000 Khz

I/ThermalEngine( 290): Mitigation:CPU[1]:200000 Khz

I/ThermalEngine( 290): Mitigation:CPU[2]:200000 Khz

I/ThermalEngine( 290): Mitigation:CPU[3]:200000 Khz

btw the thermal engine is here on the stock rom :

root@elephone:/ # grep thermal init*

init.target.rc:service thermal-engine /system/bin/thermal-engine
[Miscellaneous Android Development] Diamorphoses:
Hey all. I have been away due to work (since the old thread that I don't comment on this subject). I am still running an old version of ottmi's CM13 (13.0-20160414) that works perfectly for me, but I will flash the latest realease as soon as I have some spare time (maybe in october :p)

I just passed by to say thank you to everyone that is putting a lot of effort to keep this ROM updated pushing it to perfection. BIG BIG thanks Ottmi (and everyone helping him).

I would like to suggest to everyone that is happy with this ROM to donate to the developers. I know they dont do it for the moneys, but it's always nice to offer a beer to someone that is doing a great job right?

Thanks again :good:
[Miscellaneous Android Development] vickdu31:
So I installed the latest build and the fix and the gapps, and the rom is perfect, no overheating, good battery life, perfectly smooth.

Its a bit sad elephone don't care about the device and they stoped production very fast, its a nice small device and th fact that its qualcomm gives us this thread with perfect rom and optimisation :)

Big up for ottmi and all your work. Sadly, the previous trunk I had died while chargin, the motherboard is maybe not super high quality...
[Miscellaneous Android Development] josoft86:
Thanks [MENTION=7319300]ottmi[/MENTION], tested TWRP 3.0.2 did backup and the time and date function, new room smooth and does not heat up good work continues. Thanks again.
[Miscellaneous Android Development] vickdu31:
Actually i got over heating after charging. Once battery was full, i removed it and for more than 1h it was still warm. Then i try to unlock it and it was verry slow, and it crashed, couldn't do anything, i removed battery and now its good again.

Phone was idle all day.

Did anyone found this bug after charging ?
[Miscellaneous Android Development] siljaer:
I have just charged my phone up to 100% and I did not experience overheating or crashes.
[Miscellaneous Android Development] ottmi:
That's really odd. Does it happen on every charge? What happens if you turn the phone off for charging? The fact that it was very slow was probably due to thermal-engine that should clock the CPU lower if it gets too warm. Also, you should have noticed that the LCD backlight has been dimmed..
[Miscellaneous Android Development] vickdu31:
I can't get this bug anymore so I guess its back to normal, I tell you if something similar happens again :)