(How) is it possible to get to know via adb where exactly a booting-up android device is hanging?

My problem/ background information:

I recently did changes on the automatic display brightness threshold settings, and while doing the device just did "reset" itself (rebootet), and is stuck with showing the boot animation.

I see that the automatic display brightness works.

I can connect with adb via USB and have full shell access.

Logcat also spits out a lot of things.

When I try to start trebuchet manually with am start -a android.intent.action.MAIN -c android.intent.category.HOME com.cyanogenmod.trebuchet, I get

Error type 2
android.util.AndroidException: Can't connect to activity manager; is the system running?
        at com.android.commands.am.Am.run(Am.java:100)
        at com.android.commands.am.Am.main(Am.java:81)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
        at dalvik.system.NativeStart.main(Native Method)

Can't connect to activity manager; is the system running? also appears when I try to play around with am in other ways.

So I deduce the device did not finish booting up and hangs somewhere. For fixing it, I first need to find out where. Then there might be a follow-up question how to understand and fix it, depending what the problem is.

I wiped dalvik cache and cache-partition from ClockWorkMod, after that it does the usual "optimizing apps", but when finished still does not complete booting and showing the boot animation.

I am not familiar with the Android boot process, is there any good information on it suitable for people familiar with the internals Unix boot process (Linux, sysvinit, openrc, in my case)? Is there a way to do a verbosely logged boot process?

Device information:

It's a Sony sk17i (marketing name "Xperia mini pro"), running Cyanogenmod 10.1-extended which is based on Android 4.1.2 and nAa kernel

