[HOWTO] Convert your Optimus G to a Nexus 4 and Back - AT&T LG Optimus G

DISCLAIMER: THIS IS VERY DANGEROUS COMPARED TO A NORMAL ROM FLASH. DO NOT DO THIS IF YOU DON'T KNOW WHAT YOU'RE DOING OTHER THAN FLASHING ROMS.
IF SOMETHING GOES WRONG, YOU HAVE ONLY YOURSELF TO BLAME. YOU HAVE BEEN WARNED.[/B]
To convert to Nexus 4
First off, there are a few issues.
-SDCard doesn't work.
-Capacitive buttons aren't working. No known way to fix it.
First off, lets flash the N4 Rom.
1) Install LGNPST - Use tSilenzio's AutoLGNPST - http://www.oudhitsquad.com/android/LGE/Firmware/Tools/AutoLGNPST-tSilenzio.zip
2) Download the Nexus 4 Image - https://www.androidfilehost.com/?fid=9390248398092765463
3) Rename the extracted .tot file to a .bin file
4) Put the phone in Download mode. Volume Up + Volume Down While inserting USB cable.
5) Open LGNPST and select the phone - Should be Com[Number]
6) In the DLL section, select LGNPST_LS970.dll
7) In the file selection, select the previously renamed Nexus 4 bin file.
8) Start the flashing process and hold your breath.
9) When it hits 67%, your phone should start booting. DO NOT UNPLUG YET.
10) At 85%, an error will occur saying that the phone was unplugged. Ignore it and close LGNPST. The image is fully flashed.
11) Hold Volume Up + Power to put the phone into FASTBOOT mode.
12) Download the recovery from here and place it into your fastboot directory. - http://forum.xda-developers.com/showthread.php?t=2010984
13) Download the following 3 files and place them on the MicroSD card. - http://d-h.st/cFA - http://d-h.st/yUQ - http://d-h.st/0dH
14) While still in fastboot, type "fastboot boot recovery.img" - This will put the phone on the custom recovery. Make sure the SD card is in.
---Here, we're going to fix the partition tables for 16GB of space and replace the backup GPT so that we can't hardbrick from the backup GPT.
15) Run adb shell to get into a root shell in recovery.
16) Copy the modified DD onto the phone
Code:
# cp /external_sd/dd /
# chmod 755 /dd
17) Backup the partition tables incase something goes wrong.
Code:
# /dd if=/dev/block/mmcblk0 of=/external_sd/pgpt8G.img bs=512 count=34
# /dd if=/dev/block/mmcblk0 of=/external_sd/sgpt8G.img bs=512 skip=30777311
18) Unmount the filesystems so that you can overwrite the partition table.
Code:
# umount /data
# umount /cache
19) Make sure nothing is mounted. It should return this (Other than partition size):
Code:
# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 911.7M 48.0K 911.6M 0% /dev
/dev/block/mmcblk1p1 59.4G 4.8G 54.6G 8% /external_sd
20) Move the partitions to their new locations. This may take a couple minutes.
Code:
# /dd if=/dev/block/mmcblk0 of=/external_sd/DDR bs=512 skip=15267840 count=2015
# /dd if=/external_sd/DDR of=/dev/block/mmcblk0 bs=512 seek=30775296 conv=notrunc
21) Install the new partition tables.
Code:
# /dd if=/external_sd/sgpt16G.img of=/dev/block/mmcblk0 bs=512 seek=30777311 conv=notrunc
# /dd if=/external_sd/pgpt16G.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc
22) Make sure no errors occurred. Run 'parted /dev/block/mmcblk0' and check that it returns the same as the below.
Code:
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) p
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 15.8GB 14.1GB ext4 userdata
24 15.8GB 15.8GB 524kB DDR
25 15.8GB 15.8GB 507kB grow
23) If something different was returned, run the below code to restore the previous partition tables.
Code:
# /dd if=/external_sd/sgpt8G.img of=/dev/block/mmcblk0 bs=512 seek=30777311 conv=notrunc
# /dd if=/external_sd/pgpt8G.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc
24) Exit the shell and type 'adb reboot bootloader' or reboot the phone while holding Volume Up.
25) Check that you're in fastboot mode and exit the following commands - This will fix the filesystem to take up the entire partition.
Code:
fastboot erase userdata
fastboot format userdata
fastboot -w
26) Boot the phone and update as needed. Then, put this on the phone and flash in recovery.
27) You are now working other than the SD card and Capacitive buttons.
Credits:
http://forum.xda-developers.com/showthread.php?t=2117576
http://forum.xda-developers.com/showthread.php?t=2099784
http://forum.xda-developers.com/showthread.php?t=2160124
http://forum.xda-developers.com/showthread.php?t=2146816
To convert from Nexus 4
This assumes that you have read the Convert to section.
1) Wipe the phone. Go into fastboot mode [Vol Up + Power] and execute the following commands. This is to prevent corrupted data partitions.
Code:
fastboot -w
fastboot format system
fastboot format userdata
fastboot format cache
fastboot format data
fastboot erase system
fastboot erase userdata
fastboot erase cache
fastboot erase data
2) LGNPST back to stock. You will do this twice to fix some issues.
To get into download mode, turn the phone off and hold Vol Up + Vol Down while inserting the USB cable.
3) Download these 2 images. Mar. 8, 2013 and Sept. 29, 2012
4) Flash the Mar. 8, 2013 firmware in LGNPST (See above for how to flash firmware in LGNPST. As before, the phone will start booting at 67% and LGNPST will show an error at 85%. Ignore the error and close LGNPST.
5) Restart the phone in download mode and now flash the Sept. 29, 2012 firmware. If you don't, your /SDCARD may be corrupted and you cant root.
6) Root the phone and unlock the bootloader. See here
7) If that doesn't work, try Teenybin.
8) Some partitions are broken. Go into CWM recovery and open an 'adb shell'.
9) Execute the following code. This will backup the broken partitions and wipe them.
Code:
dd if=/dev/block/mmcblk0p15 of=/sdcard/mmcblk0p15.bak
dd if=/dev/block/mmcblk0p16 of=/sdcard/mmcblk0p16.bak
dd if=/dev/block/mmcblk0p19 of=/sdcard/mmcblk0p19.bak
mke2fs -T ext4 /dev/block/mmcblk0p15
mke2fs -T ext4 /dev/block/mmcblk0p16
mke2fs -T ext4 /dev/block/mmcblk0p19
---You should now be back to stock--- LGNPST again if you want 'True Stock'
Let me know if you see anything wrong and please leave nasty comments at the door.

Ok, granted. This is more about recovering from flashing to Nexus 4 than about flashing to it. Basically, DON'T DO IT, as it doesn't seem to be worth it. We have AOSP and Cyanogen, etc.
I just posted this because I bought a phone that was flashed and went through hours of work fixing it.
Please read this before you think about flashing. http://forum.xda-developers.com/showpost.php?p=36735476&postcount=149

Its not worth it so much now but it was great when first released and it doesn't take that long to revert your phone. I went back and fourth like 5 times and my phone is fine. I think there is a low chance of your phone bricking as long as you follow instructions. The conversion is still a good option to have.
Sent from my LG Optimus G using XDA Premium 4 mobile app

Dr0!dFreek said:
Its not worth it so much now but it was great when first released and it doesn't take that long to revert your phone. I went back and fourth like 5 times and my phone is fine. I think there is a low chance of your phone bricking as long as you follow instructions. The conversion is still a good option to have.
Sent from my LG Optimus G using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Yeah, it seems nice to have the ability to do so, which is why I wrote the guide (and to give a single comprehensive guide that works).
It's nice to have a perfectly working KitKat rom the day its released, which is why I converted (When KK was released), but now, it doesn't seem worth it (We have AOSP). If you want MultiRom and franco kernel (Like I did), then its nice to have, but otherwise, most people don't need it.

alastair53 said:
13) Download the following 3 files and place them on the MicroSD card. - http://d-h.st/cFA - http://d-h.st/yUQ - http://d-h.st/0dH
Click to expand...
Click to collapse
Is this part SPYWARE? the 3 files downloads a exe and is detetected as virus or something.

Related

[HOW-TO] Repartition NT Hard Disk: Media & Data Storage | 8/16 GB Nook Tablet

