Hi Guys
This is my first post on xda even after using these forums for years. But today I cant find a solution on here or anywhere for that fact, and was literally hoping that I've missed something somewhere.
So to start. I have a Samsung Galaxy J5 Prime (SM-G570F). The other day I was flashing a custom rom when something went wrong during the flashing process and left me with a bricked device. Now I did do a full backup before flashing as I've learned the hard way how important this is. During the flashing it also asked me for a full wipe and to backup the EFS. Even though I did do all the backups and wiped everything< I've ticked both boxes and proceeded with the installation. Everything seemed fine but on 99.9% it froze. Not wanting to do anything I left it until it rebooted the phone by itself, where I was greeted with the download/flash screen. Didn't even give the warning about installing custom software and asked to continue. It just booted straight to the download screen. Tried getting back into recovery only to be greeted with download screen. No matter what I did it just kept booting into download mode. So I then re-flashed TWRP. Getting into the recovery I was able to mount EFS, System, Data, etc. Bu all showed 0mb of 0mb available. I then went to restore everything only to find that the SD Card was also wiped by the process. Thinking that maybe the recovery isn't reading everything correctly, I found the SD Card empty in windows also. No call me names or whatever, (I know my own stupidity) but I never backed up my backups on my PC. So I just proceeded flashing stock firmware as to start from scratch. Everything went as planned until the device got reset by odin. I was greeted with a screen saying "installing system update", but as soon as it reach 32% it changes to "erasing" and then "error" with the "DRK Missing" error. Then it boots to recovery where an error message is saying "unable to mount: EFS (Device or Recourse busy). I cleared cache and did a factory reset and it booted the system (Though mount error still appears in recovery even in custom TWRP/CWM recoveries also). Now I have a 00000..... IMEI number and no network connection. I've spent the last week on the web trying to find a solution with no luck. I'm tired AF because I didn't sleep trying to solve this. I tried flashing stock and custom roms, recovery's, boot-loaders, modems. Tried different software's like Samsung Tool, IMEI repair tool, Strings of adb commands, xposed modules, apps, terminals, etc. I even flashed factory binaries with no luck as to how to change it back.
So in short.
My EFS got wiped.
I lost my IMEI.
I don't have any backups.
Been awake for a week searching for solutions with no luck.
So please if anyone knows of a way to change the IMEI, please help me. I know It's illegal to change IMEI (though not in my country). But I down't want to change it for all the wrong reasons. I just want to change it back to the original found on the back of the phone and on the box. This can't do any harm can it? Please I just want my phone back please!
Full phone info with current firmware:
Samsung Galaxy J5 Prime (SM-G570F)
Android version - Nougat 7.0
Baseband version - G570FXXU1BQI6
Stock Firmware
No Root
No custom recovery
(Basically I just flashed everything back to stock to start over and try solving this)
Please help guys
I am in the same problem
Did you able to overcome from this problem, if yes please tell me the solution please!
I also have same issue.plz tell me what to do.
P01Z0N-T0N1C said:
Hi Guys
This is my first post on xda even after using these forums for years. But today I cant find a solution on here or anywhere for that fact, and was literally hoping that I've missed something somewhere.
So to start. I have a Samsung Galaxy J5 Prime (SM-G570F). The other day I was flashing a custom rom when something went wrong during the flashing process and left me with a bricked device. Now I did do a full backup before flashing as I've learned the hard way how important this is. During the flashing it also asked me for a full wipe and to backup the EFS. Even though I did do all the backups and wiped everything< I've ticked both boxes and proceeded with the installation. Everything seemed fine but on 99.9% it froze. Not wanting to do anything I left it until it rebooted the phone by itself, where I was greeted with the download/flash screen. Didn't even give the warning about installing custom software and asked to continue. It just booted straight to the download screen. Tried getting back into recovery only to be greeted with download screen. No matter what I did it just kept booting into download mode. So I then re-flashed TWRP. Getting into the recovery I was able to mount EFS, System, Data, etc. Bu all showed 0mb of 0mb available. I then went to restore everything only to find that the SD Card was also wiped by the process. Thinking that maybe the recovery isn't reading everything correctly, I found the SD Card empty in windows also. No call me names or whatever, (I know my own stupidity) but I never backed up my backups on my PC. So I just proceeded flashing stock firmware as to start from scratch. Everything went as planned until the device got reset by odin. I was greeted with a screen saying "installing system update", but as soon as it reach 32% it changes to "erasing" and then "error" with the "DRK Missing" error. Then it boots to recovery where an error message is saying "unable to mount: EFS (Device or Recourse busy). I cleared cache and did a factory reset and it booted the system (Though mount error still appears in recovery even in custom TWRP/CWM recoveries also). Now I have a 00000..... IMEI number and no network connection. I've spent the last week on the web trying to find a solution with no luck. I'm tired AF because I didn't sleep trying to solve this. I tried flashing stock and custom roms, recovery's, boot-loaders, modems. Tried different software's like Samsung Tool, IMEI repair tool, Strings of adb commands, xposed modules, apps, terminals, etc. I even flashed factory binaries with no luck as to how to change it back.
So in short.
My EFS got wiped.
I lost my IMEI.
I don't have any backups.
Been awake for a week searching for solutions with no luck.
So please if anyone knows of a way to change the IMEI, please help me. I know It's illegal to change IMEI (though not in my country). But I down't want to change it for all the wrong reasons. I just want to change it back to the original found on the back of the phone and on the box. This can't do any harm can it? Please I just want my phone back please!
Full phone info with current firmware:
Samsung Galaxy J5 Prime (SM-G570F)
Android version - Nougat 7.0
Baseband version - G570FXXU1BQI6
Stock Firmware
No Root
No custom recovery
(Basically I just flashed everything back to stock to start over and try solving this)
Please help guys
Click to expand...
Click to collapse
If this problem is still open, then on Your Phone box is writen imei, or take battery out and under serial number there will be your imei, root your device and use IMEI changer grant root access and type your imei in it, after that reboot and your imei should pop up! I had same issue and this steps made my day! THIS WORKS ONLY ON YOUR IMEI, YOU CAN'T CRACK, STEAL IMEI By this method, don't believe those Dumb ****'s from YouTube!
May I help You!
P01Z0N-T0N1C said:
Hi Guys
This is my first post on xda even after using these forums for years. But today I cant find a solution on here or anywhere for that fact, and was literally hoping that I've missed something somewhere.
So to start. I have a Samsung Galaxy J5 Prime (SM-G570F). The other day I was flashing a custom rom when something went wrong during the flashing process and left me with a bricked device. Now I did do a full backup before flashing as I've learned the hard way how important this is. During the flashing it also asked me for a full wipe and to backup the EFS. Even though I did do all the backups and wiped everything< I've ticked both boxes and proceeded with the installation. Everything seemed fine but on 99.9% it froze. Not wanting to do anything I left it until it rebooted the phone by itself, where I was greeted with the download/flash screen. Didn't even give the warning about installing custom software and asked to continue. It just booted straight to the download screen. Tried getting back into recovery only to be greeted with download screen. No matter what I did it just kept booting into download mode. So I then re-flashed TWRP. Getting into the recovery I was able to mount EFS, System, Data, etc. Bu all showed 0mb of 0mb available. I then went to restore everything only to find that the SD Card was also wiped by the process. Thinking that maybe the recovery isn't reading everything correctly, I found the SD Card empty in windows also. No call me names or whatever, (I know my own stupidity) but I never backed up my backups on my PC. So I just proceeded flashing stock firmware as to start from scratch. Everything went as planned until the device got reset by odin. I was greeted with a screen saying "installing system update", but as soon as it reach 32% it changes to "erasing" and then "error" with the "DRK Missing" error. Then it boots to recovery where an error message is saying "unable to mount: EFS (Device or Recourse busy). I cleared cache and did a factory reset and it booted the system (Though mount error still appears in recovery even in custom TWRP/CWM recoveries also). Now I have a 00000..... IMEI number and no network connection. I've spent the last week on the web trying to find a solution with no luck. I'm tired AF because I didn't sleep trying to solve this. I tried flashing stock and custom roms, recovery's, boot-loaders, modems. Tried different software's like Samsung Tool, IMEI repair tool, Strings of adb commands, xposed modules, apps, terminals, etc. I even flashed factory binaries with no luck as to how to change it back.
So in short.
My EFS got wiped.
I lost my IMEI.
I don't have any backups.
Been awake for a week searching for solutions with no luck.
So please if anyone knows of a way to change the IMEI, please help me. I know It's illegal to change IMEI (though not in my country). But I down't want to change it for all the wrong reasons. I just want to change it back to the original found on the back of the phone and on the box. This can't do any harm can it? Please I just want my phone back please!
Full phone info with current firmware:
Samsung Galaxy J5 Prime (SM-G570F)
Android version - Nougat 7.0
Baseband version - G570FXXU1BQI6
Stock Firmware
No Root
No custom recovery
(Basically I just flashed everything back to stock to start over and try solving this)
Please help guys
Click to expand...
Click to collapse
As i Read Your Post
So I realized that You are Also facing a problem Like me and now Mine is Solved
Just dont upgrade Your Mobile and Downgrade to android 6.0.1
and try to flash someone else efs and then it wil give u ur own imei and u will be hapy
Thanks
Related
Hey guys. I know for sure there is another thread about a similar problem but the biggest problem I'm having is figuring out what to do next, or better yet, what did I even mess up?
I made a thread a couple days ago here asking about the LTE option on my phone and how there was none. It's an Intl' phone and therefore I guess doesn't work on Canadian LTE networks.
Before we start, I'm using TWRP 2.7.0.0 . My phone is the UAE version of the D802, which is the D80220C. My current custom rom is Liquidsmooth MS3.2 .
So I found a list of modems and flashed the one for Bell. It was for the D803, but the thread I was looking at said it was cross-compatible so I assumed that meant it's okay for me to flash it on my phone.
Even so, I backed up my EFS partitions just to be 100% sure. I even used the .zip file that automatically backs up the current modem files. So I thought there was definitely a way out if it didn't work.
I will give you the full story of what was done and maybe I can get some guidance on maybe something I did wrong.
1) I flashed the D803 Bell modem.
2) Reboot to system, LS3.2 hangs on start up. Tried a hard restart to see if it wasn't a fluke. Nothing. Still hanging.
3) Figured the EFS files were toast, so I ran the restore .zip for my EFS. Reboot, and still hanging.
4) Said WTF? and restored my first stable rooted stock rom. It booted into the rom fine, but when it got to the lock screen I saw the "Service Disabled" and the phone quickly crashed.
5) Didn't even attempt to restart on that rom. So I tried a couple terminal commands to copy the modems1.img and modemst2.img files to corresponding partitions. Copied both just fine, but no change. Still screwing up.
So, this is where I am so far. I am in the process of downloading the D80220C UAE .kdz file so I can try to flash that one first. If that doesn't work, I'm really at a loss.
When I read into this some more, all I see is people who have totally wiped their EFS files and having to spend a whole bunch of time using a bunch of different programs to get in an recover the IMEI number.
What do you guys think?
Some good news right off the bat. I found a KK baseband for D802 and flashed it. So now I was able to restore my LS3.2 rom and boot into it fine. I see my IMEI and MAC address and can get WiFi at last!
Mods, you can delete this thread if you wish.
HI all,
So I today I messed up and I need your help :crying:. Basically here's whats going on: I decided to root my phone since I found that battery was complete garbage, so I decided to root the phone with TWRP and Odin and after flash a new kernel for my phone as well as SU. Everything went fine. However, when i tried to reboot my phone to get a custom rom i wanted, it keps telling "kernel is not seandroid enforcing" and would be stuck in a boot loop (which apparently is normal and would just need to flash a rom for it to work). Finally I just decided to boot factory, so I can get to my files and put that damn custom rom. Long story short, I was able to put it, wiped system in TWRP and flashed this new rom only to get another error "THis package is for device trltetmo, this device is trltexx". Now I couldnt even factory reset anymore. At this point I decided to flash my back up that I did before and yet ANOTHER problem "cannot restore system mounted read only". After couple of hours of research, I needed to change the name of the file to system.image.mbn i think, I changed a file called system.ext --> system.image.ext. Needless to say that it didnt work. Final thing I decided to do is simply to flash a stock rom with odin and reverse the root, so I downloaded a stock rom for note 4, started the whole process with odin and now it is stuck at system.img.ext4....and i have no clue what to do, I dont know even know what I did before is the problem or it is something else, all i know is that odin is stuck at that message. Should I just let it go, should I stop it? Help! please
Wow, true hardship you get it back running?
Try using Kies and doing firmware upgrade mode to see if it can download and load the stock firmware for that device.
The Story
Don't even know where to start. Okay so I have a SM-935W8 (Canadian Version) and it was working perfectly fine running Project Dream rom the S8 one. I decided to flash angelo's Pixel rom for S7 Edge and for some reason when it booted, the network had a cancel sign meaning no network. Once I finished the initial setup, calling, messaging , and data weren't working. Luckily I have a backup for EFS and RADIO in tar, img. and tar.gz formats. So I downloaded the Partitions Backup app and restored the EFS and Radio files, it said successfully restored. I rebooted my device and the issue was still there, no network. So then I installed the stock ROGERS (Provider) rom from SAM MOBILE and it came up with some DRK error and my phone would not boot. So then I quickly used ODIN to flash twrp and then flash Superman Rom (Love it) and use dm-verity bypass.zip to get past the drk error. Then I attempted many other things but to no avail such as flashing the EFS tar through ODIN which caused a "Software Error" and phone to be stuck on a light blue software error screen so I had to use smart switch to FULLY restore the phone back to booting up, then once again I flashed twrp and Superman rom with dm-verity so I atleast have root and a decent rom to work from.
The Problem and What I Have at Disposal
So essentially, I currently have a new section in settings under Connections called "SIM card manager" for managing sim cards even tho I only have 1 slot, it shows that the SIM is ROGERS and LTE/3G/2G in there, but it can't connect to a network and keeps saying Not Registered on a Network. Also, there are 2 IMEI's since my phone thinks theres 2 SIM slots but I really only have 1 slot. BUT HERE IS THE MAIN ISSUE, THE ROOT OF ALL PROBLEMS, the IMEI is reading as "000000000000000" and the IMEISV is "01". Hence im getting Not Registered on a Network. No secret codes such as *#06# are working, keeps giving the Not Registered on a Network error.
I have the EFS and RADIO backups in img, tar, and tar.gz formats as well as screenshots of all my MAC and Bluetooth addresses, IMEI and Serial #'s and all that information. So essentially I feel fully ready to solve the problem but everything I try keeps failing. My EFS restoration says successful in the APP but upon reboot, theres no change. Flashing the EFS through ODIN messes up phone harder. When I use EFS Professional Tool, where do I place the partitions so they show up in the tool?
I used this post to try to fix it: https://forum.xda-developers.com/s7-edge/how-to/guide-how-to-fix-check-drk-imei-issues-t3379516
BUT when I'm flashing the combination through ODIN in AP, it goes to NAND write or whatever and gets stuck, sometimes it gets stuck on Analyzing files or something. I tried every single ODIN version. I really could use some expertise on this issue. A step by step written tutorial, some method anything!!!! Help on this post or even teamviewer or skype for live help would be appreciated. Please help and I'm willing to compensate for successfully helping me fix my issue..
Did you ever sort this out? I'm in a similar situation, except that it does occasionally show my IMEI but also 'baseband unknown'. But still no network access.
i hope i dont risk a warning, but you can use xposed and with root you can change your imei and baseband info.
012345678 said:
i hope i dont risk a warning, but you can use xposed and with root you can change your imei and baseband info.
Click to expand...
Click to collapse
Thanks, I've done so much to this phone now...
I did try xposed and have tried a different IMEI, it seems like it's a modem issue but there doesn't seem to be a firmware solution - I have tried so many stock roms(All the way back to the first Marshmallow and a bunch in between) and different custom roms too but in the end the error is always there: Not registered to Network.
I saw somewhere in my troubleshooting that some kind of cert needs to be patched because the phone did an update on a modified rom without the OEM unlock being on and then the EFS data was messed up or something like that (all of the research and troubleshooting is starting to blur). It seems like that fix isn't doable without a rather expensive piece of hardware (expensive if your just fixing your one phone I guess) and there isn't any firmware-only fix that can accomplish this patch so I'm stuck again.
jamesroodney said:
Thanks, I've done so much to this phone now...
I did try xposed and have tried a different IMEI, it seems like it's a modem issue but there doesn't seem to be a firmware solution - I have tried so many stock roms(All the way back to the first Marshmallow and a bunch in between) and different custom roms too but in the end the error is always there: Not registered to Network.
I saw somewhere in my troubleshooting that some kind of cert needs to be patched because the phone did an update on a modified rom without the OEM unlock being on and then the EFS data was messed up or something like that (all of the research and troubleshooting is starting to blur). It seems like that fix isn't doable without a rather expensive piece of hardware (expensive if your just fixing your one phone I guess) and there isn't any firmware-only fix that can accomplish this patch so I'm stuck again.
Click to expand...
Click to collapse
i think i can help you out with that. install that with odin, it should get your efs and imei back:
Samsung S7 Edge Cert and Efs (SM-G935F)
https://drive.google.com/file/d/0B5829G4TER3CZmZYVU9PY21qT2c
012345678 said:
i think i can help you out with that. install that with odin, it should get your efs and imei back:
Samsung S7 Edge Cert and Efs (SM-G935F)
https://drive.google.com/file/d/0B5829G4TER3CZmZYVU9PY21qT2c
Click to expand...
Click to collapse
Sorry, I should have clarified. I have an S7 (SM-G930W8). I only tried this thread because the issue was identical to mine and I couldn't find anything similar referencing the S7 specifically.
For anyone coming across this thread in the future, although mine was an S7 I think the issue would apply to both. I ended up ordering a z3x in order to use the patch certificate. But it wasn't that easy; the firmware had to be downgraded to marshmallow first which wouldn't work in Odin until I tried just flashing the BL and CP files first, then rebooting and flashing the AP and CSC files separately. In fact, the AP file froze the first time but passed on the second attempt. After that, everything was downgraded to android 6 and then the patch certificate option worked and my s7 connects to the network again.
I'm having a similar problem with my sm-g935w8 Rodgers but has been unlocked. A couple days ago i looked at my phone and it was showing a no signal symbol and I look for my phones information and it showed unknown in all categories, the imei say unknown, and it's not reading the sim. Help me
I am having the same problem after installing TGP ROM.
Graschuk said:
I am having the same problem after installing TGP ROM.
Click to expand...
Click to collapse
Did u Found any solution? am still in the same position as u r in.. i have also installed TGP ROM ... I Have Also Posted there my issue that i selected the latest bootloader nd modem blah blah
Wipe everything in twrp advanced and..
Flash latest stock rom for your model and it'll fix the issue
I think u need to see this
https://forum.xda-developers.com/showthread.php?p=78868375#post78868375
These two threads are the fountains of info :
https://forum.xda-developers.com/s7-edge/how-to/guide-how-to-fix-check-drk-imei-issues-t3379516
This one specifically for S7 edge, whole lots of info.
https://forum.xda-developers.com/note-4/general/fix-drk-dm-verity-factory-csc-serial-t3422965
This one for advanced users who know what they are doing.. it isn't specifically for s7 series but has a universal approach to understand concepts.. don't use the provided drk (prov data) and csc restoring files, they aren't for s7 edge.
Always backup efs and all radio/serial related info firstly after rooting. Good luck
Sent from my S7 Edge using XDA Labs
Hi all, as the title says, my efs folder is inaccessible. Firstly let me explain. I bought a phone, it had the Paul pizz rom in it and I didn't like it. So I flashed the resurrection remix rom. It didn't have all the bells n whistles I wanted, so I tried the official res remix rom. Somehow I ended up with an efs problem. I ended up with an efs invalid argument error and from what I read, I did the whole adb efs fix. The error was gone. I ended up flashing a repair firmware back to bog5 and started from scratch. I worked my way back up to installing the modest rom and it works 99% flawlessly and I am happy enough to keep it. Here is the catch, I used kingo root and have ended up with a bad keyboard lag that's driving me nuts. It is unknown to me if the kingoroot caused the efs corruption or if it was just a bad flash going from one rom to another. I have tried several root browsers, made sure they all had root privileges, and no matter what, I can NOT get access to what's hidden in my efs folder. They always say it's empty. Now, here is the kicker, I got another note 4 for my son. Downgraded from 6.01 to 5.01 bog5, then up to 5.11 and flashed the modest rom on his. Instantly his phone has access to the efs folder. My note 4 works, can make calls, text etc. Imei is shown in settings, all info shows in settings as normal except one thing, on my phone it says configuration version not available whereas on my sons phone it gives a configuration version. I just can't figure out how to gain access to the efs folder to try to fix this extremely annoying lag. I DID make a complete backup of my system from when it had the Paul pizz rom, so the efs partitions should be intact there but I don't know if that would help or even where to start. Can someone please help?
Well, I just fixed my phone and thought I would share what happened. It seems that the guy that loaded the paulpizz rom on the phone before I bought it used a different version of twrp. He used a version for n910f, whereas when I began my rom search, I used one for a n910v because thats what the phone is. I was having a hard time with it so I reverted to stock, rooted, installed verizon twrp, and bam! No efs access. The difference in recovery programs is what screwed me up in the first place. I figured it out when I tried to restore his rom backup I made. The efs files were not working when it restored. I remembered what version of rom it was, and tried a twrp for 910f, and voila! So, now I have all functions working as blazing speeds, can actually access the efs folder, and no more damned lag! Big thumbs up button to me!
My note 4, randomly crashed, running completely stock.
Began bootlooping and hasn't stopped.
Have downloaded firmwares from Samsung-Firmware . org, as SamMobile will literally not allow me to download anything for free??
No firmware has worked on the device, Have tried numerous PDA versions as I am unsure which the phone originally is.
The first firmware gave the error "dm-verity verification failed" in the recovery menu.
Have wiped cache and data.
Note: This is actually the second N910F which had corrupted itself and stopped working.
Help! :angel:
Do you want to recover some data from it?
If Not than you can try factory reset from Recovery menu.
Other than that it might be memory corrupted or your battery.
Try to change the battery.
a602820922 said:
Do you want to recover some data from it?
If Not than you can try factory reset from Recovery menu.
Other than that it might be memory corrupted or your battery.
Try to change the battery.
Click to expand...
Click to collapse
No data to recover, have tried factory reset from recovery menu, sure will try another battery.
a602820922 said:
Do you want to recover some data from it?
If Not than you can try factory reset from Recovery menu.
Other than that it might be memory corrupted or your battery.
Try to change the battery.
Click to expand...
Click to collapse
New battery: Allowed the phone to boot past the first "Samsung Note 4" screen to : "Samsung" logo, but the phone made a loud beep/screech.
If you want to reflash the Stock ROM search for a version on https://updato.com
I just reflashed mine (g910f) even twice as I had an Infini-Boot, too. After cleaning Dalvik/Cache and formatting data, taking out the battery, after some time it suddenly displayed that it's going to setup apps and it works since then ...
So maybe just be patient.
TheEnda619 said:
My note 4, randomly crashed, running completely stock.
Began bootlooping and hasn't stopped.
Have downloaded firmwares from Samsung-Firmware . org, as SamMobile will literally not allow me to download anything for free??
No firmware has worked on the device, Have tried numerous PDA versions as I am unsure which the phone originally is.
The first firmware gave the error "dm-verity verification failed" in the recovery menu.
Have wiped cache and data.
Note: This is actually the second N910F which had corrupted itself and stopped working.
Help! :angel:
Click to expand...
Click to collapse
to get the latest stock rom for your device, free and fast
look what you have to do:
download this (windows ) application and install it on your windows pc.
This is the aplication that will allow you to search and download the latest stock rom for your phone.
It connect to Samsung servers and in very little time you will have a new stock rom on your pc.
choose samfirm 3.06
extract it on a folder on your PC and run samfirm.exe
in the opening menu type
SM-N910F(or T/V/W etc your phones model)
REGION..... xxx (your region code)
these 2 you can find in a sticker under your battery if you open the phone and take off the battery
tick '' BINARY NATURE''
(If you dont tick BINARY...'' you will get the whole stock rom in one file xxxx.tar.md5 to flash it in the oding using the AP tab)
CHECK UPDATES>DOWNLOAD
THIS WAY YOU WILL GET THE LATEST STOCK ROM FOR YOUR PHONE/REGION
Binary nature means the rom split in 4 files
1. BL- bootloader
2.AP - rom
3. CP - modem
4. CSC - Customer support code(region/country)
This is what a stock rom is consist of
this kind of rom is also called REPAIR ROM, because you can use it to repair your phone.
If you look in odin you will find exactly these 4 entries.
So you can put each in the appropriate box and flash them all and so have a stock rom.
push start
Wait until rom flashes and phone reboots.
Hopefully it will solve your problem and everything will go as we all wish to.
BUT, from what you are describing, i am afraid for 2 things:
1. Your battery is almost dead, thats the good scenario .
With 20 $ you will solve it.
So new battery, new rom> problem solved, or
2. You are starting to have the emmc failure on your phone.
Thats a tough one.
Lets hope its not the case.
Just in case
https://forum.xda-developers.com/note-4/help/note-4-freezing-restarting-t3348821
https://forum.xda-developers.com/note-4/snapdragon-dev/note-4-debrick-img-t3488114
good luck my friend