yashsingh1/xdaforums huggingface dataset:
[Hero, G2 Touch Android Development] gocegi:
about the camera issue... Maybe this could help out

1) Download this latest (for 2.2) source snapshot - http://android.git.kernel.org/?p=platform/...32dbf81b;sf=tgz

2) Find in Camera.java function named restartPreview() (this function called locally after each onPictureTaken event)

And add two lines before startPreview();

Remark: Function startPreview() works correctly after closeCamera() because in startPreview() camera object reopens if it not exist

3) And also try to find and comment all code which controls zoom function of camera and shows zoom HUD icon.

Because our camera have no zoom, and camera app forceclosed after touching this icon.

4) Compile and enjoy)

Original Thread post #251 By anegin dev @ T-mobile Pulse
[Hero, G2 Touch Android Development] riemervdzee:
Could always be something to look at aye. But still, this is a patch for ROMs, not sure whether it would work. But yet again, camera is a bit abra cadabra for me ;)
[Hero, G2 Touch Android Development] riemervdzee:
Version 0.2.1 is out!

Not anything trivials, but there is a speed increase. Especially that the dreaded bootting times have been reduced a lot. It boots now in ~120 sec, instead of the ~330 sec it required earlier.

For download, see Opening Post
[Hero, G2 Touch Android Development] Wupper:
You're going to fast :D. Anyway, mirrored!
[Hero, G2 Touch Android Development] dkelley:
Sweet work - amazing that you're managing to work around your previous frustrations with this project!

abra cadabra - camera will work one day :-)

the rest is your own abra cadabra magic to get a 300% decrease (or is it 200%? I can never think clearly in percentage math) in your boot time!!

So are we getting to the point where the only significant issue is the camera instability?

Cuz what your .35 kernel brings to the table it simply outstanding :-)
[Hero, G2 Touch Android Development] keyra74:
faster boot confirmed :D go riemer go !

boot is indeed faster but now it takes age to wake up from lockscreen

doesn't even wake up now, had to restore
[Hero, G2 Touch Android Development] riemervdzee:
I switched back to the completefair-sceduler(CFS), instead of the brainfuck-sceduler(BFS) in earlier builds.

When finally booted up, there is quite a high load generated by everything. I guess BFS put some extra cpu cycles into the GUI elements making the phone appearing more responsive. However the load is solved way quicker in the CFS one.

Still, I agree the first boot is kinda a long trip when the whole phone is fired up in CFS. I think this is due the fact SD-card IO operations take too long, do you have a lot of apps on the sd-card? (apps2sd, by script of froyo-style?).

Hope to tackle this problem in the future, so we can continue with CFS.

However when all fired up, CFS works better for me. With BFS I sometimes had the problem it didn't gave some CPU cycles to SetCPU, which in turn would increase the CPUfreq when I turn on the screen. So with BFS I couldn't unlock sometimes... :-P

@dkelley, camera is currently one of the main issues aye. Still some more speed is always welcome, but the whole kernel is coming along quite good actually :-)
[Hero, G2 Touch Android Development] keyra74:
yeah i have a bunch of apps installed with app2sd
[Hero, G2 Touch Android Development] riemervdzee:
I'll see what I can do
[Hero, G2 Touch Android Development] sotux:
In the hero's BoardConfig.mk file, there is a definition as BOARD_USES_ECLAIR_LIBCAMERA := true

Shall we remove this definition to use froyo camara jni when compiling the rom ?
[Hero, G2 Touch Android Development] riemervdzee:
I'm afraid that will break support with the closed-source HTC camera control library. Also the camera works with one picture at a time now (after picture, reboot hehe), so I guess it just needs a few kicks in the nuts to get it working ;)

No need to switch bases/interfaces like you propose.
[Hero, G2 Touch Android Development] Ciprilik:
Dunno if it helps, but this was the same first problem that came with making the camera work on Gingerbread until SteelBytes fixed the camera fully. One shot then the camera stoped working.
[Hero, G2 Touch Android Development] riemervdzee:
I think I'm getting very close, I was able to take 6 pictures this morning. Then I tried to reopen the cam a few times and at the third time it went poof...

