Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf8269f4 authored by Zim's avatar Zim
Browse files

Fix legacy OBB data migration path

Ib64f7eb7608704e1b53a1b923cc068172fe05e1c botched the legacy OBB data
migration path. By doing s/sdcard/data\/media/g instead of
s/sdcard/data\/media\/0/g

Test: Device boots and /data/media/Android dir is not created
Bug: 144547920
Change-Id: I4f43cf1380159da17622512a6ad9d9106bf3143b
parent 0d838729
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -15,17 +15,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.

rm -rf /data/media/Android/obb/test_probe
mkdir -p /data/media/Android/obb/
touch /data/media/Android/obb/test_probe
rm -rf /data/media/0/Android/obb/test_probe
mkdir -p /data/media/0/Android/obb/
touch /data/media/0/Android/obb/test_probe
if ! test -f /data/media/0/Android/obb/test_probe ; then
  log -p i -t migrate_legacy_obb_data "No support for 'unshared_obb'. Not migrating"
  rm -rf /data/media/Android/obb/test_probe
  rm -rf /data/media/0/Android/obb/test_probe
  exit 0
fi

# Delete the test file, and remove the obb folder if it is empty
rm -rf /data/media/Android/obb/test_probe
rm -rf /data/media/0/Android/obb/test_probe
rmdir /data/media/obb

if ! test -d /data/media/obb ; then