USE AT YOUR OWN RISK. You are responsible if you mess up your tablet.
NOTE: ONLY MESS WITH Partitions 10 & 11 (media and userdata)
This Wipe Data error E: format_volume: make_extf4fs failed on /dev/block/mmcblk1p2 is normal we all have it and it doesn't harm your device​
Repartitioning your Nook Tablet requires (you must have):
* ADB drivers working on your PC
* CWM installed either to Internal (EMMC) or SDCARD
BEFORE START:
Watch the whole video and read the post first, once done you are now ready to start!
Click to expand...
Click to collapse
Big Thanks to @meghd00t
1. BACKUP INTERNAL SDCARD AND ROM
* To backup your Internal SDcard a.k.a: /media partiton, MyNook, /emmc:
Connect your Nook Tablet to your PC via USB, Turn on USB storage and copy all your files from MyNook to a folder in your PC.
* To backup your current ROM:
Boot into CWM, then go to backup & restore >> backup (external SDcard) so you can restore your /data later on.
Please NOTE that if you don't have a larger sdcard you will have to backup your current ROM to Internal SDcard, in which case you must use the method above to copy the clockworkmod folder to your PC.
2.0 PREPARATION:
IF YOU COME FROM THE OLD REPARTITION METHOD...
Code:
> cd path-to-adb-drivers
[B]> adb shell[/B]
# parted /dev/block/mmcblk0
(parted) toggle 10 lvm
# quit
2.1 REPARTITION:
Code:
# sgdisk -e /dev/block/platform/mmci-omap-hs.1/mmcblk0
This will write the secondary gpt label and remove the parted prompt found error fix?
Code:
# sgdisk /dev/block/platform/mmci-omap-hs.1/mmcblk0 -d 11 -d 10
This will delete partition 10 & 11 media and userdata
Code:
# sgdisk /dev/block/platform/mmci-omap-hs.1/mmcblk0 -n 0:0:+12G -n 0:0:0
# sgdisk /dev/block/platform/mmci-omap-hs.1/mmcblk0 -c 10:media -c 11:userdata
This will re-create both media (change +12G to whatever you need) and userdata will use the rest, then it'll set the name of the partitions
3. REBOOT YOUR DEVICE INTO CWM:
Code:
Ctrl+c to exit shell mode
> adb reboot recovery
This will exit from shell mode and reboot into recovery again. If adb reboot recovery doesn't work for you then do it manually.
4. FORMAT PARTITIONS:
Code:
> adb shell
# mkdosfs -F32 -n MyNook /dev/block/mmcblk0p10
# make_ext4fs -L userdata /dev/block/mmcblk0p11
Ctrl+c to exit shell mode
> adb reboot
> adb kill-server
This will start adb shell mode, format partition 10 to FAT32, format partition 11 to EXT4, exit shell mode, reboot your device to system and stop adb server from keep running.
5. RESTORE YOUR DATA
Reboot back into CWM recovery
CWM >> backup and restore >> Advanced restore >> /data
Click on this link to see the Old Method
~ Veronica
This ought to be stickied. I assume this will also work for the 8GB NT, although of course numbers need to change to reflect the fact that it's only 8GB.
Old Method
Hello, i decided to create this thread as the OP in this one hasn't been Updated with the solution for Repartiton your 16GB Nook Tablet and i see there is still people asking about how to do this and i've had to give the link of the "hidden" post over and over again.
Big Thanks to @tselling for put in risk his NT and post instructions for this, please go here and Thank him!​
Repartitioning your Nook Tablet requires (you must have):
* ADB drivers working on your PC
* CWM installed either to Internal (EMMC) or SDCARD
* Tools: parted, tune2fs, e2fsck << Download this ONLY if you need them: parted is not found,etc
Boot into CWM, then go to backup & restore >> backup or backup to internal so you can restore /data after the repartitioning process since we are going to delete and recreate it.
IT DOESN'T MATTER WHAT ROM YOU HAVE INSTALLED, THE PROCESS IS MADE WHILE IN CWM SO MEDIA AND DATA PARTITIONS ARE NOT BEING USED
THIS PROCEDURE IS NOT REVERSIBLE UNLESS YOU RUN THE RIGHT COMMANDS TO REVERT THE PARTITIONS BACK TO DEFAULT SIZE​
Here is a quick summary: Start parted on mmcblk0 from adb shell. Fix the errors. Delete partition 11 (userdata). Resize partition 10 (media) to make it larger... use the original start position and change the end position to make it the size you want. Recreate partition 11... use the end position from partition 10 as the new start position and use the original end position. Name partition 11 "userdata". Print the partition table along the way to make sure that its what you want. Exit parted. Use tune2fs and e2fsck to convert the ext2 partition back to an ext4 partition. Reboot back into CWM, restore your data partition and then reboot.
Click to expand...
Click to collapse
HOW DO I REVERT THIS PROCESS BACK TO STOCK???
"The bold text is the prompt and commands. The non-bold parts are screen output"​
Remember that userdata is where most apps install. If you install alot of games you don't want to reduce it too far, 2.5GB - 2GB is probably ok for most people.
~ $ cd path-to-adb-drivers
ONLY IF YOU GET parted: not found: * You should had downloaded NT_repartition_files.zip uncompressed it and placed the files where adb is located already *​~ $ adb push parted /system/bin * tune2fs and e2fsck may or may not be needed *​~ $ adb push tune2fs /system/bin
~ $ adb push e2fsck /system/bin
Click to expand...
Click to collapse
~ $ adb shell
* daemon not running. starting it now on port xxxx *
* daemon started succesfully *
~ # 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
print
print
Error: The backup GPT table is not at the end of the disk, as it should be.
This might mean that another operating system believes the disk is smaller.
Fix, by moving the backup to the end (and removing the old backup)?
Fix/Ignore/Cancel? f
f
f
Warning: Not all of the space available to /dev/block/mmcblk0 appears to be
used, you can fix the GPT to use all of the space (an extra 569312 blocks) or
continue with the current setting?
Fix/Ignore? f
f
f
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 2684MB 1074MB fat32 media
11 2684MB 15.6GB 12.9GB ext4 userdata
(parted) rm 11 * This will remove partition #11 *​rm 11
rm 11
(parted) resize * You're entering to resize mode *​resize
resize
Partition number? 10 * Partition #10 will be resized *​10
10
Start? [1611MB]? * <---| enter *​
End? [2684MB]? 11.6GB * Give a value between 11.6 and 13.6 that will leave you with>> 11.6GB: 4GB for /userdata | 13.6: 2GB for /userdata *​11.6GB
11.6GB
(parted) p
p
p
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 11.6GB 9989MB fat32 media msftres
(parted) mkpartfs primary ext2 * This will re-create partition #11 in the empty space and format it to ext2 *​mkpartfs primary ext2
mkpartfs primary ext2
Start? 11.6GB * This value must concide with what you set in End? [2684MB]? 11.6GB before *​11.6GB
11.6GB
End? 15.6GB * This value can't be changed. Must be 15.6GB *​15.6GB
15.6GB
(parted)
(parted) p
p
p
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 11.6GB 9989MB fat32 media msftres
11 11.6GB 15.9GB 4326MB ext2
(parted) name 11 userdata * This will name partition #11 "userdata" *​name 11 userdata
name 11 userdata
(parted) p
p
p
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 11.6GB 9989MB fat32 media msftres
11 11.6GB 15.9GB 4326MB ext2 userdata
(parted) quit
quit
quit
Information: You may need to update /etc/fstab.
~ # tune2fs -j /dev/block/mmcblk0p11 * From here the convertion process of partition #11 to ext4 has started *​tune2fs -j /dev/block/mmcblk0p11
tune2fs 1.41.6 (30-May-2009)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first. Use tune2fs -c or -i to override.
~ # e2fsck -fDp /dev/block/mmcblk0p11
e2fsck -fDp /dev/block/mmcblk0p11
/dev/block/mmcblk0p11: 11/529056 files (0.0% non-contiguous), 49429/1056092 blks
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p11
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p11
tune2fs 1.41.6 (30-May-2009)
Please run e2fsck on the filesystem.
~ # e2fsck -fDp /dev/block/mmcblk0p11
e2fsck -fDp /dev/block/mmcblk0p11
/dev/block/mmcblk0p11: Group descriptor 0 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 1 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 2 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 3 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 4 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 5 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 6 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 7 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 8 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 9 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 10 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 11 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 12 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 13 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 14 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 15 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 16 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 17 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 18 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 19 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 20 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 21 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 22 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 23 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 24 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 25 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 26 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 27 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 28 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 29 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 30 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 31 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Group descriptor 32 checksum is invalid. FIXED.
/dev/block/mmcblk0p11: Adding dirhash hint to filesystem.
/dev/block/mmcblk0p11: 11/529056 files (0.0% non-contiguous), 49429/1056092 bl
ks
~ # 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) p
p
p
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 11.6GB 9989MB fat32 media msftres
11 11.6GB 15.9GB 4326MB ext4 userdata
(parted) quit
quit
quit
Ctrl+c to exit shell mode
~ $ adb kill-server
Now reboot back into recovery (advanced option).
Go to backup & restore>> Advanced restore>> data to restore your data (apps), make sure you pick the correct folder of your latest backup, once done reboot system. ENJOY!
BONUS: Manage all your books including B&N downloads in calibre
Thanks to @roustabout
Also, once you've done this you can also shell in and
Code:
$ adb shell
# cd /data/media/B&N Downloads
# rm -r *
# cd ..
# rmdir B&N Downloads
# ln -s "/media/B&N Downloads" "B&N Downloads"
Ctrl+c to exit shell mode
$ adb kill-server
This points your B&N library to your /media folder for downloading, helpful if you want to manage all your books in Calibre.
~ Veronica
I am sorry for noob question, but is this a tutorial on how to expand that miserable 1gb user data space and steal more space from 12gb locked internal memory?
schtuka said:
I am sorry for noob question, but is this a tutorial on how to expand that miserable 1gb user data space and steal more space from 12gb locked internal memory?
Click to expand...
Click to collapse
lol yes Mr.
~ Veronica
too much text. someone make a youtube video. tks.
xdahgary said:
too much text. someone make a youtube video. tks.
Click to expand...
Click to collapse
strictlyrude27 said:
For ****'s sake. It's a bunch of commands you enter on the command line. OF COURSE THERE'S A LOT OF TEXT.
Click to expand...
Click to collapse
Actually the commands are few...
"The bold text is the prompt and commands. The non-bold parts are screen output".
I did it in less than 10 minutes and reading the tutorial twice.
~ Veronica
Like a charm. So happy. F bn
In the guys defense, not having ever used adb before, it took me about 30 minutes to do it last night. I had a hard time figuring out how to make the computer see the Nook while in CWR. Once I got that figured out, it went pretty fast.
Ok, I am trying to follow the instructions before actually doing it ... bear with me..
So I boot in CWM Recovery.
Do the backup.
Then what? Open cmd on my computer and go to shell?
I am familiar with ADB, but I am confused about at what point in the script you change the size of media 10 and data 11...... I see that 2GB of user data 11 will be enough for me. What size the media 10 should be? I remember from GParted that you have to divide equally the space....
Also, it says in the end of summary to reboot back to CWM. I thought we are in CWM doing the script the whole time. When did we reboot?
Thanks.
For noob like me, I actually wish to have some briefing about the commands. For example, in case I want to have less then 12GB of media data, 10GB may be, which number that I should change?
--------------
Edit: I guess
End? [2684MB]? 11.6GB
11.6GB
11.6GB
(parted) p
to
End? [2684MB]? 10GB
10GB
10GB
(parted) p
Correct me if I'm wrong. My NT is still on the way to my house
schtuka said:
Ok, I am trying to follow the instructions before actually doing it ... bear with me..
So I boot in CWM Recovery.
Do the backup.
Then what? Open cmd on my computer and go to shell?
I am familiar with ADB, but I am confused about at what point in the script you change the size of media 10 and data 11...... I see that 2GB of user data 11 will be enough for me. What size the media 10 should be? I remember from GParted that you have to divide equally the space....
Also, it says in the end of summary to reboot back to CWM. I thought we are in CWM doing the script the whole time. When did we reboot?
Thanks.
Click to expand...
Click to collapse
After the backup you plug your NT to your computer (you must have adb working already) open the cmd on windows and "cd" to the path of adb files then "adb shell" as explained in the tutorial.
You first resize/extend media partition (10) because that is the one mounts in your PC ("MyNOOK")
The part that the size is changed for /media is here:
(parted) resize
resize
resize
Partition number? 10
10
10
Start? [1611MB]?
End? [2684MB]? 11.6GB >> in this part 11.6GB is set to leave 4gb for userdata, i personally set it to 13.6GB so that leave 2GB for userdata as i don't install heavy apps and games like crazy.
11.6GB
11.6GB
The userdata partition is recreated after with what is left:
Start? 11.6GB >> as you can see its the same value that was set before in End? [2684MB]? 11.6GB of the /media partition
11.6GB
11.6GB
End? 15.6GB
15.6GB
15.6GB
As stated in the tutorial this is made while in CWM , you reboot back into it just to restore your data,nothing else. Let's put it this way when the windows updates install in your PC it ask you to reboot right? Sometimes reboots are required why? don't ask just do it is easy and it won't harm your device gee
~ Veronica
camapghe said:
For noob like me, I actually wish to have some briefing about the commands. For example, in case I want to have less then 12GB of media data, 10GB may be, which number that I should change?
--------------
Edit: I guess
End? [2684MB]? 11.6GB
11.6GB
11.6GB
(parted) p
to
End? [2684MB]? 10GB
10GB
10GB
(parted) p
Correct me if I'm wrong. My NT is still on the way to my house
Click to expand...
Click to collapse
hMM I THINK YOU'RE CONFUSED this is for users that want their /media partition bigger not /userdata (we are shortening userdata) why would you want this? simple because you can copy all your media: music, videos, movies, books, etc. to /media (which mounts to your PC as MyNOOK) so you don't use your sdcard to host them all.
Userdata is where apps install when you download them so think first of a size that works for you, and what partition you think you will give it more use.
~ Veronica
@Veronica: I'm confused indeed. I usually install tons of games + apps on my phone. That's why I don't want the partition where device stores those things internally small.
I guess I just follow exactly (and blindly) to the tut. Professional guys here must be right.
xdahgary said:
too much text. someone make a youtube video. tks.
Click to expand...
Click to collapse
FYI, if you ever unlock bootloader, install CWM, root and install custom ROM for a HTC Wildfire S from scratch, I swear you will just bang the phone up
Just out of curiosity, as I have not done this before, but can you string commands together with ampersands as you can in a Linux Bash terminal? If so, it could be one (albeit very long) command...
Thank you Veronica. I will try it at work right now. 6LV26081EP701653Y
So I did everything according to OP. Within CWM went to Advanced/Reboot to recovery/restore
Trying to restore my backup and I am getting:
Erasing boot before restore...
Restoring boot image...
Restoring system...
Restoring data...
E:format_volume: make_extf4fs failed on /dev/block/platform/mmci-omap-hs.1/by-name/userdata
Error while formatting /data
E:Can't open /cache/recovery/log
E:Can't open /cache/recovery/log
E:Can't open /cache/recovery/last_log
....... help?....
I still have your ROM on sdcard. Should I try to install it instead of backup?
Tried to install your ROM from sdcard. Rebooted and now just sitting on white NOOK screen.
Am I FUBARed? I can't get to CWM.
schtuka said:
Thank you Veronica. I will try it at work right now. 6LV26081EP701653Y
So I did everything according to OP. Within CWM went to Advanced/Reboot to recovery/restore
Trying to restore my backup and I am getting:
Erasing boot before restore...
Restoring boot image...
Restoring system...
Restoring data...
E:format_volume: make_extf4fs failed on /dev/block/platform/mmci-omap-hs.1/by-name/userdata
Error while formatting /data
E:Can't open /cache/recovery/log
E:Can't open /cache/recovery/log
E:Can't open /cache/recovery/last_log
....... help?....
I still have your ROM on sdcard. Should I try to install it instead of backup?
Tried to install your ROM from sdcard. Rebooted and now just sitting on white NOOK screen.
Am I FUBARed? I can't get to CWM.
Click to expand...
Click to collapse
Something you did wrong while using the commands can you tell me the values that you gave to /media and /userdata please.
Turn off your device, turn it on by long pressing power and "N" button for 5 seconds (let me know if you get the white screen with the box), then let go power and N buttons and it ishould boot into CWM after that box.
Other alternative if you cant boot internally to CWM is to prepare an sdcard and boot into CWM from there.
You need to get into CWM.
I used same numbers as in OP. I mean just copy and paste from OP.
Yeah. I got to CWM what should I do now?
Thanks
schtuka said:
I used same numbers as in OP. I mean just copy and paste from OP.
Yeah. I got to CWM what should I do now?
Thanks
Click to expand...
Click to collapse
wipe cache and advanced> dalvik cache.
Restore only data this way:
* Go to Backup&restore> Advanced restore> data
* wipe cache and dalvik again just in case (i always do that when restoring).
~ Veronica
Same error:
Restoring data...
E:format_volume: make_extf4fs failed on /dev/block/platform/mmci-omap-hs.1/by-name/userdata
Error while formatting /data
I think I made a mistake. Perhaps the usb drivers I used to format were not Nook Tablet specific. I have same computers at work and at home and once I got into ADB shell I thought it was good to go. Now I am looking at device manager and it is just says
-Android phone
Android composite ADB interface
Also looking through USBviewer I see too many Android devices. Including Nook Tablet USB Composite device connected and Nook Tablet ADB Interface not connected.

[unbrick] - Fixing partition table, or completely dead nook

An Unbrick Guide for 16GB Tablet. I am not responsible for damage, otherwise this should fix any damage. But am more than happy to help.
meghd00t's 8GB and 16GB partition rescue sdcard: http://forum.xda-developers.com/showthread.php?t=1562130
For whatever reason the repartitioning card didn't work on my 16gb tablet, which is why I had to do it manually.
When to use this guide
1. If you used parted to remove your entire partitions and cannot recreate them in parted
2. If 1 is true, and you can't boot into Clockworkmod
3. If 2 is true and nothing will boot at all--the only exception being booting from the sd card--and it just won't turn on at all and get into any splash screen.
4. If everything else has failed
5. If all the above are true but you can boot Clockworkmod from an sd card. This is important.
If your nook will boot into cwm, then your partitions are fine. If you would like to, however, you can still use this to fix your nook, but I insist you try other methods around the development section before trying this one. This is a long process, and most other solutions for an otherwise dead nook can easily be solved, and a lot faster. This should only be used as a last resort. Otherwise if you just want to experiment around a bit, feel free!
------
Okay. So, visit Goncezilla's thread on making a bootable cwm-sd:
http://forum.xda-developers.com/showthread.php?t=1446987
Download the files on the first method ("METHOD 1- SDCARD")
Instead of a 50mb partition, just make a 2gb partition, make sure it's formatted to fat32 and enable boot, and lba flags. I reccommend at least a 2gb microsd. Anyways, unzip the files that are provided, but put them in the root folder of the sd card, not "SDCARD". Make a folder called blk.
Go to lavero.burgos' topic on "restoring partitions with dd":
http://forum.xda-developers.com/showthread.php?t=1570022
Download the provided files: mmcblk0p1, mmcblk0p2, mmcblk0p3, and mmcblk0p4. Place them in the "blk" folder.
Download the two files provided by meghd00t here:
http://forum.xda-developers.com/showpost.php?p=24805392&postcount=74
unpack gdisk and sgdisk to the root folder of the sdcard. unpack "scripts" into the same root folder of the sdcard. Don't worry about the mess. Now make sure your nook is off by pressing and holding the power button for like 15 seconds. Then, insert the the microsd card into your nook. Connect the cable to the nook and either to the wall adapter or to your box. Let it boot into cwm. Once in, open up a terminal. First thing you want to do:
Code:
$ adb start-server
$ adb devices
now make sure your device's serial number shows up, and that it shows your nook in recovery. Now, this next part is very important. VERY important. I wish I would have done this before. But even so, there is always hope!~ But still, make sure you follow this next step:
Code:
$ adb shell
~ # mount sdcard
~ # dd if=/dev/block/mmcblk0p5 of=/sdcard/blk/mmcblk0p5
This will backup your rom partition, which holds important information, like serial no. and MAC address. You'll be happy you did this before.
**Note, if it brings up an error, make sure the sdcard is mounted, try again, and cd over to /sdcard/blk to make sure that the rom partition is there safely. If it brings up an error and everything is mounted, try changing the extension name to "mmcblk0p5.img" when you use disk dump.
Optionally, it might be smart to backup the rom partition to your computer:
Code:
~ # exit
$ adb pull /sdcard/blk/mmcblk0p5 /path/to/backup
So now, you've got all the files you need. For the sake of argument, I'll assume you have made a cwm backup before your nook died. So, go ahead and destroy your nook completely:
Code:
~ # cd sdcard
/sdcard # ./sgdisk -Z /dev/block/mmcblk0
And now re-create it:
Code:
/sdcard # ./sgdisk /dev/block/mmcblk0 -a 256 -n 1:256:511 -n 0:0:1023 -n 0:0:31743 -n 0:0:65535 -n 0:0:163839 -n 0:0:262143 -n 0:0:1019903 -n 0:0:2273279 -n 0:0:3145727 -n 0:0:+12G -n 0:0:0
This is a lot easier than re-creating the partitions with parted by the way. I'd like to give a special shout out to meghd00t for compiling these static binaries for ARM. Thanks! This is a full stock partition, if you want meghd00t's 10gb media, 2.8gb userdata partitions:
Code:
/sdcard # ./sgdisk -c 1:xloader -c 2:bootloader -c 3:recovery -c 4:boot -c 5:rom -c 6:bootdata -c 7:factory -c 8:system -c 9:cache -c 10:media -c 11:userdata /dev/block/mmcblk0
Now follow up:
Code:
/sdcard # ./sgdisk -p /dev/block/mmcblk0
verify the list is correct. Now do this:
Code:
[b]/sdcard # cd /sdcard/sbin
/sdcard # ./genptable /tmp/genptable[/b]
This will create a partition table, the stock nook tablet modified gpt table in /tmp
Code:
/sdcard # mv /tmp/genptable /sdcard/blk
~ # dd if=/sdcard/blk/genptable of=/dev/block/mmcblk0
You now have your partition table back that will pass consistency checks! but we aren't done yet. We need to reformat everything:
Code:
/sdcard # cd sbin
/sdcard/sbin # ./mkdosfs -F 32 /dev/block/mmcblk0p5
/sdcard/sbin # ./mkdosfs -F 32 /dev/block/mmcblk0p6
/sdcard/sbin # ./mkdosfs -F 32 /dev/block/mmcblk0p10
/sdcard/sbin # cd ../../
~ # dd if=/sdcard/blk/mmcblk0p1 of=/dev/block/mmcblk0p1
~ # dd if=/sdcard/blk/mmcblk0p2 of=/dev/block/mmcblk0p2
~ # dd if=/sdcard/blk/mmcblk0p3 of=/dev/block/mmcblk0p3
~ # dd if=/sdcard/blk/mmcblk0p4 of=/dev/block/mmcblk0p4
~ # dd if=/sdcard/blk/mmcblk0p5 of=/dev/block/mmcblk0p5
Who just got their Serial number back. :]
Now this next part is confusing, but for some reason make_ext4fs didn't want to work for me, so I had to do it the painful way:
Code:
~ # parted /dev/block/mmcblk0
(parted) rm 7
(parted) rm 8
(parted) rm 9
(parted) rm 11
(parted) mkpartfs primary ext2 134MB 522MB
(parted) mkpartfs primary ext2 522MB 1164MB
(parted) mkpartfs primary ext2 1164MB 1611MB
Now the userdata partition all depends on how big you made your media partition. But I will go ahead and use the stock settings
Code:
(parted) mkpartfs primary ext2 2684MB 15.9GB
(parted) quit
~ # tune2fs -j /dev/block/mmcblk0p7
~ # e2fsck -fDp /dev/block/mmcblk0p7
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p7
~ # e2fsck -fDp /dev/block/mmcblk0p7
~
~ # tune2fs -j /dev/block/mmcblk0p8
~ # e2fsck -fDp /dev/block/mmcblk0p8
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p8
~ # e2fsck -fDp /dev/block/mmcblk0p8
~
~ # tune2fs -j /dev/block/mmcblk0p9
~ # e2fsck -fDp /dev/block/mmcblk0p9
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p9
~ # e2fsck -fDp /dev/block/mmcblk0p9
~
~ # tune2fs -j /dev/block/mmcblk0p11
~ # e2fsck -fDp /dev/block/mmcblk0p11
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p11
~ # e2fsck -fDp /dev/block/mmcblk0p11
~
~ # parted /dev/block/mmcblk0
[b]
(parted) name 7 factory
(parted) name 8 system
(parted) name 9 cache
(parted) name 11 userdata
[/b]
(parted) print
Now verify that your table looks like, or at least similar, to this. Basically, you want to make sure everything is formatted correctly:
Code:
Model: MMC 016G4A (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 2684MB 1074MB fat32 media
11 2684MB 15.9GB 12.9GB ext4 userdata
If something looks a bit off, go back and repeat the appropriate step.
Code:
(parted) quit
~ # umount sdcard
~ # exit
Go ahead and shut down the device. Remove the sdcard, and turn it back on with the power button.
Status: xloader, bootloader, recovery, and boot partitions were all flashed and should be working perfectly. Which means you have probably noticed yourself booting into cwm, which is a good sign!!
Now, insert an sdcard that has your original cwm backup. And go ahead and restore your backup. Wipe /cache. Reboot the nook. You should see a splash screen. Dead nook... alive!11!
That's pretty much it. I'm just happy my nook is working. Hopefully this will help someone out who has a dead nook and has no clue how to fix it, like I did. If you have any questions, let me know so I can try to help. If you notice an error or inconsistency in my guide, please let me know so I can fix it before someone breaks their nook because of me. Sorry about reformatting the ext4 partitions guys. Since make_ext4fs wouldn't work for me, that was the only other way I knew how to do it. If someone can post what they did to reformat to ext4 using make_ext4fs, I'll edit the post to accomodate everyone else.
Thanks to: meghd00t, lavero.burgos, AdamOutler, tselling, and CelticWebSolutions.
Thanks for finding time to make this.
All i can say is Bravo!
We need more of this guides coming up.
2TU!
Nice guide.....
Sent from my Non-B&N Tablet running CM7
Very nice guide for dead nook, may i advice you to put a link for meghd00t recovery for 8GB NT so 8gb users work with the proper cwm recovery for them. I will be linking to this guide in my Unbrick thread.
Also would be good if you advice people to try alternative methods if they don't have dead dead nooks and with this i mean people that their boot block(s) is working and they have just flashed wrong recovery or flashed a rom that they should had not. This is advanced and if people have messed enough with their devices to competely wipe the partitions and more then im sure they will have fun with this .
Big thanks to meghd00t for build the tools and the cwm recovery for 8GB NT.
~ Veronica
lavero.burgos said:
Very nice guide for dead nook, may i advice you to put a link for meghd00t recovery for 8GB NT so 8gb users work with the proper cwm recovery for them. I will be linking to this guide in my Unbrick thread.
Also would be good if you advice people to try alternative methods if they don't have dead dead nooks and with this i mean people that their boot block(s) is working and they have just flashed wrong recovery or flashed a rom that they should had not. This is advanced and if people have messed enough with their devices to competely wipe the partitions and more then im sure they will have fun with this .
Big thanks to meghd00t for build the tools and the cwm recovery for 8GB NT.
~ Veronica
Click to expand...
Click to collapse
Thanks!
I did try to say when to use the guide at the beginning but I will be more specific most definitely, to make sure users don't get confused!
demetris_I said:
Thanks for finding time to make this.
All i can say is Bravo!
We need more of this guides coming up.
2TU!
Click to expand...
Click to collapse
It was kind of hard, because I couldn't remember where all the topics I used went to. Like Goncezilla's cwm sd files. I couldn't find them anywhere! I apologize for taking so long though. I'm really lazy...... not my greatest strength1!
Thank you though! I'm glad I finally figured it out1; :]
okey, so I get this error:
/sdcard # ./sgdisk -Z /dev/block/mmcblk0
/sbin/sh: ./sgdisk: not found
EDIT: never mind it didn't mount the sdcard had to restart the computer and nook then it worked.
EDIT2: now I got this error
/sdcard # /sdcard/sbin/genptable
Usage /sdcard/sbin/genptable <raw_output_file>
/sdcard # mv /tmp/genptable /sdcard/blk
mv: can't rename '/tmp/genptable': No such file or directory
Pete1612 said:
okey, so I get this error:
/sdcard # ./sgdisk -Z /dev/block/mmcblk0
/sbin/sh: ./sgdisk: not found
EDIT: never mind it didn't mount the sdcard had to restart the computer and nook then it worked.
EDIT2: now I got this error
/sdcard # /sdcard/sbin/genptable
Usage /sdcard/sbin/genptable <raw_output_file>
/sdcard # mv /tmp/genptable /sdcard/blk
mv: can't rename '/tmp/genptable': No such file or directory
Click to expand...
Click to collapse
Did you do the genptable script?
EDIT: Aw, son of a..!! I messed up, hang on, give me a second.
EDIT 2: oKAY, I fixed it. I'm sorry about that, my mistake. i bolded the text so you can see what I fixed.
okey that worked and now I get this if I do dd:
~ # dd if=/sdcard/blk/mmcblk0p1 /dev/block/mmcblk0p1
BusyBox v1.19.4-cm7 static (2012-02-04 22:27 +0100) multi-call binary.
Usage: dd [if=FILE] [of=FILE] [ibs=N] [obs=N] [bs=N] [count=N] [skip=N]
[seek=N] [conv=notrunc|noerror|sync|fsync]
Copy a file with converting and formatting
if=FILE Read from FILE instead of stdin
of=FILE Write to FILE instead of stdout
bs=N Read and write N bytes at a time
ibs=N Read N bytes at a time
obs=N Write N bytes at a time
count=N Copy only N input blocks
skip=N Skip N input blocks
seek=N Skip N output blocks
conv=notrunc Don't truncate output file
conv=noerror Continue after read errors
conv=sync Pad blocks with zeros
conv=fsync Physically write data out before finishing
Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),
MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)
EDIT: It has to be dd if=/sdcard/blk/mmcblk0p1 of=/dev/block/mmcblk0p1 you forgot the of=
EDIT2: mkpartfs primary ext2 2684GB 15.9GB I think the 2684GB is supposed to mean mb
EDIT3: so after doing your tutorial my partition table looks like this:
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.3MB 33.6MB 17.3MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4
8 522MB 1164MB 642MB ext4
9 1164MB 1611MB 447MB ext4
10 1611MB 14.5GB 12.9GB fat32 media
11 14.5GB 15.9GB 1443MB ext4
as you can see a bunch of names for the partitions are missing, how can I name them
Pete1612 said:
EDIT: It has to be dd if=/sdcard/blk/mmcblk0p1 of=/dev/block/mmcblk0p1 you forgot the of=
Click to expand...
Click to collapse
Yeah, yeah laugh away. I always forget it, I'm just half dumb okay? <.<;
Pete1612 said:
EDIT2: mkpartfs primary ext2 2684GB 15.9GB I think the 2684GB is supposed to mean mb
Click to expand...
Click to collapse
The laughter doesn't stop. ;_;
Pete1612 said:
EDIT3: so after doing your tutorial my partition table looks like this:
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.3MB 33.6MB 17.3MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4
8 522MB 1164MB 642MB ext4
9 1164MB 1611MB 447MB ext4
10 1611MB 14.5GB 12.9GB fat32 media
11 14.5GB 15.9GB 1443MB ext4
as you can see a bunch of names for the partitions are missing, how can I name them
Click to expand...
Click to collapse
Ooh. I forgot about that!!! Thanks for reminding me actually. You know, you've helped me with a lot of errors I've made. :l Just go back into parted and do this:
Code:
(parted) name 7 factory
(parted) name 8 system
(parted) name 9 cache
(parted) name 11 userdata
And that should do it. Go into cwm and either flash an old backup or one of the other roms.
By the way, while you're at it, do me a favour. When in clockworkmod, on the terminal, if you enter "adb devices" does it show your nook with your original serial number? This is the part I am most concerned apart. I want to make sure the serial number stays intact.
And I'm sorry for taking so long to respond. I was replacing my stupid laptop's old keyboard. It had broken shift and backspace keys. Which is probably why I seemed illiterate most of the time.
okey so I did adb devices and I only get zeros, the problem is though I couldn't pull partition 5 from my nook because the partition table was completely destroyed (and as far as I know partition 5 has the serial number and the mac adress in it)
EDIT: so I tried to install CM 7.2 which was succesfull. Then I rebooted my nook and it goes into CWM (internal).
EDIT2: just tried the recovery bootloop fix and it didn't help
Pete1612 said:
okey so I did adb devices and I only get zeros, the problem is though I couldn't pull partition 5 from my nook because the partition table was completely destroyed (and as far as I know partition 5 has the serial number and the mac adress in it)
EDIT: so I tried to install CM 7.2 which was succesfull. Then I rebooted my nook and it goes into CWM (internal).
EDIT2: just tried the recovery bootloop fix and it didn't help
Click to expand...
Click to collapse
Ok i know about this one and it might help. Flash stock 1.4.2 recovery and then run the stock 1.4.2 update.zip from sdcard. More info in my thread where it says ATTENTION 8GB USERS but works for 16GB aswell.
~ Veronica
Sent from my BNTV250A using xda premium
well and where can I find the stock recovery and the 1.4.2 ? the problem is, if this method doesn't work, am I still able to run CWM sd card?
Did you take out the microsd card? Dumb question but yeah.
Okay, I see the problem:
EDIT3: so after doing your tutorial my partition table looks like this:
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.3MB 33.6MB 17.3MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4
8 522MB 1164MB 642MB ext4
9 1164MB 1611MB 447MB ext4
10 1611MB 14.5GB 12.9GB fat32 media
11 14.5GB 15.9GB 1443MB ext4
Click to expand...
Click to collapse
Boot is a secure partition that's supposed to start at 16.8mb not 16.3mb
Hmm...hmmm... Try doing "dd if=/sdcard/blk/genptable of=/dev/block/mmcblk0" one more time. And then repost your partition table.
Pete1612 said:
well and where can I find the stock recovery and the 1.4.2 ? the problem is, if this method doesn't work, am I still able to run CWM sd card?
Click to expand...
Click to collapse
Yes, you can still run CWM from sdcard. It's probably the best thing about the nook amirite.
okey I"ll do the bootpartition fix. I changed the micro sd card becuase my bootable sdcard couldn't safe all the mmcblk0px files...
Alrighty. Let me know what happens
nope it's still at the same place:
Model: MMC 016G4A (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.3MB 33.6MB 17.3MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 14.5GB 12.9GB fat32 media
11 14.5GB 15.9GB 1443MB ext4 userdata
EDIT: can I redo the boot partition and if yes how ?
Pete1612 said:
nope it's still at the same place:
Model: MMC 016G4A (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.3MB 33.6MB 17.3MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 14.5GB 12.9GB fat32 media
11 14.5GB 15.9GB 1443MB ext4 userdata
EDIT: can I redo the boot partition and if yes how ?
Click to expand...
Click to collapse
Hmm. You can't. Because parted will automatically revert it back to 16.3MB.
Try the process again, but this time dd genptable before you create the partitions, then create the partitions with sgdisk and let me know what it says.
what do you think about the Ubuntu total recovery before I do anything else ?

[Q] Another possible way to Install CWM restore partition

UPDATE: Just found information at the following link, see below. Looks like you can't get better backup capability without unlocking the boot loader first. Doing so would destroy the DRM keys (No more Netflix's etc...) Guess I will live with my ROOTED Atrix 4G for now..
http://android.stackexchange.com/questions/15314/cant-boot-to-clockwork-recovery-on-atrix-several-methods-tried
My Atrix 4G phone is currently rooted but does NOT have the bootloader unlocked. I do not plan to (at least for the forseeable future) installing different ROM's but I would like to install (if possible) the CWM restore partition. Unlocking the bootloader wipes the device (backups can be performed to restore the wiped information); likewise, the DRM keys are removed during the bootloader unlocking procedure and there MIGHT be ways to restore them (watching streaming video is important to me).
From what I have read on this forum and others, I should be able to load the CWM restore partition WITHOUT unlocking the bootloader. There are a few methods documented to install the CWM werewithall onto the restore partition BUT would something like the following also work?
From an SSH connection to the rooted phone or an "adb shell" command window (via a USB connection between the Atrix and PC) perform the following:
Backup the current restore partition delivered my Motorola via the following command in case something goes wrong.
dd if=/dev/block/mmcblk0p10 of=/sdcard-ext/recovery.img
Copy the recovery.img file to your PC for additional safe keeping.
Zero out the restore partition before installing the new CWM recovery image.
dd if=/dev/zero of=/dev/block/mmcblk0p10
Copy the new cwm.img image to the recovery partition using the following command:
Note the replacement cwm image file can NOT be larger than 8192 blocks with each block being 512 bytes.
8192 * 512 * 2 = 8,388,608 bytes. If the cwm image is to big, I am not sure if the following dd command would write into the p11 boot partition (NOT good). Verify cwm.img size BEFORE issuing the following DD command.
dd if=/sdcard-ext/cwm.img of=/dev/block/mmcblk0p10
In the avent of a problem, you should be able to restore the original Motorola recovery.img to the /dev/block/mmcblk0p10 partition with the following command:
dd if=/sdcard-ext/recovery.img of=/dev/block/mmcblk0p10
FYI follows are the md5sums from my "Atrix 4g" as delivered original factory boot.img and recovery.img
/mnt/sdcard-ext/root_recovery_orig # cat md5sums.txt
bc6c254bd80bed5a9c0d3c7cd5c77b07 boot.img from /dev/block/mmcblk0p11
7580ad9c3bca264a563c13741162d9b8 recovery.img from /dev/block/mmcblk0p10
/mnt/sdcard-ext/root_recovery_orig # ls -al *.img
----rwxr-x 1 system sdcard_r 8388608 Nov 15 13:20 boot.img
----rwxr-x 1 system sdcard_r 8388608 Nov 15 13:19 recovery.img
I assume the factory LOCKED bootloader located on the first partition /dev/block/mmcblk0p1 does NOT effect booting into the new cwm recovery partition via the "adb reboot recovery" command or by holding the volume down while powering on the phone?
When booting into the new CWM recovery partition, what /dev/block/mmcblk0 partitions are mounted? If any partitions are mounted, are they mounted read-only?
Booting from the content of the CWM recovery partition, can I backup/restore the entire /dev/block/mmcblk0 device (all 18 partitions)? Nothing like creating a full device image (with nothing mounted r/w) for when disaster strikes.
Assuming any of the above is valid, I need get the cwm dd image for somewhere (pointers welcome)
Issuing DD commands can be VERY-VERY-VERY dangerous if done wrong. If you do not understand how dd works, PLEASE do NOT attempt anything you read in this post. Until other forum members comment on this post content, I do NOT plan do anything (neither should anyone else!!!!)
Regards, Ron
Request for info from someone with CWM installed in recovery partition
Could I get someone who has CWM working on their Atrix 4G to please run the following command from the su prompt on the smartphone and post the output.
# fdisk -lu /dev/block/mmcblk0
Also please indicate if you have the bootloader unlocked or not.
Regards Ron
rrolsbe said:
My Atrix 4G phone is currently rooted but does NOT have the bootloader unlocked. I do not plan to (at least for the forseeable future) installing different ROM's but I would like to install (if possible) the CWM restore partition. Unlocking the bootloader wipes the device (backups can be performed to restore the wiped information); likewise, the DRM keys are removed during the bootloader unlocking procedure and there MIGHT be ways to restore them (watching streaming video is important to me).
From what I have read on this forum and others, I should be able to load the CWM restore partition WITHOUT unlocking the bootloader. There are a few methods documented to install the CWM werewithall onto the restore partition BUT would something like the following also work?
From an SSH connection to the rooted phone perform the following:
Backup the current restore partition delivered my Motorola via the following command in case something goes wrong.
dd if=/dev/block/mmcblk0p10 of=/sdcard-ext/recovery.img
Copy the recovery.img file to your PC for additional safe keeping.
Zero out the restore partition before installing the new CWM recovery image.
388,608
dd if=/dev/zero of=/dev/block/mmcblkp10
Copy the new cwm.img image to the recovery partition using the following command:
Note the replacement cwm image file can NOT be larger than 8192 blocks with each block being 512 bytes.
8192 * 512 * 2 = 8,388,608 bytes. If the cwm image is to big, I am not sure if the following dd command would write into the p11 boot partition (NOT good). Verify cwm.img size BEFORE issuing the following DD command.
dd if=/sdcard-ext/cwm.img of=/dev/block/mmcblk0p10
In the avent of a problem, you should be able to restore the original Motorola recovery.img to the /dev/block/mmcblk0p10 partition with the following command:
dd if=/sdcard-ext/recovery.img of=/dev/block/mmcblk0p10
I assume the factory LOCKED bootloader located on the first partition /dev/block/mmcblk0p1 does NOT effect booting into the new cwm recovery partition via the "adb reboot recovery" command or by holding the volume down while powering on the phone?
When booting into the new CWM recovery partition, what /dev/block/mmcblk0 partitions are mounted? If any partitions are mounted, are they mounted read-only?
Booting from the content of the CWM recovery partition, can I backup/restore the entire /dev/block/mmcblk0 device (all 18 partitions)? Nothing like creating a full device image (with nothing mounted r/w) for when disaster strikes.
Assuming any of the above is valid, I need get the cwm dd image for somewhere (pointers welcome)
Issuing DD commands can be VERY-VERY-VERY dangerous if done wrong. If you do not understand how dd works, PLEASE do NOT attempt anything you read in this post. Until other forum members comment on this post content, I do NOT plan do anything (neither should anyone else!!!!)
Regards, Ron
Click to expand...
Click to collapse
Another question/Observation
It might be possible that the factory supplied locked bootloader checks the "Digitial Signature" of the recovery partition before booting into recovery mode is allowed??? If this is true, the signature check of the CWM image would FAIL thus requiring an unlock of the boot loader! Hopefullly, dd'ing the original saved recovery.img back onto the recovery partition would at least get back to factory configuration (IE.. allow booting into factory supplied recovery mode)!!
Again, Thanks for any help regarding this post!
Regards, Ron
rrolsbe said:
Could I get someone who has CWM working on their Atrix 4G to please run the following command from the su prompt on the smartphone and post the output.
# fdisk -lu /dev/block/mmcblk0
Also please indicate if you have the bootloader unlocked or not.
Regards Ron
Click to expand...
Click to collapse
Code:
[B]# fdisk -lu /dev/block/mmcblk0[/b]
Disk /dev/block/mmcblk0: 15.9 GB, 15914762240 bytes
1 heads, 16 sectors/track, 1942720 cylinders, total 31083520 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1024 8191 3584 83 Linux
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 8192 9215 512 83 Linux
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 9216 13311 2048 83 Linux
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 13312 31005695 15496192 5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 14336 16383 1024 83 Linux
/dev/block/mmcblk0p6 16384 17407 512 83 Linux
/dev/block/mmcblk0p7 17408 18431 512 83 Linux
/dev/block/mmcblk0p8 18432 20479 1024 83 Linux
/dev/block/mmcblk0p9 20480 24575 2048 83 Linux
/dev/block/mmcblk0p10 24576 40959 8192 83 Linux
/dev/block/mmcblk0p11 40960 57343 8192 83 Linux
/dev/block/mmcblk0p12 57344 712703 327680 83 Linux
/dev/block/mmcblk0p13 712704 2285567 786432 83 Linux
/dev/block/mmcblk0p14 2285568 2326527 20480 83 Linux
/dev/block/mmcblk0p15 2326528 3637247 655360 83 Linux
/dev/block/mmcblk0p16 3637248 7831551 2097152 83 Linux
/dev/block/mmcblk0p17 7831552 8538111 353280 83 Linux
/dev/block/mmcblk0p18 8538112 31005695 11233792 83 Linux
As far as installing custom recovery with locked bootloader goes, I'm pretty sure that won't work, or else someone would've come up with that long long time ago.
Thanks!!
ravilov
Thanks for the information in your post. Since it appears that some owners have replaced their recovery partition with CWM having only rooting, I was hoping that the recovery partition might NOT be signed by Motorola and checked during the recovery boot process. BTW, my Atrix 4G is an International carrier unlocked version. I have another Atrix 4G on order, I might try DD'ing to the recovery partition and if that fails roll back the recovery.img backup. If the recovery partition is actually signed and checked during the boot process, returning the partition bit-for-bit with the original SHOULD revert to factory. From my reading, it some cases the recovery partition is NOT signed even though the bootloader/boot partition IS signed.
Again, Thanks Very Much for your post
Regards, Ron

[HOWTO] Nexus 4 Conversion from 8G to 16G of internal storage

This procedure is really dangerous so I have to warn that you can brick your phone. It directly modifies partition tables so if something goes wrong you may have a bricked phone. Do it at your own risk and I'm not responsible for any damage it may cause.
By following the procedure, you acknowledge and accept that the author is not liable for any loss, material or otherwise howsoever caused.
OK, you've been warned Now to the fun part.
This procedure does work but, please, follow it only if you are an advanced user or a developer.
It also has some unnecessary steps but I include them since they can help you to learn something.
Later, I might write an "update.zip" for cwm which automatically does all the work
This works only on top of the existing N4 8G conversion.
So if you're stock etc then you'll need to do N4 8G conversion first, that is to flash the tot listed in N4 conversion topic in LGNPST.
This is a link to the N4 conversion thread: http://forum.xda-developers.com/showthread.php?t=2099784
You also need cwm recovery installed. I did it in sk8's cwm touch recovery. So I suggest using it: http://forum.xda-developers.com/showthread.php?t=2010984
Also, you need an external sd card with at least 100MB(after doing all rom backups) of free space and I recommend to do a filesystem check of the sd card in windows/*nix/osx.
And another requirement is to have working adb and fastboot drivers for Nexus 4.
Before starting the procedure look through all the steps and please stop if you don't understand something. No rocket science here but it's just a dangerous thing to do.
- Download the following 3 files and copy them to your _external_ sd card root directory
Links:
Modified busybox dd : http://d-h.st/cFA
16G Primary GPT(includes MBR): http://d-h.st/yUQ
16G Secondary GPT: http://d-h.st/0dH
- if you care about the content of your internal sd card then back it up somewhere. After doing this conversion all your data and /sdcard will be purged.
- boot into cwm recovery.
- if you care about your current ROM/data do a backup to _external_ sd.
- connect the phone via USB to your pc and on your pc run 'adb shell'. Once in shell:
Code:
# cp /external_sd/dd /
# chmod 755 /dd
- Backup your existing partition tables. Make sure you put / in front of dd to use my modified dd
Code:
# /dd if=/dev/block/mmcblk0 of=/external_sd/pgpt8G.img bs=512 count=34
# /dd if=/dev/block/mmcblk0 of=/external_sd/sgpt8G.img bs=512 skip=30777311
- By default cwm mounts userdata and cache partitions. You need to unmount them
Code:
# umount /data
# umount /cache
- Make sure no partition from /dev/block/mmcblk0 is mounted. df should return only this with no extra rows:
Code:
# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 911.7M 48.0K 911.6M 0% /dev
/dev/block/mmcblk1p1 59.4G 4.8G 54.6G 8% /external_sd
- Move content of DDR and grow partitions to their new locations. I doubt this step is required, but did it for safety. Seeking to the end of the mmc may take couple of minutes, don't freak out:
Code:
# /dd if=/dev/block/mmcblk0 of=/external_sd/DDR bs=512 skip=15267840 count=2015
# /dd if=/external_sd/DDR of=/dev/block/mmcblk0 bs=512 seek=30775296 conv=notrunc
- Install new partition tables. Seeking to the end of the mmc may take couple of minutes:
Code:
# /dd if=/external_sd/sgpt16G.img of=/dev/block/mmcblk0 bs=512 seek=30777311 conv=notrunc
# /dd if=/external_sd/pgpt16G.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc
- At this point you have new partition tables installed. Verify this by running parted. You should see this:
Code:
# 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) p
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 15.8GB 14.1GB ext4 userdata
24 15.8GB 15.8GB 524kB DDR
25 15.8GB 15.8GB 507kB grow
(parted) quit
quit
Notice that userdata partition is 14.1GB in size
In case parted reports an error I suggest to return back to the old 8G partition tables, see below.
- Reboot the phone into bootloader: run reboot command and hold 'Up' button to enter bootloader menu
Code:
# reboot
- on your pc command line run:
Code:
fastboot erase userdata
fastboot -w
- In phone bootloader enter 'Recovery Mode' to load cwm
- In cwm restore your previous N4 rom from external sd or flash a new N4 rom
PS
In case parted reported an error, put the old 8G partition tables back. This should not happen but never say never:
Code:
# /dd if=/external_sd/sgpt8G.img of=/dev/block/mmcblk0 bs=512 seek=30777311 conv=notrunc
# /dd if=/external_sd/pgpt8G.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc
reserved
Awww Look at the "community" sharing!!!
really easy process thank you!
This is the final straw for me, I'm gonna try the conversion tonight. Thanks a ton!
Damn, so was this the final problem with the conversion? Does this mean all the bugs have been worked out? If so, this is awfully tempting... haha
blenkows said:
Damn, so was this the final problem with the conversion? Does this mean all the bugs have been worked out? If so, this is awfully tempting... haha
Click to expand...
Click to collapse
For the most part, I think a few people still have issues with NFC, but I think that's just about ironed out too. Goodbye Quickmemo and Q-slide, I'll actually miss you!
Awesome work but I'll wait tell you make a update zip since I don't trust my computer have USB problems
Sent from my LG-E970 using xda premium
Right now I have the little voices in my head. The good guy is saying "NO DUDE! WAIT FOR AOSP! ITS JUST AROUND THE CORNER!". The other dude is saying "OMG JUST DO IT YOU WUSS!"
Mannnnnnn. Now I'm confused as to what I wanna do. Stock JB or convert? Great job. Looks good!
Sent from my LG Optimus G
Neroga said:
Mannnnnnn. Now I'm confused as to what I wanna do. Stock JB or convert? Great job. Looks good!
Sent from my LG Optimus G
Click to expand...
Click to collapse
More like Nexus 4 with SD card and LTE 4.2.2 or LGOG with 4.1.2?
xxgmon3yxx said:
More like Nexus 4 with SD card and LTE 4.2.2 or LGOG with 4.1.2?
Click to expand...
Click to collapse
You know, plus the millions of other possibilities that come along with a nexus.
C2fifield said:
You know, plus the millions of other possibilities that come along with a nexus.
Click to expand...
Click to collapse
No doubt... this phone will be supported for years to come! I'm never getting rid of it.
C2fifield said:
For the most part, I think a few people still have issues with NFC, but I think that's just about ironed out too. Goodbye Quickmemo and Q-slide, I'll actually miss you!
Click to expand...
Click to collapse
If NFC does not work for you, try to flash zip from the 'Notes' section of http://forum.xda-developers.com/showthread.php?p=37518694
Now can people accept the conversion lol so we can move on with our phones?
Sent from my LG-E970 using xda premium
blenkows said:
Right now I have the little voices in my head. The good guy is saying "NO DUDE! WAIT FOR AOSP! ITS JUST AROUND THE CORNER!". The other dude is saying "OMG JUST DO IT YOU WUSS!"
Click to expand...
Click to collapse
Haha, I feel you! I don't even trust myself with the conversion, though :/
But if a flash zip comes out, all hell might break loose!
Sent from my LG-E970 using xda app-developers app
TangoXray said:
Haha, I feel you! I don't even trust myself with the conversion, though :/
But if a flash zip comes out, all hell might break loose!
Sent from my LG-E970 using xda app-developers app
Click to expand...
Click to collapse
Just did it, it's all running smoothly, thanks again!
Seems to have worked here as well. Just restored my nandroid and its booting as we speak. And....... success. 12+ gigs of usable storage. Thanks a ton!!!!
thanks i just did it and works perfect
As I restore my backup, I have to wonder, why do we erase userdata and fastboot -w when a restore from backup works without a problem? Does the backup not look at the partition tables where booting straight up would and freeze up something?
Or is everything wiped from modifying the table and the fastboot part is just to make sure the partitions are empty?

[Guide] Resizing LG G2 partition size

Resizing LG G2 partition size​Must have: Latest TWRP Recovery, ADB experience and gdisk for arm in attached zip.
Clean /system partition (unused apps, bloatware, garbage and so on...)
Backup everything important from /sdcard.
Reboot to TWRP and connect ADB (if "ADB devices" fails, check windows "Device Management" and install "Android Sooner Single ADB Interface" for your unrecognized phone).
In TWRP backup /system and /data and download /sdcard/TWRP folder via MTP to your PC.
Now it's ADB time:
Code:
[B]# check /system used space (in Mb) and remember it, as we should cut no more than "Available" space:[/B]
adb shell "mount /system"
adb shell "df -m /system"
[B]# un-mount partitions:[/B]
adb shell "umount /system"
adb shell "umount /data"
adb shell "umount /sdcard"
adb shell "umount /cache"
[B]# unzip gdisk in your ADB folder and install it:[/B]
adb push gdisk /sbin
adb shell "chmod 0755 /sbin/gdisk"
[B]# check partitions info:[/B]
adb shell "/sbin/gdisk -l /dev/block/mmcblk0" >gpt.txt
[B]# open new gpt.txt file in your ADB folder
# now you should recalculate your new partitions (30-36) size and position (in sectors)
# partition start-sector should be even, end-sector should be odd
# to make it simplier, use formula: (new size in MB) * 2048 + 1 = (new size in sectors)[/B]
Check my examples:
Code:
default (4.4.2 firmware):
30 819200 6488063 2.7 GiB 0700 system
31 6488064 7733247 608.0 MiB 0700 cache
32 7733248 7897087 80.0 MiB 0700 tombstones
33 7897088 7929855 16.0 MiB 0700 spare
34 7929856 8028159 48.0 MiB 0700 cust
35 8028160 60948479 25.2 GiB 0700 userdata
36 60948480 61071326 60.0 MiB 0700 grow
my mod v1:
(30) 800000 3526297 1.3 GiB system
(31) 3526298 3853977 160 MiB cache
(32) 3853978 3858073 2 MiB tombstones
(33) 3858074 3862169 2 MiB spare
(34) 3862170 3866265 2 MiB cust
(35) 3866266 61067229 27.2 GiB userdata
(36) 61067230 61071326 2 MiB grow
my_mod_v2:
(30) 800000 2897153 1 GiB system
(31) 2897154 3122433 110 MiB cache
(32) --- --- deleted tombstones
(33) --- --- deleted spare
(34) 3122434 3126531 2 MiB cust
(35) 3126532 61071326 27.6 GiB userdata
(36) --- --- deleted grow
Important! It's only mine D802 4.4.2 example. You should calculate your own values, because of your /system used size, /cust size for unlock, etc.
/spare and /grow partitions unused on our phones. /tombstones is obesolete since it mounts from /data, anyway.
After all checks and calculations, let's do the magic:
Code:
[B]# run gdisk:[/B]
adb shell
cd /sbin
gdisk /dev/block/mmcblk0
[B]# no real changes applied to the phone, before "w" command.
# if you did something wrong, exit by "q" command
# you can check youreself with "p" command (partition list with virtual changes you made).
# OK, let's delete our old partitons and create them anew:[/B]
"d" command > enter partition number (for all 30-36 partitons).
"n" command > enter partition number > start > end > code (start & end = new values in sectors, code = 0700)
"c" command > enter partition number > name (system, cache, etc.)
[B]# if all seems fine, and you're pretty sure of youreself:[/B]
"w" command > "Y" answer
[B]# there is no FS on new partitions, so format them:[/B]
mke2fs -t ext4 /dev/block/mmcblk0p30
mke2fs -t ext4 /dev/block/mmcblk0p31
mke2fs -t ext4 /dev/block/mmcblk0p34
mke2fs -t ext4 /dev/block/mmcblk0p35
[B]# there is no point to format others, because they have no fs by default.
# if using kernel with F2FS support (like Dorimanx), you can format some of them as F2FS:[/B]
mkfs.f2fs /dev/block/mmcblk0p35
[B]# to make TWRP realise, horrors we just did - reboot it:[/B]
reboot recovery
[B]# after reboot, we can optimize /userdata a bit (ext4 only), with this:[/B]
adb shell "tune2fs -m 0 /dev/block/platform/msm_sdcc.1/by-name/userdata"
[B]# bring backups from PC to /sdcard via MTP and restore them, as usual
# now you can reboot to your system with custom-sized partitions!
# P.S. If you notice your /sdcard permissions glith a bit after all this - flash "sdcard Fix Permissions script" from [URL="http://forum.xda-developers.com/showthread.php?t=2239421"]this[/URL] thread.[/B]
Good luck.
Awesome :good: this guide will help 16GB user like me to increase data/sdcard partition
Too bad I don't have pc to play around with....
so, stock, user-usable fresh after format on KK4.4 we have 24GB on the /sdcard part. Would we want to use this to go smaller? Would there be a benefit to that? Or would I want to use it to go larger, shrinking my /sdcard
I know it can go both ways, but which are people more interested in here?
rancur3p1c said:
I know it can go both ways, but which are people more interested in here?
Click to expand...
Click to collapse
Who knows? It's not that hard, it takes 5 minutes, it gets you + 1-3 Gib on the phone (without SD-Card support), and it's safe - coz we don't touch bootloader or recovery partitions... It's worth it.
THIS is just pure awesome
I've followed the guide and successfully added almost 2gb to userdata on my 16gb d802
This is my gpt for now
30 791568 4158721 1.6 GiB 0700 system
31 4158722 4306179 72.0 MiB 0700 cache
34 4306180 4310277 2.0 MiB 0700 cust
35 4310278 30777310 12.6 GiB 0700 userdata
And this is my aim, if i have time to do it again
30 791568 3937297 1.5 GiB 0700 system
31 3937298 3961875 12.0 MiB 0700 cache
34 3961876 3965973 2.0 MiB 0700 cust
35 3965974 30777310 12.7 GiB 0700 userdata
Also, i've notice this in the gpt.txt file
Total free space is 230360 sectors (112.5 MiB)
So can we get even more from our phone?
Hello everybody
first of all I ll thank you for your guide Resizing LG G2 partition size.
But no I have problems with installing a new rom. Everytime I enter twrp I get the message "Can't mount /system". So its impossible for me to install a new rom.
All partitions seems to be fine. gdisk works perfect without any errors.
My partition table looks like:
Code:
30 819200 3686401 1.4 GiB 0700 system
31 3686402 4014083 160.0 MiB 0700 cache
34 4014084 4034565 10.0 MiB 0700 cust
35 4034566 30777310 12.8 GiB 0700 userdata
If someone have any idea how I can solve this problem?
Thanks
Chris
I am thinking to try this tool, but I would like to know if flashing kdz will work in case I screw things up, or am I risking to permanently brick the phone?
Okay, going back to stock partitions will fix my problem and my system partition is again 2.7 GB
With the customised partitions i was unable to install neither Resurrection Remix Rom nor Google Edition 1.5. Both return an error in twrp.
Backfisch said:
Everytime I enter twrp I get the message "Can't mount /system". So its impossible for me to install a new rom.
All partitions seems to be fine. gdisk works perfect without any errors.
Click to expand...
Click to collapse
I have the same problem. Did you fix it by any chance?
Yes, going back to the stock values of the partition using the gdisk again.
Its also import to make sure the partition format works correct. Better format twice....
Backfisch said:
But no I have problems with installing a new rom. Everytime I enter twrp I get the message "Can't mount /system". So its impossible for me to install a new rom.
Click to expand...
Click to collapse
Okay, the fix is that you have to restore TWRP backup, in my case CM13 booted all good. But now I have a different problem, the MTP connection is really unstable, disconnects and reconnects for no reason. Same problem using twrp mtp or cm mtp. Tried two different cables, two different pc, and resized the partitions twice using different values. Still no luck. Anyone had any similar experience?
EDIT: Seems my charging port is failing. Many cables have hard time being stable, but some of them work better.
Backfisch said:
Yes, going back to the stock values of the partition using the gdisk again.
Its also import to make sure the partition format works correct. Better format twice....
Click to expand...
Click to collapse
Back when I tried to resize the /system partition, all non-lg rom doesnt install because of that error, and they are the ones that has the most potential of freeing some space
you can only get some space from /cache and other partitions without getting errors
I have gained 2 Gb extra space on the internal memory, and it works great so far. The only problem is that flashing roms from twrp returns the error /system can not be mounted, and you have to install the rom by restoring twrp backups.
Am I right in thinking that you cant install an rom update with modified partitions by flashing it in twrp?
If restoring my backup is the only way to install my rom, I will delete some music and pictures on the userdata partition...
You can install roms with "system" folder and files in it, on modified partitions (if you have enough space in /system, of course).
But you won't be able to install CyanogenMod-based roms with partition image in them (system.img, system.bin, etc.)
I played with this a bit and something went wrong Now i can't flash any os neither TOT or KDZ. I dismantled my phone to enter 9006 mode and recover it from there. But with no success :c What should i do now? I have my stock values of 30f saved, but after flashing kdz and tot i have stock recovery. It doesn't have adb suppor so i can't start gdisk operation. And i can't push any rom or recovery by sideload. When recovery starts I have list of errors. It can't mount system, data etc. I think I bricked it quite well xd
SantoSubito said:
I played with this a bit and something went wrong Now i can't flash any os neither TOT or KDZ. I dismantled my phone to enter 9006 mode and recover it from there. But with no success :c What should i do now? I have my stock values of 30f saved, but after flashing kdz and tot i have stock recovery. It doesn't have adb suppor so i can't start gdisk operation. And i can't push any rom or recovery by sideload. When recovery starts I have list of errors. It can't mount system, data etc. I think I bricked it quite well xd
Click to expand...
Click to collapse
Did you fix it yet? Does download mode work? Why didn't work flashing kdz in the first place?
Yes it does. After flashing kdz phone enters recovery and I have list of errors. And when i tried to flash tot i have error something with laf partition and gpt. Yesterday i tried to recover it from 9008 but I'm also getting error :c
SantoSubito said:
And when i tried to flash tot i have error something with laf partition and gpt.
Click to expand...
Click to collapse
Try to flash TOT-firmware with modded dll (bypass gpt-error). One of this should do the trick.
Yeah it worked. But not in 100%. When its 94% my phone reboots and LG Tool shows:
...
CACHE
CACHE
CUST
Wiating for the device 120s
then device reboots and get bootloop
BoardDiag have this wierd dload error and also i cant do nothing with this tool

Categories

Resources