[Q] Boot Linux in RAM with Fastboot [Experienced users only] - Nexus 4 Q&A, Help & Troubleshooting

Plot: I have a Nexus 4 with a broken nand memory, I bought a £32 nexus 4 16gb from eBay with a broken glass and broken digitizer, I replaced the motherboards and voila, I have a working Nexus 4 and a device with a broken digitizer that won't go pass boot.
So, my "broken" nexus 4 doesn't have a working touchscreen, nor a NAND memory, but what it has 2GB of RAM and a nice processor it's the ability to boot an image with Fastboot, eg: I've booted stuff like Clockworkmod Touch Recovery or TWRP Touch Recovery.
What I would love to do is to boot a Linux version on my broken nexus and use it as a web server, or other stuff like ... display my CCTV cameras, since the display still works...
I tried multiple ARM variants, and the closest I got was with distro.ibiblio.org/tinycorelinux/4.x/armv6/piCore.gz . It was the only image small enough to download via fastboot, but... it's stuck at booting, probably I need to do smt else for it.
Has anybody got any tips for me? Anybody tried it before?
My plan would be:
1. Boot successfully any linux kernel
2. Buy an OTG Y cable to connect an external HDD.
3. Create a linux image that would boot from that external HDD
4. Control my new "linux server" via SSH
Hope this post will get some attention, I think it could be a nice thing for old unused phones as well as phones with broken displays that nobody took the time to repair.

tcr92 said:
Plot: I have a Nexus 4 with a broken nand memory, I bought a £32 nexus 4 16gb from eBay with a broken glass and broken digitizer, I replaced the motherboards and voila, I have a working Nexus 4 and a device with a broken digitizer that won't go pass boot.
So, my "broken" nexus 4 doesn't have a working touchscreen, nor a NAND memory, but what it has 2GB of RAM and a nice processor it's the ability to boot an image with Fastboot, eg: I've booted stuff like Clockworkmod Touch Recovery or TWRP Touch Recovery.
What I would love to do is to boot a Linux version on my broken nexus and use it as a web server, or other stuff like ... display my CCTV cameras, since the display still works...
I tried multiple ARM variants, and the closest I got was with distro.ibiblio.org/tinycorelinux/4.x/armv6/piCore.gz . It was the only image small enough to download via fastboot, but... it's stuck at booting, probably I need to do smt else for it.
Has anybody got any tips for me? Anybody tried it before?
My plan would be:
1. Boot successfully any linux kernel
2. Buy an OTG Y cable to connect an external HDD.
3. Create a linux image that would boot from that external HDD
4. Control my new "linux server" via SSH
Hope this post will get some attention, I think it could be a nice thing for old unused phones as well as phones with broken displays that nobody took the time to repair.
Click to expand...
Click to collapse
Sounds like an interesting project, but why not you just replace the phone? Google will accept your phone (even if you didn't buy it from them) in almost any condition and give you a replacement if you call them (85583NEXUS is the number)
If you are really interested, I was able to get a 3.6 kernel running on my galaxy nexus about a year ago by building it myself. Any prebuilt images will surely not work. Even though I got the kernel running, it was basically worthless as I did not have any mechanisms of controlling it, you could try configuring it to boot from your hard drive to get an SSH session running.

How come you didn't go through warranty for the initial NAND issue?
That said, you might be able to modify a ramdisk to point your partitions to those on a usb disk (of course with an otg capable kernel). Or perhaps you could look into multirom/kexec hardboot, and be reliant on the initial fastboot boot just to kick that into action. Multirom bases off twrp though, so that'd be hard to execute without a working digitizer. If anything, you could branch off that idea (if you can't manage to directly tweak your ramdisk to mount everything off a usbdisk)..
If anything, see if it's google would replace the phone for the bad nand. Swap the board back.. Then you'd end up with "just" a back digitizer and be in a much better position.

ziddey said:
How come you didn't go through warranty for the initial NAND issue?
That said, you might be able to modify a ramdisk to point your partitions to those on a usb disk (of course with an otg capable kernel). Or perhaps you could look into multirom/kexec hardboot, and be reliant on the initial fastboot boot just to kick that into action. Multirom bases off twrp though, so that'd be hard to execute without a working digitizer. If anything, you could branch off that idea (if you can't manage to directly tweak your ramdisk to mount everything off a usbdisk)..
If anything, see if it's google would replace the phone for the bad nand. Swap the board back.. Then you'd end up with "just" a back digitizer and be in a much better position.
Click to expand...
Click to collapse
I don't think google would have accepted it because:
- NAND Memory failed 99% because I flashed Franco Kernel's nightly version every... night.
- Obviously the phone's bootloader was unlocked and for some reason I haven't managed to lock it
- The back was cracked
I guess I can use my working version to play around with the kernel till it does what I want, I'll look into multirom/kexec. Any idea where can I get a good OTG Y-Cable. I've seen some, but I want to go for one proven to work well.

Bleh, there are times when I'm testing some code and end up flashing boot 100 times a day.

ziddey said:
Bleh, there are times when I'm testing some code and end up flashing boot 100 times a day.
Click to expand...
Click to collapse
Yeah, me flashing may not be the reason, however, my phone had the back cracked and a bit of the middle line damaged, so I bet nobody would have fixed it on warranty. I got really cheap and fast getting a replacement on ebay with a broken screen and do the swap, I posted two images below to show that the nand was really just... write only (is).
i.imgur.com/2VrVw6U.png - Via LG's Own Recovery Software (I know the DLL is wrong, but it's supposed to work) // i.imgur.com/SJDmTk9.png (Via Fastboot)
Sorry for not being able to post images, still have to go up to 10 posts. I've been quite selfish so far and only got info from XDA, promise if I will get anywhere with this threat I'll make a tutorial of how to do it and an example of a useful thing you can do with a broken phone .
==============
Anw, back on the subject, can anybody help me with how to install MultiBoot on a USB Stick? I would assume the things will go as follows: Have some magic on the USB stick, have a boot image that boots from there (via FASTBOOT) ==> multiboot boots my desired OS from the USB stick as well.

