This guide will fix the issue of the wifi MAC address changing on every reboot that multiple people were having. I've tested this on T-Mobile, although it should work on the h850 as well. I've seen multiple people posting about this issue and I had the issue as well, do I decided to figure out how to fix it and wanted to share.
Step 1) Use root browser and go-to /data/misc/wifi/ folder.
Step 2) If you have a folder called config, delete it (it needs to be a file not a folder)
Step 3) Using a root browser go-to root of your sdcard (internal storage) and create a file called config (no extension), or use file I attached.
Step 4) Open the new file and put the following:
Code:
cur_etheraddr=5c:00:00:00:00:00
This will be your MAC address, change it to what you want your MAC address to be and save the file. If you downloaded attached file, put in root of your sdcard, open it and edit MAC address to what you want and save it without any file extension, I had to put as .Txt to upload it, just make sure to change to no file extension or it won't work.
Step 5) Open a terminal emulator (install one if you don't have one already) and run the following command:
Code:
su -c "cat /sdcard/config > /data/misc/wifi/config"
(and no you can't just copy the file to that location, it won't write)
Step 6) Reboot
This will give you a set MAC address even after reboot. Again fully tested on T-Mobile h830, but should work on h850 as well.
Nice guide, thank you
Once I figured out that the " at the end wasn't purely decorative (roughly 6 reboots later :laugh: ) I got it to work :highfive:
Now the MAC remains the same, but that stupid phone still refuses to use the IP my router is set to assign to it (192.168.1.199), it insists on using 192.168.1.100 unless I set a static IP in the phone's advanced wifi/router settings. I never had that problem with my S4 so I'm stumped ... I don't suppose you (or someone else) has any ideas how to fix that
Nimueh said:
Nice guide, thank you
Once I figured out that the " at the end wasn't purely decorative (roughly 6 reboots later :laugh: ) I got it to work :highfive:
Now the MAC remains the same, but that stupid phone still refuses to use the IP my router is set to assign to it (192.168.1.199), it insists on using 192.168.1.100 unless I set a static IP in the phone's advanced wifi/router settings. I never had that problem with my S4 so I'm stumped ... I don't suppose you (or someone else) has any ideas how to fix that
Click to expand...
Click to collapse
Happy it worked for you. Maybe I should put copy and paste exactly But as far as the other issue not sure, it should use whatever you set it to from router. Maybe later today I'll get a chance to do some testing and see if I can figure it out.
jeffsga88 said:
Happy it worked for you. Maybe I should put copy and paste exactly But as far as the other issue not sure, it should use whatever you set it to from router. Maybe later today I'll get a chance to do some testing and see if I can figure it out.
Click to expand...
Click to collapse
All my other devices (tablet, PC, my S4 when I still had it) play nice and use the IPs assigned by my router ... the G5 is the only one that refuses unless I set a static IP in the wifi settings. It's been like that from the start (I've had it since May) and it always wants to use that silly .100 IP ... no clue why
For now I've given up and opened the ports I need on the .100 IP ... without the MAC constantly changing that works at least. But yea, if you find a solution I wouldn't mind trying it
Thanks again for the MAC fix :good:
for all the people who have the MAC changing issue.. have you wiped your misc partition at some point?
these symptoms sound like what happens after misc is wiped.. and why wiping misc should only be wiped as a last resort.
tho if you are also running into this without ever wiping misc.. very interesting...
autoprime said:
for all the people who have the MAC changing issue.. have you wiped your misc partition at some point?
these symptoms sound like what happens after misc is wiped.. and why wiping misc should only be wiped as a last resort.
tho if you are also running into this without ever wiping misc.. very interesting...
Click to expand...
Click to collapse
It happens after formatting data partition on TWRP to remove encryption. Also when I clean flash Roms I always wipe everything as well as format data partition, so probably why as I'm sure that wipes misc partition (although I would think it wouldn't). I just did a clean install of RR wiping and then formatting data in TWRP and have changing MAC address again (have to re run steps above to fix). So why I'm thinking it has to do with formatting.
autoprime said:
for all the people who have the MAC changing issue.. have you wiped your misc partition at some point?
these symptoms sound like what happens after misc is wiped.. and why wiping misc should only be wiped as a last resort.
tho if you are also running into this without ever wiping misc.. very interesting...
Click to expand...
Click to collapse
If Misc gets wiped when installing custom roms then yes. My MAC has changed ... idk, I'm pretty sure from day 1 which means I tend to agree with @jeffsga88 that it happens when you format data after flashing TWRP
jeffsga88 said:
It happens after formatting data partition on TWRP to remove encryption. Also when I clean flash Roms I always wipe everything as well as format data partition, so probably why as I'm sure that wipes misc partition (although I would think it wouldn't). I just did a clean install of RR wiping and then formatting data in TWRP and have changing MAC address again (have to re run steps above to fix). So why I'm thinking it has to do with formatting.
Click to expand...
Click to collapse
Nimueh said:
If Misc gets wiped when installing custom roms then yes. My MAC has changed ... idk, I'm pretty sure from day 1 which means I tend to agree with @jeffsga88 that it happens when you format data after flashing TWRP
Click to expand...
Click to collapse
misc would only get wiped if you manually did it. a lot of people zero the misc after flashing the H830 custom TOT w/TWRP.
shouldn't get wiped from installing a rom or anything.
if you never did that, misc should be fine and I guess it's formatting /data as mentioned above.
autoprime said:
misc would only get wiped if you manually did it. a lot of people zero the misc after flashing the H830 custom TOT w/TWRP.
shouldn't get wiped from installing a rom or anything.
if you never did that, misc should be fine and I guess it's formatting /data as mentioned above.
Click to expand...
Click to collapse
I can't remember if I wiped misc or not, so I can't confirm or deny that I did or didn't, but it is entirely possible. At any rate, the solution fixed it for me. I was able to find my actual MAC address and set it in the config file. Now my router assigns the IP I want it to and the MAC doesn't change after reboot. Thanks for the instructions jeffsga88!!!
dbs179 said:
I can't remember if I wiped misc or not, so I can't confirm or deny that I did or didn't, but it is entirely possible. At any rate, the solution fixed it for me. I was able to find my actual MAC address and set it in the config file. Now my router assigns the IP I want it to and the MAC doesn't change after reboot. Thanks for the instructions jeffsga88!!!
Click to expand...
Click to collapse
It appears to be from formatting data to remove encryption. After doing this to fix it and then going in TWRP and formatting (not wiping) data I had same issue and had to redo fix. So just remember, if you format data in TWRP after doing this fix, you will need to redo the fix again. Just wiping and installing new ROM, the fix will stick.
@autoprime
Would the following command wipe the misc partition (I believe it does):
Code:
dd if=/dev/zero of=/dev/block/platform/624000.ufshc/by-name/misc
If so then that would explain things. This was one of the commands that we had to use if we got TWRP boot loop after flashing 10d rooted tot. That would explain why it started happening after rooting phone using 10D rooted tot. But then after using my fix and going into TWRP and formatting data (not wiping), why is it wiping misc again?
dbs179 said:
... I was able to find my actual MAC address and set it in the config file. Now my router assigns the IP I want it to and the MAC doesn't change after reboot. ...
Click to expand...
Click to collapse
How did you find your actual MAC address? I simply used the one that was shown at the time
jeffsga88 said:
@autoprime
Would the following command wipe the misc partition (I believe it does):
Code:
dd if=/dev/zero of=/dev/block/platform/624000.ufshc/by-name/misc
If so then that would explain things. This was one of the commands that we had to use if we got TWRP boot loop after flashing 10d rooted tot. That would explain why it started happening after rooting phone using 10D rooted tot. But then after using my fix and going into TWRP and formatting data (not wiping), why is it wiping misc again?
Click to expand...
Click to collapse
yes, that command you listed wipes the misc partition. It should be avoided when possible.. instead.. only wiping the things to stop getting stuck in TWRP etc. Many suggest the quick and easy "wipe the entire thing" method... but you can now see some of the results from doing that. Since the G2 and G3 days I've been suggesting otherwise - https://forum.xda-developers.com/lg-g3/development/fix-stuck-custom-recovery-trying-ota-t2907508
Command to safely get out of stuck TWRP would need to be updated for the G5:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
that would help some people stuck in TWRP (wont help those stuck in download mode.. they should just successfully flash a TOT/KDZ to stop phone from booting into download mode). And it may not work in every instance but should work in many.
As for "why is it wiping misc again?"...
it's not. you placed a file in /data/ to fix the issue.. then you are wiping /data/. why would the fix stay?
if you want a perm fix, fix misc and don't bother with your temp fix in /data/. Or perhaps update you're OP and include both (if my fix works.. but I believe it should) just so people have options.
Here's a 10-step MAC Fix (assuming you aren't using the "temp" fix in /data/)
1. backup/dump your misc partition:
dd if=/dev/block/bootdevice/by-name/misc of=/sdcard/misc-dump.img
or if in TWRP with encrypted /data use: dd if=/dev/block/bootdevice/by-name/misc of=/tmp/misc-dump.img to dump to the /tmp/ directory.
2. pull misc-dump.img from phone onto computer.
adb pull /sdcard/misc-dump.img
or adb pull /tmp/misc-dump.img
etc...
3. On computer, open up misc-dump.img in a hex editor. HxD is a decent free hex editor for Windows. Or use whatever.. hex editor is hex editor ( I use 010 Editor).
4. After opening the misc-dump.img in the hex editor you'll see the file in raw hex. Scroll down to offset 6000 for the Wifi MAC.
As seen in the picture below, the Wifi MAC is @ 6000h and is currently DE:AD:BE:EF:FE:ED, you will edit that section with your original MAC address instead (or current mac address you want to stick).
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
5. Now scroll down to offset 8000 for the Wifi MAC.
As seen in the picture below, the BT MAC is @ 8000h and is currently DE:AD:BE:EF:CA:FE, you will edit that section with your original MAC address instead (or current mac address you want to stick).
6. Save the edits made to the misc-dump.img. To be proper, select "Safe As.." instead of save and name the new file: misc-fixed.img
7. Push the fixed misc partition to your phone:
adb push /sdcard/misc-fixed.img
or... adb push /tmp/misc-fixed.img
8. Flash the misc-fixed.img on your phone to your misc partition:
dd if=/sdcard/misc-fixed.img of=/dev/block/bootdevice/by-name/misc
or.. dd if=/tmp/misc-fixed.img of=/dev/block/bootdevice/by-name/misc
9. Reboot phone, or boot into Android if in TWRP. Wifi/BT MAC should now be fixed.
10. Save misc partitions just in case. Ideally you want an untouched misc partition before messing with anything on your phone.. sort of like backing up your EFS first. But worst case.. you can use the steps above to fix Wifi/BT MAC address issues.
autoprime said:
yes, that command you listed wipes the misc partition. It should be avoided when possible.. instead.. only wiping the things to stop getting stuck in TWRP etc. Many suggest the quick and easy "wipe the entire thing" method... but you can now see some of the results from doing that. Since the G2 and G3 days I've been suggesting otherwise - https://forum.xda-developers.com/lg-g3/development/fix-stuck-custom-recovery-trying-ota-t2907508
Command to safely get out of stuck TWRP would need to be updated for the G5:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
that would help some people stuck in TWRP (wont help those stuck in download mode.. they should just successfully flash a TOT/KDZ to stop phone from booting into download mode). And it may not work in every instance but should work in many.
As for "why is it wiping misc again?"...
it's not. you placed a file in /data/ to fix the issue.. then you are wiping /data/. why would the fix stay?
if you want a perm fix, fix misc and don't bother with your temp fix in /data/. Or perhaps update you're OP and include both (if my fix works.. but I believe it should) just so people have options.
Here's a 10-step MAC Fix (assuming you aren't using the "temp" fix in /data/)
1. backup/dump your misc partition:
dd if=/dev/block/bootdevice/by-name/misc of=/sdcard/misc-dump.img
or if in TWRP with encrypted /data use: dd if=/dev/block/bootdevice/by-name/misc of=/tmp/misc-dump.img to dump to the /tmp/ directory.
2. pull misc-dump.img from phone onto computer.
adb pull /sdcard/misc-dump.img
or adb pull /tmp/misc-dump.img
etc...
3. On computer, open up misc-dump.img in a hex editor. HxD is a decent free hex editor for Windows. Or use whatever.. hex editor is hex editor ( I use 010 Editor).
4. After opening the misc-dump.img in the hex editor you'll see the file in raw hex. Scroll down to offset 6000 for the Wifi MAC.
As seen in the picture below, the Wifi MAC is @ 6000h and is currently DE:AD:BE:EF:FE:ED, you will edit that section with your original MAC address instead (or current mac address you want to stick).
5. Now scroll down to offset 8000 for the Wifi MAC.
As seen in the picture below, the BT MAC is @ 8000h and is currently DE:AD:BE:EF:CA:FE, you will edit that section with your original MAC address instead (or current mac address you want to stick).
6. Save the edits made to the misc-dump.img. To be proper, select "Safe As.." instead of save and name the new file: misc-fixed.img
7. Push the fixed misc partition to your phone:
adb push /sdcard/misc-fixed.img
or... adb push /tmp/misc-fixed.img
8. Flash the misc-fixed.img on your phone to your misc partition:
dd if=/sdcard/misc-fixed.img of=/dev/block/bootdevice/by-name/misc
or.. dd if=/tmp/misc-fixed.img of=/dev/block/bootdevice/by-name/misc
9. Reboot phone, or boot into Android if in TWRP. Wifi/BT MAC should now be fixed.
10. Save misc partitions just in case. Ideally you want an untouched misc partition before messing with anything on your phone.. sort of like backing up your EFS first. But worst case.. you can use the steps above to fix Wifi/BT MAC address issues.
Click to expand...
Click to collapse
Okay so that fix doesn't work for me, maybe due to already having a wiped misc partition? When opening the misc partition I pulled, both the 6000 and 8000 offset are blank, my guess from wiping it back when I rooted to get out of twrp boot loop. I tried adding the MAC address to both of those locations and I still have a changing MAC every boot (unless I use my temp fix). Not sure if there's a way to restore the misc partition or maybe get a copy from another device (although not sure that's a good idea or not, or does kdz restore misc partition?). Or could it possibly be at a different address? Also, yeah I forgot my fix was a temp fix to the data partition lol.
Nimueh said:
How did you find your actual MAC address? I simply used the one that was shown at the time
Click to expand...
Click to collapse
If you happen to have router logs from before this became an issue or if you had already previously set up MAC address filtering on your router for your G5, you would have the actual MAC address, otherwise don't think you'll find it without maybe taking apart the phone (that's if it's even printed on the board). Either way it shouldn't matter much as long as it's sticking between reboots.
jeffsga88 said:
If you happen to have router logs from before this became an issue or if you had already previously set up MAC address filtering on your router for your G5, you would have the actual MAC address, otherwise don't think you'll find it without maybe taking apart the phone (that's if it's even printed on the board). Either way it shouldn't matter much as long as it's sticking between reboots.
Click to expand...
Click to collapse
Yea, I don't have router logs or old filters going back to last May, so I'm sol :laugh:
I just figured there was some cool "press 14 buttons on the phone"-way to get the correct MAC or something ... I'll just stick with the one I have now
Oh and I flashed the RR Nougat rom yesterday ... now the phone insists on using the .104 IP and no longer the .100 it was so fond of on MM. I still can't get it do use the one the router wants to assign, guess I'll give up on that. No idea what LG did to this phone, neither the MAC addy nor the IP issue was one I ever had before on Samsung
Your MAC fix works on M and N btw, so thanks again :good:
Nimueh said:
Yea, I don't have router logs or old filters going back to last May, so I'm sol :laugh:
I just figured there was some cool "press 14 buttons on the phone"-way to get the correct MAC or something ... I'll just stick with the one I have now
Oh and I flashed the RR Nougat rom yesterday ... now the phone insists on using the .104 IP and no longer the .100 it was so fond of on MM. I still can't get it do use the one the router wants to assign, guess I'll give up on that. No idea what LG did to this phone, neither the MAC addy nor the IP issue was one I ever had before on Samsung
Your MAC fix works on M and N btw, so thanks again :good:
Click to expand...
Click to collapse
Yeah it appears that anyone on t mobile that got stuck in TWRP boot loop when trying to get root and then followed the steps in the 10D rooted tot section for getting out of boot loop ended up with this issue. One of the commands was wiping the whole misc partition, which wiped the MAC address and created the issue. Like autoprime said earlier, to get out of TWRP boot loop, shouldn't wipe whole misc partition. Maybe when wiping misc it also messed up something with proper IP addressing. Oh well, what's done is done, but at least we have a temp fix.
jeffsga88 said:
Yeah it appears that anyone on t mobile that got stuck in TWRP boot loop when trying to get root and then followed the steps in the 10D rooted tot section for getting out of boot loop ended up with this issue. One of the commands was wiping the whole misc partition, which wiped the MAC address and created the issue. Like autoprime said earlier, to get out of TWRP boot loop, shouldn't wipe whole misc partition. Maybe when wiping misc it also messed up something with proper IP addressing. Oh well, what's done is done, but at least we have a temp fix.
Click to expand...
Click to collapse
I'm neither on T-Mobile (I have the unlocked EU version) nor did I ever get stuck in TWRP or wipe the misc partition. In my case it must have happened when I formatted Data after rooting + flashing TWRP.
The temp fix is great indeed ... if you remember to re-do it after flashing a new rom :laugh:
Can we "paste" a command into Terminal Emulator? If so I'll probably put that whole command into a .txt file for easy copy/pasting in the future :angel:
Nimueh said:
I'm neither on T-Mobile (I have the unlocked EU version) nor did I ever get stuck in TWRP or wipe the misc partition. In my case it must have happened when I formatted Data after rooting + flashing TWRP.
The temp fix is great indeed ... if you remember to re-do it after flashing a new rom :laugh:
Can we "paste" a command into Terminal Emulator? If so I'll probably put that whole command into a .txt file for easy copy/pasting in the future :angel:
Click to expand...
Click to collapse
I thought some people with h850 had same issue but wasn't sure, good to know fix works for both the h850 and h830 models. Thought it was only happening after wiping misc partition but guess not then. As far as flashing new roms it should stick as long as you don't reformat data partition, although I personally always format data partition as well for a completely clean flash (I know it's not necessary, I'm just ocd lol). Also you could paste the commands into terminal emulator or use a program like 3c toolbox and use the script editor and make it into a script, then just run the script after first flash (just make sure you save script file to ext SD). And 3c toolbox has terminal emulator which allows you to paste the command into it as well.
jeffsga88 said:
I thought some people with h850 had same issue but wasn't sure, good to know fix works for both the h850 and h830 models. Thought it was only happening after wiping misc partition but guess not then. As far as flashing new roms it should stick as long as you don't reformat data partition, although I personally always format data partition as well for a completely clean flash (I know it's not necessary, I'm just ocd lol). Also you could paste the commands into terminal emulator or use a program like 3c toolbox and use the script editor and make it into a script, then just run the script after first flash (just make sure you save script file to ext SD). And 3c toolbox has terminal emulator which allows you to paste the command into it as well.
Click to expand...
Click to collapse
Yea I did a clean flash (coming from a Marshmallow to a Nougat rom) and when I checked my phone had picked a completely different MAC again.
I'll look into 3C and copy/pasting ... the next time I do any clean flashes. Thanks for the tip
jeffsga88 said:
Okay so that fix doesn't work for me, maybe due to already having a wiped misc partition? When opening the misc partition I pulled, both the 6000 and 8000 offset are blank, my guess from wiping it back when I rooted to get out of twrp boot loop. I tried adding the MAC address to both of those locations and I still have a changing MAC every boot (unless I use my temp fix). Not sure if there's a way to restore the misc partition or maybe get a copy from another device (although not sure that's a good idea or not, or does kdz restore misc partition?). Or could it possibly be at a different address?
Click to expand...
Click to collapse
hmm interesting. On previous LG devices this fix worked... I had just assumed it still would on G5.
Yes those offsets were blank due to wiping misc partition after using TOT to install TWRP/root (using recowvery to install twrp is now the superior method).
I might test out wiping my misc and trying to restore the MACs when I get some time to do that. Not sure why it isnt working.. unless there is more in the misc now besides those 2 addresses. And yes, those addresses should be correct.. I had checked a previously backed up H830 misc partition before posting to be sure. But I'll have to pull my current misc just to double check.
Nimueh said:
I'm neither on T-Mobile (I have the unlocked EU version) nor did I ever get stuck in TWRP or wipe the misc partition. In my case it must have happened when I formatted Data after rooting + flashing TWRP.
Click to expand...
Click to collapse
This is interesting... MAC issues without wiping the misc partition is new to me. Could you dump your misc partition and check the offsets to see if your Wifi and BT MAC are in your misc still?
Perhaps there is something tied to formatting /data as well.. like you both have mentioned doing.
I'll try looking into that as well.
Related
I've been flashing N7 with no issues as recently as over the weekend. Today I tried to flash a new ROM and it failed. Tried a second, different ROM, same result. Do not know what I did. Any thoughts?
Error log would help greatly.
How do I get/generate the log? Haven't had to do it before.
Thanks,
Paul
The logs= errors displayed on the screen provided by the interface you use to flash the rom (recovery, computer...)
Does this help any?
TWRP V2.4.4.0
Updating partition details
E: Unable to open zip file
Error flashing zop
Updating partition details...
do I need to create a partition? Never get more details despite the tease.
Thanks,
First -
Try and download a different (NEWER) TWRP. Re-flash TWRP. Try again
or
Have you tried completely wiping the device? And pushing a ROM from ADB or using a USB OTG and Memory stick?
I had issues with my nexus becoming VERY unstable. Leading to issues.
I completely, and I mean completely, wiped. To the point that all that device basically had was a recovery, and a bootloader.
I proceeded to flash again, BOOM all fixed up.
Is there a new TWRP?
I did a factory restore after wiping everything thing, if that is what you mean?
It was working as expected last week, don't know what I did to screw it up
Boot recovery try the operation, choose advanced then copy log to sdcard. The paste the log results.
sent via electromagnetic radiation.
ibsk8 said:
Boot recovery try the operation, choose advanced then copy log to sdcard. The paste the log results.
sent via electromagnetic radiation.
Click to expand...
Click to collapse
Did this, and it said it copied but I am unable to locate it. It says 0\media\data But that folder structure doesn't exist, at least according to file expert
Will a complete wipe/restore create a partition?
pmgreen said:
Will a complete wipe/restore create a partition?
Click to expand...
Click to collapse
None of the instructions currently found in this forum alters the partitioning of the N7. Not fastboot & not the custom recovery, either.
You are chasing a red herring I think. That message you see is about the recovery performing a scan to check to see if there is a change in file systems (or partitioning of external devices) ... which might have occurred in preceding (custom recovery) operations, but didn't in this particular case.
pmgreen said:
Does this help any?
TWRP V2.4.4.0
Updating partition details
E: Unable to open zip file
Error flashing zop
Updating partition details...
Click to expand...
Click to collapse
Focus your efforts here; it certainly looks like a first-order problem.
bftb0 said:
None of the instructions currently found in this forum alters the partitioning of the N7. Not fastboot & not the custom recovery, either.
You are chasing a red herring I think. That message you see is about the recovery performing a scan to check to see if there is a change in file systems (or partitioning of external devices) ... which might have occurred in preceding (custom recovery) operations, but didn't in this particular case.
Focus your efforts here; it certainly looks like a first-order problem.
Click to expand...
Click to collapse
Think reinstalling TWRP would help? It was working fine so I'm a bit stumped what changed and why
pmgreen said:
Think reinstalling TWRP would help? It was working fine so I'm a bit stumped what changed and why
Click to expand...
Click to collapse
You can also soft-boot a recovery without actually flashing it, e.g.
Code:
fastboot boot custom-recovery.img
I suppose you could then poke around and see if it is having troubles mounting any of the normal partitions (/data, /system, or /cache). Look in the kernel boot log of the recovery (cat /proc/kmsg or "dmesg") to see if anything looks strange, etc.
There have been a couple of reports from folks who developed problems that looked like eMMC flash media errors - loss of partitions, failure to mount /data, et cetera. At the moment though, your symptoms are very generic and non-specific, as in "it doesn't boot".
I suppose you saw no errors at all reported on the screen during that stock-install-via-fastboot procedure?
bftb0 said:
You can also soft-boot a recovery without actually flashing it, e.g.
Code:
fastboot boot custom-recovery.img
I suppose you could then poke around and see if it is having troubles mounting any of the normal partitions (/data, /system, or /cache). Look in the kernel boot log of the recovery (cat /proc/kmsg or "dmesg") to see if anything looks strange, etc.
There have been a couple of reports from folks who developed problems that looked like eMMC flash media errors - loss of partitions, failure to mount /data, et cetera. At the moment though, your symptoms are very generic and non-specific, as in "it doesn't boot".
I suppose you saw no errors at all reported on the screen during that stock-install-via-fastboot procedure?
Click to expand...
Click to collapse
The only error is that it can't open the zip. I've tried downgraded TWRP, then upgrading back. Tried flashing the existing rom.
Nothing has worked. The N7 is functional, just will not allow me to flash
pmgreen said:
The only error is that it can't open the zip. I've tried downgraded TWRP, then upgrading back. Tried flashing the existing rom.
Nothing has worked. The N7 is functional, just will not allow me to flash
Click to expand...
Click to collapse
Well, if the source material can't be opened, then there is nothing to be flashed.
So maybe it is better to call this a "can't open files" problem instead of a "can't flash" problem.
Are there any special characters in the file name ... or spaces? If so, try renaming the file so the name only contains [a-z], [A-Z], [0-9] plus dash, underscore, and dot.
The other thing that can happen is if you drop a file in /data/media/0 as the root user, it will show up under /sdcard, but can't be read by non-privileged users via the /sdcard/ path. I'm not sure what the exact details are here - much less why this would effect the recovery (as you would expect everything to be running as root there) - but you can detect this problem by using a terminal emulator, and looking for differences in ownership or file permission:
Code:
$ su
# cd /data/media/0
# ls -ld *
use chown and chmod as appropriate to fix files as needed
bftb0 said:
Well, if the source material can't be opened, then there is nothing to be flashed.
So maybe it is better to call this a "can't open files" problem instead of a "can't flash" problem.
Are there any special characters in the file name ... or spaces? If so, try renaming the file so the name only contains [a-z], [A-Z], [0-9] plus dash, underscore, and dot.
The other thing that can happen is if you drop a file in /data/media/0 as the root user, it will show up under /sdcard, but can't be read by non-privileged users via the /sdcard/ path. I'm not sure what the exact details are here - much less why this would effect the recovery (as you would expect everything to be running as root there) - but you can detect this problem by using a terminal emulator, and looking for differences in ownership or file permission:
Code:
$ such
# cd /data/media/0
# ls -ld *
use chown and chmod as appropriate to fix files as needed
Click to expand...
Click to collapse
Thanks bftb, you are correct it's a can't open zip. No error than fail and it can't open the zip. It says updating partition but nothing changes
The file names are from the developers, once of which I recently successfully flashed. Tried coping the log to the SD card, but unable to find /data/media/0. Do I need to recreate a partition?
(FYI there was an auto-correct typo in my prior post - "su" not "such". Derp)
pmgreen said:
Do I need to recreate a partition?
Click to expand...
Click to collapse
No. (There is no way to do that with the tools we have anyway)
Unless what you mean by "recreate" is rebuild/reinitialize a filesystem in a partition - that's a possibility.
You need to try and figure out why you can't read files.
As a workaround, you can put files on a USB key (FAT formatted, not NTFS) and using TWRP access them by putting the USB key on the other end of a OTG cable.
Your posts are a bit vague - I can't even tell if you have tried other ROM files, whether you checked them to see if they are the correct size/checksum, etc.
pmgreen said:
Tried coping the log to the SD card, but ...
Click to expand...
Click to collapse
At this point, your best approach is still to follow the initial advice of 'ibsk8'. Look in the log file for any further details about errors that occurred.
The logs are typically in /cache/recovery/ or (while the custom recovery is running) in /tmp
Use "adb pull" to get the log file to your PC and have a look at it. If you can't find anything obvious in there, then cut-n-paste the file to http://pastebin.com and provide the link to us.
bftb0 said:
At this point, your best approach is still to follow the initial advice of 'ibsk8'. Look in the log file for any further details about errors that occurred.
The logs are typically in /cache/recovery/ or (while the custom recovery is running) in /tmp
Use "adb pull" to get the log file to your PC and have a look at it. If you can't find anything obvious in there, then cut-n-paste the file to http://pastebin.com and provide the link to us.
Click to expand...
Click to collapse
I am not familiar using ADB pull. Tried using a root file manager to access the log but don't see.
Greatly appreciate your help, let me know what other info I should paste.
Thanks,
Ok, I'm officially in trouble. I have a SM-G900F rooted with towelroot, SuperSu and BusyBox installed. I tried flashing with Mobile Odin Pro the latest NG2 firmware to keep root and not trip Knox. It failed twice (or three times), both times I was able to restore the original firmware with desktop Odin (http://forum.xda-developers.com/galaxy-s5/help/mobile-odin-pro-4-20-issues-t2834671).
Then something strange happened: I noticed that on 4G I had only data but no signal bars (http://forum.xda-developers.com/galaxy-s5/help/help-4g-data-signal-bars-t2837031). Then I had problems connecting to Wifi and a message appeared telling me I am in "Factory Mode" and some things are limited.
It was clear that my EFS partition is corrupted. I installed Root Explorer and there is nothing in my EFS folder (still I can use the phone in 2G/3G/4G for data and 2G/3G for calls but no Wifi).
I have 2 backups for EFS: one is made using Samsung Tools (http://forum.xda-developers.com/galaxy-s3/development/efs-samsung-tool-universal-support-t2602325) and it's an efs.img file, the other is made using some EFS backup tool and it's just a copy of exactly what was in EFS folder (a few folders and files). I tried using Samsung Tools to restore the backup but no luck. When I restart the phone, EFS folder is still empty.
I rebooted in recovery mode and it said "failed to mount /efs". That's probably why Samsung Tools can't do it's job but I'm not sure. At this moment I'm not sure of anything. I think that someone with some knowledge (knowledge that unfortunately I'm missing) can help me fix this.
I really need for some help, so any ideas are welcomed.
Thank's,
Mihai Raducan
..
fffft said:
No TWRP backup, huh? How did I know that was going to be the case? 10 demerits. Okay, you seem to have been on the right track in recognizing that your EFS partition was unmounted and therefore inaccessible in recovery mode.. but you didn't mount it? You didn't give us much detail to work with, but assuming that you have a custom recovery like TWRP, you could go to the advanced /mount menu and check the mount EFS partition. Or if you don't have that option for some reason, mount it yourself e.g.
.
Click to expand...
Click to collapse
It's only stock recovery, no TWRP or CWM.
I didn't mount the EFS partition before because I didn't know how. I'll follow your guide and report back.
Regarding the exact copy of EFS (efs.img): It's done with Samsung Tools but never had a chance to test it, so... I don't know. But let's take it one at a time. First problem: mount efs partition.
PS: My Windows laptop is playing tricks on me so it's going to take a while to reinstall Windows, adb, etc. But I'll be back.
Thank's.
..
Ok, I installed Adb, phone is recognized.
The first line of code
Code:
# ls -al /dev/block/platform/msm_sdcc.1/by-name
gave me a list with the location of efs (and more). EFS is at dev/block/mmcblk0p12.
The second line of code
Code:
# /sbin/mount /dev/block/mmcblk0p12 /efs
gives me : tmp-mksh: /sbin/mount: not found
Am I missing something?
is img of /efs partition enough for restore?
here, it says, that we need to have 3 partitions for full restore..??..: http://forum.xda-developers.com/showthread.php?t=2737448
dd if=/dev/block/mmcblk0p12 of=/mnt/sdcard/efs.img.ext4
dd if=/dev/block/mmcblk0p13 of=/mnt/sdcard/modemst1.bin
dd if=/dev/block/mmcblk0p14 of=/mnt/sdcard/modemst2.bin
but Samsung tool only makes efs.img..??.. who is right who is wrong?
..
fffft said:
Personally, if an EFS backup program made an image (.img} file and it was the same size as your EFS partition I'm sure that it was an exact copy and try writing it back. It's unlikely to make anything worse. But don't blame me if it somehow goes wrong. I'm just describing an option of last resort and commenting on what I would do with my own phone.
You can check the size of your EFS partition with the cat command (EFS should be partition 12)
Code:
$ su
# cat /proc/partitions
.
Click to expand...
Click to collapse
I checked the size of my efs.img and the size of the partition with the command you gave me. They are both 14MB but on a closer look, adb shows 14336 and Windows reports 14680kb. So I don't know....
fffft said:
You're using ADB instead of a terminal emulator app which is a new variable. There are a lot of ADB variants around and I have no idea what your command interpreter (mksh) or you have done with the shell environment.. which may require syntax adjustments.
Not found implies that the /system partition isn't mounted. But it could also be an ADB syntax quirk, path or symlink error, a typo or.. well, could be a lot of things. Perhaps try the syntax below. Or run the command from a terminal emulator instead of ADB shell.
Code:
$ su
# adb shell mount /system
# adb shell mount /efs
.
Click to expand...
Click to collapse
I installed Android Terminal Emulator and Shell Terminal Emulator (PlayStore) but I got the same thing. What's strange is that in both of them when I run the command "adb devices" they both give me nothing while in adb shell on desktop I get a number (as it should).
I understand that the syntax is for a specific terminal emulator. Tell me please what is that terminal emulator (that you know syntax is correct) so I can try with that one.
..
fffft said:
Try this terminal emulator app.
If you have continued difficulties, you should describe step by step what you are doing. In exhaustive detail or as close as you can get to that. Then someone in the forum will have a good basis to see where you are going astray. Or alternately where I made a typo or whatever the impediment turns out to be.
.
Click to expand...
Click to collapse
This is one the apps I tried with.
I'm describing step by step what I do. What I start with: SM-G900F rooted with towelroot, stock recovery, SuperSU and BusyBox installed, Knox 0x0.
I download and install https://play.google.com/store/apps/details?id=jackpal.androidterm.
Using this app:
Code:
su
and it changes to [email protected]:/#
I enter:
Code:
# ls -al /dev/block/platform/msm_sdcc.1/by-name
and it gives me a list with paths to different things. EFS apears to be at /dev/block/mmcblk0p12
I enter
Code:
# /sbin/mount /dev/block/mmcblk0p12 /efs
and it says: "tmp-mksh: /sbin/mount: not found"
When I try
Code:
adb devices
it gives me no number.
I attached a file where you can see what I did.
One more thing: when I enter (stock) recovery, every time it says "Installing system update" for about 20 seconds and then enters recovery where it says "failed to mount/efs : invalid argument". The CSC part is apparently ok.
..
It doesn't work. From ADB it says "mkdir failed for /efs, File already exists".
And from terminal emulator, (with busybox) it asks for an argument (pic atached).
Is there any way of using Odin to fix this, because it seems that nothing works.
fffft said:
Who is right about what? You didn't give much of a context for your question. The OP said that his EFS was corrupt, so we have been talking about EFS which is self contained in partition 12 or exported as efs.img.
Click to expand...
Click to collapse
i thought there could be more to the problem, not just /efs partition, since he said it was clear to him, and not beeing 100% fact..
..
Thank's for your time. I'm flashing now the original firmware (so I can start fresh) and I'll document every step I take. I'll report back.
Ok, I tried flashing the original firmware (ANE2) and this time I can't even get pass the Samsung authentication screen (the first time you boot your phone and asks for language, Google account, etc), It asks me for the Samsung account and password that this phone was registered with) and it tries for a couple of minutes to verify the credentials (on data network) then it fails saying it is a network error.
I tried wipe cache/factory reset (from recovery) and reinstall a different firmware. Same thing. It seems now it's really messed up.
As mentioned earlier, we did not expect a firmware image to fix your EFS. And the EFS is critical to normal phone operation.
The purpose of stock firmware is so that your phone is stable, reduce variables that might interfere and facilitate fixing your EFS. So I'm not why you apparently expected it to be an outright fix in and of itself?
Having installed the stock firmware should help you achieve your remaining goals. Now you need to decide if you are going to install a custom recovery or not. A custom recovery will increment your Knox flag if it isn't already. That affects very little, but it's your decision. It may affect the private mode feature or warranty claims, however many carriers don't care about Knox and E.U. legislation bars Samsung from invalidating a warranty unless they can demonstrate that root damaged your phone.
Whether or not you install a custom recovery, you will want to try writing your 14 MB EFS backup image to your phone. I believe that you'd find it easier to do so with a custom recovery. But it can be done with a stock one too, you will just have to deal with a bit more syntax in the latter case.
.
fffft said:
As mentioned earlier, we did not expect a firmware image to fix your EFS. And the EFS is critical to normal phone operation.
The purpose of stock firmware is so that your phone is stable, reduce variables that might interfere and facilitate fixing your EFS. So I'm not why you apparently expected it to be an outright fix in and of itself?
Having installed the stock firmware should help you achieve your remaining goals. Now you need to decide if you are going to install a custom recovery or not. A custom recovery will increment your Knox flag if it isn't already. That affects very little, but it's your decision. It may affect the private mode feature or warranty claims, however many carriers don't care about Knox and E.U. legislation bars Samsung from invalidating a warranty unless they can demonstrate that root damaged your phone.
Whether or not you install a custom recovery, you will want to try writing your 14 MB EFS backup image to your phone. I believe that you'd find it easier to do so with a custom recovery. But it can be done with a stock one too, you will just have to deal with a bit more syntax in the latter case.
.
Click to expand...
Click to collapse
I didn't expect to fix the problem, I wanted a fresh start so I can try again the adb/terminal emulator commands. But what I didn't expect was not being able to, basically, start the phone. When you first start a new phone (or after a factory reset) it asks you language, Wifi, Google account and, in my case, for a Samsung account that this phone was paired with.
If I try to connect to a Wifi network the phone reboots itself. If not, it tries via data connection. Google credentials are ok but when it tries to verify Samsung credentials it gets stuck saying that it's a network problem and it doesn't go futher. So I get stuck at this point, between booting and actually being able to use the phone. I can't install anything, I can't receive or make phone calls (like before). I can't go to USB debugging so ADB doesn't see the phone.
I don't want to install a custom recovery because my Knox is 0x0 and my warranty is intact. I live in EU but in this case, it's clear that root access is what got me in trouble and brought the phone in this state. Actually not root access got me in trouble, but what I did with root access
raducanmihai said:
I didn't expect to fix the problem, I wanted a fresh start so I can try again the adb/terminal emulator commands. But what I didn't expect was not being able to, basically, start the phone. When you first start a new phone (or after a factory reset) it asks you language, Wifi, Google account and, in my case, for a Samsung account that this phone was paired with.
If I try to connect to a Wifi network the phone reboots itself. If not, it tries via data connection. Google credentials are ok but when it tries to verify Samsung credentials it gets stuck saying that it's a network problem and it doesn't go futher. So I get stuck at this point, between booting and actually being able to use the phone. I can't install anything, I can't receive or make phone calls (like before). I can't go to USB debugging so ADB doesn't see the phone.
I don't want to install a custom recovery because my Knox is 0x0 and my warranty is intact. I live in EU but in this case, it's clear that root access is what got me in trouble and brought the phone in this state. Actually not root access got me in trouble, but what I did with root access
Click to expand...
Click to collapse
The only way to get your phone to work again and gain access to networks/wifi is by installing a new motherboard if you can`t restore the old EFS folder somehow.
Next time try this method to backup and restore your EFS folder http://forum.xda-developers.com/showthread.php?t=2737448 if you are rooted.
raducanmihai said:
I didn't expect to fix the problem, I wanted a fresh start
Click to expand...
Click to collapse
Sorry that you found it a surprise.. but if reinstalling the stock firmware eliminated your phones problems, that would make it a solution, whereas it's a stepping stone. I did try to explain this earlier, where I told you that installing the firmware would not fix your EFS. And the EFS is essential to normal phone operation.
Regardless of the surprise, you are now on a better footing to finish fixing your phone. But for clarity, your problem started when your EFS got corrupted somehow. And your EFS needs to be restored before the problem will be resolved.
On the positive side, you appear to have a EFS backup, even if the backup app won't easily restore it to you phone. If you stick with it.. you just have some minor hurdles remaining - syntax or whatever - in getting your 14 MB EFS backup restored (written) to your EFS partition.
If you want that done painlessly, then pack a case of beer and your phone into a box and ship it to me. And I'll return it fixed. As it seems unlikely that you'd do that though.. then try to provide as much info as you can here and someone will try to help you finish fixing your phone in this thread.
.
EDIT: If you are coming here for the first time, this guide should still work, but @PorygonZRocks has created a flashable zip that should deal with a lot of these issues automatically. You can check out his post here:
https://forum.xda-developers.com/showpost.php?p=75787067&postcount=699
This method will indirectly allow you to root the LG Gpad v410 after it has been upgraded to Lollipop 5.1.1. Yes. Rooting LG v410 Lollipop. It's through a downgrade, but it works.
It took a while to get working, but here's how I did it. The process is straightforward, but the details matter greatly. You will brick your device if you mess up. Please read everything *first* before you do anything. Be sure you understand the process. I'll try to explain what's going on along the way.
An external SD card is extremely helpful for this process. You *could* adb push everything, but that will tedious.
First, you need some files.
The 4.4.2 KDZ which is a TEST OS, but it can be rooted and it downgrades to a Bump'able bootlaoder:
http://forum.xda-developers.com/g-pad-10/general/kdz-lg-g-pad-7-0-v410-t3224867
The LG 2014 Flash Tool:
http://www.mediafire.com/download/fwrcd3pdj0svjtb/LG_Flash_Tool_2014.zip
Android LG Drivers:
https://www.androidfilehost.com/?fid=24052804347802528
Parted for Android. You can probably find it other places, but I found this file:https://dl.dropboxusercontent.com/u/84115590/LG%20G2%2016GB%20Solution/sdparted-recovery-all-files.zip
EDIT: There seems to be a lot of confusion here. My bad. All you need is the file named "parted" from this zip file - nothing else. Just put that one file in the root of your external SD card.
https://dl.dropboxusercontent.com/u/84115590/LG G2 16GB Solution/sdparted-recovery-all-files.zip linked from here: http://www.**********.com/your-32gb-lg-g2-shows-only-16gb-storage-space-heres-the-fix/
EDIT2: The dropbox link is down. I've attached the file directly.
The Candy5 ROM (This will potentially save you some manual steps. Somewhat optional, but highly recommended):
http://forum.xda-developers.com/g-pad-10/development/rom-candy5-g-pad-v410-lollipop-5-1-1-v2-t3111987
Flashify APK:
http://www.apkmirror.com/apk/christian-gollner/flashify/flashify-1-9-1-android-apk-download/
TWRP for the v410:
http://forum.xda-developers.com/g-pad-10/development/recovery-twrp2-8-5-0lgv400-410-t3049568
LG One Click Root:
http://forum.xda-developers.com/lg-g3/general/guide-root-lg-firmwares-kitkat-lollipop-t3056951
(You may use Purple Drake or whatever else you want. They all use the same root script as this does and the GUI is helpful for novices.)
Android SDK (specifically adb.exe. After installing go to SDK Manager and ensure that Android SDK Platform Tools is checked):
http://developer.android.com/sdk/index.html
For clarification below, when I have commands in "quotes" they are Windows commands. When they are in `backticks` they are commands that you run inside of ADB which actually run on your device....as root. Root can screw things up. Please be extra cautious. If you blame me for messing up your device I will laugh at you. But that's not gonna happen, right? Good. Let's go.
Now that you have everything, put it all into a folder where you can access it easily.
Install the LG Drivers.
Install Android SDK (or otherwise get adb.exe).
Extract all of the archives.
Move the KDZ to the LG Flash Tool 2014 folder.
Put the tablet into Download Mode by powering it off, holding VolUp, and plugging in the USB cable. Press VolUP when instructed. You must be in Download mode before continuing.
Run LGFlashTool2014.exe. Select the KDZ file. Click "CSE Flash". Click "Start". Select "English" and click OK. Do not change anything else.
WAIT for the flash to continue. If you really want to brick your device, here's a good opportunity.
The device will reboot into Android 4.4.2. You will only have 4GB of internal storage at this point. DON'T PANIC! We are fixing it.
Enable USB debugging.
Connect the device.
Install and run LG One Click Root. Wait for the device to be rooted before proceeding.
Copy the Flashify apk, TWRP image, and Candy5 ROM to your external SD card.
Install Flashify and flash TWRP to the recovery partition.
Use the Flashify menu to reboot in to recovery.
DON'T PANIC! You will get white vertical lines on the boot screen from now on. They only show up during boot animations. A small price to pay. This may be fixed at a later date. for the time being! Thanks to marcsoup's first post ever, we have a fix! Details below. PLEASE click this link and thank him!
Things get tricky here. Copy parted to your external SD card and then run "adb shell" from Windows to get a shell in TWRP.
In TWRP, unmount /data by tapping Mount > uncheck Data.
`cp /sdcard/parted /sbin/` This copies the parted binary to /sbin so it can be executed in the path. I had trouble running `/sdcard/parted`, but YMMV.
`chmod +x /sbin/parted` Make it executable.
`parted /dev/block/mmcblk0` Run parted against the internal mmc
`p` Prints the partition table.
`rm 34` Deletes partition 34 labeled "grow". This is the root of our problem. The KDZ apparently only creates a 4GB partition, I assume so the test build has maximum compatibility with all sized devices.
`rm 33` Deletes partition 33 "userdata"
`p` Print to verify
`mkpartfs` Create a partition and put a filesystem on it. If we only expand the partition it won't help us because the filesystem is still only 4 GB.
a) name: userdata
b) type: ext2 (the tool only supports ext2. This is ok for now.)
c) start: 3439MB (the end of part 32. IT MAY BE DIFFERENT FOR YOU!) Be sure you do not omit the MB part otherwise the offset will overwrite another critical partition.
d) end: 15.8GB (where "grow" ended above. IT MAY BE DIFFERENT FOR YOU!) Be sure you do not omit the GB part otherwise the offset will overwrite another critical partition.
`p` Verify. For me it did not name the partition properly. Gotta fix that.
(if necessary) `name 33 userdata` This is critical for mount to find it in /dev/block/platform/msm.sdcc.1/by-name/ on some/all ROMS.
`p`. Verify one last time. Compare it to my partition table in the attachments. If you want to brick, delete some random partitions here.
Flash Candy5 with TWRP. It's only 239 MB, so it will flash quickly. I do this because Candy5 will reformat mmcblk0p33 from ext2 to ext4 for you. It does this as part of it's system boot, apparently. If you install a different ROM that does not do this, you can reformat it by running `make_ext4fs /dev/block/mmcblk0p33`. If your ROM does not have make_ext4, it likely has some differnt method to make an EXT4 filesystem. `/system/bin/mke2fs -t ext4 /dev/block/mmcblk0p33` may work better. Just flash Candy5 and be done with it.
Tap Wipe > Swipe to Factory Reset.
Tap Reboot > System.
WAIT!!! It will take a minute for the ROM to start the first time. You will have white lines and and possibly a white screen. WAIT. It's moving the DEX files to cache, formatting a partition, creating default folders on the internal storage, and several other things. WAIT! When the screen goes dim or turns off then it's ready.
Cycle the display or turn it on. You should be at the Candy5 lock screen.
USB debugging is on by default. Run "adb shell".
`mount | grep userdata` Make sure mmcblk0p33 is mounted.
`df` Make sure /data is 11.3 GB (or whatever size it is on non-16GB devices).
HELL YEAH, you downgraded, rooted, and fixed the partition problem. Enjoy your tablet!
Thanks to dopekid313 for finding the KDZ.
Thanks to timmytim for Candy5.
Thanks to the creators of the root script, flashify, TWRP, and XDA for being so awesome.
Thanks to marcsoup for fixing a fix to the white lines.
Thanks to navin56 for the partition dumps. PLEASE thank his post!
White lines fix.
What we are going to do is flash the aboot partition with the stock image provided by navin56. I've removed the extra files from the dump, so simply download aboot.img.7z below. Unzip it using 7zip.
These commands are to be run in TWRP. Reboot to TWRP recovery and connect with "adb shell". All of the following commands will be run in ADB under TWRP. If you cannot figure out how to get here, please post in the thread and someone will help you. Onward:
If you do everything correctly then you don't have to reflash your ROM and you won't lose data. This process can be done any time after flashing the KDZ, even before you follow the steps above to resize the userdata partition. It's a completely separate process.
Unzip aboot.img.7z so you have the file named aboot.img. You should also make sure that aboot.img's MD5 sum is e97431a14d1cee3e9edba513be8e2b52. Do not flash the 7z file. Please.
Copy aboot.img to your external SD card. It should live at /sdcard/aboot.img
Boot to TWRP and run "adb shell"
`ls -al /dev/block/platform/msm_sdcc.1/by-name/` Let's make sure we are flashing the right partition. On my device "aboot" is /dev/block/mmcblk0p6. You should verify this on your device or you WILL brick your tablet.
`dd if=/dev/block/mmcblk0p6 of=/sdcard/aboot-fukt.img` Let's back up our current aboot partition before we go flashing things just in case there are unintended consequences later. Be sure you have the same partition that "aboot" referred to in the 4th step or you have just backed up the wrong partition.
`dd if=/sdcard/aboot.img of=/dev/block/mmcblk0p6` Be sure the file exists, is the correct aboot.img, and you are flashing the right partition. You have been warned!!
Reboot TWRP and enjoy your boot animations again.
If I missed anything, please let me know. As far as I know this is the very first tutorial that details what is necessary to accomplish this. Please hit the Thanks button on every thread that you visit to download files!
FAQ:
Q: Why do I only have 11.3 GB of space when my device is 16GB?
A: The entire internal SD card (eMMC) is 16 GB. Gotta have someplace to install the bootloader, recovery, android, the modem OS, the secondary bootloader, the cache, the resource and power manager, and all of the other partitions necessary for the table to operate. Please look at the second screenshot in the OP. All of those 33 partitions take up room on the internal card. Fortunately ALL of those partitions ONLY take up about 4.4 GB. Hence the 'userdata' partition is ~11.3 GB.
If anyone wants to use my work to create a flashable zip to make it easier for novices, please do so. My problem is solved and I don't have the time to create the zip. Please post any questions and I'll gladly answer them! I'm so stoked that we have a usable downgrade method now!
Thank You, Worked Great
Thanks for making this I was gonna do it but was to lazy lol and thanks for linking my thread and giving cred instead of just linking straight to the kdz thank you
grandamle91 said:
Thank You, Worked Great
Click to expand...
Click to collapse
Glad to be of help!
dopekid313 said:
Thanks for making this I was gonna do it but was to lazy lol and thanks for linking my thread and giving cred instead of just linking straight to the kdz thank you
Click to expand...
Click to collapse
Of course! If you hadn't obtained the firmware then we'd all still be looking for a solution. It pisses me off to no end when people try to take credit for other people's work. We all just need to realize and acknowledge that we are simply standing on the shoulders of those who did the work necessary for each of us to do our work.
I just noticed since we formatted the userdata it screws up TWRP. It won't mount Data and it says the settings are corrupted
grandamle91 said:
I just noticed since we formatted the userdata it screws up TWRP. It won't mount Data and it says the settings are corrupted
Click to expand...
Click to collapse
Is this after you've rebooted into Candy5 and the partition is reformatted as ext4 (or you've done so manually)? TWRP may not be able to mount an ext2 partition.
EDIT: I just tested this. Following my instructions and flashing to Candy5, TWRP sees mmcblk0p33 (userdata) as the full size and mounts it at /emmc.
For clarification, after you run the parted commands, it will mess with the partition table and TWRP will most likely not be able to see it to remount it - at least not until after a reboot. This is why you need an external SD card from which to install ROMs.
/data not mounted
Edit: nevermind. The partition 33 was still ext2. I had to run make_ext4fs /dev/block/mmcblk0p33 and now I am able to mount /data. Thanks.
Thanks for taking the time to help us.
I followed the steps and till 33 I am good. But once I am in Candy5, I am not able to adb shell (adb not recognizing device eventhough usb debugging is on). I rebooted to recovery and adb works there. But my /data partition is not enabled in TWRP. I am not able to check it either under Mount in TWRP.
Code:
mount | grep userdata
is empty
Code:
df
does not show data
I tried this and my tablet bootlooped. I was able to get into fastboot and restore. I would GREATLY appreciate it if someone who has the time, would kindly donate their valuable time to into making an exe zip or something.
gridironbear said:
I tried this and my tablet bootlooped. I was able to get into fastboot and restore. I would GREATLY appreciate it if someone who has the time, would kindly donate their valuable time to into making an exe zip or something.
Click to expand...
Click to collapse
At what point did it bootloop? What was the last step that you took before rebooting?
Zip
I would really appreciate a zip file as I have never been savvy with adb and for whatever reason it doesn't want to work on Windows 10.
drumm3rb0y said:
I would really appreciate a zip file as I have never been savvy with adb and for whatever reason it doesn't want to work on Windows 10.
Click to expand...
Click to collapse
A zip file for what part? The only part that requires ADB directly is to fix the internal storage. You absolutely have to flash the KDZ and then root before you can do anything. If you are on 5.x then you have no possible way to root, much less flash a zip file.
If you tell me what exactly you are having issues with I will try to help.
fatbas202 said:
A zip file for what part? The only part that requires ADB directly is to fix the internal storage. You absolutely have to flash the KDZ and then root before you can do anything. If you are on 5.x then you have no possible way to root, much less flash a zip file.
If you tell me what exactly you are having issues with I will try to help.
Click to expand...
Click to collapse
The adb part is the part im having issue with. Everything else is flashed already. I was wondering if you could make a zip for the adb part so I can just flash it through twrp.
thanks for the great help. it did work perfectly to regain the lost space.
what about white lines ? is there any solution for that problem ?
I have tried flashing back stock recovery extracted from kdz, dd' but didn't help.
Now i am thinking of flashing back the aboot.bin extracted from original kdz or i can dump ".img" from another working device. (i have 4 similar devices)
what is your opinion i m not a developer and i need your advise. should i go ahead and which partition should i dd ? aboot or abootb or boot ?
regards
shahidmianoor said:
thanks for the great help. it did work perfectly to regain the lost space.
what about white lines ? is there any solution for that problem ?
I have tried flashing back stock recovery extracted from kdz, dd' but didn't help.
Now i am thinking of flashing back the aboot.bin extracted from original kdz or i can dump ".img" from another working device. (i have 4 similar devices)
what is your opinion i m not a developer and i need your advise. should i go ahead and which partition should i dd ? aboot or abootb or boot ?
regards
Click to expand...
Click to collapse
I have no solid evidence of this, but I suspect that the white lines are caused by a display driver issue where when the bootloader hands over control of the display to the kernel it doesn't get reinitialized properly. I have no ideas as to how to get rid of that at the moment but if I stumble across something I'll be sure to post here.
While I'm not an Android developer, I've been a Linux admin for 10+ years and have a lot of experience with Android devices. I'd be really hesitant to go flashing things ad hoc. While Download Mode may save you if you flash the wrong thing, I'm not entirely sure what the limitations that you may run in to with a locked bootloader are.
After having this device for months on 5.x and FINALLY being able to downgrade and run custom ROMs with root, not seeing a boot animation is a pittance to pay. But I'll keep looking.
i have same problem entered in TWRP but when ADB sheel thorough DP tools it didn't connect to my device. i m also using windows 10
Do I need to Re-mount Data ? I press format data button at TWRP and mount data. It looks work great.
After all process, it shows 16Gb total at storage, 11.04GB available. it works perfectly.
I need the stock V41010d, so I reflash the stock rom rooted at [ROM][STOCK](V410 ONLY)KOT49I.V4101d | 4.4.2 | Rooted + Busybox
Now, my Gpad is at stock V41010d, but I have a question about the boot screen, is it still with white lines and white screen? Any method to fix it?
Hello,
Thanks for the great work. unfortunately I am facing some difficulty, starting from step# 16 "Things get tricky here", how to run"adb shell in TWRP?
also can I use minimal_adb_fastboot_v1.1.3_setup.exe as mentioned in the link in the OP http://www.droidviews.com/your-32gb-lg-g2-shows-only-16gb-storage-space-heres-the-fix/ ?
also I noticed the path have been used includes 'parted' folder, but the folder I have after unzipping the parted zip called 'sdparted-recovery-all-files', do I rename the folder to 'parted' instead?
please help and excuse my broken English.
I'm also having trouble with the adb shell step. When my device is powered on normally, adb commands work. However, in TWRP mode my computer can't recognize the tablet, mount properly, and copy over parted. All the steps have been identical to this point. Any ideas?
iphone5sf said:
Do I need to Re-mount Data ? I press format data button at TWRP and mount data. It looks work great.
After all process, it shows 16Gb total at storage, 11.04GB available. it works perfectly.
I need the stock V41010d, so I reflash the stock rom rooted at [ROM][STOCK](V410 ONLY)KOT49I.V4101d | 4.4.2 | Rooted + Busybox
Now, my Gpad is at stock V41010d, but I have a question about the boot screen, is it still with white lines and white screen? Any method to fix it?
Click to expand...
Click to collapse
You shouldn't need to remount or format data. The parted command nukes the filesystem and creates a new one formatted as ext2. At this point the running kernel has the old partition table loaded and won't know that the partition has been extended. Simply flash Candy5 and reboot at this point and it will reformat the userdata partition.
See above for the white lines during the boot animation. Known issue, no fix in sight, doesn't really matter.
nmnm4alll said:
Hello,
Thanks for the great work. unfortunately I am facing some difficulty, starting from step# 16 "Things get tricky here", how to run"adb shell in TWRP?
also can I use minimal_adb_fastboot_v1.1.3_setup.exe as mentioned in the link in the OP http://www.droidviews.com/your-32gb-lg-g2-shows-only-16gb-storage-space-heres-the-fix/ ?
also I noticed the path have been used includes 'parted' folder, but the folder I have after unzipping the parted zip called 'sdparted-recovery-all-files', do I rename the folder to 'parted' instead?
please help and excuse my broken English.
Click to expand...
Click to collapse
You only need the sdparted-recover-all-files.zip from that site. "parted" is not a folder, but the binary (without a file extension) inside of that zip file. Copy that file to /sbin and you are in business.
zmali1 said:
i have same problem entered in TWRP but when ADB sheel thorough DP tools it didn't connect to my device. i m also using windows 10
Click to expand...
Click to collapse
summonholmes said:
I'm also having trouble with the adb shell step. When my device is powered on normally, adb commands work. However, in TWRP mode my computer can't recognize the tablet, mount properly, and copy over parted. All the steps have been identical to this point. Any ideas?
Click to expand...
Click to collapse
I'd recommend installing the SDK and pulling the drivers from that. Alternatively, you can try the drivers here: https://github.com/koush/UniversalAdbDriver.
Technically, when I ran the "parted" commands I was actually booted in to rooted 4.4.2 from the KDZ; I wasn't actually in TWRP. It's just not a very recommended way of going about it. I explained how to run all of this from TWRP, but there's no technical reason that you *can't* run this from Android. You just *shouldn't* because you can't cleanly unmount the filesystem and it theoretically could cause filesystem corruption. I just figured that I don't care about that partition getting corrupted since it's getting wiped out.
Hey,
After attempting to flash a new LineageOS version using the updater my phone wouldn't get out of recovery mode.
In order to fix it I accidentally cleared the entire misc partition instead of only a part of it.
After doing a complete factory reset using LGUP I got it to boot again. Unfortunately WiFi doesn't work anymore (the *.kdz file doesn't contain a misc.img either)
Could someone with an H870 phone upload an image of that partition please
The steps are as follows:
Code:
ls /dev/block/platform/soc/*/by-name/misc
which is /dev/block/platform/soc/624000.ufshc/by-name/misc in my case
and then
Code:
dd if=/dev/block/platform/soc/624000.ufshc/by-name/misc of=/sdcard/misc.img
Finally upload the misc.img file somewhere and post a link here.
Thanks
Did you manage to do find the misc partition? I think I did exactly what you did.
Doesn't misc partition contain IMEI number and such?
you SHOULD'T use a misc partition from other devices. That contains data that is specific to your device - CID (Carrier or Region ID), USB configuration, hardware settings etc
Check your IMEI. Does he appears correctly?
foobar1234 said:
Hey,
After attempting to flash a new LineageOS version using the updater my phone wouldn't get out of recovery mode.
In order to fix it I accidentally cleared the entire misc partition instead of only a part of it.
After doing a complete factory reset using LGUP I got it to boot again. Unfortunately WiFi doesn't work anymore (the *.kdz file doesn't contain a misc.img either)
Could someone with an H870 phone upload an image of that partition please
The steps are as follows:
which is /dev/block/platform/soc/624000.ufshc/by-name/misc in my case
and then
Finally upload the misc.img file somewhere and post a link here.
Thanks
Click to expand...
Click to collapse
Wiping that partition wipes your IMEI and Mac info, no Mac info means no WiFi.
Huh, I had completely forgotten about this thread and didn't get any notifications until I was quoted.
In any case I managed to solve it somehow. I don't remember what I did exactly but I think it was something like this:
I noticed that bluetooth had an all zero mac address as well unless I disabled and reenabled it. In this case it would generate a random one. Rebooting would set it to all zero again of course, but I think I just copied the misc partition from the running kernel to a pc and then back to the phone. That seemed to work.
After that I tried changing a few bytes near the BT Mac with a hex editor until the wifi address changed (I think it was less than 20bytes away). I don't remember what happened to the IMEI but I'm still using the phone and seem to have a valid one now.
Maybe this will help someone but of course take everything with a grain of salt.
Don't ask me how, but I somehow set pattern and forgot it in one hour. I use face rec. as well but after reboot I need to unlock with pattern.
For last 10h I tried all methods how to unlock phone, but no success.
I'm using original, ROM, my G6 model is H870, running Pie, unlocked bootloader, so I can use TWRP. I spent most of my time and knowledge to unlock phone with adb/twrp. Best option I found is to delete gesture.key file which is located under /data/system.
Problem is, that /data is encrypted ...
Is there anyone who managed to remove pattern/lock without loosing data?
Thank you for your time!
akulp said:
Don't ask me how, but I somehow set pattern and forgot it in one hour. I use face rec. as well but after reboot I need to unlock with pattern.
For last 10h I tried all methods how to unlock phone, but no success.
I'm using original, ROM, my G6 model is H870, running Pie, unlocked bootloader, so I can use TWRP. I spent most of my time and knowledge to unlock phone with adb/twrp. Best option I found is to delete gesture.key file which is located under /data/system.
Problem is, that /data is encrypted ...
Is there anyone who managed to remove pattern/lock without loosing data?
Thank you for your time!
Click to expand...
Click to collapse
Maybe this will work: https://************/delete-android-security-pin/
Edit: link gets truncated... Just search 'Remove pin twrp' on Google and click the first result.
krilok said:
Maybe this will work: https://************/delete-android-security-pin/
Edit: link gets truncated... Just search 'Remove pin twrp' on Google and click the first result.
Click to expand...
Click to collapse
Non of this solutions work.
This is pretty the same as I said. My problem is that /data is encrypted and I can't find/see any .key files.
Also I can't do "su" command inside adb shell because of "insuff. privileges" ...
I tried all this solutions:
https://forum.xda-developers.com/showthread.php?p=49666433#post49666433
For method 1 -5 there is a problem with .key files which are not seen to my TWRP/Aroma browser. I don't know If I'm doing anything wrong in method 7, but also after mount I can't access /data/system (/data is empty).
In method 6 I'm stucked on
"Run pull settings.db.cmd inside By-pass security Hacks folder to pull out the setting file out of your phone." step.
I get "insuff. privileges" error.
akulp said:
Non of this solutions work.
This is pretty the same as I said. My problem is that /data is encrypted and I can't find/see any .key files.
Also I can't do "su" command inside adb shell because of "insuff. privileges" ...
I tried all this solutions:
https://forum.xda-developers.com/showthread.php?p=49666433#post49666433
For method 1 -5 there is a problem with .key files which are not seen to my TWRP/Aroma browser. I don't know If I'm doing anything wrong in method 7, but also after mount I can't access /data/system (/data is empty).
In method 6 I'm stucked on
"Run pull settings.db.cmd inside By-pass security Hacks folder to pull out the setting file out of your phone." step.
I get "insuff. privileges" error.
Click to expand...
Click to collapse
Have you tried this?
https://forum.xda-developers.com/android/software-hacking/remove-lockscreen-recovery-t3530008
Basically, the files you have to delete in the /data/system folder in TWRP are:
password.key
pattern.key
locksettings.db
locksettings.db-shm
locksettings.db-wal
It happened to me a while ago and I didn't have any '.key' files either; I just deleted the rest and when I booted up, I had no lock screen security PIN nor registered fingerprints but could re-set them again through security settings. I didn't need to flash any files nor fiddle around with adb commands, and all my data remained untouched...
If you can't find all those five files or the '.key' files, just delete the ones you can find and it should work. Otherwise, you'll probably have to do a full reset and reinstall...
krilok said:
Have you tried this?
https://forum.xda-developers.com/android/software-hacking/remove-lockscreen-recovery-t3530008
Basically, the files you have to delete in the /data/system folder in TWRP are:
password.key
pattern.key
locksettings.db
locksettings.db-shm
locksettings.db-wal
It happened to me a while ago and I didn't have any '.key' files either; I just deleted the rest and when I booted up, I had no lock screen security PIN nor registered fingerprints but could re-set them again through security settings. I didn't need to flash any files nor fiddle around with adb commands, and all my data remained untouched...
If you can't find all those five files or the '.key' files, just delete the ones you can find and it should work. Otherwise, you'll probably have to do a full reset and reinstall...
Click to expand...
Click to collapse
Problem is, that I don't have any files/folders at all in my /data. I even don't see system folder inside data.
akulp said:
Problem is, that I don't have any files/folders at all in my /data. I even don't see system folder inside data.
Click to expand...
Click to collapse
Sounds like your data folder is not mounted when you boot to TWRP... Have you checked? Reboot to TWRP, select the Mount option; data should be ticked by default. It it isn't, select it, go back to TWRP file manager, and see if you can now browse folders and files...
krilok said:
Sounds like your data folder is not mounted when you boot to TWRP... Have you checked? Reboot to TWRP, select the Mount option; data should be ticked by default. It it isn't, select it, go back to TWRP file manager, and see if you can now browse folders and files...
Click to expand...
Click to collapse
Unfortunately it's checked ... It's seems from this post:
https://forum.xda-developers.com/android/software-hacking/remove-lockscreen-recovery-t3530008/page12
nobody managed to get to (encrypted) /data on Pie.
akulp said:
Unfortunately it's checked ... It's seems from this post:
https://forum.xda-developers.com/android/software-hacking/remove-lockscreen-recovery-t3530008/page12
nobody managed to get to (encrypted) /data on Pie.
Click to expand...
Click to collapse
Last comment on that thread says the solution also works on Havoc Os 2.9, which is based on Pie... Maybe that person wasn't encrypted to begin with, but, if it doesn't work for you, I guess then the only way to go is a full reset... Good luck!
krilok said:
Last comment on that thread says the solution also works on Havoc Os 2.9, which is based on Pie... Maybe that person wasn't encrypted to begin with, but, if it doesn't work for you, I guess then the only way to go is a full reset... Good luck!
Click to expand...
Click to collapse
Yep, I saw that post ... I relly don't have any more ideas. Should be inside "mount modul" in TWRP /data listed?
I only have System, Cache and SD ... and i can check System only if i check bottom "mount system partition read-only" option.
But that's nothing to do with /data.
akulp said:
Yep, I saw that post ... I relly don't have any more ideas. Should be inside "mount modul" in TWRP /data listed?
I only have System, Cache and SD ... and i can check System only if i check bottom "mount system partition read-only" option.
But that's nothing to do with /data.
Click to expand...
Click to collapse
Data option should show. At least it does on mine... You can maybe try updating Twrp version?
I'm on last TWRP.... Meantime I already made full reset ....
If you have encrypted data partition, you're pretty much banned from messing with it, unless you manage to exploit your way through the adb, which requires you to have it enabled and in trust relation with your PC to begin with.
The way I'd go around this is to place an "always yes su" binary and perform pattern removal process through init.d or similar solution. In case if su commands are restricted, kernel with permissive SELinux needs to be flashed.
On a side note, isn't this Q&A?
I also had a problem with data folder not being mounted when booting to TWRP. I tried a full reset and immediately i have access to the Data folder (but theres nothing left inside so this is kinda useless). Then later when i did a reboot into the TWRP it happened again, couldnt access to anything even when the "mount Data" option is ticked, only until i did the full reset again that it could finally work.
It turned out the problem is with the TWRP itself, i flashed another custom recovery (OrangeFox-R10-Stable-h870, which is btw a better recovery than TWRP in my opinion) and the problem never occurred again.
So either try out that new Recovery or a different version of TWRP and see if it solves the problem. And always, ALWAYS, make a full backup of all your data before messing with anything (i had to learn that the hard way so trust me).
Do this,
- you should know that I am using "orange fox recovery" not "twrp",and stock "pie"
- reboot to recovery and go to system/data
- delete this files:
gatekeeper.password.key
gatekeeper.pattern.key
locksettings.db
-reboot the phone and that's it.