How to set PIN after unlocking bootloader? - Realme 5 Questions & Answers

I've just got my Realme 5i returned after repair (replacement main board) and I've unlocked the bootloader, flashed TWRP and vbmeta9, flashed Magisk and enabled MagiskHide but I can't set a PIN. Whenever I try, after confirming the PIN it returns to the settings screen and shows "Lock Screen Password - Off".
I know I managed to set a PIN before it needed repairing, as when my brother received it from me from his Birthday, he phoned me to ask for the PIN to access it but I can't remember what I did then to get it working.
I tried to install "Realme 5i Magisk Fix for ColorOS by IT&AUTOS.zip" in Magisk as I did that before but now it isn't working and the log says "copying to temp, error unzipping file". Would installing this be what got the screen lock working before?
I've got a TWRP backup of all the partitions from before it was repaired but I can't seem to access them to restore, as when I select the Storage option from Restore it shows the SD card is only 6GB, when it fact it's 128GB and the only file it shows is "257eee4a" which is actually the folder above the dated folders containing the backups.. From the Install option, I can browse the SD card normally and I flashed Magisk from a folder on the card, so I don't know why it's not accessible from the Restore option. If I could, then maybe restoring the System and Data partitions would get me back to the state where the PIN was set but I'd be a bit nervous about restoring the System partition after then main board has been replaced, in case any files are tied to the old hardware.

I thought what I might have done to get it working last time is to relock the bootloader (after flashing the stock recovery to prevent bootloop) and then unlock it again but if that is what I did before, it isn't working now.
First I updated to A.20 via the stock recovery, as the service center had flashed A.15. It kept booting to stock recovery after that until I did Format Data and then it booted OK and after locking the bootloader I was able to set a PIN.
Then I unlocked the bootloader and it automatically wiped data but I still had to Format Data to stop it booting into stock recovery and now I can't set the PIN again.
I see there's a 5i Decryption (COs).zip. What does this do? I tried flashing that via TWRP before I tried the above steps but it didn't get the PIN working.

I just flashed TWRP and then installed 5i Decryption (COs).zip and wiped Cache/Dalvik Cache and now it gets stuck on the yellow realme logo when I try and boot. Can't even power it off when it's like that but thankfully volume up and power gets me to bootloader and TWRP and doing a factory reset wipe got it booting again.
I still can't turn on the PIN/Lock Screen password though.

I tried restoring my TWRP System and Data backup from last August when the Lock Screen password was working but it still doesn't work, so it must be something in one of the other partitions that affects this and I'm reluctant to try restoring those in case it bricks the phone because the main board has been changed.

Can anyone help me please? Does anyone have the lock screen password working with unlocked bootloader, or is everyone who has installed custom recovery/rooted their 5i just using it without any password to protect it?

Related

[Q] Help! Victory Stuck in Boot Loop with Encryption

