Skip to content

Instantly share code, notes, and snippets.

@wqyeo
Created November 12, 2023 07:33
Show Gist options
  • Select an option

  • Save wqyeo/2e15736f9c93581883ea1cbf5e78b8ff to your computer and use it in GitHub Desktop.

Select an option

Save wqyeo/2e15736f9c93581883ea1cbf5e78b8ff to your computer and use it in GitHub Desktop.
[GenyMotion] Increase internal Storage Space

TLDR;

Increase the storage space of android_data_disk.vmdk.

Increasing Internal Space

GenyMotion gives all Android Phones ~13GB of storage space by default, first, increase the storage size of android_data_disk.vmdk...

For this entire guide, I will be increasing the storage space to 64GB, so you will have to adjust some values to your needs.

Increase VMDK size with VirtualBox Media Tool

For this guide, I am using VirtualBox Media Tool. You may use another tool if you wish.

virtualbox-app-launch-menu

virtualbox-media-tool-app

NOTE, you can't resize vmdk files directly. You need to copy android_data_disk.vmdk as vdi, then you can resize it to any size.
Finally, you need copy disk again into vmdk format.

copy-disk

copy-disk-dialogs

add-vdi

change-vdi-size

apply-vdi-size

NOTE, remember to copy it back as vmdk...

vmdk-64gb

Change Volume of Internal Space

The volume of internal space depends on metadata of written filesystem.
A VM is needed to manipulate filesystem metadata.
Attach 64 GB vmdk as storage in VM settings dialogue to have access to 64 gb vmdk disk layout and filesystem.

I used Ubuntu in live mode inside the VM.

ubuntu-live-mode-settings

Resizing filesystem is very easy process:

  • Run VM

  • If using live mode, just select the try <OS> option...

  • Run disks utility (For ubuntu)

  • Might be different depending on OS used.

  • Check device name of 3rd partition on VBOX HARDDISK, it should be the largest partition

  • Then, execute following commands:

  • sudo su -

  • e2fsck -f <device name> where <device name> is usually /dev/sda3

  • resize2fs <device name> <new size>; where is usually /dev/sda3 and <new size> supposed to be 60G

resize2fs-guide

Setup Android VM with new Internal Storage

Replace in VM settings on storage tab android_data_disk.vmdk by new resized android_data_disk_64gb.vmdk.

android-vm-storage-setting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment