extract-utils: Apply relative path for apps with deep folder structures

While most apps are nicely placed in
<partition>/app/<nameofapp>/<nameofapp>.apk
or <partition>/priv-app/<nameofapp>/<nameofapp.apk>,
some such as Android Platform Services belong
in product/priv-app/GmsCore/m/independent/AndroidPlatformServices.apk.
Without this change, it is copied to
product/priv-app/AndroidPlatformServices/AndroidPlatformServices.apk.

Change-Id: I364e9a71bf0eb31942714a87343e14b2b3c5ace4
diff --git a/build/tools/extract_utils.sh b/build/tools/extract_utils.sh
index 98a2c5d..770bb9b 100755
--- a/build/tools/extract_utils.sh
+++ b/build/tools/extract_utils.sh
@@ -484,6 +484,9 @@
             printf '\tdex_preopt: {\n'
             printf '\t\tenabled: false,\n'
             printf '\t},\n'
+            if [ "$DIRNAME" != "." ] && [[ "$DIRNAME" == */* ]]; then
+                printf '\trelative_install_path: "%s",\n' "$DIRNAME"
+            fi
         fi
         if [ "$CLASS" = "SHARED_LIBRARIES" ] || [ "$CLASS" = "EXECUTABLES" ] ; then
             if [ "$DIRNAME" != "." ]; then