[Q] Return to stock rom 4.2.2 and usb not working help!! - Nexus 7 Q&A, Help & Troubleshooting

Hi,
I urgently need help for my nexus 7 that has stopped charging or recognising even the original ASUS usb cable (have tried many others as well, same result). I'm currently charging it via the method of powering it of and plugging it in without the android os running. I have even tried to connect it to my PC in bootloader mode. I have the custom trinity kernel install and want to return my device to stock kernel and os state. However I do have TWRP and need help from there to install the stock image. I have previously tried many thing such as completely wiping the system and clearing any caches in TWRP. Also I have seen that in TWRP it recognises my usb (connected via OTG cable).
So could anyone please help me with returning my nexus 7 back to stck state using TWRP.
And is there also a way of unrooting my device without using PC (using TWRP instead)?
-- Update -- I have no OS installed (tried to delete custom kernel) --
Thanks in advance.
Nexus 7 state:
- custom trinity kernel
- TWRP
- USB connection to PC not working

There should be help for you here in this sticky in this Q&A forum:
http://forum.xda-developers.com/showthread.php?t=1907796
Note 2 - Nexus 7 - Charge - Player 5.0 - Fascinate
<><><><><><><><><><>
Read twice, flash once

USB doesn't work > can't use adb
ezas said:
There should be help for you here in this sticky in this Q&A forum:
http://forum.xda-developers.com/showthread.php?t=1907796
Note 2 - Nexus 7 - Charge - Player 5.0 - Fascinate
<><><><><><><><><><>
Read twice, flash once
Click to expand...
Click to collapse
Thanks for replying, but the problem is that I can't use adb (can't connect with PC), the only thing I can do is access TWRP and usb storage (via OTG in TWRP). So I need the stock rom in a "rom" like format so I can flash it using TWRP. Could anyone please tell me another way or give the stock rom in a format that TWRP can flash (ASAP plz). Thanks in advance

The easiest thing (of course) would be if somebody put together a flashable return-to-stock ROM. I've done it before for other devices, but haven't gotten around to doing it for the N7.
You didn't really say whether you were talking about (a) "exactly stock", or whether you wanted (b) a stock recovery put back in place, or whether you were (c) also trying to get the bootloader re-locked.
Case (c) can not be done using anything except fastboot (unless you previously recorded your bootloader while it was in a locked state), so I'll just assume that you are talking about (a) and (b), and that you are going to leave the bootloader unlocked - or you had already locked your bootloader after rooting and installing a custom recovery.
I see that you are trying (in another thread) to get somebody to make you a Nandroid backup of /system from a pure stock ROM. That would be one way of doing things (making sure that you get a grouper image if you have a grouper (WiFi) or a tilapia image if you have a tilapia N7 (3G) device). And while we are on the subject, I'll throw out another way you can do just that:
- The Google "factory" system.img files are in a sparse ext4 format that can not be directly mounted (e.g. using a loopback mount) in Linux. But, the Android toolkit includes a utility (for Linux) called "simg2img" (aka Sparse IMaGe to IMaGe) which can convert the sparse ext4 "system.img" image file to a regular ext4 format image file. This could be created, mounted via a loopback (using Linux, of course), and then a "tar" backup of the whole shebang is made. The TWRP and CWM nandroid backup images are just TAR archives. So If you grok what I am telling you, you have the power to create your own "Nandroid" /system backup file directly from the factory images. (Windoze-only doods need not apply.)
If you take this route, then you only need the recovery image plus the hacked "Nandroid" backup to "restore" directly to a pure stock device using only a custom recovery. (The recovery partition can be overwritten while the recovery is running because the partition is not "in use" after the boot completes - the recovery kernel and ramdisk live entirely in memory while they are running.)
But as I noted above, this will not re-lock the bootloader. It will put stock software back on the device, though.
If you intend to save anything off the device, do it before you begin this. The stock recovery "factory reset" procedure clears the ENTIRE /data partition including the pseudo-SD card area.
good luck

how would you do the procedure
bftb0 said:
The easiest thing (of course) would be if somebody put together a flashable return-to-stock ROM. I've done it before for other devices, but haven't gotten around to doing it for the N7.
You didn't really say whether you were talking about (a) "exactly stock", or whether you wanted (b) a stock recovery put back in place, or whether you were (c) also trying to get the bootloader re-locked.
Case (c) can not be done using anything except fastboot (unless you previously recorded your bootloader while it was in a locked state), so I'll just assume that you are talking about (a) and (b), and that you are going to leave the bootloader unlocked - or you had already locked your bootloader after rooting and installing a custom recovery.
I see that you are trying (in another thread) to get somebody to make you a Nandroid backup of /system from a pure stock ROM. That would be one way of doing things (making sure that you get a grouper image if you have a grouper (WiFi) or a tilapia image if you have a tilapia N7 (3G) device). And while we are on the subject, I'll throw out another way you can do just that:
- The Google "factory" system.img files are in a sparse ext4 format that can not be directly mounted (e.g. using a loopback mount) in Linux. But, the Android toolkit includes a utility (for Linux) called "simg2img" (aka Sparse IMaGe to IMaGe) which can convert the sparse ext4 "system.img" image file to a regular ext4 format image file. This could be created, mounted via a loopback (using Linux, of course), and then a "tar" backup of the whole shebang is made. The TWRP and CWM nandroid backup images are just TAR archives. So If you grok what I am telling you, you have the power to create your own "Nandroid" /system backup file directly from the factory images. (Windoze-only doods need not apply.)
If you take this route, then you only need the recovery image plus the hacked "Nandroid" backup to "restore" directly to a pure stock device using only a custom recovery. (The recovery partition can be overwritten while the recovery is running because the partition is not "in use" after the boot completes - the recovery kernel and ramdisk live entirely in memory while they are running.)
But as I noted above, this will not re-lock the bootloader. It will put stock software back on the device, though.
If you intend to save anything off the device, do it before you begin this. The stock recovery "factory reset" procedure clears the ENTIRE /data partition including the pseudo-SD card area.
good luck
Click to expand...
Click to collapse
Thanks for the information. I do want my device (grouper WiFi) to go back to factory state (c - get rid of superSU and busybox). However I do have some questions regarding the creating nandroid backup by your method. As I have Ubuntu 12.10 installed, how would I do the procedure? And what do you mean by "mounted via a loopback"? Also is it only "system.img", what about "boot.img", "recovery.img" and "userdata.img"?
Is it possible that you could maybe give me the nandroid backup.tar as I am not much experienced, I would really appreciate it.
Thanks in advance.

Well if a (stock) factory reset erases the /data partition, userdata.img sorta doesn't matter, right?
boot.img and recovery.img are just binary blobs, so they could be taken from the factory image and used "as is" as part of your hand-assembled "Nandroid Backup"
That only leaves system.img - previously discussed.
$ sim2img google-factory-sparse-system.img ext4.system.img
$ sudo /bin/bash
# losetup /dev/loop0 ./ext4.system.img
# mkdir /mnt/Foo
# mount -t ext4 -o ro /dev/loop0 /mnt/Foo
# cd /mnt/Foo
# tar cf /home/newb/fakenandroidsystem.tar .
# cd /home/newb
# chown newb.newb fakenandroidsystem.tar
# umount /mnt/Foo
# rmdir /mnt/Foo
# losetup -d /dev/loop0
# exit
$
You will need to either find the sim2img utility as a prebuilt or download it and build it. You might need to fool with tar command-line options during the archive creation - I notice that the TWRP nandroid tar archives (system.emmc.ext4.win) seem to have absolute pathnames rooted at "/" rather than "/system". Don't know if this is significant or not.
good luck
PS it goes without saying that you need to be extremely careful about giving up root when doing this: imagine that you restore a bad /system image along with a stock recovery - you will have an unbootable device that can not be rooted without hardware repair of the USB. You might want to initially do a test restore or two without overwriting the custom recovery
with the stock version. And keep a flashable ROM on the SDcard, too. Once you have everything working correctly, only then should you restore the recovery back to stock.

Do I load the nandroid direct to my USB device (connect via OTG and then flash in TWRP) after converting the .img and from what path in ubuntu shell am I writing those commands?

Sounds like you don't have adb set up there is a ppa to set it up for you Google for it. Then try to run adb devices and it should show up
Sent from my PG86100 using Tapatalk 2

