yashsingh1/xdaforums huggingface dataset:
[Galaxy Note 4 Original Android Development] RaymanFX:
The baseband does match the baseband version.

And even if it wouldn't, I think it's still the missing usb device that's killing us.

So it seems there's 2 modem parts which are internally connected via usb bus on the Exynos chip.

These are (as you correctly pointed out before):

<7>[ 4.700443] [c5] usb 1-2: udev 2, busnum 1, minor = 1
<6>[ 4.700457] [c5] usb 1-2: New USB device found, idVendor=04cc, idProduct=0500
<6>[ 4.700467] [c5] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
<6>[ 4.700475] [c5] usb 1-2: Product: ST-Ericsson USB ROM
<6>[ 4.700483] [c5] usb 1-2: Manufacturer: ST-Ericsson

<7>[ 15.064207] [c2] usb 1-2: udev 3, busnum 1, minor = 2
<6>[ 15.064227] [c2] usb 1-2: New USB device found, idVendor=04cc, idProduct=2342
<6>[ 15.064239] [c2] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[ 15.064250] [c2] usb 1-2: Product: ST-Ericsson Thor IPC-Custom
<6>[ 15.064261] [c2] usb 1-2: Manufacturer: ST-Ericsson
<6>[ 15.064270] [c2] usb 1-2: SerialNumber: B1E92517540

While the first is also found on my cm-12 ROM, the second one (ST-Ericsson Thor IPC-Custom) is clearly not detected for whatever reason.

Instead, cm-12 shows the following device which never shows on stock:

<7>[ 16.915493] [c7] usb 1-2: udev 3, busnum 1, minor = 2
<6>[ 16.915505] [c7] usb 1-2: New USB device found, idVendor=04cc, idProduct=0500
<6>[ 16.915515] [c7] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
<6>[ 16.915524] [c7] usb 1-2: Product: M7450 Dumper
<6>[ 16.915532] [c7] usb 1-2: Manufacturer: ST-Ericsson

However, this device should clearly be the missing (ST-Ericsson Thor IPC-Custom) usb device, because it's on the same usb bus at udev 3, busnum 1, minor = 2.

I'm not quite sure what this means just yet, but my guess is the modem kernel driver crashes at some point, so during initialization, the usb device shows itself as 'Dumper' because it dumps the crash logs somewhere.

Then again, I'm not sure why the userspace modem daemon (cp-boot aka cbd) does not detect this and instead reports a successful modem boot via the property we discussed earlier (ro.boot.cbd_done = 1).
[Galaxy Note 4 Original Android Development] gekkehenkie11:
Yep, exactly my conclusion Rayman. So how to proceed. The dmesg log doesn't show us enough info. So I'd say, add more info related to that usb stuff, by adding that mifdebug output. Add it to the cm12 first and if it seems useful, do it for stock kernel too, compile stock kernel like normal (so as stand alone, also increase that buffer size btw) and use that kernel for stock. We then can compare logs again.

Too bad this isn't an easy fix, but with some time and dedication, we can do it Rayman :)

---------- Post added at 02:45 PM ---------- Previous post was at 02:27 PM ----------

Yes. I think the Dumper gets booted when the status is set to 2 (crash). Too bad the modem partition is that big and contains that many strings, I looked briefly through it yesterday, to see if I could find a location for the dump file indeed, but what I saw it more seems like it boots some device that can be telnetted too and where you can then issue commands to retrieve info from the modem, to debug it. But finding out how that exactly works, seems like a lot of work in itself, so I don't think that would be the best option to pursue at this time.

