yashsingh1/xdaforums huggingface dataset:
[myTouch 3G, Magic Android Development] jubeh:
Yeah, I rebuilt it with that setting (use old camera hack, looking at the Android.mk, looks like not using it would prevent building the camera from source anyway). I repo sync daily, sometimes twice a day, so I guess that yeah, it got broken on a recent patch.

About the gallery 3D, I am indeed considering adding Legacy gallery back. Most files are still there (if you diff both Camera/ and Gallery/ the changes are minimal), so I'll just add the gallery files back to camera and build that, saves a few kb as opposed to building both camera and gallery, and when gallery 3d is working again, camera/gallery can be disabled by a simple commenting out in android manifest, that's how i did with cupcake, donut, and eclair (on eclair you just had to add the camera and widget intents and activities back to gallery). Adding the files back adds only about 12 kb to camera as opposed to ~400k for the compiled gallery app.

The video encoding is an issue for me, though, so guess I'll just wait until kernel 2.6.35, which I think you said adds experimental support for donut camera libraries

---edit----

btw, i did remove pulling libcamera.so and /obj/lib still complained it needed it. Nothing jumps at me as to why, but I guess it doesn't hurt pulling it too since I already have it anyway.
[myTouch 3G, Magic Android Development] hyperion32:
Hello to everyone ...

So I made a new VM running ubuntu 10.04 64bit + java 1.6. Repo sync (master branch)

yesterday + git clone android-msm-2.6.32. Before starting the build ... I modified prelink map, JIT additions, libaudio (LOCAL_PRELINK_MODULE := false) and libcamera2 (both kernel + driver).

Now the build stops at:

target Executable: app_process (out/target/product/sapphire/obj/EXECUTABLES/app_process_intermediates/LINKED/app_process)

/home/christos/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: warning: librpc.so, needed by out/target/product/sapphire/obj/lib/libgps.so, not found (try using -rpath or -rpath-link)

I thought that the libaudio trick might work here also but when I tried

mmm -B hardware/msm7k/librpc

I got the following error:

make: *** No rule to make target `out/target/product/sapphire/obj/STATIC_LIBRARIES/libpower_intermediates/libpower.a', needed by `out/target/product/sapphire/obj/SHARED_LIBRARIES/librpc_intermediates/LINKED/librpc.so'. Stop.

I tried: make libpower (which worked !!! but I do not know why or if this is correct)

and then mmm -B hardware/msm7k/librpc which also worked.

Then make -jx ... and the build finishes with no errors. BTW my device is a google ION (32B).

So ... I fastboot the images but (of course) nothing works ... the phone never passes the google IO screen and I have no access to adb logcat to check for errors ... adb logcat

says "waiting devices"

Any ideas ... anybody ???

Please excuse my English ... not native lang
[myTouch 3G, Magic Android Development] jubeh:
Sometimes things break between commits. A popular one is libwebcore.a, repo sync at a slightly later time and try again, usually does it for me.

Also, you might want to switch branches. froyo is slightly more stable than master, as master seems to be updated constantly where froyo is still where it was where it first dropped.

I'm switching to that branch to see if that fixes my camera issue.
[myTouch 3G, Magic Android Development] sharpt71:
Thanks dferreira and many others on this discussion thread for your help. I finally got all image files built. However, I am not sure if they work. So, is there a way to verify the robustness of the built images without flash them into phone?

I tried to run these images using the emulator from SDK, but it gave me blank screen.
[myTouch 3G, Magic Android Development] InTr4nceWeTrust:
thank you very much. i'll go ahead and try to flash your version instead
[myTouch 3G, Magic Android Development] dferreira:
If it doesn't pass the first splash and you can't get adb to connect to the device, usually is a kernel issue. I remember that the last update I did on my kernel using the camera stuff from Cyanogen, I never passed that screen :( I didn't manage to see what was wrong, as I was without the sapphire after that. Try your image system.img, but replace your boot.img with cyanogen's one. Also, don't forget to push wlan.ko from his rom, so that you have wifi. Wifi and the kernel need to match, otherwise the wifi gets broken.

Another option, would be to try to figure out what is wrong with cyanogen's changes at the kernel and fix it. Or just keep the kernel as default, at the expense of a non-working camera for now.
[myTouch 3G, Magic Android Development] JackMagic:
Same version, just a different .zip file - something must have gone wrong in the one I sent to df before he uploaded it.
[myTouch 3G, Magic Android Development] jubeh:
Fixed video recording.

It's missing a property at build.prop, add the following

media.stagefright.enable-record=true

This should add video recording.

I need to do a bit more testing because video seems kinda bad quality, maybe I need to check the resolution settings and the codec that's being used (even add an option to change codec like CM does, I might pull the code from there).

I don't have the time right now, but anybody can check for further options that stagefright can handle?

Anything on your build.prop that you want added to your build, you can possibly toss it on /build/target/product/core.mk since it already has some stagefright property defines.
[myTouch 3G, Magic Android Development] JackMagic:
Nice find jubeh, I'll have a play with that on my Sapphire later and see what quality etc is like.

I found a bit of info on the issue here..

http://groups.google.com/group/android-platform/browse_thread/thread/b6fb60c4875395d5?pli=1

..which you may have already read.

Edit: Think I might have some up with a fix, trying it out now and will post back :)
[myTouch 3G, Magic Android Development] JackMagic:
Okay well, adding that property to the build.prop didn't work for me :(

