Programing

Android INSTALL_FAILED_UID_CHANGED

lottogame 2020. 10. 24. 09:24
반응형

Android INSTALL_FAILED_UID_CHANGED


Nexus 4를 사용하여 Android에서 디버깅을 수행했지만 최근 여기에서이 오류가 발생했습니다. 이 오류에 대해 조사한 결과 앱이 제대로 삭제되지 않는 문제인 것 같습니다. 디버깅중인 앱은 에뮬레이터뿐만 아니라 다른 Android 기기에서도 잘 실행됩니다.이 오류는 내 Nexus 4에서만 발생합니다. 내 기기를 컴퓨터에 연결하고 데이터 / 데이터 폴더를 삭제하려고했지만 여전히 같은 문제. 또한 설정 앱을 확인하여 확실히 제거되었는지 확인했습니다.

누구든지이 문제를 해결하는 방법을 알고 있습니까? 일부 사용자에 따르면 데이터 / 데이터를 제대로 삭제하려면 루트 액세스가 필요합니다. 사실인가요? 아니면 다른 방법이 있습니까?


때로는 데이터 폴더도 제거해야합니다. 나를 위해 사용자 공간에 패키지가 com.kikin.cts있고 /data/data/com.kikin.cts. 계속해서을 얻었 INSTALL_FAILED_UID_CHANGED지만 데이터 폴더를 제거한 후 오류가 사라졌습니다.


루팅 된 기기의 경우 :

아래 명령을 실행하십시오.

adb rm -rf /data/data/<your.package.name>

루팅되지 않은 기기의 경우 :

  1. 앱의 ApplicationId를 변경합니다. ApplicationId를 변경하려면 링크참조하십시오 .
  2. 앱을 빌드하고 설치합니다. 앱은 새 앱으로 취급되므로 성공적으로 설치됩니다.
  3. 이제이 앱을 제거하십시오. 데이터가 지워집니다.
  4. 이제 ApplicationId를 이전 것으로 변경하십시오.
  5. 빌드하고 설치합니다. Magic .. 설치됩니다.

장치를 다시 시작하고 프로젝트를 지 웁니다. 기본적으로 제거하지 않으면 다시 시작하지 않을 경우를 대비하여 제거했을 것입니다.


아마도 이것을 일으키는 SharedUserID를 도입했을 것입니다.


Nexus 5에 루트가 있지만 아무것도 작동하지 않아 작동하는 설정에서 공장 초기화를 실행해야했습니다.


저에게는 "개발자 옵션"섹션에서 "USB를 통해 앱 확인"을 선택 취소하여 트릭을 수행했습니다.


대부분의 경우 INSTALL_FAILED_DEXOPT또는 INSTALL_FAILED_UID_CHANGED앱을 설치할 공간이 충분하지 않음을 의미합니다.

기기에서 사용하지 않는 일부 앱을 제거하거나 최소한 현재 버전의 앱을 제거하십시오.

adb uninstall package-name

매우 드물게 응용 프로그램 데이터에 문제가있을 수 있습니다. 기기가 루팅되었는지 여부에 따라 두 가지 옵션이 있습니다.

뿌리가없는

공장 초기화 Settings -> Backup and reset -> Factory data reset(최소한 삼성 S5의 경우)

루팅 (또는 에뮬레이터)

adb shell "rm -rf /data/data/package-name" 

나를 위해 일하는 또 다른 솔루션이 있습니다. 장치가 다른 응용 프로그램으로 인식하고 설치가 성공적으로 완료되도록 응용 프로그램의 패키지 이름을 변경할 수 있습니다 . 루트 액세스 권한이없고 장치를 재설정하고 싶지 않은 사람들에게 도움이 될 수 있습니다.


이것은 나를 위해 일했습니다.

adb shell rm -rf /system/app/<package.name>

ADB 셸에서 두 가지 방법으로 솔루션을 찾을 수 있습니다. 1. 데이터를 유지하고 솔루션을 찾고 2. 데이터를 유지하지 않고 솔루션을 찾습니다.

1에 대한 해결책 adb chown -R UID:UID /data/data/your.package.name은 ADB 경로에서 명령 프롬프트를 통해 명령 을 실행하는 것 입니다.

2. 해결 방법 adb rm -r /data/data/your.package.name은 동일한 경로에서 명령을 실행하는 것 입니다.