MAYBE if someone emailed Ericsson though, they'd be willing to give some documentation regarding that dumper device (how to use it and how to pull info), which might be helpful.. But at this moment, I'd say: try to retrieve that mifdebug info instead.
[Galaxy Note 4 Original Android Development] gekkehenkie11:
Rayman, I think the main question is: how to initiate that USB device. I think it will become a lot clearer how that works if you could enable that mifdebug. I don't know much about that USB stuff, will need to google and do some research, but from going by the current log, to me it SEEMS it gets initiated by that "usb usb1: (2)send start USB_REQ_GET_STATUS" where the USB controller then reports that it found a new device (the modem). If I understand correctly, that's merely the hardware detection. Much like you'd see a device in your windows device manager for which there isn't an installed driver yet (you'd see the hardware id's just like here, I think as a result of a bus scan). I think that's indeed what's going wrong, when the modem is booted, it must know about the hardware present. If it doesn't see the modem hardware present after the firmware is booted, it crashes. Although we dont know 100% sure, this seems to make a lot of sense indeed.

So, we'd need to look into that process (detecting and making available the USB modem hardware) and make sure it happens before the firmware is booted. Again, I think the best place to start is enable that mifdebug, it's used quite a lot in those USB routines.
[Galaxy Note 4 Original Android Development] gekkehenkie11:
Ok [MENTION=3463426]RaymanFX[/MENTION], made some great progress with my research, figured out all the USB stuff :) The detection of USB devices is done in the code via "usb_new_device". This function is called either from "register_root_hub" (but in that case it's just for the EHCI controller itself) or from "hub_port_connect_change", in all other cases (= normal USB devices).

So, in short, hub_port_connect_change is the function that's being called for the modem detection. This function prints in the beginning of its execution:

"port %d, status %04x, change %04x, %s\n",

If you grep the output for ", change" (mind the comma), you'll see in stock that this indeed happens every time before the detection of a normal USB device.

Now, if you look at the description of that function:

Now if you see in stock output, a few lines above this, it says:

So I think that's the key here !! That string only appears once in both stock as in cm12. In stock it happens before the modem detection and in Cm12 before the dumper detection. So I think this is the key !! It detects that the 'device firmware' of the modem changed and then starts the USB init of that device.

So... what happens here is .... that that first USB device it detects, that "Ericsson USB ROM" actually *IS* the modem !!! It detects it, then loads a new FW to it, resets it and then it reports as modem !!! If you grep the output for "usb 1-2" then you'll see that first in relation to that USB ROM, then it does:

and then it says firmware changed and it detects the modem !! So it seems that's actually the same device !! So

1) It first detects the modem as "ROM"

2) it loads the FW to it

3) Resets it.

3) System detects a changed FW and re-initializes the USB device !!

So, the key seems to be in that loading of the FW !! I think that somehow fails and then the modem doesnt turn into the modem, but into a dumper (quite neat eh !). So that at least explains the USB stuff ;) Now going to look into the loading of the FW ...
[Galaxy Note 4 Original Android Development] gekkehenkie11:
So, we now understand the USB stuff. When succesful it works like this:

1) System detects the modem hardware as "ST-Ericsson USB ROM"

2) It loads the modem firmware to it

3) It resets the device, which then reports as the Ericsson USB modem: "ST-Ericsson Thor IPC-Custom"

4) Modem sends a "Phone Active" signal with status 1 to the mainboard. I think this is the modem's way of telling the mainboard: Hey I'm up and running, you can attach the driver

5) it attaches the driver to the hardware by executing the "usb_probe_interface"

6) Modem status changes to 4 (= modem up)

However in CM12, the modem sends out Phone active status 1 followed by 0, before it even resets the device. Phone active status 0 is processed by the system as a modem crash. Then it resets the ROM device which then becomes a dumper device.

So that's how that works. But the million dollar question is, why does the modem report status 1 and 0 before it has even reset the device ? It would indicate some problems inside the modem, processing the FW you're loading to it. But that doesn't make a lot of sense, since you didnt change anything there and works fine with Touchwiz ...

So, I'm not sure how to proceed. It makes no sense. I think we'd need to know what's going on inside the modem, cause that's our problem child, that's the device that reports status 0. So maybe we should send an email to Ericsson about documentation on their "M7450 Dumper", so we can maybe retrieve some info on why the modem crashes. What do you think, [MENTION=3463426]RaymanFX[/MENTION] ?

