Extracting them from a firmware is dependent on what is the file extension for the firmware. We have a variety of firmwares:
- Fastboot Imaged Firmwares
- Full Over the Air zip Updates
- We have Odin tar Archives
- LG kdz Firmwares
- Spreadtrum soc Firmwares
- Recovery Flash zip Firmwares
- Raw binary Firmwares
So if you may want to extract from Fastboot .img firmware, you should know that img files are specially extracted and edited by repacking. Especially for true boot and recovery images. But hope for you is: /system is not a true imaged partition but its a file system. Though named as System.img in ROMs, it is natively a .tar archive that you can extract using WinRAR on computer and locate the app and extract it. The structure is arranged just like the /system partition of Android.
Recovery Flash zips and Over The Air zip updates, as the name suggests are zip archives which can also be extracted with a method similar like the above
KDZ and SOC Firmwares are also archives. But since you don't want to take a lot of time researching what types of archives they are, just open WinRAR on any device you feel convenient and use it as your file explorer. Navigate to the ROM you downloaded and click on it. This will actually do auto-detect the compression algorithm used and it will open it. It will show what type the archive is in the file name of archive. Find your files and copy them.
ODIN tar is a tarball archive. Just extract it with RAR or any other app you find convenient.
You're only locked to flash a whole ROM if your phone has a RAW binary file which can only handled by certain preloading binaries which understand them natively.
Lets come to laying the file back to rest on your file system. Android Nougat always is simple to lay the apps to system. The containing folder obviously had two or one folders in it. One for .dex classes named OAT for easier preparation by the Dalvik Virtual Machine which takes care of all application preparation. And one for libraries used by application named LIB.
They go here: for example the Camera app
/system/app/Camera/lib/arm/lib_camera.so
That's the library
/system/app/Camera/oat/arm/Camera.dex
That's for the Classes
/system/app/Camera/Camera.apk
That's for the application
After copying them. Fix the permissions to
chmod 0644
For all files
chmod 0755
For all folders
I hope this is all you need. As per your question
But if they don't, just flash the whole phone and be ready to go again.
Be sure to review, vote or mark this answer if it helped you. Waiting to hear from you buddy