yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
Your answer is encouraging for the following reason:

If an encryption method was device-wide and transparent to the OS (for instance if the decryption is performed by the eMMC controller), then nothing would be able to boot at all without entering a key - and yet it appears that the prompt (for the password) is being produced by the regular OS boot. At a minimum, that suggests that that the boot partition (and possibly the system partition, too) are not involved in this.

That would be consistent with the Android usage model where all private data is stored only in the /data partition - there's nothing that needs to be kept private in any of the other typical partitions (recovery, boot, system, etc). I believe the eMMC controller does support encryption, so it is possible that when it is done on purpose, only /data is affected.

Well, I don't want to get your hopes up - I think there was only one report where a user had been able to correct the problem, but in that case the appearance of the password dialog was explicitly tied to some flashing operations; whereas in your case the problem cropped up spontaneously. (I infer that you might have rebooted the unit successfully a few times or more without troubles subsequent to the very last flashing operation you performed but prior to the trouble starting). That sounds a bit more like development of a spontaneous hardware failure. Also, the lock/unlock business sounds like something out of the ordinary.

Anyway, without flashing anything ( & if the N7 really is unlocked) you should be able to soft-boot a recovery with the N7 in boot loader mode, e.g.

fastboot boot name-of-recovery-image.img

Try booting the 4.2.2 stock recovery that way, going in to its' menu (Pwr+Vol-Up), and performing a factory reset.

Then, boot a custom recovery the same way and see if you can successfully mount both /cache and /data

I would expect the mount of data to fail if it is actually encrypted...

---------- Post added at 09:45 AM ---------- Previous post was at 09:33 AM ----------

Uh-Oh.

In the custom recovery, run the command "cat /proc/partitions"

you should see this (block counts might be different)

# cat /proc/partitions

major minor #blocks name

179 0 31178752 mmcblk0

179 1 12288 mmcblk0p1

179 2 8192 mmcblk0p2

179 3 665600 mmcblk0p3

179 4 453632 mmcblk0p4

179 5 512 mmcblk0p5

179 6 10240 mmcblk0p6

179 7 5120 mmcblk0p7

179 8 512 mmcblk0p8

179 9 30014464 mmcblk0p9

179 32 2048 mmcblk0boot1

179 16 2048 mmcblk0boot0

#

---------- Post added at 09:48 AM ---------- Previous post was at 09:45 AM ----------

If you follow up the erase command with a format command, any differences?
[Nexus 7 Q&A, Help & Troubleshooting] Abhitha:
I ran the command 'cat /proc/partitions' via TWRP, and I got a very similar output to the one you posted (save for different block sizes.)

Next, I tried following up the erase command with a format command, and it 'succeeded' with the outputs shown in the attachment.

However, the decrypt message is still present.
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
Well, it's a bit of a long shot, but try the same (fastboot) erase+format steps but on the cache partition.

The fact that TWRP also makes some complaints is a little interesting as it normally does not initially mount either /system or /data iirc. (It *does* initially mount /cache though)

The fact that TWRP complains about something might provide a lead or two - it should be easier to look for the triggering condition in TWRP's sources than trying to do the same in a full Android JB source tree. I can have a look later tonight. What is the exact text which appears in the TWRP prompt (including capitalization etc)?

In the meantime, could you boot twrp and then capture the kernel log, and post it up on pastebin?

C:\foo> adb shell cat /proc/kmsg > fileforpastebin.txt

^C (it will hang, give it a couple seconds and then Ctrl-C)
[Nexus 7 Q&A, Help & Troubleshooting] Abhitha:
I tried using the erase + format command on the cache- no cigar.

I booted into TWRP and ran the command you instructed, however the command returned 'device not found'.

I then ran adb devices, and sure enough, the device isnt showing up.