*EDIT* I just sent a mail to ericsson, it's a long shot, but who knows, maybe they're willing to send some documentation :) And if not ... I'll see if I can reverse engineer the modem a bit to find out myself ;)
[Galaxy Note 4 Original Android Development] ddaharu:
keep up the great work guys!
[Galaxy Note 4 Original Android Development] calj17:
Congratulations Raymanfx and gekkehenkie11 for your commitment and great work
[Galaxy Note 4 Original Android Development] gekkehenkie11:
Thanks, appreciate it. Unfortunately not there yet, reverse engineering the modem will take some time ... Hoping there's a better alternative.

[MENTION=3463426]RaymanFX[/MENTION]: a long shot, but I was thinking: we put stuff into the modem, it processes it and then it simply goes wrong for cm12 while it works with stock. So, what exactly could be different input then ? The *firmware* is the same (same baseband you said), so the nv_data. bin must be the same to, but, here's a difference:

<3>[ 8.364532] [c7] mif: cbd: handle_get_cfg_string: Received FLB_SEND_GET_CFG_STRING cm_trelte_21;

vs

<3>[ 6.273312] [c7] mif: cbd: handle_get_cfg_string: Received FLB_SEND_GET_CFG_STRING treltexx_21;XEO

So the modem wants to know the CFG name. Maybe it uses it to process some modem config and because you've set your name to cm_trlte it fails ? Long shot, but I think it's worth trying to set it to trltexx. Not sure about that XEO part though, what that means... But I think this is worth a shot ! It must be something we're feeding the modem. Since all firmware files are the same, it would kinda make sense that it has to be something like this. Maybe there are several config files and the modem can't find the correct one because of a different name ? And then when the firmware is up and running (reports PA=1) then wants to process the config, cant find it and crashes and sends PA=0 ? Of course it's a long shot but: would love for you to try it ;) In the end, if everything we're feeding the modem is exactly the same as stock, it would have no reason to crash ...

BTW, to get to the cfg string it reads:

ro.product.name

ro.revision

ro.csc.sales_code

I guess revision is that 21 ? and XEO maybe that sales code (edit yeah XEO is a sales code for Poland). Can you check those in stock and if so, set them to that in CM12 ?
[Galaxy Note 4 Original Android Development] ddaharu:
this progress is so exciting. you guys are the best.
[Galaxy Note 4 Original Android Development] gekkehenkie11:
Thanks ! Actually I think there's a bigger chance that my idea in my last post is going to work than being a 'long shot' ;) I just saw in the modem firmware that it has a table containing:

treltexx_19

treltexx_20

treltexx_21

etc

So, it would make a lot of sense that it's comparing the string that the system composes, as created by those 3 parameters i mentioned in my previous post and that's then an indication of a configuration ! And since in the Cm12 case that fails (cause the string "cm_trelte_21" obviously isn't in that table), the modem might crash. I think this actually has a good chance of being the culprit. Let's hope for that ! [MENTION=3463426]RaymanFX[/MENTION], can't wait for you to try this :)
[Galaxy Note 4 Original Android Development] ddaharu:
def can't wait! :D you guys are like super motivation. and I know that this will be successful and yes Ashton can't wait to be a tester!
[Galaxy Note 4 Original Android Development] RaymanFX:
Dude, you are a BEAST!

Regardless if this will work or not, I never even took the nv binaries into consideration, because they are prebuilts (obviously) so they would never differ from the files being used by stock.

Unfortunately my days this week are outrageously busy and I don't have time for anything but university really until Friday, but I can't miss this opportunity now, can I. I'm running a build right now with the rename and the correct props being set.

I'll let you know how it went in a few hours :)
[Galaxy Note 4 Original Android Development] 557953:
Best Of luck to you :)