Gonna try it again a few times today.

I also noticed there is some wake-up problems when clocking too low. I prefer to have a screen off profile with 176-264 ondemand gov. Then it wakes up quite quickly. Other governors perform poorly though..
[Hero, G2 Touch Android Development] bluepinkpanther:
With this kernel we can have working camera in Sense 2.2 roms like ChocolateFroyo ?
[Hero, G2 Touch Android Development] riemervdzee:
Unfortunately my guess is no, the non-working cam on sense 2.2 ROM-ports have to do with the closed-source libraries I suppose.

It is a miracle steelbytes got it working on vanilla 2.3 ROMs, were we got the sourcecode off from google. It would be even tougher to get it working with no source at all (sense ROMs).
[Hero, G2 Touch Android Development] krispijn_s:
Mine has this as well... For proper wake-up behaviour, I need to set mine at least to 264 MHz. Must be a certain batch of Hero's thing. :confused:
[Hero, G2 Touch Android Development] mljjlm:
Nice One! :D
[Hero, G2 Touch Android Development] bluepinkpanther:
Oh Yeah! Great News
[Hero, G2 Touch Android Development] vatvedt:
Great work! Looking forward to trying this one :)
[Hero, G2 Touch Android Development] Dr34mc4tch3r:
Dear Sir,

Hereby I would like to let you know that you are AWESOME! Almost as awesome as the bodyslamming Casey. So pretty damn awesome that is!

cheers!
[Hero, G2 Touch Android Development] cartman333:
whats with the camera update :D ? i cant wait for it :)
[Hero, G2 Touch Android Development] riemervdzee:
Sorry for the delay. Although that afternoon -when I posted that tweet- everything all went quite OK, I now get cam-stability problems.

You can take a few pictures, but then you end up with a black-screen without any error or fault. Just that the operation is timed-out, god knows why...

Still, the differences between booting from fastboot and normally are gone. Progress is a tad slow lately, my appologizes for it.

I will probably post a new build soon, as the current one has a wakeup bug which has been fixed already in the source. Also some other miscellaneous updates have been made to improve general stability and speed.
[Hero, G2 Touch Android Development] riemervdzee:
New build is up!

Changes of last version 0.2.2:

Fixed up 2 wakeup bugs

Changed back to BFS, to increase responsiveness

Changed back to HTC camera driver, it is NOT FIXED. It is a nasty bugger actually...

Lots of general fixes/changes for stability/speed

For download, see Opening Post. Keep me updated of the experiences you have with this build :)

Enjoy
[Hero, G2 Touch Android Development] keyra74:
gonna check that tomorrow morning

couldn't resist, installed and testing right now... so far it's ubber slow!!!

ok took more than 2 minutes to stabilize but now its speed looks ok

edit 3 : froze on lockscreen for 10 seconds...
[Hero, G2 Touch Android Development] keyra74:
barecode scanner works like a charm but camera freeze after one pic

so far so good or almost :)
[Hero, G2 Touch Android Development] bonesy:
Whatever rom i use this with i cant get Mobile signal?
[Hero, G2 Touch Android Development] riemervdzee:
A tad more info is appreciated. Did it worked in earlier versions (if any)? How you mean no mob. signal? a cross is still there?

Any chance you can get me a dmesg log? (adb shell dmesg > C:/dmesg.txt)

It might be the radio though, but kinda clueless without more info about your exact HW.
[Hero, G2 Touch Android Development] keyra74:
had to restore my nandroid backup, phone wouldn't wake up :/
[Hero, G2 Touch Android Development] bonesy:
In Villainrom,Chocolate froyo and any rom over the last few days i have tried.Phone boots and has signal untill the sdcard is unmounted? Ill do a restore and get the log for you
[Hero, G2 Touch Android Development] dkelley:
I've always found that unmounting the sdcard on the hero with these alternate roms causes nasty problems (most roms seem to use some form of apps2sd or are froyo based which also uses a form of apps2sd ... maybe that's why, but I don't know for sure).

