I don't have any login for my app.
I want to use a unique identifier to store user details. I cannot use FCM ID or unique Identifier/GUID bcs once user will clear the cache or reinstall the app I will get a different FCM ID or unique Identifier/GUID.Now to the extend I know I've only option left that is to use IMEI as a unique identifier and save the app data against IMEI in DB, but I came across some posts saying rooted devices always have 000000.. IMEI.
Kindly suggest should I use IMEI or not. If yes then what I should do for rooted devices?
No, IMEI shoudn't be used in this case, same for any other hardware related stuff. Just add login/register functionality to your app, it will be the best option for everyone. Also take a look here: https://developer.android.com/training/articles/user-data-ids.html