I have edited .so file in IDA. I don't know how to save it. Any idea for saving them?
Go to File and select Script file and choose a .idc name for your file, which makes the changes permanent.
Then when you will run the .idc file, you will notice that bytes have been written to those segments successfully.
After that, IDA will ask for saving the new binary file.
To apply the changes you made in your .idc database to the original program, use the menu:
Apply Patches to input file.
Warning: If you make several patches, apply them, undo one of the patches, and apply patches again, ida will have lost the information about the "undone" patch and not undo it in the original file. Because of this, you should make a backup of the original file before your first patch, and copy it back before every subsequent patch you make.
Also, i recommend you to check into idapatcher which will make it a bit easier to make and check your patches.