Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,737,925 Members 53,182 Now Online
XDA Developers Android and Mobile Development Forum

[WIP] - JB Camera HAL for 2.6 kernel

Tip us?
 
Rashed97
Old
(Last edited by Rashed97; 26th August 2012 at 07:45 PM.)
#1  
Rashed97's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 9027
Posts: 1,473
Join Date: May 2012

 
DONATE TO ME
Default [WIP] - JB Camera HAL for 2.6 kernel

Hello everyone!!!
This is a continuation of rapmv78's ICS Camera HAL for 2.6 kernel. Great thanks to nobodyAtall who helped get this working

THINGS YOU WILL NEED:
A working ICS ROM for your device
A lot of time

Now this can be adapted to any phone, but it is designed for the LG Optimus One (P500)
I will upload the panorama fix to my GitHub as soon as I finish porting the code for it

SOURCES:
https://github.com/androidarmv6/andr...vice_libcamera
Camera app changes coming soon!
Frameworks changes coming soon!

TO FIX VIDEO RECORDING AND PLAYBACK:
To fix video you will need the lib/libstagefright_soft_aacdec.so file from your ICS ROM. Setup a vendor pregenerated lib by adding that .so to your COMMONFOLDERNAME/proprietary/lib/libstagefright_soft_aacdec.so

TO INSTALL:
1. Follow the instructions in the READMEs in the repos
2. In your BoardConfigCommon.mk, delete the following lines IF THEY EXIST:
(Note: these are scattered all over the file, so look for them)
  • COMMON_GLOBAL_CFLAGS += -DICS_CAMERA_BLOB
  • TARGET_USE_OVERLAY := false
  • TARGET_HAVE_BYPASS := false
  • TARGET_USES_C2D_COMPOSITION := false
  • COMMON_GLOBAL_CFLAGS += -DREFRESH_RATE=60
3. Now add these lines to your BoardConfigCommon.mk
  • TARGET_DISABLE_ARM_PIE := true
  • TARGET_BOOTANIMATION_USE_RGB565 := true
  • TARGET_BOOTANIMATION_TEXTURE_CACHE := true
  • Note that the following 2 might not be needed based on your device, but most devices will need them
  • TARGET_NO_HW_VSYNC := true
  • COMMON_GLOBAL_CFLAGS += -DQCOM_NO_SECURE_PLAYBACK
4. Edit the files in the DEVICE/libcamera folder to suit your device

Again, thanks to nobodyAtall for getting this to work!!!
--Rashed

NOTICE: My PM is not a help central. I will not reply to any messages about simple stuff that has already been discussed on the forums nor will I reply to any messages asking me simple questions that will receive answers on the forums. Thank you.

My devices:
Motorola Moto X (XT1049):
Kernel: Stock 3.4
ROM: Stock 4.2.2
Safestrapped

LG Thrive (P506):
Baseband: 1.1
Kernel: Android ARMv6 3.0.8 Kernel
ROM: CM 10.1 (by Me)
Governor: smartassV2
Min: 122 MHz
Max: 806 MHz
Recovery: 5.0.2.0 for P500 (ROManager) or 6.0.2.8 (by Me)

My Stuff:
CyanogenMod 10 (Jelly Bean) for LG MSM7x27 | CyanogenMod 10.2 (Jelly Bean) for LG MSM7x27 | Google Apps Lightweight for ARMv6
OMX (JB) for MSM7x27 | CWM 6.0.2.7 for LG MSM7x27 | 3.0 Kernel for LG MSM7x27


Code:
I'm a 17 year old Recognized Developer ;)
The Following 22 Users Say Thank You to Rashed97 For This Useful Post: [ Click to Expand ]
 
stelios97
Old
#2  
stelios97's Avatar
Recognized Developer
Thanks Meter 4385
Posts: 1,462
Join Date: Feb 2011
Location: Famagusta

 
DONATE TO ME
are you sure that this line need to be removed?
COMMON_GLOBAL_CFLAGS += -DREFRESH_RATE=60
 
Rashed97
Old
#3  
Rashed97's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 9027
Posts: 1,473
Join Date: May 2012

 
DONATE TO ME
Yes
Or else you get weird issues with the screen
--Rashed

NOTICE: My PM is not a help central. I will not reply to any messages about simple stuff that has already been discussed on the forums nor will I reply to any messages asking me simple questions that will receive answers on the forums. Thank you.

My devices:
Motorola Moto X (XT1049):
Kernel: Stock 3.4
ROM: Stock 4.2.2
Safestrapped

LG Thrive (P506):
Baseband: 1.1
Kernel: Android ARMv6 3.0.8 Kernel
ROM: CM 10.1 (by Me)
Governor: smartassV2
Min: 122 MHz
Max: 806 MHz
Recovery: 5.0.2.0 for P500 (ROManager) or 6.0.2.8 (by Me)

My Stuff:
CyanogenMod 10 (Jelly Bean) for LG MSM7x27 | CyanogenMod 10.2 (Jelly Bean) for LG MSM7x27 | Google Apps Lightweight for ARMv6
OMX (JB) for MSM7x27 | CWM 6.0.2.7 for LG MSM7x27 | 3.0 Kernel for LG MSM7x27


Code:
I'm a 17 year old Recognized Developer ;)
 
a2441918
Old
#4  
a2441918's Avatar
Recognized Contributor
Thanks Meter 3314
Posts: 1,404
Join Date: Jan 2011
Location: Coimbatore

 
DONATE TO ME
How to do this "Setup a vendor pregenerated lib by adding that .so to your COMMONFOLDERNAME/proprietary/lib/libstagefright_soft_aacdec.so"??

I have an x10 and camera works but with small grey bar at the bottom in 8 Mpx but 6MPx works fine.. No video recording nd panaroma..
 
pluGinSz
Old
(Last edited by pluGinSz; 25th August 2012 at 02:08 AM.)
#5  
Senior Member
Thanks Meter 55
Posts: 209
Join Date: Aug 2012
Quote:
Originally Posted by Rashed97 View Post
Hello everyone!!!
This is a continuation of rapmv78's ICS Camera HAL for 2.6 kernel. Great thanks to nobodyAtall who helped get this working

THINGS YOU WILL NEED:
A working ICS ROM for your device
A lot of time

Now this can be adapted to any phone, but it is designed for the LG Optimus One (P500)
I will upload the panorama fix to my GitHub as soon as I finish porting the code for it

SOURCES:
https://github.com/Rashed97/android_device_libcamera
Camera app changes coming soon!
Frameworks changes coming soon!

TO FIX VIDEO RECORDING AND PLAYBACK:
To fix video you will need the lib/libstagefright_soft_aacdec.so file from your ICS ROM. Setup a vendor pregenerated lib by adding that .so to your COMMONFOLDERNAME/proprietary/lib/libstagefright_soft_aacdec.so

TO INSTALL:
1. Follow the instructions in the READMEs in the repos
2. In your BoardConfigCommon.mk, delete the following lines IF THEY EXIST:
(Note: these are scattered all over the file, so look for them)
  • COMMON_GLOBAL_CFLAGS += -DICS_CAMERA_BLOB
  • TARGET_USE_OVERLAY := false
  • TARGET_HAVE_BYPASS := false
  • TARGET_USES_C2D_COMPOSITION := false
  • COMMON_GLOBAL_CFLAGS += -DREFRESH_RATE=60
3. Now add these lines to your BoardConfigCommon.mk
  • TARGET_DISABLE_ARM_PIE := true
  • TARGET_BOOTANIMATION_USE_RGB565 := true
  • TARGET_BOOTANIMATION_TEXTURE_CACHE := true
  • Note that the following 2 might not be needed based on your device, but most devices will need them
  • TARGET_NO_HW_VSYNC := true
  • COMMON_GLOBAL_CFLAGS += -DQCOM_NO_SECURE_PLAYBACK
4. Edit the files in the DEVICE/libcamera folder to suit your device

Again, thanks to nobodyAtall for getting this to work!!!
Read me only shows this message "This directory contains code for the Jelly Bean Camera HAL"
BTW where do we replace the files ? Where does BoardConfigCommon.mk file exist ?
 
