I want to run the script on boot up imx6q android. I found this can be achieved by adding service on init.rc file. but to change init.rc you need to mount boot.img and unmount it. Is there any alternate to do that without chanign init.rc file.
I do not think that is possible to make that. However, you can modify the init.rc file without mounting and unmounting the boot.img. You only need to add the script to the init.rc file before the Android build.