This can be marked a duplicate of questions like this, but it's a device-specific question. It cannot be answered in a generic way, it should be “How to root XYZ Android device without unlocking bootloader?”
Simple answer is: It should not be possible to root Android devices without unlocking bootloader, but it's possible for some devices due to security ...
My reply is built on my assumption that the OP want to ask about his device's root status, and if it's been altered or not
Check Selinux Status:
Selinux defines which process can access a given resource on your device. AFAIK, all Android device manufacturers companies ship their devices with Selinux Enforcing (Default), in some custom ROMs you may find ...
Remember that the custom ROM package will include the boot image too. And on A/B partition devices, the recovery rests is in the boot image. So, if the custom ROM has written your boot image, then your TWRP should be gone. What will load will depend on the recovery included in the boot image. It could be stock, something else or nothing.
This was solved using clues from this post
If you only need to authorize one computer:
Simply copy the adbkey.pub
onto the device location:
/data/misc/adb/ and rename it from
adbkey.pub to adb_keys
chmod 0644 and then reboot.
I forgot to do the chmod but still works.
You can use the following command from an adb prompt to enter into your devices recovery mode without using a physical button during restart.
1) Start adb prompt on your PC / MAC / Linux
2) Make sure adb is running adb start-server
2) Make sure the device is present when you run: adb devices
3) Now run adb reboot bootloader and your device will restart ...