Need help identifying your device model? Go to Settings → About Phone → Model Number. For bootloader access, search “[device name] enter download mode”.
Enable "Developer Options" on your phone and toggle on USB Debugging and OEM Unlocking . android 6.0 marshmallow download
For non-Google phones, you must use specific tools to download the firmware: Need help identifying your device model
Samsung Galaxy S3/S4, HTC One M7, Nexus 4, Xiaomi Redmi 1S, Moto G (1st gen). HTC One M7
If your phone never got official Marshmallow, try community builds: