@@ -1,5 +1,5 @@
11diff --git a/dev/devicelab/lib/framework/runner.dart b/dev/devicelab/lib/framework/runner.dart
2−index 9fae74726..d88d6ecbb 100644
2+index 8e511eefd..fef3cca8b 100644
33--- a/dev/devicelab/lib/framework/runner.dart
44+++ b/dev/devicelab/lib/framework/runner.dart
55@@ -126,7 +126,7 @@ Future<void> cleanupSystem() async {
@@ -7,57 +7,58 @@ index 9fae74726..d88d6ecbb 100644
77 final String gradlewBinaryName = Platform.isWindows ? 'gradlew.bat' : 'gradlew';
88 final Directory tempDir = Directory.systemTemp.createTempSync('flutter_devicelab_shutdown_gradle.');
99- recursiveCopy(Directory(path.join(flutterDirectory.path, 'bin', 'cache', 'artifacts', 'gradle_wrapper')), tempDir);
10−+ recursiveCopy(Directory(path.join(homeDirPath, '.cache', 'flutter', 'artifacts', 'gradle_wrapper')), tempDir);
10++ recursiveCopy(Directory(path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'gradle_wrapper')), tempDir);
1111 copy(File(path.join(path.join(flutterDirectory.path, 'packages', 'flutter_tools'), 'templates', 'app', 'android.tmpl', 'gradle', 'wrapper', 'gradle-wrapper.properties')), Directory(path.join(tempDir.path, 'gradle', 'wrapper')));
1212 if (!Platform.isWindows) {
1313 await exec(
1414diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart
15−index e6216c737..5ab497092 100644
15+index c680de599..480abfb77 100644
1616--- a/packages/flutter_tools/lib/src/asset.dart
1717+++ b/packages/flutter_tools/lib/src/asset.dart
18−@@ -6,6 +6,7 @@ import 'dart:async';
19−
18+@@ -8,6 +8,7 @@ import 'package:meta/meta.dart';
19+ import 'package:package_config/package_config.dart';
2020 import 'package:yaml/yaml.dart';
2121
2222+import 'base/common.dart';
2323 import 'base/context.dart';
2424 import 'base/file_system.dart';
25− import 'base/platform.dart';
26−@@ -326,7 +327,7 @@ List<_Asset> _getMaterialAssets(String fontSet) {
27− for (Map<dynamic, dynamic> font in family['fonts']) {
28− final Uri entryUri = fs.path.toUri(font['asset'] as String);
25+ import 'base/utils.dart';
26+@@ -392,7 +393,7 @@ List<_Asset> _getMaterialAssets(String fontSet) {
27+ for (final Map<dynamic, dynamic> font in (family['fonts'] as List<dynamic>).cast<Map<dynamic, dynamic>>()) {
28+ final Uri entryUri = globals.fs.path.toUri(font['asset'] as String);
2929 result.add(_Asset(
30−- baseDir: fs.path.join(Cache.flutterRoot, 'bin', 'cache', 'artifacts', 'material_fonts'),
31−+ baseDir: fs.path.join(homeDirPath, '.cache', 'flutter', 'artifacts', 'material_fonts'),
30+- baseDir: globals.fs.path.join(Cache.flutterRoot, 'bin', 'cache', 'artifacts', 'material_fonts'),
31++ baseDir: globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'material_fonts'),
3232 relativeUri: Uri(path: entryUri.pathSegments.last),
3333 entryUri: entryUri,
34− ));
34+ package: null,
3535diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
36−index 5e1950b56..45585f9c0 100644
36+index c0946782c..bdbc35cb8 100644
3737--- a/packages/flutter_tools/lib/src/cache.dart
3838+++ b/packages/flutter_tools/lib/src/cache.dart
39−@@ -164,8 +164,14 @@ class Cache {
39+@@ -202,8 +202,15 @@ class Cache {
4040 return;
4141 }
4242 assert(_lock == null);
4343+
44−+ final Directory dir = fs.directory(fs.path.join(homeDirPath, '.cache', 'flutter'));
44++ final Directory dir = globals.fs.directory(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
4545+ if (!dir.existsSync()) {
4646+ dir.createSync(recursive: true);
47−+ os.chmod(dir, '755');
47++ globals.os.chmod(dir, '755');
4848+ }
49++
4950 final File lockFile =
50−- fs.file(fs.path.join(flutterRoot, 'bin', 'cache', 'lockfile'));
51−+ fs.file(fs.path.join(homeDirPath, '.cache', 'flutter', 'lockfile'));
51+- globals.fs.file(globals.fs.path.join(flutterRoot, 'bin', 'cache', 'lockfile'));
52++ globals.fs.file(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'lockfile'));
5253 try {
5354 _lock = lockFile.openSync(mode: FileMode.write);
5455 } on FileSystemException catch (e) {
55−@@ -239,7 +245,7 @@ class Cache {
56+@@ -306,7 +313,7 @@ class Cache {
5657 if (_rootOverride != null) {
57− return fs.directory(fs.path.join(_rootOverride.path, 'bin', 'cache'));
58+ return _fileSystem.directory(_fileSystem.path.join(_rootOverride.path, 'bin', 'cache'));
5859 } else {
59−- return fs.directory(fs.path.join(flutterRoot, 'bin', 'cache'));
60−+ return fs.directory(fs.path.join(homeDirPath, '.cache', 'flutter'));
60+- return _fileSystem.directory(_fileSystem.path.join(flutterRoot, 'bin', 'cache'));
61++ return _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
6162 }
6263 }
6364