[GUIDE] Increase internal storage for Grand i9082 - Galaxy Grand Duos i9082 General

Hi guys
today i am gonna guide you to increase internal storage of galaxy grand.
so first you need following things.
1. patience
2. computer with adb enabled.
3. galaxy grand i9082 with CWM or Philz or TWRP installed.
This procedure will wipe out your whole internal partition. means your all data on internal storage will be gone.
So make back up first.
This is dangerous procedure. needs advance knowledge.
1. So, first boot into recovery.
i think you guys know how to do that.
2. Connect PC and mobile
3. open terminal/CMD on PC/linux computer.
4. type following
PHP:
adb shell
5. Type
PHP:
cd /dev/block
parted mmcblk0
print
6. This looks like following
PHP:
print
Model: MMC M8G1WA (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 14.7MB 15.7MB 1049kB cal
2 15.7MB 16.0MB 262kB sysparm_dep
3 16.0MB 16.3MB 262kB parm-spml_dep
4 16.3MB 16.5MB 262kB RF_CAL_FILE
5 16.5MB 24.9MB 8389kB KERNEL
6 24.9MB 33.3MB 8389kB RECOVERY
7 33.3MB 53.0MB 19.7MB modem
8 53.0MB 86.2MB 33.3MB reserved
9 86.2MB 88.3MB 2097kB SBL1
10 88.3MB 90.4MB 2097kB SBL2
11 90.4MB 98.8MB 8389kB PARAM
12 98.8MB 99.4MB 524kB DTSBK
13 99.4MB 99.9MB 524kB DTS
14 99.9MB 108MB 8389kB VC-FirmwareBK
15 108MB 117MB 8389kB VC-Firmware
16 117MB 117MB 262kB FOTA_SIG
17 117MB 138MB 21.0MB ext4 efs
18 138MB 1212MB 1074MB ext4 CSC
19 1212MB 2822MB 1611MB ext4 system
20 2822MB 3409MB 587MB ext4 HIDDEN
21 3409MB 7813MB 4404MB ext4 data
7. last 4 partitions i.e number 18,19,20, 21 will be erased and repartitioned again.
this is dangerous step. dont do it. if you dont understand what you doing.
8. type following
PHP:
rm 21
rm 20
rm 19
rm 18
9. Now we will create new partitions as we wanted. copy following cammands one by one followed by ENTER.
PHP:
mkpartfs primary ext2 138 538
mkpartfs primary ext2 538 1638
mkpartfs primary ext2 1638 1838
mkpartfs primary ext2 1838 7813
quit
10. after last "QUIT" command it wil say.
PHP:
quit
Information: You may need to update /etc/fstab.
Ignore the warning Reboot into recovery again on pc type
11.
PHP:
adb shell
mke2fs /dev/block/mmcblk0p18
tune2fs -j /dev/block/mmcblk0p18
mke2fs /dev/block/mmcblk0p19
tune2fs -j /dev/block/mmcblk0p19
mke2fs /dev/block/mmcblk0p20
tune2fs -j /dev/block/mmcblk0p20
mke2fs /dev/block/mmcblk0p21
tune2fs -j /dev/block/mmcblk0p21
This will create ext3 partition from ext2
Now convert them to ext4
12.
PHP:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p18
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p19
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p20
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p21
Now lets check everything is ok
13.
PHP:
cd /dev/block
parted mmcblk0
print
This should look like following
14.
PHP:
Number Start End Size File system Name Flags
1 14.7MB 15.7MB 1049kB cal
2 15.7MB 16.0MB 262kB sysparm_dep
3 16.0MB 16.3MB 262kB parm-spml_dep
4 16.3MB 16.5MB 262kB RF_CAL_FILE
5 16.5MB 24.9MB 8389kB KERNEL
6 24.9MB 33.3MB 8389kB RECOVERY
7 33.3MB 53.0MB 19.7MB modem
8 53.0MB 86.2MB 33.3MB reserved
9 86.2MB 88.3MB 2097kB SBL1
10 88.3MB 90.4MB 2097kB SBL2
11 90.4MB 98.8MB 8389kB PARAM
12 98.8MB 99.4MB 524kB DTSBK
13 99.4MB 99.9MB 524kB DTS
14 99.9MB 108MB 8389kB VC-FirmwareBK
15 108MB 117MB 8389kB VC-Firmware
16 117MB 117MB 262kB FOTA_SIG
17 117MB 138MB 21.0MB ext4 efs
18 138MB 538MB 400MB ext4
19 538MB 1638MB 1100MB ext4
20 1638MB 1838MB 200MB ext4
21 1838MB 7813MB 5975MB ext4
So you can see your last partition is now 5.9 GB...
Now flash any rom you wanted,......
ENJOY...
CHECK THIS POST IF SOMETHING GETS MESSED UP ..THIS PROCESS WILL FIX ALL PARTITIONS AND MAKE THEM AS THEY WERE EARLIER
Disclaimer :- I will not be responsible for BRICKED devices.. USE THIS PROCEDRE ON YOUR OWN RISK>>>...................
[/U][/I][/B]​
XDA:DevDB Information
[GUIDE] Increase internal storage for Grand i9082, Tool/Utility for the Samsung Galaxy Grand Duos i9082
Contributors
k2wl, rutvikrvr
Version Information
Status: Stable
Created 2014-09-07
Last Updated 2014-09-16

Reserved

Reserved

reserved.

reserved.for more

How to restore a bricked device or how to restore the device if something goes wrong?
FILES REQUIRED : baffin.pit https://s.basketbuild.com/filedl/devs?dev=rutvikrvr&dl=rutvikrvr/i9082/restore/baffin.pit
ANy stock ROM (link for mk3) : https://docs.google.com/file/d/0B80jsFgYZGOhRHJoY200Zktyekk/edit
ODIN: http://forum.xda-developers.com/attachment.php?attachmentid=1751204&d=1361535462
STEP 1 : In the PIT option add .. the baffin.pit AND IN THE PDA OPTION PUT THE FIRMWARE
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
STEP 2 : HIT START AND ONCE ITS COMPLETE YOUR PHONE SHOULD WORK FINE ...THEN YOU CAN ROOT YOUR DEVICE AND TRY THIS PROCEDURE AGAIN :laugh: :laugh:

Internal storage increased on Grand Duos
@k2wl You are an angel for us :laugh: You rockKkK man. Thank you very much for this amazing guide. With this awesome guide you made many Grand duos users on XDA forum indebted to you. :good::good::good:
PS : Hey members, See the screenshot of what is going to happen to your internal storage of GalaxyGrand Duos after following this guide successfully .

@k2wl Please clear this doubt of mine?. Will this storage space remains same even after restoring nandroid backup whether stock or custom!

Trilochanaaya said:
@k2wl Please clear this doubt of mine?. Will this storage space remains same even after restoring nandroid backup whether stock or custom!
Click to expand...
Click to collapse
I think .. Only if u flash stock via Odin .... Not recovery ... Only then the partition table gets restored

rutvikrvr said:
I think .. Only if u flash stock via Odin .... Not recovery ... Only then the partition table gets restored
Click to expand...
Click to collapse
it remain same after flashing via recovery. nandroid i dont know. never used one...LOL....

Can you plz make a flashable zip as I'm not an expert in this and I didn't understand those codes

Is it safe???
Is It safe i mean if something goes wrong during the process then what will happen to the device?? i have done many tweaks with my phone but 1st time i m a bit scared

k2wl said:
it remain same after flashing via recovery. nandroid i dont know. never used one...LOL....
Click to expand...
Click to collapse
@k2wl Sorry didn't get you! I am thinking that when we backup ROM using TWRP/CWM it's called nandroid backup. I prefer having STOCK ROM backup just to be safe in case something goes wrong while flashing. My question is about this backup, Will these internal storage changes remain?

This method was beta tested by me and @k2wl :good:
---------- Post added at 10:38 PM ---------- Previous post was at 10:37 PM ----------
Trilochanaaya said:
@k2wl Sorry didn't get you! I am thinking that when we backup ROM using TWRP/CWM it's called nandroid backup. I prefer having STOCK ROM backup just to be safe in case something goes wrong while flashing. My question is about this backup, Will these internal storage changes remain?
Click to expand...
Click to collapse
The /system partition's size gets reduced to 1GB using repartitioning AFAIK, so the stock ROM won't probably will not fit on it.

Basic questions(Noobie questions)
#1 - Would work on SGG GT-i9080L ? (Same grand.. just, not duos (?) )
#2 - Are newbies able to do this tutorial withouth knowledge? Just following the steps.
#3 - Would this problem affect on doing this? (SDCard is emulated inside the internal storage so not taking the extsdcard as sdcard.) Link: http://forum.xda-developers.com/galaxy-grand-duos/help/help-single-partition-external-sd-t2866826

GabrielCool1 said:
Basic questions(Noobie questions)
#1 - Would work on SGG GT-i9080L ? (Same grand.. just, not duos (?) )
#2 - Are newbies able to do this tutorial withouth knowledge? Just following the steps.
#3 - Would this problem affect on doing this? (SDCard is emulated inside the internal storage so not taking the extsdcard as sdcard.) Link: http://forum.xda-developers.com/galaxy-grand-duos/help/help-single-partition-external-sd-t2866826
Click to expand...
Click to collapse
#1 Yes.
#2 The thing that matters the most in such cases is to follow the instructions carefully
#3 Your problem is an isolated one for the grand community and I'm not sure it will solve it or not.
Bonus tip: If you can post the result of 'print' (read in OP that command) we may be able to help you.

This guy must be a god's man??

VanshKhanna said:
Can you plz make a flashable zip as I'm not an expert in this and I didn't understand those codes
Click to expand...
Click to collapse
flashable zips often can currupt partitions..i have bad experience in this.
so i suggest. if yo do it carefully..one by one...it will not affect your device...and its one time procedure...
FuTech.360 said:
Is It safe i mean if something goes wrong during the process then what will happen to the device?? i have done many tweaks with my phone but 1st time i m a bit scared
Click to expand...
Click to collapse
only if you currupt boot loader partition...that would be end of it...but if you follow steps one by one...it will work..
GabrielCool1 said:
Basic questions(Noobie questions)
#1 - Would work on SGG GT-i9080L ? (Same grand.. just, not duos (?) )
#2 - Are newbies able to do this tutorial withouth knowledge? Just following the steps.
#3 - Would this problem affect on doing this? (SDCard is emulated inside the internal storage so not taking the extsdcard as sdcard.) Link: http://forum.xda-developers.com/galaxy-grand-duos/help/help-single-partition-external-sd-t2866826
Click to expand...
Click to collapse
as Akiratomorya said.. give log of "print command"
i will help you out.
ishmeet1995 said:
This guy must be a god's man??
Click to expand...
Click to collapse
thanks...

Man thanks

Reza Khan said:
Man u r just awesome keep good works
Click to expand...
Click to collapse
pl dont quote the op ..pl edit ur post

Related

Corrupt Cache Partition - help needed

Hello,
my setup:
- CM 11 unofficial Build3 by vertigo running with ART and the whatsapp fix ( http://forum.xda-developers.com/showthread.php?t=2498084 )
- latest banks gapps
- latest TWRP (2.6.3.2)
What I wanted to do
I simply wanted to install the new official CM11 nightly, booted into TWRP, installed the rom and the gapps without wiping, which shouldnt be a problem - i didn't revert to dalvik for this, if that makes any difference.
I suspect there was an error while downloading the new nightly rom, it gave me an error msg while updating. (ill use MD5 from now on...)
So i just reflashed the build3 from vertigo with the gapps - but now i have the problem that the phone doesnt boot.
It shows the LG Logo unusually long and then shows the CM Boot Logo forever.
Whats the situation now:
i can mount every partition, except cache - wiping also fails obviously
i can enter TWRP and flash stuff
i have made a backup before my update attempt
i also have every file needed for a clean flash on my sdcard
What I tried already:
Wiping everything but the internal sdcard - clean install - still wont boot
restoring the backup works aswell, but still doesnt boot
help gladly appreciated, i think i only need to fix my cache partition and then restore everything and it should work again...
nfin1te said:
Hello,
my setup:
- CM 11 unofficial Build3 by vertigo running with ART and the whatsapp fix ( http://forum.xda-developers.com/showthread.php?t=2498084 )
- latest banks gapps
- latest TWRP (2.6.3.2)
What I wanted to do
I simply wanted to install the new official CM11 nightly, booted into TWRP, installed the rom and the gapps without wiping, which shouldnt be a problem - i didn't revert to dalvik for this, if that makes any difference.
I suspect there was an error while downloading the new nightly rom, it gave me an error msg while updating. (ill use MD5 from now on...)
So i just reflashed the build3 from vertigo with the gapps - but now i have the problem that the phone doesnt boot.
It shows the LG Logo unusually long and then shows the CM Boot Logo forever.
Whats the situation now:
i can mount every partition, except cache - wiping also fails obviously
i can enter TWRP and flash stuff
i have made a backup before my update attempt
i also have every file needed for a clean flash on my sdcard
What I tried already:
Wiping everything but the internal sdcard - clean install - still wont boot
restoring the backup works aswell, but still doesnt boot
help gladly appreciated, i think i only need to fix my cache partition and then restore everything and it should work again...
Click to expand...
Click to collapse
Can you clear it the slow way? Untick -rm rf option in settings, then clear cache. The partition itself shouldn't have been changed by installing a ROM, it must be some kind of problematic content.
Incep said:
Can you clear it the slow way? Untick -rm rf option in settings, then clear cache. The partition itself shouldn't have been changed by installing a ROM, it must be some kind of problematic content.
Click to expand...
Click to collapse
Nope, as I can't mount it, none of those 2 ways is possible.
Just says
At the beginning:
updating partition details
then:
E:unable to mount /cache
several times,
and somwhere inbetween
Running boot script...
and
Finished running boot script
nfin1te said:
Nope, as I can't mount it, none of those 2 ways is possible.
Just says
At the beginning:
updating partition details
then:
E:unable to mount /cache
several times,
and somwhere inbetween
Running boot script...
and
Finished running boot script
Click to expand...
Click to collapse
I didn't think it needed to be mounted in order to be cleared the normal way.
It sounds like it must be repartitioned, or fixed with some kind of disk scan before it can be normally mounted. Maybe there is a way to ssh into the phone and run fsck on the disk?
(ssh is a remote shell for unix, fsck is the linux "scan disk" tool for recovering errors, you can connect to your phone if it has an ssh server running by downloading Putty for windows or through the terminal on mac)
I'm not an expert on android partitions, so maybe someone else want to chime in on this.
Incep said:
It sounds like it must be repartitioned, or fixed with some kind of disk scan before it can be normally mounted. Maybe there is a way to ssh into the phone and run fsck on the disk?
(ssh is a remote shell for unix, fsck is the linux "scan disk" tool for recovering errors, you can connect to your phone if it has an ssh server running by downloading Putty for windows or through the terminal on mac)
Click to expand...
Click to collapse
I'm more than willing to try, but i'd need some sort of instructions, i have no experience with this.
thanks!
What i want to avoid, if somehow possible, is to reflash a stock rom, reroot and reinstall TWRP and go thru the whole procedure again.
nfin1te said:
I'm more than willing to try, but i'd need some sort of instructions, i have no experience with this.
thanks!
What i want to avoid, if somehow possible, is to reflash a stock rom, reroot and reinstall TWRP and go thru the whole procedure again.
Click to expand...
Click to collapse
I'm not sure if my method works, but atleast you have a running adb server on your phone when in TWRP, which is the android debugging protocol. It has a lot of tools, some which might be useful. You should google a bit around on the subject.
Incep said:
I'm not sure if my method works, but atleast you have a running adb server on your phone when in TWRP, which is the android debugging protocol. It has a lot of tools, some which might be useful. You should google a bit around on the subject.
Click to expand...
Click to collapse
Yeah, thats what im doing atm... but i didn't have success finding someone with a similar problem so far.
All i ever have done in ADB is enable/disable fastboot on my old nexus and sideload some images.
nfin1te said:
Yeah, thats what im doing atm... but i didn't have success finding someone with a similar problem so far.
All i ever have done in ADB is enable/disable fastboot on my old nexus and sideload some images.
Click to expand...
Click to collapse
Me too, I'm not really an android developer, just worked a lot with Linux earlier, and it's conceptually the same thing! Hopefully I pointed you in the right direction.
ok i entered adb shell alrdy, but when i try to use the parted command, it says
~ # parted /dev/block/mmcblk0
/sbin/sh: parted: not found
~ #
Edit:
Apparently, i need to push parted first.
Im currently trying this: http://www.droidforums.net/forum/htc-droid-eris/78650-internal-storage-partitions-screwed-up.html
nfin1te said:
ok i entered adb shell alrdy, but when i try to use the parted command, it says
~ # parted /dev/block/mmcblk0
/sbin/sh: parted: not found
~ #
Click to expand...
Click to collapse
Maybe you don't have parted installed on your phone. Each command is actually it's own program, which lies in a folder which is either /bin for normal apps, and /sbin for system-changing apps. So probably check /sbin if there is a binary file called 'parted' there. But be careful of this program… It can be very destructive.
Incep said:
Maybe you don't have parted installed on your phone. Each command is actually it's own program, which lies in a folder which is either /bin for normal apps, and /sbin for system-changing apps. So probably check /sbin if there is a binary file called 'parted' there. But be careful of this program… It can be very destructive.
Click to expand...
Click to collapse
Yeah thx, i just managed to push the necessary files.
Ok, now im looking at this partition table:
(parted) print
print
Model: MMC 032G96 (sd/mmc)
Disk /dev/block/mmcblk0: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 16.8MB 83.9MB 67.1MB fat16 modem
2 83.9MB 84.9MB 1049kB sbl1
3 84.9MB 85.5MB 524kB dbi
4 101MB 101MB 524kB DDR
5 117MB 118MB 1049kB aboot
6 118MB 120MB 1049kB rpm
7 134MB 151MB 16.8MB boot
8 151MB 152MB 1049kB tz
9 152MB 152MB 1024B pad
10 168MB 171MB 3146kB modemst1
11 171MB 174MB 3146kB modemst2
12 174MB 174MB 1024B pad1
13 185MB 201MB 16.8MB misc
14 201MB 235MB 33.6MB ext4 persist
15 235MB 252MB 16.8MB recovery
16 252MB 255MB 3146kB fsg
17 268MB 269MB 524kB fsc
18 269MB 269MB 524kB ssd
19 269MB 269MB 1024B pad2
20 269MB 270MB 524kB encrypt
21 285MB 294MB 8389kB ext4 drm
22 294MB 302MB 8389kB ext4 sns
23 302MB 336MB 33.6MB laf
24 336MB 369MB 33.6MB fota
25 369MB 403MB 33.6MB ext4 mpt
26 403MB 403MB 524kB dbibak
27 403MB 404MB 1049kB rpmbak
28 404MB 405MB 1049kB tzbak
29 405MB 405MB 8192B rct
30 419MB 3322MB 2902MB ext4 system
31 3322MB 3959MB 638MB cache
32 3959MB 4043MB 83.9MB tombstones
33 4043MB 4060MB 16.8MB spare
34 4060MB 4110MB 50.3MB ext4 cust
35 4110MB 31.2GB 27.1GB ext4 userdata
36 31.2GB 31.3GB 62.9MB grow
(parted)
I assume, the problem is, that cache seems screwed as it doesn't show any filesystem right?
So if i make this partition ext4, it should work again?
If i check pt31/cache, it says:
(parted) check 31
check 31
Error: Could not detect file system.
(parted)
So, im assuming, im right.
lol, man this is frustrating
(parted) mkfs ext4
mkfs ext4
Warning: The existing file system will be destroyed and all data on the
partition will be lost. Do you want to continue?
parted: invalid token: ext4
Yes/No? yes
yes
Partition number? 31
31
File system type? [ext2]? ext4
ext4
No Implementation: Support for creating ext4 file systems is not implemented
yet.
(parted)
It's alive again!
ext2 worked aswell, as i/we thought - the problem was the cache partition got f'ed up. Making a new FS using parted solved the problem.
THANKS bro for pointing me in the right direction.
Edit: restored backup and everythings fine again
I have the same issue , i am running on ubuntu i but i dont quite get the instrations ?
emrexcem said:
I have the same issue , i am running on ubuntu i but i dont quite get the instrations ?
Click to expand...
Click to collapse
Hi mate i had the same problem and after a long struggling i got this working again.
-Use a Windows computer and install the SDK tools
-Check OP's link to find the "parted" file
-Connect phone in recovery
-Open cmd in windows and type adb shell, you'll get a new console with a #
-Push your parted file to /sbin using adb push command:
In my case i had the parted file in E: drive so i used adb push E:\parted /sbin/parted
-If you try to execute parted you'll get a "permission denied" error, so after pushing the file you need to fix the permissions so type "chmod 777 /sbin/parted"
-Execute parted and just follow OP's steps and you'll be fine.
Hope it helps
Don't use parted to create a filesystem
nfin1te said:
It's alive again!
ext2 worked aswell, as i/we thought - the problem was the cache partition got f'ed up. Making a new FS using parted solved the problem.
THANKS bro for pointing me in the right direction.
Edit: restored backup and everythings fine again
Click to expand...
Click to collapse
You saved my but but as far as I know it is not recomended to use parted to create a filesystem.
Use
mke2fs -T ext4 [partition]
instead
nfin1te said:
It's alive again!
ext2 worked aswell, as i/we thought - the problem was the cache partition got f'ed up. Making a new FS using parted solved the problem.
THANKS bro for pointing me in the right direction.
Edit: restored backup and everythings fine again
Click to expand...
Click to collapse
Can you please provide more detailed instruction please, i have apparently the same problem, i not familiar with adb, i have now pushed all necessary parts to phone what should i do now.
I am stuck please please help.
pingwinpower said:
You saved my but but as far as I know it is not recomended to use parted to create a filesystem.
Use
mke2fs -T ext4 [partition]
instead
Click to expand...
Click to collapse
Can you please provide more detailed instruction please, i have apparently the same problem, i not familiar with adb, i have now pushed all necessary parts to phone what should i do now.
I am stuck please please help.
redkib said:
Can you please provide more detailed instruction please, i have apparently the same problem, i not familiar with adb, i have now pushed all necessary parts to phone what should i do now.
I am stuck please please help.
Click to expand...
Click to collapse
I cant really provide any more information than this, please be more specific with your problem.
Since apparently you have pushed all the files via adb already, you just need to use the "mkfs" command to create a news filesystem, just be sure to select the right partition number (the corrupted one). You can find the correct command via google or take a look at my post
(parted) mkfs ext2
Warning: The existing file system will be destroyed and all data on the
partition will be lost. Do you want to continue?
Yes/No? yes
yes
Partition number? 31
31
File system type? [ext2]?
ext2
(parted)
Click to expand...
Click to collapse

***Meizu MX4 - Partitions Table*** Need help for resize chache and system

MX4-Ubuntu Touch in Cyano
An little video tutorial : https://youtu.be/rzjF2Kiw4Ew
~ # print #show partition table
print #show partition table
/sbin/sh: print: not found
~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print #shows partition table
print #shows partition table
print #shows partition table
Model: MMC BWBC3R (sd/mmc)
Disk /dev/block/mmcblk0: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 524kB 3670kB 3146kB proinfo
2 3670kB 8913kB 5243kB nvram
3 8913kB 19.4MB 10.5MB ext4 protect1
4 19.4MB 29.9MB 10.5MB ext4 protect2
5 29.9MB 30.1MB 262kB seccfg
6 30.1MB 30.5MB 393kB lk
7 30.5MB 47.3MB 16.8MB boot
8 47.3MB 64.1MB 16.8MB recovery
9 64.1MB 70.4MB 6291kB secro
10 70.4MB 70.9MB 524kB para
11 70.9MB 79.3MB 8389kB logo
12 79.3MB 89.8MB 10.5MB ext4 custom
13 89.8MB 101MB 10.9MB expdb
14 101MB 2265MB 2164MB ext4 system
15 2265MB 3003MB 738MB ext4 cache
16 3003MB 31.3GB 28.2GB ext4 userdata
17 31.3GB 31.3GB 16.8MB flashinfo
Click to expand...
Click to collapse
I can try to resize my userdata for incrise system and cache from recovery--->adb shell--->parted blalbalba
But i need an table of a normal version.
@Danj1
on recovery (philz)
-adb devices
-adb shell
-parted /dev/block/mmcblk0
-unit MB
-print
please share your table
resized my "userdata" losting 2 gb for incrise cache and system but...parted don't accept ext4 only ext2
View attachment 3554921
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Changed "system" and "cache"
View attachment 3554951
from my 32 gb this is the command after deleted 3 partition:
system: + 1 gb (+ o -)
mkpartfs system ext2 101MB 3265MB
cache: + 1 gb (+ o -)
mkpartfs cache ext2 3265MB 5003MB
userdata:- 2 gb
mkpartfs userdata ext2 5003MB 31251MB
--------------------------------------
WAIT DON'T CONSIDER IT GOOD-MY PHONE CAN'T BE FLASHED FROM RECOVERY (wiping and formatting all from recovery and try to reflash cyano )
BOOOM BABY! Wipe and Format : system, data, sd card and cache. Reflash cyano!
View attachment 3554970
@Danj1 you can do it.
Hi,
here is my current partition table:
Model: MMC 032GE4 (sd/mmc)
Disk /dev/block/mmcblk0: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 524kB 3670kB 3146kB proinfo
2 3670kB 8913kB 5243kB nvram
3 8913kB 19.4MB 10.5MB ext4 protect1
4 19.4MB 29.9MB 10.5MB ext4 protect2
5 29.9MB 30.1MB 262kB seccfg
6 30.1MB 30.5MB 393kB lk
7 30.5MB 47.3MB 16.8MB boot
8 47.3MB 64.1MB 16.8MB recovery
9 64.1MB 70.4MB 6291kB secro
10 70.4MB 70.9MB 524kB para
11 70.9MB 79.3MB 8389kB logo
12 79.3MB 616MB 537MB ext4 custom
13 616MB 629MB 13.0MB expdb
14 629MB 2005MB 1376MB ext4 system
15 2005MB 2122MB 117MB ext4 cache
16 2122MB 31.3GB 29.1GB ext4 userdata
17 31.3GB 31.3GB 16.8MB flashinfo
Click to expand...
Click to collapse
Danj1 said:
Hi,
here is my current partition table:
Click to expand...
Click to collapse
mmm nice
Resized partitions to:
14 629MB 3005MB 2376MB ext4 system
15 3005MB 4005MB 1000MB ext4 cache
16 4005MB 31251MB 27246MB ext4 userdata
Click to expand...
Click to collapse
Currently doing ubuntu device flash. Will report later.
Thank you so much Naphtha. You rock!
Danj1 said:
Resized partitions to:
Currently doing ubuntu device flash. Will report later.
Thank you so much Naphtha. You rock!
Click to expand...
Click to collapse
Goodluck! :')
"$ wget http://people.canonical.com/~alextu/tangxi/recovery/recovery.img
# boot device into fastboot mode
$ fastboot flash recovery recovery.img
# boot device into recovery
$ ubuntu-device-flash touch --device arale --channel
ubuntu-touch/stable/meizu.en"
Hi,
I tried to flash the device with ubuntu-device-flash but recovery afterwards fails. Here is the output:
ubuntu-device-flash touch --device=arale --channel=ubuntu-touch/stable/meizu.en --wipe
2015/11/25 22:09:04 Device is |arale|
2015/11/25 22:09:04 Flashing version 7 from ubuntu-touch/stable/meizu.en channel and server https://system-image.ubuntu.com to device arale
2015/11/25 22:09:04 Start pushing /home/user/.cache/ubuntuimages/ubuntu-touch/stable/meizu.en/arale/version-7.tar.xz to device
2015/11/25 22:09:06 Start pushing /home/user/.cache/ubuntuimages/pool/custom-xxxxx.tar.xz to device
2015/11/25 22:09:06 Start pushing /home/user/.cache/ubuntuimages/gpg/image-master.tar.xz to device
2015/11/25 22:09:06 Done pushing /home/user/.cache/ubuntuimages/ubuntu-touch/stable/meizu.en/arale/version-7.tar.xz to device
2015/11/25 22:09:06 Start pushing /home/user/.cache/ubuntuimages/pool/device-xxxxx.tar.xz to device
2015/11/25 22:09:06 Done pushing /home/user/.cache/ubuntuimages/gpg/image-master.tar.xz to device
16.00 KB / 282.42 MB [_____________________________________________________________________________________] 0.01 % 79.91 KB/s 1h0m18s2015/11/25 22:09:06 Start pushing /home/user/.cache/ubuntuimages/gpg/image-signing.tar.xz to device
48.00 KB / 282.42 MB [_____________________________________________________________________________________] 0.02 % 119.88 KB/s 40m11s2015/11/25 22:09:06 Done pushing /home/user/.cache/ubuntuimages/gpg/image-signing.tar.xz to device
784.00 KB / 282.42 MB [____________________________________________________________________________________] 0.27 % 105.84 KB/s 45m24s2015/11/25 22:09:13 Done pushing /home/user/.cache/ubuntuimages/pool/custom-xxxxx.tar.xz to device
944.00 KB / 282.42 MB [_____________________________________________________________________________________] 0.33 % 94.31 KB/s 50m56s
1.19 MB / 282.42 MB [________________________________________________________________________________________________________________________________________________________________________________________________________________________________] 0.42 % 82.09 KB/s 58m28s2015/11/25 22:09:21 Done pushing /home/user/.cache/ubuntuimages/pool/device-xxxxx.tar.xz to device
282.42 MB / 282.42 MB [=================================================================================================================================================================================================================================] 100.00 % 173.64 KB/s
2015/11/25 22:36:51 Start pushing /home/user/.cache/ubuntuimages/pool/ubuntu-xxxxx.tar.xz to device
2015/11/25 22:37:29 Done pushing /home/user/.cache/ubuntuimages/pool/ubuntu-xxxxx.tar.xz to device
2015/11/25 22:37:29 Created ubuntu_command: /home/user/.cache/ubuntuimages/ubuntu_commands182902206
2015/11/25 22:37:29 Rebooting into recovery to flash
Failed to enter Recovery
Click to expand...
Click to collapse
After executing ubuntu-device-flash the device switched to blank screen and does not come up anymore. It is not booting up. If I plug it in
to power it won't show any loading screen. I tried all different key combinations (long press power/ power + vol up / power + vol down) but it doesn't wake up.
I even opened the device and disconnected the battery for some time but this didn't help either.
I will continue to get device back. So for now I can NOT recommend this way of flashing.
Back to ubuntu touch from SP Flash Tool. We can't see the name but is the same:View attachment 3555432
Naphtha said:
Back to ubuntu touch from SP Flash Tool. We can't see the name but is the same:View attachment 3555432
Click to expand...
Click to collapse
Will try this later. Must download files first.
Hi,
so here are my results. I think I bricked my phone somehow. Black screen is always present.
If I try to flash with the MTK-Flash-Tool I get the following error:
I then tried to get into fastboot mode and reflash a recovery but even this fails. If I hold power+vol down and connect to my Linux machine I see
the device popping up but I am not possible to make adb or fastboot on device. Here is the lsusb output:
[email protected]:~lsusb
...
Bus 003 Device 037: ID 0e8d:0003 MediaTek Inc. MT6227 phone
...
Click to expand...
Click to collapse
Any ideas how to recover?
First of that: $ ubuntu-device-flash touch --device arale --channel
ubuntu-touch/stable/meizu.en --wipe
have you flashed the ubuntu recovery?
Yes I installed recovery from http://people.canonical.com/~alextu/tangxi/recovery/ before using ubuntu-device-flash.

[Guide] Repartition Nexus7(2013) to increase system partition - Extra Space for Rom

Hi, this is my first time posting here. I noticed there is no guide to increase the system partition size in Nexus 7 (2013). The system partition is only around 880MB making it impossible to flash new ROMs and large package of GApps. This guide is for Nexus 7 (2013) wifi 32GB but it should work for other Nexus 7 (2013) editions and even Nexus 7 (2012) with some numbers changed.
My guide is based on this guide for Nexus 5. Check it out. The only issue with Nexus 7 is that the recovery partition is between the system and userdata partitions in the partition table. So deleting the partitions (which includes recovery partition) and then recreating them with offsets might leave your tablet bricked. If you have a way to unbrick the tablet or you are manly enough, you can try the guide written in the next comment. I haven't tested it. Leave a comment if it works. Anyway from the Nexus 5 guide:
The high-level procedure here is, since filesystems must be contiguous and in order so they can be addressed properly, we need to delete every partition inclusively from system to userdata, then recreate them with new storage offsets.
Click to expand...
Click to collapse
This part is not very accurate. I am not sure about Nexus 5 but in Nexus 7, I have changed the order with great success. Only thing is that you need to restart at the end so that the recovery mode updates the mounting configuration. I am not sure if it works with the stock ROM but it definitely works with a custom ROM.
The downside of my way is that you end up with around 880MB unused memory. You can give it to the cache partition. Otherwise, you have to do the untested one in the next comment.
Before we start, I am not liable if it doesn't work or makes your device unusable. The tested guide below works for me.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Tested Guide starts here:
Prerequisite:
1. PC (any OS) with adb and fastboot
2. Nexus 7 with TWRP recovery connected to the PC via USB.
3. Get parted from iwf1.com/iwf-repo/parted.rar and extract it into any directory
4. (Optional) System and userdata partitions are wiped out. So backup system and/or data partitions using TWRP recovery
Steps:
1. Open TWRP recovery mode in Nexus 7. Make sure to have the system partition read/write.
2. Go to mount and unmount all partitions you are going to modify (for now system and data).
3. Open PC's command line in parted's directory
4. The next steps are on the command line unless stated:
Code:
adb push parted /
adb shell
~ # chmod +x parted
~ # /parted /dev/block/mmcblk0
(parted): unit b
(parted): p
I used unit b to get partition sizes in bytes. So you can resize accurately this way. You will get the following partition table by default. Keep a copy of this partition table (and one with unit compact for easy readability) as reference if you mess up or want to restore to default.
Code:
Number Start End Size File system Name Flags
1 67108864B 156745727B 89636864B fat16 radio
2 201326592B 204472319B 3145728B modemst1
3 204472320B 207618047B 3145728B modemst2
4 268435456B 283795455B 15360000B ext4 persist
5 335544320B 336343039B 798720B m9kefs1
6 336343040B 337141759B 798720B m9kefs2
7 402653184B 403451903B 798720B m9kefs3
8 403451904B 406597631B 3145728B fsg
9 469762048B 471298047B 1536000B sbl1
10 471298048B 472834047B 1536000B sbl2
11 472834048B 474931199B 2097152B sbl3
12 474931200B 480174079B 5242880B aboot
13 480174080B 480698367B 524288B rpm
14 536870912B 553648127B 16777216B boot
15 603979776B 604504063B 524288B tz
16 604504064B 604505087B 1024B pad
17 604505088B 606041087B 1536000B sbl2b
18 606041088B 608138239B 2097152B sbl3b
19 608138240B 613381119B 5242880B abootb
20 613381120B 613905407B 524288B rpmb
21 613905408B 614429695B 524288B tzb
22 671088640B 1551892479B 880803840B ext2 system
23 1551892480B 2139095039B 587202560B ext4 cache
24 2147483648B 2148532223B 1048576B misc
25 2214592512B 2225078271B 10485760B recovery
26 2281701376B 2281709567B 8192B DDR
27 2281709568B 2281717759B 8192B ssd
28 2281717760B 2281718783B 1024B m9kefsc
29 2348810240B 2348843007B 32768B metadata
30 2415919104B 31272713727B 28856794624B ext4 userdata
5. Rename the system partition to disable it
Code:
(parted): name 22 unused1
6. Now you need to delete userdata partition:
Code:
(parted): rm 30
7. You need to create 2 primary partitions in place of userdata. First one will be the system partition. Second one will be the userdata partition. I recommend to have the system partition to start with the same byte userdata started and size divisible by 4096 bytes. Leave some space between the 2 divisible by 4096 bytes (block-size). Then have userdata partition start with a number divisible by 4096 bytes, size divisible by 512 bytes and ends where user data ended. I increased my system partition to around 2.93GiB (you can resize it whatever you want). I don't really need a lot of userdata. So my configuration would be:
Code:
(parted): mkpart primary 2415919104B 5570068479B
(parted): mkpart primary 5637144576B 31272713727B
8. Now you need to rename these 2 partitions:
Code:
(parted): name 30 system
(parted): name 31 userdata
(parted): p
9. Finally you need to create ext4 filesystem for system and userdata.
Code:
(parted): quit
~ # mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p30
~ # mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p31
~ # /parted /dev/block/mmcblk0 p
10. Have a final look at the partition table to see if everything is correct. Then Reboot into Recovery. This is a very important step. The mount configuration (/etc/fstab) doesn't update until you reboot.
Code:
~ # exit
adb reboot recovery
Done! You have a new system partition with a larger size ready for a ROM. The Size of the ROM will shrink after flashing a new ROM, Using TWRP, Wipe -> Advanced Wipe -> select system -> Resize File System -> Swipe.
Note: You might need to wipe cache/dalvik (might need wipe system too for mount to work), then unmount and remount system/cache/data for everything to work (for example, I had tablet's internal storage not showing on PC initially). But once everything works, it will always work
Final partition table looks like this:
Code:
Number Start End Size File system Name Flags
1 67.1MB 157MB 89.6MB fat16 radio
2 201MB 204MB 3146kB modemst1
3 204MB 208MB 3146kB modemst2
4 268MB 284MB 15.4MB ext4 persist
5 336MB 336MB 799kB m9kefs1
6 336MB 337MB 799kB m9kefs2
7 403MB 403MB 799kB m9kefs3
8 403MB 407MB 3146kB fsg
9 470MB 471MB 1536kB sbl1
10 471MB 473MB 1536kB sbl2
11 473MB 475MB 2097kB sbl3
12 475MB 480MB 5243kB aboot
13 480MB 481MB 524kB rpm
14 537MB 554MB 16.8MB boot
15 604MB 605MB 524kB tz
16 605MB 605MB 1024B pad
17 605MB 606MB 1536kB sbl2b
18 606MB 608MB 2097kB sbl3b
19 608MB 613MB 5243kB abootb
20 613MB 614MB 524kB rpmb
21 614MB 614MB 524kB tzb
22 671MB 1552MB 881MB ext2 unused1
23 1552MB 2139MB 587MB ext4 cache
24 2147MB 2149MB 1049kB misc
25 2215MB 2225MB 10.5MB recovery
26 2282MB 2282MB 8192B DDR
27 2282MB 2282MB 8192B ssd
28 2282MB 2282MB 1024B m9kefsc
29 2349MB 2349MB 32.8kB metadata
30 2416MB 5570MB 3154MB ext2 system
31 5637MB 31.3GB 25.6GB ext4 userdata
To increase cache size:
You have 880MB unused storage from the old system partition. You can keep it the way it is as you have the old system partition here which can be re-enabled quickly in the future. OR You can give this unused partition to the cache partition without messing around a lot. I recommend keeping a small unused partition in place of the old system partition to avoid messing with the order of recovery partition.
Code:
adb push parted /
adb shell
~ # chmod +x parted
~ # /parted /dev/block/mmcblk0
(parted): unit b
(parted): p
(parted): rm 22
(parted): rm 23
(parted): mkpart primary 671088640B 671096831B
(parted): mkpart primary 671096832B 2139095039B
(parted): name 22 unused1
(parted): name 23 cache
(parted): p
(parted): quit
~ # mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p23
~ # quit
Edit: Deleted
rkhat said:
If you have a way to unbrick the tablet or you are manly enough, you can try the guide...
I haven't tested it. Leave a comment if it works.
Click to expand...
Click to collapse
No, there is no way to unbrick the tablet.
Here is a likely comment "So I took the jump in the name of exploration, and bricked my tablet"
Now, are you manly enough to try your own guide?
/EDIT 1
2018 - Unbricking method is available.
/EDIT 2
Here is a Non-destructive repartition script which you can simply 'install' from TWRP.
k23m said:
No, there is no way to unbrick the tablet.
Here is a likely comment "So I took the jump in the name of exploration, and bricked my tablet"
Now, are you manly enough to try your own guide?
Click to expand...
Click to collapse
If you checked the comment write below the second link, you will see a link to a repair option with RIFF JTAG box (costs >100$). I am not going to invest into a repair kit on a device that is probably worth less than the box, but hopefully someone who has the box and tablet can test the solution in the "name of exploration" and help others
Anyway, I am going to buy a chromebook in a year. Tablet market is dead. I might try the second solution on the N7 if some realtive doesn't steal it.
Didn't know that parted on works on android partitions in the way you describe.
My n7 2013 is in pretty bad shape, it has severe touch screen problems which sucks (its gone back to ASUS three times! pretty much gave up... haha they don't want to see it again).
So maybe I'll be game enough to try out the guide someday, but not today
There are something strange after I follow this guide.
If I copy files to /system and /system usage space is over 1GB.
/system will become read-only and mount as ro.
I try to remount /system as rw. But if I copy files into /system, it will become ro again.
Only I can do is format /system. Anyone can help?
Thanks.
I assume to do this you only need custom recovery and root?
OK, I've done the repartitioning. Looks good.
But, I can't seem to flash via TWRP. I try to side-load ROM and I see:
detecting filesystem ext4 for ...
Patching system image unconditionally...
E1001: Failed to update system image.
Updater process ended with error: 7
Any ideas?
RedBullet said:
OK, I've done the repartitioning. Looks good.
But, I can't seem to flash via TWRP. I try to side-load ROM and I see:
detecting filesystem ext4 for ...
Patching system image unconditionally...
E1001: Failed to update system image.
Updater process ended with error: 7
Any ideas?
Click to expand...
Click to collapse
Which ROM did you use? I don't think it works with stock ROM. I use lineageOS.
Btw if you attempt to update the ROM instead of reinstalling it, the system partition will shrink back and you can't use the following step to fix it:
The Size of the ROM will shrink after flashing a new ROM, Using TWRP, Wipe -> Advanced Wipe -> select system -> Resize File System -> Swipe.
Click to expand...
Click to collapse
I found a solution to skip this whole resizing step. I am going to post it after some testing.
rkhat said:
Which ROM did you use? I don't think it works with stock ROM. I use lineageOS.
Btw if you attempt to update the ROM instead of reinstalling it, the system partition will shrink back and you can't use the following step to fix it:
I found a solution to skip this whole resizing step. I am going to post it after some testing.
Click to expand...
Click to collapse
Yea, I was flashing lineage. I eventually got it. I wonder if my partition shrunk back also... What's easiest way to check?
Oh and what do you mean by update vs re-install? I am just flashing via sideload
RedBullet said:
Yea, I was flashing lineage. I eventually got it. I wonder if my partition shrunk back also... What's easiest way to check?
Oh and what do you mean by update vs re-install? I am just flashing via sideload
Click to expand...
Click to collapse
Use parted to print the partition table. First four steps in my guide. Then check the system partition. If it's like the original size, it shrank.
LineageOS supports updating. Let's say you are now on LineageOS 20170801. You want to update to 20170829. When you sideload the newer version, it will attempt to update the previous version (basically only update the differences between the 2 versions). You retain any modification to the system partition (like gapps). Reinstalling means you wipe the system partition then sideload the ROM.
So when updating LineageOS, the system partition will shrink again and I wasn't able to resize it back. Thus corrupting the system partition.
would it not be easier/safer to use parted's resize command to shrink the userdata partition, and then use the move command to move partition 23-29, and then use the resize command again to increase the size of the system partition?
theistus said:
would it not be easier/safer to use parted's resize command to shrink the userdata partition, and then use the move command to move partition 23-29, and then use the resize command again to increase the size of the system partition?
Click to expand...
Click to collapse
I don't think you can do it with parted's move command because according to move's documentation, these are the only supported formats:
ext2 (provided the destination partition is larger than the source partition)
fat16, fat32
linux-swap
reiserfs (if libreiserfs is installed)
Click to expand...
Click to collapse
Partitions 24-29 don't use a file system supported by parted. They definitely contain data (for example recovery partition has your twrp recovery image ).
I think there is a way to do what you are suggesting. In fact, the solution in my 2nd post was about moving the partitons. However, the solution had a mistake which is why I removed it. I had to use dd command to move all the bytes from the old partition to the new partition.
Also, it is somewhat risky. If you do any mistake with the recovery partition (not sure about the other 5 partitions), you pretty much bricked the tablet. If I had anyway to unbrick it, I would do it. Since not, better lose the 840MB.
rkhat said:
I don't think you can do it with parted's move command because according to move's documentation, these are the only supported formats:
Partitions 24-29 don't use a file system supported by parted. They definitely contain data (for example recovery partition has your twrp recovery image ).
I think there is a way to do what you are suggesting. In fact, the solution in my 2nd post was about moving the partitons. However, the solution had a mistake which is why I removed it. I had to use dd command to move all the bytes from the old partition to the new partition.
Also, it is somewhat risky. If you do any mistake with the recovery partition (not sure about the other 5 partitions), you pretty much bricked the tablet. If I had anyway to unbrick it, I would do it. Since not, better lose the 840MB.
Click to expand...
Click to collapse
Yeah, that's the one that scares me. That recovery partition is smack dab in the middle, and it's very ... inconvenient.
Anyone try this with the Nexus 7 2013 LTE version?
better 64gb
https://forum.xda-developers.com/picture.php?albumid=14541&pictureid=56454
Rather than move the system partition, I just moved the cache partition ahead of userdata and extended my system partition by 587MB. This allowed me to keep the same partition numbers and have no unused space.
And after flashing an image if you want to extend the logical drive to fill the partition manually, the command is:
Code:
resize2fs -f /dev/block/mmcblk0p22
Magendanz said:
Rather than move the system partition, I just moved the cache partition ahead of userdata and extended my system partition by 587MB. This allowed me to keep the same partition numbers and have no unused space.
Click to expand...
Click to collapse
Could you explain a bit more how to do that ?
I have read on a few websites that Android Oreo doesn't use the cache partition anymore. If this is true, could it also be simply removed instead of moved ?
Non-destructive repartition script
rkhat said:
The only issue with Nexus 7 is that the recovery partition is between the system and cache partitions in the partition table.
Code:
Number Start End Size File system Name Flags
22 671088640B 1551892479B 880803840B ext2 system
23 1551892480B 2139095039B 587202560B ext4 cache
24 2147483648B 2148532223B 1048576B misc
25 2214592512B 2225078271B 10485760B recovery
Click to expand...
Click to collapse
Have another look at the table - recovery is not between the system and cache partitions.
k23m said:
No, there is no way to unbrick the tablet.
Click to expand...
Click to collapse
I wrote it a year ago, but now we do have a way to unbrick the tablet, so read on and feel free to experiment
wline said:
I have read on a few websites that Android Oreo doesn't use the cache partition anymore. If this is true, could it also be simply removed instead of moved ?
Click to expand...
Click to collapse
Good point. N7's cache is oversized anyway, all my relatively new Xiaomi phones use only 256MB cache. There is no need for complex re-partitioning if we opt for decreased cache. I just did this...
Code:
Number Start End Size File system Name Flags
22 640MiB 1780MiB 1140MiB ext2 system
23 1780MiB 2040MiB 260MiB ext4 cache
24 2048MiB 2049MiB 1.00MiB misc
25 2112MiB 2122MiB 10.0MiB recovery
Code:
Filesystem Size Used Available Use% Mounted on
/dev/block/mmcblk0p30
26.4G 7.0G 19.4G 27% /data
/dev/block/mmcblk0p22
1.1G 607.0M 517.3M 54% /system
/dev/block/mmcblk0p23
258.8M 19.0M 226.7M 8% /cache
Now I have 1.1GB non-destructively resized system and 260MB cache. No changes to other partitions and original OS still works without any backup/restore. It was only a test because personally I have no need for larger system partition. I install LineageOS with pico gapps and later add other Google apks as non-system in the data partition space. I attached a script for the 1.1GB/260MB re-partition. While it is non-destructive, you should do a backup and copy it to your PC first.
Use the latest TWRP and just install sysrepart.zip. The script will create a backup of your original gpt partition table and a log file in the root of internal storage. If you have any issues, post the log.
If you wish to restore original partitioning, install sysrepartundo.zip. This script will attempt to non-destructively resize system again but if you installed some mega-gapps, it will obviously fail. In this case, use TWRP and manually format the system partition, then restore system's backup.
:good:
k23m said:
Have another look at the table - recovery is not between the system and cache partitions.
Click to expand...
Click to collapse
That was a typo. It should be between system and userdata because I am taking from userdata to increase the system partition. I'll edit the main post.
k23m said:
I wrote it a year ago, but now we do have a way to unbrick the tablet, so read on and feel free to experiment
Click to expand...
Click to collapse
Is your guide for soft-unbrick only?
I don't think fastboot can resize or rename a partition. So if you resized the recovery partition to a smaller size or forgot to name a partition "recovery", will your solution be able to handle these situations?

[TUTORIAL] How to resize system partition on Galaxy S3 for larger GAPPS

On newer Android versions, the system occupies more of the system partition and with GAPPS upgrades, larger GAPPS packages (such as stock and mini) cannot fit on the system partition of the 2012 Galaxy S3. You can just use pico or nano, but sometimes you want the full GAPPS, the real deal. This is also necessary for upcoming ROMs that come with GAPPS preinstalled, such as Pixel Experience. To do this, you must resize the system partition. You can do this by taking some of the space from the cache partition and giving it to the system partition.
PLEASE NOTE: This process is not risk-free! If you do not know what you are doing, I strongly advise against this procedure. I am not responsible for any bricked devices or issues you may face. You have been warned.
Requirements:
A Samsung Galaxy S3. I have the i9300 model, where I have tested it.
parted, downloadable from here. If it downloads as a txt file, delete the extension by renaming it without the txt.
TWRP installed on your device (available for i9300 from here.)
A computer with ADB installed and relevant drivers.
First of all, you must boot TWRP. Once booted, wipe all partitions in TWRP, including system. Reboot back into recovery. Then go into mount and deselect all devices, and uncheck the box saying "Mount system partition as read-only"
Secondly, connect your S3 and send parted to the device with the following command:
Code:
adb push <path_to_parted> /
Thirdly, enter the ADB shell with the following command:
Code:
adb shell
Now, give executable permission to the parted file with the following command:
Code:
chmod +x parted
Now run:
Code:
./parted /dev/block/mmcblk0
Run the print command and you will get a list of partitions. It should look something like:
Code:
Model: MMC VTU00M (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194kB 8389kB 4194kB BOTA0
2 8389kB 12.6MB 4194kB BOTA1
3 12.6MB 33.6MB 21.0MB ext4 EFS
4 33.6MB 41.9MB 8389kB PARAM
5 41.9MB 50.3MB 8389kB BOOT
6 50.3MB 58.7MB 8389kB RECOVERY
7 58.7MB 92.3MB 33.6MB RADIO
8 92.3MB 1166MB 1074MB ext4 CACHE
9 1166MB 2777MB 1611MB ext4 SYSTEM
10 2777MB 3364MB 587MB ext4 HIDDEN
11 3364MB 3372MB 8389kB OTA
12 3372MB 15.8GB 12.4GB ext4 USERDATA
Make a note of the Start and End points for partitions 8 and 9 (CACHE and SYSTEM). In my case, the start and end points for partition 8 are 92.3 and 1166 and the start and end points for partition 9 are 1166 and 2777.
What we're going to do is delete these two partitions, then recreate them, but make the new partition 8 (Cache) smaller and allocate the space left to partition 9 (System).
Remove them with the following commands in parted:
Code:
./parted /dev/block/mmcblk0 rm 8
./parted /dev/block/mmcblk0 rm 9
Now recreate them with the following commands:
Code:
./parted /dev/block/mmcblk0 mkpart primary <cache_start> <cache_start+200>
./parted /dev/block/mmcblk0 mkpart primary <cache_end> <system_end>
Replace <cache_start> with the start of the former cache petition. In my case, it would be:
Code:
./parted /dev/block/mmcblk0 mkpart primary 92.3 292
./parted /dev/block/mmcblk0 mkpart primary 292 2777
Now name the partitions.
Code:
./parted /dev/block/mmcblk0 name 8 CACHE
./parted /dev/block/mmcblk0 name 9 SYSTEM
Then format them as ext4:
Code:
mke2fs -T ext4 /dev/block/mmcblk0p8
mke2fs -T ext4 /dev/block/mmcblk0p9
Run ./parted, followed by print, to check if the changes have been applied. If so, well done! You have successfully enlarged the system partition. Exit parted with the quit command.
Now configure and exit:
Code:
mount -a
exit
Reboot back into recovery and install any ROM of your choice. Once you've installed the ROM, reboot into recovery once again, and navigate to wipe --> advanced wipe, select system, tap repair or change filesystem, then resize.
You can now install any GAPPS of your choice. I've gotten LineageOS 16.0 working with mini gapps (Google Play Store + some Google apps) and it is working fine. You could make the system partition bigger by borrowing some more MB from the cache partition, or experimenting further by taking some from the HIDDEN partition. Remember, I am NOT responsible for any damage done when doing this. You assume full responsibility for any problems with the device. I hope this tutorial did help you, feel free to post here if it did or ask for help if you need it.
Did you experiment this process for a long time ? With so small a cache what could be the consequences ?
A finally do you know what is the use of HIDDEN partition ?
Great tutorial anyway.
barbe31 said:
Did you experiment this process for a long time ? With so small a cache what could be the consequences ?
Click to expand...
Click to collapse
Newer Android versions don't use up as much in the cache partition. If you're on say stock ICS or JB you may encounter some issues but if you're using LOS 15 or 16 it should work fine. I've used LOS 16 with GAPPS using this method for a while on my S3 and it's been fine.
ChasTechProjects said:
parted, downloadable from here.
Click to expand...
Click to collapse
Link says file doesn't exist.
petera703 said:
Link says file doesn't exist.
Click to expand...
Click to collapse
parted
drive.google.com
Cheers for that. I've been trying for some time to do the same thing on a Galaxy S4 Mini, working from a few variations of this process that I've found here and there, but never with any success. All appears to go well, with no errors, but it doesn't stick--the device just reverts to the previous partition sizes on reboot..
I've been using parted 3.2. I wondered if it would work with the parted you were using, but the one from your new link is 1.8 and doesn't even get as far for me (tried that one previously and it gets errors on my device).
If anyone know how to overcome the issue of resized partitions not surviving a reboot on Android, please help! I've been unable to solve it.
If it was plain Linux, it would be something to do with fstab, but fstab is never mentioned in the posts where people succeed in resizing Android partitions, so I think it must be something else, and perhaps something that varies from one device to another. Looking forward to any suggestions--thanks!
Can this idea/technique be applied to other *droid based devices
like Nook HD ?
[ Having same 'not enough space for the gaps' issue]

Install original firmware

Hi. I had lineage os installed on my phone. Now i want to restore it to original. I can flash original firmware from there https://developers.google.com/android/images#occam without any error. The problem is during boot. It boot endless. I wait couple hours without any effect. I installed twrp and check partitions but it looks ok
Bash:
~ # ./parted /dev/block/mmcblk0 p
Model: MMC 016G92 (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.2MB 524kB sbl1
3 68.2MB 68.7MB 524kB sbl2
4 68.7MB 70.8MB 2097kB sbl3
5 70.8MB 71.3MB 524kB tz
6 71.3MB 94.4MB 23.1MB boot
7 94.4MB 117MB 23.1MB recovery
8 117MB 118MB 799kB m9kefs1
9 118MB 119MB 799kB m9kefs2
10 119MB 120MB 799kB m9kefs3
11 120MB 121MB 524kB rpm
12 121MB 121MB 524kB aboot
13 121MB 122MB 524kB sbl2b
14 122MB 124MB 2097kB sbl3b
15 124MB 124MB 524kB abootb
16 124MB 125MB 524kB rpmb
17 125MB 125MB 524kB tzb
18 125MB 126MB 524kB metadata
19 126MB 143MB 16.8MB misc
20 143MB 159MB 16.8MB ext4 persist
21 159MB 1040MB 881MB ext4 system
22 1040MB 1627MB 587MB ext4 cache
23 1627MB 7817MB 6190MB ext4 userdata
24 7817MB 7818MB 524kB DDR
25 7818MB 7818MB 507kB grow
Do you have any idea what is wrong?
skoczo said:
Hi. I had lineage os installed on my phone. Now i want to restore it to original. I can flash original firmware from there https://developers.google.com/android/images#occam without any error. The problem is during boot. It boot endless. I wait couple hours without any effect. I installed twrp and check partitions but it looks ok
Bash:
~ # ./parted /dev/block/mmcblk0 p
Model: MMC 016G92 (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.2MB 524kB sbl1
3 68.2MB 68.7MB 524kB sbl2
4 68.7MB 70.8MB 2097kB sbl3
5 70.8MB 71.3MB 524kB tz
6 71.3MB 94.4MB 23.1MB boot
7 94.4MB 117MB 23.1MB recovery
8 117MB 118MB 799kB m9kefs1
9 118MB 119MB 799kB m9kefs2
10 119MB 120MB 799kB m9kefs3
11 120MB 121MB 524kB rpm
12 121MB 121MB 524kB aboot
13 121MB 122MB 524kB sbl2b
14 122MB 124MB 2097kB sbl3b
15 124MB 124MB 524kB abootb
16 124MB 125MB 524kB rpmb
17 125MB 125MB 524kB tzb
18 125MB 126MB 524kB metadata
19 126MB 143MB 16.8MB misc
20 143MB 159MB 16.8MB ext4 persist
21 159MB 1040MB 881MB ext4 system
22 1040MB 1627MB 587MB ext4 cache
23 1627MB 7817MB 6190MB ext4 userdata
24 7817MB 7818MB 524kB DDR
25 7818MB 7818MB 507kB grow
Do you have any idea what is wrong?
Click to expand...
Click to collapse
If your stock firmware installed correctly you shouldn't have root any longer. How did you install TWRP? How did you install your firmware? flash-all.bat?
Tulsadiver said:
If your stock firmware installed correctly you shouldn't have root any longer. How did you install TWRP? How did you install your firmware? flash-all.bat?
Click to expand...
Click to collapse
So when i figure out that stock rom don't want to boot i installed twrp from command line by
Code:
sudo fastboot flash recovery twrp-3.5.0_9-0-mako.img
to check partitions.
I installed stock rom by executing
Code:
sudo ./flash-all.sh
I see that i have 16G version but from partitions it looks like 8G version. Can it be a problem? How to restore partitions to original?
Your firmware should take care of everything. Did you edit the flash-all.sh? Take off the -w?
I've never used sudo before when flashing mine.
Tulsadiver said:
Your firmware should take care of everything. Did you edit the flash-all.sh? Take off the -w?
I've never used sudo before when flashing mine.
Click to expand...
Click to collapse
No i didn't edit files from google. Sudo is needed for fastboot execution on my system(manjaro). Then this command is run with higher privileges.
skoczo said:
No i didn't edit files from google. Sudo is needed for fastboot execution on my system(manjaro). Then this command is run with higher privileges.
Click to expand...
Click to collapse
Have you tried a factory reset from within TWRP?
It's been a while since I've had a working TWRP.
Tulsadiver said:
Have you tried a factory reset from within TWRP?
It's been a while since I've had a working TWRP.
Click to expand...
Click to collapse
Tulsadiver said:
Have you tried a factory reset from within TWRP?
It's been a while since I've had a working TWRP.
Click to expand...
Click to collapse
I have some progress. I run stock firmware but with some additional steps. This is what i did:
- install stock rom
- install clockwork or twrp
- boot to clockwork
- start `adb shell`
- execute `mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p23` in shell
But if i flash it again i need to do this procedure again. I don't understand why. I can't also do factory reset in twrp because it shows that can't mount some partitions.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I can do factory reset after calling `mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p23` in adb shell
I started stock android and did some configuration. It looks that system is working. Now as a test i flash stock firmware again and i have boot loop again. Probably i need do the procedure one again. Do you have any idea why? And how to fix this? i see that cache also can't be mounted after flash stock rom so i did `mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p22` and now it can be mounted. But why i need to do this? Why stock rom is not working? And this happen each time when i flash stock rom.
There is also such thing that if i don't execute `mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p2` after flashing lineage os is showing screen that device is encrypted. Then i need to login do adb shell and execute mke2fs. This is wired that i need to do this every time when i flash device.
skoczo said:
I see that i have 16G version but from partitions it looks like 8G version. Can it be a problem? How to restore partitions to original?
Click to expand...
Click to collapse
You can find the Solution here:
[TUTORIAL]How to unbrick your N4
How to unbrick your N4 I'm not responsible for anything that happens with your device! I accidently flashed a S4 ROM. After I noticed that, I tried to flash a factory image, but it booted for a very long time and WiFi, signal and other radio...
forum.xda-developers.com
Akhilesh S V said:
You can find the Solution here:
[TUTORIAL]How to unbrick your N4
How to unbrick your N4 I'm not responsible for anything that happens with your device! I accidently flashed a S4 ROM. After I noticed that, I tried to flash a factory image, but it booted for a very long time and WiFi, signal and other radio...
forum.xda-developers.com
Click to expand...
Click to collapse
I solve my problem by following this instruction https://forums.androidcentral.com/n...3923-guide-nexus-4-factory-image-restore.html
I think that key was those commands:
- fastboot erase boot
- fastboot erase cache
- fastboot erase recovery
- fastboot erase system
- fastboot erase userdata
- fastboot oem lock
- fastboot oem unlock

Categories

Resources