add function to traversal the crates

The system_server needs to traversal Context.getCratesDir() to get all
of crates. But, system_server doesn't have the permission. system_server
needs installd to traverse Context.getCratesDir().

The depth of traversal in Context.getCratesDir is 1. installd returns the
list CrateMetadata. CrateMetadata contains the following information.
* crateName: it is the folder name

To add .gitigTo add .gitignore to collect the ignore file list.

Test: atest \
        CtsOsTestCases:android.os.storage.cts.CrateInfoTest \
        CtsOsTestCases:android.os.storage.cts.StorageManagerCratesTest \
        CtsOsTestCases:android.os.storage.cts.StorageStatsManagerTest

Bug: 141660526
Change-Id: Iea5eee4606e4ff437edef617a1f8db93e37f51c4
diff --git a/cmds/installd/binder/android/os/IInstalld.aidl b/cmds/installd/binder/android/os/IInstalld.aidl
index 6cc4bde..f6a4530 100644
--- a/cmds/installd/binder/android/os/IInstalld.aidl
+++ b/cmds/installd/binder/android/os/IInstalld.aidl
@@ -40,6 +40,14 @@
     long[] getUserSize(@nullable @utf8InCpp String uuid, int userId, int flags, in int[] appIds);
     long[] getExternalSize(@nullable @utf8InCpp String uuid, int userId, int flags, in int[] appIds);
 
+    @nullable
+    android.os.storage.CrateMetadata[] getAppCrates(
+            @nullable @utf8InCpp String uuid, in @utf8InCpp String[] packageNames,
+             int userId);
+    @nullable
+    android.os.storage.CrateMetadata[] getUserCrates(
+            @nullable @utf8InCpp String uuid, int userId);
+
     void setAppQuota(@nullable @utf8InCpp String uuid, int userId, int appId, long cacheQuota);
 
     void moveCompleteApp(@nullable @utf8InCpp String fromUuid, @nullable @utf8InCpp String toUuid,