• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

Revisionc6ca823710d49754c3717e9cf3ba11b9c2648825 (tree)
Zeit2019-05-23 23:09:54
AutorNarayan Kamath <narayan@goog...>
CommiterAnton Hansson

Log Message

rootdir / sdcard : Stop creating /data/media/obb.

This directory is no longer used. OBB content is
placed in /data/media/$user/Android.

Test: make
Test: manually verify the path doesn't exist.
Bug: 129167772

Change-Id: I8549826586b9a68c8cfa3fe2e51295363f9b4e11

Ändern Zusammenfassung

Diff

--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -586,7 +586,6 @@ on post-fs-data
586586 symlink /data/data /data/user/0
587587
588588 mkdir /data/media 0770 media_rw media_rw
589- mkdir /data/media/obb 0770 media_rw media_rw
590589
591590 mkdir /data/cache 0770 system cache
592591 mkdir /data/cache/recovery 0770 system cache
--- a/sdcard/sdcard.cpp
+++ b/sdcard/sdcard.cpp
@@ -214,7 +214,14 @@ static void run_sdcardfs(const std::string& source_path, const std::string& labe
214214
215215 if (multi_user) {
216216 std::string obb_path = source_path + "/obb";
217- fs_prepare_dir(obb_path.c_str(), 0775, uid, gid);
217+ // Only attempt to prepare the /obb dir if it already exists. We want
218+ // the legacy obb path "/data/media/obb" to be fixed up so that we can
219+ // migrate it to its new location, but we don't want the directory to be
220+ // created if it doesn't already exist.
221+ struct stat sb;
222+ if (TEMP_FAILURE_RETRY(lstat(obb_path.c_str(), &sb)) == 0) {
223+ fs_prepare_dir(obb_path.c_str(), 0775, uid, gid);
224+ }
218225 }
219226
220227 exit(0);