• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ART_RUNTIME_OAT_FILE_ASSISTANT_H_
18 #define ART_RUNTIME_OAT_FILE_ASSISTANT_H_
19 
20 #include <cstdint>
21 #include <memory>
22 #include <optional>
23 #include <sstream>
24 #include <string>
25 #include <string_view>
26 #include <variant>
27 
28 #include "arch/instruction_set.h"
29 #include "base/compiler_filter.h"
30 #include "base/os.h"
31 #include "base/scoped_flock.h"
32 #include "base/unix_file/fd_file.h"
33 #include "class_loader_context.h"
34 #include "oat_file.h"
35 #include "oat_file_assistant_context.h"
36 
37 namespace art {
38 
39 namespace gc {
40 namespace space {
41 class ImageSpace;
42 }  // namespace space
43 }  // namespace gc
44 
45 // Class for assisting with oat file management.
46 //
47 // This class collects common utilities for determining the status of an oat
48 // file on the device, updating the oat file, and loading the oat file.
49 //
50 // The oat file assistant is intended to be used with dex locations not on the
51 // boot class path. See the IsInBootClassPath method for a way to check if the
52 // dex location is in the boot class path.
53 class OatFileAssistant {
54  public:
55   enum DexOptNeeded {
56     // No dexopt should (or can) be done to update the apk/jar.
57     // Matches Java: dalvik.system.DexFile.NO_DEXOPT_NEEDED = 0
58     kNoDexOptNeeded = 0,
59 
60     // dex2oat should be run to update the apk/jar from scratch.
61     // Matches Java: dalvik.system.DexFile.DEX2OAT_FROM_SCRATCH = 1
62     kDex2OatFromScratch = 1,
63 
64     // dex2oat should be run to update the apk/jar because the existing code
65     // is out of date with respect to the boot image.
66     // Matches Java: dalvik.system.DexFile.DEX2OAT_FOR_BOOT_IMAGE
67     kDex2OatForBootImage = 2,
68 
69     // dex2oat should be run to update the apk/jar because the existing code
70     // is out of date with respect to the target compiler filter.
71     // Matches Java: dalvik.system.DexFile.DEX2OAT_FOR_FILTER
72     kDex2OatForFilter = 3,
73   };
74 
75   enum OatStatus {
76     // kOatCannotOpen - The oat file cannot be opened, because it does not
77     // exist, is unreadable, or otherwise corrupted.
78     kOatCannotOpen,
79 
80     // kOatDexOutOfDate - The oat file is out of date with respect to the dex file.
81     kOatDexOutOfDate,
82 
83     // kOatBootImageOutOfDate - The oat file is up to date with respect to the
84     // dex file, but is out of date with respect to the boot image.
85     kOatBootImageOutOfDate,
86 
87     // kOatContextOutOfDate - The context in the oat file is out of date with
88     // respect to the class loader context.
89     kOatContextOutOfDate,
90 
91     // kOatUpToDate - The oat file is completely up to date with respect to
92     // the dex file and boot image.
93     kOatUpToDate,
94   };
95 
96   // A bit field to represent the conditions where dexopt should be performed.
97   struct DexOptTrigger {
98     // Dexopt should be performed if the target compiler filter is better than the current compiler
99     // filter. See `CompilerFilter::IsBetter`.
100     bool targetFilterIsBetter : 1;
101     // Dexopt should be performed if the target compiler filter is the same as the current compiler
102     // filter.
103     bool targetFilterIsSame : 1;
104     // Dexopt should be performed if the target compiler filter is worse than the current compiler
105     // filter. See `CompilerFilter::IsBetter`.
106     bool targetFilterIsWorse : 1;
107     // Dexopt should be performed if the current oat file was compiled without a primary image,
108     // and the runtime is now running with a primary image loaded from disk.
109     bool primaryBootImageBecomesUsable : 1;
110     // Dexopt should be performed if the APK is compressed and the current oat/vdex file doesn't
111     // contain dex code.
112     bool needExtraction : 1;
113   };
114 
115   // Represents the location of the current oat file and/or vdex file.
116   enum Location {
117     // Does not exist, or an error occurs.
118     kLocationNoneOrError = 0,
119     // In the global "dalvik-cache" folder.
120     kLocationOat = 1,
121     // In the "oat" folder next to the dex file.
122     kLocationOdex = 2,
123     // In the DM file. This means the only usable file is the vdex file.
124     kLocationDm = 3,
125   };
126 
127   // Represents the status of the current oat file and/or vdex file.
128   class DexOptStatus {
129    public:
GetLocation()130     Location GetLocation() { return location_; }
IsVdexUsable()131     bool IsVdexUsable() { return location_ != kLocationNoneOrError; }
132 
133    private:
134     Location location_ = kLocationNoneOrError;
135     friend class OatFileAssistant;
136   };
137 
138   // Constructs an OatFileAssistant object to assist the oat file
139   // corresponding to the given dex location with the target instruction set.
140   //
141   // The dex_location must not be null and should remain available and
142   // unchanged for the duration of the lifetime of the OatFileAssistant object.
143   // Typically the dex_location is the absolute path to the original,
144   // un-optimized dex file.
145   //
146   // Note: Currently the dex_location must have an extension.
147   // TODO: Relax this restriction?
148   //
149   // The isa should be either the 32 bit or 64 bit variant for the current
150   // device. For example, on an arm device, use arm or arm64. An oat file can
151   // be loaded executable only if the ISA matches the current runtime.
152   //
153   // context should be the class loader context to check against, or null to skip the check.
154   //
155   // load_executable should be true if the caller intends to try and load
156   // executable code for this dex location.
157   //
158   // only_load_trusted_executable should be true if the caller intends to have
159   // only oat files from trusted locations loaded executable. See IsTrustedLocation() for
160   // details on trusted locations.
161   //
162   // runtime_options should be provided with all the required fields filled if the caller intends to
163   // use OatFileAssistant without a runtime.
164   OatFileAssistant(const char* dex_location,
165                    const InstructionSet isa,
166                    ClassLoaderContext* context,
167                    bool load_executable,
168                    bool only_load_trusted_executable = false,
169                    OatFileAssistantContext* ofa_context = nullptr);
170 
171   // Similar to this(const char*, const InstructionSet, bool), however, if a valid zip_fd is
172   // provided, vdex, oat, and zip files will be read from vdex_fd, oat_fd and zip_fd respectively.
173   // Otherwise, dex_location will be used to construct necessary filenames.
174   OatFileAssistant(const char* dex_location,
175                    const InstructionSet isa,
176                    ClassLoaderContext* context,
177                    bool load_executable,
178                    bool only_load_trusted_executable,
179                    OatFileAssistantContext* ofa_context,
180                    int vdex_fd,
181                    int oat_fd,
182                    int zip_fd);
183 
184   // A convenient factory function that accepts ISA, class loader context, and compiler filter in
185   // strings. Returns the created instance and ClassLoaderContext on success, or returns nullptr and
186   // outputs an error message if it fails to parse the input strings.
187   // The returned ClassLoaderContext must live at least as long as the OatFileAssistant.
188   static std::unique_ptr<OatFileAssistant> Create(
189       const std::string& filename,
190       const std::string& isa_str,
191       const std::optional<std::string>& context_str,
192       bool load_executable,
193       bool only_load_trusted_executable,
194       OatFileAssistantContext* ofa_context,
195       /*out*/ std::unique_ptr<ClassLoaderContext>* context,
196       /*out*/ std::string* error_msg);
197 
198   // Returns true if the dex location refers to an element of the boot class
199   // path.
200   bool IsInBootClassPath();
201 
202   // Return what action needs to be taken to produce up-to-date code for this
203   // dex location. If "downgrade" is set to false, it verifies if the current
204   // compiler filter is at least as good as an oat file generated with the
205   // given compiler filter otherwise, if its set to true, it checks whether
206   // the oat file generated with the target filter will be downgraded as
207   // compared to the current state. For example, if the current compiler filter is
208   // quicken, and target filter is verify, it will recommend to dexopt, while
209   // if the target filter is speed profile, it will recommend to keep it in its
210   // current state.
211   // profile_changed should be true to indicate the profile has recently changed
212   // for this dex location.
213   // If the purpose of the dexopt is to downgrade the compiler filter,
214   // set downgrade to true.
215   // Returns a positive status code if the status refers to the oat file in
216   // the oat location. Returns a negative status code if the status refers to
217   // the oat file in the odex location.
218   //
219   // Deprecated. Use the other overload.
220   int GetDexOptNeeded(CompilerFilter::Filter target_compiler_filter,
221                       bool profile_changed = false,
222                       bool downgrade = false);
223 
224   // Returns true if dexopt needs to be performed with respect to the given target compilation
225   // filter and dexopt trigger. Also returns the status of the current oat file and/or vdex file.
226   bool GetDexOptNeeded(CompilerFilter::Filter target_compiler_filter,
227                        const DexOptTrigger dexopt_trigger,
228                        /*out*/ DexOptStatus* dexopt_status);
229 
230   // Returns true if there is up-to-date code for this dex location,
231   // irrespective of the compiler filter of the up-to-date code.
232   bool IsUpToDate();
233 
234   // Returns an oat file that can be used for loading dex files.
235   // Returns null if no suitable oat file was found.
236   //
237   // After this call, no other methods of the OatFileAssistant should be
238   // called, because access to the loaded oat file has been taken away from
239   // the OatFileAssistant object.
240   std::unique_ptr<OatFile> GetBestOatFile();
241 
242   // Returns a human readable description of the status of the code for the
243   // dex file. The returned description is for debugging purposes only.
244   std::string GetStatusDump();
245 
246   // Computes the optimization status of the given dex file. The result is
247   // returned via the two output parameters.
248   //   - out_odex_location: the location of the (best) odex that will be used
249   //        for loading. See GetBestInfo().
250   //   - out_compilation_filter: the level of optimizations (compiler filter)
251   //   - out_compilation_reason: the optimization reason. The reason might
252   //        be "unknown" if the compiler artifacts were not annotated during optimizations.
253   //   - out_odex_status: a human readable refined status of the validity of the odex file.
254   //        Possible values are: "up-to-date", "apk-more-recent", and "io-error-no-oat".
255   //
256   // This method will try to mimic the runtime effect of loading the dex file.
257   // For example, if there is no usable oat file, the compiler filter will be set
258   // to "run-from-apk".
259   void GetOptimizationStatus(std::string* out_odex_location,
260                              std::string* out_compilation_filter,
261                              std::string* out_compilation_reason,
262                              std::string* out_odex_status);
263 
264   static void GetOptimizationStatus(const std::string& filename,
265                                     InstructionSet isa,
266                                     std::string* out_compilation_filter,
267                                     std::string* out_compilation_reason,
268                                     OatFileAssistantContext* ofa_context = nullptr);
269 
270   // Open and returns an image space associated with the oat file.
271   static std::unique_ptr<gc::space::ImageSpace> OpenImageSpace(const OatFile* oat_file);
272 
273   // Loads the dex files in the given oat file for the given dex location.
274   // The oat file should be up to date for the given dex location.
275   // This loads multiple dex files in the case of multidex.
276   // Returns an empty vector if no dex files for that location could be loaded
277   // from the oat file.
278   //
279   // The caller is responsible for freeing the dex_files returned, if any. The
280   // dex_files will only remain valid as long as the oat_file is valid.
281   static std::vector<std::unique_ptr<const DexFile>> LoadDexFiles(
282       const OatFile& oat_file, const char* dex_location);
283 
284   // Same as `std::vector<std::unique_ptr<const DexFile>> LoadDexFiles(...)` with the difference:
285   //   - puts the dex files in the given vector
286   //   - returns whether or not all dex files were successfully opened
287   static bool LoadDexFiles(const OatFile& oat_file,
288                            const std::string& dex_location,
289                            std::vector<std::unique_ptr<const DexFile>>* out_dex_files);
290 
291   // Returns whether this is an apk/zip wit a classes.dex entry, or nullopt if an error occurred.
292   std::optional<bool> HasDexFiles(std::string* error_msg);
293 
294   // If the dex file has been installed with a compiled oat file alongside
295   // it, the compiled oat file will have the extension .odex, and is referred
296   // to as the odex file. It is called odex for legacy reasons; the file is
297   // really an oat file. The odex file will often, but not always, have a
298   // patch delta of 0 and need to be relocated before use for the purposes of
299   // ASLR. The odex file is treated as if it were read-only.
300   //
301   // Returns the status of the odex file for the dex location.
302   OatStatus OdexFileStatus();
303 
304   // When the dex files is compiled on the target device, the oat file is the
305   // result. The oat file will have been relocated to some
306   // (possibly-out-of-date) offset for ASLR.
307   //
308   // Returns the status of the oat file for the dex location.
309   OatStatus OatFileStatus();
310 
GetBestStatus()311   OatStatus GetBestStatus() {
312     return GetBestInfo().Status();
313   }
314 
315   // Constructs the odex file name for the given dex location.
316   // Returns true on success, in which case odex_filename is set to the odex
317   // file name.
318   // Returns false on error, in which case error_msg describes the error and
319   // odex_filename is not changed.
320   // Neither odex_filename nor error_msg may be null.
321   static bool DexLocationToOdexFilename(const std::string& location,
322                                         InstructionSet isa,
323                                         std::string* odex_filename,
324                                         std::string* error_msg);
325 
326   // Constructs the oat file name for the given dex location.
327   // Returns true on success, in which case oat_filename is set to the oat
328   // file name.
329   // Returns false on error, in which case error_msg describes the error and
330   // oat_filename is not changed.
331   // Neither oat_filename nor error_msg may be null.
332   //
333   // Calling this function requires an active runtime.
334   static bool DexLocationToOatFilename(const std::string& location,
335                                        InstructionSet isa,
336                                        std::string* oat_filename,
337                                        std::string* error_msg);
338 
339   // Same as above, but also takes `deny_art_apex_data_files` from input.
340   //
341   // Calling this function does not require an active runtime.
342   static bool DexLocationToOatFilename(const std::string& location,
343                                        InstructionSet isa,
344                                        bool deny_art_apex_data_files,
345                                        std::string* oat_filename,
346                                        std::string* error_msg);
347 
348   // Computes the dex location and vdex filename. If the data directory of the process
349   // is known, creates an absolute path in that directory and tries to infer path
350   // of a corresponding vdex file. Otherwise only creates a basename dex_location
351   // from the combined checksums. Returns true if all out-arguments have been set.
352   //
353   // Calling this function requires an active runtime.
354   static bool AnonymousDexVdexLocation(const std::vector<const DexFile::Header*>& dex_headers,
355                                        InstructionSet isa,
356                                        /* out */ std::string* dex_location,
357                                        /* out */ std::string* vdex_filename);
358 
359   // Returns true if a filename (given as basename) is a name of a vdex for
360   // anonymous dex file(s) created by AnonymousDexVdexLocation.
361   static bool IsAnonymousVdexBasename(const std::string& basename);
362 
363   bool ClassLoaderContextIsOkay(const OatFile& oat_file) const;
364 
365   // Validates the boot class path checksum of an OatFile.
366   bool ValidateBootClassPathChecksums(const OatFile& oat_file);
367 
368   // Validates the given bootclasspath and bootclasspath checksums found in an oat header.
369   static bool ValidateBootClassPathChecksums(OatFileAssistantContext* ofa_context,
370                                              InstructionSet isa,
371                                              std::string_view oat_checksums,
372                                              std::string_view oat_boot_class_path,
373                                              /*out*/ std::string* error_msg);
374 
375  private:
376   class OatFileInfo {
377    public:
378     // Initially the info is for no file in particular. It will treat the
379     // file as out of date until Reset is called with a real filename to use
380     // the cache for.
381     // Pass true for is_oat_location if the information associated with this
382     // OatFileInfo is for the oat location, as opposed to the odex location.
383     OatFileInfo(OatFileAssistant* oat_file_assistant, bool is_oat_location);
384 
385     bool IsOatLocation();
386 
387     const std::string* Filename();
388 
389     const char* DisplayFilename();
390 
391     // Returns true if this oat file can be used for running code. The oat
392     // file can be used for running code as long as it is not out of date with
393     // respect to the dex code or boot image. An oat file that is out of date
394     // with respect to relocation is considered useable, because it's possible
395     // to interpret the dex code rather than run the unrelocated compiled
396     // code.
397     bool IsUseable();
398 
399     // Returns the status of this oat file.
400     OatStatus Status();
401 
402     // Return the DexOptNeeded value for this oat file with respect to the given target compilation
403     // filter and dexopt trigger.
404     DexOptNeeded GetDexOptNeeded(CompilerFilter::Filter target_compiler_filter,
405                                  const DexOptTrigger dexopt_trigger);
406 
407     // Returns the loaded file.
408     // Loads the file if needed. Returns null if the file failed to load.
409     // The caller shouldn't clean up or free the returned pointer.
410     const OatFile* GetFile();
411 
412     // Returns true if the file is opened executable.
413     bool IsExecutable();
414 
415     // Clear any cached information about the file that depends on the
416     // contents of the file. This does not reset the provided filename.
417     void Reset();
418 
419     // Clear any cached information and switch to getting info about the oat
420     // file with the given filename.
421     void Reset(const std::string& filename,
422                bool use_fd,
423                int zip_fd = -1,
424                int vdex_fd = -1,
425                int oat_fd = -1);
426 
427     // Release the loaded oat file for runtime use.
428     // Returns null if the oat file hasn't been loaded or is out of date.
429     // Ensures the returned file is not loaded executable if it has unuseable
430     // compiled code.
431     //
432     // After this call, no other methods of the OatFileInfo should be
433     // called, because access to the loaded oat file has been taken away from
434     // the OatFileInfo object.
435     std::unique_ptr<OatFile> ReleaseFileForUse();
436 
437     // Check if we should reject vdex containing cdex code as part of the
438     // disable_cdex experiment.
439     // TODO(b/256664509): Clean this up.
440     bool CheckDisableCompactDexExperiment();
441 
442    private:
443     // Returns true if the oat file is usable but at least one dexopt trigger is matched. This
444     // function should only be called if the oat file is usable.
445     bool ShouldRecompileForFilter(CompilerFilter::Filter target,
446                                   const DexOptTrigger dexopt_trigger);
447 
448     // Release the loaded oat file.
449     // Returns null if the oat file hasn't been loaded.
450     //
451     // After this call, no other methods of the OatFileInfo should be
452     // called, because access to the loaded oat file has been taken away from
453     // the OatFileInfo object.
454     std::unique_ptr<OatFile> ReleaseFile();
455 
456     OatFileAssistant* oat_file_assistant_;
457     const bool is_oat_location_;
458 
459     bool filename_provided_ = false;
460     std::string filename_;
461 
462     int zip_fd_ = -1;
463     int oat_fd_ = -1;
464     int vdex_fd_ = -1;
465     bool use_fd_ = false;
466 
467     bool load_attempted_ = false;
468     std::unique_ptr<OatFile> file_;
469 
470     bool status_attempted_ = false;
471     OatStatus status_ = OatStatus::kOatCannotOpen;
472 
473     // For debugging only.
474     // If this flag is set, the file has been released to the user and the
475     // OatFileInfo object is in a bad state and should no longer be used.
476     bool file_released_ = false;
477   };
478 
479   // Return info for the best oat file.
480   OatFileInfo& GetBestInfo();
481 
482   // Returns true when vdex/oat/odex files should be read from file descriptors.
483   // The method checks the value of zip_fd_, and if the value is valid, returns
484   // true. This is required to have a deterministic behavior around how different
485   // files are being read.
486   bool UseFdToReadFiles();
487 
488   // Returns true if the dex checksums in the given oat file are up to date
489   // with respect to the dex location. If the dex checksums are not up to
490   // date, error_msg is updated with a message describing the problem.
491   bool DexChecksumUpToDate(const OatFile& file, std::string* error_msg);
492 
493   // Return the status for a given opened oat file with respect to the dex
494   // location.
495   OatStatus GivenOatFileStatus(const OatFile& file);
496 
497   // Gets the dex checksums required for an up-to-date oat file.
498   // Returns cached_required_dex_checksums if the required checksums were located. Returns an empty
499   // list if `dex_location_` refers to a zip and there is no dex file in it. Returns nullptr if an
500   // error occurred. The caller shouldn't clean up or free the returned pointer.
501   const std::vector<uint32_t>* GetRequiredDexChecksums(std::string* error_msg);
502 
503   // Returns whether there is at least one boot image usable.
504   bool IsPrimaryBootImageUsable();
505 
506   // Returns the trigger for the deprecated overload of `GetDexOptNeeded`.
507   //
508   // Deprecated. Do not use in new code.
509   DexOptTrigger GetDexOptTrigger(CompilerFilter::Filter target_compiler_filter,
510                                  bool profile_changed,
511                                  bool downgrade);
512 
513   // Returns the pointer to the owned or unowned instance of OatFileAssistantContext.
GetOatFileAssistantContext()514   OatFileAssistantContext* GetOatFileAssistantContext() {
515     if (std::holds_alternative<OatFileAssistantContext*>(ofa_context_)) {
516       return std::get<OatFileAssistantContext*>(ofa_context_);
517     } else {
518       return std::get<std::unique_ptr<OatFileAssistantContext>>(ofa_context_).get();
519     }
520   }
521 
522   // The runtime options taken from the active runtime or the input.
523   //
524   // All member functions should get runtime options from this variable rather than referencing the
525   // active runtime. This is to allow OatFileAssistant to function without an active runtime.
GetRuntimeOptions()526   const OatFileAssistantContext::RuntimeOptions& GetRuntimeOptions() {
527     return GetOatFileAssistantContext()->GetRuntimeOptions();
528   }
529 
530   // Returns whether the zip file only contains uncompressed dex.
531   bool ZipFileOnlyContainsUncompressedDex();
532 
533   std::string dex_location_;
534 
535   // The class loader context to check against, or null representing that the check should be
536   // skipped.
537   ClassLoaderContext* context_;
538 
539   // Whether or not the parent directory of the dex file is writable.
540   bool dex_parent_writable_ = false;
541 
542   // In a properly constructed OatFileAssistant object, isa_ should be either
543   // the 32 or 64 bit variant for the current device.
544   const InstructionSet isa_ = InstructionSet::kNone;
545 
546   // Whether we will attempt to load oat files executable.
547   bool load_executable_ = false;
548 
549   // Whether only oat files from trusted locations are loaded executable.
550   const bool only_load_trusted_executable_ = false;
551 
552   // Cached value of whether the potential zip file only contains uncompressed dex.
553   // This should be accessed only by the ZipFileOnlyContainsUncompressedDex() method.
554   bool zip_file_only_contains_uncompressed_dex_ = true;
555 
556   // Cached value of the required dex checksums.
557   // This should be accessed only by the GetRequiredDexChecksums() method.
558   std::optional<std::vector<uint32_t>> cached_required_dex_checksums_;
559   std::string cached_required_dex_checksums_error_;
560   bool required_dex_checksums_attempted_ = false;
561 
562   // The AOT-compiled file of an app when the APK of the app is in /data.
563   OatFileInfo odex_;
564   // The AOT-compiled file of an app when the APK of the app is on a read-only partition
565   // (for example /system).
566   OatFileInfo oat_;
567 
568   // The vdex-only file next to `odex_` when `odex_' cannot be used (for example
569   // it is out of date).
570   OatFileInfo vdex_for_odex_;
571   // The vdex-only file next to 'oat_` when `oat_' cannot be used (for example
572   // it is out of date).
573   OatFileInfo vdex_for_oat_;
574 
575   // The vdex-only file next to the apk.
576   OatFileInfo dm_for_odex_;
577   OatFileInfo dm_for_oat_;
578 
579   // File descriptor corresponding to apk, dex file, or zip.
580   int zip_fd_;
581 
582   // Owned or unowned instance of OatFileAssistantContext.
583   std::variant<std::unique_ptr<OatFileAssistantContext>, OatFileAssistantContext*> ofa_context_;
584 
585   friend class OatFileAssistantTest;
586 
587   DISALLOW_COPY_AND_ASSIGN(OatFileAssistant);
588 };
589 
590 std::ostream& operator << (std::ostream& stream, const OatFileAssistant::OatStatus status);
591 
592 }  // namespace art
593 
594 #endif  // ART_RUNTIME_OAT_FILE_ASSISTANT_H_
595