#fingers crossed
[Galaxy Note 4 Original Android Development] neoMJ:
Fingers crossed and waiting anxiously.

RaymanFX, can you make sure you push all latest fixes to repos before returning to your university studies?
[Galaxy Note 4 Original Android Development] renanterzi:
Alllll Brazilians are fingers crossed !!!!!!!!!!!!!!!!!!!!!
[Galaxy Note 4 Original Android Development] calj17:
Fingers crossed

Enviado do meu iPad usando Tapatalk
[Galaxy Note 4 Original Android Development] RaymanFX:
You know what?

IT ACTUALLY F*KIN WORKED.

Get rekt Samsung, you ain't fooling anyone anymore with your stupid barriers and checks!

This is the most stupid thing I've ever seen in terms of keeping people from doing productive development on their phones.

If it weren't for you, I'd probably never even take this (a simple product string check) into consideration in the first place.

KUDOS MAN!

Fresh build will be uploaded on Friday, unfortunately I haven't been able to put together a clean commit for the rename, but for anyone interested: just rename the whole device props and configs from trelte to treltexx and you should be good to go.

Jesus Christ Batman I'm still puzzled over this, Samsung.
[Galaxy Note 4 Original Android Development] gekkehenkie11:
BOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOM

Victory !! :victory:
[Galaxy Note 4 Original Android Development] :
Any fixes in the new 1106 build?
[Galaxy Note 4 Original Android Development] ilker4fun:
+1
[Galaxy Note 4 Original Android Development] agentdeep:
I finished building CM13.

If it will boot, I will share it.

EDIT: IT WON'T BOOT :(
[Galaxy Note 4 Original Android Development] :
i love u man
[Galaxy Note 4 Original Android Development] agentdeep:
It won't boot though, stucked in Samsung logo
[Galaxy Note 4 Original Android Development] :
Samsung????

You mean the note 4 logo??? You tried flashing googymax?
[Galaxy Note 4 Original Android Development] agentdeep:
yea, in Note 4 logo.

I will try to build the aosp version because I saw two lunch device, CM and AOSP.
[Galaxy Note 4 Original Android Development] :
I friggin love you

---------- Post added at 01:35 PM ---------- Previous post was at 01:22 PM ----------

I have a question, while you were on cm12.1 how long was your sot?
[Galaxy Note 4 Original Android Development] agentdeep:
Apparently, AOSP MM is also not booting, this time stucked in android animation...
[Galaxy Note 4 Original Android Development] :
Oy Vey!!! Thanks for trying man.....I guess we'll have to wait this one out. Anyone wants Nexus 6P Bootanimation an Splash Logo?
[Galaxy Note 4 Original Android Development] falanca:
Rom works well, except unsolved issues... Thanx for everyone who develops and helps this rom.

1) I cant "tor everthing" with orbot! This means something wrong with this rom since 2015/10/13 build (might be 2015/09/30). It was working before!

2) When I enable custom location on the weather wigdet, cant update with openweathermaps api...This one was working too.