Rashed97
Old
#6  
Rashed97's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 9027
Posts: 1,473
Join Date: May 2012

 
DONATE TO ME
Put the file in the /vendor/MANUFACTURER/DEVICE/proprietary/lib/
Add this line to your vendor-DEVICE-blobs.mk: (Note: Make sure it's the second to last line, not the last line)
vendor/COMPANY/DEVICE/proprietary/lib/libstagefright_soft_aacdec.so:system/lib/libstagefright_soft_aacdec.so \

Also here is an example of a common repo where you need to make all these changes:
https://github.com/lgics/cm_device_lge_msm7x27-common

And the vendor for the video:
https://github.com/lgics/cm_vendor_lge
--Rashed

NOTICE: My PM is not a help central. I will not reply to any messages about simple stuff that has already been discussed on the forums nor will I reply to any messages asking me simple questions that will receive answers on the forums. Thank you.

My devices:
Motorola Moto X (XT1049):
Kernel: Stock 3.4
ROM: Stock 4.2.2
Safestrapped

LG Thrive (P506):
Baseband: 1.1
Kernel: Android ARMv6 3.0.8 Kernel
ROM: CM 10.1 (by Me)
Governor: smartassV2
Min: 122 MHz
Max: 806 MHz
Recovery: 5.0.2.0 for P500 (ROManager) or 6.0.2.8 (by Me)

My Stuff:
CyanogenMod 10 (Jelly Bean) for LG MSM7x27 | CyanogenMod 10.2 (Jelly Bean) for LG MSM7x27 | Google Apps Lightweight for ARMv6
OMX (JB) for MSM7x27 | CWM 6.0.2.7 for LG MSM7x27 | 3.0 Kernel for LG MSM7x27


Code:
I'm a 17 year old Recognized Developer ;)
The Following 2 Users Say Thank You to Rashed97 For This Useful Post: [ Click to Expand ]
 
Rashed97
Old
#7  
Rashed97's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 9027
Posts: 1,473
Join Date: May 2012

 
DONATE TO ME
http://review.cyanogenmod.com/#/c/22147/
This should fix recording issues
I just added it to all of CM since its needed a lot
--Rashed

NOTICE: My PM is not a help central. I will not reply to any messages about simple stuff that has already been discussed on the forums nor will I reply to any messages asking me simple questions that will receive answers on the forums. Thank you.

My devices:
Motorola Moto X (XT1049):
Kernel: Stock 3.4
ROM: Stock 4.2.2
Safestrapped

LG Thrive (P506):
Baseband: 1.1
Kernel: Android ARMv6 3.0.8 Kernel
ROM: CM 10.1 (by Me)
Governor: smartassV2
Min: 122 MHz
Max: 806 MHz
Recovery: 5.0.2.0 for P500 (ROManager) or 6.0.2.8 (by Me)

My Stuff:
CyanogenMod 10 (Jelly Bean) for LG MSM7x27 | CyanogenMod 10.2 (Jelly Bean) for LG MSM7x27 | Google Apps Lightweight for ARMv6
OMX (JB) for MSM7x27 | CWM 6.0.2.7 for LG MSM7x27 | 3.0 Kernel for LG MSM7x27


Code:
I'm a 17 year old Recognized Developer ;)
The Following 3 Users Say Thank You to Rashed97 For This Useful Post: [ Click to Expand ]
 
pluGinSz
Old
#8  
Senior Member
Thanks Meter 55
Posts: 209
Join Date: Aug 2012
Quote:
Originally Posted by Rashed97 View Post
http://review.cyanogenmod.com/#/c/22147/
This should fix recording issues
I just added it to all of CM since its needed a lot
I use Xperia Ray running CM10 by FXP with FXP kernel. Should it work on it ? I can't find any file with extension .mk
 
asdfzz
Old
#9  
asdfzz's Avatar
Senior Member
Thanks Meter 1548
Posts: 1,232
Join Date: Mar 2012

 
DONATE TO ME
take credit to erikcas for vide LQ

For camera on LG p690/e510 it doesnt work..we cant take picts... pano works :s

Moto G - ROM: Stock | Kernel: Stock
Galaxy Ace2 - ROM: CM 10.2 | Kernel: Stock
 
Crenshaw-PCGH
Old
#10  
Crenshaw-PCGH's Avatar
Senior Member
Thanks Meter 156
Posts: 327
Join Date: Mar 2012
How to open the readme??

I get just " This directory contains code for the Jelly Bean Camera HAL"

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

XDA Xposed Tuesday: Blur Your System Notification Panel – XDA Developer TV

Listen, we love innovative applications and modules that … more

Android 4.4.3 Begins Rolling Out to European HTC One M8

Shortly after the USA Unlocked and Developer Editions of the HTC One M8 received the … more

Modernize Your Emails with Email Popup

SMS andHangouts messages likely won’t ever replace traditional Emails for more formal … more

Change Your Toast Notification Style with XToast

Android uses multipletypes of notifications. One of these isknown as a toast notification. … more