Since the hero has no internal storage of it's own (an android rule breaker), the sd card kind of should permanently live in the phone imho. It's not like extra user storage you can pop out and take with you because the phone needs it for many apps/games and even some widgets and launchers to run correctly.

I'm not saying that this is the heart of the problem for sure ...

...(and probably you can do the unmounting task just fine with the .29 kernel since you mentioned it in this .35 kernel thread specifically) ...

... but if you leave your sd card in and mounted at all times how does the .35 kernel work ok for you?

Cheers,

Mr. Ellipses. Aka Don, dkelley, droidkelley, that wordy annoying guy. ;-)
[Hero, G2 Touch Android Development] bonesy:
It only does it with this one,and i cant do anythign about it being mounted as its when it says preparing sdcard :'( ill flash it and do a log as soon as im at my pc
[Hero, G2 Touch Android Development] riemervdzee:
Ah, it happens when the sd-card is unmounted? I will see if I can recreate the problem. Edit: unfortunately I couldn't re-create the problem you mention :-/ A log would be appreciated

Hmm, how unfortunate... Didn't had this problem just yet with this build, still I asumme it is still there. What are your CPU freq?

I still recommend an off-profile with 129mhz - 264mhz(or something) ondemand gov.

I will check out some SMD stuff, could be related as I still see some warnings popping up with those.

~~~

Also, anyone know how I can test IO properly? I'm thinking of using the old YAFFS2 driver, so startup times are faster. Still, I want to see if there is any performance increase after everything is mounted.
[Hero, G2 Touch Android Development] keyra74:
i'm at 528/672

my old good hero doesn't like low frequency
[Hero, G2 Touch Android Development] developing:
Jesus, you can't be serious. How much battery life do you get with that config?
[Hero, G2 Touch Android Development] keyra74:
10 hours or so when i really use it :)

far more than enough since i always have a computrer next to me
[Hero, G2 Touch Android Development] riemervdzee:
Keep in note that these are the 3 values HTC have putted in their official kernel:

245760000,

480000000,

528000000

I think the off-profile is on-demand with the first 2 values, and on-screen the last 2 values? (Ain't sure, have to check it out).

So well, it should be able to go lower by default actually... Maybe try different values out a little?
[Hero, G2 Touch Android Development] jamesking420:
Will this working .35 kernel for CDMA Hero help you with your kernel?

http://xdaforums.com/showthread.php?t=911828
[Hero, G2 Touch Android Development] riemervdzee:
We are already co-operating. It is already a team-effort, although it seems I am the only one who got the GSM version :-P

Anyway they made some interesting camera pushes the last few days, will test them out soon. Yesterday looked promising, although you need to pick the cpu-freq and governor very specifically to make it work.
[Hero, G2 Touch Android Development] B1nny:
great work man ;)

If I could develop I would really help you.. BUT I can't xd
[Hero, G2 Touch Android Development] bonesy:
E/ActivityManager( 162): CPU usage from 0ms to 7467ms later:
E/ActivityManager( 162): 43% 162/system_server: 37% user + 6.6% kernel / faults: 1790 minor 37 major
E/ActivityManager( 162): 5.5% 243/com.android.launcher: 5% user + 0.5% kernel / faults: 386 minor 9 major
E/ActivityManager( 162): 4.5% 214/com.android.systemui: 4.3% user + 0.2% kernel / faults: 195 minor 3 major
E/ActivityManager( 162): 4.5% 261/com.android.phone: 4.1% user + 0.4% kernel / faults: 239 minor 38 major
E/ActivityManager( 162): 4.4% 251/com.SirSoft.inputmethod.latin.sensemod.multi: 4.4% user + 0% kernel / faults: 184 minor 5 major
E/ActivityManager( 162): 3.7% 382/zygote: 2.9% user + 0.8% kernel / faults: 2335 minor 1 major
E/ActivityManager( 162): 3.1% 289/android.process.acore: 2.8% user + 0.2% kernel / faults: 458 minor 2 major
E/ActivityManager( 162): 2.2% 338/com.android.settings: 2% user + 0.2% kernel / faults: 221 minor 19 major
E/ActivityManager( 162): 1% 233/com.google.process.gapps: 1% user + 0% kernel / faults: 46 minor 3 major

