INNER CODE UNIT · Python

mount

casualsnek/waydroid_script · main.py:34

def mount(partition, copy_dir):
    img = os.path.join(images.get_image_dir(), partition+".img")
    mount_point = ""
    if partition == "system":
        mount_point = os.path.join(copy_dir)
    else:
        mount_point = os.path.join(copy_dir, partition)
    Logger.info("Mounting {} to {}".format(img, mount_point))
    images.mount(img, mount_point)


def resize(partition):
    img = os.path.join(images.get_image_dir(), partition+".img")
    img_size = int(os.path.getsize(img)/(1024*1024))
    new_size = "{}M".format(img_size+500)
    Logger.info("Resizing {} to {}".format(img, new_size))
    images.resize(img, new_size)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…