getprop and uname outputs:

  • getprop ro.build.version.release: 4.1.2
  • getprop ro.build.version.sdk: 16
  • getprop ro.product.model: Xperia Mini Pro
  • uname -r:
  • getprop:

    [BUILD_UTC_DATE]: [0]
    [com.qc.hardware]: [true]
    [com.qc.hdmi_out]: [false]
    [dalvik.vm.dexopt-flags]: [m=y]
    [dalvik.vm.heapgrowthlimit]: [48m]
    [dalvik.vm.heapsize]: [128m]
    [dalvik.vm.heapstartsize]: [5m]
    [dalvik.vm.lockprof.threshold]: [500]
    [dalvik.vm.stack-trace-file]: [/data/anr/traces.txt]
    [debug.camcorder.disablemeta]: [1]
    [debug.composition.type]: [gpu]
    [debug.mdpcomp.logs]: [0]
    [debug.sf.hw]: [1]
    [gsm.current.phone-type]: [1]
    [gsm.sim.operator.alpha]: []
    [gsm.sim.operator.iso-country]: []
    [gsm.sim.operator.numeric]: []
    [gsm.version.ril-impl]: [Qualcomm RIL 1.0]
    [hwui.disable_vsync]: [true]
    [hwui.render_dirty_regions]: [false]
    [init.svc.adbd]: [running]
    [init.svc.akmd8975]: [running]
    [init.svc.bootanim]: [running]
    [init.svc.compcache]: [stopped]
    [init.svc.console]: [running]
    [init.svc.dbus]: [running]
    [init.svc.debuggerd]: [running]
    [init.svc.drm]: [running]
    [init.svc.hw_config]: [stopped]
    [init.svc.installd]: [running]
    [init.svc.keystore]: [running]
    [init.svc.media]: [running]
    [init.svc.netd]: [running]
    [init.svc.netmgrd]: [running]
    [init.svc.qmuxd]: [running]
    [init.svc.ril-daemon]: [running]
    [init.svc.servicemanager]: [running]
    [init.svc.surfaceflinger]: [running]
    [init.svc.ueventd]: [running]
    [init.svc.vold]: [running]
    [init.svc.zygote]: [running]
    [keyguard.no_require_sim]: [true]
    [net.bt.name]: [Android]
    [net.change]: [net.qtaguid_enabled]
    [net.hostname]: [sk17i-netzclub]
    [net.qtaguid_enabled]: [1]
    [net.tcp.buffersize.default]: [4096,87380,704512,4096,16384,110208]
    [net.tcp.buffersize.edge]: [4096,26280,35040,4096,16384,35040]
    [net.tcp.buffersize.evdo]: [4096,87380,563200,4096,16384,262144]
    [net.tcp.buffersize.evdo_b]: [4096,87380,704512,4096,16384,262144]
    [net.tcp.buffersize.gprs]: [4096,8760,11680,4096,8760,11680]
    [net.tcp.buffersize.hsdpa]: [4096,87380,704512,4096,16384,262144]
    [net.tcp.buffersize.hspa]: [4096,87380,704512,4096,16384,110208]
    [net.tcp.buffersize.hspap]: [4096,87380,1220608,4096,16384,393216]
    [net.tcp.buffersize.hsupa]: [4096,87380,704512,4096,16384,262144]
    [net.tcp.buffersize.lte]: [4096,87380,1220608,4096,16384,563200]
    [net.tcp.buffersize.umts]: [4096,87380,563200,4096,16384,110208]
    [net.tcp.buffersize.wifi]: [524288,1048576,2097152,262144,524288,1048576]
    [persist.chargemon.active]: [1]
    [persist.radio.adb_log_on]: [0]
    [persist.radio.net_pref_0]: [0]
    [persist.radio.nitz_lons_0_0]: [<CENSORED>]
    [persist.radio.nitz_plmn_0]: [<CENSORED>]
    [persist.radio.nitz_sons_0_0]: [<CENSORED>]
    [persist.radio.sma_voice_3gpp]: [0]
    [persist.ro.ril.sms_sync_sending]: [1]
    [persist.service.zram]: [18]
    [persist.sys.country]: [DE]
    [persist.sys.hdcp_checking]: [never]
    [persist.sys.language]: [de]
    [persist.sys.localevar]: []
    [persist.sys.profiler_ms]: [0]
    [persist.sys.purgeable_assets]: [1]
    [persist.sys.root_access]: [3]
    [persist.sys.strictmode.visual]: []
    [persist.sys.timezone]: [Europe/Berlin]
    [persist.sys.usb.config]: [mass_storage,adb]
    [persist.sys.use_dithering]: [0]
    [ril.ecclist]: [112,911,112]
    [rild.libargs]: [-d/dev/smd0]
    [rild.libpath]: [/system/lib/libril-qc-1.so]
    [ro.allow.mock.location]: [0]
    [ro.baseband]: [unknown]
    [ro.board.platform]: [msm7x30]
    [ro.boot.emmc]: [0]
    [ro.boot.hardware]: [semc]
    [ro.boot.serialno]: [BX902GVWR3]
    [ro.bootloader]: [unknown]
    [ro.bootmode]: [unknown]
    [ro.build.characteristics]: [default]
    [ro.build.date.utc]: [1370165795]
    [ro.build.date]: [Sun Jun  2 02:36:35 MST 2013]
    [ro.build.description]: [SK17i-user 4.0.4 4.1.B.0.587 tL1_3w test-keys]
    [ro.build.display.id]: [cm_mango-userdebug 4.1.2 JZO54K eng.M66B.20130602.023102 test-keys]
    [ro.build.fingerprint]: [SEMC/SK17i_1254-2184/SK17i:4.0.4/4.1.B.0.587/tL1_3w:user/release-keys]
    [ro.build.host]: [iof303]
    [ro.build.id]: [JZO54K]
    [ro.build.product]: [mango]
    [ro.build.tags]: [test-keys]
    [ro.build.type]: [userdebug]
    [ro.build.user]: [M66B]
    [ro.build.version.codename]: [REL]
    [ro.build.version.incremental]: [eng.M66B.20130602.023102]
    [ro.build.version.release]: [4.1.2]
    [ro.build.version.sdk]: [16]
    [ro.carrier]: [unknown]
    [ro.cm.device]: [mango]
    [ro.cm.version]: [10-20130602-UNOFFICIAL-mango]
    [ro.com.android.dataroaming]: [false]
    [ro.com.android.dateformat]: [MM-dd-yyyy]
    [ro.com.android.wifi-watchlist]: [GoogleGuest]
    [ro.com.google.clientidbase]: [android-google]
    [ro.com.google.locationfeatures]: [1]
    [ro.config.alarm_alert]: [Hassium.ogg]
    [ro.config.notification_sound]: [Deneb.ogg]
    [ro.config.ringtone]: [Orion.ogg]
    [ro.debuggable]: [1]
    [ro.emmc]: [0]
    [ro.factorytest]: [0]
    [ro.goo.developerid]: [M66B]
    [ro.goo.rom]: [Xtended]
    [ro.goo.version]: [1370165462]
    [ro.hardware]: [semc]
    [ro.hsdpa_cat]: [8]
    [ro.modversion]: [10-20130602-UNOFFICIAL-mango]
    [ro.opengles.version]: [131072]
    [ro.product.board]: [mogami]
    [ro.product.brand]: [SEMC]
    [ro.product.cpu.abi2]: [armeabi]
    [ro.product.cpu.abi]: [armeabi-v7a]
    [ro.product.device]: [mango]
    [ro.product.locale.language]: [en]
    [ro.product.locale.region]: [US]
    [ro.product.manufacturer]: [SEMC]
    [ro.product.model]: [Xperia Mini Pro]
    [ro.product.name]: [SK17i]
    [ro.revision]: [0]
    [ro.ril.def.agps.feature]: [1]
    [ro.ril.def.agps.mode]: [2]
    [ro.ril.gprsclass]: [10]
    [ro.ril.hsxpa]: [1]
    [ro.rommanager.developerid]: [cyanogenmod]
    [ro.secure]: [1]
    [ro.serialno]: [<CENSORED>]
    [ro.setupwizard.enterprise_mode]: [1]
    [ro.sf.lcd_density]: [160]
    [ro.telephony.call_ring.multiple]: [false]
    [ro.telephony.default_network]: [0]
    [ro.telephony.ril_class]: [SemcRIL]
    [ro.tethering.kb_disconnect]: [1]
    [ro.url.legal.android_privacy]: [http://www.google.com/intl/%s/mobile/android/basic/privacy.html]
    [ro.url.legal]: [http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html]
    [ro.use_data_netmgrd]: [true]
    [ro.wifi.channels]: []
    [service.bootanim.exit]: [0]
    [sys.mem.max_hidden_apps]: [10]
    [sys.usb.config]: [mass_storage,adb]
    [sys.usb.state]: [mass_storage,adb]
    [system_init.startsurfaceflinger]: [0]
    [vold.post_fs_data_done]: [1]
    [wifi.interface]: [wlan0]
    [wifi.softap.interface]: [wlan0]
    [wifi.softapconcurrent.interface]: [wlan0]


Now operating for over an hour (for copying files off the device via adb), the boot animation finished and the "log in"-screen (i.e, with the clock and the lock to wipe to the side to get access) appears, shortly for about a second, then disappers, black screen, after two seconds appears again, stays looping like that. Found out that it is the process /system/bin/bootanimation which stopped after a while. Same behaviour if killed by hand.

Update 2:

There are a lot of files /data/system/dropbox/[email protected] (the numbers are timestamps and differ from file to file), a few per minute, all with the content

    Process: system_server
    Build: SEMC/SK17i_1254-2184/SK17i:4.0.4/4.1.B.0.587/tL1_3w:user/release-keys

    java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
            at com.android.server.PowerManagerService$10.run(PowerManagerService.java:2839)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.os.HandlerThread.run(HandlerThread.java:60)
  • Try the logs. In your case, I'd first check adb logcat (which you already did if I read that correctly), and then adb dmesg.
    – Izzy
    Apr 12, 2016 at 12:51
  • @lzzy: logcat (btw.: I run everything from the shell started with adb shell, if needed a root shell) gives lot of output, not stopping. What should I look for? I am not familiar with all that android-specific stuff which is printed there. dmesg I'll try -- but the problem really does not look like a kernel problem, since I can connect to the device fine via USB cable and adb. Apr 12, 2016 at 14:38
  • All those logs are ring buffers where's continuously written to, so naturally logcat won't stop. What I'd do is running it from the computer (root or not doesn't really matter), redirecting the output to a file, and then hitting Ctrl-C when I think I've captured enough (e.g. when the loop is "complete"). e.g.: adb logcat -v time > debug.log. And no, I don't have something specific in mind; I'd later grep the file for crashes and errors: stack traces are easy to identify, and error messages usually start with "E:", so one can filter (-v time adds a time-stamp to the start of each line).
    – Izzy
    Apr 12, 2016 at 14:45
  • @lzzy: Is there really only this way, via the spammed logcat? No way to stepwise boot? Apr 14, 2016 at 17:00
  • Not that I know of. Check the help page for filter options to narrow down things in output (you might miss other details then) – or capture all and filter later. I'm not aware of a third variant .
    – Izzy
    Apr 14, 2016 at 17:09


You must log in to answer this question.

Browse other questions tagged .