Thanks @AwesomeMachine
Unfortunaly I don't have those files and I can't create new ones:
Code:
/system/bin/sh: can't create modprobe.conf: Read-only file system
Logs and Outputs:
enable_arm_pmu.ko
juno:/data/data/modules # insmod enable_arm_pmu.ko
[67468.860505] enable_arm_pmu: loading out-of-tree module taints kernel.
[67468.860706] type=1400 audit(1532563200.038:89): avc: denied { write } for pid=306 comm="Binder:306_8" name="timerslack_ns" dev="proc" ino=15297 scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=file permissive=1
[67468.860729] type=1400 audit(1532606771.326:90): avc: denied { module_load } for pid=1528 comm="insmod" path="/data/data/modules/enable_arm_pmu.ko" dev="sda4" ino=7646 scontext=u:r:su:s0 tcontext=u

bject_r:system_data_file:s0 tclass=system permissive=1
[67468.910305] enable_arm_pmu: module license 'unspecified' taints kernel.
[67468.916862] Disabling lock debugging due to kernel taint
[67468.922373]
[67468.922373] PMCR_EL0 register before : 41023040
[67468.928346]
[67468.928346] PMUSERENR register before : 0
[67468.933814]
[67468.933814] CPU:3
[67468.933908]
[67468.933908] CPU:1
[67468.933921]
[67468.933921] CPU:4
[67468.933957]
[67468.933957] CPU:0
[67468.933973]
[67468.933973] CPU:5
[67468.951084]
[67468.951084] CPU:2
[67468.954543]
[67468.954543] Enable Access PMU Initialized
[67468.959973]
[67468.959973] PMCR_EL0 register after : 41023001
[67468.965839]
[67468.965839] PMUSERENR register after : f
_____________________
read_arm_pmu.ko
juno:/data/data/modules # insmod read_arm_pmu.ko
[67596.492763]
[67596.492763] PMCR_EL0 register : 41023040
[67596.498140]
[67596.498140] PMUSERENR register : 0
The output should be the same.
Reading http://tldp.org/HOWTO/Module-HOWTO/x197.html:
"So you've successfully loaded an LKM, and verified that via /proc/modules. But how do you know it's working? That's up to the LKM, and varies according to what kind of LKM it is, but here are some of the more common actions of an LKM upon being loaded.
The first thing a device driver LKM does after loading (which is what the module would do at boot time if it were bound into the base kernel) is usually to search the system for a device it knows how to drive. Just how it does this search varies from one driver to the next, and can usually be controlled by module parameters. But in any case, if the driver doesn't find any device it is capable of driving, it causes the load to fail. Otherwise, the driver registers itself as the driver for a particular major number and you can start using the device it found via a device special file that specifies that major number. It may also register itself as the handler for the interrupt level that the device uses. It may also send setup commands to the device, so you may see lights blink or something like that.
You can see that a device driver has registered itself in the file /proc/devices. You can see that the device driver is handling the device's interrupts in /proc/interrupts."
Running:
juno:/ # cat /proc/modules
read_arm_pmu 16384 0 - Live 0x0000000000000000 (PO)
enable_arm_pmu 16384 0 - Live 0x0000000000000000 (PO)
juno:/ # cat /proc/devices
Character devices:
1 mem
5 /dev/tty
5 /dev/console
5 /dev/ptmx
10 misc
13 input
14 sound
29 fb
90 mtd
108 ppp
116 alsa
128 ptm
136 pts
180 usb
189 usb_device
204 ttyAMA
226 drm
249 roccat
250 hidraw
251 bsg
252 tee
253 rtc
254 gpiochip
Block devices:
1 ramdisk
259 blkext
7 loop
8 sd
31 mtdblock
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
253 device-mapper
254 virtblk
___________________________
cat /proc/sys/kernel/tainted
4097
___________________________
juno:/ # cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 CPU4 CPU5
2: 1844410 1197983 1353732 16779 3199 5419 GIC v2 92 Level arch_mem_timer
3: 0 0 0 0 0 0 GIC v2 29 Level arch_timer
4: 894927 272142 288023 18616 39333 15390 GIC v2 30 Level arch_timer
7: 0 0 0 0 0 0 GIC v2 198 Level timer
14: 419017 0 0 0 0 0 GIC v2 68 Level mhu_link
15: 0 0 0 0 0 0 GIC v2 67 Level mhu_link
16: 0 0 0 0 0 0 GIC v2 120 Level 7ff00000.dma
17: 0 0 0 0 0 0 GIC v2 121 Level 7ff00000.dma
18: 0 0 0 0 0 0 GIC v2 122 Level 7ff00000.dma
19: 0 0 0 0 0 0 GIC v2 123 Level 7ff00000.dma
20: 0 0 0 0 0 0 GIC v2 124 Level 7ff00000.dma
21: 0 0 0 0 0 0 GIC v2 140 Level 7ff00000.dma
22: 0 0 0 0 0 0 GIC v2 141 Level 7ff00000.dma
23: 0 0 0 0 0 0 GIC v2 142 Level 7ff00000.dma
24: 0 0 0 0 0 0 GIC v2 143 Level 7ff00000.dma
25: 0 0 0 0 0 0 GIC v2 125 Level hdlcd
26: 0 0 0 0 0 0 GIC v2 117 Level hdlcd
27: 6336 0 0 0 0 0 GIC v2 115 Level uart-pl011
28: 53666 0 0 0 0 0 GIC v2 136 Level 7ffa0000.i2c
30: 47345 0 0 0 0 0 GIC v2 149 Level ehci_hcd:usb1
33: 14370 0 0 0 0 0 GIC v2 65 Level 2d000000.gpu
34: 0 0 0 0 0 0 GIC v2 66 Level 2d000000.gpu
35: 39222 0 0 0 0 0 GIC v2 64 Level 2d000000.gpu
37: 52 0 0 0 0 0 GIC v2 194 Level mmci-pl18x (cmd)
40: 0 0 0 0 0 0 GIC v2 100 Level rtc-pl031
43: 0 0 0 0 0 0 GIC v2 169 Level sata_sil24[0000:03:00.0]
45: 0 0 0 0 0 0 M SI 0 Edge PCIe PME, aerdrv
52: 1049234 0 0 0 0 0 M SI 4194304 Edge eth0
IPI0: 62569 1835646 1888285 43688 29194 29798 R escheduling interrupts
IPI1: 315 1276 725 386 307 207 F unction call interrupts
IPI2: 0 0 0 0 0 0 C PU stop interrupts
IPI3: 829962 24938 62500 1274 498 1029 T imer broadcast interrupts
IPI4: 800250 925302 1266671 10821 9264 7192 I RQ work interrupts
IPI5: 0 0 0 0 0 0 C PU wake-up interrupts
Err: 0
I'm thinking if I need to find a usable major and give it to my module?