I have a Samsung Galaxy Victory running Android 4.1.2 rooted with TWRP installed and it was encrypted.
Today the phone froze and I powered it off by holding the power button for 5 seconds or so. Once I turned it back on, I got to the encryption prompt to enter the PIN to continue booting. However, the PIN I entered (which I know is correct because I've been using it for weeks to boot the phone) was wrong according to Android and could not unlock the phone for continued booting.
I booted into TWRP and did a factory reset with no luck (got a lot of unable to mount errors). I entered enough failed PINs that the phone decides to erase all my user data. It went through that process, and now I'm stuck in a boot loop.
The phone will boot to the encryption PIN screen. I will enter my PIN, which works now, but the phone reboots and loads TWRP. TWRP will automatically run OpenRecoveryScript (there are lots of invalid and mount errors). After the script, the phone will automatically reboot into the encryption PIN screen again. Entering the correct PIN leads to the TWRP again running the script, rinse-and-repeat.
How can I restore my phone back to working order? I don't really care about keeping my user data anymore; I assume it's lost. I am able to boot into TWRP and into download mode.
I tried to use ODIN to flash the recovery.img and boot.img (each contained in its own .tar), but I got write/mount errors in ODIN. I assume the encryption is preventing access or mounting of /data or much of the files and I'm looking to get rid of encryption to restore the phone to stock (in order to start over). I'm a relative newbie to solving this issue and would appreciate any help!
Solved the problem. I had to use TWRP to flash stock recovery and that did the trick to stop the boot looping.

help! can't boot and twrp asking for pword

so i have been using multirom and reflashed a rom to my internal rom. then i rebooted it and it is stick with a blank screen after the "google" logo and stuck there. when i go to twrp, it prompts me for a password that i have not set. I have read that this happens if you dont reboot after unlocking but i did that when i first unlocked the bootloader and have never ran into any problems flashing many roms till now. any ideas???
onecrzyasian said:
so i have been using multirom and reflashed a rom to my internal rom. then i rebooted it and it is stick with a blank screen after the "google" logo and stuck there. when i go to twrp, it prompts me for a password that i have not set. I have read that this happens if you dont reboot after unlocking but i did that when i first unlocked the bootloader and have never ran into any problems flashing many roms till now. any ideas???
Click to expand...
Click to collapse
Did u try to wipe "format data" as explained by Dess_Troy?
This happened to me too when I flashed a kernel without making sure it was correct for the rom I was running. I just forced it to reboot into recovery and it turned out fine. Have you tried that?
Sent from my Nexus 5 using Tapatalk
If you have just used fastboot oem unlock, you should let the device boot up normally first before trying to install TWRP. If you boot TWRP first before booting normally, you will be prompted for a password. Hit cancel and got to Wipe -> Format Data. Type yes at the prompt and hit the "enter" key. Hit the home button at the bottom and Reboot -> Recovery. Unlocking the device will cause you to lose all userdata, apps, pictures, downloads, etc.
Click to expand...
Click to collapse
Source: http://www.teamw.in/project/twrp2/205
It'll be ok
This has happened to me a couple times, all I had to do was hit cancel and it went into recovery, no password needed. Just needed to reflash Multirom.
hmm wonder if i could have reflashed the multirom. cuz when i tried to reflash roms or try to flash another roms or anything, it wouldn't work. said the files were all encrypted. under the file manager, there was no accessible or viewable files. completely locked out. I ended up doing a back up by going into bootloader and pulling files to my desktop then did a stock flash.
as for the reformatting, i've shouldn't/wouldn't want to do that because i have already unlocked the bootloader, did the fastboot reboot and flashed countless roms and kernels. I think there was some sort of corruption that screwed with something. And i really didn't want to lose all my data be reformatting it.
only booting into recovery and clicking cancel when prompted password made me completely locked out. said that everything was encrypted so i was out of luck.

Restoring Backup (Android P) with TWRP - possible solution found (updated)

Edit: Since I am the impatient guy of course I still meddled with the backup after posting this thread. By chance I found a solution that finally worked for me. Latest Oxygen Os 9.0.2 stable without root.
Note that I will list every step even it may be that it hasn't contributed anything to the solution:
1. From fastboot I booted into latest blu_sparc TWRP.
2. I plugged the phone into USB and copied all files from my backup into the usual TWRP folder.
3. I flashed only DATA, nothing else.
4. From TWRP I rebooted directly into bootloader/fastboot.
5. Then I ram the flash-all-partitions.bat from Mauronofrio provided by this thread https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 .
6. Crucial step: At the beginning, it asks "Wipe all data?". SELECT NO. It will start "restoring" all other partitions.
7. Reboot the phone and it should work as you left it before creating the backup.
Note that this method worked the restoration of backup data from the same OS and same version. Feel free to try it out on other system images. It's ugly and inconvenient, but it seems to work.
Hey guys,
is there a fail safe way to restore data from a clean twrp backup without soft bricks or PIN error?
I tried to restore a very recent TWRP backup but had serious trouble. At first, it rebooted just fine but upon trying to unlock the device with 4-digit pin it suddenly told me that my usual pin isn't working.
Then I tried deleting the lockscreen.db and other related files. Rebooted and got into the OS, but it got stuck at "starting up device".
The I did a complete wipe without internal storage and tried it again. Then it wouldn't even boot and I had to use the flash-all.bat to flash all partitions "manually" to get it working again.
Now I am afraid of using Oneplus 6 if it's impossible to make a seamless backup/recovery. Is there a guide on how to do this?
Thank you in advance!
This is a known issue though. If you want to make a usable backup in TWRP: Remove the PIN (screen lock), do the backup, and then activate the screen lock again.
efex said:
This is a known issue though. If you want to make a usable backup in TWRP: Remove the PIN (screen lock), do the backup, and then activate the screen lock again.
Click to expand...
Click to collapse
I remember having read a thread with this hint too and disabled my security pin in a temporary working OS. Then I did the flashing stuff and I just noticed that my now working restored phone doesn't have a pin anymore. So basically removing this pin on a data backup will make things go smooth? I will keep this in mind, thank you

TWRP Encryption Problem

I installed a custom rom, said rom gave me problems so I was going to revert back to old rom. I removed my fingerprint and pin from security and I rebooted to twrp. Twrp asks for a pin so I tried to put in the one I had before and it says password invalid and nothing is working. My old pin doesn't work, default_password doesn't work. Both slots are encrypted and I can't decrypt my internal storage to backup my files. Is there any work around I can do?
Zure said:
I installed a custom rom, said rom gave me problems so I was going to revert back to old rom. I removed my fingerprint and pin from security and I rebooted to twrp. Twrp asks for a pin so I tried to put in the one I had before and it says password invalid and nothing is working. My old pin doesn't work, default_password doesn't work. Both slots are encrypted and I can't decrypt my internal storage to backup my files. Is there any work around I can do?
Click to expand...
Click to collapse
The quick fix is format data. The other is hoping you have an otg cable to flash drive to reinstall that custom rom you have to access your data for backup.

[Q] [Locked OP6] Bootloop after upgrading to 10.3.0 - how to recover without format

My dad got the OTA update to 10.3.0 on xmas day and installed it. However the phone is now stuck on boot logo. He has a locked phone just as it came out of the box (ie no TWRP, no OEM unlock, no root).
I am quite experienced with installing custom ROMs but with locked phones I am lost. Is there anyway to recover the device without deleting data / factory reset? This is because my dad has quite a lot of pics on the device that are not backed up (yeah I know...).
Things I've tried so far:
- reboot holding power button + volume up
- boot flash twrp from fastboot - no permission due to phone being locked
- in stock recovery I do not get access to device via cable
- installed Tool all in One - it sees phone via fastboot
I always use the Stock Fastboot ROMs for OnePlus 6 myself to recover from soft bricks but this wipes data so no option here. Unless there is a way to install parts of ROM? Any other tips or ideas from the awesome XDA community? :good:
Btw this is the update he installed:
Screenshot of update that was installed
If you boot on twrp, it does not ask for the pin code to access the data?
Maybe try the last twrp for OOS 10.3.0 : ( https://androidfilehost.com/?fid=4349826312261678088 )
Use command : fastboot flash boot twrp-3.3.1-16-enchilada-Q-mauronofrio.img
Try flash a new boot img :
Stock boot 10.3 img
https://drive.google.com/open?id=1w44cUg815g-H1h_6gObUVPLDTc_dtiMX
The phone is not unlocked and therefore has no TWRP recovery. This is my problem, if it was unlocked I would have figured out a way to fix it.
PS it does ask for pincode when accessing stock recovery
I'm not sure if this works on locked bootloaders but try switching boot slots using fastboot.
Couple of weird things:
-you don't need an unlocked bootloader for fastboot to boot back into the system
-the dual partition was designed precisely to prevent things like this from happening. When an update fails, you are supposed to roll back to the old slot you were on previously.
Anyway, since you are able to boot to fastboot, can you try to get to stock recovery again from fastboot and see if you can boot up to system from there?
Hey
You can try to change the boot slot using fastboot mode
It can help uh maybe
Its worth to try
awaiz said:
Hey
You can try to change the boot slot using fastboot mode
It can help uh maybe
Its worth to try
Click to expand...
Click to collapse
When I try to set it to slot A (it's B now) it says device does not support slots which is weird as 'fastboot getvar current-slot' does show it using slot B right now.
When I try to set it to B (ie current slot) it says: FAILED (remote: 'Slot Change is not allowed in Lock State').
awaiz said:
Anyway, since you are able to boot to fastboot, can you try to get to stock recovery again from fastboot and see if you can boot up to system from there?
Click to expand...
Click to collapse
When I reboot to stock recovery it gives two options:
- Wipe Data and Cache
- Advanced
There are two reboot options under Advanced:
1. Reboot to fastboot
2. Reboot to recovery
2nd option just boots it back to this same recovery. Boot to fastboot works as well. So there is no option to reboot the device.
Perhaps I can try to flash the stock ROM (kinda of dirty flash) but again not sure if that works on locked phone.
https://www.androidexplained.com/change-active-partition-slot/
JagDave said:
https://www.androidexplained.com/change-active-partition-slot/
Click to expand...
Click to collapse
This doesn't work unfortunately on a locked device.
I found the fix and it was very simple: in Recovery under Wipe Data and Cache it has the option to delete 1. System Settings 2. Cache 3. Wipe all (incl Data).
I choose option 1 (System Settings) and after that it booted and I had to set up phone again as with a new install but all data on sd card had remained. I did lose all apps but that is a very minor thing.
Thanks for everyone who thought along with me. We got there in the end
help me.. my op6 stuck in bootlogo.. how can i run my phone back. it is still locked never rooted..
Alamin4736 said:
help me.. my op6 stuck in bootlogo.. how can i run my phone back. it is still locked never rooted..
Click to expand...
Click to collapse
Bro..Use the Msm tool to get recover coz you have the locked bootloader
roel1976 said:
I found the fix and it was very simple: in Recovery under Wipe Data and Cache it has the option to delete 1. System Settings 2. Cache 3. Wipe all (incl Data).
I choose option 1 (System Settings) and after that it booted and I had to set up phone again as with a new install but all data on sd card had remained. I did lose all apps but that is a very minor thing.
Thanks for everyone who thought along with me. We got there in the end
Click to expand...
Click to collapse
I am facing similar problem with my OP5. When I boot in recovery, it asks for pattern to unlock. But does not accept any pattern. In the absence of pin, it gives option to Wipe Data. Will I get similar options like you did ? I am hoping to save my data.

Categories

Resources