However, I was also experiencing some issues with the dimensions of the camcorder within the app, and so I changed out the AOSP media_profiles.xml with cyanogen's one from his RC2 build of CM6. It's found in /system/etc/media_profiles.xml - it may fix the quality issues you're experiencing jubeh. (The width/height values, and framerate, for the CamcorderProfile were different, I didn't just swap the files over on the offchance :P)

In an unrelated note, is anyone that's using cyanogen's kernel with df's system image noticing any of the following issues:

- home button unresponsive

- no lockscreen after power button then waking the phone

I hope they fix the AOSP kernel soon so wifi isn't broken, then we needn't use cyanogen's anyway :(
[myTouch 3G, Magic Android Development] amitabhishek:
I have been trying to compile AOSP for dream for past few days but this error is like dead-end for me. Yes, I have downloaded the correct driver from HTC; i have also done prelink-linux-arm.map patching as mentioned in the first post.

Someone please help!
[myTouch 3G, Magic Android Development] jubeh:
Building for Dream, you have to use this prelink map: http://github.com/CyanogenMod/android_vendor_cyanogen/blob/froyo/prelink-linux-arm-ds.map

The one on first post will not work correctly on Dream.
[myTouch 3G, Magic Android Development] jubeh:
You have to make sure that all elements for your camcorder are correct. In my case, this is what I had to do:

-Use CM kernel (from CM6RC2) and wlan.ko (just so that you get wifi), toss them in /device/htc/dream-sapphire to replace AOSP's

-Clone libcamera2 from github.com/CyanogenMod

-Comment out the libcamera copies to /obj/lib and /system/lib

-Add libcamera2 to your /hardware/msm7k/Android.mk list of common msm7k dirs

-Add the "BOARD_USES_OLD_CAMERA_HACK=true" to your /vendor/htc/dream/BoardConfig.mk

-Add "BUILD_WITH_FULL_STAGEFRIGHT=true" to your /vendor/htc/dream/BoardConfig.mk

-Add "USE_CAMERA_STUB=false" to your /vendor/htc/dream/BoardConfig.mk

