Camera - RAW - Kernel - Sony Xperia P, U, Sola, Go

Well, i read somewhere that most camera settings and capabilityes are Kernel related.
We hav ea very good movile camera but we can only enjoy the 75% of its power... Adding to the kernel RAW image format would be freaking awesome.
Is possible to add it?

Since everyone uses a different file format for RAW photography,it is not possible to use "The RAW format".

Another good option would be BMP.. notcompressed image file XD

Related

[Q] What does NV stand for on NV12 or NV21 format?

As you know, NV21 is default preview format on android camera system.
Now I'm wondering what does NV stand for on NV21 format.
I could not get any information from googling.

[JB+KK+LP][HACK] RAM "repartition" - up to 691.1 MB of accessible RAM

Hi everybody!
Today I've experimented with kernel a bit and have found a way to increase accessible RAM up to 691.1 MB, at the cost of not working(or not fully working) camera, HW decoding and inablilty boot to recovery. The way is to modify cmdline:
https://github.com/ChronoMonochrome/Chrono_Kernel/commit/17d83a66bcb07a79e4575e0da3b762acd0def203
We use CONFIG_CMDLINE_FORCE=y to ignore cmdline passed by bootloader and use instead new one which contains defconfig.
The default cmdline is(JB bootloader with 624 MB - don't remember its baseband name)
CONFIG_CMDLINE="cachepolicy=writealloc mpcore_wdt.mpcore_margin=359 root=/dev/ram0 rw rootwait crash_reboot=yes crash_dump=no init=init console='null' [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] vmalloc=264M jig_smd=0 lpm_boot=0 checksum_pass=1 checksum_done=1 sec_debug.enable=0 sec_debug.enable_user=0 androidboot.serialno=47907233a768cf60 board_id=12 startup_graphics=1 logo. lcdtype=4 sbl_copy=1"
Click to expand...
Click to collapse
and new one that's in config:
CONFIG_CMDLINE="cachepolicy=writealloc mpcore_wdt.mpcore_margin=359 root=/dev/ram0 rw rootwait crash_reboot=yes crash_dump=no init=init console='null' [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] vmalloc=264M jig_smd=0 lpm_boot=0 checksum_pass=1 checksum_done=1 sec_debug.enable=0 sec_debug.enable_user=0 androidboot.serialno=47907233a768cf60 board_id=12 startup_graphics=1 logo. lcdtype=4 sbl_copy=1"
Click to expand...
Click to collapse
Take a look at "[email protected] [email protected]". 72M means size of HWMEM, "@256M" - its physical address. The same is for "mem" - 55M is size of nearest RAM bank.
Because we forcibly passed this cmdline and bootloader can't add parameter bootmode=2, it disallows to boot into recovery. Maybe later I'll be able to fix it.
Now about other side-effects of reduction of HWMEM - I've tested few sizes of HWMEM, and results as follows:
HWMEM=16M(699M) - camera, audio and hw decoding doesn't work at all
HWMEM=24M(691M) - camera and hw decoding doesn't work at all
HWMEM=48M - video recording and hw decoding doesn't work
HWMEM=64M - video recording still doesn't work, but camera doesn't FC when enabling video mode. May be some cameras will work.
HWMEM=72M - haven't found any bugs yet.
HWMEM=84M - default HWMEM size.
UPD. also uploaded kernel with [email protected] - this decreases available RAM, but maybe for some app or game will be useful this plenty of HWMEM
http://xda.mister-freeze.eu/XDA-files/ChronoMonochrome/kernel/mem_repart/
I've also tried to decrease modem_mem and mem_trace, but unfortunately, it causes bootloop (tested 8MB of modem memory, and 10M of mem_trace, both of these settings separately)
Now few words about how to flash it when recovery is unavailable: extract boot.img to /sdcard and flash kernel via terminal. Script to flashing kernel is attached - if you not familiar with terminal commands I recommend just execute this script to automatize the process. To return to usual kernel, extract boot.img to the same place, flash it, reboot to recovery and flash installable kernel again.
Enjoy :highfive:
@ChronoMonochrome thanks for keeping alive our ace 2 , so far I test HWMEM = 72M , but I have one question , what else do you bring to our phone ? Cheers ^^ :good::good:
Now some users will know why we doesn't see a full 768MB of RAM in phone info.
But @chrono, because of "androidboot.serialno=47907233a768cf60 board_
id=12 lcdtype=4" forced cmdline will bootup every codina devices?
Ave_Hornet said:
but I have one question , what else do you bring to our phone ? Cheers ^^ :good::good:
Click to expand...
Click to collapse
haha maybe LK3.1, but it's f***n buggy, it has problems with earlysuspend - it's unable to play music when screen is off and etc. Furthermore, I'm unable so far merge all changes from chrono kernel (most of them cause bootloop).
PolishVodka said:
Now some users will know why we doesn't see a full 768MB of RAM in phone info.
But @chrono, because of "androidboot.serialno=47907233a768cf60 board_
id=12 lcdtype=4" forced cmdline will bootup every codina devices?
Click to expand...
Click to collapse
Hm, honestly I've some doubts about it - maybe anyone already tested it?
This "androidboot.serialno" probably was generated by bootloader - I haven't tested yet whether other number works or not.
UPD. checked right now - at least androidboot.serialno=ffffffffffffffff works as well as mentioned one. board_
id=12 shouldn't cause problems since it's probably number, specific for codina, but only lcdtype=4 may cause problems on s6d display.
ChronoMonochrome said:
Because we forcibly passed this cmdline and bootloader can't add parameter bootmode=2, it disallows to boot into recovery. Maybe later I'll be able to fix it.
Click to expand...
Click to collapse
Fixed! :fingers-crossed: https://github.com/ChronoMonochrome/Chrono_Kernel/commit/8dbbd48feb1c57db7a335684ff418af01de00d40
This extends bootloader cmdline with new size of HWMEM, instead of passing custom cmdline.
As it turned out, HWMEM should be minimum 68 MB to avoid having any bugs:
http://xda.mister-freeze.eu/XDA-files/ChronoMonochrome/kernel/mem_repart/codina_kernel_hwmem68M.zip
Let me know, if you need a build with even lower size of HWMEM.
As for now, I did not notice any error in HWMEM=64 , but if I think well, that if the will not be any errors ,such modification will be commonplace in Your Kernel?
:silly: Btw. You Are CRAZY @ChronoMonochrome :good: :good:
Edit1. Searches for the network, but nothing works related to the Internet ,Anyone can confirm that ?
Damn it, it was too fast. I've seen some errors in kmsg and camera randomly FCs. I'm afraid that some errors in logs also can evidence about damage FS. I had to restore CWM backup to avoid camera FC, but even on usual kernel with orig HWMEM size I still have errors in kmsg when taking a photo:
Code:
<4>[ 54.664611] CM_NO_MORE_MEMORY domainId: 22, memType 7, wordSize 61440, alignement 15
<4>[ 54.664642] ALLOCATOR Dumping allocator "scratch" [0x00058800:0x00068800]
<4>[ 54.664642] Error: CM_NO_MORE_MEMORY: CM_AllocMpcMemory() failed
<6>[ 55.954864] dma dma0chan22: allocated logical channel (phy 3)
But I should say that I've previously used more unstable HWMEM size as low as mentioned 16 MB - and I've had some crashes which probably caused memory corruption(I do not mean the RAM, as is a non-volatile memory). The problem is that I've used dynamic fsync - now I came to conclusion that we should forget about using it - even simple app FC can cause problems, which persists until you restore full CWM backup. Does anyone have camera FC or errors in kmsg like above?
ChronoMonochrome said:
...... The problem is that I've used dynamic fsync - now I came to conclusion that we should forget about using it - even simple app FC can cause problems, which persists until you restore full CWM backup. Does anyone have camera FC or errors in kmsg like above?
Click to expand...
Click to collapse
Yeah, exactly the same what i had said for some weeks.. it makes no sense.... kernel default is "0" Fsync ON and i've removed NT-APP Permission to make it fail-safe (for this tweak)..
usually it's no problem if we have a fresh cwm backup.. simply format /data and restore only /data .. in 99% of cases the system works normal again..
PolishVodka said:
Now some users will know why we doesn't see a full 768MB of RAM in phone info.
Click to expand...
Click to collapse
Why was clear since beginning, but i remember talk about HOW to change it you-know-where over year ago
Now this topic is extremly interesting.
Vodka, will you make SAME kernel that's used in slimkat with HWMEM=64?
I fell off my chair seeing how this rom with your kernel works, this is totally unreal, man(14760 pts in antutu at 1.1ghz - also - machine works now at 500mhz like at 800mhz before).
Outstanding! Simply outstanding! :good:
Sorry to be without any information in this post. But this news must be celebrated.
EDIT
Using 68M without any issues... Camera/Video are working fine... with incredible RAM of 647 MB :good:
fluffi444 said:
Using 68M without any issues... Camera/Video are working fine... with incredible RAM of 647 MB :good:
Click to expand...
Click to collapse
I could confirm this :good::good:
Edit:
Btw, would this work for any kernel @ChronoMonochrome? Or is it specific to yours?
Why not simply use dynamic memory allocation through CMA for all ION heaps to free up more RAM when not used by surfaceflinger, audio or other subsystems? Afaik legacy memory allocators like PMEM, CMEM, HWMEM were all deprecated when the unified memory manager (ION) was introduced in Android 4.0.
yowanvista said:
Why not simply use dynamic memory allocation through CMA for all ION heaps to free up more RAM when not used by surfaceflinger, audio or other subsystems?
Click to expand...
Click to collapse
Yep, I thought about dynamic memory allocation too. Unfortunately, with one thought it ended up. I do not have much experience in programming to do so. Too many things use HWMEM - if I'm not wrong, mali also use it. It doesn't seem to me a simple.
shaqman89 said:
Btw, would this work for any kernel @ChronoMonochrome? Or is it specific to yours?
Click to expand...
Click to collapse
There are nothing specific to my kernel. As I said, it just adds new parameters "hwmem" and "mem" to the end of cmdline(it's much simplier to don't override old parameters but just do as it done). Therefore, it should work with every kernel.
Should i flash the zip after chronokernel version 2.19 or no?
HI @ChronoMonochrome
Take a look at "[email protected] [email protected]". 72M means size of HWMEM, "@256M" - its physical address. The same is for "mem" - 55M is size of nearest RAM bank.
if i change hwmem from 72 to 70 or 71 and mem from 55 to 60 or 56 its good for ace 2
and how i change this hwmem and mem ?
thanks sorry if my english is bad
I want to test it on my Ace 2. What is most stable value for our phone? And can You tell me how-to-do-it with noob-friendly tut?
str3tch72 said:
I want to test it on my Ace 2. What is most stable value for our phone? And can You tell me how-to-do-it with noob-friendly tut?
Click to expand...
Click to collapse
A user with over 2000 post is not allowed to ask for an "noob-friendly how-to".
If you do so anyway you are just only to lazy to search or to lazy to switch brain to ON.
*just kidding (a bit)* :highfive:
Just flash complete Kernel - HWMEM changes are hardcoded in kernel...
http://xda.mister-freeze.eu/XDA-files/ChronoMonochrome/kernel/mem_repart/
chrono_kernel_R2.21.2_hwmem68.zip is the latest with HWMEM68 which gives you 640 of RAM.
But be warned - Sooner or later some apps starting to FC without any obvious reason.
@ChronoMonochrome
Good job , thnaks.
I remember , when we upgrade Android 2 to 4 , there was two partitions named param and normal , that shoud be replaced in order to increase memory from 500MB to 624 , so what was that?
Here is that thread
sorset said:
@ChronoMonochrome
Good job , thnaks.
I remember , when we upgrade Android 2 to 4 , there was two partitions named param and normal , that shoud be replaced in order to increase memory from 500MB to 624 , so what was that?
Here is that thread
Click to expand...
Click to collapse
624MEM_V2.tar.md5 replaces bootloader, but 624MEM_V1.tar.md5 doesn't... It should be interesting itself, but I haven't any idea how it can work without replacing bootloader and its cmdline.
UPD. Maybe cmdline isn't hardcoded in bootloader, but written somewhere in param.lfs.
fluffi444 said:
......
chrono_kernel_R2.21.2_hwmem68.zip is the latest with HWMEM68 which gives you 640 of RAM.
But be warned - Sooner or later some apps starting to FC without any obvious reason.
Click to expand...
Click to collapse
Right now flashed my Kernel with HWMEM=68 (646MB RAM) .. and now i just want to ask u how long i need to wait till some Apps starts to FC ?? - Of course just approxx. maybe after 1 day of usage ???

(Help!) Annoying notification: "The system was damaged..." (Updated)

This is the problem that I asked on the last Thread
https://forum.xda-developers.com/android/help/help-annoying-notification-damaged-t3668868
(I'm gonna call the original system.img is the NGAs, and the one added Google Apps is GAs)
The small detail that I had mention on the end of the above thread: the NGAs is SPARSE and EXT4 image, the GAs one is EXT4 only.
Plus, the NGAs CANNOT be extrac with 7-zip, but the GAs one CAN be extrac with 7-zip
So I deduced 3 solution to fix this (of course, they are out of my capability)
1. Convert the GAs image into SPARSE (there isn't any detail guide on the internet)
2. Edit the build.prop (maybe? I'm not sure)
3. Edit the boot.img, because I think it will gonna check something in the system folder while the phone boot up.
This is the link download boot.img, NGAs and the GAs
https://drive.google.com/open?id=0B1RTsnBzcaa5UEJmR3M3SnVHQzQ
Thanks.

Removing compression from whatsapp

How to remove compression from whatsapp pictures. I tried a method with editing whatsapp_preferences file and setting the image quality to 99 but that doesn't seem to work. Any other ideas? Thanks
If you send the image as "document" instead of as "image", the image is not compressed.
I hope it helps

Nokia camera Mod

Nokia Camera 91.9.1130.40 with Pro Mode and Animojis ENABLED for Nokia 8
Hi guys!
Now I want to share my small modification of Nokia camera. You know that if download not modified version from apkmirror it won't have pro mod and also there will be some not working features. But this mod solve the problem. It's based on source code by @linuxct , so it's not all my work. There are some features of my mod:
- New camera style (just swipe to go to other mod)
- Working slow-mo
- New Dual Sight
- Masks and artificial light
- New AR section in the top menu
-Disabled not working square and live bokeh mod
- Changed package name ("com.nokia.camera_4pda")
- Changed icon (blue->green)
But there're some bugs:
- Not working panorama. It's not working in all versions which I tried to modify
- Not working beauty (no changes if you turn on it)
- Photo distortion when shooting with masks and artificial light (the photo itself is normal, we just need to wait until Google photos it will load, it is also inverted)
- Missing Google lens item
- Sometimes unstable switching to front camera (at lag helps restart the app)
And not good things:
- I don't know how to enable dual camera switching, if someone knows, please help...
Download
https://yadi.sk/d/-l2Ja9METtt0Dg
Contributors
linuxct
mkolpak
Source Code: https://linuxct.space
ROM OS Version: 8.x Oreo
Version Information
Status: Stable
Current Stable Version: 91.9.1130.40 (2.2)
Stable Release Date: 2019-03-21
Created 2019-03-22
Last Updated 2019-03-22
P.s. If you don't have Nokia 8, write me back, working it or not on your phone. I will make a list of supported phones;
If you are a developer - no problem if you will modify my version.
Some screenshots (sorry for Russian)
get me error with front camera
negrroo said:
get me error with front camera
Click to expand...
Click to collapse
Switching front camera or taking photos?.. Yes, sometimes it can freeze on switching, but not always
For me taking photos is working...
taking photos with the front cam.. every time i try this error occurred
mkolpak said:
There are some features of my mod:
- New camera style (just swipe to go to other mod)
- Working slow-mo
- New Dual Sight
- Masks and artificial light
- New AR section in the top menu
-Disabled not working square and live bokeh mod
- Changed package name ("com.nokia.camera_4pda")
- Changed icon (blue->green)
Click to expand...
Click to collapse
Hey, could you please share the code/modifications you made along your mod?
If you need help on how to do it:
After decompiling the apk for the first time, you can set up a new local git repository and add all the current files to it, commit them, then proceed to mod them and commit them. You can then extract your changes into a single nice file with
Code:
git diff HEAD~[FONT="Arial Black"]number of commits[/FONT]..HEAD > my-patch.diff
or with
Code:
git format-patch -[FONT="Arial Black"]number of commits[/FONT] --stdout > my-patch-.patch
Thank you!
linuxct said:
Hey, could you please share the code/modifications you made along your mod?
If you need help on how to do it:
After decompiling the apk for the first time, you can set up a new local git repository and add all the current files to it, commit them, then proceed to mod them and commit them. You can then extract your changes into a single nice file with
Code:
git diff HEAD~[FONT="Arial Black"]number of commits[/FONT]..HEAD > my-patch.diff
or with
Code:
git format-patch -[FONT="Arial Black"]number of commits[/FONT] --stdout > my-patch-.patch
Thank you!
Click to expand...
Click to collapse
Hi!
I will make it, I dont remember all what I changed, but I will post code in these days. :fingers-crossed:
Or u can take my classes39.dex file and see it now.
I took stock apk from apkmirror, replaced some files with new one from your mod (I remember that with stock res folder animoji were not working, but with your files it started working), added my 39.dex file.
Wait 1-2 days, I will do it :angel:
linuxct said:
Hey, could you please share the code/modifications you made along your mod?
Click to expand...
Click to collapse
Sorry that I did not answer for so long, I was on vacation in Armenia, now I'm back.
My edits in the camera were too unpredictable, I can not remember what changed, namely where to turn off the "square". I can only write my actions in productmodelutil, also I remember that to make slow motion work, you need to take the original folder "res" and paste it into your apk.
Forgive me.
P.s. Some photos from Armenia
https://yadi.sk/d/arn2p89fz92IcA

Categories

Resources