[Moto G5 Plus Guides, News, & Discussion] Deleted member 4736004:
Did some more digging.

1. IMEI is likely stored in /persist/rfs/msm/mpss/dhob.bin

You can't view this dir in root browser as it is locked. You need to mount it (linux in my case) and give admin permission.

dhob is encrypted by default. There is also a HMAC (keyed hash) to verify its integrity. So you can't use someone else's persist dump.

You can check your dhob log with this: (taken on LOS 15.1)

cat /data/vendor/tombstones/rfs/modem/dhob_report.txt

mot_d_hob_stg_ram.c, 547: initializing dynamic hob...
mot_d_hob_stg_ram.c, 570: Failed to read DHOB file, err = 3
mot_d_hob_stg_ram.c, 446: [COLOR="Red"]couldn't verify hmac[/COLOR]
mot_d_hob_stg_ram.c, 447: status = 2
mot_d_hob_stg_ram.c, 448: verified = 0
mot_d_hob_stg_ram.c, 618: dhob in trusted boot
mot_d_hob_crypto.c, 291: [COLOR="Red"]FATAL: decryption failed with st 20[/COLOR]
mot_d_hob_crypto.c, 292: in size = 16320
mot_d_hob_crypto.c, 293: dec size = 16320
mot_d_hob_stg_ram.c, 666: FATAL: blank dhob in trusted mode
mot_d_hob_stg_ram.c, 779: FATAL: dhob functionality blocked

mot_d_hob_stg_ram.c, 860: dHOB DB recover
mot_d_hob_stg_ram.c, 898: dHOB recover failed

mot_d_hob_stg_ram.c, 1250: comparing dynamic hob...
mot_d_hob_stg_ram.c, 1253: DHOB ops not allowed

mot_d_hob_stg_ram.c, 1081: refreshing dynamic hob...
mot_d_hob_stg_ram.c, 1085: dhob ops not allowed

2. To check hob's log (also related to imei):

cat /data/vendor/tombstones/rfs/modem/hob_report.txt

mot_s_hob_stg.c, 197: RFS read finished - in 1272 ms
mot_s_hob_stg.c, 326: ERR: Can't access HOB file, errno = 3
mot_s_hob_stg.c, 327: ERR: read -2025043604 bytes

mot_s_hob_amss.c, 825: s_hob_phase_check
mot_s_hob_amss.c, 590: ERR: HOB NV 540 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 1864 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 3691 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 5459 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 5461 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 5464 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 6683 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 6684 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 6735 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 6736 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 20309 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 20310 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 20825 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 20826 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 20883 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 20884 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 22982 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24226 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24228 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24230 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24233 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24250 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24252 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24255 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24256 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24964 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24965 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24966 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24967 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24972 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24973 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24974 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 24975 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 27779 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 27781 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 27783 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 27786 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 27812 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 28329 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 28333 inactive
mot_s_hob_amss.c, 590: ERR: HOB NV 28334 inactive
mot_s_hob_amss.c, 852: ERR: Found 41 NV items from HOB list that are not populated

Likely no if you have flashed someone else's persist.

Maybe yes if you have your own but flashed custom ROMs. Currently, modem fails to initialize efs even if you modify just 1 bit of persist because of hash check.