So here's the trick, how to format the phone if you forgot the password.
1. You have to switch off the phone.
2. Using Key Combinations
The easiest method is to use a dedicated key combination. Each Android device has a key combination that, when pressed, allows your device to reboot into recovery mode.
Here are the key combinations for some of the popular Android device manufacturers:
Samsung: Power + Home + Volume Up
Nexus: Power + Volume Up + Volume Down
LG: Power + Volume Down
HTC: Power + Volume Down
Motorola: Power + Home
Sony: Power + Volume Up OR Volume Down
Pixel: Power + Volume Down
Huawei: Power + Volume Down
Xiaomi: Power + Volume Up
OnePlus: Power + Volume Down
Remember that your device must be turned off when you use these key combinations otherwise it will not work.
3. Use volume up and volume down to move up or down .
4. Use power button to enter.
5. Click on factory reset or wipe all data, it may be different in different devices.
That's all you can format.
Share with credits otherwise fu*k off.
Credits :-
@deathrayhackerChannel :-
@deathrayhckers &
@techpedal