User:Sergiotarxz
Appearance
I am a programmer that happens to love using computers and phones in freedom.
sergiotarxz@owlcode.tech in XMPP.
I own these devices
Bardock Pro
OnePlus 6
Backup of instructions to shrink userdata for enchilada.
Keeping Android
Shrinking the UserData partition is required to free up space for any custom partition.
TODO: Figure out the minimum size of the UserData partition. |
Example way to shrink userdata:
- Boot into TWRP the device using fastboot boot. Example:
adb reboot bootloader
fastboot boot twrp-3.7.0_11-0-enchilada.img
- Get the correct date to use in TWRP:
date --iso=seconds -u | sed -e 's/\+.*$//'
- Unlock TWRP to allow it to make changes to
the device and run the following:
adb shell
date [The date you got before in the host] SET
sgdisk --print
- Take note of the offsets of userdata and the desired new size and repartition as you like.
This step shouldn't cause data loss but can cause data loss, ensure having a proper backup that you can actually restore in case of disaster. Removing the Google account and the password/pincode/pattern/whatever from Android before this step is very recommendable so if you need to factory reset after it you can do it in a easier way. Example:
resize2fs /dev/block/sda17 55G
sgdisk --delete=17 /dev/block/sda
sgdisk --new=17:1601344:+56G /dev/block/sda
sgdisk --change-name=17:userdata /dev/block/sda
resize2fs /dev/block/sda17