yashsingh1/xdaforums huggingface dataset:
[Galaxy Note 4 General] gekkehenkie11:
Ok guys I've got a REALLY good clue now !! :) mdm_helper on CM12 is never started !! Or it's started and stops immediately, I don't know, but either way, this is our problem ! I just found this out, I was analyzing the log files and I saw that this part actually appeared twice in the log from samsung:

<4>[ 4.052292] [ALOG] 1 supported modem(s) found
<4>[ 4.052327] [ALOG] Setting up mdm helper device structure
<4>[ 4.052453] [ALOG] Found private data for MDM9x35
<4>[ 4.052489] [ALOG] ESOC Details:
<4>[ 4.052489]	Name:MDM9x35
<4>[ 4.052489]	Port:/dev/esoc-0
<4>[ 4.052489]	Link:HSIC
<4>[ 4.052520] [ALOG] Device configuration loaded
<4>[ 4.052552] [ALOG] Starting MDM helper
<4>[ 4.052583] [ALOG] Creating thread for MDM9x35

And then I saw that these strings come from two files:

system/bin/mdm_helper and

system/bin/mdm_helper_proxy

So I checked by modifying the binaries and found that in samsung log, the first time it appears is from 'mdm_helper' and second time it appears is from 'mdm_helper_proxy' ! I also saw that after the first time it appears the modem thread is started, so mdm_helper starts the modem.

Now, in CM12 the above only appears once ! I checked, again by modifying strings in both binaries and I saw that it's coming from mdm_helper_proxy !! So mdm_helper doesn't even output anything at all, in fact, it's not among the running processes (in stock it is) !! So no wonder the modem doesnt get started, the mdm_helper who's supposed to start it, is nog even started itself :)

So now the last part of the puzzle, which (hopefully) should be easy is: find out where mdm_helper gets started in stock and have that done for cm12 too :)

*EDIT* in fact, it's started in the ramdisk. Anyway, dinner is ready, the misses is waiting :) Hoping the last part is easy from here on ...
[Galaxy Note 4 General] fattire:
I dont' have a sprint phone, but a quick search found the oppo version:

service mdm_helper /system/bin/mdm_helper

class main

onrestart setprop ro.service.mdm_helper_restarted "true"

disabled

and it's started if the ro.baseband property is set:

# Start up mdm_helper if sglte detected

on property:ro.baseband=sglte

mkdir /data/misc/mdmhelperdata 0700

start mdm_helper

Note at least for oppo that if ro.baseband=mdm it starts the kickstart service instead
[Galaxy Note 4 General] gekkehenkie11:
Flashing CM12 again, I got hope I'm going to get it up and running now :)
[Galaxy Note 4 General] Beukhof1:
Fingers crossed!
[Galaxy Note 4 General] gekkehenkie11:
No go yet, but great progress for sure !!! I have mhi_pipes up now !!! :D After boot it switched icons a few time for the network signal but it's gone again, going to investigate :)
[Galaxy Note 4 General] gekkehenkie11:
It's getting even better, network signal popped up and I can call now !! :D However when the other party answers I don't hear anything and the other party doesn't hear me... But great progress indeed !! :D
[Galaxy Note 4 General] gekkehenkie11:
mobile internet is working too now :D
[Galaxy Note 4 General] Beukhof1:
GJ! Time for a new upload? Haha
[Galaxy Note 4 General] isaakmg:
Great work friend!!!!!! When you upload again, please upload to mega or similar server faster....

Thank you for you great work....
[Galaxy Note 4 General] Beukhof1:
Is this fix (from T-Mobile version) included?

Play store doesn't yet recognize 5.0 on Note 4, so some apps are missing
[Galaxy Note 4 General] isaakmg:
Pass by pass my friend[emoji6] ...first signal, second, upload to mega and after....vacations.....hahaha haha. ...
[Galaxy Note 4 General] gekkehenkie11:
Hehe yeah without any sound, calling is of not much use, let's fix that first :) I saw this in the dmesg log:

init: sys_prop: permission denied uid:1013 name:audioflinger.bootsnd

Doesn't appear on stock, sounds like this could be the problem ...
[Galaxy Note 4 General] gekkehenkie11:
Anyway attached is the working mhi.ko, compiled for the CM12 kernel. It should go into system/lib/modules with permission 644. And here new boot.img, with modified ramdisk init files to start up mdm_helper: http://www.filedropper.com/image-new200

I'm sure someone can fix up a nice zip installer. I've had enough for today, thanks everybody for their help ! Been a great day with progress, nice to finally have internet and calling up (at least partly, still needs some fixing). And oh yeah, this is mainly for devs anyway, as long as call audio doesn't work, I guess it's not of much use for end-users. So that needs fixing first.
[Galaxy Note 4 General] Preaper:
That must feel awesome. Finally cracked this puzzle. Thanks, and enjoy your holiday!
[Galaxy Note 4 General] albireox:
And now the painful waiting...
[Galaxy Note 4 General] allenjthomsen:
https://mega.co.nz/#!6YUxUZBI!l7IdHkX8iO0JDUytLyDTGbTJ3ZUWHPaLjmgURNQWyW8

Can someone test this and tell me if it works properly its the mhi.so and boot.img in a zip
[Galaxy Note 4 General] albireox:
Flashed it now, I'll tell you in a few minutes.

---------- Post added at 10:16 AM ---------- Previous post was at 10:13 AM ----------

It freakin' works! Thank you guys!
[Galaxy Note 4 General] isaakmg:
Great work guys!!!! call work everything? Sent and received OK?
[Galaxy Note 4 General] albireox:
Call works (meaning that you can call someone and you see when someone calls you) but you don't hear anything (known issue).
[Galaxy Note 4 General] isaakmg:
Thanks.....somebody call fix? [emoji6]
[Galaxy Note 4 General] Beukhof1:
Great work guys! Signal + data (no sound from call) works here to. OMG such lag free magic!

Can someone create a new cm12 version with the fixes from the T-Mobile version:http://xdaforums.com/note-4-tmobile/development/unoffcial-cm-12-0-t-mobile-note-4-t2964887

I'm missing Google chrome and more apps on the playstore

Maybe [MENTION=2457777]slayher[/MENTION] or [MENTION=265070]Fattir[/MENTION] can help with the fixes?
[Galaxy Note 4 General] allenjthomsen:
Great news for me i tossed that together in 2 minutes from what i was given by OP
[Galaxy Note 4 General] isaakmg:
I don't unterdstand nothing.....I'm silly....On the tmobile version sound of call? And have patch fix for this? And this patch fix run in our version?
[Galaxy Note 4 General] albireox:
I don't think there is a patch for our phone yet.
[Galaxy Note 4 General] isaakmg:
What's the solution?[emoji25]
[Galaxy Note 4 General] gekkehenkie11:
On T-mobile everything works already for quite a while: http://xdaforums.com/note-4-tmobile/development/unoffcial-cm-12-0-t-mobile-note-4-t2964887

This thread is for 910F.
[Galaxy Note 4 General] Beukhof1:
Nice work on finding the fix man!

Can you pls create a flashable zip with your fixes and the T-Mobile version fixes?
[Galaxy Note 4 General] lycan_codex:
Can anyone change the build.prop file using root explorer and make below changes on SM-N910F:

ro.product.device=trltetmo and ro.product.model=SM-N910T

And then try installing the tmobile CM 12 zip file plus the above fix for signal and data and check if everything works. I am doing this currently and check if it works.
[Galaxy Note 4 General] albireox:
Please let us know if it works.
[Galaxy Note 4 General] lycan_codex:
Hi, I am unable to install the T-Mobile CM12 latest zip. I know you need to change the update-script to match the trlte but i am having trouble installing the zip itself. It fails with abort 7 error. Can anyone shed more light.

This is just Trial and Error, I would not want anyone to try this. i.e. flash tMobile CM12 zip plus the data fix.
[Galaxy Note 4 General] thehacker911:
Github Sources for Device and Kernel?
[Galaxy Note 4 General] jazzypit:
try with phils recovery
[Galaxy Note 4 General] lycan_codex:
I always had Phils recovery. After removing the first two lines of the updater script, it fails after sometime with Status 1 error.
[Galaxy Note 4 General] gekkehenkie11:
What script ? You dont have to update anything, all files in this thread are for trlte ONLY. So that's 910F only ! If you have T-mobile, you should go to that forum.
[Galaxy Note 4 General] gekkehenkie11:
Thanks Preaper ! I think the next step now should first be to set up an official trlte branch, that leeches of development in trltemo, so we can enjoy the fruits of their fixes too. I'm not sure but I think you said you wanted to set it up ? If not I can do it, but since I'm leaving today I don't think I have a lot of time the next 2 weeks to do this. Anyway regardless, good luck and I hope you and the others will continue here, would be great to see !!
[Galaxy Note 4 General] albireox:
The build you posted a few days ago (for 910F) works and also has data working after you flash the fix. The question was if we can have the 910T variant (updated) with the data fix. Don't know if it makes sense.
[Galaxy Note 4 General] cedricf25:
Thanks !

You can release your code ? Maybe someone can continue the work during your holidays ?
[Galaxy Note 4 General] Batfink33:
[MENTION=3296134]gekkehenkie11[/MENTION] is a real star in this thread along with the T-Mobile devs. Been a pleasure reading the progress as it's went along. Just wish I knew how to develop and I would've helped.
[Galaxy Note 4 General] Beukhof1:
Is there someone here who can do this. And maybe also setup a ROM thread?
[Galaxy Note 4 General] isaakmg:
Nothing help?
[Galaxy Note 4 General] gekkehenkie11:
910T has mobile internet up already for a long time. Really, check out their thread.
[Galaxy Note 4 General] gekkehenkie11:
Really, at this point it's just for devs, current connection is unstable (it disconnects and reconnects) and calling is without voice, so for you guys as users it's just not ready and still far from daily driver status. Give it some time, hopefully people like [MENTION=263774]Reaper[/MENTION] and [MENTION=4748177]vogli[/MENTION] can do some nice things when I'm away.
[Galaxy Note 4 General] spleef:
Can someone repost/mirror the fix none of the links are allowing me to download it
[Galaxy Note 4 General] gekkehenkie11:
Attached is the ramdisk I used (I posted mhi.ko already), it's just the normal CM12 ramdisks plus loading of the mhi.ko driver and then added the mdm_helper part. Use a tool like Android Image kitchen, for linux and windows available here, works really great: http://xdaforums.com/showthread.php?t=2073775

So basically it's just that: loading of the mhi.ko driver and then starting mdm_helper which boots up the modem.
[Galaxy Note 4 General] spleef:
Doesn't let me download either it says download failed

Even when trying to download the fix posted by allenjthomsen said invalid argument within the mega app
[Galaxy Note 4 General] gekkehenkie11:
??? xda downloads should also work, I just tested and can also download it myself.
[Galaxy Note 4 General] spleef:
Idk not working here
[Galaxy Note 4 General] gekkehenkie11:
I also just filed a request to move the thread to development, makes no sense this thread should be in general, now we have a working build up.
[Galaxy Note 4 General] gekkehenkie11:
The problem is really on your end, mate, I can download it both via wifi and via mobile internet.
[Galaxy Note 4 General] kman79:
Have nothing useful to add, just wanted to say thanks for your work. Been following this thread for a few days now, I'm impressed by you and the other devs determination to get this going. I appreciate the efforts you guys have put into this.
[Galaxy Note 4 General] spleef:
Very strange.... Not sure why would be like that.... But thank you for trying to assist and congratulations on getting a running build... I've built the one for Sprint but no cellular service not even signal bar.... So was going to take a look at this see if it would help ours
[Galaxy Note 4 General] :
[MENTION=3296134]gekkehenkie11[/MENTION], I think this thread should stay in generel for CM12 talks and that you should open a new thread in a dev forum so it won't get unnecessary questions and posts from people that just want to download it

Edit: and ofc thx for the efforts, as I don't care for the other bugs as soon as calling is fixed this will be my daily driver :)
[Galaxy Note 4 General] gekkehenkie11:
Well actually, this really has been a dev thread from the start. So I'd say, move it there and then someone can open a general CM12 thread here if they like. Of course it's up to the mods but man, if this doesnt belong in dev, then what does ? :)
[Galaxy Note 4 General] Beukhof1:
What about a ROM thread?
[Galaxy Note 4 General] Preaper:
Consider me on it.
[Galaxy Note 4 General] Beukhof1:
Cool. Do you want to create a ROM tread? If you guys want I have some spare time to create one
[Galaxy Note 4 General] jpeps:
The cm12 is not ready yet
[Galaxy Note 4 General] Preaper:
I feel like it's too early. Without call-audio functionality it's just going to be a big disappointment to a lot of users and I wouldn't want to deal with the feedback on that :). Once we get the audio issue solved I'd be game.
[Galaxy Note 4 General] albireox:
Makes sense.
[Galaxy Note 4 General] Beukhof1:
Good! So you will set every thing up and try and fix call audio and add the T-Mobile ROM fixes?
[Galaxy Note 4 General] Preaper:
Yup, thats the plan.
[Galaxy Note 4 General] gekkehenkie11:
Nice Preaper ! I'm leaving to catch my plane in 1 hour, I think I will take my SSD containing the linux virtual image though, so maybe I can do some work too ;) However please don't expect too much from me the coming two weeks.

Anyway regarding the current issue's, I think it must be somewhere in the ramdisk ini files too. The configurations that [MENTION=2457777]slayher[/MENTION] and [MENTION=3041959]fattire[/MENTION] used are different then what we need, so I think best way to go would be to compare ramdisks ini files from Cm12 to 910T stock to 910F. Good luck anyway, bro ! And thanks for the tip on extracting EXT4 on linux, worked like a charm, while none of the windows tools seem to work :)
[Galaxy Note 4 General] Beukhof1:
Have a good holiday man. And thanks for your work so far.
[Galaxy Note 4 General] Preaper:
So, the deviceconfig is complete.

I'm considering to implement the original Samsung N910F kernel in this since I noticed the audio drivers are different which could be the reason for the missing sound. That will be a project in itself.

---------- Post added at 11:23 PM ---------- Previous post was at 11:05 PM ----------

Actually, that might just be do-able. But not today - time for some sleep.
[Galaxy Note 4 General] gekkehenkie11:


I did that already and that is something you indeed surely should do. Just make a trlte dir in Samsung kernel and paste the 910f kernel in it. Make sure to use the configuration files for 910f as specified in the Samsung readme. And change the 4 kernel options regarding security at least and maybe also that mtf option. I wrote about all that some pages ago.
[Galaxy Note 4 General] dominicstg2:
cm12 port

can you try for the 910g aswell?
[Galaxy Note 4 General] DBDPCG:
Yes please , as there are already some roms that work on both 910F and 910G it MAY be easy to port it to 910G , I'm no developer so this is just my uneducated guess
[Galaxy Note 4 General] vogli:
I wonder where the source code for the mhi is from. I found a report at Code aurora, but that cannot be compiled due to a missing declaration. I guess that it depends on another repo.

Unfortunately my build does not get past the boot animation. I fixed the libtime_genoff.so problem, but there seems to be another issue as well.
[Galaxy Note 4 General] dominicstg2:
i am no developer either just asking i really want cm12 it will look so sexy on the 2k display
[Galaxy Note 4 General] gekkehenkie11:
It's inside the same package that the kernel is in, as released by Samsung on their open source website. You don't need it though to boot the kernel past the boot animation. You only need it for ril.
[Galaxy Note 4 General] Preaper:
I have to figure out how to autmatically build mhi.ko inside the cyanogen platform without breaking the device-cyanogenmod separation.

