yashsingh1/xdaforums huggingface dataset:
[G2 Q&A, Help & Troubleshooting] MariMur:
The ROM will solve all your problems , but you need to know which is the right ROM.

This thread is for broken storage.

Touch not working properly, missing IMEI, no BASEBAND, no SIM,16GB instead 32GB, etc. Those have been my problems and It's fixed all when I installed the right ROM- in my case D800 .

I tried this tutorial and fixed my storage but not the other problems I had on my phone.

On this site (http://www.imei.info/) my IMEI is shown as D800 AT & T version. On other site(can't remember which one) is D802 HK version.

There was a thread here on XDA with warning about G2 phones with a modified ROM to show the phone as D802 -and it is exactly the D80220B version.
[G2 Q&A, Help & Troubleshooting] Meppolan:
I'll have a search for that thread now, It sounds exactly like my problem. I did try the D802 HK version, but I don't think that worked. I did a search on that web site you mentioned, and I get exactly the same as you, D800. Can I ask which ROM you used please?
[G2 Q&A, Help & Troubleshooting] MariMur:
You can try this : http://xdaforums.com/show....php?t=2663369

First take at look at this: https://www.youtube.com/watch?v=YEqEE9Qb8Sk

For d800 the LGTools is diferent , you need to uninstall the version you have and delete all files left.

C:\LG - delete the whole folder. Also uninstall usb drivers.

I recommend to download this '' Download Installer - KitKat 4.4.2 D80020c'' from the first link and install.

It will install all you need : LGflash , usb drivers, .tot image, .dll for your phone, and follow the tutorial from link 2.
[G2 Q&A, Help & Troubleshooting] Tusharpimple:
LG G2 international D802 became 16 GB from 32 GB

Hi Kickoff

I faced similar problem while going back to stock. My phone D802 international became 16 gb from original 32 gb.

I tried following ur guide but unable to copy 4 files to system/bin partition, getting error permission denied. I already got my phone rooted using ioroot and tried copying using root explorer/total commander/es file explorer. Root is showing ok but unable to copy files. please help as I am badly stuck.

Regards,

Tushar Pimple

---------- Post added at 01:19 PM ---------- Previous post was at 01:10 PM ----------

Bro need urgent help

please guide me through whatsapp +91 9867799575

I faced similar problem while going back to stock. My phone D802 international became 16 gb from original 32 gb.

I tried following ur guide but unable to copy 4 files to system/bin partition, getting error permission denied. I already got my phone rooted using ioroot and tried copying using root explorer/total commander/es file explorer. Root is showing ok but unable to copy files. please help as I am badly stuck.

Regards,

Tushar Pimple
[G2 Q&A, Help & Troubleshooting] sudy:
Hi,

after returning from Grola Lolipop rom I lost 16GB. Returning (downgrade, bootloops, stuck in fastboot, flashing kdz's...) from that Grola Korean junk (my opinion) ROM messed up my partitions. Now I don't have 16GB. However, Cloudy 2.2 ROM show all 32GB of total space. Arround 21GB is System Data under Misc section but TWRP, G2, PC, Titanium and ES explorer don't see anything.

When I try your method, copying files in /system/bin messed up my EFS partition, G2 lost signal, IMEI...huh...but I fix that.

Could you specify which files to copy where? Somewhere I read that we must copy 6 files but there is 9 files. Change the permissions to 755 for all files or 0755? I realy appreciate your effort to help us but some of us dont have enough expierience with cmd, adb....

Thanks in advance.
[G2 Q&A, Help & Troubleshooting] Kickoff:
You have to solve the copying issue in order to able to run "dd" and "parted". In the dropbox folder there are 7 utils and two img files. Copy all of them to folder defined in the guide. Imho there is no difference between 0755 and 755.
[G2 Q&A, Help & Troubleshooting] sudy:
Yesterday I finnaly find enough time to repair my G2. And I did it! :victory:

Your explanation of process was realy good but with one difference. I didn't copy files in system/bin than in system/xbin where SU is installed. In that case change last commands to:

./dd if=/system/ xbin/sgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=notrunc

./dd if=/system/ xbin/pgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc

I find that explanation on some another site.

Thanks again.
[G2 Q&A, Help & Troubleshooting] Kickoff:
It was discussed here as well. http://xdaforums.com/showthread.php?p=57687268
[G2 Q&A, Help & Troubleshooting] saint_cow:
Finally got this to run as per the instructions, factory reset then rebooted after I had flashed the correct kdz and it's still 16g?

Needed to enter twice for the last command's to work!
[G2 Q&A, Help & Troubleshooting] deepblade:
I've wrote here earlier. I wasn't sure what version of phone I have 16 or 32 GB. But finally I decided to try this method. Everything went well till first main command. I've got after typing it following error:

dd: /dev/block/mmcblk0: Invalid argument

Is this confirmation that I have 16 GB or something else?
[G2 Q&A, Help & Troubleshooting] argi13:
Hello.I tried the method but at lane 36 shows me 15.8 Gb.Any Suggestions??:(:(
[G2 Q&A, Help & Troubleshooting] ahmed.elaraby:
32Gb G2 running 16 only !!!

Dear Sir,

Good Day

I know that the above post is very old

but Am having the exact same issue with my 32Gb G2

could you plz help me with this

Thank you in advance
[G2 Q&A, Help & Troubleshooting] Kickoff:
Have you read the thread and my tutorial. All info is there.
[G2 Q&A, Help & Troubleshooting] argi13:
I tried many times your tutorial.i tried also with a 16gb rom or with a 32gb rom and nothing happened. In the 36 row always i get 15.8 gb and my phone is 32 gb. I can uploab some screen shots if you want.

These are the results.
[G2 Q&A, Help & Troubleshooting] k_men:
Hi,

I am not able to copy the files downloaded to the /system/bin. It say access denied. I am on stock 4.2.2, D802 and rooted.

I actually went through the process once, but it did not give me the results. I was trying it for the second time. The first time around it allowed me to copy and modify and everything went as you had described. However after factory reset, the storage was still showing as 10 odd Gigs.

Can you make out what could be the issue? Thanks a ton
[G2 Q&A, Help & Troubleshooting] d00lz:
You need to first mount /system as read-write.

Open terminal and type su and press enter.

Then type

mount -o rw,remount /system

You can now modify files within /system.

Once your done editing files within /system remember to remount it back to read-only.

mount -o ro,remount /system
[G2 Q&A, Help & Troubleshooting] k_men:
Aghh!! it say Operation not permitted.

Just to add, I guess I have the permission to write to /System. Out of the 9 files, I could copy the ones which were not in /System/bin. However, it is not allowing me to overwrite the one which is already there in /system like the file named 'dd' and few others.
[G2 Q&A, Help & Troubleshooting] d00lz:
After what command does it say operation not permitted?

If you're getting the operation not permitted output after typing su, I'm afraid you don't have root access.

If you are able to type su and get elevated privileges within the terminal you can do the file moving via command-line or the adb shell.

The following commands will mount /system as read-write, rename the current dd file to dd.bak, move your new dd file to /system/bin and then chmod the file respectively.

user@g2: su
root@g2: mount -o rw,remount /system
root@g2: cd /system/bin
root@g2: mv dd dd.bak
root@g2: mv [B][COLOR="Red"]/sdcard/Download/[/COLOR][/B]dd /system/bin
root@g2: chmod 755 /system/bin/dd

Make sure to replace /sdcard/Download/ to the correct path for your files, wherever they may be.

Yes, the above can be easily completed with a GUI like ES File Explorer, but I find doing this from a Terminal Emulator app makes things a lot more clear. Not to mention that your phone is less likely to argue with command-line :fingers-crossed:.
[G2 Q&A, Help & Troubleshooting] argi13:
Good evening!! I have the some problem and the system folder remains r/o. I execute the commands properly and nothing changes.

Here are some screenshots.
[G2 Q&A, Help & Troubleshooting] k_men:
It worked!!

It worked like a charm. Had some trouble getting around it but it was made super simple by [MENTION=498688]Kickoff[/MENTION] for a layman user like me. Good learning :) I really appreciate help by [MENTION=6387591]d00lz[/MENTION] to guide me for troubleshooting.

For other users out there still struggling, here is my device information and ROM details:

D802, 32gb International - India - rooted using Fluffy ROM 2.01 Based on korean stock lollipop F320 :confused:

Lost storage from 32 gb to 16 gb when downgraded to 4.4.2 :crying:

Tried to flash India specific 32gb kdz with no luck :confused:

Searched -searched - searched XDA and finally got to this thread. :good:

Followed [MENTION=498688]Kickoff[/MENTION]'s instructions to the 'T' and got super guided by [MENTION=6387591]d00lz[/MENTION] :angel:

Failed once - and got it right the second time. :highfive:
[G2 Q&A, Help & Troubleshooting] k_men:
[MENTION=6033441]argi13[/MENTION], why don't you try using Total Commander file explorer? You can check if you can access /system/bin and copy the files individually if it is not allowing copy all.

I was also getting access restriction for specific files. I renamed the specific files in /system/bin and copied the files individually from my storage to /system/bin.

Once you copy the files and mod the access to the files, just follow the process as indicated and it should work for you.

Glad if it helps! :good:
[G2 Q&A, Help & Troubleshooting] d00lz:
If you're having trouble, do everything via command-line. No need for a GUI.

The following commands will replace your dd file with the new dd file. Rinse and repeat for all the required files.

user@g2: su
root@g2: mount -o rw,remount /system
root@g2: cd /system/bin
root@g2: mv dd dd.bak
root@g2: mv /sdcard/Download/dd /system/bin
root@g2: chmod 755 /system/bin/dd
[G2 Q&A, Help & Troubleshooting] argi13:
Thank you both for the advice and finally I make the process correct. Now I have another problem.Such I run the commands for the restore nothings happens.

Here is some screenshots.
[G2 Q&A, Help & Troubleshooting] lambo98:
error: device not found

what should I do?
[G2 Q&A, Help & Troubleshooting] d00lz:
I believe you wont always see the "Error: The backup GPT table is not at the end of the disk, as it should be." message. Just ignore it and confirm entry 36 from the output of your "print" command.

[B]36 [B][COLOR="Red"]15.7[/COLOR][/B]GB [B][COLOR="Red"]15.8[/COLOR][/B]GB [B][COLOR="Red"]37.7[/COLOR][/B]MB grow[/B]

and continue with the solution by moving all your new files to /system/xbin/ and after, running the following commands:

[B]C:\>adb shell
user@g2$: su
root@g2#: cd /system
root@g2#: dd if=/system/xbin/sgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=notrunc
root@g2#: dd if=/system/xbin/pgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc[/B]

---------- Post added at 07:35 PM ---------- Previous post was at 07:26 PM ----------

You're trying to run adb shell when you're already in the adb shell.

Your C:\ directory path to adb.exe may be different.
[G2 Q&A, Help & Troubleshooting] lambo98:
Problem is SOLVED now!!

Thank's for all XDA users
[G2 Q&A, Help & Troubleshooting] mcc2005:
Thanks very much... It´s amazing thing ... my storage is now on 24,7 GB again.

This was a very good tutorial for me.

:):):):):):):)
[G2 Q&A, Help & Troubleshooting] lambo98:
My 32GB G2 is solved right now, but i have questions

it's gonna be okay if I flash Custom ROM?

whether my 32GB G2 will become 16GB?
[G2 Q&A, Help & Troubleshooting] Kickoff:
Do not flash 16gb kdz on your G2. This is the only one thing.
[G2 Q&A, Help & Troubleshooting] Mohamed Hasan:
Wow man saved my G2

I did it 3 times didn't work at all it is 16 GB

then i said wth lets try something new i used the last 2 com first 1 then i press enter

it did work

then pasted 2nd com and finished i flash kdz normal then factory reset from setting

wow it works

if anyone have problem with it working try

dd if=/system/bin/sgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=notrunc

then enter

then

dd if=/system/bin/pgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc

enter

worked with me like that copy and paste all the comm didn't work for me

:p:p
[G2 Q&A, Help & Troubleshooting] marcoar:
Help

Guys, sorry for the English, I performed the procedure, but once I flash the firmware via LG flashtool 2014 and performed the restore the phone does not return the memory.

Someone is kind enough to tell me where I'm wrong, or give me a hand?

C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell

adb server is out of date. killing...

* daemon started successfully *

shell@g2:/ $ su

su

root@g2:/ # cd /system

cd /system

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

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 ext4 cache

32 3959MB 4043MB 83.9MB tombstones

33 4043MB 4060MB 16.8MB spare

