Create new Partition in any Android with SGDisk library & TWRP recovery
In this tutorial I'm tell you guys how I'm repartition my Android 7 device. And create a new partition vendor. Guys you can also use this guide to repartition your ARM Android device. In this guide I'm use Karbonn A41 Power. The Karbonn a41 has 4 inch display, 1GB Ram,8gb internal & Spreadtrum SC9832A Quad Core 1.3Ghz Cpu. so let's get start
Warning : I'm not responsible for what you do to your Device. This guide is 100% genuine.but you do something wrong with device all responsibility is yours.
whats you needed =
lets do it,
first you need to reboot your device to twrp. copy sgdisk file to device /system/xbin location .[ remember one thing if you are going to resize system partition then don't store sgdisk file in /system/xbin you need to place that file inside the twrp img ]
whats you needed =
- A PC with adb / fastboot tool install [ you can do it on twrp terminal ]
- your device with twrp
- SGDisk binary file : Google it / I used from this zip file= https://pheecith.com/1uea alternative Link
first you need to reboot your device to twrp. copy sgdisk file to device /system/xbin location .[ remember one thing if you are going to resize system partition then don't store sgdisk file in /system/xbin you need to place that file inside the twrp img ]
For those who want to know "How to place 'sgdisk' file in twrp ?"
For this this you need AIK tool [ Search in xda for latest version ] and your Device TWRP img file. After that , run Android image kitchen and extract your TWRP image. After successful extraction go to Android_Image_kitchen/Ramdisk folder and then open sbin folder. Now copy sgdisk file and paste it in sbin folder. Repack twrp img using AIK tool and flash img to your Device using TWRP or fastboot. [ Tip = Never FCUK with recovery partition, i repeat Never FCUK with recovery partition ]
now on pc open terminal [ if you don't have PC then use TWRP Terminal it's working same as PC ]. and run command adb shell hit enter [adb shell command is only for pc terminal 🙂]
after press adb shell command , terminal go in shell command mode.
Next step is you need to check how many partiton have in device mmc so enter the command from the box
sgdisk --print /dev/block/mmcblk0
after this command you will get this screen
you can see there are many partitions here, but only userdata,system and cache partition are big in size. in this tutorial im create a New Vendor partiton so im using 500MB from userdata partition , so we need to delete userdata partition.
enter this command:
sgdisk --delete=25 /dev/block/mmcblk0
this command delete 25 no partition [my userdata partition. Your is different]. now we need to create new partition vendor , with 500MB size and ext4 filesystem.
enter this command =
sgdisk --new=25:4923392:+500M /dev/block/mmcblk0
[note=4923392 is start sector size of 25 no partition & your device sector size is deffernt / Look at Screenshot]. new partition created now we need to rename this partition to vendor
enter this command =
sgdisk --change-name=25:vendor /dev/block/mmcblk0
after renaming of partition change permission of the partition to 0700 so
Enter this =
sgdisk --typecode=25:0700 /dev/block/mmcblk0vendor partition created successfuly now create userdata partition from free memory . find userdata start sector size how ?
run this command = sgdisk --print /dev/block/mmcblk0
vendor end sector size+1 = userdata partition start sector size 5971967+1=5971968[ end sector size is old one userdata partition sector end size/ look at userdata end sector size in First screenshot] is userdata start sectore size so now create userdata enter this command
sgdisk --new=26:5971968:14942174 /dev/block/mmcblk0
this will created partition now rename this
sgdisk --change-name=26:userdata /dev/block/mmcblk0
after this change permission Command =
sgdisk --typecode=26:0700 /dev/block/mmcblk0
now format both partition one-by-one to ext4 file system. run this=
make_ext4fs /dev/block/mmcblk0p25
after this run
Done, now check is there partitions created or not by running this command
make_ext4fs /dev/block/mmcblk0p26
Done, now check is there partitions created or not by running this command
sgdisk --print /dev/block/mmcblk0You can see the partition table with updated partitions you created here. Now you can exit the terminal process by running exit
now type exit in terminal and press enter =
exit
Conclusion:
You can successfully repartition any Android device. Some devices not supported TWRP custom recovery. we can't help you on that. devices needed to unlock Bootloader to flash custom Recovery. So only who know what are you doing this can use this guide.
This tutorial tested & working on my smartphone having mtk CPU, I'm try this on mtk 6737m smartphone having 1gb ram 8gb storage.
https://unifiedmarathi.blogspot.com
ReplyDelete