Samsung A5 2017 - reboots instead of shutting down

Alrighty - update on things. First, I have resolved the Odin issue which I discovered to be two-fold. First, one of the images I had gotten from Sammobile seems to be invalid and causes Odin to error out. Second, I got some more recent Samsung drivers than those I had found previously which have improved support.

So… here are the things I did in order to test things out:

  1. I used Odin to return to the phone to Android 8.0 and the stock Samsung bootloader and rocovery partitions
  2. Tested to confirm it saw the SIM card - it did, all worked fine.
  3. Used the method you recommended to reinstall TWRP (no issues encountered)
  4. Used your recommended method to install the latest E build (no issues encountered)
  5. Booted into OS - SIM card was not detected
  6. Did a factory reset, rebooted
  7. SIM card still not detected

So, it appears the results are no different in the end. Both E and LineageOS appear to be lacking something that allows the phone to see/use the SIM.

Now, even with Android 8.0, I noticed the phone rarely shuts off properly - it just reboots, so that could be a legitimate hardware glitch. At this rate, since the phone is a new purchase, I may return it as glitchy and try switching to a different mode, like an LG G5. Thoughts?

My first thought was: WoW, good systematic work. Bravo!

My second thought was: Damn! - SIM card is still not recognized. Is it possible that the baseband firmware gets lost when flashing /e/ OS or LOS 16.0?

My third thought was, when I had read this …

Now, even with Android 8.0, I noticed the phone rarely shuts off properly - it just reboots, so that could be a legitimate hardware glitch.

… this device behavior is no excuse that the SIM card is not recognized with mobile /e/ OS or LOS, but it is absulut no normal behavior. This must not be the case.

One last thought before going to sleep:

4/ Mobile network - APNs : Reset APN settings to default values.

5/ Maybe it will help to insert another SIM card temporarily.

Heh - thank you. I am a Network Engineer and Security analyst on the core Network Infrastructure team at a university, so I’m used to a taking a methodical approach to troubleshooting - core switches, routers and, firewalls and so on can be just as odd with OS upgrades and firmware flashes. :stuck_out_tongue:

Now, working with phones at this level is something I’m new at. What do you mean by the baseband firmware?

I did think along similar lines that something is getting lost - just not sure how to zero in on what. Given that Android, E, and LOS are all derived from Linux, I’m guessing there is some sort of module added in the stock Android that is missing for the others (if it even works that way - just going with what I know). Thoughts?

#4 - can’t as APN area is greyed out when it doesn’t see the SIM.

#5 - also can’t because wifey is using only other phone, and I value my life too much to risk asking for it.

I did try using her SIM a few days ago though during the initial troubleshooting phase and it didn’t work either.

1 Like

The “baseband” is actually the wireless modem for mobile radio. The modem firmware aka baseband firmware is the software responsible for the cell activities within the entire Samsung firmware. Its tasks include harmonizing antenna reception to cell, enabling communication with other devices such as Blue-Tooth, Wi-Fi and GPS.

Unfortunately there is also official baseband firmware available which is not suitable for custom Rom’s.

An example from my LG G3 d855: One of the last official StockROM Android 6.x v30B (13-00106) = doesn’t work with custom Rom.

Official StockROM Android 5.0 v21C (13.2-0000002) = works and is recommended for android 5.x and higher custom ROMs).

Another experience on my part with a Galaxy S5 SM-G900F see posting #7 Post Baseband updates?

What is the baseband code of the baseband firmware used on your SM-A520F?

It shows “Unknown” under baseband in my phone. So… where does one get this from and how come that’s not part of the /e/ OS when you install it?

"Unknown is an indication of a »lost baseband firmware«.

The device manufacturer with the mobile provider is responsible for the baseband firmware and is located in the Samsung StockROM. This firmware can be flashed with the Samsung ODIN3 Tool.

An example from the 4-part StockROM of Samsung Galaxy S7 SM-G930F (MODEM/CP version) :

No customROM contains this software - probably for copyright/license reasons.

Alright, so at what point do I add that in the install of /e/, and do I need to add one from the same version (IE 7.0) of Android?

1/ … after flashing /e/ OS

2/ … it is recommended to first install a baseband-firmware from a StockROM 7.0. In your special case I would additionally flash the bootloader-firmware (because of “reboot…”).
(Tip: Keep Posting #19 in mind).

First download a multi-part, usually 4-part (“Binary Nature”), StockROM 7.0 for the SM-A520F. Extract the compressed *.zip file. The result for the SM-G930F mentioned under #21 looks like this:


Now in ODIN3, fill the fields “BL” and “CP” with the corresponding file from the 4-part-firmware and enter “START”. The SIM card can then be inserted.

After the installation procedure a reset to factory settings is necessary depending on the device.

Downloading a new copy of the 7.0 firmware now. The first 7.0 I downloaded was part of what didn’t initially work on Odin - the BL and AP files caused errors in Odin. I’m downloading the general Canada version of the firmware (XAC) which is the version that installed successfully for 8.0. Download is just going mega-slowly at the moment.

So correct order here…

  1. Get TWRP installed and working
  2. Install install /e/ ZIP file
  3. Reboot back into download mode (before letting /e/ boot up/install for the first time)
  4. Use Odin to load in the 7.0 CP and BL firmwares
  5. Insert SIM
  6. Restart and have it do the system boot to install /e/
  7. Factory reset if SIM (and baseband) still not showing up

Now… if ALL that fails again, what I’m wondering is where are these files stored with the OS? It may be possible to backup those directories and their contents from a working Android 7.0 and then copy them back up (via adb) to the phone once it is running /e/. It is, after all, still a Linux install under the hood.

Hej, I’m not sure if I understand it right:
You’re downloading StockROM 8.0 (Canada XAC) now and want to combine the BL & CP it contains with /e/ for a5y17lte dev (nougat)?

Sorry for the lack of clarity there. I already had the StockROM 8.0 downloaded - it was what I installed a few days back to confirm that the SIM did work with the “stock” phone setup.

I’m downloading the StockROM 7.0 right now - Canada (XAC) version - so that I have a CP and BL image that match the base OS version of /e/.

Yes, I believe that this is the right way to go at the current stage of troubleshooting.

Didn’t work - just like the other carrier specific StockROM 7.0, it errored on trying to push up the BL:

Will try to upload the CP stuff, at least. Might be able to push up the StockROM 8.0 BL since that has nothing to directly do with the OS.

@Dakiraun, I can’t find firmware (Canada - XAC) for the Samsung Galaxy A5 (2017) SM-A520F SM-A520F “a5y17lte”. Please give me a link to the download page you used.

It’s the SM-A520W that I have. This is the firmware I tried:

I just booted the phone up after the /e/ install. First, I was able to put on the StockROM 8.0 BL, but used the 7.0 CP file. SIM card is still not detected, and baseband shows as “Unknown”. Seems to not be seeing/using those firmware files.

SM-A520W is not compatible with /e/ OS (or LineageOS).

Only the European Vesion of Galaxy A5 2017 SM-A520F is supported. We should have recognized this earlier … ;o/


Argh. As I’m beginning to discover with these phones, there are SO many versions and sub-versions of the “same” phone that it’s dizzying. This is why I avoided having one of the stupid things until now.

Alright, so magic question - when is /e/ going to be ported to the Canadian and US versions of these phones?

I can’t answer that question for you. First contact person should be @Manoj /e/ support.