yashsingh1/xdaforums huggingface dataset:
[Galaxy Note 4 General] AMDPOWERFIST:
Should set up a DONATION Fund for the Note 4 Dev team....

Consolidate WHO is in the group, then raise money to help with the research and development of the CM repositories and distribution of the finished product. This has happened countless times in the past, namely the devices i have used Galaxy S1 S2 S4 Note4 - and the money raised was always put to good use.

I would gladly donate to you guys. Keep up the fantastic work !!!
[Galaxy Note 4 General] Beukhof1:
How is it going guys? Any thing that boots?
[Galaxy Note 4 General] gekkehenkie11:
Haven't done anything, still waiting for somebody with a rooted Note 4 snapdragon to give me those 5 parameters I need. Without them I can't continue.
[Galaxy Note 4 General] Beukhof1:
My note is rooted. Tell me what you need me to do.
[Galaxy Note 4 General] gekkehenkie11:
Nice ! What you need:

1) You will need to have ADB installed. If not, download and install it like described here: http://xdaforums.com/showthread.php?p=48915118#post48915118

2) You will need to have USB Debugging on your phone enabled. You will need to have developer options enabled to do so. You can do so like:

Open Settings> About on your Android phone or tablet.

If you have a Samsung Galaxy S4, Note 8.0, Tab 3 or any other Galaxy device with Android 4.2, open Settings> More tab> About and tap it.

If you have Galaxy Note 3 or any Galaxy device with Android 4.3, go to Galaxy Note 3 from Settings> General> About and tap the Build version 7 times.

Now scroll to Build number and tap it 7 times.

After tapping the Build Number 7 times, you will see a message “You are now a developer!” If you have a Galaxy S4 or any other Samsung Galaxy device with Android 4.2, the message reads as follows- “Developer mode has been enabled”

Once you have developer options, open them op and enable USB debugging.

You should now be able to use ADB. Connect your phone with an USB cable, wait till you see the device in windows explorer, go to your windows cmd prompt then type:

adb shell

And continue here: http://xdaforums.com/showpost.php?p=57061123&postcount=42
[Galaxy Note 4 General] utopiate:
Here you go, I had 5 mins so...

C:\adb>adb shell

shell@trlte:/ $ cat /proc/par

cat /proc/partitions

major minor #blocks name

7 0 59283 loop

7 1 34335 loop

7 2 29138 loop

7 3 279783 loop

253 0 1048576 vnsw

179 0 30535680 mmcb

179 1 19456 mmcb

179 2 66464 mmcb

179 3 512 mmcb

179 4 512 mmcb

179 5 64 mmcb

179 6 32 mmcb

179 7 2048 mmcb

179 8 512 mmcb

179 9 512 mmcb

179 10 4096 mmcb

179 11 6144 mmcb

179 12 10240 mmcb

179 13 14336 mmcb

179 14 4096 mmcb

179 15 4096 mmcb

179 16 4 mmcb

179 17 17408 mmcb

179 18 19456 mmcb

179 19 4084 mmcb

179 20 1024 mmcb

179 21 8 mmcb

179 22 8192 mmcb

179 23 9216 mmcb

179 24 3686400 mmcb

179 25 204800 mmcb

179 26 102400 mmcb

179 27 26345452 mmcb

179 32 4096 mmcb

179 64 30703616 mmcb

179 65 30699520 mmcb

254 0 59283 dm-0

254 1 34335 dm-1

254 2 29137 dm-2

254 3 279783 dm-3

shell@trlte:/ $ ls -al /dev/block/platform/dw_mmc/by-name

ls -al /dev/block/platform/dw_mmc/by-name

/dev/block/platform/dw_mmc/by-name: No such file or directory

1|shell@trlte:/ $ cd /dev/block/platform/

cd /dev/block/platform/

shell@trlte:/dev/block/platform $ ls

ls

msm_sdcc.1

msm_sdcc.2

shell@trlte:/dev/block/platform $
[Galaxy Note 4 General] gekkehenkie11:
Thanks !! So could you do one last thing:

ls -al /dev/block/platform/msm_sdcc.1/by-name

