Backup+ Lets You Backup Your App Data on Android Lollipop

Even though Android 5.0 Lollipop hasn’t yet seen its official release, quite … more

TechTalk Compiles All the Android News You Need in One App

If you’re as obsessed with mobile devices as the vast majority of our forum … more

Android App Review: Google Inbox to Improve Your Life – XDA TV

Recently, Google+ exploded with the announcement of Google Inbox, as … more

Damp the LG G3 Thermal Throttling

As our mobile devices grow thinner and more powerfulwith each passing generation, it’s inevitable … more
Post Reply

What can I wipe to be "squeaky clean"?

OP PMikeP

10th April 2014, 07:35 PM   |  #1  
OP Senior Member
Thanks Meter: 20
 
143 posts
Join Date:Joined: Jul 2013
Question: I want to wipe everything from my HD+ and start completely fresh. What is safe to wipe and how do I do it in TWPR or CWM? A "factory reset" isn't good enough. It leaves old data around. But I've read too many stories about bricking a device by formatting /data using CWM.

Background: I've been running CM 10.2.1 for a few weeks now. Given what Jon Lee posted about Google and security, I thought I'd try a clean install of CM 10.2.1 without installing gapps, just to see what that's like. (And what services don't run.)

So I did the usual "factory reset" from TWRP and reinstalled CM 10.2.1. To my surprise, when I booted, the latest version of Google Play was still showing on the launcher!

I had used Link2SD to integrate the latest version of Google Play with the OEM system app. So apparently, that this was not wiped. And of course, internal media data is not wiped (not by TWRP, anyway) in a factory reset. But I thought /system was.

The TWRP FAQ has a page about wiping. It says
Quote:

Depending on your device and its configuration, you may have options for wiping internal storage, external storage, sd-ext, android_secure, and/or an option for formatting data. There's almost no reason that you would ever need to use these items. These options are there for convenience. For instance, if you're getting ready to sell your device, then it's a good idea to wipe everything on the device so that the new owner doesn't get your private data.

But they don't tell you which to select.

TWRP makes it confusing by offering to 1) wipe data, 2) internal storage, 3) SDcard or 4) SDcard data in Advanced Wipe. Which is it for wiping your media stuff?

From what I've read, "internal storage" should be the same as "SDcard." So why both? And how is "SDcard data" distinct from those two?

To make matters worse, in the Nook I thought there was an additional element of confusion because the Nook doesn't call the internal SDcard memory what everyone else calls it.

So let's say I am selling my HD+. Would I select all of the above and still be able to install a ROM clean?

Or would I brick?

I know that on a desk top computer if you want to start bare metal, you format the hard drive, wiping everything, and install onto that. But judging from what Succulent wrote in his blog about recovering from an EMMC crash, you can't start totally clean with Android. Apparently, Android needs some preexisting files on the "drive" in order to install. (Like the devconf folder, which contains your MAC and your serial number.)

[Am I understanding him correctly? He was talking about recovering from a tablet wrecked by the EMMC brick bug. Perhaps no /data partition at all, as he offers a script to rebuild/expand that partition?]

I have read stories of people bricking their tablets by formatting /data from CWM. I don't understand why that should brick it. Why couldn't you boot into recovery? How can the /data partition affect the /recovery partition?

So - has anybody done a complete wipe on their Nook HD+? Please explain, for those of us who are obsessive compulsive, exactly how you do it.
10th April 2014, 08:27 PM   |  #2  
leapinlar's Avatar
Recognized Contributor
Thanks Meter: 3,657
 
8,344 posts
Join Date:Joined: Oct 2006
Donate to Me
More
To wipe your device with CWM go to mounts and storage and format /system, /cache and 'data and datamedia'. A normal factory reset only wipes /cache and the portion of /data that does not hold your media files. It does not wipe /system. Usually the ROM install does that, but the install script has a feature that saves gapps if you are installing the same version of the ROM (eg, CM11 over CM11). So to get rid of everything, including media files and gapps, do what I said in the first sentence. Of course after formatting /system you must put a ROM back on it for it to boot.