step 3 -> http://wiki.cyanogenmod.org/w/Doc:_integrated_kernel_building
[Galaxy Note 4 General] vogli:
Interesting, it is not part of slayhers repo.

---------- Post added at 12:52 PM ---------- Previous post was at 12:49 PM ----------

I already have it nearly in place. My problem was the version of the code that I had from Code aurora. Simple add it to the Makefile of the directory above (net) and create a new parameter CONFIG_MHI. Then set this parameter to m in the eur config file. It is at least building it as it failed for me.

---------- Post added at 12:56 PM ---------- Previous post was at 12:52 PM ----------

I think it really is a problem that we do not have a common code Base.

For instance, I already called the device trltexx. We do need changes in slayhers trlte-common repo for this though.
[Galaxy Note 4 General] Preaper:
Yeah, i'm already setting it up in git - but my time is pretty limited as it is crunch time at work. So if you are already there then by al means share.

I named the device trlte tough, just as in the Samsung sources. The product name is trltexx
[Galaxy Note 4 General] gekkehenkie11:
Correct, 910T uses a different way to communicate with the modem, I think it's not possible for ours though, although I haven't checked it. Anyway the mhi source is included inside the 'platform' part of the samsung zip: http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=910F (remember to also use that kernel and modify the config files slightly, to remove those 4 security lines, dont remember exactly what they were but they're printed under each other and I think one is something like "no_allow_rooting" or something like that, they're in the lower part of the config file, you could also compare stock 910F to the 910T config in CM12 you will quickly find them that way)

About compiling the mhi.ko file, see my post here: http://xdaforums.com/showpost.php?p=57460176&postcount=569. However that was just for compiling it manually, we need to integrate it into the CM12 build process, as outlined here:

http://wiki.cyanogenmod.org/w/Doc:_...uring_the_build_of_out-of-tree_kernel_modules

So we'd need to construct a command line out of the makefile that I've created. I'd say, first use my makefile (don't forget to add flag: -fno-pic !!!) run it, get it to compile and if it compiles, just see what command line it outputs to the shell and use that as the basis. You will need to construct it using the CM12 vars, like there is a var for toolchain like $(CUR_TOOLCHAIN), I just made that name up though, I dont remember what it is exactly but I think you can find it by grepping "toolchain" in the 'build' directory in CM12. Not sure if I explain myself right here :)
[Galaxy Note 4 General] gekkehenkie11:
Like, what the makefile does is:

kmake = $(MAKE) $(KERNEL_FLAGS) -C $(KERNEL_DIR) M=$(CURDIR)

$(module):
$(kmake) modules

So that would then combine into:

$(MAKE) $(KERNEL_FLAGS) -C $(KERNEL_DIR) M=$(CURDIR) modules

Kernel_flags was ARCH=arm CROSS_COMPILE=~/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi- -fno-pic but we can't use direct paths, so you'd need to analyse that build directory to see how it comes up with the toolchain path. Let's say its $(CUR_TOOLCHAIN), then the kernel flags would be:

ARCH=arm CROSS_COMPILE= $(CUR_TOOLCHAIN) -fno-pic

So all that would combine into:

$(MAKE) ARCH=arm CROSS_COMPILE= $(CUR_TOOLCHAIN) -fno-pic -C $(KERNEL_DIR) M=$(CURDIR) modules

kernel_DIR would be $(KERNEL_OUT) so that would combine into:

$(MAKE) ARCH=arm CROSS_COMPILE= $(CUR_TOOLCHAIN) -fno-pic -C $(KERNEL_OUT) M=$(CURDIR) modules

then CURDIR maybe hardware/qcom/path_toMHI so

