title: Android emulator restart fails
body: <p>I have Android emulator installed using Visual Studio 2019 and enabled hyper-v and hypervisor platform using windows features.</p>
  
  <p>I created new device using "Android Device Manager" tool and when I start it, it works perfectly. But if I close it and start again it opens and screen displays last state from last session. Then nothing happens, it never loads. If I drop device system settings to default state and start again, it works but I don't want to do that every time, plus I want to be able to store app data between sessions.</p>
  
  <p>So How do I make it work?</p>
  
  <p>Or how do I make it stop trying to save state, always start cold?</p>
  
  <p>I have Windows 10, Android emulator version 28.0.25, SDK tools 26.1.1, SDK platform tools 28.0.2.</p>
  
  <p>config.ini for my device:</p>
  
  <pre><code>disk.dataPartition.size=800M
  hw.accelerometer=yes
  hw.audioInput=yes
  hw.battery=yes
  hw.camera.back=emulated
  hw.dPad=no
  hw.gps=yes
  hw.gpu.mode=auto
  hw.keyboard=yes
  hw.lcd.density=320
  hw.lcd.height=720
  hw.lcd.width=1280
  hw.mainKeys=yes
  hw.ramSize=1024
  hw.sdCard=yes
  hw.sensors.orientation=yes
  hw.sensors.proximity=yes
  hw.trackBall=no
  sdcard.size=100M
  skin.dynamic=yes
  skin.name=1280x720
  vm.heapSize=256
  hw.device.hash2=MD5:e6de262aae26d1ce2c8a8b656265afbc
  hw.device.name=4.7in WXGA
  hw.device.manufacturer=Generic
  showDeviceFrame=no
  tag.id=google_apis
  tag.display=Google APIs
  PlayStore.enabled=false
  abi.type=x86
  hw.cpu.arch=x86
  hw.gpu.enabled=yes
  avd.ini.displayname=720x1280_A9.0
  image.sysdir.1=system-images\android-28\google_apis\x86\
  AvdId=720x1280_a9_0
  </code></pre>
  
  <p>Some logs from Android Device Monitor tool:</p>
  
  <pre><code>E/SurfaceFlinger(1732): ro.sf.lcd_density must be defined as a build property
  E/LocalDisplayAdapter(6626): Default and active color mode is no longer available! Reverting to first available mode.
  E/LightsService(6626): Unable to get ILight interface.
  E/Parcel(6626): Class not found when unmarshalling: android.content.pm.PackageParser$SigningDetail?
  E/Parcel(6626): java.lang.ClassNotFoundException: android.content.pm.PackageParser$SigningDetail?
  E/Parcel(6626):     at java.lang.Class.classForName(Native Method)
  E/Parcel(6626):     at java.lang.Class.forName(Class.java:453)
  E/Parcel(6626):     at android.os.Parcel.readParcelableCreator(Parcel.java:2803)
  E/Parcel(6626):     at android.os.Parcel.readParcelable(Parcel.java:2757)
  E/Parcel(6626):     at android.content.pm.PackageParser$Package.&lt;init&gt;(PackageParser.java:6821)
  E/Parcel(6626):     at android.content.pm.PackageParser.fromCacheEntryStatic(PackageParser.java:1071)
  E/Parcel(6626):     at android.content.pm.PackageParser.fromCacheEntry(PackageParser.java:1058)
  E/Parcel(6626):     at android.content.pm.PackageParser.getCachedResult(PackageParser.java:1152)
  E/Parcel(6626):     at android.content.pm.PackageParser.parsePackage(PackageParser.java:1013)
  E/Parcel(6626):     at com.android.server.pm.ParallelPackageParser.parsePackage(ParallelPackageParser.java:138)
  E/Parcel(6626):     at com.android.server.pm.ParallelPackageParser.lambda$submit$0(ParallelPackageParser.java:117)
  E/Parcel(6626):     at com.android.server.pm.-$$Lambda$ParallelPackageParser$FTtinPrp068lVeI7K6bC1tNE3iM.run(Unknown Source:6)
  E/Parcel(6626):     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
  E/Parcel(6626):     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  E/Parcel(6626):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
  E/Parcel(6626):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
  E/Parcel(6626):     at com.android.internal.util.ConcurrentUtils$1$1.run(ConcurrentUtils.java:62)
  E/Parcel(6626): Caused by: java.lang.ClassNotFoundException: android.content.pm.PackageParser$SigningDetail?
  E/Parcel(6626):     at java.lang.Class.classForName(Native Method)
  E/Parcel(6626):     at java.lang.BootClassLoader.findClass(ClassLoader.java:1346)
  E/Parcel(6626):     at java.lang.BootClassLoader.loadClass(ClassLoader.java:1406)
  E/Parcel(6626):     at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
  E/Parcel(6626):     ... 17 more
  E/Parcel(6626): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
  E/Parcel(6626): Class not found when unmarshalling: android.content.pm.PackageParser$Signing???????
  E/Parcel(6626): java.lang.ClassNotFoundException: android.content.pm.PackageParser$Signing???????
  E/Parcel(6626):     at java.lang.Class.classForName(Native Method)
  E/Parcel(6626):     at java.lang.Class.forName(Class.java:453)
  E/Parcel(6626):     at android.os.Parcel.readParcelableCreator(Parcel.java:2803)
  E/Parcel(6626):     at android.os.Parcel.readParcelable(Parcel.java:2757)
  E/Parcel(6626):     at android.content.pm.PackageParser$Package.&lt;init&gt;(PackageParser.java:6821)
  E/Parcel(6626):     at android.content.pm.PackageParser.fromCacheEntryStatic(PackageParser.java:1071)
  E/Parcel(6626):     at android.content.pm.PackageParser.fromCacheEnpm.PackaageParser.java:1058)
  E/Parcel(6626):     at android.content.pm.PackageParser.getCachedResult(PackageParser.java:1152)
  E/Parcel(6626):     at android.content.pm.PackageParser.parsePackage(PackageParser.java:1013)
  E/Parcel(6626):     at com.android.server.pm.ParallelPackageParser.parsePackage(ParallelPackageParser.java:138)
  E/Parcel(6626):     at com.android.server.pm.ParallelPackageParser.lambda$submit$0(ParallelPackageParser.java:117)
  E/Parcel(6626):     at com.android.server.pm.-$$Lambda$ParallelPackageParser$FTtinPrp068lVeI7K6bC1tNE3iM.run(Unknown Source:6)
  E/Parcel(6626):     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
  E/Parcel(6626):     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  E/Parcel(6626):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
  E/Parcel(6626):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
  E/Parcel(6626):     at com.android.internal.util.ConcurrentUtils$1$1.run(ConcurrentUtils.java:62)
  E/Parcel(6626): Caused by: java.lang.ClassNotFoundException: android.content.pm.PackageParser$Signing???????
  E/Parcel(6626):     at java.lang.Class.classForName(Native Method)
  E/Parcel(6626):     at java.lang.BootClassLoader.findClass(ClassLoader.java:1346)
  E/Parcel(6626):     at java.lang.BootClassLoader.loadClass(ClassLoader.java:1406)
  E/Parcel(6626):     at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
  E/Parcel(6626):     ... 17 more
  E/Parcel(6626): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
  E/PackageManager(6626): Adding duplicate user id: 10008 name=com.google.android.gms
  </code></pre>
  
  <p>Then it's just non-verbal codes with file paths and prefix of</p>
  
  <blockquote>
    <p>A/system_server(6626): file_utils.cc:113]</p>
  </blockquote>