[LineageOS Questions & Answers] 23pieces:
Dear everone!

I just sim unlocked my S5.

Because i couldnt find very much information about it, i wrote a short tutorial.

I hope it's of use for you guys :)

Well it seems i can't post a link, so i will copy it.

Warning: If you flash a custom rom on your device you will most likely lose your warranty!

Greetings concerned reader!

After troubles finding usefull information concerning unlocking a Galaxy S5 with a custom ROM (in my case LineageOS 14.1) i started my own research.

One thing hast to be said at the beginning: You CANNOT unlock the simlock with a custom ROM.

So what was my start situation:

I had a simlocked phone (locked by my provider) with a custom rom and custom recovery allready installed, but i wanted to use a simcard from another provider. After some time i found a forum post that it isn’t possible to unlock the phone with the custom rom.

So what do you need for proceeding:

The network unlock code (for example from your provider)

a version of your original rom

Backup your data ( for example via your google account)

Odin Flash Programm

A LineageOS rom (if you want to flash lineage again)

A custom recovery (if you want to flash lineage again, for example TWRP )

At first backup all your data! (external SD card and internal storage)

Normally the SD card won’t get deleted, but to be certain backup it.

The first time i tried to unlock the phone i made a full backup of Lineage via the TWRP recovery, flashed the original rom with ODIN and unlocked the simlock with the code. It worked on the stock rom, but when i restored the LineageOS backup it asked again for the network unlock code. Important to say that you can type in the code in LineageOS but the unlock process doesn’t work properly.

After hours of research and thinking i came to a solution which worked for me.

From LineageOS i went back to the stock rom and unlocked the simlock with the network code (the unlock was sucessfull as in the first try). Then i flashed the custom recovery (TWRP) via ODIN. After that i made a full backup from the stock rom via TWRP (just in case the unlock won’t work and i have to go back to stock).

I decided to flash a new LineageOS rom, because the restore didn’t work in the first approach. Because the phone forgot the unlock code after the restore i thought the unlock process was saved in a part of the memory i deleted while i restored the old data. My first guess was that it’s save in the Cache Partition of the phone.

So if you were useing a stock rom before and not LineageOS i would suggest to at least do a factory reset or a reinstall of the stock rom, in order to get the cache deleted BEFORE you type in the network unlock code.

What we will do now is to wipe the System and Data partition of the phone via TWRP. (DO not wipe cache).

Reinstall LineageOS and if you need them google apps (as described in the tutorial). Reboot and your device should recognize the new simcard.

Comments:

I am still not sure why the unlock worked on the stock rom but later not on the custom rom. There are two possibilities that came in my mind:

The custom rom has to be reinstalled after the simunlock because it doesn’t recognize the unlock in the restored state.

The unlock process is really stored in the cache.

It didn’t continue my research on this topic, because it worked for me and i was happy that i got it working.

If you want the link or have questions please contact me :)

Best regards