Moto G is one of the best-sellers of 2014 and is termed as the profitable device in the mid-tier price category. The original Moto G which was released in 2013 is a fixed storage device that comes in 8 GB/16 GB variants. However, following the huge popularity of the original Moto G, the OEM launched their second generation Moto G devices in 2014 with a larger screen and expandable storage capabilities at the same price. Most of the original Moto G users are bugged by the limited storage which prevents them from using large apps on their devices. Since it’s a hardware related feature, there is nothing much to work in that area but Bert98 of XDA took some time to free up 600 MB on by relocating Dalvik cache on Moto G.

As you might have observed, the actual storage of the device is much lesser than on the paper. For instance, the 8 GB Moto G variant shows only 5.7 GB as user-available space and the rest of the space is used for different partitions and normalization. Bert98 of XDA is kind enough to investigate a loophole to free up some space on your Moto G. For those who don’t know, Moto G hosts a 600 MB partition for the cache which is not used by the device as the Dalvik cache is stored in /data partition. Since the Moto G uses the internal storage as shared memory for both apps and user files, freeing up 600 MB makes some room for your favorite music and video files.

In this process, you will relocate the Dalvik cache files to the /cache partition which will free up around 600 MB on your device. However, you should remember that this mod works only for the devices that are running on traditional Dalvik cache engine rather than the optional ART engine on KitKat. Some of the folks at XDA reported few issues using this mod but thanks to of XDA for providing an automated script file and the instructions to use it on both stock and custom ROMs.

As you can expect, this process requires root permissions on your device along with a custom recovery like CWM or TWRP which will take adb commands in recovery mode. Apart from these, you will need a decent text editor on your PC and the USB debugging enabled on your device. It’s recommended that you take a nandroid backup of your device in case of any misfortunes. Download the script file from the download link below and follow the instructions depending on the ROM you are using on your device. If you’re all set for the job, let’s get along with the tinkering business.

Relocating Dalvik Cache on Moto G Stock Firmware

Download the script file and extract the contents of the zip on your PC. You’ll get the similar files on your PC:

Connect the device to your PC using a USB cable and make sure you’ve enabled USB debugging in the device settings. Double click the cachemover_Stock.bat to run the script. Follow the onscreen instructions on the script until you encounter the part where you’re required to edit a file. During the process, the script pulls a file called the init.qcom.post_boot.sh to the PC for editing. Open the file using any text editor (Notepad++ is recommended) and navigate to about line 487 on 16 GB variant. You can relate to the 8 GB model using the code snippet below:

As highlighted in the above image, paste the following code at the relevant place: chmod 655 /cache chmod 655 /cache/dalvik-cache chmod 655 /cache/dalvik-cache/* Save the file after tweaking the code and make sure it is in the same folder as the cachemover_Stock.bat. Press any key on your keyboard to continue with the script. The device will reboot several times during the process.

That’s it, at the end of the process you can notice the additional 600 MB space on your (may be less based on the number of applications installed on your device) Moto G.

Note: If the script hangs after the reboot, you need to unlock the device to re-establish the adb connection with your PC. There might also be a few force closes after the first boot but once you close the notification of the crashes, everything will go back to normal without any issue in the future.

If anything goes wrong during this process, follow the below instructions to restore your device back to normal.

The script makes a backup of the init.qcom.post_boot.sh file to /sdcard/init_backup folder. So all you need to do is to restore the file to the /system/etc directory and assign proper permissions. Copy the init.qcom.post_boot.sh file from the /sdcard/init_backup folder and paste it in the /system/etc folder. If prompted, grant root permission to the root browser app. Now all you need to do is to assign proper permissions to the file. To do this, use the Terminal Emulator app and execute the following commands one by one: chmod 740 /system/etc/init.qcom.post_boot.sh chown root:root /system/etc/init.qcom.post_boot.sh That’s it, reboot the device for the changes to apply on your device.

Instructions to Move Dalvik on Moto G

This method is suitable for the devices which are running on custom Android builds that do not remount or change permissions of the /cache on every boot. If your ROM falls into this category, follow the below given procedure:

Download the script file and extract the contents of the zip on your PC. Connect the device to your PC using a USB cable and make sure you’ve enabled USB debugging in the device settings. Double click the cachemover.bat to run the script. Follow the onscreen instructions on the script and your device might boot several times during the process.

It’s pretty easy to use this mod on the custom ROMs, right? Restoring back to normal is even simpler, just connect your device to the PC and run the restorecache.bat script which will automatically restore your device to a normal state.

You just relocated the Dalvik cache on Moto G and can now enjoy more free space. The restored space might not be exactly 600 MB due to various reasons but something is better than nothing, right?

Let us know of any issue during the process in the comments section below.

Read Next: How to Remove Guest Account Feature on Android