1

I am trying to install APK through ADB to Nexus 5, but it always gives me the following error:

Unrecognized option -Xlog-stdio
dalvikvm: [options] class [argument ...]

The following standard options are supported:
  -classpath classpath (-cp classpath)
  -Dproperty=value
  -verbose:tag ('gc', 'jni', or 'class')
  -showversion
  -help
  -agentlib:jdwp=options

The following extended options are supported:
  -Xrunjdwp:<options>
  -Xbootclasspath:bootclasspath
  -Xcheck:tag  (e.g. 'jni')
  -XmsN (min heap, must be multiple of 1K, >= 1MB)
  -XmxN (max heap, must be multiple of 1K, >= 2MB)
  -XssN (stack size)
  -Xint

The following Dalvik options are supported:
  -Xzygote
  -Xjnitrace:substring (eg NativeClass or nativeMethod)
  -Xstacktracefile:<filename>
  -Xgc:[no]preverify
  -Xgc:[no]postverify
  -XX:+DisableExplicitGC
  -XX:HeapGrowthLimit=N
  -XX:HeapMinFree=N
  -XX:HeapMaxFree=N
  -XX:NonMovingSpaceCapacity=N
  -XX:HeapTargetUtilization=doublevalue
  -XX:ForegroundHeapGrowthMultiplier=doublevalue
  -XX:LowMemoryMode
  -Xprofile:{threadcpuclock,wallclock,dualclock}

The following unique to ART options are supported:
  -Xgc:[no]preverify_rosalloc
  -Xgc:[no]postsweepingverify_rosalloc
  -Xgc:[no]postverify_rosalloc
  -Xgc:[no]presweepingverify
  -Ximage:filename
  -XX:ParallelGCThreads=integervalue
  -XX:ConcGCThreads=integervalue
  -XX:MaxSpinsBeforeThinLockInflation=integervalue
  -XX:LongPauseLogThreshold=integervalue
  -XX:LongGCLogThreshold=integervalue
  -XX:DumpGCPerformanceOnShutdown
  -XX:IgnoreMaxFootprint
  -XX:UseTLAB
  -XX:BackgroundGC=none
  -Xmethod-trace
  -Xmethod-trace-file:filename  -Xmethod-trace-file-size:integervalue
  -Xenable-profiler
  -Xprofile-filename:filename
  -Xprofile-period:integervalue
  -Xprofile-duration:integervalue
  -Xprofile-interval:integervalue
  -Xprofile-backoff:doublevalue
  -Xprofile-start-immediately
  -Xprofile-top-k-threshold:doublevalue
  -Xprofile-top-k-change-threshold:doublevalue
  -Xprofile-type:{method,stack}
  -Xprofile-max-stack-depth:integervalue
  -Xcompiler:filename
  -Xcompiler-option dex2oat-option
  -Ximage-compiler-option dex2oat-option
  -Xpatchoat:filename
  -X[no]relocate
  -X[no]dex2oat (Whether to invoke dex2oat on the application)
  -X[no]image-dex2oat (Whether to create and use a boot image)

The following previously supported Dalvik options are ignored:
  -ea[:<package name>... |:<class name>]
  -da[:<package name>... |:<class name>]
   (-enableassertions, -disableassertions)
  -esa
  -dsa
   (-enablesystemassertions, -disablesystemassertions)
  -Xverify:{none,remote,all}
  -Xrs
  -Xint:portable, -Xint:fast, -Xint:jit
  -Xdexopt:{none,verified,all,full}
  -Xnoquithandler
  -Xjniopts:{warnonly,forcecopy}
  -Xjnigreflimit:integervalue
  -Xgc:[no]precise
  -Xgc:[no]verifycardtable
  -X[no]genregmap
  -Xverifyopt:[no]checkmon
  -Xcheckdexsum
  -Xincludeselectedop
  -Xjitop:hexopvalue[-endvalue][,hexopvalue[-endvalue]]*
  -Xincludeselectedmethod
  -Xjitthreshold:integervalue
  -Xjitcodecachesize:decimalvalueofkbytes
  -Xjitblocking
  -Xjitmethod:signature[,signature]* (eg Ljava/lang/String\;replace)
  -Xjitclass:classname[,classname]*
  -Xjitoffset:offset[,offset]
  -Xjitconfig:filename
  -Xjitcheckcg
  -Xjitverbose
  -Xjitprofile
  -Xjitdisableopt
  -Xjitsuspendpoll
  -XX:mainThreadStackSize=N

The Nexus 5 is running Android 5.0.1, and ADB (v1.0.32) is running on Windows 8.1. The USB driver is also latest. I have already tried different USB drivers and ports, but none of them works.

arsalank2
  • 1,683
  • 1
  • 16
  • 25
  • I have the same error, since I activated the stdout/stderr redirection to logcat. I can install my app by running the following commands with the device connected: 'adb shell stop', then 'adb shell setprop log.redirect-stdio false' and then 'adb shell start'. – grattmandu03 May 07 '15 at 09:27
  • It might be this issue: https://code.google.com/p/android/issues/detail?id=165602 – Gombat Apr 28 '16 at 14:06

1 Answers1

3

You have stdio redirection active.

To disable it run the following commands (as also wrote by grattmandu03):

adb shell stop
adb shell setprop log.redirect-stdio false
adb shell start

Then run the installation again.