yashsingh1/xdaforums huggingface dataset:
[Nexus 4 General] rayman95:
got issue with touchscreen after using this tool....it's not screen fault, because on TWRP it works normally....can it be the repartition who cause this????

how can I go completely stock,, partition, rom etc....i want to go back from zero

thanks
[Nexus 4 General] SpawN-:
Thanks Gigadroid, it worked, i'll try to continue following your guide now :)

EDIT : Ok, as i thought, i can't do this part :

I pushed the 3 files successfully in /system, flashed latest CWM, rebooted on recovery mod, openned cmd prompt from flashfactory folder, but when i type "adb shell", it's saying : error: device not found

I don't understand, because drivers are working, when i am in fastboot mode, fastboot devices display the numbers and my device, same thing when device is on and i type adb devices, it's working.

So why in recovery i can't use adb command ? :(
[Nexus 4 General] Gigadroid:
Tried Universal Drivers mentioned in OP?

If you did and it still doesn't work open device manager and there it should be either listed as Nexus 4 or as ADB Device.

Right click and select Update Device Driver Software.

Select Browse my computer for driver software

Then select Let me pick from a list of drivers installed on my computer and there should be a driver named ADB Composite Device.

Install that, it worked for me.
[Nexus 4 General] SpawN-:
I had this :

Done what you said, to get this :

Reboot in bootloader, test fastboot devices, working, reboot into recovery mode, i can hear windows sound saying "problem with the device plugged", and as i thought, still can't use adb when i am on CWM.

adb shell etc.. can't be done in fastboot mode ?
[Nexus 4 General] Gigadroid:
No, this are two different things.

I don't know what you could try to get it working :(

Maybe somebody does know a solution.
[Nexus 4 General] SpawN-:
I found this :

http://xdaforums.com/showthread.php?t=2148061&page=2

Do you think i could try this one or it won't work with your guide ?
[Nexus 4 General] Gigadroid:
Give it a try, I don't see why it shouldn't work ;)

If that doesn't work try this, saw that helped some people:

http://xdaforums.com/showthread.php?t=1996051
[Nexus 4 General] SpawN-:
Ok i've been able to use adb while being in recovery (thanks to this : http://xdaforums.com/showthread.php?t=1996051)

Is this normal it is looking like this :

I don't see the ~ # <-[6n at each start of line in your guide.

And another problem, i have an extra line after df -h :

I typed exactly everything like you.. In your guide you say "if no extra line, continue with.." but if there is an extra line, are we f**ked ? :D

I tried to continue but i'm stuck at parted /dev/block/mmcblk0

Saying : /sbin/sh: parted: not found
[Nexus 4 General] Gigadroid:
[MENTION=4477847]SpawN-[/MENTION] I had that problem with ~ # <-[6n with TWRP, if you are on CWM I currently don't know a fix for that.

This also causes the command not found thing.

And to remove the second line type umount /sdcard in adb shell.
[Nexus 4 General] SpawN-:
I am on TWRP, you're right, is this due to that parted isn't found ? How to fix that ?

Thanks for the umount /sdcard, it worked.

EDIT : I don't understand, i followed the part talking about parted of this : http://www.droidforums.net/forum/htc-droid-eris/78650-internal-storage-partitions-screwed-up.html

To add it, but even with this, it's still saying parted not found... **** this. Problem is in this guide they say to add parted files in /sbin/, and in your guide, when trying to use parted, they say it wasn't found in /sbin/sh, so how to fix this ?
[Nexus 4 General] Gigadroid:
Using CWM will fix anything and parted will be found without changing something else :)
[Nexus 4 General] SpawN-:
Thank you so much for your help guy, your guide is a blessing, at beginning i thought i'll have to send my phone to after-sales service, and now my phone is totally safe and 16Gb are back, thank you :)

:highfive::good:
[Nexus 4 General] Gigadroid:
No problem, I do that exactly because of people like you, who are really grateful ;)
[Nexus 4 General] rezzo:
Hi Gigadroid,

I flashed my Nexus 4 with a correct rom (n4 factory image from google using Wug's Nexus Root Toolkit) but I don't know why, but after that I lost the IMEI (IMEI: Unknown) and baseband show the same "info" Baseband: Unknown.

Wifi, Bluetooth, etc. works. No reboot problems, but it take much much time to boot and with or without SIM in the tray the carrier message is the same "No service", do you think your guide can work in this scenary? thanks!
[Nexus 4 General] Gigadroid:
Yes, but I think you should first try to flash a radio from here

This would be a lot easier
[Nexus 4 General] rezzo:
I tried with JDQ39E radios but without luck. I want try with your guide, btw thanks for the level of detail.

PD: anyone try the steps with windows xp, or 7/8 is recommended?

-edit-

Gigadroid, can you add CRC32 (or MD5/SHA1 etc) to verify that the files were downloaded successfully?
[Nexus 4 General] Gigadroid:
MD5/SHA-1:

LGNPST:

f1ef716489c176a5ca08b7976f12e5d2/ 97a152dd7ad1e9a5a6bef26229076488d24c5d71

Factory Image flashable with LGNPST: 0dc53827dabc9a5778c20b2afbb07dba/ 28b8c61a9f09398149219d24b3d21a2e51fb3c81

Factory Image flashable with fastboot:

c7d86b3042bbaf3076f95b8dc441f994/ 416b90ea3e21f23f1b7ea57c33dcffac82ed8ea9

Modified busybox dd:

92b8f3620ea76ecf13b99b47b7454bc5/ 9b0a043404559ad6859d2184ba080125f6fd43b0

16G Primary GPT(includes MBR):

7d6424d3e883d4695d0b9d71ea006174/b337c68df6f03d5f5126ae69089bb39a1256b370

16G Secondary GPT: 78458096fe12d9e089f33e6fd1a55835/

002725ceffe3f442a920dc63b9a2741a091d709a

CWM Revovery Image: 28156448103f241d80fb517b03144389/ f5b61f39bd4f81eb1a179737295b3205108f1f7f
[Nexus 4 General] rezzo:
Gigadroid, the guide work like a charm in my N4 16gb, awesome work your guide.

kudos!! :good:
[Nexus 4 General] kurtyyyyyy:
Cant believe it, this has worked! Thankyou so much!
[Nexus 4 General] Gigadroid:
Thanks button is your friend ;)
[Nexus 4 General] zbz999:
thanks alot mate

thank you very much mate. i thought i would lose my nexus 4 ever. as of this hour it has been 24 hours since i started looking for a solution to this problem. my eyes are tearing for no reason :victory:
[Nexus 4 General] Gigadroid:
This thread is getting very emotional xD
[Nexus 4 General] aashray123:
You are my hero..Everything works perfectly!:good::good:
[Nexus 4 General] equi:
1) i want to buy you a beer.. do you have paypal??

2) after bringing my nexus back to life, i have issues with the wifi.. even in my home network (used to work fine) i cannot connect no matter what security i choose (wpa, wpa2) or even without security. in my work network too. I found yesterday a friend's network that i finally got connected and that was a relief knowing that wifi is not totally dead. i flashed baseband .54 but the problem insists
[Nexus 4 General] gijss:
thanks

Again a very happy user of your great method. I made the same (stupid) mistake as most people here and flashed the wrong ROM (for galaxy S4). - because it was on the op of the list. I was ready to send it to a repairshop when I found this topic. I will just add some key-words for google to identify this topic better: WIFI state was continuously at "turning on wifi". Also, I could not properly connect to the internal storage.

I did have some driver-related problems on my windows 8 PC causing LGNPST not to recognize the phone in the correct mode. Fortunately I also had a good old windows XP machine at my disposal which worked like a charm.

Many thanks for this and a donation is on its way!
[Nexus 4 General] Gigadroid:
Thank you :D

Thank you, look in my signature there's a donate button ;)

I think it's caused by a MAC filter because your MAC address changes every reboot.