Is this anything to worrky about? Cyanogen nighly builld with las venturas kernel
[Hero, G2 Touch Android Development] riemervdzee:
Mwah there is indeed a high load. We still need to put some optimizations into it. Especially linpack scores are a tad low (guess it is bad in memory writes/copies).

Anyway a new build will be up soon I think, switching to the old yaffs2 which seems to be better for our hero's as well.
[Hero, G2 Touch Android Development] g0at:
Hi bud,

First off - fantastic work on this to date. Have been following this thread periodically & can't wait til its in a state for me to use as my daily kernel.

Not too sure if this is the right place to post but my request seems more kernel than rom related ...

USB host.. I've seen n1 and g1 threads were a USB host driver has been implemented & wonder whether it's possible on the hero's chipset? Curious to see whether a wired keyboard or gamepad / controller could ever be used?
[Hero, G2 Touch Android Development] riemervdzee:
Hmm, it should be possible. Read some papers about it quite a while ago. Still I believe switching between host/slave is an arse and requires a reboot? (then you will have the problem you don't know whether the user wants host/slave mode etc.).
[Hero, G2 Touch Android Development] riemervdzee:
A new version is out!

See OP for download link

Changes of last version 0.3.0:

Attempt to fix another wake-up bug, it is better but not perfect (will be perfected in patch-release).

Switching to yaffs2-old from the .29 kernel. My tests have shown it isn't worth the hazzle yet for everybody switching to it (if you want to use it, you also need a recovery with the new yaffs2, all roms+kernel should use it etc...). This will give a speed boost as well for those who come from .29 as things don't have to be converted. Thanks to s0be

Switching to NOOP IO driver, performs quite well for our simple sd-cards.

Some camera fixes. There is a random chance you actually might be able to take a picture. But this chance is lower that you get money back from the taxoffice ;)

Some random clean-ups in code.

Due to the yaffs2-old change and some other things, I found it worthy to bump the version to 0.3.0. Also some progress has been made to fix an annoying wake-up bug. I hope to get it fixed Asap and release it as 0.3.1.

Enjoy, please post your reviews if you are trying it out.
[Hero, G2 Touch Android Development] keyra74:
testing right now

no more wake up bug!

camera works only for barecode scanning but does it good

took a little while to show all my apps but now it's all good
[Hero, G2 Touch Android Development] riemervdzee:
Yup, it is quite solved now. I'm a happy man ;)

I can now set the off-profile to 19mhz-176mhz on-demand now without any wake-up problems. Only problem is that usb sometimes reconnects at 19mhz, but this is acceptable for now.

Anyway enjoy. Let me know how the general experience is when playing with it a bit longer :)
[Hero, G2 Touch Android Development] kiljacken:
Testing it now :D

First thought: Dang, this **** is fast!!
[Hero, G2 Touch Android Development] riemervdzee:
Hmm, I get all of the sudden reboots when the phone is sleeping at battery.

Surely don't like this :-/

edit: Taken the link off-line, will do some tests...
[Hero, G2 Touch Android Development] Wupper:
Just when I was about to post a link to my mirror :P.
[Hero, G2 Touch Android Development] riemervdzee:
Here is a new build which -should- fix the reboot issue. Still, I haven't tested it properly ;)

http://www.multiupload.com/DQ6SKZTTFU

I ain't posting this on the OP just yet. See it as pre-0.3.1.

edit:

Changes of last version 0.3.1:

wake-up bug in acpu should be gone now

fixed reboot issue when sleeping on battery
[Hero, G2 Touch Android Development] CraigHardy:
Damn your on the ball riemer :)

Was just about to post regarding that issue, will test out the debug build and give you some feedback
[Hero, G2 Touch Android Development] riemervdzee:
I think I found the issue, but it makes absolutely no sense. It are some cleanups they did at the cmda kernel, and if I ain't going nuts, that would be the cause. I think S0be thinks I am a complete idiot with me thinking this is the bugger haha :P

It would be great if you could test out the debug one. So far it still runs OK here. Please post whether it rebooted or not, it would be of great help (it means I ain't getting retarded :P).

Gonna grab myself a beer... that is for sure ;)
[Hero, G2 Touch Android Development] keyra74:
weird i didn't get the reboot thing, gonna update anyway
[Hero, G2 Touch Android Development] riemervdzee:
From my friend S0be:

"I DO know it's racy. I can go hours without a reboot, then reboot 6x in an hour. "

I guess you should consider yourself lucky you didn't ;) Anyway it seems I haven't lost my mind and it is indeed the cause. it has been fixed at:

https://github.com/s0be/cm-kernel/commit/f405e37f8cff646d4b4e1d90c86665a1b1d22003

Which is somewhat similar to 0.3.1 debug's fix. Probably will post a new build today :)
[Hero, G2 Touch Android Development] keyra74:
moar! i didn't even nandbackup since yesterday and i used almost everything i use daily
[Hero, G2 Touch Android Development] riemervdzee:
Official version 0.3.1 is out!

See OP for download link.

The debug build I posted yesterday has been declared as official.

Although the fix at my github is a bit different as included into this build, the differences aren't much enough to post a new build.

Changes of last version 0.3.1:

wake-up bug in acpu should be gone now

fixed reboot issue when sleeping on battery

I will now try to update to 2.6.35.11, based on the work s0be did on the HeroCMDA version.

He claims it is a tad more stable and camera is less "racy", meaning it has bigger chances to work :)

Gonna be a big job though to merge with his work... Bring in the coffee hehe
[Hero, G2 Touch Android Development] CraigHardy:
Tested the debug version, close to 13hours, not one reboot :) 4 7-8 minute calls, 300 texts 15 mins browsing my emails etc only 16% degredation in battery ;)
[Hero, G2 Touch Android Development] iHero96:
what are the benefits to use this kernel and not another one like flykernel??
[Hero, G2 Touch Android Development] riemervdzee:
Not much, yet ;) the blitter seems to be faster, while linpack scores are lower. Ext4 is also fully supported (still I recommend ext2 partitions on sd-cards).

WiFi tether should work, but it doesn't.

Also, the number is higher. which is cool, right? ;-P
[Hero, G2 Touch Android Development] CraigHardy:
Well it seems a little more responsive for me, quite impressed with how much work has been put into it by the dev :)
[Hero, G2 Touch Android Development] f_padia:
thats excellent! i get about 50% drainage in 24 hours with flykernel with fairly light usage. This certainly sounds like its better on battery.
[Hero, G2 Touch Android Development] bonesy:
Out of curiosity is this designed specifically for CM builds? Or like flykernel " a bit of everything"
[Hero, G2 Touch Android Development] riemervdzee:
I run cm7 nightlies and try to be as much compatible with those. Also most roms are CM based anyway, for except the Sense roms.

the flashable zips are based on koush anykernel though, so it can be flashed for any available rom.
[Hero, G2 Touch Android Development] keyra74:
finally had to restore... tried to launch winamp + sms and it resulted as a enormous fail, couldn't do anything, couldn't quit or else, totally frozen
[Hero, G2 Touch Android Development] gavtaylor:
lol :) #10chars
[Hero, G2 Touch Android Development] riemervdzee:
Hmm a shame... I'll put the k-panic into the kernel again then, then it'll dump some logs and reboot if it goes mad.