Oh and also:

cat /proc/mtd

or if that doesnt work:

cat/proc/emmc

And could you please state your phone model ? 910F or another ?

thanks !
[Galaxy Note 4 General] utopiate:
yep 910F rooted

shell@trlte:/dev/block/platform $ ls -al /dev/block/platform/msm_sdcc.1/by-name

form/msm_sdcc.1/by-name <

lrwxrwxrwx root root 2014-02-10 21:45 aboot -> /dev/block/mmcblk0p7

lrwxrwxrwx root root 2014-02-10 21:45 apnhlos -> /dev/block/mmcblk0p1

lrwxrwxrwx root root 2014-02-10 21:45 boot -> /dev/block/mmcblk0p17

lrwxrwxrwx root root 2014-02-10 21:45 cache -> /dev/block/mmcblk0p25

lrwxrwxrwx root root 2014-02-10 21:45 dbi -> /dev/block/mmcblk0p5

lrwxrwxrwx root root 2014-02-10 21:45 ddr -> /dev/block/mmcblk0p6

lrwxrwxrwx root root 2014-02-10 21:45 efs -> /dev/block/mmcblk0p13

lrwxrwxrwx root root 2014-02-10 21:45 fota -> /dev/block/mmcblk0p19

lrwxrwxrwx root root 2014-02-10 21:45 hidden -> /dev/block/mmcblk0p26

lrwxrwxrwx root root 2014-02-10 21:45 mdm1m9kefs1 -> /dev/block/mmcblk0p14

lrwxrwxrwx root root 2014-02-10 21:45 mdm1m9kefs2 -> /dev/block/mmcblk0p15

lrwxrwxrwx root root 2014-02-10 21:45 mdm1m9kefs3 -> /dev/block/mmcblk0p10

lrwxrwxrwx root root 2014-02-10 21:45 mdm1m9kefsc -> /dev/block/mmcblk0p16

lrwxrwxrwx root root 2014-02-10 21:45 misc -> /dev/block/mmcblk0p20

lrwxrwxrwx root root 2014-02-10 21:45 modem -> /dev/block/mmcblk0p2

lrwxrwxrwx root root 2014-02-10 21:45 pad -> /dev/block/mmcblk0p11

lrwxrwxrwx root root 2014-02-10 21:45 param -> /dev/block/mmcblk0p12

lrwxrwxrwx root root 2014-02-10 21:45 persdata -> /dev/block/mmcblk0p23

lrwxrwxrwx root root 2014-02-10 21:45 persist -> /dev/block/mmcblk0p22

lrwxrwxrwx root root 2014-02-10 21:45 recovery -> /dev/block/mmcblk0p18

lrwxrwxrwx root root 2014-02-10 21:45 rpm -> /dev/block/mmcblk0p8

lrwxrwxrwx root root 2014-02-10 21:45 sbl1 -> /dev/block/mmcblk0p3

lrwxrwxrwx root root 2014-02-10 21:45 sbl1bak -> /dev/block/mmcblk0p4

lrwxrwxrwx root root 2014-02-10 21:45 ssd -> /dev/block/mmcblk0p21

lrwxrwxrwx root root 2014-02-10 21:45 system -> /dev/block/mmcblk0p24

lrwxrwxrwx root root 2014-02-10 21:45 tz -> /dev/block/mmcblk0p9

lrwxrwxrwx root root 2014-02-10 21:45 userdata -> /dev/block/mmcblk0p27

shell@trlte:/dev/block/platform $ cat /proc/mtd

cat /proc/mtd

/system/bin/sh: cat: /proc/mtd: No such file or directory

1|shell@trlte:/dev/block/platform $ cat/proc/emmc

cat/proc/emmc

/system/bin/sh: cat/proc/emmc: not found

127|shell@trlte:/dev/block/platform $
[Galaxy Note 4 General] gekkehenkie11:
thanks that helps a lot !! Only that last command failed, regarding getting the last parameter, the blocksize ... going to see if there's an alternative .Anwyay got all the partition sizes now, thanks !
[Galaxy Note 4 General] utopiate:
NP hit me up if you need anything else ;)
[Galaxy Note 4 General] gekkehenkie11:
Ok guys I've just built the recovery image succesfully !! Now going to try to build CM12 itself again ...
[Galaxy Note 4 General] gekkehenkie11:
@ utopiate: can you checkout if the Note 4 snapdragon is compatible with fastboot ? If the device is connected via usb, try:

fastboot devices

and see if what it returns.
[Galaxy Note 4 General] jm6001:
Hey what are the chances this will be compatible with the trltecan (Canadian version of the Note4)?
[Galaxy Note 4 General] gekkehenkie11:
Diving into the depths of the android kernel today :) I want to figure out how driver probing works. I already found out this: platform_driver_register (this is the function that's called upon loading of our module) is defined in base/platform.c What it basically does is that it calls "driver_register" in base/driver.c. This "driver_register" function checks a few things like if the driver needs updating and if it's already registered and if everything ok (which it must be cause otherwise it dumps output), it calls "bus_add_driver" in bus.c. And that's where it's starting to get interesting. Especially this part:

klist_add_tail(&priv->knode_bus, &bus->p->klist_drivers);
if (drv->bus->p->drivers_autoprobe) {
error = driver_attach(drv);
if (error)
goto out_unregister;
}

So, if the "drivers_autoprobe" bool is set for the bus (in stock it's set for pci bus I just checked, it's under /sys/bus/pci/drivers_autoprobe), it's going to try to attach the driver to a device. Going to look into all that now ...
[Galaxy Note 4 General] gekkehenkie11:
LOL yeah needed to do that quite a few times too ;) So much output, it's sometimes hard to see the errors.
[Galaxy Note 4 General] gekkehenkie11:
I just did a small test, I modded the code above into:

if (drv->bus->p->drivers_autoprobe) {
printk(KERN_ERR "%s: uevent attr (%s) It's probing here !! \n",__func__, drv->name);
error = driver_attach(drv);
if (error)
goto out_unregister;
}
module_add_driver(drv->owner, drv);

To check if it does this on mhi insmod at boot. And it does 3 times:

<3>[ 7.880144] my_mhiinit1

<3>[ 7.880158] bus_add_driver: uevent attr (mhi) It's probing here !!

<3>[ 7.880301] my_mhi_uci_init3

<3>[ 7.880362] bus_add_driver: uevent attr (mhi_uci) It's probing here !!

<3>[ 7.880718] my_mhi_initww

<3>[ 7.880736] bus_add_driver: uevent attr (mhi_rmnet) It's probing here !!

So we see it's calling 3 times an init for a driver (mhi, mhi_uci and mhi_rmnet, we're particulary interested in mhi_uci cause that's supposed to open the mhi pipes on succesful device attachment) and it's trying to attach those drivers to a device. So why does that fail ? That's next. But ... first need to spend some time with the wife :) later more ...

*EDIT* just a small update: driver_attach is defined in base/dd.c and it calls this:

if (!driver_match_device(drv, dev))
return 0;

So that seems what we're interested in, the matching of device and driver. And if that fails, it stops there, if succes, it does some more stuff. So that's our culprit right there :) But no more time now, the misses is waiting ... :)
[Galaxy Note 4 General] Preaper:
Lol yeah, i was just thinking the same thing. Not sure why there seem to be so many Dutch around. Probably because this is a large phone, suited for tall people with huge pockets :)

I hope to get up to speed this weekend so I'll be able to contribute while you're on holiday. The biggest concern will be time, because if every build takes hours I can see how this will draw the project out.

---------- Post added at 05:55 PM ---------- Previous post was at 05:18 PM ----------

Ok, seems like the docker image I was using was missing the bc command. "apt-get install bc" and brunch again...
[Galaxy Note 4 General] gekkehenkie11:
back :)

Make sure you've installed the packaged specified here too: http://wiki.cyanogenmod.org/w/Build_for_i9500 (it's for the i9500 but I used that, it's probably pretty general)
[Galaxy Note 4 General] fattire:
As far as a guide to building, there's also the build guides on the wiki, which you just need to modify slightly for cm12.

* Change hlte -> trlte

* Change cm-11.0 -> cm 12.0

* Use the roomservice.xml i posted.

and, as Preaper points out below:

* openjdk-6-jdk -> openjdk-7-jdk

* openjdk-6-jre -> openjdk-7-jre

Aside from that I think it should be pretty much the same process.
[Galaxy Note 4 General] Preaper:
And:

openjdk-6-jdk -> openjdk-7-jdk

openjdk-6-jre -> openjdk-7-jre

I have been following the building guide - it's really useful.

Apart from the missing bc command and java6 instead of java7 the docker image seems to be pretty complete. We'll know for sure when the current build succeeds.

Edit: using a docker wrapper brings his own challenges. I had to configure even more stuff to allow ADB to function. USB access had to be set up, and in the process I tanked my container due to inexperience. Fun. Starting over again. The upside is that I can truly test the steps I written up earlier about setting up the build environment. :) When I'm done I'll share it again, so new adventurers should have no issues when setting up theirs.
[Galaxy Note 4 General] Preaper:
I've been ignoring my pizza. A telltale sign I'm obsessed right now.
[Galaxy Note 4 General] gekkehenkie11:
Haha welcome to my world ;) I'm making progress though. The way the kernel checks driver against device is that it compares the driver against each of the 'platform devices' and it does so using this procedure:

/**
* platform_match - bind platform device to platform driver.
* @dev: device.
* @drv: driver.
*
* Platform device IDs are assumed to be encoded like this:
* "<name><instance>", where <name> is a short description of the type of
* device, like "pci" or "floppy", and <instance> is the enumerated
* instance of the device, like '0' or '42'. Driver IDs are simply
* "<name>". So, extract the <name> from the platform_device structure,
* and compare it against the name of the driver. Return whether they match
* or not.
*/
static int platform_match(struct device *dev, struct device_driver *drv)
{
struct platform_device *pdev = to_platform_device(dev);
struct platform_driver *pdrv = to_platform_driver(drv);

/* Attempt an OF style match first */
if (of_driver_match_device(dev, drv))
return 1;

/* Then try ACPI style match */
if (acpi_driver_match_device(dev, drv))
return 1;

/* Then try to match against the id table */
if (pdrv->id_table)
return platform_match_id(pdrv->id_table, pdev) != NULL;

/* fall-back to driver name match */
return (strcmp(pdev->name, drv->name) == 0);
}

So if you ever wondered, that's how it works :) Going to dive into all this now ...
[Galaxy Note 4 General] Preaper:
[MENTION=3296134]gekkehenkie11[/MENTION]

I'm playing catchup with you right now. Currently I'm at a crossroad you've been before. Missing blobs on the N910F.

Couldn't find exactly how you resolved this. Did you just comment out all references, or did you find suitable files to substitute the ones on the N910T?

# remote object '/system/lib/libdetectmodem.so' does not exist -> probably named libmdmdetect.so on the N910F
# remote object '/system/lib/hw/camera.vendor.apq8084.so' does not exist
# remote object '/system/vendor/firmware/bcm43569A0.hcd' does not exist
# remote object '/system/vendor/firmware/bcm43569A1.hcd' does not exist

I'll be sure to incorporate your answer in my little N910F build guide I'm writing up.
[Galaxy Note 4 General] gekkehenkie11:
With problems like this, just search back the thread, I've documented pretty much every problem I've encountered and how I solved it'. This particular case might still be one of the problems though, who knows if our failing radio is not related to this ... Anyway the way I "solved" it is that I just used libmdmdetect.so (or something like that it's called). I just copied that lib by hand in the BLOB folder and renamed to libdetectmodem.so I think... In fact I'm now starting to think that most probably it shouldnt even be renamed. Weird thing is though that i didn't see any errors for missing libs ... So what's calling/using this lib ? And might this be our culprit ? I'm actually starting to think it is ... Especially in relation to my research results, which I will document now, just wrapping it up.
[Galaxy Note 4 General] gekkehenkie11:
Ok, done researching into device drivers, I understand how it works now. Basically, our phone has 2 types of devices, "platform_devices" and "normal devices". Platform devices are like the integrated on chip devices, I guess it's every device inside the SoC (?). Anyway, the important thing: all platform devices known to the system are listed under: /sys/bus/platform/devices

