I have a HTC one e8 dual SIM,nearly 2 year old.as the warranty is finished and the phone has became old I wanted to root my device(in real I want to get marshmallow rom for my device,it is available in other countries but not in mine that's why).And am new to rooting and flashing Rom so can someone help me out to install Rom and root my device?is there any marshmallow rom for my device?
Any reply would be helpful.
You have it easy, since the M8 has an unlockable bootloader.
What you'll want to do is:
1) Unlock your bootloader
2) Download and flash the TWRP build for your device.
3) Boot into recovery (TWRP)
4) Download the supersu zip onto your phone from http://forum.xda-developers.com/showthread.php?t=1538053
5) Flash it, and you're rooted.
If you help need doing the above: http://htc-one.wonderhowto.com/how-to/unlock-bootloader-root-your-htc-one-m8-0154444/
As for a Marshmallow ROM, stop at step 2 above. Then grab the latest (as of Apr. 4, 2016) build of Cyanogen Mod for the M8 from here.
How to install it:
1) Copy that ROM onto your phone
2) Boot into recovery (TWRP)
3) Select Wipe > Factory Reset (A "dirty flash" isn't recommended)
4) Then, on the main TWRP screen, select Install, and point it to the ROM file you copied to your device.
5) Swipe to flash
6) Welcome to the world of ROMing & rooting!