summaryrefslogtreecommitdiffstats
path: root/releasetools
diff options
context:
space:
mode:
authorCaio Schnepper <caioschnepper@gmail.com>2015-05-01 23:55:43 -0300
committerCaio Schnepper <caioschnepper@gmail.com>2015-05-28 18:29:17 -0300
commitecc3d13410f7821659f7cc1ef806dfb9378853a3 (patch)
tree6861390f0f9cdda0429aaa2b0252137a675eb85b /releasetools
parente3591e7a641044f28598dfe628c4e0d46d3d7435 (diff)
downloaddevice_samsung_galaxys2-common-ecc3d13410f7821659f7cc1ef806dfb9378853a3.zip
device_samsung_galaxys2-common-ecc3d13410f7821659f7cc1ef806dfb9378853a3.tar.gz
device_samsung_galaxys2-common-ecc3d13410f7821659f7cc1ef806dfb9378853a3.tar.bz2
galaxys2: initial L bringup
Change-Id: Ia356da8437917be3355eba59c1df3943bb33f905
Diffstat (limited to 'releasetools')
-rwxr-xr-xreleasetools/galaxys2_ota_from_target_files22
1 files changed, 11 insertions, 11 deletions
diff --git a/releasetools/galaxys2_ota_from_target_files b/releasetools/galaxys2_ota_from_target_files
index c581b32..dbc945a 100755
--- a/releasetools/galaxys2_ota_from_target_files
+++ b/releasetools/galaxys2_ota_from_target_files
@@ -20,6 +20,8 @@ import galaxys2_common as common
LOCAL_DIR = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
RELEASETOOLS_DIR = os.path.abspath(os.path.join(LOCAL_DIR, '../../../build/tools/releasetools'))
+TARGET_DIR = os.getenv('OUT')
+
# Add releasetools directory to python path
sys.path.append(RELEASETOOLS_DIR)
@@ -34,10 +36,7 @@ import galaxys2_edify_generator as edify_generator
__doc__ = ota_from_target_files.__doc__
def CopyBootFiles(input_zip, output_zip):
- boot_img = common.GetBootableImage("boot.img", "boot.img",
- OPTIONS.input_tmp, "BOOT")
- common.CheckSize(boot_img.data, "boot.img", OPTIONS.info_dict)
- common.ZipWriteStr(output_zip, "boot.img", boot_img.data)
+ output_zip.write(os.path.join(TARGET_DIR, "boot.img"),"boot.img")
def WriteFullOTAPackage(input_zip, output_zip):
# TODO: how to determine this? We don't know what version it will
@@ -62,7 +61,8 @@ def WriteFullOTAPackage(input_zip, output_zip):
metadata=metadata,
info_dict=OPTIONS.info_dict)
- AppendAssertions(script, OPTIONS.info_dict)
+ system_items = ItemSet("system", "META/filesystem_config.txt")
+ AppendAssertions(script, device_specific.info_dict)
device_specific.FullOTA_Assertions()
if OPTIONS.backuptool:
script.Mount("/system")
@@ -73,20 +73,20 @@ def WriteFullOTAPackage(input_zip, output_zip):
if OPTIONS.wipe_user_data:
script.FormatPartition("/data")
+ script.Unmount("/system")
- script.Unmount("/system")
script.FormatPartition("/system")
script.Mount("/system")
script.UnpackPackageDir("recovery", "/system")
script.UnpackPackageDir("system", "/system")
- symlinks = CopySystemFiles(input_zip, output_zip)
+ symlinks = CopyPartitionFiles(system_items, input_zip, output_zip)
script.MakeSymlinks(symlinks)
CopyBootFiles(input_zip, output_zip)
- Item.GetMetadata(input_zip)
- Item.Get("system").SetPermissions(script)
+ system_items.GetMetadata(input_zip)
+ system_items.Get("system").SetPermissions(script)
script.ShowProgress(0.2, 0)
@@ -95,7 +95,7 @@ def WriteFullOTAPackage(input_zip, output_zip):
script.RunBackup("restore")
script.ShowProgress(0.2, 10)
- script.EMMCWriteRawImage("/dev/block/mmcblk0p5", "boot.img")
+ script.WriteRawImage("/boot", "boot.img")
script.ShowProgress(0.1, 0)
device_specific.FullOTA_InstallEnd()
@@ -104,7 +104,7 @@ def WriteFullOTAPackage(input_zip, output_zip):
script.AppendExtra(OPTIONS.extra_script)
script.UnmountAll()
- script.AddToZip(input_zip, output_zip)
+ script.AddToZip(input_zip, output_zip, input_path=OPTIONS.updater_binary)
WriteMetadata(metadata, output_zip)
ota_from_target_files.WriteFullOTAPackage = WriteFullOTAPackage