[Desire HD Android Development] ppaajjaa:
Mmmm, It is working until the first reboot :(

I've decided to analyze that...

I've found several files on the internet: GalleryGoogle.apk, com.google.android.gallery3d.apk, 4.2.2-GE-Camera-jd81.zip, 4.2Camera_t04.zip, Gallery2.apk, etc.

The most of them are the same. There are, however, two different camera apps - let's say A and B (look at the picture):

Camera A:

v.1: file size: 17536563 B, md5: 2ec021534a6a42905e2b92edcc16a261, source: http://d-h.st/hro (inside zip, it seems as new version with fixed bugs - I looked at the source code)

v.2: file size: 17476386 B, md5: 990d5e613b36a56f5423799aa26df2b4, source: http://d-h.st/qHA or http://d-h.st/tK6 or http://d-h.st/jky (older than v.1 with bugs)

v.3: file size: 17476386 B, md5: 7627f66fb00e52f62f628d99a3ee8ce6, source: http://d-h.st/sB0 bad file, wrong data - end of file padded with zeros

- features: rounded menu, auto focus on holding the camera button, image editing fails (FC)

Camera B:

v.1: file size: 7516519 B, md5: 0b51a8ea42aa97638ca1f4e8f41ae35d, source: http://d-h.st/1Rm

- features: circle menu, auto focus on holding the camera button, image editing works, photosphere doesn't work (just says that it is not supported and closes)

- photosphere is supported only on "Galaxy Nexus", "Wingman", "GalaxySZ", "SAMSUNG-SGH-I747", "SGH-I747", "SAMSUNG-SCH-I535", "SCH-I535", "SAMSUNG-SGH-T999", "SGH-T999", "SAMSUNG-SPH-L710", "SPH-L710", "SAMSUNG-SCH-R530", "SCH-R530", "GT-I9300", "occam", "Nexus 4", "manta", "Nexus 10"

v.2: file size: 7278385 B, md5: 5f04124d33f44fc494e31a40479bb4f9, source: http://d-h.st/LEm or http://d-h.st/aIy (inside zip, it is v.1. with hacked DeviceManager class)

- features: circle menu, auto focus on holding the camera button, image editing works, photosphere

- DeviceManager.isDeviceSupported() method is changed in the way that it always returns 'true', so the photosphere should work on all devices (Desire HD doesn't have gyro, so don't expect it will behave as it should)

I'm currently running on Camera B v.2 but looking at Camera A v.1, because it has nice UI.

So if you want to have everything working without FC behavior, install the zip file with Camera B v.2: http://d-h.st/aIy.

Enjoy it...

What I've found out btw:

1. It doesn't matter what is the name of the apk. The file can be copied directly to /system/app by this procedure (needs root):

adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cp /sdcard/Galery2.apk /system/app/
chmod 644 Galery2.apk
mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system

then reboot...

I made backup of course and removed old gallery apks before that. If you don't understand the commands, don't try to run them!

Well, this is not good way how to act. The only apk is not enough. There are more files e.g. for photosphere that needs to be copied also (native libraries *.so to /system/lib) and it is better to do it in once by installing update zip file. So install "4.2Camera_t04.zip" or "4.2.2-GE-Camera-jd81.zip" rather than copying apk and *.so files.

2. The "image editing FC behavior" can be fixed for one session by installing apk by standard way through file manager on the mobile phone. Package manager duplicates the apk into the /data/app/com.google.android.gallery3d-1.apk and creates lib dir in /data/app-lib/com.google.android.gallery3d-1. After that image editing works.

When you reboot the device, apk is removed from the /data/app directory and the image editing starts failing again. Not sure how it can be fixed forever. If you know why Android deletes the apk from /data/app, please tell me.