And it is not /data formatting that is the brick problem, it is formatting the /bootdata partition. They are different things. Don't format that.

And succulent was talking about /rom partition which is different yet that needs to be left alone. That is where the devconf folder is. It contains things you need to keep.

If you want to understand the partition structure of the HD/HD+ go to my HD/HD+ Tips thread linked in my signature and read item 16.

And please read my PM to you about removing those assert removal instructions from my dummies thread.

Sent from my BN NookHD+ using XDA Premium HD app
Last edited by leapinlar; 10th April 2014 at 08:45 PM.
11th April 2014, 12:28 AM   |  #3  
OP Senior Member
Thanks Meter: 20
 
143 posts
Join Date:Joined: Jul 2013
Best Answer
Quote:
Originally Posted by leapinlar

To wipe your device with CWM go to mounts and storage and format /system, /cache and 'data and datamedia'. A normal factory reset only wipes /cache and the portion of /data that does not hold your media files. It does not wipe /system. Usually the ROM install does that, but the install script has a feature that saves gapps if you are installing the same version of the ROM (eg, CM11 over CM11). So to get rid of everything, including media files and gapps, do what I said in the first sentence. Of course after formatting /system you must put a ROM back on it for it to boot.

Thanks for the thorough answer. And explanations. I always find it easier to remember something when I understand the reason for it. So I didn't know before that the install scripts keep gapps.(But that's what I was deducing.)

I know to stay away from /rom and /boot. Hopefully, TWRP would not let one format those in their numerous choices for Advanced Wipe.

From what you've written before in one of your other threads, I know that you're not a fan of TWRP. So I still don't know what the similar commands are in TWRP for a total clean. But for now I can delete /system in TWRP and do the reinstall without gapps. When I'm ready for a total wipe, I'll revert to CWM.
11th April 2014, 01:44 AM   |  #4  
OP Senior Member
Thanks Meter: 20
 
143 posts
Join Date:Joined: Jul 2013
Can we trade /factory for /swap?
Quote:
Originally Posted by leapinlar

If you want to understand the partition structure of the HD/HD+ go to my HD/HD+ Tips thread linked in my signature and read item 16.

Read it. (And made an image of my factory partition. And then moved it to my extSDcard for safer keeping.)

So, the Nook HD+ partition structure is a bit different from the stock Android partition stuff I had found on the web.

So, for those of us running a custom ROM, I presume the factory image doesn't do us much good anymore. Will the HD+ automagically restore after 8 failed boots?

If not (or even if it will), is there a way to take that 448MB in the /factory image partition and use them for, say, a /swap partition instead? I think an xda developer is doing something like this for the Galaxy Tab 2, where he's using some memory that Samsung uses for animations and uses them for ZRam instead. Since I've backed up the factory image, and since I already have your factory 2.0.2 ROM, I really don't need the image any more. Seems like wasted space.
11th April 2014, 01:57 AM   |  #5  
leapinlar's Avatar
Recognized Contributor
Thanks Meter: 3,657
 
8,344 posts
Join Date:Joined: Oct 2006
Donate to Me
More
Quote:
Originally Posted by PMikeP

Read it. (And made an image of my factory partition. And then moved it to my extSDcard for safer keeping.)

So, the Nook HD+ partition structure is a bit different from the stock Android partition stuff I had found on the web.

So, for those of us running a custom ROM, I presume the factory image doesn't do us much good anymore. Will the HD+ automagically restore after 8 failed boots?

If not (or even if it will), is there a way to take that 448MB in the /factory image partition and use them for, say, a /swap partition instead? I think an xda developer is doing something like this for the Galaxy Tab 2, where he's using some memory that Samsung uses for animations and uses them for ZRam instead. Since I've backed up the factory image, and since I already have your factory 2.0.2 ROM, I really don't need the image any more. Seems like wasted space.