-In my case, I had to comment out "USE_CAMERA_STUB=true" from BoardConfigs in /device/htc/dream-sapphire and /device/htc/dream, there seems to be an error where the property is being treated as a toggle rather than a setting (it's true, then true which sets it false, then false which sets it as double false so it sets it to true again), Just setting camera stub to false on boardconfig on /vendor/htc/dream would still give me a camera stub.

Build and flash. That should give you camera.

There are still problems, for example, there is a control on the camera that crashes whenever you select it (zoom) because the option is not available with the dream camera, you just have to remove it; comment out lines 69 and 70 on packages/app/Camera/src/com/android/camera/ui/CameraHeadUpDisplay.java

mZoomIndicator = new ZoomIndicator(context);
mIndicatorBar.addComponent(mZoomIndicator);

I noticed Camcorder doesn't switch orientation like camera does, is this behavior normal.

I also have another issue where after taking a video, the camcorder viewfinder won't draw again, you have to switch to camera and then back to video to get viewfinder back.

I'll debug that and see.

I also need to check about the encoding bitrate, etc. The media_profiles.xml are doing nothing for me, so the problem is possibly at the stagefright source (CM's build uses PV for video encoding, his quality is better, I'll see if we can improve the video record quality of stagefright)
[myTouch 3G, Magic Android Development] amitabhishek:
Thanks!

Basis your input I tried the prelink from the github page. Didn't work, same error message! :(
[myTouch 3G, Magic Android Development] jubeh:
Weird

I tried building froyo but nothing happened, build doesn't boot at all, don't even get to a logcat.

Going back to master.
[myTouch 3G, Magic Android Development] dferreira:
libdvm is the Dalvik VM. Could be related to JIT on the Dream...
[myTouch 3G, Magic Android Development] amitabhishek:
Yup figured that! Tried compiling both with JIT fix and without it (mentioned by you in first post) but the same error. BTW generic build compiles without a hitch. Any ideas?
[myTouch 3G, Magic Android Development] jubeh:
Oh, by the way, yeah, you're right, you can safely remove libcamera.so from the unziped files list.

Turns out I had the file already on my staging folders, so when I tried compiling the libcamera2, it was still expecting libcamera.so. After refreshing the whole system, it built fine without libcamera.so.
[myTouch 3G, Magic Android Development] tk1978:
possible noob question. can i run the step for other devices (desire), too? i think that the kernel should be the same?

thx,

thomas
[myTouch 3G, Magic Android Development] dferreira:
You would need to change the msm_defconfig to whatever kernel config is for desire. Other than that, the rest should remain the same.
[myTouch 3G, Magic Android Development] jubeh:
How about building a more recent kernel?

I want to try android-2.6.35 from kernel/common since msm-2.6.32 seems to be broken now (even a straight up build won't boot on the device) and you mentioned that there's initial media support for donut camera drivers.

I know I'd have to use the msm defconfig, but is there something else I'd have to import?

I did a diff on both 2.6.32 heads for both projects (common and msm) and I saw that 2.6.32 had additional sapphire, goldfish, and trout sources. I imagine I need those to boot a kernel for the dream, right?
[myTouch 3G, Magic Android Development] dferreira:
Last time I checked, 2.6.35 would compile fine on kernel/experimental. The only problem is that 2.6.35 kernel image is larger than what others used to be, causing the boot.img not to be built. I didn't had the time to look for where we define the size of the kernel, but I do remember seeing in Cyanogen's vendor .mk where he defined the space for the kernel. He uses 2.6.34 on his ROM btw.
[myTouch 3G, Magic Android Development] jubeh:
I built off of kernel/common, not experimental. Just a straight up make gave me a 1.1 MB large image.

What are the ones on experimental, are those candidates to be merged into msm/omap/tegra etc?

Btw, I noticed that the kconfig on arch/arm/msm for common was from 2007 :O. I tried merging the changes from msm to common, but gave up halfway through :D. I'm very much a newbie to the linux kernel, so I had no certain idea what I was doing.
[myTouch 3G, Magic Android Development] amitabhishek:
Hey guys kindly have a look and please help me with the issues that I mentioned earlier. Pasting it again to save some clicks.

I am also pasting your script which I modified for my 32B magic phone for your perusal.

SOURCE_FOLDER=~/magicDroid
BRANCH="master";
KERNEL="android-msm-2.6.32";

#snipped the download part

cd $SOURCE_FOLDER
cd ~/magicDroid

if [ ! -f dream_update.zip ]
then wget --referer http://developer.htc.com/adp.html http://member.america.htc.com/download/RomCode/ADP/signed-dream_devphone_userdebug-ota-14721.zip?

mv signed-dream_devphone_userdebug-ota-14721.zip dream_update.zip
fi

cd ~/magicDroid
if [ ! -d vendor/htc/dream/proprietary ]
then
cd /home/amit/magicDroid/device/htc/dream/
./unzip-files.sh
fi

cd $SOURCE_FOLDER/msm
make ARCH=arm msm_defconfig
make ARCH=arm CROSS_COMPILE=$SOURCE_FOLDER/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- zImage -j4

if [ -f $SOURCE_FOLDER/msm/arch/arm/boot/zImage ]
then
cp $SOURCE_FOLDER/msm/arch/arm/boot/zImage $SOURCE_FOLDER/device/htc/dream/kernel
fi

cd $SOURCE_FOLDER/system/wlan/ti/sta_dk_4_0_4_32
make KERNEL_DIR=$SOURCE_FOLDER/msm/ ARCH=arm CROSS_COMPILE=$SOURCE_FOLDER/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- -j4

if [ -f $SOURCE_FOLDER/system/wlan/ti/sta_dk_4_0_4_32/wlan.ko ]
then
cp $SOURCE_FOLDER/system/wlan/ti/sta_dk_4_0_4_32/wlan.ko $SOURCE_FOLDER/device/htc/dream/wlan.ko
fi

cd $SOURCE_FOLDER
. build/envsetup.sh

lunch
make -j4

cd $SOURCE_FOLDER/out/target/product/dream
echo 'Your files ready for flashing are here:'
ls *.img

There is no system.img:(.
[myTouch 3G, Magic Android Development] dferreira:
I need more output from the compilation. Your dalvik vm is failing to build, i can't figure out why like that. My suggestion would be deleting the dalvik folder on source and then when you do the repo sync, it will download it again fresh from the repositories.
[myTouch 3G, Magic Android Development] amitabhishek:
Thanks!

Post this issue I tried to debug in my own little way. In the process I have kind of messed up my entire AOSP folders. I thought of starting afresh but I am unable to download the entire source. Repo is just syncing the incremental changes (that are being done at git).

I tried creating new folder (magicDroid2) and rewriting the script accordingly but still no full resync. How can I download the entire AOSP again?

Edit: I downloaded the AOSP; will keep you posted once I compile.
[myTouch 3G, Magic Android Development] sharpt71:
AOSP without camera

I had tried this build thing a few weeks now. Still, no working images yet.:mad:

Now, from the info I collected so far, because camera is not fully functional on 32A due to old device driver was used, and because I had a lot of problems with camera when building images, is there a way to build Froyo images without camera? Sould I simply remove some definition from some .mk file? Thanks in advance.
[myTouch 3G, Magic Android Development] cougar694u:
For some reason I've never been able to compile anything.

I started with a fresh install of 32-bit ubuntu 10.04, fully patched, etc, followed step-by-step in the first post.

When I ran the android script, it goes through and syncs everything, then tells me java 1.5 is not supported and I need java 1.6, then when the script finishes, it lists no files for the ls *.img. I saved the entire output from there, not near as long as with java6. The exact message is:

You are attempting to build with the incorrect version of java.

Your version is: java version "1.5.0_18".
The correct version is: 1.6

I removed java 1.5, verified through update-alternatives, installed java 1.6, and it seemed like it was actually compiling stuff, but still no .img files in the sapphire directory (none anywhere in my home folder). It got a tone of warnings, but appeared to work, except didn't produce anything.

I can attach the entire output for both, java5 and java6 if you like.

Any ideas?
[myTouch 3G, Magic Android Development] dferreira:
If you set USE_CAMERA_STUB := true on the vendor folder .mk files, you are telling the AOSP that you don't want the camera. You'll also need to remove the lines that reference the camera.so files.
[myTouch 3G, Magic Android Development] dferreira:
Hi Luke,

Use the 64bit version of Ubuntu, you'll have much less headaches! And yes, the master branch uses Java6 instead of Java5 now, but it has some dependencies with 64bit binaries, hence the recommendation for Ubuntu 64Bits.
[myTouch 3G, Magic Android Development] dferreira:
Btw, I've just released my newest application on the Market: Family Calendar Awareness.

It's a new functionality for our android devices, which notifies you when a shared calendar or your own calendar gets changed. You also get the next upcoming event on the notification bar, meaning, no more need for the huge widget that the calendar application gives.
[myTouch 3G, Magic Android Development] :
Lovely work. I really appreciate.

I just downloaded the package i.e. ASOP FROYO 2.2 v3.1 because I was too tired to build one. And I got: boot.img, META-INF folder, and a System folder. How can I install it on my Magic?
[myTouch 3G, Magic Android Development] amitabhishek:
I assume that you have Java, fastboot, recovery ROM, adb blah...blah installed?

If yes, Google for "signapk.jar". Download this app. and unzip/unrar it. Go through readme.txt once that comes with the app.

Important step: Zip the System folder and add META-INF and boot.img to it. Now you will have a file called system.zip; with two folders and one file (boot.img) inside it. Rename it to update.zip. Copy "update.zip" to the folder where you have downloaded signapk.jar. At the terminal just copy-paste the the command from "readme.txt". Someone like this:

Once you have brand new update-signed.zip, put it in the root of your SD card and flash using recovery. Enjoy ;).
[myTouch 3G, Magic Android Development] JackMagic:
You needn't unzip it - the uploaded file is a signed update.zip package I made from dferriera's system images and cyanogen's kernel. So flash it from recovery as is. Nandroid first!
[myTouch 3G, Magic Android Development] :
I have:

SPL : 1.76.2007 Eng

Radio : 6.35.10.10

Recovery : Hero Recovery

I installed the package, but the phone gets stuck at "TIM" screen! It is TIM branded!
[myTouch 3G, Magic Android Development] eyegor:
Edit: Removed.
[myTouch 3G, Magic Android Development] JackMagic:
That radio is also 32A only is it not? This is for 32B.
[myTouch 3G, Magic Android Development] eyegor:
Right. Unless you change the kernel of course.
[myTouch 3G, Magic Android Development] amitabhishek:
I have managed to compile from AOSP but there is a slight glitch. Compiled boot.img refuses to boot the the phone. For the time being I am using boot.img from superF and things are working. But I am unable to pin point the error. My modified code is quoted below:

I have even used .config from superF and CM6 and commented out defconfig. But correct boot.img continues to elude me. Any ideas. Am I cloning the wrong tree?

I also tried compiling the kernel after downloading sources from developer.htc.com. But same result. ddms doesnt even blip :(.

BTW I am compiling for dream/32B Magic. :)
[myTouch 3G, Magic Android Development] :
Ok. So, I have a 32A and this Guide/ROM is for 32B. But you said that I can change the kernel. What does that mean?
[myTouch 3G, Magic Android Development] dferreira:
Make sure you do:

make clean

make installclean

Before compiling a different branch, otherwise whatever was breaking, will continue to break :(
[myTouch 3G, Magic Android Development] mamaheshwari:
Even I face the same problem as amitabhishek. I even did make installclean and make clean but didn't work
[myTouch 3G, Magic Android Development] DopyG:
This is for 32b right? How to install for 32a?
[myTouch 3G, Magic Android Development] sharpt71:
I found

http://xy0811.spaces.live.com/blog/cns!F8AECD2A067A6B17!1526.entry

is extremely useful. However, it is written in Simplified Chinese (mainly used in mainland China). Basically, its steps are pretty similar to OP's, the order is a bit different though. So you may not be able to read, but the commands can say for themself. After obtaining all image files, you can flash as usual for G1. If you have a 32A, don't boot yet before you flash CM6 EBI1/32A kernel patch.

The QUESTION, like I posted in a new thread, is what are the minimum modifications required for a 32B kernel to become a 32A kernel? Anyone? please.
[myTouch 3G, Magic Android Development] cougar694u:
I finally got the time to install the 64-bit version of 10.04. I ran all the same commands as instructed, same results. I guess I suck :eek:

Attached is my output from after the first time I ran it.
[myTouch 3G, Magic Android Development] jt12345:
Can I get root with this ROM?

I have this ROM installed on my 32B - thank you, Denzil, it's fantastic.

1 question: how can I get root now that I have this ROM installed?

Thank you, Jaime :-)
[myTouch 3G, Magic Android Development] dferreira:
You are missing libGLES_qcom.so inside the vendor/htc/sapphire/proprietary/ folder. You can get those files from any Cyanogen's ROM or the packaged zip from Jack on the initial post of this thread :)
[myTouch 3G, Magic Android Development] dferreira:
Put your phone back into fastboot mode (back and power button)

then fastboot amon_ra's fantastic recovery img.

i.e., fastboot boot recovery.img

then run from your pc the following: (assuming of course you have the android sdk installed)

adb shell

mount /system

cd /system/bin

cat sh > su

chmod 4755 su

reboot

And now your sorted with a nice rooted phone :)
[myTouch 3G, Magic Android Development] dferreira:
I wish I could help, but I don't own a 32A device :( Unless someone more experienced with 32A kernels jumps into this thread and helps you guys, there isn't really anything I can do to help as I can't test to see what works or not :-/
[myTouch 3G, Magic Android Development] suntongo:
get segmentation fault

I read this thread carefully and try time to time this 3 days. My host OS is ubuntu 10.04 with 2G memory. Inside that script I changed "master" to "froyo", selected "full_sapphire-userdebug. After fix those problems like "java heap space" & "not rules to...." but get a segmentation fault when compilling the file "out/target/product/sapphire/obj/STATIC_LIBRARIES/libv8_intermediates/snapshot.cc". I got no ider to fix/skip this problem.

What a hard job!
[myTouch 3G, Magic Android Development] Andrey765:
does this guide work for wildfire?

it would be nice if someone could help me to make the script posted in the first page for wildfire, if it's possible.

thank you
[myTouch 3G, Magic Android Development] Dominating:
Battery Drain

Anyone else having a huge battery life problem?, compiled and done a few fixes to the aosp source, although i'm using pershoots 2.6.35.9 kernel is that the issue??? but other then that wicked guide dferreira and i'd love to know if anyone else is having battery problems :)
[myTouch 3G, Magic Android Development] cougar694u:
I recently acquired a Nexus One and wanted to see if you had found how to get this to work for it. I looked at the script and don't know which kernel to use, or where to point the wget to get the update.zip.

Any updates? Since Gingerbread has been added to AOSP, is it possible to pull that one, or just FRG83D?

TIA!
[myTouch 3G, Magic Android Development] dferreira:
I have compiled yesterday Gingerbread for my Nexus One. Everything works except for white screen on transitions and the camera. The camera seems to be fixable by using Samsung's camera code, which I'll attempt to do today. The white screen cyanogen has fixed but I can't find how to fix it... I just wished he would have a development blog where he could share how he fixes some stuff :)