I tried it dirty flash, clean flash, even with dual boot system... same situation for both :(

If you consider these issues for the next build, I will appriciate.
[Galaxy Note 4 Original Android Development] ogo2012:
CyanogenMod officially granted Cyanogen Apps Package. C-Apps includes composition:

Theme Chooser with per-app theming

Theme Store

AudioFX

Cyanogen Accounts

Gallery

Dialer with TrueCaller integration

Email powered by Boxer

Video YouTube.
[Galaxy Note 4 Original Android Development] suat6027:
İs this working???
[Galaxy Note 4 Original Android Development] suat6027:
Denedin mi
[Galaxy Note 4 Original Android Development] ProtoDeVNan0:
I will try to compile and get this rom to boot on 6.0 too! :D ( It won't boot 99.9% but yeah, why not have some fun)
[Galaxy Note 4 Original Android Development] ivanmkd:
Here you go for all that you asked, bootable mm6.0 :) Hit thanks to me and of course [MENTION=3463426]RaymanFX[/MENTION] for his work

http://xdaforums.com/note-4/orig-development/unofficial-cyanogenmod-13-0-t3246859
[Galaxy Note 4 Original Android Development] white7561:
The cyanogen mod gapps really working fine..
[Galaxy Note 4 Original Android Development] :
Hey everyone. It's been a long time since I've used this ROM and I'm experiencing some new bugs. Not bugs but problems . One is that my phone lags a lot more than usual like really a lot. Here's something unbelievable even more than stock . And the second is that my battery drains too fast. Anyone got any ideas?

---------- Post added at 01:01 PM ---------- Previous post was at 12:34 PM ----------

Now I'm not facing much of lags but battery is still awful
[Galaxy Note 4 Original Android Development] ilker4fun:
Hayır sadece soruyu +1 ledim
[Galaxy Note 4 Original Android Development] suat6027:
İs there any body kmow that ı can use s pen? Which app?
[Galaxy Note 4 Original Android Development] TANKRED_ENDURES:
http://xdaforums.com/android/software/app-app-samsung-devices-provided-stylus-t3000448
[Galaxy Note 4 Original Android Development] Alega75:
I'm using this rom from 2 weeks ago, I had the battery drain problem and I had to reinstall (Clean Instal) a least 3 times between the last two releases and my conclusion based on my personal experience is that the problem was caused for use xposed framework with this rom, now I removed it and everything is working fine.
[Galaxy Note 4 Original Android Development] :
I just clean installed it today after using stock for a while.... Battery now that I think about it ain't that bad but my phone lags like crazy when switching apps and especially switching to launcher. IDEAS?
[Galaxy Note 4 Original Android Development] ahmd gomaa:
+1 long lag
[Galaxy Note 4 Original Android Development] travis82:
What about a CM 12.1 build until CM 13 is a usable daily driver? What do you all think?
[Galaxy Note 4 Original Android Development] kunlegzy:
Sorry is this build marshmallow based?
[Galaxy Note 4 Original Android Development] BallerMan:
ROM is really smooth, but recent apps when closing an app or all applications via the clear all button there is a noticeable delay. Anyone else experiencing that?
[Galaxy Note 4 Original Android Development] nasirnada:
I am using this rom build 6.11.2015 very smooth.

Is it possible to use multi widow.
[Galaxy Note 4 Original Android Development] falanca:
https://imgur.com/pCUbbc2

security issues for build 2015-11-06
[Galaxy Note 4 Original Android Development] andrew.mackew:
Maybe a false flag?
[Galaxy Note 4 Original Android Development] white7561:
Np. Its the same on me
[Galaxy Note 4 Original Android Development] andrew.mackew:
[MENTION=3463426]RaymanFX[/MENTION]

First off, thanks for the best rom ever for our N910C..

I just wonder if are you aware of this issue above..
[Galaxy Note 4 Original Android Development] ahmd gomaa:
may you tell me what is wrong i dont understand.. thanks
[Galaxy Note 4 Original Android Development] Alega75:
No lag here at the moment ..everything runs smoothly on my N910H BL 5.1.1

---------- Post added at 05:18 PM ---------- Previous post was at 04:32 PM ----------

I've been searching google about this vulnerability and recommendations to be safe are these:

Disable automatic MMS retrieval in Messaging setup

Block MMS from unknown senders

Use a browser that is not vulnerable to Stagefright (I use Firefox)

I do it and keep on enjoying this great rom.
[Galaxy Note 4 Original Android Development] falanca:
Yes, rom is great, I have very special security settings (firewall+customised firefox "orfox", etc...)

and I've closed auto mms reicive option but still same situation. :( System has to be patched.

http://www.cvedetails.com/cve/CVE-2015-6602/

http://www.cvedetails.com/cve/CVE-2015-3876/

---------- Post added at 08:53 PM ---------- Previous post was at 08:48 PM ----------

Unfortunately no, the rom is vulnerable!
[Galaxy Note 4 Original Android Development] :
I dunno what the problem is... I installed this rom after being on stock for so long and it lags like crazy. I mean a lot not long lags
[Galaxy Note 4 Original Android Development] travis82:
What about a 64bit build since our socs are 64bit?
[Galaxy Note 4 Original Android Development] ddaharu:
Hey man what's up? No this isn't marshmallow. There's a build to try in original development
[Galaxy Note 4 Original Android Development] masaichris:
I have been on this ROM for a very long while now, build after build, I don't notice any battery drain, I easily get 3.5 to 4 hours SOT daily. I have Xposed framework v.75 installed and Amplify dealing with all the unnecessary wakelocks and Alarms. Generally the ROM is great on battery.

Lags are present a couple of times in different occasions but the Clearing of all Apps in the Recents panel has a very serious noticeable lag. Apart from that all is good.

The 6.0 MM build i saw posted on some previous post, does it work (boot and RIL) has anybody tried it out??
[Galaxy Note 4 Original Android Development] slowik515:
AFAIK 6.0 boots but RIL and calls do not work. You have only Wi-Fi connection.

Wysłane z mojego SM-N910C przy użyciu Tapatalka
[Galaxy Note 4 Original Android Development] andrew.mackew:
Hopefully, in this meanwhile, our beloved dev [MENTION=3463426]RaymanFX[/MENTION] will bring us fix and updates for the old and good lollipop.. that, pretty much, do the job. :good:
[Galaxy Note 4 Original Android Development] mitsuji26:
What is the changelog of this rom?
[Galaxy Note 4 Original Android Development] sirnatli21:
Marshmalow ?

SM-N920C cihazımdan Tapatalk kullanılarak gönderildi
[Galaxy Note 4 Original Android Development] zxcslo:
In the last build, does the car Bluetooth calling working?
[Galaxy Note 4 Original Android Development] ahmd gomaa:
BATTERY BATTERY BATTERY

what to do ?
[Galaxy Note 4 Original Android Development] CLShortFuse:
No, it doesn't. It will dial, but won't pick up anything you say. Bluetooth has had issues for a while now.

I just set up a Kevo and it doesn't work with it. It actually only worked once. My wife's Z5C works fine.
[Galaxy Note 4 Original Android Development] r0gger:
After few weeks with the ROM (I'm using the latest EOS build), I can report these:

- recents menu "clear all" is laggy (a sec or two until close all)

- bluetooth music playback is much more unstable compared with TW roms, especially if you changing the songs via blootooth command (just disconnecting randomly)

- bluetooth voice - not working

- "incoming call" "screen on" is laggy (2+ secs until screen goes on)

I fixed Incoming call screen on delay with flashing 4PDA's - mcaserg last ulitmate kernel (UPD. 21.09.2015 Android 5.1.1 - AOSP

Ultimate_Kernel_v.51), where with this kernel, when I receive a call, the screen goes on for less than a second.

Edit: Back to stock kernel, after few hangs and wrong battery reading from mcaserg's kernel. It can be because I just flashed the kernel without caches purge.
[Galaxy Note 4 Original Android Development] BallerMan:
Anyone else getting low benchmark results ?
[Galaxy Note 4 Original Android Development] travis82:
logcats people post them here so we can see the bugs :) can't help without logcats.
[Galaxy Note 4 Original Android Development] BallerMan:
Hey guys was wondering if its possible to make a CM11 build. Miss good old kit kat!
[Galaxy Note 4 Original Android Development] beypazari:
This would be awesome. Cm 11 would fly on this phone
[Galaxy Note 4 Original Android Development] CLShortFuse:
[MENTION=3463426]RaymanFX[/MENTION]

I just wanted to thank you for all your work, but I'm moving on to greener pastures. I'm using a Z5 Premium now. It's got sources for nearly everything.

I wish you all the best and may your UI be smooth and your battery life, long.