You can play with the partitions all you want. Just don't ask me to help you fix it. You don't seem to heed my warnings anyway.

But other users be warned that factory partition has vital backup information there (it has more than just the factory zip there) and if you lose it, your device is as good as a paperweight. That is why I recommended all users back that partition up. Not for the factory zip, but for the backup files there. The device has other safety backup routines other than just restoring the stock ROM. An example is, I told you and succulent told you that devconf has vital files all ROMs need in /rom. Well, /factory has a backup of /rom there and if the device discovers /rom is messed up, it tries to repair itself. No /factory and no repair. Paperweight!

Sent from my BN NookHD+ using XDA Premium HD app
11th April 2014, 03:16 AM   |  #6  
OP Senior Member
Thanks Meter: 20
 
143 posts
Join Date:Joined: Jul 2013
Quote:
Originally Posted by leapinlar

You can play with the partitions all you want. Just don't ask me to help you fix it. You don't seem to heed my warnings anyway.

But other users be warned that factory partition has vital backup information there (it has more than just the factory zip there) and if you lose it, your device is as good as a paperweight. That is why I recommended all users back that partition up. Not for the factory zip, but for the backup files there. The device has other safety backup routines other than just restoring the stock ROM. An example is, I told you and succulent told you that devconf has vital files all ROMs need in /rom. Well, /factory has a backup of /rom there and if the device discovers /rom is messed up, it tries to repair itself. No /factory and no repair. Paperweight!

Thanks for the quick response.

I am sorry that I seem to have gotten on your bad side. I did what you asked and moved my previous comment out of your thread. And I warned everyone that you don't think it's a good procedure.

And I did heed your warning. I made a backup of the factory partition and even moved the copy to my ext SD card for safer keeping. Especially since we were talking about wiping the sdcard. (Unless you're trying to say that storing the /factory img on the ext SD card is a bad idea because I won't be able to get it back to the internal SDcard if/when I need it.)

As for the devconf files, they're in the /rom partition. I don't understand how using the /factory partition for a /swap is going to ruin the /rom partition.

From what you're saying, the HD+ still has a "safety routine" built in, even when running custom recovery and a custom ROM? Does that mean that its safety routine is hard coded somewhere? Or part of the /rom code itself? How does the HD+ know to look in /factory when its running a non-factory OS? Does CM tell it to do that?

You're the expert. I'm just guessing here. If the /factory partition were used as a /swap, and if the system turned into a paperweight because it needed the /factory image later someday, then couldn't one go into recovery and copy the /factory partition back over, per your instructions? As a minimum, couldn't one use succulent's emmc recovery procedure to get back to factory status?

I'd be willing to trade that off for more performance.

How does one know when the HD+ goes into this safety routine? Does it tell you? Or is it transparent to the user? It would be interesting to know how often that happens. Does the safety routine then repair the /rom partition once booted if it detects a problem in /rom?
Last edited by PMikeP; 11th April 2014 at 03:33 AM.
11th April 2014, 04:25 AM   |  #7  
leapinlar's Avatar
Recognized Contributor
Thanks Meter: 3,657
 
8,344 posts
Join Date:Joined: Oct 2006
Donate to Me
More
Quote:
Originally Posted by PMikeP

Thanks for the quick response.

I am sorry that I seem to have gotten on your bad side. I did what you asked and moved my previous comment out of your thread. And I warned everyone that you don't think it's a good procedure.

And I did heed your warning. I made a backup of the factory partition and even moved the copy to my ext SD card for safer keeping. Especially since we were talking about wiping the sdcard. (Unless you're trying to say that storing the /factory img on the ext SD card is a bad idea because I won't be able to get it back to the internal SDcard if/when I need it.)