not sure what you're doing there for the second picture. Looks like some sort of script..
first pic looks fine. It's supposed to only get to 85%.
As for multirom, it's on you to learn how to create a ramdisk->boot.img that will mount usb partitions instead of mmcblock.

ziddey said:
not sure what you're doing there for the second picture. Looks like some sort of script..
first pic looks fine. It's supposed to only get to 85%.
As for multirom, it's on you to learn how to create a ramdisk->boot.img that will mount usb partitions instead of mmcblock.
Click to expand...
Click to collapse
It's supposed to get to 85% and restart. However it does not, I restarted it manually into bootloader, and tried to use flash-all.bat from the flashfactory for my model.. and then I get all of those write errors (as before) (that was a try to flash a custom recovery with Nexus Toolkit, I tried it manually). As a note, erasing all the partition works, formatting emmc partition obviously doesn't, formatting ext4 partitions: starts creating the filesystem, the partition is sent and then ... BOOM failed flash write failure as when I am trying to flash anything else.
As for the ramdisk and all, I shall use my medium Linux experience to dig into that and I'll let you guys know if I will get anywhere. For now I'm doing my best to make my own Y Cable ... this will be tricky.
Thanks to all of you who support my post, it's really cool to find a place where I can talk about stuff like this. I really hope if I manage to get somewhere I will make a tutorial that will help someone to put their old/bricked phones to good use.

Related

UG007 wont flash, wont boot. Download IDB failed

Hi, I'm really at a loss here.
After installing finless 1.5 rom, it booted fine, but after a restart i got a red rectangle warning sign on boot.
So i have manually set it to boot into bootloader by shorting the pins, but every time i try to flash an update.img i get the error: Download IDB failed.
And the only update.img that i found was kasty-ug802-41-011 and of course, the finless rom tools.
But i always get the "Download IDB failed"
Tried with the supplied USB cable directly to the USB 2.0 output on the computer, same error....
Is this device bricked or what can i do? Halp!
I have an UG007 ii. The only difference (I think) is a second microUSB port.
I loaded cwm by downloading this zip from the website: http://androtab.info/clockworkmod/rockchip/rk3066/ and renaming it to update.zip and installing. I installed mine by copying to /sdcard but it might install from attached flash drive (unsure). This cwm does a recovery img backup and loads cwm. Once booted into recovery cwm gives many options. After I made a couple backups with cwm - one to external sd - I have been tinkering with all kinds of features and applications.
I did not try finless bob roms. Unfortunately, he might still be away from his forums. But, maybe someone else could assist your specific request better than me.
Also, mine looks like this one but 2 microUSB ports.
Good luck.
I think your device is bricked you need to look for how to short out the nand chip to get it into Mask ROM flash mode then try to flash it, the same thing happened on a neo g4 to me. You might find something more over at freaktab about it....
Sent from my Nexus 7
quincyquinn said:
I think your device is bricked you need to look for how to short out the nand chip to get it into Mask ROM flash mode then try to flash it, the same thing happened on a neo g4 to me. You might find something more over at freaktab about it....
Sent from my Nexus 7
Click to expand...
Click to collapse
Thanks for replying, do you mean the small pins directly on the chip? Or the two solders on the left side of it?
I saw someone talking about pin 6 and 7 on the chip, but from what side do i count those?
skenliv said:
Thanks for replying, do you mean the small pins directly on the chip? Or the two solders on the left side of it?
I saw someone talking about pin 6 and 7 on the chip, but from what side do i count those?
Click to expand...
Click to collapse
I'm not 100% on which pins you short out for the ug007 on the ug802 it is the pins to the side of the chip..
http://youtu.be/4dlQkaDcgSY
You might be better off opening at tread on Freaktab about this someone there will know more than me sorry could not be of more help...

[Q] please help with my nexus....

