diff options
author | Doug Zongker <dougz@android.com> | 2010-09-21 16:12:55 -0700 |
---|---|---|
committer | Doug Zongker <dougz@android.com> | 2010-09-21 16:12:55 -0700 |
commit | 33a4b08b151d2dedd67f41a4b25b297163795628 (patch) | |
tree | 82672e511f88bbda9e9659db3f4303e8fcf7a44f /tools | |
parent | 9ce0fb6e59415669074896cfa01e1f0cf97979b7 (diff) | |
download | build-33a4b08b151d2dedd67f41a4b25b297163795628.zip build-33a4b08b151d2dedd67f41a4b25b297163795628.tar.gz build-33a4b08b151d2dedd67f41a4b25b297163795628.tar.bz2 |
fall back to MTD if no recovery.fstab is present
Needed for non-device builds (like for the emulator) to work.
Change-Id: I5fdbfb3af34821811744e8ce5bf1eff8df344c73
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/releasetools/img_from_target_files | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/releasetools/img_from_target_files b/tools/releasetools/img_from_target_files index 1447b16..7a32621 100755 --- a/tools/releasetools/img_from_target_files +++ b/tools/releasetools/img_from_target_files @@ -61,10 +61,11 @@ def AddUserdata(output_zip): img = tempfile.NamedTemporaryFile() build_command = [] - if OPTIONS.info_dict["fstab"]["/data"].fs_type.startswith("ext"): + fstab = OPTIONS.info_dict["fstab"] + if fstab and fstab["/data"].fs_type.startswith("ext"): build_command = ["mkuserimg.sh", user_dir, img.name, - OPTIONS.info_dict["fstab"]["/data"].fs_type, "userdata"] + fstab["/data"].fs_type, "userdata"] if "userdata_size" in OPTIONS.info_dict: build_command.append(str(OPTIONS.info_dict["userdata_size"])) else: @@ -109,10 +110,11 @@ def AddSystem(output_zip): pass build_command = [] - if OPTIONS.info_dict["fstab"]["/system"].fs_type.startswith("ext"): + fstab = OPTIONS.info_dict["fstab"] + if fstab and fstab["/system"].fs_type.startswith("ext"): build_command = ["mkuserimg.sh", os.path.join(OPTIONS.input_tmp, "system"), img.name, - OPTIONS.info_dict["fstab"]["/system"].fs_type, "system"] + fstab["/system"].fs_type, "system"] if "system_img" in OPTIONS.info_dict: build_command.append(str(OPTIONS.info_dict["system_size"])) else: |