지난 며칠 동안 Galaxy Note 3 테스트 장치 에서이 문제가 발생했습니다. Calabash-Andrdoid를 사용하고 있으며 install_app 메서드가 실행을 시도 할 때마다 INSTALL_FAILED_UID_CHANGED 오류가 계속 발생합니다. 두 개의 테스트 장치에서이 문제가 발생했기 때문에이 문제로 어려움을 겪고있었습니다. 내 / data / data / app 및 app.test 폴더를 비우는 것을 포함하여 위의 모든 것을 시도했습니다. 내 앱을 개발하는 데 사용한 플랫폼이기 때문에 Xamarin이 설치하는 계측 백엔드 항목도 삭제했습니다. 장치에서 수동으로 삭제할 다른 항목을 찾을 수 없습니다. 세 번째 장치에서 작업을하려고했을 때 모든 것이 성공적으로 실행되었다는 것을 알았을 때 문제가 장치에 있다는 것을 깨달았습니다. 결국 나를 위해 일한 유일한 것은 공장 초기화실행하는 것이 었습니다.장치 중 하나의. 이게 도움이 되길 바란다.

고마워, -Shah


누군가에게 도움이되는 경우에 이것을 공유 할 수있을 것이라고 생각했습니다. 저는 이클립스에서 내 앱의 새 버전을 작성하고 Google Play 스토어에서 다운로드 한 휴대 전화에 약간 오래된 버전이 있음에도 불구하고 휴대 전화에서 실행하려고했습니다. 이클립스는 기존 온폰 버전을 제거해도되는지 묻는 대화 상자를 띄 웠고 동의했습니다. 제거에 결함이있어서 INSTALL_FAILED_UID_CHANGED이 발생했습니다.

나는 여기에 제안 된 대부분의 것을 운없이 시도했다. 내 전화에 APK의 명백한 흔적이 없거나 삭제할 수있는 데이터 파일이 없었지만 무언가로 인해 Eclipse에서 APK를 전화로로드하지 못했습니다. 또한 Google Play에서 이전 베타 테스트 버전을 다운로드 할 수 없었습니다. 다운로드가 100 % 진행되었지만 "알 수없는 오류"와 숫자 (아마 -24)를보고하는 메시지와 함께 실패했습니다.

이미 베타 테스터와 인앱 제품이 이전 패키지 이름으로 설정되어 있기 때문에 패키지 이름을 바꾸는 것이 망설 였지만 이클립스에서 일시적으로 패키지 이름을 변경하고 새 버전을 휴대폰에 설치 한 다음 다운로드 할 수있었습니다. 이전 Google Play 버전도 있습니다. 두 버전 모두 동일한 앱 이름과 아이콘을 사용하여 휴대 전화에서 서로 행복하게 앉아있었습니다. 그런 다음 앱 아이콘을 전화기의 제거 아이콘으로 드래그하여 수동으로 둘 중 하나 또는 둘 다를 제거 할 수 있습니다. 수동 제거는 충돌을 제거하고 이클립스의 결함 제거를 복구했기 때문에 이클립스 패키지의 이름을 원래 이름으로 변경하고 이전과 같이 계속했습니다.

이것은 공장 초기화 또는 영구 패키지 이름 변경보다 훨씬 덜 고통 스러웠습니다. 오류의 원인이 Eclipse 버전과 Google Play 버전 간의 충돌 인 경우에만 작동하지만 비슷한 상황에 있다면 시도해 볼 가치가 있습니다.


좋아, 여기에 뿌리를 둔 LG NEXUS 4 의 해결책은 다음과 같습니다. (

  • 작업중인 앱 apk가 서명되거나 서명되지 않은 곳에 있는지 확인하십시오.)

  • 휴대폰에서이 파일을 제거했습니다 (물론있는 경우).

예를 들어 : app-debug-unaligned.apk

이제 콘솔에서 다음을 작성합니다.

adb push app-debug-unaligned.apk /sdcard/
adb shell
su
rm -fr /data/local/tmp/app-debug-unaligned.apk
rm -fr /data/data/app-debug-unaligned.apk

이제 adb를 종료하고 호출하십시오.

adb shell su -c "pm install /sdcard/app-debug-unaligned.apk"

일?


여기에 기존 답변에서 다루지 않은 것이 있습니다. 이것은 에뮬레이터에서 나에게 일어났습니다. 사용자 데이터를 재설정하면 처음에는 INSTALL_FAILED_DEXOPT가 발생하지만 그 후에는 INSTALL_FAILED_UID_CHANGED가 발생합니다. rm -r /data/data/com.foo.bar는 첫 번째 상태로 재설정하기에 충분하다는 것을 알았습니다.

제 경우 실제 범인은 dexopt가 실패한 Java 메서드 이름입니다. logcat에있는 내용에 매우주의를 기울이십시오. 다음은이를 제공 한 것입니다.