Almost finnished with my kernel rebase though. RC 0.4 coming up, which could be either more stable or not. Unfortunately the cam ain't showing any improvement though.
[Hero, G2 Touch Android Development] riemervdzee:
0.4 RC1 download:

http://www.multiupload.com/UGC4I8A79X

This is a rebase from cm-kernel to perfshoot's kernel (which is a modded cm), updating the linux version to 2.6.35.11.

I've noticed boot times are a bit shorter again, also it is a bit more snappy in my opinion when all fired up.

Still, it could be a bit unstable as the merge has been completed just yet and I haven't had time to test it a lot.

If you post new reports etc. please post which version you use ;) I won't add this link to the opening post just yet, as I want to test it a bit more.

0.3.1 is still declared as stable. while this RC is the head version for now.
[Hero, G2 Touch Android Development] bonesy:
So if i wanted to try and use this with a sense rom id have to unpack the kernel, extract and replace the ramdisk then rebuild?
[Hero, G2 Touch Android Development] riemervdzee:
Nope, this does anykernel for you :) It creates a ramdisk based on the old one and the new kernel.
[Hero, G2 Touch Android Development] bonesy:
Ideal thanks :) going to try and get it going with Chocolate froyo...Nothing to lose as cam doesnt work anyway!
[Hero, G2 Touch Android Development] keyra74:
here goes nothing, gonna check 0.41
[Hero, G2 Touch Android Development] bonesy:
??? 0.31 you mean?
[Hero, G2 Touch Android Development] riemervdzee:
See a few posts above ;) 0.4.0 RC1 is a test version (I need better numbering though...)
[Hero, G2 Touch Android Development] keyra74:
sounds ok for now, i'll tell you tomorrow
[Hero, G2 Touch Android Development] riemervdzee:
With which version is this?
[Hero, G2 Touch Android Development] keyra74:
frozen on lockscreen...
[Hero, G2 Touch Android Development] riemervdzee:
What does dmesg say? If it is stressing a lot try to force a reboot with the key-combo: call+menu+endcall

then try to grab the /proc/last_kmsg file (adb shell cat /proc/last_kmsg > dmesg.txt)
[Hero, G2 Touch Android Development] keyra74:
installing latest elelinux rom, if it does it again i'm gonna try to do that
[Hero, G2 Touch Android Development] bonesy:
Im using chocoloatefroyo rel2..

Strangely after a 2hr drive to the cinema it got signal? But after the film on the way home it lost it again..AND when i started watching the film it said 11:50pm then started going backwards in time! by the time i left it said 10:30! will keep an eye but no worries as its not a full rom anyhow and its not cm based :D
[Hero, G2 Touch Android Development] treesurf:
Don't complain, this kernel is making you younger!
[Hero, G2 Touch Android Development] riemervdzee:
lol, I will check it out :)
[Hero, G2 Touch Android Development] bonesy:
Lol it doesn't bother me it was just rather strange! Quite happy with how fast it is :)
[Hero, G2 Touch Android Development] riemervdzee:
Try to wipe cache and dalvik-cache next time before flashing the kernel. I'm currently about to post 0.4.0 as official, with some speed improvements and some cam fixes (which probably won't make any difference for you)
[Hero, G2 Touch Android Development] sjknight413:
just a quick note, tried the 0.4.0 version this morning, its amazingly fast and was going to be a daily for me but i noticed it broke kinetic scrolling. when scrolling down say the settings screen it would click things instead as you drag your finger down. you also cant 'fling' lists. hope you can get it sorted! this is amazing work riemer :)
[Hero, G2 Touch Android Development] keyra74:
"bravo"! i laughed when i read on twitter you ****ed up your backup...

anyway i've been using your 0.41 for a whole day and no weird behaviour happened.