Question

//cannot install apk on my mobile, it throws me the following error when i push the app from adb

D/PackageParser( 1336): Scanning package: /system/app/Contacts.apk
I/PackageManager( 1336): /system/app/Contacts.apk changed; collecting certs
D/PackageManager( 1336): Scanning package com.android.contacts
D/PackageManager( 1336): Shared UserID android.uid.shared (uid=10002): packages=   [PackageSetting{405f1ad8 com.android.providers.applications/10002}, PackageSetting{405f1890 com.android.providers.contacts/10002}, PackageSetting{405efa20 com.android.contacts/10002}, PackageSetting{405f0ae0 com.android.providers.userdictionary/10002}]
I/dalvikvm( 1336): Zip is good, but no classes.dex inside, and no .odex file in the same directory
W/PackageManager( 1336): IOException reading apk: /system/app/Contacts.apk
W/PackageManager( 1336): java.io.IOException: /system/app/Contacts.apk
W/PackageManager( 1336):    at dalvik.system.DexFile.isDexOptNeeded(Native Method)
W/PackageManager( 1336):    at com.android.server.PackageManagerService.performDexOptLI(PackageManagerService.java:2880)
W/PackageManager( 1336):    at com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java:3424)
W/PackageManager( 1336):    at com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java:2809)
W/PackageManager( 1336):    at com.android.server.PackageManagerService.access$2100(PackageManagerService.java:143)
W/PackageManager( 1336):    at com.android.server.PackageManagerService$AppDirObserver.onEvent(PackageManagerService.java:4693)
W/PackageManager( 1336):    at android.os.FileObserver$ObserverThread.onEvent(FileObserver.java:125)
W/PackageManager( 1336):    at android.os.FileObserver$ObserverThread.observe(Native Method)
W/PackageManager( 1336):    at android.os.FileObserver$ObserverThread.run(FileObserver.java:88)

I am compiling using mmm /root/android/system/packages/apps/Contacts/

My doubt is when i recently rebooted my machine the output directory of the installed app is changed from OldPath : /root/android/system/out/target/product/vision/system/app to NewPath : /root/android/system/out/target/product/generic/system/app

all my other apps are present in the old path and when i install the contacts.apk from old path it installs properly and after i rebooted my machine and when i try to install from the new path where it is built, it gives me the following error. I don't understand what enviroment issue could that be? Could any one suggest me what can be done.

adb push Contacts.apk /system/app/Contacts.apk

Was it helpful?

Solution

You forgot to lunch before building. That's why it's building in out/target/product/generic instead of out/target/product/vision. It looks like your generic build is set up to build odexed apks, which is why there is no classes.dex inside the apk.

. build/envsetup.sh
lunch vision-userdebug # or -eng or -user
mmm packages/apps/Contacts
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top