Handle hsum target as well

1. handle external storage path for hsum target
2. do not need to grant custom vm permission anymore

Bug: 349035371
Bug: 346676738
Test: run ferrochrome app in hsum target
Change-Id: I217b7b16d9cba618c3a930f46ae9c085e7441ffe
diff --git a/ferrochrome_app/custom_vm_setup.rc b/ferrochrome_app/custom_vm_setup.rc
index f4244b7..68f370e 100644
--- a/ferrochrome_app/custom_vm_setup.rc
+++ b/ferrochrome_app/custom_vm_setup.rc
@@ -14,10 +14,10 @@
 
 service custom_vm_setup /system_ext/bin/custom_vm_setup
     user shell
-    group shell
+    group shell media_rw
     disabled
     oneshot
     seclabel u:r:shell:s0
 
 on property:debug.custom_vm_setup.start=true
-    start custom_vm_setup
\ No newline at end of file
+    start custom_vm_setup
diff --git a/ferrochrome_app/custom_vm_setup.sh b/ferrochrome_app/custom_vm_setup.sh
index 92a23a3..f007f6a 100644
--- a/ferrochrome_app/custom_vm_setup.sh
+++ b/ferrochrome_app/custom_vm_setup.sh
@@ -2,12 +2,13 @@
 
 function copy_files() {
   cp -u /sdcard/vm_config.json /data/local/tmp
+  cp -u /data/media/10/vm_config.json /data/local/tmp
   cp -u /sdcard/chromiumos_test_image.bin /data/local/tmp
+  cp -u /data/media/10/chromiumos_test_image.bin /data/local/tmp
   chmod 666 /data/local/tmp/vm_config.json
   chmod 666 /data/local/tmp/chromiumos_test_image.bin
 }
 setprop debug.custom_vm_setup.done false
 copy_files
-pm grant com.google.android.virtualization.vmlauncher android.permission.USE_CUSTOM_VIRTUAL_MACHINE
 setprop debug.custom_vm_setup.start false
-setprop debug.custom_vm_setup.done true
\ No newline at end of file
+setprop debug.custom_vm_setup.done true