[Q&A] [TUTORIAL] Increase data partition

Search This thread

Leehm0123

Member
Jun 8, 2015
39
1
a1_2013_3_18_x1bq9vd22f.jpg

That is only for mount and unmount only...
I say the code==In step 4
 
Sep 23, 2014
29
0
Cochin
I cant use adb command

When I tried the command "adb shell" its showing the error "error: device '(null)' not found".I am in twrp recovery.
Please help.sorry for may bad english.
 
May 7, 2015
5
0
ADB not showing in recovery

The device is working on adb when booted normally and its also entering shell but when i boot in recovery its not found by adb. Pls help.
 

mirhl

Senior Member
Oct 15, 2012
3,129
1,171
The device is working on adb when booted normally and its also entering shell but when i boot in recovery its not found by adb. Pls help.
Your computer may recognize the phone differently there. Check in device manager for adb driver (not composite one)

Sent from my Xperia S using XDA Free mobile app
 

mpulock

Senior Member
Feb 7, 2014
147
23
Samsung Galaxy S21
I still cannot do anything after I installed the android SDK

You don't have to write (PC) or (ADB shell) or any other codes in the bracket. Just copy and paste like this :

adb shell
fdisk /dev/block/mmcblk0
p
.............


Then, Go to TWRP, and go to TWRP's mount and uncheck EVERYTHING

and, proceed from step 3. and go on. Best of luck. Don't worry. If anything goes wrong, there is always stock FTF and flashtool. :fingers-crossed:

P.S. : 'Step 7' may become tricky. Let me know, if you find any difficulties.
 

resudiordna

Member
Jul 12, 2015
9
1
I tried to increase my system partition using the method described by @mirhl , but now I can't mount my sdcard anymore and Android won't start correctly: it's booting up, then I get a "Encryption unsuccessful" message.

I followed those steps:
  • start recovery mode
  • unmount Cache / SDcard
  • advanced -> terminal
  • print the partition table:
    echo p | fdisk /dev/block/mmcblk0
  • note the start sector of partition14:
    /dev/block/mmcblk0p14: 42945 - 108480 (2097152 83)
    /dev/block/mmcblk0p15: 108481 - 954240 (27064320 c)
  • use it in this command and note the end sector of partition14:
    echo -e "d\n15\nd\n14\nn\n42945\n+5120M\np\nq" | fdisk /dev/block/mmcblk0
    (increase that partion (42945) by 5120M = 5GB)
  • end partition 14: 199195 -> start partition 15: 199196
    echo -e "d\n15\nd\n14\nn\n42945\n+5120M\nn\n199196\n\nt\n15\nc\nw" | fdisk /dev/block/mmcblk0
  • mount Cache / Sdcard

When I could not start any more, I tried to revert those changes with:
echo -e "d\n15\nd\n14\nn\n42945\n+65535\np\nq" | fdisk /dev/block/mmcblk0
echo -e "d\n15\nd\n14\nn\n42945\n+65535\nn\n108481\n\nt\n15\nc\nw" | fdisk /dev/block/mmcblk0

But it's still not working :(
Any ideas?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    i have installed android sdk along with sony drivers
    what is boot into twrp? should i go into twrp recovery?
    get a shell means?
    or you could give me your email address?
    Reboot the phone and press the Volume+ button when the led flashes to enter into recovery. Now stay there...connect the phone to your computer. Open command prompt in Platform Tools. Start typing those commands. :)
    Btw my id is vishal.punk16@gmail.com
    1
    hi, i do what i read but when i flash rom to phone and starting phone after set up rom i had Encryption Unsuccessful - Reset Android
    error.
    Here are my shell codes. Sorry about my bad english :)
    Code:
    ~ # ←[6numount /sdcard
    umount /sdcard
    ~ # ←[6nfdisk /dev/block/mmcblk0
    fdisk /dev/block/mmcblk0
    
    The number of cylinders for this disk is set to 973824.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
       (e.g., DOS FDISK, OS/2 FDISK)
    
    Command (m for help): ←[6np
    p
    
    Disk /dev/block/mmcblk0: 31.9 GB, 31910264832 bytes
    4 heads, 16 sectors/track, 973824 cylinders
    Units = cylinders of 64 * 512 = 32768 bytes
    
                  Device Boot      Start         End      Blocks  Id System
    /dev/block/mmcblk0p1               1          65        2048  f0 Linux/PA-RISC b
    oot
    Partition 1 does not end on cylinder boundary
    /dev/block/mmcblk0p2   *          65          81         512  4d Unknown
    Partition 2 does not end on cylinder boundary
    /dev/block/mmcblk0p3             129         768       20480  48 Unknown
    Partition 3 does not end on cylinder boundary
    /dev/block/mmcblk0p4             769      954240    30511104   5 Extended
    Partition 4 does not end on cylinder boundary
    /dev/block/mmcblk0p5             785         800         512  46 Unknown
    /dev/block/mmcblk0p6             833         928        3072  4a Unknown
    /dev/block/mmcblk0p7             961        1056        3072  4b Unknown
    /dev/block/mmcblk0p8            1089        1184        3072  58 Unknown
    /dev/block/mmcblk0p9            1217        1376        5120  70 Unknown
    /dev/block/mmcblk0p10           1409        1664        8192  83 Linux
    /dev/block/mmcblk0p11           1665        2176       16384  f0 Linux/PA-RISC b
    oot
    /dev/block/mmcblk0p12           2177       34944     1048576  83 Linux
    /dev/block/mmcblk0p13          34945       42944      256000  83 Linux
    /dev/block/mmcblk0p14          42945      108480     2097152  83 Linux
    /dev/block/mmcblk0p15         108481      954240    27064320   c Win95 FAT32 (LB
    A)
    
    Command (m for help): ←[6nd
    d
    Partition number (1-15): ←[6n15
    15
    
    Command (m for help): ←[6nd
    d
    Partition number (1-14): ←[6n14
    14
    
    Command (m for help): ←[6nn
    n
    First cylinder (769-954240, default 769): ←[6n42945
    42945
    Last cylinder or +size or +sizeM or +sizeK (42945-954240, default 954240): ←[6n+
    8192M
    +8192M
    
    Command (m for help): ←[6np
    p
    
    Disk /dev/block/mmcblk0: 31.9 GB, 31910264832 bytes
    4 heads, 16 sectors/track, 973824 cylinders
    Units = cylinders of 64 * 512 = 32768 bytes
    
                  Device Boot      Start         End      Blocks  Id System
    /dev/block/mmcblk0p1               1          65        2048  f0 Linux/PA-RISC b
    oot
    Partition 1 does not end on cylinder boundary
    /dev/block/mmcblk0p2   *          65          81         512  4d Unknown
    Partition 2 does not end on cylinder boundary
    /dev/block/mmcblk0p3             129         768       20480  48 Unknown
    Partition 3 does not end on cylinder boundary
    /dev/block/mmcblk0p4             769      954240    30511104   5 Extended
    Partition 4 does not end on cylinder boundary
    /dev/block/mmcblk0p5             785         800         512  46 Unknown
    /dev/block/mmcblk0p6             833         928        3072  4a Unknown
    /dev/block/mmcblk0p7             961        1056        3072  4b Unknown
    /dev/block/mmcblk0p8            1089        1184        3072  58 Unknown
    /dev/block/mmcblk0p9            1217        1376        5120  70 Unknown
    /dev/block/mmcblk0p10           1409        1664        8192  83 Linux
    /dev/block/mmcblk0p11           1665        2176       16384  f0 Linux/PA-RISC b
    oot
    /dev/block/mmcblk0p12           2177       34944     1048576  83 Linux
    /dev/block/mmcblk0p13          34945       42944      256000  83 Linux
    /dev/block/mmcblk0p14          42945      292945     8000024  83 Linux
    
    Command (m for help): ←[6nn
    n
    First cylinder (769-954240, default 769): ←[6n292946
    292946
    Last cylinder or +size or +sizeM or +sizeK (292946-954240, default 954240): ←[6n
    
    Using default value 954240
    
    Command (m for help): ←[6nt
    t
    Partition number (1-15): ←[6n15
    15
    Hex code (type L to list codes): ←[6nc
    c
    Changed system type of partition 15 to c (Win95 FAT32 (LBA))
    
    Command (m for help): ←[6nw
    w
    The partition table has been altered.
    [B]Calling ioctl() to re-read partition table
    fdisk: WARNING: rereading partition table failed, kernel still uses old table: D
    evice or resource busy[/B]

    I faced the same problem. Instead of umount/sdcard in step 3, try unmounting everything except sdcard in twrp. Then give it a try again. It will work I think :)
    1
    Can anyone elaborate 'Step 7 - Create new data partition' , what should i write in cmd?

    (ADB SHELL/fdisk) n
    (First cylinder) -> you have to indicate the same start cylinder of partition 14 read in step 6 (What should I write here?)
    (Last cylinder) -> +8192M (this will create a 8gB partition)

    Thank you.
    After deleting the partitions 14 and 15. Creating a new partition. Write the start cylinder+1 of partition 13 as the start cylinder of the new partition. Then follow the process.

    Sent from my Xperia S using Tapatalk
    1
    step 11 ("wipe" data and sdcard to format your new partitions)is to do from twrp?
    during step 12((PC) adb push myrom.zip /sdcard/
    (PC) adb push gapps.zip /sdcard/) is there any need to assign the directory of rom in pc or just write the commands given in tutorial or i need to save the rom in c drive?
    If you want to use the commands to push as given in the tutorial, save the rom in the platform tools folder and assign them the same names. And yes wipe both in twrp. Hope this helps :)

    Sent from my Xperia S using Tapatalk
    1
    i follow the step but i gussed ididnt did it properly. when i first flash the room after the boot animation there was a error "encryption unsucessfull" i click on data reset but nothing happen. when i boot in to the recovery try to wipe date there was a error msg "E: unable to mount/data, E: unable to mount/sdcard. after trying many thing and googling for many hour i am able to mount data and my phone booted up perfectly but i cannot see my internal sdcard in storage and i am still not able to mount sd card through recovery.
    i follow the step again through ADB to see the data partition table there it is not showing partition no 15. i have attached the screen shot of that
    Start and stop cylinder of partition 14 are messed up. Start the process again. Delete the partition 14 and recreate both partitions 14 and 15 as given in the tutorial.
    (Remember to unmount the sdcard from the twrp which is step 3 in tutorial.)
    If you are able to save the partitions successfully after resizing, you can format the sdcard and data partitions. You can then transfer the rom and flash it.
    :)