There is no problem with adb as it did work before (when USB port did work), it doesn't even show up in device manager(windows) anymore. I cannot connect with my device to my PC via USB as the port is faulty nor does it charge with the oem wall charger when system is one. I can only charge it when the system is completely turned off and then when I plug it in PC/wall charger via USB. However I can access my USB drive via OTG only in TWRP and this is only way I can flash/restore to stock system. I want to return it to stock to send it back to google (exchange).

Related

[Q] System image problem

My system partition was erased via fastboot in order to successfully flash a different one, however I'm getting write errors on one I pulled from somebodies' nandroid backup, and a buffer exceeded error when trying to flash the system.img from the leaked stock images thread.
Is there any way to flash the image from my phone (I read that fastboot doesn't handle files over 300mb?) or an alternate image I can use. Everything else is in tact the phone just stalls at the Google screen due to a missing /system
Alex.xTF said:
My system partition was erased via fastboot in order to successfully flash a different one, however I'm getting write errors on one I pulled from somebodies' nandroid backup, and a buffer exceeded error when trying to flash the system.img from the leaked stock images thread.
Is there any way to flash the image from my phone (I read that fastboot doesn't handle files over 300mb?) or an alternate image I can use. Everything else is in tact the phone just stalls at the Google screen due to a missing /system
Click to expand...
Click to collapse
You need a sparse filesystem image. Until the original factory images are made available online (it's in the works, but I don't have an exact date), somebody with a working device could create such an image by running (as root):
# make_ext4fs -l 512m -s /sdcard/system.img /system
This should create a flashable system.img (~145MB) on /sdcard (that you can then grab with adb pull or usb mass storage)
I really appreciate you responding, hopefully I can recover my phone without a return, anybody you can suggest I ask to do this for me?
Anybody with a Nexus S and an adb shell running as root should be able to do this.

[Solved - 3.1 OTA update working!] Back to stock and backup for newbies TUTORIAL

This tutorial is made to help those getting an Iconia for the first time as well as those who lost/didn't backup before going to custom ROMs.
We will try to help you using more than one variant #1, #2 etc to backup and restore your tablet. If you're new stick to the #1s in the first post. If you know a little Android and a little Linux, head to the second post.
Acer does not provide any full-restore ROMs at the moment so your best option is to create your own backup in case something goes wrong.
The ultimate goal is to help users restore their OTA (over the air) update function, aka. get the OS as fresh and clean as it was the day it came out of the factory.
Help us help you! The parts of the tutorial that aren't ready or require your attention are marked in RED. If you got:
A new tablet, never flashed with a custom rom, share your original backup with US, you will need it anyway once you decide to experiment!
A new tablet, never updated, share your Firmware and "Operated Countries" (on the back of the box) so we know what stock ROM belongs to which countries or continent.
Knowledge and the will to share it!
Before you start!
Don't be afraid of rooting, it will not break your OTA (un-rooting is a piece of cake) updates and it is essential to do a proper backup!
Back up your user files from music to documents and save games or you might lose them!
When everything fails > Privacy > data reset is a good way to start fresh. Best to use it when trying something new.
Always unfreeze/restore system APKs like telephony etc before formatting/soft resetting (not to be confused with turning on and off again) your tablet.
Any .zip on the micro-sd card will be automatically flashed on POWER & VOL-
Save Acer Recovery Installer, Root, your favorite file explorer on your desktop
Droid Explorer (PC app) can be a great tool to install apps from your PC
Before attempting to OTA update: un-root, make sure all system apps are in place, remove micro-sd, factory reset (some have reported success after these)
Unbricking
Get the right firmware (Full Package, thanks Vache), for your tablet, decrypt it and extract the update.zip
Put it on your micro-sd card. Shut down. Boot with power and VOL - pressed and it will automatically get flashed.
What firmware is right for my country?
Full Package Acer_A500_0.000.00_1.016.01_COM_GEN1
CWM Backup Acer_A500_0.000.00_1.016.05_COM_GEN1 - Provided by flyinghighaero
Update zip Acer_A500_0.000.00_1.105.01_EMEA_GEN3 - Provided by bpivk
EU: AT, BE, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LY, MT, NL, PL, PT, SK, SI, ES, SE, GB, IS, LI, NO, CH, BG, RO, TR.
Full Package Acer_A500_0.000.00_1.104.02_COM_GEN1:
USA
Full Package Acer_A500_0.000.00_1.104.05_COM_GEN1
Canada
Acer_A500_0.000.00_1.112.01_EMEA_CUS7 - Not available
Germany
Acer_A500_0.000.00_1.016.04_COM_GEN1 - Not available
Thailand - Probably Asia, needs confirmation
Full Package Acer_A500_0.000.00_1.104.03_COM_GEN1
Taiwan - Probably Asia, needs confirmation
Acer_A500_1.105.01_EMEA_GEN3 - Not available
reports of Netherlands and Mexico - hard to tell what EMEA means to Acer
Acer_A501_1.309.02_COM_GEN1 - Warning, this is an European ROM for A501 !!! - thanks captainpaella
Did your tablet come with one of the following firmwares or maybe another one? (Settings > About tablet), tell us what countries/continent it is for by checking the back of the box for the "Operated Countries" label and posting it below:
Acer_A500_0.000.00_1.013.01_EMEA_GEN1
Acer_A500_0.000.00_1.104.04_COM_GEN1
Acer_A500_0.000.00_1.016.02_COM_GEN1
Creating a backup with Acer Recovery Installer #1
Root
Acer Recovery Installer
Install clockwork mod:
select "ClockworkMod Recovery rev1.3.4 by thor2002ro"
click "Install Recovery Image"
click "Yes" when asked to backup the current image!!!
Reboot into CW recovery from the app or with VOL- & POWER
Create a full backup: "backup and restore" -> "Full Backup"
If your backup is a fresh stock-only (no previous custom roms flashed) one, please share it. It's located on your micro SD in clockworkmod/backup/[current date] <= This is the CWM folder we need!
Don't forget to restore the original recovery image to be able to install futher updates. Unrooting might be necesary depending on Acer.
Restoring to defaults via CWM #1
Full restore in CWM: "backup and restore" -> "Full Backup"
Enter Acer Recovery Installer and restore recovery.img!
Aditional restoring info
Remember: un-root, remove micro-sd, factory reset if it doesn't work.
Also don't have modified, removed or frozen system apps, wi-fi module, build.prop or any other OS file!
"dd" method in the second post is practical if you'll want to downgrade from a FW that has no root yet - still needs testing (eg. if you update to a future 3.2 you won't be able to go back to 3.1 or 3.0.1 until 3.2 is rooted, because CWM needs root, here's where ADB and "dd" can really come in handy!)
Available backups:
Updates of original Acer_A500_1.016.01_COM_GEN1
CWM backup successfully used by me, containing: Stock 1.016.01_COM_GEN1 OTA updated to 1.139.02. 1.139.02 is a "dud" - a FW update taken down by ACER that breaks updates; to solve this issue flash the update.zip(1.139.05) with the default acer bootloader (restore the original recovery.img from Acer Recovery Installer to get the default acer bootloader)
1.141.05 provided by Thor - Restore with "dd", see post 2!
Please provide your own CWM folder or flexrom, boot, recovery and system.img, full dumps (p1, p2, p3... description for this method below)
Do not provide
system.zip containing system/app files
3.1 ROMs - the purpose here is to know if OTA is working
What worked for me:
Done with CWM!
Un-root, restore to stock, remove micro-sd - probably not all necesary but it worked for me.
First of all I flashed to my default rom: Acer_A500_0.000.00_1.016.01_COM_GEN1 from Acer's server, didn't have a backup.
I installed acer recovery installer, rooted and then CWM restored 1.139.02. This firmware is probably Acer's mistake as it is not available anymore, nor can you OTA update from it.
Then I entered Acer Recovery Installer, restored the original recovery.img, un-rooted and restored to factory defaults.
Placed Acer_A500_1.016.01_1.139.05_COM_GEN1 on my micro SD and rebooted into Acer's recovery (PWR&VOL-) installed with no issues.
After the reboot 4.010.22 was available! Started the download, removed the micro-sd(probably wasn't necessary) and the tablet rebooted and installed the update properly!
Voila, 3.1 (4.010.22, kernel 2.6.36.3) with the help of CWM!
This is all the Info I was able to gather about a full restore. Put it to good use and be productive - tell us your results!
Additional backup and recovery methods
Creating a backup via ADB #2
If you're uncomfortable with ADB, this should work with Terminal Emulator +/- Busybox too. Just skip to step 4.
Or you can try the automatic backup tool, just fire it up and follow the instructions. Root and 1GB on the external SD required.
Get ADB + Java both for x32 even if you have windows on 64 bit!
Get the Iconia A500 USB drivers
Run SDK Manager from "C:\Program Files (x86)\Android\android-sdk" and let it download it's junk. I've no idea how much of it you'll need.
Go to "C:\Program Files (x86)\Android\android-sdk\platform-tools"
Create a text file that will contain "cmd" and save it.
Rename your text file ADB.bat and create a shortcut on the desktop for convenience
Root then go to Settings > Applications > Development > USB debugging
Open your adb shortcut, connect the tablet and type "adb shell"
"$" will show up, meaning that you are logged in as an User
type "su", accept the superuser request on your tab
"#" you're now Admin and can issue backup commands.
Backup the first 0x680000 bytes of mmcblk0 and all partitions (except cache + data) with dd:
dd if=/dev/block/mmcblk0 bs=512 count=13312 of=/mnt/external_sd/dumps/mmcblk0_start
dd if=/dev/block/mmcblk0p1 of=/mnt/external_sd/dumps/p1
dd if=/dev/block/mmcblk0p2 of=/mnt/external_sd/dumps/p2
dd if=/dev/block/mmcblk0p3 of=/mnt/external_sd/dumps/p3
dd if=/dev/block/mmcblk0p5 of=/mnt/external_sd/dumps/p5
dd if=/dev/block/mmcblk0p6 of=/mnt/external_sd/dumps/p6
dd if=/dev/block/mmcblk0p7 of=/mnt/external_sd/dumps/p7
Thanks sc2k!
Restoring to factory defaults via Terminal #2
Root
Install Terminal Emulator, Busybox installer and Acer Recovery Installer
Copy system.img, flexrom.img, boot.img, recovery.img in /mnt/sdcard
Run (flash system.img last, it will lock down your tablet and you won't be able to flash the other .img files):
/data/data/com.interphaze.AcerRecoveryInstaller/files/itsmagic
dd if=/mnt/sdcard/flexrom.img of=/dev/block/mmcblk0p6
dd if=/mnt/sdcard/boot.img of=/dev/block/mmcblk0p2
dd if=/mnt/sdcard/recovery.img of=/dev/block/mmcblk0p1
dd if=/mnt/sdcard/system.img of=/dev/block/mmcblk0p3
Restoring to factory defaults via ADB #3
Get ADB + Java both for x32 even if you have windows on 64 bit!
Get the Iconia A500 USB drivers
Run SDK Manager from "C:\Program Files (x86)\Android\android-sdk" and let it download it's junk. I've no idea how much of it you'll need.
Go to "C:\Program Files (x86)\Android\android-sdk\platform-tools"
Create a text file that will contain "cmd" and save it.
Rename your text file ADB.bat and create a shortcut on the desktop for convenience
Root then go to Settings > Applications > Development > USB debugging
Open your adb shortcut, connect the tablet and type "adb shell"
"$" will show up, meaning that you are logged in as an User
type "su", accept the superuser request on your tab
"#" you're now Admin and can issue flashing commands.
Install Acer Recovery Installer
Copy system.img, flexrom.img, boot.img, recovery.img in /mnt/sdcard
Run (flash system.img last, it will lock down your tablet and you won't be able to flash the other .img files):
/data/data/com.interphaze.AcerRecoveryInstaller/files/itsmagic
dd if=/mnt/sdcard/flexrom.img of=/dev/block/mmcblk0p6
dd if=/mnt/sdcard/boot.img of=/dev/block/mmcblk0p2
dd if=/mnt/sdcard/recovery.img of=/dev/block/mmcblk0p1
dd if=/mnt/sdcard/system.img of=/dev/block/mmcblk0p3
I hope many people who just bought their tablet will come here and post the recovery files asap they got it...
I need to return with 01.139.04
If you use the Acer Recovery Tool from the market, would that do the same thing to take you back to stock?
link
Please, always run itsmagic BEFORE any dd operation.
@Bec07: Please swap the commands in your guide.
Restoring to factory defaults via ADB #2
In Step 7 where are the files located that I'm supposed to be copying? Can't find them?
They're supposed to be in /clockwork mod on your micro-sd car, provided you've don a backup. Or you can download them.
@haakuturi
No, I've tried even if you can download the update, it will fail installing. Tried with pre 3.1 updates.
@sc2k
Thanks, fixed. But don't the checksums change after we flash the partitions?
sanaell said:
I hope many people who just bought their tablet will come here and post the recovery files asap they got it...
I need to return with 01.139.04
Click to expand...
Click to collapse
Don't you remember your initial firmware?
Could you check it when close to an iconia stocking shop?
Great tutorial... Thanks
So, a question... If the Restore function in CWM doesn't restore properly, does it backup properly? That is, if I manually restore the files that CWM made when it backed up, will it restore properly or did the backup miss something?
I don't think it backs up properly either. At least not by all checksum standards.
My backup is CWM and I can't restore it with "dd" no matter what. Thor's works but I suspect it's not CWM.
Scrap that! CWM works just fine!
Bec07 said:
I don't think it backs up properly either. At least not by all checksum standards.
My backup is CWM and I can't restore it with "dd" no matter what. Thor's works but I suspect it's not CWM.
Click to expand...
Click to collapse
Well that's bloody annoying... :/
If I'd known that, I'd have manually backed up my stock ROM...
Tell me about it...
I think I flashed 15-20 times in the past 3 days. Haven't managed to make OTA work for 3.0.1 and now they're all down and I can't see 3.1 either...
can i do the "proper" backup from within the tablet with something like connectbot that has sdcard writing permissions without rooting?
Probably with terminal emulator and busybox too
Bec07 said:
Don't you remember your initial firmware?
Could you check it when close to an iconia stocking shop?
Click to expand...
Click to collapse
I think that was 1.016.01 but I do remember the first update I got was 1.139.04 pushed by OTA
THailand
I'm not aware of any problem with the backup/restore with CWM. I'll try to do some testing to see. The boot, recovery images from CWM should work with the dd command, but the system and data are compacted in a YAFFS2 format and cannot be used with the dd command.
I know the initial version did not run itsmagic automatically, so the checksum of boot would be off after a restore, but that was fixed.
Not sure if this helps but my a500 came with Acer_A500_1.105.01_EMEA_GEN3.
I live in the Netherlands and i have a backup which contains flexrom system and boot.img as well as the update.zip to get it to version Acer_A500_1.141.01_EMEA_GEN3
Download here.
Iconia Build Number
Mine is Acer_A500_1.141.01_EMA_GEN3, I bought the tablet on México.
sanaell said:
I think that was 1.016.01 but I do remember the first update I got was 1.139.04 pushed by OTA
THailand
Click to expand...
Click to collapse
Are you sure, it was 01 because I know mine was 01 and I'm from EU. Wasn't it 02?
spaanplaat said:
Not sure if this helps but my a500 came with Acer_A500_1.105.01_EMEA_GEN3.
.
Click to expand...
Click to collapse
Can you guys look on the back of your box, there should be a sticker "Operated Countries" that should list in what other countries the same firmware version is for.
I suspect EMEA should cover EU, Middle east and Asia, but I've got no idea why there are also separate versions
Thanks!

[Q] how to make .img files from existing tablet?

I have a complete setup for the Nexus 7, part of a product we are working on, that I need to easily clone on "virgin" tablets for production. The app requires a rooted OS.
I want to write an installation script using fastboot to unlock the bootloader, erase partitions, then flash them with .img files for each partition (kernel, system, cache, etc.).
How do I extract .img files from my "master" tablet? I have an understanding from some where that these are simple byte-for-byte dumps of the partition -- is this true? As such can I create a .img file by simple doing 'cat blkfile >file.img' where "blkfile" is the appropriate block device for the partition in question?
Or do I need to use 'dd'? Or something else?
I have searched and searched, and can't find an anwer. I've found other answers using some tools to create these files from a build on a PC, but nothing about creating them from an existing tablet.
Thanks in advance!
Use the dd command. You can use it both to dump and write a partition. It's how I install recovery programs like TWRP
Sent from my Nexus 7
You can use dd for the boot partition and recovery partition - they are raw binary blobs. (Don't use dd on other Android devices, esp. those that have MTD flash devices, though - it only works most of the time there)
If you want to use the same fastboot-based scenario that Google uses for factory image sets, then for the system & userdata image files you will need to find out about "sparse ext4 filesystem images"
If you took a raw block-device based dump of any of your tablet ext4 partitions, you could actually take those image files and mount them on any other linux machine (using a loopback mount procedure).
But you will find that if you attempt to do that with the Google factory ".img" files (for system & userdata partitions), they will not mount. It's not a simple matter of a offset superblock, either.
Since these are the formats that the stock recovery expects, I suppose you ought to use those formats if you want to do the "all at once all partitions" fastboot flashing if you plan on using the stock recovery.
Note that there is absolutely nothing that prevents you from unpacking whatever you want from whatever archive format you want - so long as the recovery's busybox supports the archive format correctly - you could use cpio or pax or tar archives for that matter. (The stock recovery's "toolbox" has very little functionality, so this comment applies to custom recoveries, which typically have more robust functionality in their busybox) You will be writing your own scripts to do those things though, typically either in one of two ways:
1.A mount target filesystem partition
1.B do a deep recursive remove at that mountpoint ( rm -rf * )
1.C unpack your archive into same mount point ( tar xf archive.tar, etc)
1.D unmount the mount point
OR
2.A unmount target partition and zero it out (dd if=/dev/zero, flash_erase, etc)
2.B recreate filesystem in partition (mke2fs -t ext4 etc)
2.C mount target filesystem
2.D unpack your archive into the same mount point (tar xf archive, pax, cpio, unyaffs2, etc)
2.E unmount that mountpoint
Even though this post is for the Samsung Galaxy S II, the same thing applies to the factory Nexus 7 images from Google:
http://forum.xda-developers.com/showthread.php?t=1081239
As that thread mentions, the simg2img and mkuserimg.sh programs are part of the Android project.
Here's a Nexus 7 thread where the contributor built the tools for both x86 linux and arm linux
Finally, I should note that because /system is typically mounted read-only, imaging /system from the live OS is no big deal. Trying to do the same thing with /data is an extremely dopey idea, however. Accurate backups are rarely made from live read-write filesystems.
cheers
Thank you so much for all the great information! I hit thanks for both of you.
The link to the nexus 7 thread is what I need... This is for my company, and I need a simple cloning solution that can be performed by a non-technical assembly person. The fastboot install procedure is about as simple as it gets.
Thanks again!

[Q] TWRP Use rm -fr instead of formatting?

Inside of the current team winn recovery settings there is an option to "Use rm -rf instead of formatting" sorry if this is a noob question but ive searched the web and can find the answer so I thought this would be a good place to ask...what does this option do and when should it be used?
rm -rf is remove (delete) files and directories and sub-directories recursively.
http://www.computerhope.com/unix/urm.htm
Format is well . . . format the partition, creating a new partition ready for new files to be written to it.
That I can't help you with is why one would be preferably over the other.
Sent from my Nexus 7 using xda premium
I have switched to using the "rm -rf" option exclusively on TWRP 2.4.1.0 rather than letting it automatically run "make_ext4fs" on my system partition prior to restoring a nandroid backup or installing a new ROM.
I did this after discovering that my /system (ext4) filesystem was frequently corrupted immediately after the formatting which occurs during the flashing of a new ROM. The only way I could get back to a clean (no e2fsck errors) filesystem was to perform a
Code:
fastboot format system
It's rather bizarre, and I am not sure why it happens. Yet it does. I think, but am not 100% sure that this problem persists even in 2.5.0.0.
I would recommend setting this option to use "rm -rf" rather than the default.
Weird Problem
bftb0 said:
I have switched to using the "rm -rf" option exclusively on TWRP 2.4.1.0 rather than letting it automatically run "make_ext4fs" on my system partition prior to restoring a nandroid backup or installing a new ROM.
I did this after discovering that my /system (ext4) filesystem was frequently corrupted immediately after the formatting which occurs during the flashing of a new ROM. The only way I could get back to a clean (no e2fsck errors) filesystem was to perform a
Code:
fastboot format system
It's rather bizarre, and I am not sure why it happens. Yet it does. I think, but am not 100% sure that this problem persists even in 2.5.0.0.
I would recommend setting this option to use "rm -rf" rather than the default.
Click to expand...
Click to collapse
Recently i encountered a problem. My phone started rebooting as soon as i booted into os and for arounf 45 seconds. Then i triend to factory wipe, system (twrp 2.6.3.2) and restarted system and to my surprise the same os and same problem persists. Whatever action i take in twrp and its not affecting the os. 4.2.2 slimkat. I'm trying everything i can and no luck. Can someone please help?
---------- Post added at 11:05 PM ---------- Previous post was at 10:59 PM ----------
bftb0 said:
I have switched to using the "rm -rf" option exclusively on TWRP 2.4.1.0 rather than letting it automatically run "make_ext4fs" on my system partition prior to restoring a nandroid backup or installing a new ROM.
I did this after discovering that my /system (ext4) filesystem was frequently corrupted immediately after the formatting which occurs during the flashing of a new ROM. The only way I could get back to a clean (no e2fsck errors) filesystem was to perform a
Code:
fastboot format system
It's rather bizarre, and I am not sure why it happens. Yet it does. I think, but am not 100% sure that this problem persists even in 2.5.0.0.
I would recommend setting this option to use "rm -rf" rather than the default.
Click to expand...
Click to collapse
Even after switching to rm -rf, i formatted data and everything (atleast i think i did), and when i clicked restart system, it said no os installed and i booted anyway, guess what? that same os same problem same apps. Nothing is happening. Can you elaborate how to do fastboot format system?
harshagp said:
Even after switching to rm -rf, i formatted data and everything (atleast i think i did), and when i clicked restart system, it said no os installed and i booted anyway, guess what? that same os same problem same apps. Nothing is happening. Can you elaborate how to do fastboot format system?
Click to expand...
Click to collapse
Uhhhh ... before I write yet another novel...
- Do you have a grouper (WiFi only) or tilapia (WiFi+Cell) 2012 Nexus 7?
- What version of bootloader is on your device?
- Do you have fastboot working between your PC and the tablet?
(If fastboot is properly set up, if you put the N7 in bootloader mode, attach it to the PC via USB, and type "fastboot devices" at a command prompt on the PC, it will print out the device ID of your N7.)
Note that when you "wipe" with "rm -rf", the filesystem needs to be healthy. Changing to this method of wiping will not fix a corrupted filesystem. I made the switch after re-creating a healthy filesystem to avoid corruption problems. (That was many versions of TWRP ago, though)
Apart from the quoted link I can't find any web page that shows the syntax of the rm command allowing recursive deletion without a directory name.
This page has a nice warning about rm -rf * http://www.cyberciti.biz/faq/howto-linux-unix-delete-remove-file/
Problem
bftb0 said:
Uhhhh ... before I write yet another novel...
- Do you have a grouper (WiFi only) or tilapia (WiFi+Cell) 2012 Nexus 7?
- What version of bootloader is on your device?
- Do you have fastboot working between your PC and the tablet?
(If fastboot is properly set up, if you put the N7 in bootloader mode, attach it to the PC via USB, and type "fastboot devices" at a command prompt on the PC, it will print out the device ID of your N7.)
Note that when you "wipe" with "rm -rf", the filesystem needs to be healthy. Changing to this method of wiping will not fix a corrupted filesystem. I made the switch after re-creating a healthy filesystem to avoid corruption problems. (That was many versions of TWRP ago, though)
Click to expand...
Click to collapse
Sorry, i didn't notice it before. I have galaxy nexus maguro gsm. Bootloader version PRIMELA03. I think Everything is corrupt, but i can access bootloader, recovery, even os for a few seconds. I tried that command, it says done but no change. What do i need to do to start afresh, get my phone working properly!
@harshagp
I have no experience with that device (you are in the wrong forum), so anything I might say is pure speculation. You should ask your question in the correct forum.

[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.

Categories

Resources