[G1 Android Development] mrboyd:
It was a failure for now. Android does not even start with the apk and odex in the system/app directory.

What I've done:

1/ Copied the ContactsProvider.* file on the sdcard

2/ Using adb shell copied the file to the system/app directory (using busybox)

(after remounting the system dir read-write)

3/ chmod 644 Contacts* to give them the same permission as the rest of the app

4/ reboot

What happens:

Android seems frozen on the Android logo while booting.

In fact it's constantly trying to restart the android framework, failing to load the contactsProvider and restarting.

Here's the interesting part of the log:

D/PackageManager( 273): Scanning app dir /system/app

D/dalvikvm( 273): GC freed 7118 objects / 369848 bytes in 103ms

I/PackageManager( 273): /system/app/ContactsProvider.apk changed; collecting certs

I/PackageManager( 273): /system/app/ContactsProvider.apk changed; unpacking

I/dalvikvm( 273): DexOpt: mismatch dep signature for '/system/framework/framework.odex'

E/dalvikvm( 273): /system/app/ContactsProvider.apk odex has stale dependencies

E/dalvikvm( 273): odex source not available -- failing

W/dalvikvm( 273): threadid=15: thread exiting with uncaught exception (group=0x40013e28)

E/AndroidRuntime( 273): Uncaught handler: thread android.server.ServerThread exiting due to uncaugt exception

E/AndroidRuntime( 273): *** EXCEPTION IN SYSTEM PROCESS. System will crash.

E/AndroidRuntime( 273): dalvik.system.StaleDexCacheError: /system/app/ContactsProvider.apk

E/AndroidRuntime( 273): at dalvik.system.DexFile.isDexOptNeeded(Native Method)

E/AndroidRuntime( 273): at com.android.server.PackageManagerService.scanPackageLI(PackageMaagerService.java:1935)

E/AndroidRuntime( 273): at com.android.server.PackageManagerService.scanPackageLI(PackageMaagerService.java:1610)

E/AndroidRuntime( 273): at com.android.server.PackageManagerService.scanDirLI(PackageManageService.java:1545)

E/AndroidRuntime( 273): at com.android.server.PackageManagerService.<init>(PackageManagerSevice.java:456)

E/AndroidRuntime( 273): at com.android.server.PackageManagerService.main(PackageManagerServce.java:257)

E/AndroidRuntime( 273): at com.android.server.ServerThread.run(SystemServer.java:110)

E/AndroidRuntime( 273): Crash logging skipped, no checkin service

I/Process ( 273): Sending signal. PID: 273 SIG: 9

I/ServiceManager( 26): service 'telephony.registry' died

I/ServiceManager( 26): service 'batteryinfo' died

I/ServiceManager( 26): service 'SurfaceFlinger' died

I/ServiceManager( 26): service 'power' died

E/installd( 36): eof

E/installd( 36): failed to read size

I/installd( 36): closing connection

I/Zygote ( 272): Exit zygote because system server (273) has terminated

D/AndroidRuntime( 287):

D/AndroidRuntime( 287): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<

From there on the runtime keeps restarting but I still have access to the shell. One point for Google the whole phone does not restart.

I managed to delete the files from system/app and the runtime started almost right away. (removing the .odex is enough).

I was trying on parallel to build the ContactsProvider from the source but it requires some file which are not in the SDK so I need to get the whole android source tree and my ubuntu does not have the right version of Git and has decided to fails the update on some hash issue and so on.. so this will take a while.

Another option that someone may want to look at, i might try if I have time.

the config file for MyFaves is in :

/data/data/com.tmobile.myfaves/shared_prefs/myfaves.xml

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>

<map>

<string name="short_code">453</string>

<string name="last_imsi">424021470431741</string>

<boolean name="installed" value="false" />

</map>

I was thinking maybe removing the short_code would prevent the application from sending sms. I wish I could see the code.

Decompiling odex anyone? :)