Am I doing something wrong? :(

Thanks in advance :good:
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
I doubt you are doing anything wrong ... should I assume that you were using adb with the recovery in the past... or perhaps only with the normal Android OS booted?

At a minimum though, you should at least see the n7 in your device manager - perhaps as an unknown device?

(Kind of a long explanation, but cwm & twrp use a different USB hardware VID/PID pair for their ADB connection than what is used during the regular OS boot for adb. And the Asus and Google drivers do not include this VID/PID pair in their .inf file in their installer package for their USB driver. So by default, the Google or Asus USB driver won't work for CWM/TWRP adb sessions unless you hack the driver .inf file *before* that driver is installed for the first time. Conversely, the XDA "Universal Naked Driver" doesn't have VID/PID pairs for ADB mode for the N7 booted normally. You can see why this is an endless source of confusion for newbs; but the short strokes of it is that folks who don't hand-edit .inf files end up installing TWO drivers for ADB - one for use with the custom recovery, and one for the regular OS)

Anyway, I'm gonna poke around in some source code for awhile, mostly because I'm interested in knowing where device encryption comes into play, but I think the chances are high that you have a hardware related issue.

Don't get your hopes up... & anybody else feel free to jump in.
[Nexus 7 Q&A, Help & Troubleshooting] dsachdeva:
OK this may not help you as such but may provide an idea on what direction you may pursue.

I ended up in similar position but on s3 when i had 4.2 temasek ROM stopped the boot asking for password where nothing worked, i also had custom recovery.

I tried dozens of things and the only thing that worked was this.

S3 in download mode, used Odin to flash stock recovery which allowed me to flash stock rom which then allowed me to wipe everything and i was able to boot s3

I know Odin is for Samsung devices only but you may try equivalent steps.

Let me know if this helped
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
http://source.android.com/tech/encryption/android_crypto_implementation.html

Does it give anybody some ideas?

Apparently, failure to mount /data is used as *hint* that a partition is encrypted. (Obviously, an unencrypted partition with other problems (e.g. superblock data corruption or no mke2fs filesystem formatting) can also fail to mount, so I suppose it is possible that unexpected conditions might mess up that interpretation.

@Abhitha

I know you tried before, but did you soft-boot ("fastboot boot recovery.img") the stock 4.2.2 recovery, enter it's menu (Pwr+Vol-Up), and then run the factory reset procedure?

The docs above seem to suggest that a factory reset should clear up the problem.
[Nexus 7 Q&A, Help & Troubleshooting] GedBlake:
Hi, Abhitha...

I don't have the technical knowledge of bftb0, but I thought I'd have a poke around and see what I could find.

What's intriguing about this, is in your second post, mention is made of the luminescent X bootanimation appearing just before the request for the encryption key... Normally, bootanimation.zip resides in /system/media... which implies the system partition is being loaded. So it's just data that's the problem.

--------

Anyway... doing some Googling around, I thought I'd see if I could find anything from Jean-Baptiste Queru, one of the chief Google technical guys... and found these.

The first one specifically refers to the N7 and encryption...

https://groups.google.com/forum/#!topic/android-building/Z6aUmEH9P4U

https://groups.google.com/forum/#!topic/android-building/H9WfXZy_1kI

Although the second one seems less relevant, it still might give you some clues. This bit is interesting...

"Yup, with encryption support in ICS, Android has become a lot more picky about having all the filesystems initialized with valid data, and mistakenly assumes that anything that's not zero or valid is encrypted, refusing to go any further. In Gingerbread and before, anything that wasn't valid was expected to be invalid, and Android would just re-initialize it, regardless of whether it was zero or not. You're lucky you didn't have to work with Honeycomb, where zeros were considered encrypted."

- Jean-Baptiste M. "JBQ' Queru - Software Engineer, Google AOSP

Although to be honest, I thought encryption had only been recently introduced with JellyBean 4.2.

--------

Apologies if this doesn't help much... just thought I'd give my couple of cents:).

Hope you get it sorted soon.

Rgrds,

Ged.
[Nexus 7 Q&A, Help & Troubleshooting] Abhitha:
Hi guys, I don't have my tablet at work today so I can't poke around with it till I get home; in the mean time keep your ideas coming, I will try them all when I go home tonight. :fingers-crossed:

In the mean time, here's thanks to all the people who spent time trying to help me so far! :)

[EDIT]: Does anyone have an idea as to why the 'fastboot oem lock' isn't actually locking? I can take the easy way out of this mess if I can get rid of the 'unlocked' symbol out of the Google splash screen and the bootloader, by RMAing it to the Play Store. Considering the amount of trouble this thing is giving me, had it not been unlocked, the play store ppl were ready to RMA it in the first place :(
[Nexus 7 Q&A, Help & Troubleshooting] GedBlake:
Uhh... that's weird...

Just to confirm...you do definitely have a fastboot connection...

fastboot devices

Should give you a serial number.... to confirm such a connection...

As an aside...

fastboot oem lock

...followed by...

fastboot oem unlock

is an easy way of doing a factory reset... which of course would be your ideal.

-----

I know that when I fastboot flash factory stock, I sometimes have endless problems (particularly with 'system.img') and usually resolved by changing to a different USB port on my laptop... (I have three such ports). And sometimes a different USB cable.

I know it doesn't seem to make much rational sense... but sometimes different USB cables/USB ports can make the difference.

Might be worth a try.

Rgrds,

Ged.
[Nexus 7 Q&A, Help & Troubleshooting] Abhitha:
I tried this just now, and ALL the prompts say that they succeed, but nothing changes. For the record, yes, the device does show up under the serial numbers. When I run fastboot oem lock , the Command prompt tells me everything succeeded, but ntohing changes. See the attached picture.

Also, I booted the nexus off of clockworkmod recovery the way someone above suggested, and I ran a factory reset. The second picture shows that outcome.
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
Note the error involving /data. That is consistent with what was said previously (mount failures conflate with the possibility of encryption). As to why it is happening, though, I haven't a clue - especially because the bootloader "fastboot format userdata" operation performed previously seemed successful. Then again, the bootloader is claiming success elsewhere inappropriately...

As I said previously, the fact that your trouble appeared spontaneously (rather than immediately following a flashing operation) suggests a hardware failure of some sort. So I don't know how optimistic you should be about any of these ritual ablutions.

Can you post up a kernel boot log (output of the "dmesg" command) from any custom recovery (either cwm or twrp), and put it up in a pastebin?

If it were my tablet, the only other things I might try - desperation moves really - would be:

- manual (userdata) partition clearing via dd if=/dev/zero... & re-creation of ext4 filesystem (mke2fs) from recovery command shell; follow up with read checks & mount attempts...

- reinstall current bootloader?

- flash older bootloaders and use them for erasure/formatting?

grasping at straws here... frankly I think you have a hardware problem with your eMMC flash memory.

good luck
[Nexus 7 Q&A, Help & Troubleshooting] Abhitha:
Again thank you for spending the time to advise with all this stuff :)

Today I'm going to try working with the bootloader (trying older bootloaders, etc), and I will read into how to manually clean the partition.

When I get the time I will also try to figure out how to do the kernal log you requested today.

Thanks for all the support. :good:
[Nexus 7 Q&A, Help & Troubleshooting] Abhitha:
Hi all,

I got lost trying to figure out how to forcefully rebuild the partitions, so here I am back. :)

