Samsung Galaxy Tab 10.1 - Stuck on Boot

Posted on Jun 27, 2011 (2 years ago). Seen 22,387 times. 17 comments. Permalink Feed
Photo Aleksandar Gargenta
Technical Program Manager
Twitter Inc
Member since Jan 19, 2007
Location: San Francisco
Stream Posts: 38
Tagged as: Android
Here we go again.

Just recently, I tried to update my Galaxy Tab 10.1 from Android 3.0 to 3.1, only to find out that the upgrade process is not fond of encrypted /data partition. As the result, I had to wipe clean all of my data and start again from scratch.

So, a few weeks later, it seems that I'm facing the same proposition. I hit the infamous boot loop, which, in my case, seems to be the result of a corrupted database file on the /data partition. System wipe, here I come again :-(

So... here's what happened.

Upon trying to open a PDF file in the Astro file manager, my tablet just froze up. So I tried to reboot it, which at first it was not willing to do. "Fortunately", holding down the power key a bit longer seemed to do the trick, only to find out that the tab is now unwilling to boot.

Upon power-up, one of two things happen.

It either gets into what appears to be a kernel panic (which I'm not sure how to explain yet):
Code:
====================================
Entering upload mode...
Upload_Cause: undefined
====================================


or gets stuck in, what some people call, "boot loop".

The "boot loop" is just /system/bin/samsungani running (displaying the Samsung animation), while system_server (powering Android's application framework services) is trying to start up.

Fortunately, I had enabled "USB Debugging", so at least I have adbd running - so I am able to adb shell to the device. Running logcat shows that the the com.android.providers.settings.SettingsProvider is failing to start up because it is unable to read from /data/system/accounts.db SQLite database file. This file appears to be corrupted because right next to is a 0-byte accounts.db-journal file, indicating that the accounts.db was not properly synced after the last write. Why the sync? Well, as of 2.3, Android prefers the ext4 file system over yaffs2 (for a number of good reasons). The problem with ext4 is that it is a journaling file system, which does quite a bit of buffering - for performance reasons. If you don't sync()... you don't commit your writes. This would normally not be such a big deal if I was able to root to the device to repair it, but given that I run it stock, there is not much I can do to fix this file (which is 660 and owned by system:system).

Why would this file affect the entire booting process? Well, since the SettingsProvider is failing, this is causing the entire system_server to fail, so Android's init process tries to restart it, only to run into the same problem again... and again... and again.

Other than rooting (which I don't want to do on my primary device), I'm left with wiping it clean yet again... and starting over... hoping that it will be kinder to me in the future.

For anyone wondering, this is what I'm seeing in the logs:


Code:

...
I/SqliteDatabaseCpp( 1217): sqlite returned: error code = 14, msg = os_unix.c: open() at line 26528 - "" errno=30 path=/data/data/com.android.providers.settings/databases/settings.db-shm, db=/data/system/accounts.db
I/SqliteDatabaseCpp( 1217): sqlite returned: error code = 14, msg = unable to open database file, db=/data/system/accounts.db
E/SqliteDatabaseCpp( 1217): CREATE TABLE android_metadata failed
E/SQLiteDatabase( 1217): Failed to open the database. closing it.
E/SQLiteDatabase( 1217): android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file
E/SQLiteDatabase( 1217): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
E/SQLiteDatabase( 1217): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:2115)
E/SQLiteDatabase( 1217): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:984)
E/SQLiteDatabase( 1217): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:956)
E/SQLiteDatabase( 1217): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1021)
E/SQLiteDatabase( 1217): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:742)
E/SQLiteDatabase( 1217): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:149)
E/SQLiteDatabase( 1217): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:223)
E/SQLiteDatabase( 1217): at com.android.providers.settings.SettingsProvider.query(SettingsProvider.java:398)
E/SQLiteDatabase( 1217): at com.android.providers.settings.SettingsProvider.ensureAndroidIdIsSet(SettingsProvider.java:317)
E/SQLiteDatabase( 1217): at com.android.providers.settings.SettingsProvider.onCreate(SettingsProvider.java:256)
E/SQLiteDatabase( 1217): at android.content.ContentProvider.attachInfo(ContentProvider.java:955)
E/SQLiteDatabase( 1217): at android.app.ActivityThread.installProvider(ActivityThread.java:3883)
E/SQLiteDatabase( 1217): at android.app.ActivityThread.getProvider(ActivityThread.java:3685)
E/SQLiteDatabase( 1217): at android.app.ActivityThread.acquireProvider(ActivityThread.java:3701)
E/SQLiteDatabase( 1217): at android.app.ContextImpl$ApplicationContentResolver.acquireProvider(ContextImpl.java:1573)
E/SQLiteDatabase( 1217): at android.content.ContentResolver.acquireProvider(ContentResolver.java:909)
E/SQLiteDatabase( 1217): at android.content.ContentResolver.insert(ContentResolver.java:715)
E/SQLiteDatabase( 1217): at android.provider.Settings$NameValueTable.putString(Settings.java:595)
E/SQLiteDatabase( 1217): at android.provider.Settings$Secure.putString(Settings.java:2428)
E/SQLiteDatabase( 1217): at android.provider.Settings$Secure.putInt(Settings.java:2506)
E/SQLiteDatabase( 1217): at com.android.server.ServerThread.run(SystemServer.java:524)
E/SystemServer( 1217): Failure starting SamplingProfiler Service
...