34 4060MB 4110MB 50.3MB ext4 cust

35 4110MB 15.7GB 11.6GB ext4 userdata

36 15.7GB 15.8GB 37.7MB grow

(parted) quit

quit

quit

root@g2:/system # adb shell

su

cd /system

dd if=/system/xbin/sgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=n

otrunc

add if=/system/xbin/pgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc

db shell

su

cd /system

dd if=/system/xbin/sgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=n

otrunc

* daemon not running. starting it now on port 5038 *

* daemon started successfully *

error: device not found

1|root@g2:/system # su

cd /system

dd if=/system/xbin/sgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=n

otrunc

cd /system

dd if=/system/xbin/sgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=n

otrunc

root@g2:/system # cd /system

of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=notrunc <

33+0 records in

33+0 records out

16896 bytes transferred in 0.002 secs (8448000 bytes/sec)

root@g2:/system #
[G2 Q&A, Help & Troubleshooting] shoaibrao:
@Kickoff

Sir Which KDZ Firmware Version You Used To Flash After Whole Process ???

I Did All Process 100% But Same 16GB After All

Partition Info Is Same As In Guide

After Whole Process I Am Flashing With D80220H_00

Need Help Plz

Can You Redirect Me To Tested 32GB KDZ After Process
[G2 Q&A, Help & Troubleshooting] egiziano:
I have tried many times to do all the procedure but after factory reset doesnt' change situation of memory...