At this point, do you guys have advice for selling off this N7 so I could atleast recover a part of my investment? The tablet is physically perfect (I've had a screen protector on since day 1), and the screen/ touch screen is obv mint. Or could I take this thing apart and do something else with it?

Any how, I ran the flash-all script from 4.1.2 today, and the results are attached.

Thanks for trying to help me this far eh. I appreciate it :)

Guess I'll try to recover what i can by selling this off and just wait for the next N7. :p
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
It's completely up to you, but if it were me I would give Asus/Google yet another telephone call. The worst that can happen is that they will say they won't help you.

Presumably they have a record of prior conversations tied to your serial number, but at a minimum you will probably end up talking to a different person... maybe they'll be in a better mood than the last person you talked to.

Rather than explain to them the whole tortured story, you might want to emphasize the fact that the problem developed spontaneously rather than associated with any action that you took related to flashing, and you sincerely believe you have a hardware flaw that would have occurred even without an unlocked boot loader.
[Nexus 7 Q&A, Help & Troubleshooting] rodmc123:
hey, i have galaxy nexus and i have the exact same issue!! after installing 4.2.2 , i let the phone charging and the next day the phone was asking for data decrypt password, i tried everything, odin, fastboot flash, etc but nothing changes, after y reboot everything remains the same it was before the changes.
[Nexus 7 Q&A, Help & Troubleshooting] Abhitha:
It sounds like you have the same issue as me - the flash memory is gone bad.. :(
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
What did you end up doing with it? I would think that - given the prices Asus wants for a digitizer/lcd replacement, a "for parts" listing on eBay should get you more than $100 us.

I think someone here posted a link to somebody selling motherboards - don't remember where tho. I think that (relatively speaking) the mobo is worth less than the display.
[Nexus 7 Q&A, Help & Troubleshooting] Abhitha:
Hi bftb0!

I have yet to do 'anything' with it - been doing research for a mobo myself like you said, and I posted another thread asking if there's a way to 'guarantee' a returnable N7 (i.e rig it such that it won't turn on at all..), but I haven't gotten any responses so far. I'm going to put up an ad for the N7 on ebay as parts, and try to sell it off that way and recoup the costs, or keep exploring ways to make the thing returnable.
[Nexus 7 Q&A, Help & Troubleshooting] ausamnco:
xolo a700