In case you are wondering how to hard-reset your tab, you can follow these steps:
1) Power off the device by holding the power key for about 8 seconds
2) Press the volume down key (the one to the left, as I always confuse them) and then the power key
3) Within a couple of seconds, you'll see two logos on the device, one for USB and another, that looks like a Android dude shoveling earth
4) Press the the volume down button to select the the USB icon, and then press the volume up button to make the actual selection
5) Your device is now in the "fastboot" mode
6) Finally, open up your terminal/shell and type fastboot -w, which will completely erase your userdata and cache partitions (took about 12.5 seconds for me). I got the fastboot by building it from source, but you can download pre-built binaries from various sources on the web
7) Restart your device
8) You should now be prompted to set it up... all over again

Comments

Posted on Jul 5, 2011
Photo Calvin Cheng
Software developer
Member since Jul 5, 2011
Your help appreciated. I've got the Galaxy Tab 10.1 limited running 3.1, and ran into the exact same problems as you, with the same familiar log output.

I'm fine with wiping out the device's data and starting from scratch.

Still fairly new to the Android world. Tried to get fastbook running (downloaded one version for HTC on the Mac as well as the fastboot that comes on the Android SDK for Windows). Tablet is clearly in Fastboot USB mode. On both Windows and Mac both devices show up as some kind of USB device, but not recognized by the fastboot program.
Posted on Jul 6, 2011
Photo Martin Stein
development manager
emeter corp
Member since Jul 6, 2011
Getting the fastboot driver to work was difficult. Installing Samsung Kies did not help and also the existing HTC drivers that worked for my Evo and Dream did not work. What finally did it was installing PDANet. After that fastboot -w worked.
Posted on Jul 7, 2011
Photo Calvin Cheng
Software developer
Member since Jul 5, 2011
Installed PDANet - couldn't completely do it as I couldn't get the PDANet to install on the tablet.
Still doesn't get recognized by fastboot.
Device shows up as a "USB Composite Device".
Posted on Jul 7, 2011
Photo Martin Stein
development manager
emeter corp
Member since Jul 6, 2011
@Calvin - you only need to install PDANet on the PC, not the tablet. For me it installed the drivers first, and then asked me to plug in the Android device. I plugged it in, but since I could not boot the tablet PDANet uninstalled itself; still the fastboot driver was installed.

Make sure that you get the tablet into the fastboot mode (by pushing one of the volume and then the power button in the power-off status). Reboot your PC before attempting this so that all the installations get finished just in case.

I got my information from xda-developers http://forum.xda-developers.com/showthread.php?t=1121401&highlight=fastboot, but it took a while to get things working and I am glad it's over (for now)
Posted on Jul 7, 2011
Photo Calvin Cheng
Software developer
Member since Jul 5, 2011
Thanks. Rebooting the "PC" took care of the problem. Fastboot worked fine.

I had to run Windows with Bootcamp on the Mac so it was a little troublesome to switch modes...
Posted on Jul 11, 2011
Photo Sadath Sayeed
Research in Motion
Member since Jul 11, 2011
I still can't fix the Samsung Galaxy Tab infinite loop problem ~ I keep getting "waiting for device" with fastboot option that Alex suggested. Can someone please document the steps and email it for folks not too familiar with this? Do I need to buy PDAnet as it keeps taking me to register page? Thanks in Advance.
Posted on Jul 11, 2011
Photo Calvin Cheng
Software developer
Member since Jul 5, 2011
I had the same "waiting for device" problem until I installed PDANet which is free. It'll try to install on both your PC and the Android device. You can only do the former as the latter is stuck. You'll then have to reboot your PC before you can get fastboot to work.
Posted on Jul 12, 2011
Photo Sadath Sayeed
Research in Motion
Member since Jul 11, 2011
Thanks Aleksandar and Calvin, I finally was able to reboot my tab and get it back to working on Honeycomb 3.1. I will recap aleksandar and calvin's points plus the extra steps I went thru' in my blog and share with you guys. Thanks again. Hit me up on Google + and let me know if you need any invites.
Posted on Jul 26, 2011
Photo Alan Ralph
Self-Employed
Member since Jul 26, 2011
I have exact same problem. Happened yesterday.