How driver initialisation works: if you register a platform device (like that mhi is), it's going to compare names (and some other indexing values) to all of the known devices. So basically it will compare "mhi_uci" (the driver name) to all of the devices there, which are over 442. In fact, stock Touchwiz shows 503 platform devices, Cm12 shows 442 platform devices. So our problem is that that mhi_uci device is one of those missing in CM12. It's listed in Samsung Touchwiz under:

lrwxrwxrwx root root 2014-12-13 16:22 mhi_rmnet -> ../../../devices/platform/mhi_rmnet
lrwxrwxrwx root root 2014-12-13 16:22 mhi_uci -> ../../../devices/platform/mhi_uci

Anyway, all this explains our problem: missing devices. Now the next question is: why are these devices even missing :) That lib you just found, modemdetect, that sounds actually like something that would detect and add devices to the platform :) So I'm going to mess with that right now :)
[Galaxy Note 4 General] Preaper:
You can assume I did, otherwise I wouldn't be stating the question. I mean, the fact that you have renamed libmdmdetect.so is even stated in the question, so I'm not sure why you'd think I wasn't looking properly. But I understand you don't want people to be lazy, I get that. :good:

The mean reason I asked the question was to be sure I didn't have to comment out any references as suggested by fattire. I'm just trying to save myself another 6 hour build cycle. I want to be debugging the kernel, not brunching all day :silly: :laugh:

edit: Just wanted to add - I think your research results are incredibly helpful so keep them going :D. Hope to be able to feed back soon instead of leeching of your progress.
[Galaxy Note 4 General] gekkehenkie11:
Ah ok I thought I had documented it, but I might have missed it. Yeah some people ask before looking but it's good to see you're not one of those, I like that :)

I know man that part sucks. But after that, rebuilding goes WAY WAY faster, in fact, I just changed something in the kernel and had my result booting within a few minutes :) BTW, the tool flashify (google store) is really handy here too !!

Thanks ! Yeah at least we know the problem now, missing devices, took a while to figure that out :) So next question now is, why are these missing ... And first question then probably should be: how does sys/bus/platform/devices get filled with devices ? If we can figure that out, then we should be able to find out how to add the missing devices and then we should be all good :)
[Galaxy Note 4 General] gekkehenkie11:
A good start I just found is here, under 'device enumeration' -> https://www.kernel.org/doc/Documentation/driver-model/platform.txt

So, devices get listed via that kernel function: platform_device_register. So where does this happen for mhi_uci ? Going to see if I can find out about that by modding some stuff on Touchwiz ...

*EDIT* hmm I just removed the insmod mhi.ko from stock and system just crashes and reboot without it. Besides that, unlike the triangle no-network signal we get on CM12, it shows that round picture with a stripe through it (before rebooting) ... So it's not just mhi.ko that's missing, there's even more to it... Going to do now what [MENTION=3041959]fattire[/MENTION] suggested some pages back: going to download original 910T firmware and going to compare ramdisks to original 910F ramdisks to see if I can spot some differences that might be causing all this ...
[Galaxy Note 4 General] :
*i'm sorry as this is not a dev post,