I/PackageManager( 1275): Running dexopt on: com.foo.bar
E/dalvikvm( 2857): Invalid name: '__jni_setLocation'
E/dalvikvm( 2857): Trouble with item 14787 @ offset 0x43b68
E/dalvikvm( 2857): Cross-item verify of section type 0005 failed
E/dalvikvm( 2857): ERROR: Byte swap + verify failed
E/dalvikvm( 2857): Optimization failed
W/installd(  941): DexInv: --- END '/data/app/com.foo.bar-1.apk' --- status=0xff00, process failed
E/installd(  941): dexopt in='/data/app/com.foo.bar-1.apk' out='/data/dalvik-cache/data@app@com.foo.bar-1.apk@classes.dex' res=65280
W/PackageManager( 1275): Package couldn't be installed in /data/app/com.foo.bar-1.apk

dexopt가 일부 메서드 이름을 좋아하지 않는 이유는 말할 수 없지만 그게 문제였습니다.


앱 자체 (데이터 폴더가 아님)를 제거한 다음 다시 설치하면 문제가 없습니다. 이전에 다른 컴퓨터에서 앱을 디버깅했을 수 있기 때문에 Android가 불평합니다.


A solution for non-rooted device. Go to the Application manager and uninstall the app called "Selendroid" and retry again. This solution works for me.


I fix this, maybe it will work anyone else.

I'm restart my phone, then remove a few more app. And try again to install, it's work!

Maybe problem is about to storage. I don't know why, but it's work now. Good luck! (Sorry about bad English)


Use

adb shell

go to the shell.
Then run the command follow:

rm -rf /data/data/package name

please repleace package name with your own, such as com.map.map


For anyone running Junit style tests from their computer and getting this error- while the console it told me there was a problem with my application (packaged in the format 'com.myapp.stuff'), the real issue was my test code package, which if you're running on a device gets installed as a separate app with the package name like 'com.myapp.stuff.test'. Deleting the test code "application" using the Application manager and deleting my actual app solved the problem for me. I'm posting this answer here to save someone else a "Duh" moment.


Same problem on a Mediacom device, first a

$ adb install -r platforms/android/out/android-debug-unaligned.apk
3958 KB/s (22887489 bytes in 5.647s)
     pkg: /data/local/tmp/android-debug-unaligned.apk
     Failure [INSTALL_FAILED_DEXOPT]

then a very persistent:

$ adb install -r platforms/android/out/android-debug-unaligned.apk
4949 KB/s (22887489 bytes in 4.515s)
     pkg: /data/local/tmp/android-debug-unaligned.apk
     Failure [INSTALL_FAILED_UID_CHANGED]

Doing a factory reset didn't change the dynamic (I got both errors, in sequence).

  • installing the same app with a different id worked
  • installing a different app with the previous id doesn't

Rooting not an option, the solution for me was a cache wipe: now the offending app id works fine and I didn't had to factory reset (again).

Hope it helps


I deleted /data/data/my.package.name and /data/app/my.package.name.apk, problem still persistent.

however I found a folder /data/user/0/my.package.name, delete it and problem solved.


For me, there was a bit more to it. Simply removing /data/data/appfolder didn't help.

The additional reason was that my external libs weren't included in .apk file because the name of folder was lib instead of libs. This has caused [INSTALL_FAILED_DEXOPT] during apk installation followed by [INSTALL_FAILED_UID_CHANGED].

So changing libs folder name worked for me in this case.


I found a solution that works both on a non-rooted device and on an emulator. While you can't directly delete the data folders on a non-rooted device you can utilize the pm command to do that:

  1. Run adb shell
  2. Run pm uninstall <app name> (i.e. com.example.myapp)
  3. Run pm uninstall <test app name> (i.e. com.example.myapp.test) - you might receive an error if the test app wasn't installed before.

It seems that for some reason when uninstalling the apps from the Android UI this doesn't work (possibly it doesn't delete the data folders) however when uninstalling via the pm command it does work.

Tried it on a "Nexus 5" and on a "OnePlus One".


It is obviously because of improper uninstall (probably due to faulty cable connection).

SOLUTION Download SDMaid from play-store, and delete Corpse files (junk files). Re-run application. (But you need to have your device rooted)


I met the similar problem. The reson is that you didn't uninstall all component of the app.My solution is: deleting /data/data/com.eg.android.AlipayGphone manually.

work well for me.

I hope it is helpful for u!


Rooting and factory reset were not an option for me, but I was able to find an older version of my APK and install that (I'm guessing it was the same one that failed to uninstall properly). After uninstalling that one again, I was able to install new versions.

참고URL : https://stackoverflow.com/questions/16277422/android-install-failed-uid-changed

반응형