Android - Resizing the /data partition (rooted)
As GiantTree correctly pointed out, That not mounted space might be something the device uses in something like an emergency mode to restore the device. More precisely: it not only might be, but it is. Your df
output e.g. doesn't say anything about the /recovery
or /boot
partitions. And there are even more we are not aware of.
Another argument against re-sizing: You won't be able to install any Android updates anymore, as those often come as "images" to flash (replacing entire file systems) – which then no longer would match the partition size, causing the update to fail to flash at best, or bricking your device at worst.
If app2sd no longer gives you enough freedom, you can take a look at link2sd – which is able to not only move the entire app to your device's external SD card (App2SD only moves parts), but can even move more, such as their data files and libraries.
For some more background, take a look at the link2sd tag-wiki, and also the app2sd tag-wiki.
You should never ever resize any partitions on Android. That not mounted space might be something the device uses in something like an emergency mode to restore the device. Moving apps to SD does not do anything because the SD you are moving the files from /data/app to some hidden folder inside /data/media (your "SD").
You might want to either uninstall some apps, use some weird method to swap internal SD and your external SD or check if you had an app already installed and check for left files or folders in /data/data and search for the package name.
Sorry for the necropost, but there is and always has been a way to do this if a user wants to. The previous comments are correct, there are more "hidden" partitions present that are not easily seen or manipulated from Windows or Android local installs so what you have to do is have a look at the drive from an outside perspective using a tool that recognizes many file systems. In my experience the best way to do that is by using GParted (live image available here)
Use a tool such as Rufus to create a bootable USB stick using the GParted live image, and then boot to it (using a USB hub and OTG cable if necessary for keyboard, mouse, etc). I prefer the graphical interface, but GParted is also usable via command line. Once booted into the graphical interface (requires the user to type startx
where prompted), GParted will automatically run and analyze all partitions and eventually give you a comprehensive display of their configuration. As it is Linux-based and you're automatically logged in as superuser you are now in full control as far as any hdd or partition in the machine (tablets, phones, PCs, size and shape doesn't matter) and you can see all hidden partitions. For the record GParted is intended for variations of x86 architecture but may work on other devices as well via built-in emulation so always worth a shot at least IMO.
With God-like power comes God-like responsibility so
1) I'm not responsible for what happens if this screws the pooch on you and
2) BE CAREFUL WHAT YOU DO INSIDE GPARTED. VERY VERY CAREFUL.
That said, if you find a partition while analyzing via GParted that is of any usable size which is marked as unallocated you can trust it. In my experience it sees all and I've never heard otherwise from anyone else. If there is space you can move it so that it's next to the partition you want to expand and then expand to encompass that space. I just did this last night on a Chuwi Vi8 that I no longer wanted Windows on (it came as dual-OS). I deleted the Windows partition and added it to Android's data partition, giving me 22GB of glorious, fully-usable space.
I found this thread while refreshing on all the steps needed and noticed that no method had been shared. I can attest it does work, but I only recommend it for advanced users and I can't say that it won't interfere with full-OS upgrades in the future as was already stated. Running GParted as a live Linux distro is a great tool that is very comprehensive and exceedingly powerful.