Do the things I wrote in the "Fix for Bluetooth and MAC adress" section, and register your MAC adress at the router (if you don't know how just google mac filter and the name of you router.
[Nexus 4 General] CoolApps:
Can't you reflash the baseband/rom?

---------- Post added at 11:10 PM ---------- Previous post was at 11:08 PM ----------

I never knew about Download mode working on this device, nice to see it implanted. :D
[Nexus 4 General] equi:
i ve already done this and the mac address doesn't change after reboot.. It's the same no matter how many times the device reboots.

Just one thing. how can i set a

hex mac address

?? i just put a mac address with simple characters and nums
[Nexus 4 General] Gigadroid:
That's enough, but you could open it with an hex editor.

Try the thing I mentioned with the mac filter, I think that's the problem

Does not help because persist gets formatted and a new baseband or ROM don't touch the persist folder
[Nexus 4 General] equi:
It was so simple.. Nothing need to be written in the .macaddr.. I deleted the mac i had set and everything is fine again.. Thank u!!
[Nexus 4 General] CoolApps:
If the persistent is on NAND flash memory then is there a way to access it to fix this issue?
[Nexus 4 General] Gigadroid:
No problem ;)

Yes the last part of the guide is about fixing the persist part
[Nexus 4 General] VivaErBetis:
Thank you very much for this fantastic guide!

I hope I neve need it :)
[Nexus 4 General] rkkaranrk:
Looks like i need this :( flashed some thing i really don't knw after 6 large down. Will post the out come.

Just to let u guys knw the current position of the phone is no wifi no imei no baseband no camera no sound. Nothing that i can use.

Files downloading, Cannot wait.
[Nexus 4 General] rkkaranrk:
My phone is live again, Thanks for excellent guide mate. still to check the wifi and bluetooth part, I am sure that will also work.
[Nexus 4 General] Dany-69:
I have to thank the author of the guide BILLIONS TIME..

My N4 has come back to life with this gorgeous guide.

Man, you saved me 100 € of repair...

And this seems to be the only guide in the whole WWW.

Can you say us how have you create somethig like this?

How did you know how to use the DD command and which bit put in of field?

For example i'm very curious to have a comment on this istructions..

/dd if=/dev/block/mmcblk0 of=/system/DDR bs=512 skip=15267840 count=2015

/dd if=/system/DDR of=/dev/block/mmcblk0 bs=512 seek=30775296 conv=notrunc

/dd if=/system/sgpt16G.img of=/dev/block/mmcblk0 bs=512 seek=30777311 conv=notrunc

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

What is their function ? :D

Tnx again :)
[Nexus 4 General] NexusAndroid4:
When I put my phone into recovery mode and plug it into the computer, the LGNPST still says "No Port Connected."
[Nexus 4 General] Connor Baker:
Try this:

1. A different cable

2. Different ports

3. See if there are drivers you can install

Hope you can get your phone working again!

Connor Baker
[Nexus 4 General] NexusAndroid4:
What drivers do I need to have installed?
[Nexus 4 General] rkkaranrk:
U ahve to put the phone in download mode and not in recovery mode, All the drivers are in the OP post. extract all the files and install them and u r good to go.
[Nexus 4 General] Connor Baker:
I'm not sure if there are drivers you need for the phone to be detected in download mode. If you put your phone into recovery, see the below quote and please re-read the OP.

Good catch! +1

Connor Baker
[Nexus 4 General] Gigadroid:
So I searched how to unbrick my phone and found the LGNPST.

Then I searched how to use the LGNPST with the N4.

After that I searched for a fix for the 16GB problem and found a guide for that in the Optimus G forum.

The Optimus G forum was a lot more helpful to find a way to unbrick it :)

I put all I found together and wrote it down and now it's here :D

Now to the dd commands:

"if" defines the file that should be copied, "of" the destination.

"bs" defines the bytesize, it's set to 512 because 512 is the block size of every devices based on Linux.

"skip" defines how much blocks should be skipped at read process, "seek" is the same for write.

I got the skip and seek values from another thread and don't really know how he got them.

"conv=notrunc" says that only the specified blocks get modified and the rest gets not touched.
[Nexus 4 General] NexusAndroid4:
I am in download mode currently. I downloaded everything and am up to the step with the LG NPST. Here is a screenshot of my device manager and the LG NPST.
[Nexus 4 General] Gigadroid:
Do a right click on the two LGE Devices and click update driver or something like that (currently my pc is set to german), and then choose the first option.

Hope that helps ;)

PS: Tried a restart already?
[Nexus 4 General] NexusAndroid4:
When I try the first option, it says everything is already up to date.

I just restarted now and nothing has changed.
[Nexus 4 General] Gigadroid:
Could you use a pc from a fried or so?

I think another driver blocks the correct use, but I can't tell you which one from here.

I've no other ideas :(
[Nexus 4 General] Dany-69:
My god, never thought to use dd and parted on an android device :)

Only read of them in heavy linux tricks .. :cyclops:

Bro what do you think about using these tot images found on XDA ?

http://xdaforums.com/showthread.php?t=1976057

Maybe these images could save a lot of time allowing to skip all the repartition part..

Am i wrong?

EDIT: holy crap .. just see you already use that images..

What misleaded me was the dll of the Optimus G.

So why, if we use the right tot file, there is the problem with the internal memory ?

Maybe those tot file come from an E960 with 8Gigs? o_O

And how the hell is that possible that we only have some encrypted developer firmwares?

In the whole XDA no way to have the same "normal" TOT files that LG uses to restore its devices? :S

Sh!t, I don't remember any similar problems with Samsung's Odin firmware ... !

LG is always able to frustrate his buyers, even with a Nexus device....

EDIT2: found the original repartition procedure...

http://xdaforums.com/showthread.php?t=2160124

Man you're fuçking crazy to have modified and applied such an experimental procedure for the first time on a Nexus 4.

You got all my respect !
[Nexus 4 General] Gigadroid:
Or it's related to the .dll, but normally it shouldn't be for things like the partion table

I think we could use an other .tot file but I only tried it with that file that is in the OP.

+1 I had a Nexus S and a Galaxy Nexus anything was awesome but the N4 has some ****tie problems -.-

It was all linked in the credit section, but yeah you used the search funtion :D XD

I'm only doing such things because I'm only 14 years old and I don't have so much money, so I researched one two whole days about it because I was sure they wouldn't exchange it because I flashed some **** on it and didn't got 350€ for a new N4 xD
[Nexus 4 General] Stein Ichimaru:
I think I Bricked my HTC One X during RUU...how can I fix this??
[Nexus 4 General] rkkaranrk:
Search one x forum this one is for Nexus 4
[Nexus 4 General] Stein Ichimaru:
Wow I hate not being able to see everything on my iPod. Sorry bout that.
[Nexus 4 General] darkware:
Error

Hi,

first of all thank you very much for the guide!

I am trying to follow it through but i get an error when I try to flash the .tot file:

It says "Failed to load Model DLL." and afterwards it shows an error:

Process: Upgrade_Masterbin

SubProc: Masterbin Download

Cause: Cannot found MiniDP DLL

----------------------------------------------------

I am currently in an always Download mode (Qualcomm HS-USB QDloader 9008)

Is there a way to save the phone?

Greetings,

Darkware
[Nexus 4 General] Dany-69:
Have you followed all these instructions?

-Copy the Models folder to C:\LG Electronics\LGNPST\

-Start a command prompt as admin

-Type: regsvr32 "C:\LG Electronics\LGNPST\Models\LGNPST_LS970.dll"
[Nexus 4 General] David_Vaz:
Mi device isn't detected in the program...

I'm NO flashed ROM of Galaxy S4, i'm flashed one kernel.. corrupt...)
[Nexus 4 General] David_Vaz:
Ok, phone detected...

I'm get this error: "Failed to load Model DLL."

Process : Upgrade_Masterbin

SubProc: Masterbin Download

Cause: Cannot found MiniDP DLL...

Please... help...

Thanks :)
[Nexus 4 General] vsreddy:
Help

Anyone can mirror the LG tool please , am not able to download.

My nexus showing QHS-USB DOWNLOADMODE ,, just red light is blinking when i turn it on.

My nexus died during flashing the correct bootloader and never turned on :(
[Nexus 4 General] Gigadroid:
Sorry, ****ed up my dropbox, Skydrive is on the way ;)

Exactly the same problem...I'll search for a fix
[Nexus 4 General] David_Vaz:
Ok, thanks.

I'm searched files with Google.. could be that .. that are different from the files necessary ...
[Nexus 4 General] Gigadroid:
Use only the files from OP and you should be fine ;)

Mirror is up
[Nexus 4 General] Dany-69:
I think that after flashing a wrong bootloader the device is unable even to go into download mode, so this guide is not what you need guys .. :/
[Nexus 4 General] Junmo:
Dear Gigadroid，I can't download the 3rd file in your guide

Dear Gigadroid:

Thank u very much for your help

My friend's Nexus 4 ,the storage 16GB now shows 8GB,I need your guide to help him rescue his phone.

The trouble is,I am from China,I can't download the 3rd file ——Factory Image flashable with fastboot,so could send it to my Email junmobaby@gmail.com plz.

thank u very much!!!!
[Nexus 4 General] David_Vaz:
BRICK FIXED!! Thanks to Gigadroid!!!!!!! :) :) :) :)

---------- Post added at 05:20 AM ---------- Previous post was at 05:19 AM ----------

Use this: https://dl.google.com/dl/android/aosp/occam-jwr66v-factory-08d2b697.tgz
[Nexus 4 General] David_Vaz:
Hello!!

Tutorial on Spanish: http://www.htcmania.com/showthread.php?t=655852

Thanks for all :)
[Nexus 4 General] shiznu:
Really hard to brick a nexus. Download the factory image, extract it and run the flash all script in fastboot. That will wipe entire device and return it to a factory condition.
[Nexus 4 General] Gigadroid:
Thanks for the translation :D

That's not completly correct, yes it does wipe everything but in case of flashing the wrong rom the partitions are messed up and only flashing the factory image will not repartition the device
[Nexus 4 General] CoolApps:
Will this thread still be useful if the bootloader becomes corrupted?

I am not sure if download mode runs off or not on the NAND Flash Memory.
[Nexus 4 General] Gigadroid:
I think download mode is related to the bootloader so the chance it does work is very small :(

If you can figure out how to get into download mode you cab definitly rescue your device, if not you're ****** up because nobody ever found a method to fix a corrupted bootloader I think
[Nexus 4 General] CoolApps:
What about JTagging?, the Nexus 4 has a UART debugging slot inside hidden and I believe there is a JTag port has well.
[Nexus 4 General] Gigadroid:
Oh **** I forgot JTAG xD

There you go: http://www.youtube.com/watch?v=gYtNWt1h66E&feature=youtube_gdata_player

I think you know how to find that files on google, if not I think I have them just need to search on my harddrive ;)
[Nexus 4 General] CoolApps:
My Nexus 4 is working perfectly fine but this will do perfectly unless someone gets this issue.
[Nexus 4 General] Dany-69:
Sh!t where have you found them?

Searched for "NEXUS_4_LG_E960_RESURRECTOR_1.bin" in the whole google and no results o.O

By the way, the worst problem are not the files but the riff box, that costs too much for only one repair operation.

And the soldering skills needed are over the skills of every common human :p

Giga can i translate your gorgeous guide in italian, with the necessary credits of course? :)
[Nexus 4 General] Gigadroid:
I think it's simply the Binary file we already using with the LGNPST..

If the soldering is as such hard as soldering a DS I'm not a common human xD

Yeah, you can aslong you give me credits ;)

Gesendet von meinem Nexus 4 mit Tapatalk 4
[Nexus 4 General] Dany-69:
I think those are not common weldings..

You can see the size of the "cables" in some frames ..

I can see at least 8 cables corresponding to as many soldering points in an area of few millimeters on the mobo of the phone...

Not a cakewalk IMHO :)
[Nexus 4 General] hayaletik:
Gigadroid,

