0

The other day, my friend told me that completely stock Android could run as a ROM on any device you care to mention. Since basically everyone else has told me otherwise, I decided to verify his claim and stumbled accross this Android Enthusiasts StackExchange thread.

I accepted the answer that was marked as correct, but it got me thinking. If stock android cannot be run on any device, how do custom ROMs like CyanogenMod or anything else support so many phones? Thanks.

4

CyanogenMod/LineageOS and other custom ROMs can't run on every device either. They have different versions for different devices. For example check this list for the newest LineageOS-compatible devices.

The same version can't work on every device, because the operating system (in this case the android) have to include the drivers for the specific device it will ran on. An android version which would include all the drivers would be illogically huge.

-1

It depends what do you mean with "stock Android" you two didn't understand each other I think. I'll explain you how some things work so you can understand what's going on: It's about how you define "stock Android" if by stock you mean the one shipped with phone (Samsung, LG etc.) or you think on pure Android aka AOSP. The stock Android is placed on nexus/pixel devices Motorola and few others, other manufacturers use Android but the add something their theming and such things (Samsung - TouchWiz, Huawei - emui and so on..) so it's stock on that phones. So if you take any rom of Samsung and try to install it on any other phone you will fail. Android is just a system it needs drivers so it can communicate with hardware, it's not like on PC where you install OS and then search for drivers (until windows 7, linux is some other story). Android ROM is like it Windows XP is made for only one configuration for example "x" cpu, "y" gpu, "z" hard disk and also particular manufacturer and it won't work if there is "w" cpu instead of "x". With custom ROMs things go like this: lineage os provides source code for operating system and other users who may or may not have contributed to making lineage os are providing so called "device trees" and kernel source code (published by phone manufacturers but sometimes needs some changes to make things work, also unique for every model of phone so one can't be used in two or more different models), so lineage os source code, device tree, and kernel sources are used to make rom - compile it for particular phone model, there are also proprietary files which are files used by some hardware but it's not open source so you need to extract it from phone. So no rom can be used on two or more different models even if are they from same manufacturer.

  • 1
    Thanks for your answer. By "stock Android" I was talking about the unmodified Android running on Pixel and Nexus devices. – MrAndroidBoss Jul 26 '17 at 8:42
  • @user751101 Well what is running on pixel/nexus can only be run on them. Android is just operating system like any other and need drivers and kernel to work and that is different for every phone model. So if you have knowledge and resources you can make any rom (lineage, AOSP, aokp, RR and others) run on any phone. – Једноруки Крстивоје Jul 26 '17 at 20:58
  • Look, I get it, but the other guy answered my question perfectly. I know what you're talking about. Please either delete this answer or stop this discussion. Thank you. – MrAndroidBoss Jul 27 '17 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.