how to mount /system as read/write in android?
Solution is simple. To remount a mounted system you need to have root privileges. Do an su. You will enter root mode. Then run the below command. It will work, I did it many a times.

So here are the steps:

 adb shell  
 su  
 mount -o rw,remount -t ext4 /system


Edit: Found a better solution

From host machine(Linux or windows PC), execute the following commands.

&gt;&gt; adb root  
&gt;&gt; adb remount


remount will by default remount the /system partition with rw, if you have the permissions.

Note 1: To do su or adb root, your device must be rooted and have su executable on it. When you do an su, if it is executed properly, your terminal prompt will change from $ to #. Thanks..

Note 2: In recent mobiles, few of acer and samsung that i know, Security has been tightened, and even after rooting the phone, adb remount wouldn't work. As of i know, there is no solution available for it so far.