android improve internal storage is it possible to use an sd card as part of a smartphone's internal storage, even rooting the phone?

I have read that google has been on that feature since android M, but what about versions like kitkat?

thank you in advance for any help.
You need to change the layout of the device 

You need to build a specific rom  and a specific recovery to adopt the sdcard 


  What do the specific rom  and specific recovery means ?


Let me start by how android manages storage 

As per kitakat the storage is determined by the fstab and the storage-list.xml

This define what blocks should be used for what purpose more specifically they determine the partition 


  To adopt the storage 



You need to build a new rom  with modified fstab and
storage-list.xml  (till lollipop because android 6 uses only the
fstab)
Then build twrp (or any other recovery) with modified fstab and
storage-list.xml
Then flash twrp and wipe everything using advanced wipe a word of
caution this will wipe your sdcard


Enjoy