Extract vendor files from device or system.img

Not sure if this is what you are checking for but I can see a extract_files.sh in the /Android/vi-oreo/device/tissot/tissot$ location.


This is a folder I had created for vi-oreo source code.
If you check under device there should be a folder for your device. If not you need to create the folder. You should get the your device specific folders from Github. There will be 3 folders in the source which will need to be updated.
Device
Kernel
Vendor
Easiest way to get these folder is to get it from the device maintainers’s XDA page. The page where he/she has published the device ROM unofficial or official should have the device tree details. For e.g. for tissot the official build is here. Go the part mentioned as source code and he has given his github link.
There go back to his root folder. Here you will see the all the device tree for tissot :

Device

https://github.com/TheScarastic/android_device_xiaomi_tissot
https://github.com/TheScarastic/android_device_xiaomi_msm8953-common

Kernel
https://github.com/TheScarastic/android_kernel_xiaomi_msm8953

Vendor
https://github.com/TheScarastic/proprietary_vendor_xiaomi

git clone these to your PC and you have the device tree. Check the branch while downloading…CM-14.1, Lineage-15.1, Lineage-16 etc