where can be my error and error of others users that follow an unsuccessful procedure?

Maybe is better to try to load a KDZ KK based after all procedure?
[G2 Q&A, Help & Troubleshooting] egiziano:
I have tried many times to follow the procedure for restore 32gb on my G2 with firmware v30a (lollipop) but without success.

I follow all steps described without problems...i notice only a difference while i execute these two commands:

dd if=/system/bin/sgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=notrunc

dd if=/system/bin/pgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc

on first i have this result:

33+0 records in

33+0 records out

on second:

34+0 records in

34+0 records out

Can be this the problem? why i have this difference?

Thanks.
[G2 Q&A, Help & Troubleshooting] L22EEW:
Thank you, I can confirm this does work. I've been trying to fix the error for most of today, and i've finally fixed it. LG G2 D802, Europe version. It's easy to fix when you know what to do, but when others have had issues/problems/errors, they are simply not following your detailed instructions correctly.

Many thanks for the guide!

---------- Post added at 01:37 AM ---------- Previous post was at 01:33 AM ----------

I had the same results showing, but my 32GB storage has returned after a recovery via LGMobileSupportTool. Followed by a hard reset Settings/Backup and reset/Factory data reset.
[G2 Q&A, Help & Troubleshooting] egiziano:
Ok so i understand that all procedure i follow is correct. So after that u have made all this procedure, didnt u load a kdz? Can u explain me which operation u made after in details? Recovery by lg mobileSupportTool, reset with power and vol down, backup (???) and finally reset by menu of lollipop? Which backup? Thank u a lot for help.
[G2 Q&A, Help & Troubleshooting] L22EEW:
I did not load a KDZ, instead I connected phone to computer, opened LG Mobile Support Tool, and choose "Upgrade recovery" (make sure you have over 70% battery!). I left the phone to update which took 10 minutes. After upgrade was complete I let the phone complete first boot, then followed by a hard reset Settings/Backup and reset/Factory data reset (go into the phones menu, select System settings -> Backup & reset -> Factory Data Reset -> You'll be asked to enter your pin to confirm this final step). Let the phone reboot, and the phone screen should be exactly the same to when you took the phone out of the box from new (basically reset to defaults). You should be able to go to the system settings, and check storage.

If you've followed steps correctly, your TRUE storage amount will now show.
[G2 Q&A, Help & Troubleshooting] b787:
[MENTION=498688]Kickoff[/MENTION]

I followed the guide to the letter, but it did not fix my issue.

Parted no longer reports the error: "Error: The backup GPT table is not at the end of the disk..." and the last line of the "print" command now says: "36 31.2GB 31.3GB 62.9MB grow"

However, I still only have 16GB available.

Additional info: My phone was hardbricked, but I managed to recover it by forcing it into 9008 mode (by shorting a test point) and flashing certain files (including P GPT and S GPT) with boarddiag.exe. Currenty I am running lollipop V30b.
[G2 Q&A, Help & Troubleshooting] b787:
I solved my problem, flashing Kitkat and doing factory reset did the trick. Apparently, factory reset in Lollipop doesn't erase the filesystem in "/data" so it remains the wrong size.

[MENTION=498688]Kickoff[/MENTION]

Big thanks for the guide, you can update it to include a note that the last step must be done with Kitkat.
[G2 Q&A, Help & Troubleshooting] frankenstein.:
you are the man [MENTION=498688]Kickoff[/MENTION] thank you so much back to normal 24gb and i agree with [MENTION=2801341]b787[/MENTION] this guide works only on kitkat not lollipop :good: :D
[G2 Q&A, Help & Troubleshooting] xion0703:
Yeah, finally succeed gaining my 32gb. Thanks to [MENTION=498688]Kickoff[/MENTION] , [MENTION=2801341]b787[/MENTION] and yes this method only works with Kitkat.
[G2 Q&A, Help & Troubleshooting] sadeghspy:
This files and method work in lollipop yet?
[G2 Q&A, Help & Troubleshooting] Kickoff:
Check the revised guide in post 49. Must be on KitKat.
[G2 Q&A, Help & Troubleshooting] sadeghspy:
yes i see, tanks a lot for this tip man :)
[G2 Q&A, Help & Troubleshooting] Januvski:
Thanks Kickoff, after many times trying your guide worked for me.

