Flashing Now Fails - Nexus 7 Q&A, Help & Troubleshooting

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,

Related

Flash recovery image Droid Eris How To

First of all thanks to Amon_RA for this. I had no part in creating this. I am just providing a how to flash it. There may be an eaiser way but this is what worked for me.
First let me say I am on a Mac. If you are on windows the adb commands should work fine but I can't say how to get adb working for you.
1. download flash_image Here Link updated 3/17/10
2. Open the terminal and copy and paste the following commands.
adb shell [hit enter]
su [hit enter]
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system [hit enter]
3. In a new terminal window (don't close the original one).
adb push flash_image /system/bin [hit enter]
exit [hit enter]
4. Now in the original terminal window
chmod 755 /system/bin/flash_image [hit enter]
5. Now exit all termainl windows and reboot your phone.
6. Download Amon_AR's recovery Here.
7. Mount your phones sd card and drop recovery-RA-eris-v1.6.2.img on to it and eject your phone.
8. Open the Terminal and copy and paste the following commands with the phone connected to your computer.
8. adb shell [hit enter]
9. su [hit enter]
10. flash_image recovery /sdcard/recovery-RA-eris-v1.6.2.img
11. To get into recovery turn off you phone and hold the Volume Up + Power until it boots into recovery.
That's it.
I made an automator script the help all of you having problems getting adb working. Make sure you have the android sdk downloaded and named android-sdk Put it in your home folder and then run this script. Let me know how it works for you.
Disclaimer: I am not responsible for any damage you may do to your phone. I am only providing instructions on what worked for me. This is very beta. Good luck. Enjoy the nandroid goodness.
First link is Dead...........
ooopps Srry my bad, Its up.
You should mention that the chmod command is in the original terminal window. Also, you could do it in one window if you put:
adb remount
adb push bla /bla/bla
at the begining of everything.
adb push flash_image to /system/bin
Click to expand...
Click to collapse
I don't think there's a "to" in that command either. lol
testing567 said:
You should mention that the chmod command is in the original terminal window. Also, you could do it in one window if you put:
adb remount
adb push bla /bla/bla
at the begining of everything.
I don't think there's a "to" in that command either. lol
Click to expand...
Click to collapse
Thanks. I don't think the "to" is going to work either. I made the corrections.
Just a quick question. What does this boot too. Im new to all this phone stuff. I did the upgrade to 2.1 leaked so just been searching the forum here each day to see if a solution has come about. i just noticed v.1.6.2 in there so was curious as to what this will do.
Will this put the regular android on it or keep it the same, sorry just kinda getting started with android
coupla questions -
For northmendo:
Is the reboot in the middle of this even necessary? ( flash_image won't work right if /system is still mounted rw ?)
For testing567:
Do all the adb shell commands run as root against the 2.1_root install ... or maybe the above could be simplified even more by just running "adb root" first?
For Austinjs0102 (not a question)
This process only applies (at the moment) to phones with "2.1_root" - there isn't a path at present to go from "2.1_leak" to a rooted phone. Assuming that a way to roll back (or get root) for "2.1_leak" eventually is found, then the answer to your question is this: it is a process to apply a custom recovery partition to the phone that include tools that will allow you to perform complete phone backups and restore operations. This can be critical for devs who are experimenting with writing boot or system partitions to their phones - if something goes wrong with their experiments, they can "boot" their phone into recovery mode and restore back to a working configuration. To reiterate, though: this only applies to phones that are already rooted.
bftb0
Thanks a bunch that helps clear up info.
hopefully the hard working dev's here find a 2.1 leaked fix for us early people, if not then i may need to lose the phone lol.
Austinjs0102 said:
Just a quick question. What does this boot too. Im new to all this phone stuff. I did the upgrade to 2.1 leaked so just been searching the forum here each day to see if a solution has come about. i just noticed v.1.6.2 in there so was curious as to what this will do.
Click to expand...
Click to collapse
I am in same boat as you...
Let me start off by saying that I'm not a phone dev. I've done software development for many years, but never messed with the phone.
Can someone explain why we can't just load the 1.5 rooted PB001IMG.ZIP file over our 2.1 leaked handset? Is it a matter of the version number being lower? If so, since the 1.5 is rooted, couldn't someone just up the version number to whatever the 2.1 leak is plus one? Then, once it's loaded, write a little app to drop the number back where it should be?
TIA for the education.
Doc
DocTauri said:
Let me start off by saying that I'm not a phone dev. I've done software development for many years, but never messed with the phone.
Can someone explain why we can't just load the 1.5 rooted PB001IMG.ZIP file over our 2.1 leaked handset? Is it a matter of the version number being lower? If so, since the 1.5 is rooted, couldn't someone just up the version number to whatever the 2.1 leak is plus one? Then, once it's loaded, write a little app to drop the number back where it should be?
TIA for the education.
Doc
Click to expand...
Click to collapse
(I suppose I shouldn't respond, 'cuz DocTauri is jacking northmendo's thread. Sorry north!)
Doc,
I understand exactly what you are getting at... and also think I can explain why it's not easy.
First - what has been discovered so far was not a "root break-in", but rather an engineering ROM with root "built in". It is cryptographically signed so that a production phone will recognize the .zip file as a valid ROM. That first validation step has nothing to do with version numbers.
If the "SPL" on an unrooted phone was doing something as simple as looking at a couple of bytes in the initial file downloaded to the phone, then yes - doing what you suggest would work... just patch a few bytes using a hex editor. Unfortunately, the phone SPL is quite sophisiticated: it verifies the crypto signature on the entire zip file first, unpacks that zip, and then examines the contents of an individual file within the zip archive (and possibly even unpacks one of the YAFFS image files and then looks in a file within the YAFFS image) to read version numbers.
That means that the fundamental issue is the cryptographic signature on the .zip file. If you do anything which breaks step #1, step #2 (version # checks) are never reached. Certainly an individual file could be byte-patched, and then images and zip files could be re-assembled... but you would have no way to sign the zip with HTC's private key. Or you could even attempt to byte-patch the zip file - but then that would break the crypto signature. Either way, the crypto signature on the zip file is no longer valid.
If you have HTC's private RSA key, let us know!
bftb0
bftb0 said:
coupla questions -
For northmendo:
Is the reboot in the middle of this even necessary? ( flash_image won't work right if /system is still mounted rw ?)
Click to expand...
Click to collapse
I added the reboot because. All I would get is out of memory errors. The reboot fixed that.
e.g.
mtd: read error at 0x001e0000 (Out of memory)
mtd: read error at 0x00200000 (Out of memory)
mtd: read error at 0x00220000 (Out of memory)
mtd: read error at 0x00240000 (Out of memory)
northmendo -
That first link (that you corrected) now points to the recovery image, not "flash_image".
Note that the "flash_image" executable which Amon_RA originally included with his first recovery (.zip) is identical to the /system/bin/flash_image binary which ships on the Eris with 1.5 (1.17.605.1); the md5sum signature (of both of those files) is:
16559f2c27d08ff1ddfcaca05fbf10fb flash_image
That's also the same md5 signature as the "flash_image" file which was posted to dl.dropbox.
I don't have 2.1_root installed on my phone, but if the same binary is already on the phone after installing the 2.1_root ROM, there's no need to include those steps in your instructions. It is also possible that even if the "2.1_root" version of /system/bin/flash_image is different, it would also work.
Note that the only reason I bring it up is that your instructions might be (a) unnecessary, and (b) are encouraging folks to overwrite a binary that is already on the phone. No harm (but unneeded) if it is the same, and unknown harm if it is different.
Also (while I'm at it)
901167f6b5541b488c8e0404bceb0631 recovery-RA-eris-v1.6.2.img ***
It appears to me ( reading between the lines here ) that Amon_RA is trying to improve his v1.6.2 recovery - folks might want to keep an eye on that thread.
An alternative and quicker method than all of this is what zifnab06 suggested here. It's only two lines long, after all.
bftb0
[Edit]***Wow, my post was obsolete the moment I posted it - don't know how I missed Amon_RA's announcement post. Note that there appears to be several versions of "v1.6.2" floating around now - make sure to check his post if you want the most recent.
bftb0 said:
It appears to me ( reading between the lines here ) that Amon_RA is trying to improve his v1.6.2 recovery - folks might want to keep an eye on that thread.
An alternative and quicker method than all of this is what zifnab06 suggested here. It's only two lines long, after all.
bftb0
Click to expand...
Click to collapse
I will keep the link updated to the newest version here. Also I tried the quicker method without success. I will try it again when I get home from work.
Thanks
bftb0 said:
(I suppose I shouldn't respond, 'cuz DocTauri is jacking northmendo's thread. Sorry north!)
Click to expand...
Click to collapse
Sorry, didn't mean to. Understood on the explaination. I didn't realize it was a different rom image, I thought the key had been broken, allowing someone to resign a modified image.
Thanks!
Doc
I used this method and it was all really easy until I got to the end. It just says usage and then sits their and does nothing. I unplugged it and went into recovery and see the android dude and a yellow traiangle and exclamation point. Did I forget something? Is their an alternative way to flashing this?
sdk issues for flashing recovery...
Hey guys,
Im a noob but here's whats going on, Ive downloaded sdk extracted it to my c drive, ive downloaded all the required packages reccomended in the forum, Ive up dated my driver and still my machine doesnt recognize my phone...
Ive also extracted the recovery image to my tools directory and added the the path in enviromentals...
So at this point Im stuck as to how to get my pc (xp) phone and sdk in sync in order to get this recovery image working...So any advice would be highly appreciated. Thanks in advance.
Chris
Spencer_Moore said:
I used this method and it was all really easy until I got to the end. It just says usage and then sits their and does nothing. I unplugged it and went into recovery and see the android dude and a yellow traiangle and exclamation point. Did I forget something? Is their an alternative way to flashing this?
Click to expand...
Click to collapse
You could try this.
If you have your phone pluged in and type in to the terminal
adb reboot recovery [hit enter]
After you phone reboots it should come up with text options to do back-ups and restores. Do you get any of that?
Anyone know the key combo to get into recovery without adb?
having issues getting adb
got the command prompts working in xp, however while trying the methods here in the forum i am getting adb not foud errors. Any suggestions?

[Q] Some help with creating an Update.zip for my A7 please

I'd appreciate it if someone could give me some assistance. Basically the situation is that I wanted to get VPN working on the A7 which required tun.ko. I cross compiled the kernel and managed to get a tun.ko file and I added it to my device. Installing the module did not work, so I left it.
At some point my A7 shut off, and now it will not boot, it hangs at the ANDROID screen, before getting to the HC animation (dexmod 1.42). I am assuming at this point that my tun.ko is the issue so I created a patch update to remove the modules I had added to see if that would work.
Note: This patch is exactly the same as the ElocityMod 1.4.2 ad-hoc patch, I just changed the script actions and re-bundled.
The script only does this:
delete_recursive SYSTEM:lib/modules
delete SYSTEM:lib/tun.ko
I created the /system/lib/modules dir, so I know it exists, as does the /system/lib/tun.ko. When I try to run the update script I get the following error:
Installing Update
close from_child
E:Error in /sdcard/update.zip
(Status 6[1536])
Installation aborted.
I am trying not to flash back to the 1.4.2 as I have some investment and stupidly did not back-up before I started this venture. Any help would be appreciated.
Brad
As a side note, according to the /proc/config.gz on the tablet (kernel config) the TUN/TAP is compiled into the kernel, but not compiled as a module. For this reason I doubt VPN will work unless the apps can recognize the TUN device instead of failing because the module does not exist.
with specifics to an update script, the script desired should be as follows
Code:
run_program("/sbin/busybox", "mount", "-orw,remount","/system");
delete("/system/lib/tun.ko");
run_program("/sbin/busybox", "mount", "-oro,remount","/system");
you will need to remember to sign your update.zip after creation if you're not familiar with the process. searching on xda should turn up results for 'sign update.zip'.
i'd list the specific files and not do recursive deleting. though if introducing a kernel module caused you problems, i don't think it was merely copying/removing that had an effect, but wouldn't you have had to either issue an 'insmod' command manually or you added a call to that module using insmod added to the init.rc or a bash script. you need to remove that reference too if you did.
if your 'investment' is related to your /data folder (with your stored apps and app settings), you can use my cwm fakeflash recovery to backup and restore your /data contents (installed apps, and system settings) after a factory reset and reloading dexter's rom (using factory recovery).
alternative solutions; maybe if you were doing these kind of experiments you MIGHT have left the usb device setting on (for adb connectivity). if so, try to adb shell into the device to correct your problem by hand; type adb devices from a command prompt for fun to see if the device still lists (it did for me when softbricked once).
domito said:
I'd appreciate it if someone could give me some assistance. Basically the situation is that I wanted to get VPN working on the A7 which required tun.ko. I cross compiled the kernel and managed to get a tun.ko file and I added it to my device. Installing the module did not work, so I left it.
At some point my A7 shut off, and now it will not boot, it hangs at the ANDROID screen, before getting to the HC animation (dexmod 1.42). I am assuming at this point that my tun.ko is the issue so I created a patch update to remove the modules I had added to see if that would work.
Note: This patch is exactly the same as the ElocityMod 1.4.2 ad-hoc patch, I just changed the script actions and re-bundled.
The script only does this:
delete_recursive SYSTEM:lib/modules
delete SYSTEM:lib/tun.ko
I created the /system/lib/modules dir, so I know it exists, as does the /system/lib/tun.ko. When I try to run the update script I get the following error:
Installing Update
close from_child
E:Error in /sdcard/update.zip
(Status 6[1536])
Installation aborted.
I am trying not to flash back to the 1.4.2 as I have some investment and stupidly did not back-up before I started this venture. Any help would be appreciated.
Brad
As a side note, according to the /proc/config.gz on the tablet (kernel config) the TUN/TAP is compiled into the kernel, but not compiled as a module. For this reason I doubt VPN will work unless the apps can recognize the TUN device instead of failing because the module does not exist.
Click to expand...
Click to collapse
..alternatively alternatively i also did a update.zip of the latest factory rom that may assist with your issue, if the above solutions do not work. assuming your 'investment' isn't in the /system folder, it can format your /system folder and reinstall the /system files from the factory firmware with all correct permissions. a little examination of my update.zip could be used as a template for creating a similar one for dexter's rom, for these particular times when you'd like to re-do your /system folder and leave the rest of your partitions and data intact.
locatable, roundabout, from my twitter. same name as here.
oh. you could just write a script to execute a bash script (file.sh) thats got simple copy commands to copy your 'investment' to sdcard (/sdcard in recovery). that might be the simplest non creative approach that would allow you to continue on with a normal factory reset and reload of dexter's rom.
using bash scripts might also aid you in doing what you want without having to know or experiment with proper scripting syntax.
..oh, AND you could just edit dexter's rom update.zip to only install the system.img, and remove the rest of the files for installation, and DON"T do a factory reset..
that could help with restoring your system filesystem while leaving the rest of your data intact. didn't occur until this morning, that might be you EASIEST of the multiple suggestions listed.
Thanks for the response!
bestialbub said:
with specifics to an update script, the script desired should be as follows
Code:
run_program("/sbin/busybox", "mount", "-orw,remount","/system");
delete("/system/lib/tun.ko");
run_program("/sbin/busybox", "mount", "-oro,remount","/system");
Click to expand...
Click to collapse
This was actually what I did for my first try, with the same result.
bestialbub said:
you will need to remember to sign your update.zip after creation if you're not familiar with the process. searching on xda should turn up results for 'sign update.zip'.
Click to expand...
Click to collapse
I did not do this, I was not sure I had to.
bestialbub said:
i'd list the specific files and not do recursive deleting. though if introducing a kernel module caused you problems, i don't think it was merely copying/removing that had an effect, but wouldn't you have had to either issue an 'insmod' command manually or you added a call to that module using insmod added to the init.rc or a bash script. you need to remove that reference too if you did.
Click to expand...
Click to collapse
I did insmod it as well as modprobe, it gave me an error which was likely because (as I found later) the TUN is compiled into the kernel, which means a module could not possibly load.
bestialbub said:
if your 'investment' is related to your /data folder (with your stored apps and app settings), you can use my cwm fakeflash recovery to backup and restore your /data contents (installed apps, and system settings) after a factory reset and reloading dexter's rom (using factory recovery).
Click to expand...
Click to collapse
I'll have to take a look at that, I was no aware it existed.
bestialbub said:
alternative solutions; maybe if you were doing these kind of experiments you MIGHT have left the usb device setting on (for adb connectivity). if so, try to adb shell into the device to correct your problem by hand; type adb devices from a command prompt for fun to see if the device still lists (it did for me when softbricked once).
Click to expand...
Click to collapse
The issue with the A7 is that it's got USB host only which means I cannot connect it to my PC and adb it. This was a known issue before I bought the A7.
bestialbub said:
..alternatively alternatively i also did a update.zip of the latest factory rom that may assist with your issue, if the above solutions do not work. assuming your 'investment' isn't in the /system folder, it can format your /system folder and reinstall the /system files from the factory firmware with all correct permissions. a little examination of my update.zip could be used as a template for creating a similar one for dexter's rom, for these particular times when you'd like to re-do your /system folder and leave the rest of your partitions and data intact.
locatable, roundabout, from my twitter. same name as here.
oh. you could just write a script to execute a bash script (file.sh) thats got simple copy commands to copy your 'investment' to sdcard (/sdcard in recovery). that might be the simplest non creative approach that would allow you to continue on with a normal factory reset and reload of dexter's rom.
using bash scripts might also aid you in doing what you want without having to know or experiment with proper scripting syntax.
..oh, AND you could just edit dexter's rom update.zip to only install the system.img, and remove the rest of the files for installation, and DON"T do a factory reset..
that could help with restoring your system filesystem while leaving the rest of your data intact. didn't occur until this morning, that might be you EASIEST of the multiple suggestions listed.
Click to expand...
Click to collapse
In the end I went more heavy handed than all that and it worked out fine. I did this before I saw your response otherwise I would have tried to finesse it some more just for the fun of it.
I re-flashed with dexmod 1.41 but I did not reset or wipe anything first. Applying this over top got me booted again with all my apps. 1 quick 1.42 update (and annoying root FB upgrade) and I am back to pre-fail conditions. I backed up my stuff too.
Thanks again for all the useful tips. This type of event has happened a few times and my gut says I am getting some corruption on the NVRAM or something. Only time will tell.
adb connectivity works fine, the solution is buried in one of 5stronginos threads, maybe the cwm recovery one. google for USB_OTG.APK i think, its posted on xda w a download link.
..i also prepackage it in my firmware repack.. findable from my twitter.
Sent from my X10i using Tapatalk
bestialbub said:
adb connectivity works fine, the solution is buried in one of 5stronginos threads, maybe the cwm recovery one. google for USB_OTG.APK i think, its posted on xda w a download link.
..i also prepackage it in my firmware repack.. findable from my twitter.
Sent from my X10i using Tapatalk
Click to expand...
Click to collapse
I found this one, which looks right.
http://forum.xda-developers.com/showpost.php?p=12813894&postcount=36
I'll give it a shot. Thanks for the info.

[MOD][SCRIPT] Get More Storage by Relocating Dalvik Cache!

DISCLAIMER: YOU AGREE TO TAKE FULL RESPONSIBILITY FOR YOUR DEVICE IF YOU PROCEED.
The original thread (http://forum.xda-developers.com/moto-g/general/mod-save-data-space-cache-partition-t2942765) was getting to cluttered up with development and testing so I decided to start a new thread with the "finished" product. The original thread will be renamed to Q&A/Development. We might even ask for the old thread to be closed down. (up to @Bert98, the thread's creator.)
Moto G's internal eMMC card has a ~600Mb partition called /cache, which is not used since the apps' cache is stored in /data, so the latter fills up and the first one stays empty.
Owning a 8Gb model, having 600Mb not available for storage really bugged me, because my phone's memory (/data partition) was always full because it's a 5.7Gb space shared between apps and microSD files.
Now, it may not work for you if:
a) you have A LOT of apps installed.
And by "a lot", I mean more than 90-100 apps, but if you have a 8Gb model, you probably don't
b) you're running ART (this is default in lollipop and newer)
Since ART uses a lot more space than dalvik, the space in the /cache partition probably won't be enough. When I was running ART, it used 1Gb more than dalvik.
Original post by @Bert98
Click to expand...
Click to collapse
This was tested on my moto g 16GB which is running RetailUS_4.4.4 kitkat with CWM recovery. The custom ROM procedure was tested on the same phone but with cm11 Nightly installed.
Prerequisites:
1. You must have "adb root" functioning. If you don't head to this thread: http://forum.xda-developers.com/showthread.php?t=1687590 and there is a free download link at the bottom of the post.
Download and install the apk on your phone. Open up adbd insecure (the new app) and grant it superuser rights PERMANENTLY. Check the box that says "enable insecure binary" and make sure to check the box
that says "enable at boot."
2. You must have a recovery that can accept adb shell commands.
3. Root Access Duh?!
4. A windows machine capable of running batch files.
5. A decent text editor, notepad will work but notepad++ is strongly recommended. (Only needed if you are using STOCK ROM procedure)
Please, please make a nandroid backup before you continue!!!!
Stock ROM procedure:
Read the directions very carefully and then read them again, before continuing.
1. Download the cachemover_v1.3.zip from: LINK REMOVED DUE TO SCRIPT ISSUES.
2. Extract the contents.
3. Connect device to PC and navigate to the extracted folder.
4. Double click/Run the cachemover_Stock.bat
5. Follow the onscreen instructions until you get to the part where it says to edit a file.
6. About halfway through the script it will pull a file called "init.qcom.post_boot.sh" to the folder.
7. Open it with a TEXT editor and navigate to about line 487 (Might be different for 8gb model). Look here for a better understanding: https://www.dropbox.com/s/jr5lyl5s5i2jtpg/where to paste code.PNG?dl=0
8. Start a new line and paste this code in the file: (Refer to the image above for help)
Code:
chmod 655 /cache
chmod 655 /cache/dalvik-cache
chmod 655 /cache/dalvik-cache/*
9. Make sure to save the file in the same folder as the cachemover_Stock.bat
10. Press any key to continue on the script and let it do its thing.
11. It will reboot several times and land you on the home screen/lock screen.
12. If the script hangs after a reboot, you need to unlock the device to reestablish a connection with your computer.
13. There might be one or two force closes but once you close the notifications they will not come back.
Custom ROM procedure:
USE THIS FOR ROMS THAT DO NOT REMOUNT OR CHANGE PERMISSIONS OF /CACHE ON BOOT
1. Download the cachemover_v1.3.zip from: https://www.dropbox.com/s/bzj34g4q1s61ojz/cachemover_v1.3.zip?dl=0
2. Extract the contents.
3. Connect device to PC and navigate to the extracted folder.
4. Double click/Run the cachemover.bat
5. Follow the onscreen instructions.
If anything goes wrong:
Go to recovery, wipe cache, then wipe dalvik-cache and reboot. This should get your device back to how it was.
(If you used STOCK ROM procedure)
The script made a backup of the "init.qcom.post_boot.sh" file to /sdcard/init_backup
You can restore the shell script to /system/etc/ via shell commands or by using a root browser. To restore permissions:
Code:
chmod 740 /system/etc/init.qcom.post_boot.sh
chown root:root /system/etc/init.qcom.post_boot.sh
Custom ROM procedure already has a restore script!
I am currently working on an auto restore script for stock and that will be relased soon, hopefully! :good:
Changelog:
v1.0 - First stable release. Does not work on STOCK ROM.
v1.1 - Added a restore script.
v1.3 - Added support for STOCK ROM. There are still a few bugs.
How it works?!?!
Coming soon...
Huge thanks to @Bert98 and @dd043
Hit the thanks button if it worked! I went through about 50 factory resets, and reflashed the ROM about 25 times, and put about 10 hours of work into this script! Really motivates me for future projects. :laugh:
Thanks for your help man and effort.
I encountered a problem, everything works up until my device boots in CWM to fix permissions, then just sits there doing not alot I don't even see the option in my CWM.
Any ideas? cheers
Sent from my XT1032 using XDA Free mobile app
When it reboots to cwm unplug the cable and replug it, if it hangs just type these commands manually from a command window.
chmod 655 /cache
chmod 655 /cache/dalvik-cache
chmod 655 /cache/dalvik-cache/*
reboot
If this does not work you may ned to go into mounts & storage in the cwm menu and click mount /cache. Then try the commands again.
I'm having some issues on stock.
I thought 0655 fixed everything but no, I can't install any app after moving the dalvik-cache to /cache. I tried chmoding 0777 on the new cache folder, on /cache itself, to no avail.
Code:
E/dexopt cannot open '/data/dalvik-cache/[email protected]' for output
Anyone can confirm it's not only my device? And/or can help find a fix?
Also does someone knows how to execute commands on a particular init step? Real init.rc scripts can do:
Code:
on post-fs-data
mount -o bind /cache/dalvik /data/dalvik-cache
It there was a way to achieve the same from post_boot/init.d we could mount -o bind /cache/dalvik /data/dalvik-cache and all permissions issues would disappear as well as the need for symlink.
You have a typo in the threads title. Just a heads up.
Vuciz said:
You have a typo in the threads title. Just a heads up.
Click to expand...
Click to collapse
Thanks for letting me know!
dd043 said:
I'm having some issues on stock.
I thought 0655 fixed everything but no, I can't install any app after moving the dalvik-cache to /cache. I tried chmoding 0777 on the new cache folder, on /cache itself, to no avail.
Code:
E/dexopt cannot open '/data/dalvik-cache/[email protected]' for output
Anyone can confirm it's not only my device? And/or can help find a fix?
Also does someone knows how to execute commands on a particular init step? Real init.rc scripts can do:
Code:
on post-fs-data
mount -o bind /cache/dalvik /data/dalvik-cache
It there was a way to achieve the same from post_boot/init.d we could mount -o bind /cache/dalvik /data/dalvik-cache and all permissions issues would disappear as well as the need for symlink.
Click to expand...
Click to collapse
Let me try and do that right now... Ill get back to you if it does!
My script works on stock btw... But the mount way seems a bit easier and might cause less errors than my way.
Try it please.
skyguy126 said:
Let me try and do that right now... Ill get back to you if it does!
My script works on stock btw... But the mount way seems a bit easier and might cause less errors than my way.
Try it please.
Click to expand...
Click to collapse
Yes I've tried your script, all went well but the result is the same. The script itself works nicely btw
Applications present before moving cache work perfectly, but I can't install anything new. I suspect it might be my device but before wiping everything I'd prefer feedback from others :fingers-crossed:.
I cannot install new apps as well. The mount command you showed me has the same effect too. I honestly don't know anymore, the sym link did not allow the install of new apps nor did the mount command you sent me. Correct me if I am wrong.
Edit: Going through all the init files on my phone to see which one remounts /cache at boot.
Why does the init.rc get overwritten at boot. Is it because the kernel (boot.img) is the one that copies it over? I have found by changing the perms/locations in this file and init.target.rc you can achieve what this mod is trying to acomplish.
I don't see the mount cache command in CWM strange
I've managed to get back to normal, thanks for everyone's help though, I will keep and eye on the thread
Sent from my XT1032 using XDA Free mobile app
non-windows version?
Thanks for this tool. It's a great idea and our Motos really need it.
However, I have a problem - I do not own a windows license (os x and ubuntu user) and I would prefer not to spend $120 just to use it for this script. Pirating is out of the question for me.
I was wondering if there is any chance of having this script written for linux and/or mac. If impossible, is there a LEGAL way of running windows in a virtual machine? Something like a trial or similar?
If you know how just convert it to shell script for osx and Linux. I give you permission to do this but you may not take credit or rehost your creation.
Ok so I have the kernel extracted and we could modify and flash that, but I believe that it's not really necessary. There are a lot of risks to flashing kernels and I am not willing to take it. So is there a way we can modify dalvik so it creates it's cache in /cache instead.
skyguy126 said:
Why does the init.rc get overwritten at boot. Is it because the kernel (boot.img) is the one that copies it over? I have found by changing the perms/locations in this file and init.target.rc you can achieve what this mod is trying to acomplish.
Click to expand...
Click to collapse
Yes the init.rc is in the boot ramdisk. I don't think it would be worth the trouble to rebuild a boot.img. The moto g is fairly unbrickable but it's quite a lot of work to setup an environment to rebuild an image :/.
Too bad for the mount command, I was sure it was working but maybe I had changed something else and don't quite remember the steps to reproduce
We could possibly implement a shell script toggler for when we need to install new apps, but I'm afraid it'd become annoying fairly quickly: I noticed the issue initially because google play services decided to update itself, failed, and broke all google apps. As far as I know this autoupate can't be disabled.
Thanks for trying!
dd043 said:
Yes the init.rc is in the boot ramdisk. I don't think it would be worth the trouble to rebuild a boot.img. The moto g is fairly unbrickable but it's quite a lot of work to setup an environment to rebuild an image :/.
Too bad for the mount command, I was sure it was working but maybe I had changed something else and don't quite remember the steps to reproduce
We could possibly implement a shell script toggler for when we need to install new apps, but I'm afraid it'd become annoying fairly quickly: I noticed the issue initially because google play services decided to update itself, failed, and broke all google apps. As far as I know this autoupate can't be disabled.
Thanks for trying!
Click to expand...
Click to collapse
How about making a simple apk that toggles this feature. Something like when you click the icon it doesn't even open but gives a little notification of success. Something like that. I myself am not experienced with apks but I can put together a shell script for the apk.
skyguy126 said:
Ok so I have the kernel extracted and we could modify and flash that, but I believe that it's not really necessary. There are a lot of risks to flashing kernels and I am not willing to take it. So is there a way we can modify dalvik so it creates it's cache in /cache instead.
Click to expand...
Click to collapse
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
dd043 said:
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
Click to expand...
Click to collapse
Ill try it. I don't mind doing a bunch of resets because I am using my moto g as a test bench anyway. My daily driver is the OnePlus One
dd043 said:
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
Click to expand...
Click to collapse
EDIT: Unfortunately it didn't work. I don't know if I modified the installd file correctly. The program I used is HxD.
Is there a way we can force dalvik to start after the directories are created. And change dalvik to create it in /cache.

[Tutorial] LG Gpad v410 5.1 to 4.4 downgrade, root, & internal storage fix.

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.

Cant Install anything after OTA update

Hi, I cant get to install any roms on my phone after updating via OTA (Lineage 17.1)
I can access to twrp but when I try installing any rom half bar is completed and after that, it crashes and boot loop.
I have tried to install different roms but same result. Can anyone help please?
Already tried:
Factory reset
wipe: data/cache/ system
Restore firmware via fastboot flash.
Change SD card
Installed 3 different stock roms via fastboot and they boot but after few seconds reboot on setup (Gboard and maps apps crash warning)
View attachment 5130605
No solution anyone?
dawe0120 said:
No solution anyone?
Click to expand...
Click to collapse
Post your recovery.log and I will tell you what's wrong with your phone.
TWRP main screen > advanced > create log
Please rename it from recovery.log => recovery.txt or .zip it to upload the file here.
WoKoschekk said:
Post your recovery.log and I will tell you what's wrong with your phone.
TWRP main screen > advanced > create log
Please rename it from recovery.log => recovery.txt or .zip it to upload the file here.
Click to expand...
Click to collapse
Thanks for the response here it is.View attachment 5131037
dawe0120 said:
Thanks for the response here it is.View attachment 5131037
Click to expand...
Click to collapse
This log doesn't show anything about your error. Reproduce the error and than grep the log.
Ok done, here is what I did:
Wiped side b (to make sure there's no other rom installed), then tried to install pixel experience rom and the twrp crash at mid bar happened again. (Same process as shown in screenshot)
After that rebooted to twrp and created the log.
View attachment 5131307
dawe0120 said:
Ok done, here is what I did:
Wiped side b (to make sure there's no other rom installed), then tried to install pixel experience rom and the twrp crash at mid bar happened again. (Same process as shown in screenshot)
After that rebooted to twrp and created the log.
View attachment 5131307
Click to expand...
Click to collapse
Ok, due to the crash TWRP does not record the error. But you can try this :
Before you are going to flash the ROM connect your device with your PC. Open ADB cmd line and first of all check the connection with
Code:
adb devices
After that run
Code:
adb logcat >> recovery.txt
When TWRP crashes you'll find the recovery.txt inside of your ADB folder on your PC.
WoKoschekk said:
Ok, due to the crash TWRP does not record the error. But you can try this :
Before you are going to flash the ROM connect your device with your PC. Open ADB cmd line and first of all check the connection with
Code:
adb devices
After that run
Code:
adb logcat >> recovery.txt
When TWRP crashes you'll find the recovery.txt inside of your ADB folder on your PC.
Click to expand...
Click to collapse
I did what you told me, but the only thing in the recovery.txt is:
/sbin/sh: logcat: not found
First command: displays my S/N - recovery
So comm is not the problem.
dawe0120 said:
I did what you told me, but the only thing in the recovery.txt is:
/sbin/sh: logcat: not found
First command: displays my S/N - recovery
So comm is not the problem.
Click to expand...
Click to collapse
The connection is ok but logcat isn't included in TWRP.
Ok, next try:
When TWRP crashes check connection again with adb devices. Got a connection? Then go ahead with
Code:
adb pull /tmp/recovery.log recovery.txt
and upload it here.
WoKoschekk said:
The connection is ok but logcat isn't included in TWRP.
Ok, next try:
When TWRP crashes check connection again with adb devices. Got a connection? Then go ahead with
Code:
adb pull /tmp/recovery.log recovery.txt
and upload it here.
Click to expand...
Click to collapse
Ok, here is what I did:
Wiped side B again(to clean the previous failed installation)
Installed P.E. rom (same crash issue happened)
Then reboot to twrp. Put de communication command (everything ok S/n and recovery displayed)
And finally wrote the adb pull command successfully
HEre's the file: View attachment 5131657
dawe0120 said:
Ok, here is what I did:
Wiped side B again(to clean the previous failed installation)
Installed P.E. rom (same crash issue happened)
Then reboot to twrp. Put de communication command (everything ok S/n and recovery displayed)
And finally wrote the adb pull command successfully
HEre's the file: View attachment 5131657
Click to expand...
Click to collapse
A reboot clears the log so I still got no information. Either you grep the log when TWRP crashes or the log buffer will be cleared with next reboot.
How did you wipe slot b?
WoKoschekk said:
A reboot clears the log so I still got no information. Either you grep the log when TWRP crashes or the log buffer will be cleared with next reboot.
How did you wipe slot b?
Click to expand...
Click to collapse
Ok, this time what I did is to run the pull command just before the crash (at mid bar) I tried to run it at the freezing but obviously the communication with the device was suspended.
I hope this made any difference.
View attachment 5131691
What I mean by saying wiping slot b is selecting it via twrp and then wipe data, cache, system etc.
dawe0120 said:
Ok, this time what I did is to run the pull command just before the crash (at mid bar) I tried to run it at the freezing but obviously the communication with the device was suspended.
I hope this made any difference.
View attachment 5131691
What I mean by saying wiping slot b is selecting it via twrp and then wipe data, cache, system etc.
Click to expand...
Click to collapse
The log ends at 40% of your installation process but no error is shown.
All I would recommend is to flash the stock ROM and download a new Pixel ROM (from official source!). Since it's not possible to take any logs showing your error I don't have a better solution for that.
This process is a Google implementation and not a simple flash script like older ROMs use it. So it's really hard to find an error, even if you know the complete Java source (and I don't ).
Wiping slot _b: There's no need to wipe data for that. Your data partition has got no slots, it's only /data.
Let me explain you in short what's the meaning of all those options:
cache = /data/cache
dalvik-cache = /data/dalvik-cache
internal = /data/media
data = all of /data, except 'media' (internal storage) directory
So, you can see that those options for choosing what to wipe are all stored under /data. The easiest way to wipe them all together would be to format data completely. One step and you're done! If you like to...
WoKoschekk said:
The log ends at 40% of your installation process but no error is shown.
All I would recommend is to flash the stock ROM and download a new Pixel ROM (from official source!). Since it's not possible to take any logs showing your error I don't have a better solution for that.
This process is a Google implementation and not a simple flash script like older ROMs use it. So it's really hard to find an error, even if you know the complete Java source (and I don't ).
Wiping slot _b: There's no need to wipe data for that. Your data partition has got no slots, it's only /data.
Let me explain you in short what's the meaning of all those options:
cache = /data/cache
dalvik-cache = /data/dalvik-cache
internal = /data/media
data = all of /data, except 'media' (internal storage) directory
So, you can see that those options for choosing what to wipe are all stored under /data. The easiest way to wipe them all together would be to format data completely. One step and you're done! If you like to...
Click to expand...
Click to collapse
I have tried to flash 3 different stock roms via fastboot. They boot but then the system crashes at setup and reboots. I get warnings that maps and gboard stoped unexpectedly.
Honestly I dont know what else to try, the only thing I did is to update via OTA (didnt know I shouldtn have) =(
https://forum.xda-developers.com/g6-plus/development/rom-pixel-experience-t4069215 this is the rom Im trying to install and it's an official release.
If I format data instead of wiping will I lose twrp recovery?
View attachment 5131731
Does this info help?
dawe0120 said:
I have tried to flash 3 different stock roms via fastboot. They boot but then the system crashes at setup and reboots. I get warnings that maps and gboard stoped unexpectedly.
Honestly I dont know what else to try, the only thing I did is to update via OTA (didnt know I shouldtn have) =(
https://forum.xda-developers.com/g6-plus/development/rom-pixel-experience-t4069215 this is the rom Im trying to install and it's an official release.
If I format data instead of wiping will I lose twrp recovery?
Click to expand...
Click to collapse
Your Pixel ROM is fine, it's the official release.
Format /data or wiping /data completely is nearly the same. Both methods will erase all stored data. But format will build up a new partition. It's like formatting a USB-Stick in Windows for example.
But none of them would delete your recovery. TWRP is a part of /boot (boot.img) which is only another partition besides /data.
As long as you're not able to boot up your device with the stock ROM you won't be able to boot the Pixel ROM, too. Pixel is only a overlay for stock.
Which three stock ROMs did u try to flash? Build no and source/links would be helpful.
This is the current build for your device: (software channel RETLA is guess??)
XT1926-6_EVERT_RETLA_DS_9.0_PPWS29.116-11-23
Download it and flash it with the attached flashfile.bat (for uploading purposes I had to zip it)
The commands are taken from the flashfile.xml inside the firmaware .zip
WoKoschekk said:
Your Pixel ROM is fine, it's the official release.
Format /data or wiping /data completely is nearly the same. Both methods will erase all stored data. But format will build up a new partition. It's like formatting a USB-Stick in Windows for example.
But none of them would delete your recovery. TWRP is a part of /boot (boot.img) which is only another partition besides /data.
As long as you're not able to boot up your device with the stock ROM you won't be able to boot the Pixel ROM, too. Pixel is only a overlay for stock.
Which three stock ROMs did u try to flash? Build no and source/links would be helpful.
This is the current build for your device: (software channel RETLA is guess??)
XT1926-6_EVERT_RETLA_DS_9.0_PPWS29.116-11-23
Download it and flash it with the attached flashfile.bat (for uploading purposes I had to zip it)
The commands are taken from the flashfile.xml inside the firmaware .zip
Click to expand...
Click to collapse
I flashed it via fastboot the flash didn't show any errors.
The phone starts and says "verity mode disabled", then this happened:
View attachment 5131805
(Video on rar file)
dawe0120 said:
I flashed it via fastboot the flash didn't show any errors.
The phone starts and says "verity mode disabled", then this happened:
View attachment 5131805
(Video on rar file)
Click to expand...
Click to collapse
Oh... that doesn't look good at all!
It seems to be a kind of hardware failure and not only a software bug. Was the OTA update that led to your problem successful?
Boot into TWRP and see if you could find some logs in /sys/fs/pstore and /data/vendor/dontpanic.
WoKoschekk said:
Oh... that doesn't look good at all!
It seems to be a kind of hardware failure and not only a software bug. Was the OTA update that led to your problem successful?
Boot into TWRP and see if you could find some logs in /sys/fs/pstore and /data/vendor/dontpanic.
Click to expand...
Click to collapse
Yes de OTA update was successful, the phone worked flawlessly the whole day(Wednesday) without problems, then I went to sleep that day and when I woke up my phone was bricked. (No I didn't drop my phone or anything like that) These are the files I found on the pstore folder (nothing on the dontpanic folder)
View attachment 5132711
View attachment 5132713
After some research I found posts about the same issue as me :
https://forums.republicwireless.com/t/screen-flickering-with-moto-g-6/21309
So If it's a hardware problem wow just wow. I only have had this phone for nearly 2 months and It's already dying? (Never dropped it or anything like that)
I'll never buy anything from motorola again for the rest of my life.
dawe0120 said:
Yes de OTA update was successful, the phone worked flawlessly the whole day(Wednesday) without problems, then I went to sleep that day and when I woke up my phone was bricked. (No I didn't drop my phone or anything like that) These are the files I found on the pstore folder (nothing on the dontpanic folder)
View attachment 5132711
View attachment 5132713
After some research I found posts about the same issue as me :
https://forums.republicwireless.com/t/screen-flickering-with-moto-g-6/21309
So If it's a hardware problem wow just wow. I only have had this phone for nearly 2 months and It's already dying? (Never dropped it or anything like that)
I'll never buy anything from motorola again for the rest of my life.
Click to expand...
Click to collapse
I guess it could be hardware issue because a full factory image like I linked above covers almost all of your device. You get the kernel and all drivers.
I'll study your logs later that day.

Categories

Resources