[ROM] SuperOSR and CyanogenMod7 on HTC ChaCha.

Search This thread

xd.bx

Senior Member
May 14, 2011
431
292
Is a problem in libcamera service hard to fix? Possible to steal libcameraservice.so from another htc device where the camera works on their cm7 rom?

It's a 600 kb binary, so it's a pain to reverse engineer. Your solution looks good although there are sadly few recent HTC ARMv6 devices as compared to the more common ARMv7. Maybe someone could try with the libcameraservice from the Wildfire S.

Sent from my HTC ChaCha A810e using xda premium
 

qbert456

Senior Member
Jul 21, 2010
432
34
Sorry I made a mistake, camera not working- when I actually took a pic for first time today it fc.

Just thought id say in case you thought I had a random working rom!

Sent from my A810e using Tapatalk
 

themickman007

Member
Sep 13, 2007
25
22
I'll give the wildfire s libcamservice a test now but I dont think that their camera is working either in the cm7 rom so probably the same issue. Thanks again for looking into this even though i know before you said you were over it haha.

Qbert - I am a big fan of smart keyboard pro. If you select it as the keyboard and turn on prediction it gives a neat one line bar above the keyboard (bottom of the screen) which looks much better than any of the others i have seen, as well as being the most accurate with predictions.

Edit: I'll try the HTC aria libcamservice first as it has a 5mp camera is a htc and they have a working cm7 camera

I have to say though this really has put me off htc for the future - wish they didnt have to make everything so hard.

---------- Post added at 09:51 PM ---------- Previous post was at 09:24 PM ----------

I'm getting a hang on the boot screen when replacing the libcameraservice.so with the one from the aria. I'm guessing its a different camera and it wont recognize properly. I am trying the desire s libcam because it has a 5mp and 0.3 front one as well. Different chipset though so i am doubtful it will boot
 
Last edited:

themickman007

Member
Sep 13, 2007
25
22
libcameraservice.so from desire s gets to the boot screen but running a logcat it looks like it has an error with media.audio_policy.

Ive tried replacing the audiopolicy.so file but that makes it worse. I am not sure what else to do at the moment so I'm just going through google and seeing if anyone else has had a similar problem
 
  • Like
Reactions: astro11

mosamjc

Senior Member
Nov 7, 2007
178
26
Out of curiosity, I tried the libcameraservice from the htc explorer and it booted up fine compared to the other couple I tried, which wouldn't boot at all. Unfortunately it just fc when I opened the camera app. I didn't do a logcat as I was away from my computer but I will later and see if it reveals anything useful.

Sent from my A810e using XDA Premium App
 

themickman007

Member
Sep 13, 2007
25
22
Was it from a cm7 rom or from stock? Ive been trying out the cm7 ones hoping that if it does boot it wont have those fc's
 

Alex C.

Senior Member
Aug 17, 2011
1,032
500
On the stock ROM, Camera Illusion works fine. We are using the same libcamera and liboemcamera as stock. I'm thinking this is an issue caused by the middle layer, that is the libcameraservice and libcameraclient. We already had to fix the CameraHardwareInterface, but obviously there is some additional magic required.

It's also very possible that the kernel sources provided by HTC do not match the actual sources they used to build the stock ROM.

EDIT: in fact, it would be very useful to try a CM7-based ROM with the stock kernel. Even though touchscreen won't work, we can try the Camera by key navigation. Anyone feels up for this?
Give me a shout if you need any testing done. You can also use GTalk/Yahoo if you want.
 

xd.bx

Senior Member
May 14, 2011
431
292
Hello guys,

Thanks to everyone for the additional camera tests. In addition, the main developer of the WildFire S CM port has kindly pointed me to his latest commit: https://github.com/alquez/android_device_htc_marvel/commit/e58ccace534da5f88ed9774e7fb87966cf495776

In summary, it replaces the proprietary libcamera.so with a version compiled from sources, which is very useful for debugging, leaving only liboemcamera as the remaining proprietary library.

The other route is instead to push the libcameraservice from stock ROM into CM7. It will not work out of the box since new APIs were introduced, so a slight tweaking of the camera client may be required.

EDIT: a careful study of differences between stock and CM7.1 shows several new parameters not present in CM7. Some are related to the face detection engine used by HTC. The most interesting is the capture-mode, which does not exist in CM7. See attached file.
 

Attachments

  • differences-params.txt
    1.7 KB · Views: 9
Last edited:

themickman007

Member
Sep 13, 2007
25
22
Hey i cant really say i understand all the differences but i have noticed that when recording a video it only shoots at roughly 1 frame per second and in the params there it has a section called video size and format. There is also a similar one for picture size and format could it be that the camera doesnt know what size to shoot at?

Sorry i cant be of more help im trying to learn this stuff as i go along :eek:
 

xd.bx

Senior Member
May 14, 2011
431
292
Alright, sorry for being off-topic, but as I was reading android-building, I came across

This page contains binary image files that are provided for use in restoring your Nexus device's original factory firmware. These files are for use only on your personal Nexus devices and may not be disassembled, decompiled, reverse engineered, modified or redistributed by you or used in any way except as specifically set forth in the license terms that came with your device.

<rant>Once again Google pretend they like openness, although in truth they don't care -- in this regard, they are no better than HTC. In fact, they never bothered to include the hardware support that Qualcomm provided in the Code Aurora Forum. I'd like to also quote from http://source.android.com/tech/encryption/android_crypto_implementation.html:

While the actual encryption work is a standard linux kernel feature, enabling it on an Android device proved somewhat tricky. The Android system tries to avoid incorporating GPL components, so using the cryptsetup command or libdevmapper were not available options.

Fortunately, the startup that made Android chose the (GPLv2) Linux kernel before it was bought by Google. Otherwise, we might have been left with a binary-only, BSD-style kernel instead. Think about it. </rant>

---------- Post added at 09:33 PM ---------- Previous post was at 09:31 PM ----------

Hey i cant really say i understand all the differences but i have noticed that when recording a video it only shoots at roughly 1 frame per second and in the params there it has a section called video size and format. There is also a similar one for picture size and format could it be that the camera doesnt know what size to shoot at?

Sorry i cant be of more help im trying to learn this stuff as i go along :eek:

Yep. I'm also thinking about video acceleration and the yuv420sp-adreno parameters, it's like shooting works but playing it back is not hardware accelerated.
 
  • Like
Reactions: adlx.xda

xd.bx

Senior Member
May 14, 2011
431
292
adlx.xda: I did a fresh CM 7.2 build, as almost everything works (the new Dialer is awesome!) However the 0/Symb key always shows the IME selector dialog instead of the proper key. Any idea? (I'm using your kl/kcm files).
 
Last edited:
  • Like
Reactions: astro11

adlx.xda

Inactive Recognized Developer
Feb 4, 2010
1,541
1,752
Madrid
  • Like
Reactions: xd.bx and astro11

xd.bx

Senior Member
May 14, 2011
431
292
Have a look a this commit http://www.assembla.com/code/androi...sets/fcd8943702afd43b621954f4f1637c4f6155df5f

Look at the comment in the system.prop file especially ;) .

Thanks, that's a clever change :)

BTW I managed to debug mediaserver on stock with the gdbserver from the latest NDK. It's actually rather easy as long as you don't forget to set solib-search-path (the list of break-able functions in libcameraservice.so can be obtained with option -T of objdump from the NDK). However I can't attach at the start of mediaserver which is when it seems to pass the parameters (or maybe I'm setting a breakpoint on the wrong function).
 
  • Like
Reactions: adlx.xda

xd.bx

Senior Member
May 14, 2011
431
292
Last edited:

qbert456

Senior Member
Jul 21, 2010
432
34
On this latest cm build, what happens when the keyboard is used? Any word options please?

Sent from my A810e using Tapatalk
 

Alex C.

Senior Member
Aug 17, 2011
1,032
500

qbert456

Senior Member
Jul 21, 2010
432
34
Somone told me to try smart keyboard pro, so I have and it works well with a hardware keyboard, options come up as they used to.

Thanks for that tip earlier!

Sent from my A810e using Tapatalk
 
  • Like
Reactions: adlx.xda

xd.bx

Senior Member
May 14, 2011
431
292
in the last CM7 build i have no more problems with the phone.apk :).
but unfortunately my german keylayout does not work :(

Awesome! Since I'm now using the same ro.ril values provided by adlx.xda, it probably fixed this issue for you. Btw, adlx.xda, where did you find there values from?

However I switched to the standard keycodes as used elsewhere in CM7 (Vision, etc.). This means you cannot use the kcm files from stock ROM, but need instead the kl/kcm files that are made for SuperOSR (I think there is a link to these files in the first post).
 

Top Liked Posts

  • There are no posts matching your filters.
  • 54
    Hello everyone!

    This topic contains all the development stages of custom ROMs, please read the full topic before asking any questions; refrain from asking silly questions/"questions that are easier to answer on Google than logging into XDA, browsing to HTC ChaCha, dev section, this thread, click on post reply, entering the question, clicking submit, waiting for someone to read and reply"/un-constructive feedback-criticism/anything unrelated to these two roms.

    In the order of their availability:

    NOTE: Give thanks and feedback to the developers. Install any of these roms for the purpose of testing and providing information/feedback in the thread. Neither of these are stable yet, they are experimental builds and this topic represents the simplest bug tracking database.


    Apparently users do not read the known issues list. FRONT CAMERA is NOT working. Do not switch to front camera, otherwise Camera.apk will crash constantly. To fix this go to Settings -> Applications -> Manage -> All -> Camera -> Clear data and cache -> Reboot your phone.

    I. SuperOSR by adlx.xda
    SuperOSR (OpenSourceRom and CM) based ROM: SuperOSR-chacha-2.5-20120724.zip - 83.13 MB
    Current version: 20120329-0005
    More information about the ROM HERE.

    Release notes for 1314
    - New kernel with swap enabled. it will also now mount correctly your sd-ext partition as ext4 (if formated as ext4, which is the how my CWM will format it).
    Release notes for 0159
    - FB key remap option in SupSetup/Parts
    - All the keypad fixes avail to date (only for unlocked users, S-Off will still need the patches)
    Release notes for 0513
    - Build is odexed --> I believe it is a significant gain of space in /data (now it will occupy <30 Mb after first start, leaving 120 Mb free)
    - Comes with all the keyboard kl/kcm.bin. (only usefull if S-On, bc S-Off lost their CID. If S-Off flash a keypad patch after the rom)
    - Removed bloat
    Tips and tricks, known issues and workarounds:
    1. Wi-Fi module is not connecting to hidden networks. - reported as fixed, router channel must be set <13
    2. Sometimes Wi-Fi will not connect to an AP after setting it up (Scanning -> Connecting -> Disconnected -> Scanning -> Connecting.. etc.). In this case press and hold the connection, remove it, create it again, then switch Wi-Fi off/on.
    3. I suggest performing the following if you still cannot connect to a visible Wi-Fi AP: Settings -> Wireless & networks -> Wi-Fi Settings -> Press menu button -> Advanced -> Regulatory domain -> 13 channels -> Wi-Fi sleep policy -> Never
    4. Front camera is not working. In study.
    5. Default battery icon and percentage battery icon shown at the same time if activated from the CM settings. No workaround available yet.
    6. Facebook button is unassigned (does nothing). What should it open?​


    II. CyanogenMod (by xd.bx) since 19.01.2012 adlx.xda took over
    CM 7.2.0 (CyanogenMod) based ROM: DOWNLOAD Release No.: 20120321-2039
    More information about the ROM HERE.

    Tips and tricks, known issues and workarounds:
    1. Wi-Fi module is not connecting to hidden networks. reported as fixed, router channel must be set <13
    2. Sometimes Wi-Fi will not connect to an AP after setting it up (Scanning -> Connecting -> Disconnected -> Scanning -> Connecting.. etc.). In this case press and hold the connection, remove it, create it again, then switch Wi-Fi off/on.
    3. I suggest performing the following if you still cannot connect to a visible Wi-Fi AP: Settings -> Wireless & networks -> Wi-Fi Settings -> Press menu button -> Advanced -> Regulatory domain -> 13 channels -> Wi-Fi sleep policy -> Never
    4. Front camera is not working. In study.
    5. Facebook button is unassigned (does nothing). What should it open?

    Other useful information:
    ChaCha Keypad Files/Key mapping
    http://xdaforums.com/showthread.php?t=1456154
    http://xdaforums.com/showpost.php?p=18763527&postcount=101 from adlx.xda
    These should be placed on your device to change your keyboard layout.

    Google Apps - Used for Google account (contacts/calendar sync); also contains GMail/Market. This is not included in the CM rom (by default, CyanogenMod does not contain Google services and applications; these can be added separately by users that want them). Remember that there are users who would like to remove everything Google related from their roms as there are some services which use internet/battery when they want and have dependencies with Google Contacts Sync/Calendar Sync/Gmail. Include requests of gapps into a custom ROM by default will be declined.
    http://cmw.22aaf3.com/gapps/gapps-gb-20110828-signed.zip

    Fix for GSM/Phone.apk crash
    http://xdaforums.com/showpost.php?p=20710120&postcount=474
    Thanks to carstenheuer for finding this out.

    Radio - for people having GPS issues (unable to find sats/get a fix)
    http://xdaforums.com/showthread.php?t=1257776
    A810b
    Another thing has come to our attention: a new region-based model is out, the A810b.
    Do not flash any of the radios available around here as they are mostly based for the A810e model, which uses a different network bandwidth and a lot of issues might occur.

    For more information regarding GSM network frequency, check here: http://www.gsmarena.com/network-bands.php3?
    This might also provide some information as to why 3G doesn't work, for example.

    Small adb kit
    For people that need adb without installing the whole SDK kit, adlx.xda provided a little bit of knowledge regarding this nifty little thing included in other applications.
    http://alex.swtesting.ro/downloads/adb-and-moto-fastboot-win32.zip

    GPS fix
    For people out there without a working GPS on one of the two builds the fix is:
    1. Get a stock ROM.
    2. Go outside using a GPS application (like GPS Test from the Market)
    3. Wait until you get a fix and a location.
    4. Flash SuperOSR/CM.
    5. Redo step 2.
    6
    CM7 Roadmap

    For those who missed it, check http://www.cyanogenmod.com/blog :D

    After CyanogenMod 7.2 is released, we will be merging in and welcoming aboard maintainers for the following devices (with more queued):

    HTC Status (chacha)
    HTC Wildfire S (marvel)
    LG Optimus Chic (e720)
    Motorola Photon (sunfire)
    Samsung Galaxy 5 (i5500)
    5
    working so far

    yesterday late I tried with xdbg's kernel, init.chacha.rc & bcm module and the TS worked. using his kernel I got to test more things:

    So far, in my build this is what I have tested:

    - Touchscreen: OK
    - Calls (with audio): OK
    - Data (3g): OK
    - Wifi: OK

    Doesn't work (yet):
    - Physical keyboard :( (I can get data from input device though)
    - leds and backlight, not well tested, but didn't seem to be working (it work manually though, by echoing in the /proc)
    - Camara
    - GPS
    - Sensors

    SMS, MMS: untested

    Screenshots gallery: https://www.dropbox.com/gallery/788286/1/SuperOSR-Chacha?h=5cc26e#/
    5
    Hi.

    A couple of pointers/possible solutions:

    - Physical keyboard :( (I can get data from input device though)

    You must patch frameworks/base/include/ui/KeycodeLabels.h or remove the unknown keys from chacha-keypad.kl. I suspect other files must be patched as well, for example to make the 0 work.

    - leds and backlight, not well tested, but didn't seem to be working (it work manually though, by echoing in the /proc)

    Check that you have lights.msm7k.so and also check the permissions in init.chacha.rc. You might need a newer lights than the one used in the Liberty.


    I think the libcamera.so from HTC has a different API than CM7. Also you must uncomment PRODUCT_SPECIFIC_DEFINES += TARGET_PRELINKER_MAP... in your vendor/cyanogen/products/cyanogen_chacha.mk.
    Check the libcameraservice source code. This problem could be slightly harder to fix.


    I think the radio is more recent than on the Liberty, hence the loc_api version will be higher. Try 20000 and 50000. Also try with the gps.chacha.so from stock ROM.


    Try with a newer libsensors or sensors.chacha.so from stock ROM.
    5
    Link removed because it was obsolete