Okay, Please pardon me because i am going to ask a very stupid question which is coming in my mind and i can't able to find its satisfying answer. So i want to ask it here. I have an android device which has 300 MB of RAM and decent amount of space to run any light weight Linux OS. But i have searched quite a lot but i can't able to find any way to remove android OS completely and then install any linux based OS on it. I know there are some ways like installing app in android os and then accessing it. But i want it to use as standalone PC. It has all peripherals just like raspberry pi then why it is not possible. Please explain.
With desktops and laptops, OS installers like Linux distributions have found a way to install to a certain location on disk a boot loader which loads Linux instead of the original OS such as Windows. Even secure boot loading is possible with Linux using GPT partitioned hard drives. You begin this process by booting from CD/DVD or USB drive a live operating system that lets you install to this certain location.
Android and iOS devices do not have either of these corresponding concepts: (1) a standard place on storage where to install an alternate operating system; and (2) an alternate way to boot a different operating system like from USB drive.
That leaves us with no possible way to install random OS's to custom hardware like Android or Apple or Windows phones.
Having said all this, people still have found cracks into the process, where you first root a phone then carefully replace the OS such as here or here. This typically works only on certain phones that are first "cracked" into (rooted).