diff --git a/tools/releasetools/apex_utils.py b/tools/releasetools/apex_utils.py index 40f7c92deb..d52370194d 100644 --- a/tools/releasetools/apex_utils.py +++ b/tools/releasetools/apex_utils.py @@ -626,7 +626,7 @@ def GetApexInfoFromTargetFiles(input_file, partition, compressed_only=True): if os.path.isfile(deapexer_path): deapexer = deapexer_path - for apex_filename in os.listdir(target_dir): + for apex_filename in sorted(os.listdir(target_dir)): apex_filepath = os.path.join(target_dir, apex_filename) if not os.path.isfile(apex_filepath) or \ not zipfile.is_zipfile(apex_filepath):