$(MAKE) ARCH=arm CROSS_COMPILE= $(CUR_TOOLCHAIN) -fno-pic -C $(KERNEL_OUT) M=hardware/qcom/path_toMHI modules

and $MAKE would just be make I guess ? So it would all add up to:

make ARCH=arm CROSS_COMPILE=$(CUR_TOOLCHAIN) -fno-pic -C $(KERNEL_OUT) M=hardware/qcom/path_toMHI modules

So that should all transform into:

MHI_MODULE:
make ARCH=arm CROSS_COMPILE=$(CUR_TOOLCHAIN) -fno-pic -C $(KERNEL_OUT) M=hardware/qcom/path_toMHI modules
mv hardware/qcom/path_toMHI/mhi.ko $(KERNEL_MODULES_OUT)
TARGET_KERNEL_MODULES := MHI_MODULE

But I might have messed up something in the above and you need to check out CUR_TOOLCHAIN etc. But you get the idea :) Anyway again, just first get it to compile manually, like I outlined before, look really good at the commandline it outputs and use that as the main lead.
[Galaxy Note 4 General] allenjthomsen:
What does this mean
[Galaxy Note 4 General] allenjthomsen:
Sorry meant this for the remote issu
[Galaxy Note 4 General] gekkehenkie11:
It's how to integrated building of the mhi module into CM12 kernel building. We can't just add it as a 'blob', since it needs to be consistent with the current kernel build (and regardless, it would make no sense to add something as blob when we have source code available)

Ah. that's an error while syncing ? In general when encountering sync errors: Just sync it again. And again. And when it just keeps giving errors, you could try to add the '-f' parameter to sync. So: repo sync -f But that also might lead to unexpected results I'm afraid (it just forces to continue syncing after an error occurs). And, maybe a better way is to try: repo sync -c, which only syncs the *current* repo.
[Galaxy Note 4 General] 3473:
Really smooth, but any idea why we get the 'your device isn't compatible with this version' error on certain apps in the play store (Google Chrome, Reddit Sync for example). DPI hasn't been changed.

Thanks
[Galaxy Note 4 General] Beukhof1:
That is already fixed in the t-mobile version. And will be added to ours when the guys get everything setup. But I think they will first try and fix call audio.
[Galaxy Note 4 General] 3473:
Sure, thanks! :)
[Galaxy Note 4 General] gekkehenkie11:
I was just reading about make and makefiles, it seems, unless I misunderstood, that make always needs a makefile. However you can pass some of the arguments as parameters with the make command, like explained here:

https://www.gnu.org/software/make/manual/html_node/Options-Summary.html

So, we'd need a combination of makefile and parameters for the make command. I think that only makes it easier actually. Just specify all parameters that we can specify out of the makefile (like -C, which changes to that directory) and keep the rest in the makefile like it was. Just make sure we dont use any absolute paths or hardcoded toolchains etc and it should be allright.
[Galaxy Note 4 General] gekkehenkie11:
Just installed the ssd I took, so I'm up and running here too ;) The toolchain var we need is defined in envsetup: ANDROID_TOOLCHAIN, so use that one !

*EDIT* hmm no that doesnt seem to be correct
[Galaxy Note 4 General] gekkehenkie11:
Anyway I think [MENTION=263774]Reaper[/MENTION] might be able to help out, he seems to know some things about linux. I just tested, when I run:

Export test=hi

and then type echo [MENTION=250290]test[/MENTION], it shows 'hi'. however when I run that buildenvsetup and then run echo $ ANDROID_TOOLCHAIN (without space) it returns empty. Not sure why or how that exactly works but I'm sure some linux guru can help out here :)

*EDIT got it already, need to run ' setpath' function in that .sh file ;)

*EDIT2* After looking at kernel.mk, I think the kernel_flags in the mhi makefile should be like this:

KERNEL_FLAGS ?= ARCH=arm CFLAGS_MODULE=-fno-pic CROSS_COMPILE=$(KERNEL_TOOLCHAIN)/$(KERNEL_TOOLCHAIN_PREFIX)