I went to flash cyanogenmod 10.1.
backed up rom via clockwork.
wiped data, flashed new rom.
flashed gapps.
I think i flashed the wrong gapps
upon boot I get "setup wizard has stopped" as well as one regarding gapps.
this prevents me from using the rom. I can access the calender and clock that is all. not the settings or reboot menu.
I can access the built in storage via windows, shows up as a nexus 7.
Ok, not a big deal, I will boot into recovery via the bootloader.
That no longer works. Sits at a google screen forever
Ok, I will use fastboot via the bootloader....
That no longer works. As soon as a usb cable touches the nexus either power or pc it freezes the bootloader requires a reboot.
windows rejects the usb and states is malfunctioned and unrecognised (though it works fine in the rom)
fastboot doesn't see the device.
I've tried:
three usb cables.
windows safe mode.
different ports
uninstall/install drivers.
nexus tool kit (doesnt recognise device)
wiggling the cable as suggested
anybody got an idea how I can either get the bootloader not to freeze when using a usb cable or how to boot into some kind of recovery (which was there!!!!!)
please? :fingers-crossed:
Something seems a little off here.
Was it a gapps package for some other device? Hard to see why flashing something to /system would produce the result you got, as the (gapps) edify script would at most specify a mount of "system", not a /dev/block/ device name.
Does adb work (with the ROM booted)? If so, can you get a root shell or install .apks?
The fact that the ROM boots suggests that the bootloader is working correctly enough to load and execute the LNX (boot) image. That means that in principle you could flash (using the "dd" command) a recovery image to the boot partition from a root-privileged command line (either an adb session or a terminal emulator). Performing a regular (power button) restart would boot you into a recovery session.
Obviously, this hinges on you getting a command line somehow with your reduced-functionality ROM limping along as it is. It's not obvious to me how you will make that happen though.
I am not at all confident that this will fix the bootloader <--> USB issue without somehow reflashing the bootloader without using fastboot!. The only way this has been observed for the N7 has been with the OTA process and a stock recovery - the OTA puts an image (**note - important!** this OTA bootloader image is slightly different from the bootloader image in the factory/fastboot ROMs) into the USP partition and some magic occurs on the next boot.
Well, anyway there's some ideas. Would you mind identifying the "wrong" gapps that you used? For the life of me I can't see how it caused the symptoms you are observing...
good luck
Hi. Many thanks.
Ok.....
Gapps. I downloaded the appropriate package via the link on the Rom page. However, I flashed a jellybean package I'd downloaded for my one x. I may be naive in thinking that Gapps is Gapps no?
I deduced it was that having googled the setup wizard problem and seeing that others had had it.
Bootloader.
Again. Ive googled around and can see many have the freezing bootloader with usb issue. Some say its the cable. Some say its the pc. But it does it with the charger as well. Again this is an issue for some. not sure what to do! Works fine until the cable goes in.
Recovery.
Again I know its an issue booting recovery from bootloader. I've read you need the usb in to a pc to make it happen. Obviously that's a no go for me
Adb.
Never really used it. Used fastboot many times. I assumed you need to be able to access the developer options and activate debugging etc within the Rom to allow it to work? I can not do that. Its around 10% funtional. I can place a reminder on the calender but that's about it! No way to system settings.
Sorry if thats teaching you to suck eggs. You obviously know your stuff, just wanted to make it clear.
Ta.
Sent from my HTC One X+ using xda app-developers app
olly2097 said:
Recovery.
Again I know its an issue booting recovery from bootloader. I've read you need the usb in to a pc to make it happen. Obviously that's a no go for me
Click to expand...
Click to collapse
A normally functioning tablet does NOT require you to be plugged in to a PC in order to boot the recovery from the bootloader menu. Maybe you are saying something else here, but I trust you've tried starting the recovery without anything plugged in at all.
Unless you can get the recovery working, the only hope you have is somehow levering up what you have available to gain a privileged thread of execution. Obviously that's going to be pretty challenging.
good luck - you're going to need it.
PS: could you provide a URL to the *wrong* One X gapps download? I think the gapps bundle ships with system libraries - I want to peek at those libs to see if there are any hardcoded block device paths that might explain the queerness you observed. (I can't imagine why this would be the case, but...)
bftb0 said:
A normally functioning tablet does NOT require you to be plugged in to a PC in order to boot the recovery from the bootloader menu. Maybe you are saying something else here, but I trust you've tried starting the recovery without anything plugged in at all.
Unless you can get the recovery working, the only hope you have is somehow levering up what you have available to gain a privileged thread of execution. Obviously that's going to be pretty challenging.
good luck - you're going to need it.
PS: could you provide a URL to the *wrong* One X gapps download? I think the gapps bundle ships with system libraries - I want to peek at those libs to see if there are any hardcoded block device paths that might explain the queerness you observed. (I can't imagine why this would be the case, but...)
Click to expand...
Click to collapse
yeah, tried both ways.
The gapps I downloaded was a while ago. I've deleted it. was for 4.1.1
anyway. I....
Booted to bootloader, selected recovery, pressed power and rammed in the usb cable at the same time.
recovery
now running rom fine after flashing TW recovery via toolkit and mounting to pc.
I cant explain it. it took forever. but thank you

[Q] Is my tablet beyond hope?

For the last two weeks, I've tried pretty much everything I can think of to get my TPT booted again. Symptoms of its current illness include:
Lots of error messages when booting into CWM recovery ("E:Can't mount /sdcard" for example)
If I attempt to boot normally, I get stuck on the Lenovo logo screen.
Randomly I'll boot into CWM recovery and get its logo on the screen, and a line of text, but no menus.
Other times I'll attempt to boot into CWM recovery, and just get a blank screen
So last night I used nvflash to put a new CWM recovery into partition 6: after which I was able to boot into CWM with no errors. (Yay) However, when I tried to reinstall CynogenMod (whose zip file was sitting on my external sd card), it hung during the installation. I rebooted anyway; this time it got as far as the CyanogenMod spinning logo and hung there. I went to bed, and seven hours later it was still spinning away.
Then I rebooted into CWM (without errors) and managed to install CM ROM this time also with no errors. However, again I can't boot. I get as far as the Lenovo logo, and if I boot into CWM recovery I have all the mount errors again.
Along the way I've erased the cache; done a factory reset, etc.
So: nvflash, new CWM recovery (but still errors), reinstalled CM ROM, but can't boot into it.
Any suggestions? Has this machine packed it in - is its hardware faulty in some way? Or is there something I could try which I haven't already?
Thanks folks - I think I've reached the limits of my fixing ability, and would be very gratefiul of some advice.
Thanks again,
Al
In CWM check to see if your /System folder is mounted with read-write privileges or only with read-only. If the former, then your bootloader may have locked itself. Also, what is your device model? If you have a have a US device then it cannot be unlocked as it has been encrypted by Lenovo...
Sent from my ThinkPad Tablet using Tapatalk
Thanks - it's not a US model (I bought it in Australia, where I live). I thought the bootloader was unlocked because I could use nvflash. When I boot into CWM recovery, I can't mount /system: if I try I get the error "Error mounting /system", along with other errors about not being able to mount or open /cache/recovery/{command, log, last_log}. And since I can't mount anything, I can't install zip files.
I can't remember the device model, although I suppose I could use nvflash to trawl through the partitions somehow. (Since I can't boot the device I can't do the usual thing of checking out the system settings.)
Anyway, at the moment it won't boot beyond the Lenovo logo, even after putting on a new CWM recovery (with nvflash - but as we see above this new recovery is still not working) and reinstalling a ROM (with CWM recovery, which I managed to do on the one occasion I could boot into CWM without mounting errors). It's a right pain, that's what it is.
amca1960 said:
Thanks - it's not a US model (I bought it in Australia, where I live). I thought the bootloader was unlocked because I could use nvflash. When I boot into CWM recovery, I can't mount /system: if I try I get the error "Error mounting /system", along with other errors about not being able to mount or open /cache/recovery/{command, log, last_log}. And since I can't mount anything, I can't install zip files.
I can't remember the device model, although I suppose I could use nvflash to trawl through the partitions somehow. (Since I can't boot the device I can't do the usual thing of checking out the system settings.)
Anyway, at the moment it won't boot beyond the Lenovo logo, even after putting on a new CWM recovery (with nvflash - but as we see above this new recovery is still not working) and reinstalling a ROM (with CWM recovery, which I managed to do on the one occasion I could boot into CWM without mounting errors). It's a right pain, that's what it is.
Click to expand...
Click to collapse
Well there may be hope yet as I understand (not sure) that only the US models shipped with a locked bootloader. My US model locked itself and after some research I eventually replaced the motherboard with one from eBay. There are threads around here regarding the bootloader that might have a few "options" for you to try. On the other hand I read on the Lenovo forums that Lenovo actually replaced motherboards (during the warranty period) due to failures which caused the nand to lock read-only. If the "options" don't work then the latter may be the case and you might want to consider my approach or just move on to a newer device. Good look...
eKeith said:
Well there may be hope yet as I understand (not sure) that only the US models shipped with a locked bootloader. My US model locked itself and after some research I eventually replaced the motherboard with one from eBay. There are threads around here regarding the bootloader that might have a few "options" for you to try. On the other hand I read on the Lenovo forums that Lenovo actually replaced motherboards (during the warranty period) due to failures which caused the nand to lock read-only. If the "options" don't work then the latter may be the case and you might want to consider my approach or just move on to a newer device. Good look...
Click to expand...
Click to collapse
I never thought of replacing the motherboard! I'm happy to try it, though, given instructions, and the correct (ROW; ie non-US) motherboard. Is it hard to do - and where can I find out how to do it? And how do I find out exactly what model I have?
Thanks for this - I'd really like to get this beastie working again.
amca1960 said:
I never thought of replacing the motherboard! I'm happy to try it, though, given instructions, and the correct (ROW; ie non-US) motherboard. Is it hard to do - and where can I find out how to do it? And how do I find out exactly what model I have?
Thanks for this - I'd really like to get this beastie working again.
Click to expand...
Click to collapse
No offense intended but you are somewhat peculiar as you are familiar with NVFlash, can determine which partitions to flash with the correct images but you don't have a record of, or can't find your device's model number? Check on your SD Card port flap (or your invoice). Then check out this page for details.
However if you decide to replace the motherboard then search eBay for "thinkpad tablet motherboard" and choose either of the 1838 or 1839 options. Any will fit and work but you probably won't get your (non-US) choice of replacement motherboard so will probably just have to get what's available.
See here for some basic dis-assembly instructions. Then just take you time and the rest will be obvious. Good luck!
Thanks for that! I tried responding earlier, but my post was blocked by the system. Anyway, I'll check for a new motherboard and have a go installing it. Do you know how I might prevent this from happening again?
amca1960 said:
Thanks for that! I tried responding earlier, but my post was blocked by the system. Anyway, I'll check for a new motherboard and have a go installing it. Do you know how I might prevent this from happening again?
Click to expand...
Click to collapse
No problem at all.
"I'm in the same boat": I replaced my motherboard with another US version about 6 weeks ago, rooted, installed CWM recovery and steady so far... "with fingers crossed"...
Let us know how it goes...

[Noob friendly] Basics about the G2 (bootloader, rom, etc.)

Some basics - About bootloader, kernel, recovery, rom, /system and some other partitions.
There are many noobs out there and sometimes even I am one. Two days ago @Closed Force asked me, where I know my stuff from and why things are like they are... So I finally decided to write this little guide about how Android devices basically work and what are the special things about our G2.
If you find wrong facts or any other mistakes (grammatical, language, contentwise), please bear with me. That's how I read it in the forums. And of course not everything written on XDA is correct. So please tell me by PM, or by posting in this thread if you have additions, corrections or any other concerns about this OP.
Where I got to know all this stuff? Reading, reading, reading. I first started modding my old HTC desire like 4 years ago. Since then and even before I'm reading. Mainly here on XDA but also on some german forums and wikis. It might have taken me easily 200 hours or more. So the only way to learn for a newbie (and everyone else too) is reading.
Personally I own a D802 variant. I know about some things that were different in details for the US variants, but things should be right as they are.
Finally thanks to
@d00lz for some extra research/additions and a quick read through.
@Art Vanderlay for some additions.
So let's get started:
When you press the power button, your device will load the Bootloader. The Bootloader afterwards wil load either the Recovery Image (recovery.img), the Kernel (boot.img) or the Download Mode Bootloader (laf.img), depending on the keys you press. At the moment there are three different bootloaders; The Jellybean one, the KitKat one, and the new Lollipop one. Not one of these Bootloaders can be unlocked yet, so there are workarounds which allow us to boot custom ROMs (specifically Kernels, but more about that later) and custom Recoverys. At the beginning there was the Jellybean Bootloader. The Developers (sorry, I don't know which ones) found out how to get around the locked Bootloader pretty early. They called this workaround Loki. It's intergrated into nearly every ROM except the ones which require the KitKat Bootloader (but that's usually not the reason they don't support the JellyBean one). Anyways, soon the KitKat update came and so did the new KitKat Bootloader. Sadly, LG patched the Loki exploit with this new update. However, the Developers found a new way to get the Bootloader booting files which weren't signed by LG. They called this workaround Bump. Bump basically imitates the LG signature so the bootloader thinks this file was really signed by LG. Obviously this workaround works with the JellyBean Bootloader too. In the Lollipop Bootloader this exploit has been closed and no one knows how to get around the new Bootloader, yet. In conclusion to Bootloaders, as long you have a working Bootloader, your device is not dead. You can usually recover it in some way.
The G2 has about 30 partitions (for a more detailed explanation, look here, thanks @d00lz). Each partition has its own purpose. One of them is the Recovery partition. Imagine: A Recovery partiton and a working Bootloader are everything you need to keep your phone working. It's kind of an Operating System in itself, completely independent from Android or anything else stored on your Mobile. The great thing about the Recovery partition is that it's so small that it can be run directly in the RAM. This means it's capable of modifing EVERY goddamn partition on your Mobile, including the Bootloader and the Recovery partition itself (means you can flash a new recovery.zip in your current recovery). Attention: if you are using the Recovery with a 4.4 KitKat Bootloader, it needs to be a Bumped Recovery. If it isn't bumped the Bootloader realizes that the Recovery is not genuine and generates a "Secure Boot Error".
Same thing goes for the Kernel. The Kernel is located in your /boot partition (found gzipped inside your boot.img) and is loaded by the Bootloader when you only press the Power Button and you let your Mobile boot normally. This is the reason why your Kernel also needs to be Bumped if you want to get your system booting on a KitKat Bootloader. When 4.4 KitKat came out, most Developers switched over to using LG's 4.4 KitKat sources for their projects. After a while it was realized that 4.2 JellyBean sources were a lot more reliable for AOSP baed ROMs. This is why most AOSP ROMs use the 4.2 JellyBean Bootloader and the 4.2 JellyBean Kernel sources while Stock based ROMs use the 4.4 KiKat Bootloader and 4.4 KitKat Kernel. There are different Kernels for AOSP ROMs and for Stock based ROMs. This is because Stock Kernels support some ROM functionalities that AOSP ROMs don't have, for example; Knock Code. (Note: Knock Code isn't open source, which is also another big reason why it isn't available for AOSP ROMs.) So there are huge differences between Stock and AOSP based ROMs/Kernels. The Kernel (without factoring in the AOSP and Stock issue) can be switch at anytime you want.
Now about the /data partition... All your personal stuff, including Apps, System Settings, App Data and so on will be stored there. The reason why you should clear it every time you change the ROM is that there are many variables set by the ROM you are coming from. Your current ROM may have some tweaks the new one doesn't have which means the new ROM doesn't know how to handle them which leads to crashes and instability.
Now let's get to the ROM... Having a 4.2 JellyBean Bootloader and a 4.2 JellyBean Kernel doesn't mean the top layer has to be 4.2 too. Most of the AOSP based ROMs are based on Googles KitKat or Lollipop sources. And this is true KitKat or Lollipop, with all its functionalities. Those huge version differences cause some problems in development. No wonder some things do not work properly today, but it's still the best working combination at the moment. It's kind of a wonder how it works as it is, but let's be happy with it. I'm very curious how AOSP ROMs with Lollipop Kernel sources will work. Your ROM and your entire existing Operating System is found in the /system partition. This is why it's the main partition which is modified while flashing. Which partitions will be modified and (how) is written in the updater-script file of the file you're going to flash. Theoretically, running a updater-script of a ROM which changes the Bootloader (/aboot partition) can brick your device. That's also the reason why you should only flash stuff made for your device only!
As already said an updaterscript can modify every partition through the recovery. All ROMs bring their own kernel, so you basically don't have to care about it, except you want to use a non-bumped ROM (with kernel) together with the KitKat bootloader.
Finally something about the baseband/modem (these terms are interchangeable). I noticed that the Developers or rather the Original Posters sometimes don't know which baseband the user should use with the ROM. In earlier days the wrong baseband could make the ROM bootloop. Today most ROMs work with most basebands. It's obviously best if you stay on the one you currently are on and just flash another one if something doesn't work (auto-rotation for example). The baseband can be flashed at any time and is on it's own partition.
Okay Download Mode time. It's part of the laf partition (laf.img). This partition is used by LG and it's PC software to recover the phone and bring it back to Stock. It's a partition in itself, but not completely independent of the Bootloader. It's because of this that you can of course have a fully working Bootloader, but a dead Download Mode. This means you will not be able to flash a .KDZ/.TOT file the next time you are in big trouble! ^^
Okay to wrap up I should mention the EFS partition. The EFS partition stores your device's IMEI (and the serial number as far as I know) of your device. NEVER wipe it. With a empty EFS partition you can use your mobile as a brick, ok maybe you can use it as a media tablet, but that's it (WiFi still works, @Art Vanderlay tested; see below).
Again: if you got questions/additions/correction or see a mistake, post below, or PM me, I'll edit this post...
reserved
Great post. A thread like this should be the first thread you read as soon as you enter the LGG2 sub forum.
Expect a private message soon.
Also, reserved for possible future additions .
d00lz said:
Great post. A thread like this should be the first thread you read as soon as you enter the LGG2 sub forum.
Expect a private message soon.
Also, reserved for possible future additions .
Click to expand...
Click to collapse
And you could modify your signature now^^
Sunandroid said:
And you could modify your signature now^^
Click to expand...
Click to collapse
Nice write up Sunny. You can credit Dan Rosenburg for creating loki. I can also confirm that wifi still works without modemst1 and modemst2 aka efs. My phone suffers for this thread.
@Sunandroid
Perfect! This was all I was looking for. Now I finnaly understand how my G2 works and I'll most likely not need to ask more "noob questions" in this matter.
But I would like to ask some questions because I've left with doubts after reading the OP.
As long as I have /recovery/ and /aboot/ working, I can recover my device exclusively with software. Is this right?
I've concluded that you need /aboot/ to be able to enter in /recovery/ and with recovery you can mess up with any other partition.´
How can I tell if /modem/ found here is compatible with my device? Are all /modem/ partitions the same in the same models? For example, I'm from Portugal so I have a Portuguese D802 LG G2 (if I type its IMEI in a site, it recognizes it as portuguese). If I flash a German D802 modem or English or even American, considering that they are all from D802 would they work flawlessly with my device?
Why does /modem/ cause auto-rotation to work? What exactly is /modem/?
I have a backup of all the partitions in my laptop (made via TWRP). But what happens if I accidentaly lose my /efs/ partition? Can I flash another phone's /efs/?
Rayaxe said:
@Sunandroid
Perfect! This was all I was looking for. Now I finnaly understand how my G2 works and I'll most likely not need to ask more "noob questions" in this matter.
But I would like to ask some questions because I've left with doubts after reading the OP.
As long as I have /recovery/ and /aboot/ working, I can recover my device exclusively with software. Is this right?
I've concluded that you need /aboot/ to be able to enter in /recovery/ and with recovery you can mess up with any other partition.´
How can I tell if /modem/ found here is compatible with my device? Are all /modem/ partitions the same in the same models? For example, I'm from Portugal so I have a Portuguese D802 LG G2 (if I type its IMEI in a site, it recognizes it as portuguese). If I flash a German D802 modem or English or even American, considering that they are all from D802 would they work flawlessly with my device?
Why does /modem/ cause auto-rotation to work? What exactly is /modem/?
I have a backup of all the partitions in my laptop (made via TWRP). But what happens if I accidentaly lose my /efs/ partition? Can I flash another phone's /efs/?
Click to expand...
Click to collapse
Glad I could help you this way...
about /aboot and /recovery: yes you are right. It is even better, if you have an intact laf too. That's the download mode. But as long the other two work, you can fix the laf partition easily. But if you get into the situation, that only those two are working, better don't flash a bootloader (=/aboot). If it's the wrong one your device is bricked.
Aboot is the key to your device. Everything else is fixable. At least with a little bit of knowledge and time. But better don't try it out.
No, the modems are not all the same. There are (sometimes depending on the branding) extremely small differences between the basebands/modems. I personally never had the problem, that I couldn't get any connection at all. But that's not fatal. Just flash another one and try again if it works. Btw: I once made a test in some german forums with different KK basebands. I'm not sure anymore, but the differences were minimal and I think killed my connection totally.
If you loose your efs stuff, your device is a brick with extended functionalities. The IMEI and some other data stored in the efs partition is worldwide unique. So you can't just pick the one of another phone (except the other G2 is bricked or whatever). You need the IMEI for general network connection. So it will still boot up, but you won't be able to text or call anyone with this phone.
Okay ^^
So this is a full backup of all the needed partitions right? http://prntscr.com/76edu4
Should I convert these files to something like .img to be able to flash in the phone just in case I get something that disables my TWRP access?
Rayaxe said:
Okay ^^
So this is a full backup of all the needed partitions right? http://prntscr.com/76edu4
Should I convert these files to something like .img to be able to flash in the phone just in case I get something that disables my TWRP access?
Click to expand...
Click to collapse
Yeah, I guess so. As long as you ticked everything when you backed up (with blastagators TWRP!; the official one doesn't allow to backup the efs stuff), this should be fine.
Well you could. But tbh I have no idea how to convert those files into .img files. But it isn't necessary anyways: It's unlikely that you loose the efs data on your phone unless you brick it somehow. If the phone stays recoverable, The first thing you are going to do is: flashing bootloader, laf and boot.img. Then you will go back to stock through the download mode. Once you've done this it's an easy one to install twrp again and restore the efs backup. No one is gonna flash ~32 partitions by hand. There are "easier" and more usefull ways to recover the device.
Oh and btw: no backup contains the bootloader, laf and boot (recovery developer don't implement this for some reasons). But this doesn't matter. The only thing you really need is the efs backup (which partitions exactly you can see here). Everything else isn't unique and can be extracted out of kdz files and restored this way.
Edit: the two partitions mentioned here are
Sunandroid said:
Okay Download Mode time. It's part of the laf partition (laf.img). This partition is used by LG and it's PC software to recover the phone and bring it back to Stock. It's a partition in itself, but not completely independent of the Bootloader. It's because of this that you can of course have a fully working Bootloader, but a dead Download Mode. This means you will not be able to flash a .KDZ/.TOT file the next time you are in big trouble! ^^
Click to expand...
Click to collapse
My PC doesn't install any driver when my phone is on download mode,
On recovery mode (twrp) i have MTP access but on download mode i'm not having any access,
does that mean my download mode is dead?
GoPogoOreo! said:
My PC doesn't install any driver when my phone is on download mode,
On recovery mode (twrp) i have MTP access but on download mode i'm not having any access,
does that mean my download mode is dead?
Click to expand...
Click to collapse
This has nothing to do with this thread here. The issue is different. But I have no clue what it might be... If I can elaborate a maybe working answer I'm gonna answer you in the noob thread.
Sunandroid said:
This has nothing to do with this thread here. The issue is different. But I have no clue what it might be... If I can elaborate a maybe working answer I'm gonna answer you in the noob thread.
Click to expand...
Click to collapse
Oh btw i tried your (noob friendly) no download mode, no recovery mode ..... using slax,
when i typed ls /dev/sd* it's only showed my PC (only one sda) and there is no sdb, not even one
Weirdly i can access TWRP, but i can't make any custom rom boot,
Man this is frustating
I have a phone, G2 D802 Int., which probably has a corrupt EFS partition. I guess the owner broke it flashing incompatible things into it. As a result of the corruption, ESN/IMEI is lost. It shows null. But very interestingly, the EFS partition mustn't have been wiped because by chance of a boot among a hundred, it shows up the ESN. If by chance you come across to ESN, everything operates normally. And if you reboot the phone, ESN is gone again..
I managed to make recovery work again, by upgrading the phone to lollipop. (It was another time I came across ESN.) But no download mode, USB is never identified (unkonwn usb device), USB modes cannot be changed, unless by chance you come across, USB debugging is no more either.
I was thinking to backup some necessary partitions from a working phone of the same variant, but since it's "unknown device", I cannot query it as a disk. Neither it works in Ubuntu. ls /dev/sd* doesn't show the phone. It even doesn't show the working phone.
Any idea about how I can fix the corrupted EFS partition?
pisisler said:
I have a phone, G2 D802 Int., which probably has a corrupt EFS partition. I guess the owner broke it flashing incompatible things into it. As a result of the corruption, ESN/IMEI is lost. It shows null. But very interestingly, the EFS partition mustn't have been wiped because by chance of a boot among a hundred, it shows up the ESN. If by chance you come across to ESN, everything operates normally. And if you reboot the phone, ESN is gone again..
I managed to make recovery work again, by upgrading the phone to lollipop. (It was another time I came across ESN.) But no download mode, USB is never identified (unkonwn usb device), USB modes cannot be changed, unless by chance you come across, USB debugging is no more either.
I was thinking to backup some necessary partitions from a working phone of the same variant, but since it's "unknown device", I cannot query it as a disk. Neither it works in Ubuntu. ls /dev/sd* doesn't show the phone. It even doesn't show the working phone.
Any idea about how I can fix the corrupted EFS partition?
Click to expand...
Click to collapse
I luckily never had to try it, but scroll down a bit over here: http://www.droidviews.com/how-to-backup-and-restore-lost-imei-on-lg-g2/
I wish you luck!
Sunandroid said:
I luckily never had to try it, but scroll down a bit over here: http://www.droidviews.com/how-to-backup-and-restore-lost-imei-on-lg-g2/
I wish you luck!
Click to expand...
Click to collapse
Yes I know that, but since I cannot take the device to USB debugging mode, it's not the first step I could take. "USB device descriptor is failed", this is what I get when I plug the phone.
pisisler said:
Yes I know that, but since I cannot take the device to USB debugging mode, it's not the first step I could take. "USB device descriptor is failed", this is what I get when I plug the phone.
Click to expand...
Click to collapse
So what is the current state of your phone? You have twrp installed. Can you push stuff through adb when you are in the recovery (this is pretty important, since we maybe can fix the download mode this way)? Does it boot into android?
@Sunandroid, device operates normally except the voice call & data, since these depend on IMEI. The phone boots normally, and everything is working, only the IMEI shows as "null". Additionaly, cannot enter to download mode, no recovery installed, original recovery is working, which is used to do a factory reset only. No USB debugging, it says "USB device descriptor failed". Thus no adb.
pisisler said:
@Sunandroid, device operates normally except the voice call & data, since these depend on IMEI. The phone boots normally, and everything is working, only the IMEI shows as "null". Additionaly, cannot enter to download mode, no recovery installed, original recovery is working, which is used to do a factory reset only. No USB debugging, it says "USB device descriptor failed". Thus no adb.
Click to expand...
Click to collapse
From what I've read about this issue (device descriptor...) just now, it is not software but hardware related.
I've heard of people solving that issue but I couldn't manage to do. Gave the phone to my customer back after 4 days. Importer service put the phone out of warranty and offered him a motherboard replacement for 75 $ and it's pretty fair I think. After all it comes funny when he says he's gonna file a case about returning the phone and take his money back. Well, it's up to him to end up with nothing in hands after months of waiting for a case.
Shortly, this file has been closed without a reasonable solution.
Thanks for your effort @Sunandroid.
pisisler said:
I've heard of people solving that issue but I couldn't manage to do. Gave the phone to my customer back after 4 days. Importer service put the phone out of warranty and offered him a motherboard replacement for 75 $ and it's pretty fair I think. After all it comes funny when he says he's gonna file a case about returning the phone and take his money back. Well, it's up to him to end up with nothing in hands after months of waiting for a case.
Shortly, this file has been closed without a reasonable solution.
Thanks for your effort @Sunandroid.
Click to expand...
Click to collapse
Glad to hear that. Hitting the thanks button doesn't hurt.

hard, or possibly soft bricked sm-t230 tab 4 7.0. please help!

Hi y'all, i recently within the last month 2 months taken up a very unsual craving for delving deeper into my technology, with that being said. my tab 4 7.0 sm-t230 i Downloaded an app called "lucky patcher" was messing with it, been reading about deoxe(ing) my tablet,it gave me the option to do it for me (usually i enjoy the challange of using a emulated terminal and what not) but every file etc would take too long, and it worked, my daughter ot well over 150 million score on subway surfers etc. i notice my phone sluggish even bein over clocked, I/Os that i did myself, running max cpu and performance i could blabber forever since my 3 kids arnt interested in my newly found hobbie and my husbands a truck driver, i'm getting it out here (i'm sorry but i do need help) so anywyas i decided to kick her into recovery and begin to just manually delete all the dex copied files through TWRP went good till i wetn to reboot after staring at my screen for 3 hours and got threw up on twice from sick babies and i was boot looped. i decide to restore a previous freshly flashed rom/root backup. well they were deleted too. and all i could do was a master re format i think is what i read it was called, and excited to get back and re download everything i notice i now have no OS and no recoveries and TWRP fulll of emptiness. i can play through TWRP i've changed file permissions i've tried everything ive read and tried everything i learned and experianced to fix this issue, and yet stillno idea how to fix this issue..
Now the fun part is my set up. the only pc i have means and access too is my samsung Chromebook, and my tablet, that's it, no phone because my tablet handles everything my little heart can desire.
needless to say, i need some kinda recovery tool kit i can use via my chromebook, that'll allow me to use ADB for chrome (which another question i have is how do i enable my tablets USB debugging if i can't get into the phone?) so toolkit for chromebook for a ADB side load if possible. or some way to do it through my emulated terminal in TWRP,. my minds rushing, i'm confused and my over emotionally stressed female head is killing me without my tablet. (drive to any town where i could use anything but my chrome book. 3.5 hours.
sorry i pray this post doesnt get deleted. I need help because my tablet is my main source of income being in real estate when i'm back in town once a month. never made a page or a forum or anything like this usally google magic does it. but 3 days and countless mind numbing forums i've given in.. please help me! i'll donate pay something idc at this point. -a pissed off irish southen woman on the verge of pms and a meltdown thanks in advance i'll try to reply as fast as humanly possible, ill be up for awhile tonight going through more posts.
0well with a little more tinking around, i think i have found the issue as too why no matter what i do i'm unable to boot a rom/os. mt EXT3 wil not mount my system i'm clueless as to how to fix that at all threw TWRP, anyone have an idea of any kind please? i'm for anything, even if after more attempts and countless hours, i'll record me skipping it across my lake, and we'll all take guesses as too how many skips it'll do. hopefully my dog will fetch it if i throw at the wrong angle. (completely dumb jokes are the only thing keeping me from returning Sain.) we all cant be too serious. please very interested on how to fix this issue tho.
s,
you need to get a custom rom zip onto an sdcard, check development section.
in twrp, flash the rom,
if the rom still doesn't boot, then reboot to twrp again and use the format data option, then reflash rom and try again.
twrp terminal sucks, you can try flashing aromafm https://www.androidfilehost.com/?fid=95916177934547314
this is for the marvell variant, it may work for the msm/qcom variant.
stop using lucky patcher.
m
moonbutt74 said:
s,
you need to get a custom rom zip onto an sdcard, check development section.
in twrp, flash the rom,
if the rom still doesn't boot, then reboot to twrp again and use the format data option, then reflash rom and try again.
twrp terminal sucks, you can try flashing aromafm https://www.androidfilehost.com/?fid=95916177934547314
this is for the marvell variant, it may work for the msm/qcom variant.
stop using lucky patcher.
m
Click to expand...
Click to collapse
Hi, that's where another problem lies within, I have no way of communicating with the phone or being able to do much, considering the only pc/laptop i have access too is my chromebook, and this thing is a ssteaming pile of regurgitated dog bile. if theres one regret in life.. buying this thing.. even dual booted i still can't process the zips or compile them properly, maybe i need to find out how to build a zip file from scratch and comepile the corresponding stuff myself in small hopes it'll work on this chromebook
and yes, never again will I use that. it worked don't get me wrong. but then it decided to deodex my system to oblivion.
s,
hey that rhymed !
your alternative is to use a usb thumbdrive and an otg cable , else nada.
m
moonbutt74 said:
s,
hey that rhymed !
your alternative is to use a usb thumbdrive and an otg cable , else nada.
m
Click to expand...
Click to collapse
I'm gla you have a sense of humor, thank you hun. looks like i'm tabletless until i go back into town in two weeks ): i suppose till then i will tinker with it some more and unlock the universe, or find a way to convert zips that are made for windows or mac and be able to convert it to be able to be used and transfered unto the phone. Chromium os or chrome now has ADB for chrome as an extension but very iffy, has 3 options to screen record/screenshot and terminal. i was able to use vitural box for about 2 hours and force odin to pretend i was on a widnows enough to orignally root, then it crashed my chromebook. Maybe i've gotta achieve 88 mph first to get this thing to work? lol my chromebook "overclocked" 810 mghz.... maxx.... frequency says it can go to 2100... i think if i even try that i'd recreate the "hydrogen bomb"

Categories

Resources