I am trying to follow these instructions but I don't know what to do after step 5, where my Tab screen now says "Fastboot USB download protocol". I downloaded PDANet as well, but how do I use it?? I am not a developer so not exactly sure how to complete the "fastboot -w" step.

I also searched for Sadath's blog but didn't find anything... please HELP!

(although I'm not a developer, I do understand technical issues, just happen to be stumped on this one... I called Samsung and their solution is to send it back for a motherboard repair)

Thanks!
--
Alan
SF, CA
Posted on Jul 26, 2011
Photo Calvin Cheng
Software developer
Member since Jul 5, 2011
You just need to run "fastboot -w" on the command line. Instructions are specifically for Windows (PDANet).
Fastboot is part of the Android SDK on Windows as far as I can tell and should be under the tools directory under Windows Android SDK.
Posted on Jul 26, 2011
Photo Alan Ralph
Self-Employed
Member since Jul 26, 2011
Thank you for the reply.

I did download PDANet and the PDANet Desktop is on my computer, but I can't figure out what to do with it. I don't have the SDK on my computer... so it looks like I will have to download and use that instead!

Sorry for the additional basic questions, but does this SDK use up a lot of computer resources and can it be uninstalled easily after I am done?

Thanks
--
Alan
Posted on Jul 27, 2011
Photo Aleksandar Gargenta
Technical Program Manager
Twitter Inc
Member since Jan 19, 2007
Location: San Francisco
The fast boot binary is not available as part of a standard SDK, but it can be easily built from source. Ok, maybe not that easily, since it requires quite a bit of setup.

That said, you can download it from here.

If that does not work, try Googling for it. You may also need the USB driver, but even that should be available online.

I hope this helps.
Posted on Jul 29, 2011
Photo Alan Ralph
Self-Employed
Member since Jul 26, 2011
Thank you for all the additional help. As I mentioned I am not a developer and so don't understand a number of development things.... I installed SDK, fastboot.exe, and PDANet, and still couldn't figure out how to get my computer to recognize the tablet, so I relented and sent it back to Samsung for a warranty repair. It kinda sucks, but I spent way too many hours the other day trying to make sense of all this stuff!
Posted on Jul 29, 2011
Photo Aleksandar Gargenta
Technical Program Manager
Twitter Inc
Member since Jan 19, 2007
Location: San Francisco
Sorry to hear that you had to go through so much pain. Sucks.

I hope you get your Tab back soon.
Posted on Nov 19, 2011
Photo Harald Rudell
All Good Apps
Member since Nov 19, 2011
Hi Sasha,

Kind of an old post, though Samsung Galaxy Tab 10.1 have had this boot loop problem for a while, more after Honeycomb 3.1 upgrade.

On 11/14/2011, Samsung published a 3.2 upgrade that they removed due to problems with the live update process. It seems to me 3.2 does not corrupt the data partition during standby like 3.1, which is what causes the boot loop.

You can root your tablet in 5 minutes using files for dummies (that's the name) from here http://forum.xda-developers.com/showthread.php?t=1171089

The install the 3.2 from http://hotfile.com/dl/135034529/e842791/P7510UEKMM_odex.zip.html

I had some old UK rom on mine and had difficulty in connecting my tablet to Windows, I think Samsung used funny device identifiers. I used fastboot and recovery.img to recover from boot loop, wiping the user data partition, and adb push to copy files to the sdcard for rooting and upgrade, connected to both Mac and Linux
Posted on Mar 24, 2012
Photo Sadath Sayeed
Research in Motion
Member since Jul 11, 2011
Hey @alan ralph - did Samsung fix/or replace your galaxy tab 10.1? Let us know. I am getting so tired of fastbooting so many times that I've given it up - it's a crap tablet when compared to iPad now. It's now sitting on my desk as a glorified expensive paperweight :)

Also, did anyone upgrade it to ICS yet? Please share if you ran into any problems. Thanks.
Posted on Aug 29, 2012
Photo Aleksandar Gargenta
Technical Program Manager
Twitter Inc
Member since Jan 19, 2007
Location: San Francisco
Happened again... but with all kinds of warnings and issues:

Code:
$ fastboot -w
erasing 'userdata'...
OKAY [ 12.145s]
formatting 'userdata' partition...
Erase successful, but not automatically formatting.
Can't determine partition type.
OKAY [ 0.001s]
erasing 'cache'...
ERROR: usb_write failed with status e00002ed
FAILED (command write failed (No such file or directory))
finished. total time: 12.152s


I'm able to boot/restore the device, but I'm really starting to doubt the quality of the flash memory on this tablet.