thank you a thousand times. I solved my problem thanks to you.
[Nexus 4 General] BLADESMAN1889:
Great guide my friend, to often people have big problem & ask for help then after fix they just disappear. I'm certain that there will be a great number of folk will not have to send their phone for repair thanks to this.

REMEMBER TO HIT THE THANKS BUTTON !

*edit*

[Not mine - the OP's]

Sent from NEXUS⁴ via XDA app [AOKP\/\/hitehawkx]​
[Nexus 4 General] Gigadroid:
You expressed exactly what I feel :)

Gesendet von meinem Nexus 4 mit Tapatalk 4
[Nexus 4 General] Rockstar600:
To be honest, I almost gave up!!!

I was stupid to flash Galaxy S4 ROM into my Nexus4.... I searched almost everything and even tried.... All the Toolkits, Learnt to use Android SDK, Sideload, Flashed everything separately, posted my issues everywhere I possibly could!!

Finally a friend of mine told me to try this method, I read the OP and was freaked out as I'm no geek... But the way Gigadriod has explained everything, I guess even a noob like me could do it.

I couldn't even claim for an RMA as I don't have the purchase bill of the phone. I got it from a guy who was somewhere in Delaware, and I'm in India. I thought I'm left with a Calculator which runs Android Jellybean 4.2.2. It freaked me out every time seeing the phone taking almost 10 minutes to boot and that too without an IMEI, and Baseband,

I followed these methods, and FINALLY!! I can say this works!! And it works like a CHARM!!! HATS OF TO YOU GIGADROID!! If this thread wasn't present on XDA I would have been sitting with my bricked Nexus4!! But I'm fortunate enough to get it back and now I have the phone with me!!

One thing I would like to add for people like me.

Before moving the 16gb files and the dd file, root your Nexus phone and then move them to the System folder.

(I mentioned this for someone who is like me, and needs every step written)

Thank you Gigadroid, thank you everyone who helped me!!!

You guys along with XDA are amazing!!
[Nexus 4 General] Gigadroid:
Sorry, accidently qouted my whole guide -.-
[Nexus 4 General] Gigadroid:
Every post gets me a smile on my face :D

Added the root stuff to the guide
[Nexus 4 General] Gigadroid:
Thanks for removing the rest of the qoute, clicked on answer and not on edit -.- (**** tapatalk)
[Nexus 4 General] Rockstar600:
Not an issue...

Who cares about the quote.. Hehehe every LINE of OP is useful!!

Cheers!!!
[Nexus 4 General] ‬1‬:
where is flashfactory.zip file so we'll extract it?
[Nexus 4 General] Rockstar600:
Read the Original post again, its there!!

FACTORY IMAGE FLASHABLE IN FASTBOOT, that's the zip.
[Nexus 4 General] ‬1‬:
i mean link is dead
[Nexus 4 General] Rockstar600:
You can download the 4.2.2 factory image from Google's official website. Its the same.

Do a Google search for "Download Nexus4 Factory Image" and download the JDQ39 i.e 4.2.2. (that's the one mentioned in the OP)

EDIT: The link in the OP is working fine for me.
[Nexus 4 General] ‬1‬:
yesterday it's giving a traffic error.
[Nexus 4 General] Rockstar600:
Traffic errors are common, try downloading now, if you get the same error, wait for sometime and then re-download.

Link isn't dead.
[Nexus 4 General] ‬1‬:
ok done it.returned the nexus back to life. thanks to op a million times. he found the only fix for this problem.he's a genius. respect. just want to ask this:

what's the bluetooth and mac fixes for?
[Nexus 4 General] Rockstar600:
Indeed, Gigadroid is a genius, and he saved my Nexus 4, from just being a paperweight!

Bluetooth and Mac fixes aren't for everyone I guess,

I didn't find any issues with my Bluetooth, if you have any issues with Bluetooth and Mac Address,

Follow the guide further.

I guess that's a rare issue. But we never know what is wrong with your phone,

Have a check with Bluetooth and MAC Addresses.

You can find MAC Address by going to Settings>About Phone>Status and Scroll down.
[Nexus 4 General] ‬1‬:
thanks a lot and thanked to all your messages for your help.