I have faced the same problem in xolo a700. How would i go on about to fix this. I don't want to do a factory reset as I have loads of data I don't want to lose. Thank you
[Nexus 7 Q&A, Help & Troubleshooting] SW686:
Have you tried booting into CWM recovery and manually mounting (and/or formatting) the userdata partition from the Linux shell? e.g.

mount -t ext4 /dev/block/mmcblk0p9 /data/media

Also try with the full set of mount options:

mount -t ext4 -o rw,nosuid,nodev,noatime,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered,discard /dev/block/mmcblk0p9 /data/media

Note that mmcblk0p9 is the "UDA" partition for Nexus 7 (grouper); other devices are likely to number the partitions differently.

To try reformatting the partition and wipe all data, then see if it mounts:

mke2fs -j /dev/mmcblk0p9
mount -t ext4 /dev/block/mmcblk0p9 /data/media

It would be instructive to see what error messages pop up when running these operations by hand. Also check dmesg and see if any mmc media errors are reported.

If you really do have bad spots on the eMMC device, they "should" be getting remapped to good blocks as they are detected. But if you're really desperate, you could try changing the partition boundaries to see if it improves the situation.
[Nexus 7 Q&A, Help & Troubleshooting] Abhitha:
Hi Rhian,

Sorry I've been really busy with school and I just got around to testing your method, the attached image shows what I got.

I have yet to try what the person above you told me to do..
[Nexus 7 Q&A, Help & Troubleshooting] Rhian:
I'm sorry to hear that it didn't help you. It was quite a scare to run into a suddenly encrypted storage.

Based on your screenshot it failed at writing the bootloader, so it looks like it's semi-locked.

I don't know how to fix that (yet).
[Nexus 7 Q&A, Help & Troubleshooting] tbonezx11:
Nooooo ....

This is NOT what I wanted to read ... UGH, I woke up to my N7 32GB asking me for a password with the same screen. I think I let the battery get way down and it shut itself off (heard that can cause data corruption - and based on what I've read, that can "fool" it to think it's encrypted).

I'm unlocked, rooted, running stock 4.1.2 - never went to 4.2 because I like the 214 dpi...and had installed beats so it wouldn't auto-upgrade anyway. TWRP recovery

Oddly the power/vol up doesn't want to take it into recovery...nothing happens. I don't have all the Android stuff on my computer anymore (switched systems) ... Looks like I've got to do that to try most of these fixes.

I'll be anxious to hear if someone finds a way to do this without wiping data...I really don't want to lose all my data. UGH.

[EDIT/UPDATE] - Now when I do power/vol up, it just goes back to that same screen after the nexus bootsplash.
[Nexus 7 Q&A, Help & Troubleshooting] tbonezx11:
[EDIT] WHEW .... Thank goodness...fixed. Finally got into Recovery. Wiped the Data, then Wiped the Cache & for good measure then did a factory reset.

Almost all is well....after 12 hours, it's upgraded to 4.2.1 (Build JOP40D) but won't go to 4.2.2 -> LEAST of my worries considering I was on 4.1.2 previously. My problem is closed.

Alright, I've had some time to play & I'm really at a loss...I can't GET to a fastboot or bootloader mode. I can power it off...take a screenshot (Vol down & Power) and that's it. If I hold power & Vol Up, the screen turns off, but that's IT!

My laptop (Win8) and my desktop neither recognize the device connected via USB, any port ...

What are my options here guys?
[Nexus 7 Q&A, Help & Troubleshooting] Usman Mehmood:
decryption code error on nexus s phone

brethren, I am sorry to drop in on the discussion like this but I don’t know where to get an answer from. My Nexus S (phone) has had a problem recently, it just keeps on turning on and off and mentions the “type password to decrypt storage”, if it :remains on the decryption code requirement pops up, every 4th of 5th time the phone gets restarted. I tried to factory reset the phone through the steps mentioned in the blog here:

1. Power off

2. Hold Volume + , volume - and power

You should get a green android image with the body opened with "Start" on the screen

3. Press Down till you get to recovery mode

4. Press power

Phone will reboot. You will then get same image of android (smaller) with red warning triangle

5. Wait a minute or two and then press volume + and power (not sure exactly what I did for this maybe it's just waiting)

6. Use volume down to select wipe data/factory reset and hit power

Select Yes - delete all user data and hit power

7. Once done select reboot system now and hit power

You are now back to zero and can start again

But it does not work. I will be obliged if someone helps me out

Thanks
[Nexus 7 Q&A, Help & Troubleshooting] RedVR6:
N7 2012 Same Issue as OP

Figured I post here due to exhaustive research and frustration last night and this morning on this password thing. I have a 2012 N7 that I picked up some time ago (spring?)...Went to use it last night and found it would not turn on....after a while it powered up and left me at this dreaded password screen. :silly:

Just curious if anyone has seen this on the latest 4.3 (jwr66y)? Am guessing that this device is now an official paperweight after trying every possible troubleshooting step in this and many other threads. Boo. As I really enjoyed this tablet.
[Nexus 7 Q&A, Help & Troubleshooting] Rhian:
I didn't update my Nexus 7 to 4.3, I did try it on my Nexus 4 and ran into the dreaded password bug.

I ended up formatting the userdata through fastboot, flashed 4.2.2, went into the factory recovery, did a factory reset (not through the OS), then did the OTA to 4.3, that worked for me.

I'm back on 4.2.2 since titanium backup does not restore anything for me.
[Nexus 7 Q&A, Help & Troubleshooting] firikit:
Thans

i did this all and velldone. Thankyou very much my friend
[Nexus 7 Q&A, Help & Troubleshooting] Usman Mehmood:
not a problem my friend:cowboy:
[Nexus 7 Q&A, Help & Troubleshooting] l33ch0r:
So I just noticed that CM11 is available and decided to hook my Mom's Nexus 7 up with CM11.

Apparently she has not been using it for a couple of days so the battery was empty. After I finally got enough power to boot it I get confronted by a ugly request for password in order to "decrypt storage" (or whatever it was, it does not show me anymore, only tells me to "try again"). I'll attach a screenshot.

It has been running on CM10.2 and in order to flash 11 I wanted to backup apps etc pp. The Nexus 7 is giving sounds as if I was typing (every 15 seconds a "click").

How to get rid of it? What could be the password? Will it work to just flash CM11 dirty over it? Could be problematic as well since I probably have to update CWM first...

Oh and here's the attached picture
[Nexus 7 Q&A, Help & Troubleshooting] l33ch0r:
Now that's disturbing. Not only do I not know a password, I can't even access /data and /sdcard in recovery. I'm able to mount /system for whatever good that will do me.

Does anyone know how to fix this so that I can boot without this password to decrypt? Else how to get a working android on it again?

From my understanding doing a factory reset/full wipe would result in a Nexus 7 without firmware and no chance to get firmware on it as long as I can't access /sdcard or /data :-/
[Nexus 7 Q&A, Help & Troubleshooting] l33ch0r:
Never mind, I just used this awesome Toolkit and flashed a stock image. And of course the toolkit offers more options so I'm back on track ;)
[Nexus 7 Q&A, Help & Troubleshooting] flbn_josh:
Nexus 7 2012 4.4.2 Same problem, different version

Alright, so I'm running into the same problem. After trying just about everything under the sun, I keep running into the encryption screen. :crying:

This happened after I unlocked an rooted my N7. I noticed it was acting funny whenever I tried to move my backed up data to my tablet. The tablet would freeze whenever I tried to move anything over. I was able to restart it a couple of times then ran into the demon screen.

It seems like I have tried everything to fix the problem.

I've tried flashing the stock rom manually and with Nexus Toolkit - both the older and the most recent firmware

I've tried to go into recovery and wipe everything

I've tried to go into TWRP and CWM and mount the right partitions and wipe those partitions

I've tried using fastboot oem lock and unlock to factory reset the tablet that way.

I've tried all of the suggestions people have given in this thread and I still can't get my tablet to work. Am I SOL or has anyone else recently found a solution?