however I would just like to know for general knowledge(as i'm not a dev) why the cm12 tmobile version doesn't work on the 910F as its literally the same hardware . makes sense there would be differences with the exynos varient but even if its the exact same SD SoC(and both support the same frequencys; FDD-LTE+WCDMA+GSM)? can someone explain why is that/whats the difference?
[Galaxy Note 4 General] gekkehenkie11:
Beats me ... In fact I find it very weird that 910T works without mhi.ko (unless I misunderstood that part from [MENTION=2457777]slayher[/MENTION]'s remarks. Anyway hopefully I will find more about that by comparing original ramdisks in some more detail ...
[Galaxy Note 4 General] :
All tmob roms work on 910f and vice versa but you lose baseband. There is a Flashable zip that makes tw tmob roms work properly on 910f but permissive kernel is needed. Don't Know If that helps
[Galaxy Note 4 General] gekkehenkie11:
Yeah that would help a lot. Any idea where I can find that zip ? And maybe a thread regarding it ? Or some more info ?
[Galaxy Note 4 General] allenjthomsen:
Whats the next step it wont let me do the get-prebuilts
[Galaxy Note 4 General] :
[MENTION=511819]turilo[/MENTION] made the zip he has been posting in the x note rom. He's probably the best person to help you

Here's the zip anyway

https://docs.google.com/file/d/0BwM9Hz1V4I9dZi01Q2tJak5wbWs/preview
[Galaxy Note 4 General] gekkehenkie11:
I looked at his zip, it contains pretty much every system file there is, so it's not of much use. Furthermore, I downloaded 910T original rom files to compare to original 910F ROM, I compared ramdisks, only differences are the init file itself and init.carrier.rc. I then tried flashing boot.img from 910T (so containing kernel + ramdisk) over original stock 910F ROM, that booted. So it seems the problem is indeed in the system files (which also explains why that zip file from that guy worked, it are only system files).
[Galaxy Note 4 General] gekkehenkie11:
Next plan of attack: I'm going to see if I can cook up original Sam Kernel. If that succeeds, I can dump the stack on each access to device creation and that should tell us more about how the mhi devices are created... But then again, I'm starting to doubt we're even on the right track here. I mean [MENTION=2457777]slayher[/MENTION] and [MENTION=3041959]fattire[/MENTION] got everything working without that mhi.ko in the first place ...
[Galaxy Note 4 General] gekkehenkie11:
[MENTION=3041959]fattire[/MENTION]: you were talking about modem firmware. One of the differences in the ramdisk is that the 910F version contains this:

on fs_selinux
# for modem one binary
wait /dev/block/platform/msm_sdcc.1/by-name/modem
mount vfat /dev/block/platform/msm_sdcc.1/by-name/modem /firmware-modem rw shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware:s0
copy /system/etc/acdb.mbn /firmware-modem/image/acdb.mbn
mount vfat /dev/block/mmcblk0p1 /firmware-modem ro remount

on early-fs
# for modem one binary
wait /dev/block/platform/msm_sdcc.1/by-name/modem
mount vfat /dev/block/platform/msm_sdcc.1/by-name/modem /firmware-modem rw shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware:s0

on post-fs
write /sys/block/mmcblk0/queue/read_ahead_kb 512

I haven't tried porting this yet cause it doesn't make much sense. I mean I tried 910T stock boot.img (which doesn't contain this) and that just booted. Besides I don't think you guys do something similar in Cm12, right ? So the firmware should be ok anyway ...

*EDIT* Actually tried this too, didnt make any difference ...
[Galaxy Note 4 General] vogli:
Did you add all the files from stock that have ril in the name?

Considering mhi I still think that this is dtb related. As fattire stated this is for the device tree.
[Galaxy Note 4 General] Preaper:
I'm really starting to regret going the docker route. I'm now running into trouble because there are some kernel >= 3.15 incompatibilities.... Haven't been able to compile anything yet. But I'm committed, i'm going to get that docker container up and running. Otherwise I have wasted a weekend. :silly:
[Galaxy Note 4 General] vogli:
I have it running in docker. What is your Base OS?
[Galaxy Note 4 General] Preaper:
Ubuntu 14.04, but I upgraded the kernel to 3.17.4. Which brings PAM incompatibilities with the docker version supplied with Ubuntu. Nothing I can't resolve. It's just that I had hoped have made more progress by now :)
[Galaxy Note 4 General] vogli:
I know that I ran into that issue as well. I have to check how I solved it. However I think I am not using a special user within the container at the moment. I am also starting the container in privileged mode at the moment with network mode host, because I wanted to be able to use and in the container as well. The compile worked without that though.
[Galaxy Note 4 General] Preaper:
Yes - same issues I resolved. I have forked the docker script I was using and fixed this stuff.

https://github.com/jaapp/docker-cyanogenmod.git

Still waiting for a successful build - then I will release my build cookbook I've been creating.