ADB Backup: Will it erase root? This may sound like a stupid question, but I have a Honor 5x I'd like to root, and I want to use adb backup to backup all my phone's data so I can restore it after unlocking my bootloader (which erases the phone's data). 

My question is:  If I backup with adb backup -all, when I'll restore my phone's data, will it erase root? Probably not, but I just don't want to risk it.
No. Backing up and restoring won't affect root.

Basically, adb backup backups a portion of /data partition, while rooting mostly affects /system partition and soemtimes / (boot ramdisk, for system-less root). You can safely back it up and proceed on rooting it before restoring the backup.