I was updating my stock G2 to lollipop with the official LG update tool, something went wrong and the update did not go smoothly. Had to restart it, and finally it appeared that the G2 lost 16 GB memory. Using google I found this thread. I didn't have root or custom ROM experience with this phone yet, so I had to find out quite some things. I did some things wrong and had to try your guide multiple times. The following tips helped me a lot and got it working for me:

- Downgrade to KitKat and use a KitKat root guide to get a proper root

- Use the /system/xbin folder instead of the /system/bin folder and adjust the dd commands for it. This was posted some posts earlier in this thread.
[G2 Q&A, Help & Troubleshooting] thequietman1979:
Yes xbin, was me who figured it out!
[G2 Q&A, Help & Troubleshooting] twinkle2K:
Hello

I tried to do this on my friends phone, however we got the following error:

Afterwards the phone will no longer boot, but when connected via USB to a PC is seen as "QHSUSB_BULK"

Would appreciate any help as this is my first experience with a LG phone.

Thanks in advance.
[G2 Q&A, Help & Troubleshooting] nemor44:
same here, tried to follow the steps, adb gave me this result:

after that I disconnected and when tried to reboot the phone it no longer boots, nor enter download mode.

When connected to pc however it also appears as "QHSUSB_BULK"

anyone has an answer for this?
[G2 Q&A, Help & Troubleshooting] Deangel13:
I don't know how to change the permission

Hey sir , I don't know how to change the permission of the files . Can you please tell me how to do that ? Sorry for my bad english .
[G2 Q&A, Help & Troubleshooting] Deangel13:
I followed all the step

Hey Kickoff so I followed all the step and the adb exe file that you recommended shows same codes from that cmd . My problem is that maybe I'm wrong flashing new kdz or maybe my kdz is 16 gb again ? Sorry I'm really really bad at english
[G2 Q&A, Help & Troubleshooting] thequietman1979:
You still have this problem??

---------- Post added at 05:53 AM ---------- Previous post was at 05:51 AM ----------

Google kdz file 32go for your phone, download and flash it with lg flash tools 2014, this is gonna solve your issue.
[G2 Q&A, Help & Troubleshooting] Lycidias:
i did this, but replaced /bin with /xbin because supersu is installed there. im on kk stock

and copied the 9 files to /xbin and set 0755 on each. i took the files from http://www.droidviews.com/your-32gb-lg-g2-shows-only-16gb-storage-space-heres-the-fix/ because they are no longer aviable on the dropbox link here on xda

i used normal flash (but i tried cse also several times)

i only get "33+0 records in

33+0 records out" but never 34... i tried everything but it just does not work

also i don;t get the 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? Fix

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 30294016 blocks) or

continue with the current setting?

Fix/Ignore?Fix" message"

in the end my phone is 32gb but still over 20gb is used for "stuff" (but only when i try the same with lollipop kdz, kk shows 10,x gb... i'm crying:crying:
[G2 Q&A, Help & Troubleshooting] Kornelije23:
Same here mate, please some one help us, is there an automatic script for this or some new method thanks.

---------- Post added at 02:42 PM ---------- Previous post was at 02:23 PM ----------

And also, can I flash a backup of partitions from someone else phone who have europien g2 d802 32 gb ? Whuld that fix the partitions problem and if it can be fixed like that those someone have that backup. Thank you very mutch.