As for the devconf files, they're in the /rom partition. I don't understand how using the /factory partition for a /swap is going to ruin the /rom partition.

From what you're saying, the HD+ still has a "safety routine" built in, even when running custom recovery and a custom ROM? Does that mean that its safety routine is hard coded somewhere? Or part of the /rom code itself? How does the HD+ know to look in /factory when its running a non-factory OS? Does CM tell it to do that?

You're the expert. I'm just guessing here. If the /factory partition were used as a /swap, and if the system turned into a paperweight because it needed the /factory image later someday, then couldn't one go into recovery and copy the /factory partition back over, per your instructions? As a minimum, couldn't one use succulent's emmc recovery procedure to get back to factory status?

I'd be willing to trade that off for more performance.

How does one know when the HD+ goes into this safety routine? Does it tell you? Or is it transparent to the user? It would be interesting to know how often that happens. Does the safety routine then repair the /rom partition once booted if it detects a problem in /rom?

If you want to know more how the automatic repairs work, go to my Nook Color Tips thread linked in my signature and read item A12. The partition numbers are different but the repair process works exactly the same way on the HD/HD+, including the need for stock recovery to be installed. There are two ways to get your device automatically repaired if you have CM and CWM/TWRP recovery installed on internal memory. One is to flash stock recovery back per my item 5 in my HD/HD+ CWM thread, and the second is to flash the plain stock zip from item 6 there. That puts stock recovery back. Then it can repair /rom if need be.

And there is no real drawback of removing the factory.zip file from /factory partition since it is basically the same as a plain stock zip I have published. But the other files there are vital and should not be touched.

You got on my bad side by publishing that assert removal procedure on the help forum after I asked you to remove it from my thread. I don't want to make it easy for any user to do that as I consider it dangerous for noobs to do. See my response to your posting of that procedure.


Sent from my BN NookHD+ using XDA Premium HD app
12th April 2014, 12:41 AM   |  #8  
OP Senior Member
Thanks Meter: 20
 
143 posts
Join Date:Joined: Jul 2013
Quote:
Originally Posted by leapinlar

You got on my bad side by publishing that assert removal procedure on the help forum after I asked you to remove it from my thread. I don't want to make it easy for any user to do that as I consider it dangerous for noobs to do.

Thanks for letting me know. Later last night, I saw a post of yours on the Nook Color (I think it was) where you thought that anyone who would remove the updater-script safety check was an "idiot."

Okay, so I'm an idiot. But I am free to be an idiot and start my own thread in the Help forum, right? Just as you are free to respond there as you did. That's what makes the forum go 'round.
Last edited by PMikeP; 12th April 2014 at 07:12 PM. Reason: Changed "right" to "be free"
12th April 2014, 02:45 AM   |  #9  
leapinlar's Avatar
Recognized Contributor
Thanks Meter: 3,657
 
8,344 posts
Join Date:Joined: Oct 2006
Donate to Me
More
Quote:
Originally Posted by PMikeP

Thanks for letting me know. Later last night, I saw a post of yours on the Nook Color (I think it was) where you thought that anyone who would remove the updater-script safety check was an "idiot."

Okay, so I'm an idiot. But it's my right to be an idiot and my right to start my own thread in the Help forum, right? Just as it's your right to respond there as you did. That's what makes the forum go 'round.

As I recall, I did not say the person that removed the assert was an idiot, it was the person who recommended it that I said was an idiot. The user was a noob and knew no better. He was trying to flash a Nook Tablet ROM to his Nook Color and the assert kept failing (doing what it was designed to do). The idiot was the one that told him just to remove the assert. He did that and bricked his Nook Color.

Sent from my BN NookHD+ using XDA Premium HD app
Last edited by leapinlar; 12th April 2014 at 03:23 AM.

Post Reply Subscribe to Thread

Tags
wipe internal sd card
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Nook HD, HD+ Q&A, Help & Troubleshooting by ThreadRank