안드로이드 .apk를 설치할 때 발생하는 에러.
Log cat에서 찾아보면...
(음..이미지 캡쳐, 수정 작업이 안된다는걸 새삼 깨달았다ㅠㅠ)
12-06 13:49:04.984: INFO/PackageHelper(6183): Size of container 14 MB 12688637 bytes
12-06 13:49:04.984: DEBUG/VoldCmdListener(1278): asec create smdl2tmp1 14 fat {} 10027
12-06 13:49:04.984: ERROR/Vold(1278): ASEC file '/mnt/secure/asec/smdl2tmp1.asec' currently exists - destroy it first! (No such device or address)
12-06 13:49:04.984: WARN/Vold(1278): Returning OperationFailed - no handler for errno 98
12-06 13:49:04.994: ERROR/PackageHelper(6183): Failed to create secure container smdl2tmp1
12-06 13:49:04.994: ERROR/DefContainer(6183): Failed to create container smdl2tmp1
실제로 중요한 메세지는 빨간색 ERROR 부분이다.
한참을 구글링해서 찾은 결과다.
//===============================================================================================
/mnt/secure is the directory where secure containers holding apps installed
on SD card get mounted. On the SD card, they appear as a single file, under
something like .android_secure (can't remember the exact name). The file
name should contain the package name of the app. You could try deleting the
file for your app from the SD card.
On Tue, Jun 22, 2010 at 8:29 AM, Mark Murphy <mmur...@commonsware.com>wrote:
> > btw, my nexus has been updated to Froyo(2.2).
> No, it hasn't. Android 2.2 has not shipped. You have upgraded to a
> test build of Froyo.
> > After that, I found that I can't install or update software anymore,
> > through the log, problem maybe on the '/mnt/secure/asec/
> > smdl2tmp1.asec' file, but I can't browse it because of permission.
> Try a blank SD card in your device. I think /mnt/secure might be a
> loopback device for a file on the SD card.
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
> Android Training...At Your Office: http://commonsware.com/training
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com<android-developers%2Bunsubscribe@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
Dianne Hackborn
Android framework engineer
hack...@android.com
//===============================================================================================
이유인 즉, /mnt/secure라는 폴더는 SD카드에 설치된 apps에 관한 정보들을 저장하는 파일,
'/mnt/secure/asec/smdl2tmp1.asec' 에 중복된 패키지 명이 존재함으로써 발생하는 에러라는 것이다.
원래, 이 파일은 temporary file로 어떠한 한 시점에 자동적으로 삭제가 되는 등의 operation이 일어나야되는데,
그러질 못하므로 해당 파일을 삭제하기를 권고한다.
하지만...실제로 시도한 바, permission 문제로 아에 해당 폴더 내 파일이 보이지 않으며,
삭제나 su(super user)권한 또한 "permission denied"라는, 더 이상의 대화를 원치 않는다는 어느 허름한 구멍가게 주인의 목소리 마냥 찹찹한 대답만 보여진다.
가장 좋은 방법은, 새로운 SD 카드를 삽입 후, 설치를 한다면 가능하나 이는 다른 SD 카드를 가지고 다녀야 한다는, 번거로움이 있으며, 그닥 문제를 직접적으로 해결하는 방법은 아니다.
따라서, su권한을 얻어 파일을 삭제하는 방법이 최선책이지만, rooting을 하지 않으면 어쩔수 없는 듯(ㅡㅡ)
아래는, HTC Magic/Sapphire의 Rooting 과정에 대한 위키 사이트
http://android-dls.com/wiki/index.php?title=Magic_Root_Access
[퍼옴]http://fortes.tistory.com/entry/INSTALLFAILEDCONTAINERERROR