The OnePlus 6 is officially on sale! Buy now →
Remove All Ads from XDA
OnePlus 6 On Sale

 View Poll Results: Did the conversion work?

It worked to Nexus 4 but not back.
1 Vote(s)
It worked from Nexus 4 but not to Nexus 4.
0 Vote(s)
It didn't work at all.
0 Vote(s)
It worked perfectly.
2 Vote(s)
This person should be lynched because [expletive]
1 Vote(s)

[HOWTO] Convert your Optimus G to a Nexus 4 and Back

13 posts
Thanks Meter: 2
By alastair53, Junior Member on 9th February 2014, 06:01 AM
Post Reply Email Thread


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 -
2) Download the Nexus 4 Image -
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. -
13) Download the following 3 files and place them on the MicroSD card. - - -
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
# cp /external_sd/dd /
# chmod 755 /dd
17) Backup the partition tables incase something goes wrong.
# /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.
# umount /data
# umount /cache
19) Make sure nothing is mounted. It should return this (Other than partition size):
# 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.
# /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.
# /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.

GNU Parted
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) 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.
# /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.
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.

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.
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.
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.
9th February 2014, 06:17 AM |#2  
OP Junior Member
Thanks Meter: 2
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.
9th February 2014, 10:00 PM |#3  
Senior Member
Thanks Meter: 86
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
9th February 2014, 10:48 PM |#4  
OP Junior Member
Thanks Meter: 2
Originally Posted by Dr0!dFreek

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

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.
30th September 2015, 06:27 PM |#5  
Senior Member
Thanks Meter: 8
Originally Posted by alastair53

13) Download the following 3 files and place them on the MicroSD card. - - -

Is this part SPYWARE? the 3 files downloads a exe and is detetected as virus or something.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes