Remove broken code for mounting encrypted OBB files

Mounting encrypted OBB files has never worked reliably across devices,
partly due to its reliance on Twofish encryption support in the kernel.
This is because Twofish support (CONFIG_CRYPTO_TWOFISH) has never been
required or even recommended for Android.  It has never been enabled in
GKI, but even before GKI it wasn't required or recommended.  Moreover,
this is now the only Android feature that still uses dm-crypt
(CONFIG_DM_CRYPT), and some devices don't have that enabled either.

Therefore, it appears that this feature is unused.  That's perhaps not
surprising, considering that the documentation for OBBs
(https://developer.android.com/google/play/expansion-files) says that
they are deprecated, and also it explains OBBs as being app files that
are opaque to the platform; the ability of the platform to mount OBBs
that happen to be in a particular format is never mentioned.  That means
that OBB mounting is probably rarely used even with unencrypted OBBs.
Finally, the usefulness of OBBs having their own encryption layer (in
addition to what the platform already provides via FBE) is not clear
either, especially with such an unusual choice of cipher.

To avoid the confusion that is being caused by having the broken code
for mounting encrypted OBBs still sitting around, let's remove it.

Test: atest StorageManagerTest # on Cuttlefish
Test: atest StorageManagerIntegrationTest # on Cuttlefish
Bug: 216475849
Change-Id: Iaef32cce90f95ea745ba2b143f89e66f533f3479
diff --git a/model/ObbVolume.cpp b/model/ObbVolume.cpp
index 21479c4..b64c1ba 100644
--- a/model/ObbVolume.cpp
+++ b/model/ObbVolume.cpp
@@ -15,7 +15,6 @@
  */
 
 #include "ObbVolume.h"
-#include "Devmapper.h"
 #include "Loop.h"
 #include "Utils.h"
 #include "VoldUtil.h"
@@ -39,12 +38,10 @@
 namespace android {
 namespace vold {
 
-ObbVolume::ObbVolume(int id, const std::string& sourcePath, const std::string& sourceKey,
-                     gid_t ownerGid)
+ObbVolume::ObbVolume(int id, const std::string& sourcePath, gid_t ownerGid)
     : VolumeBase(Type::kObb) {
     setId(StringPrintf("obb:%d", id));
     mSourcePath = sourcePath;
-    mSourceKey = sourceKey;
     mOwnerGid = ownerGid;
 }
 
@@ -55,36 +52,13 @@
         PLOG(ERROR) << getId() << " failed to create loop";
         return -1;
     }
-
-    if (!mSourceKey.empty()) {
-        uint64_t nr_sec = 0;
-        if (GetBlockDev512Sectors(mLoopPath, &nr_sec) != OK) {
-            PLOG(ERROR) << getId() << " failed to get loop size";
-            return -1;
-        }
-
-        char tmp[PATH_MAX];
-        if (Devmapper::create(getId().c_str(), mLoopPath.c_str(), mSourceKey.c_str(), nr_sec, tmp,
-                              PATH_MAX)) {
-            PLOG(ERROR) << getId() << " failed to create dm";
-            return -1;
-        }
-        mDmPath = tmp;
-        mMountPath = mDmPath;
-    } else {
-        mMountPath = mLoopPath;
-    }
     return OK;
 }
 
 status_t ObbVolume::doDestroy() {
-    if (!mDmPath.empty() && Devmapper::destroy(getId().c_str())) {
-        PLOG(WARNING) << getId() << " failed to destroy dm";
-    }
     if (!mLoopPath.empty() && Loop::destroyByDevice(mLoopPath.c_str())) {
         PLOG(WARNING) << getId() << " failed to destroy loop";
     }
-    mDmPath.clear();
     mLoopPath.clear();
     return OK;
 }
@@ -98,7 +72,7 @@
         return -1;
     }
     // clang-format off
-    if (android::vold::vfat::Mount(mMountPath, path, true, false, true,
+    if (android::vold::vfat::Mount(mLoopPath, path, true, false, true,
                                    0, mOwnerGid, 0227, false)) {
         // clang-format on
         PLOG(ERROR) << getId() << " failed to mount";