In a prototype project a lot of assets & drawables are shipped within the APK.
There is no real option than having a res/ folder 18MB big.
As my phone (HTC Desire) doesn’t have enough available memory, I have to use the emulator and notice how extremely slow this is.
Here is the output of the adb logcat command while deploying out of IntelliJ. What I don’t understand mainly is why a file system format is being done on every deployment?
D/AndroidRuntime( 1031):
D/AndroidRuntime( 1031): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 1031): CheckJNI is ON
D/AndroidRuntime( 1031): --- registering native functions ---
D/dalvikvm( 270): GC_EXPLICIT freed 141 objects / 7400 bytes in 80ms
D/VoldCmdListener( 29): asec list
I/PackageHelper( 270): Size of container 18 MB 17245066 bytes
D/VoldCmdListener( 29): asec create smdl2tmp1 18 fat {} 10027
D/SntpClient( 59): request time failed: java.net.SocketException: Address family not supported by protocol
I//system/bin/newfs_msdos( 29): /system/bin/newfs_msdos: warning, /dev/block/dm-2 is not a character device
I//system/bin/newfs_msdos( 29): /system/bin/newfs_msdos: Skipping mount checks
I//system/bin/newfs_msdos( 29): Bogus heads from kernel - setting sane value
I//system/bin/newfs_msdos( 29): Bogus sectors from kernel - setting sane value
I//system/bin/newfs_msdos( 29): /dev/block/dm-2: 37376 sectors in 4672 FAT32 clusters (4096 bytes/cluster)
I//system/bin/newfs_msdos( 29): bps=512 spc=8 res=32 nft=2 sec=37485 mid=0xf0 spt=63 hds=64 hid=0 bspf=37 rdcl=2 infs=1 bkbs=2
I/logwrapper( 29): /system/bin/newfs_msdos terminated by exit(0)
I/Vold ( 29): Filesystem formatted OK
D/VoldCmdListener( 29): asec path smdl2tmp1
I/PackageHelper( 270): Created secure container smdl2tmp1 at /mnt/asec/smdl2tmp1
I/DefContainer( 270): Created container for smdl2tmp1 at path : /mnt/asec/smdl2tmp1
Now – this takes most time due to file transfer I guess.
Once finished:
I/DefContainer( 270): Copied /data/local/tmp/com.myapp.android to /mnt/asec/smdl2tmp1/pkg.apk
D/VoldCmdListener( 29): asec finalize smdl2tmp1
I/DefContainer( 270): Finalized container smdl2tmp1
I/DefContainer( 270): Unmounting smdl2tmp1 at path /mnt/asec/smdl2tmp1
D/dalvikvm( 270): GC_EXPLICIT freed 166 objects / 13208 bytes in 115ms
D/VoldCmdListener( 29): asec unmount smdl2tmp1 force
D/VoldCmdListener( 29): asec mount smdl2tmp1 {} 1000
D/VoldCmdListener( 29): asec path smdl2tmp1
D/PackageParser( 59): Scanning package: /mnt/asec/smdl2tmp1/pkg.apk
D/dalvikvm( 270): GC_EXPLICIT freed 75 objects / 3664 bytes in 234ms
I either didn’t notice on any other APP before, but something seems to be too much here?
Emulator is on Froyo, 2.2.
Any thoughts or ideas on how to speed up this?
Else I guess my laptop is too slow and the whole “asec”, encrypted APK things, take too long. Would be nice to speed that up too.
Thanks.
Looks like the secure container stuff is due to the app being installed to SD card by default. Try changing your preferred location to internal storage. This might speed things up a bit.