I need to copy a file from the external SDcard to a location in the root partition, during the boot process (from init), after /data is mounted. I used Carliv's tool to add the following line to init.rc but it looks like the external SDcard isn't mounted yet at that stage:
on post-fs-data
copy /mnt/m_external_sd/file /file
It's Android 7. How can I do that? Thanks in advance.
on property:sys.boot_completed=1
instead ofpost-fs-data
. It depends on when you need that file execactly in boot process. Or addwait
command. But better is to place the file in initramfs permanently, if it isn't changed on every boot. – Irfan Latif Feb 14 '19 at 17:38