yashsingh1/xdaforums huggingface dataset:
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
LG Camera V2, contains the framework inside and has the fix inside also...

Above is a consolidated package of the latest framework and the unmodified LG camera port by bigboy

It also means that in the LG Camera v2, you won't need to install framework. It is a success, but we fail at the resources. LG API can't find its resources and so it will fc
[G2 Developer Discussion [Developers Only]] Tribes11:
Still following this because I really have faith in your project!
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
I'm not quite an expert with "theming" or whatever it takes to port over the resources. My guess is that I need to use the public.xml of LG's framework-res as a base???

Are there any great devs watching this project??? XD

I need help :3
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
[MENTION=377973]defcomg[/MENTION] used G Pro 2 hal and is able to unlock 4K with FreedCam. There might also be other things that are changed so try to explore it :)

Mod is on gdrive
[G2 Developer Discussion [Developers Only]] peppe104:
Hi guys, Did someone find a solution for the low storage notification? On v21?
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Still no fix. Can you upload a log?
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Too many differences in res T-T
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Found Resource ID: 0x60012!!! It is in lge-res.apk... Hmmm... Weird ahahaha
[G2 Developer Discussion [Developers Only]] peppe104:
no man, unfortunately I made a full wipe and reset my phone.
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
lge-res is not being loaded due to some reasons... And I found it out now :)

android/content/res/AssetManager must be modified to include lge-res.apk as an additional source of android resources

The class above is found on framework.jar, so this means... VBM time!!! Ha! XD

EDIT: There are changes that might not work universally so... let's do this manually.
[G2 Developer Discussion [Developers Only]] AllOfThemAreUsed:
flashable 4k makes the phone unbootable (stuck on lg logo). lg f320, bliss 6.4 (both stock and lambda kernel)
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Ow... I see... I accidentally deleted the whole build prop hahaha

Edit: Download it again, I think it's okay now :)
[G2 Developer Discussion [Developers Only]] coavasic:
Anyone tried 4k mod on g2? I flashed on g pro 2 which have same camera hardware/software and after flash I can't start camera. Ips kickier works fine on g pro 2
[G2 Developer Discussion [Developers Only]] dancivuk:
hello, I'm not very experienced with this. what do i need to flash amd install? I'm on cm13
[G2 Developer Discussion [Developers Only]] jneto3000:
This new one works just fine.

How do I enable 4K in Freedcam? Or it enables by default?
[G2 Developer Discussion [Developers Only]] thtkidsvm:
Is the 4k mod only intended for cm13 or does it work for nougat as well?
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Use freedcam and clear its data first then you will see 2160p option which is equivalent to 4K

It is intended to be used only to cm13, but you can try it if you want :P but please do backup
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
I am thinking if I could just override certain classes in framework.jar using a custom jar file having the same classes then inserting it in classpath before the entry of framework.jar or after... idk hahaha

Because some ROMs (like PA) have dexpreopt, which means jars specified by bootclasspath will be optimized and stripped of... leaving only the manifest on its wake (/system/framework/framework.jar for example has no dex, and instead it only has a manifest... making further modifications harder, or if not, impossible.)

So the custom jar will be generated by using a specific class in framework.jar as a base, then the patches will be applied to it.
[G2 Developer Discussion [Developers Only]] dancivuk:
will this enable some features that require Camera2 API in Open Camera app??
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
No?? You can test if you want. Though I recommend FreedCam since it supports LG G2's weird APIs for manual focus, raw capture and other manual things.
[G2 Developer Discussion [Developers Only]] thtkidsvm:
No go on nougat Aicp 12.0... Boots but screen goes black, backlight is on and I can't see anything im doing. Didn't expect it to work anyway, being that nougat is really new and still has some things that need to be ironed out.
[G2 Developer Discussion [Developers Only]] 4r44444:
delete PLS
[G2 Developer Discussion [Developers Only]] shaneel1491:
I think this is a problem with the build.prop being changed, I had that as well.

Edit: No it's not, I'm testing which file it is. Looks like it lies in libmediaplayerservice.so, we'll need to patch that using nougat lib, not marshmallow lib
[G2 Developer Discussion [Developers Only]] n1kolaa:
can i just use this mode with snap camera?
[G2 Developer Discussion [Developers Only]] dancivuk:
what do I need to download and flash? sorry i'm kinda new to this
[G2 Developer Discussion [Developers Only]] andy_it:
Thanks Shaneel, waiting for your answer before trying 4K Mod + 60/120 HFR on crdroid 7.1 here :)
[G2 Developer Discussion [Developers Only]] shaneel1491:
Don't flash on Nougat, we need to update the file previously mentioned, you'll end up booting with black screen if you flash.
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Please flash "lge-enable" after lg farmework on a clean setup then report.
[G2 Developer Discussion [Developers Only]] lunafag:
Error 6 when I flash it.
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
I forgot to convert EOL :3

How about this one?

Just for clarification... This should be flashed after flashing system rom, and lg framework without reboots in between... And this is made specifically for Paranoid 6.0.3
[G2 Developer Discussion [Developers Only]] lunafag:
[MENTION=6545782]xxoscarxx28[/MENTION], flashed in that order: full wipe, PA 6.0.3 for d802, framework(experiment 21), lge enable, lg camera v2, without reboots in between. Camera still force closes(logs attached).
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Try using only the apk version of lg camera
[G2 Developer Discussion [Developers Only]] j1505243:
Nexus 5 has Camera2 API on MSM8974

G Flex 2 has Camera2 API on IMX135

Do these facts help us in any way? Camera2 API would help with many problems we face here :)
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Hmmm... We already know that fact but at the very first place the LG Camera in G2 and G3 has no Camera2 API support, but it would be great if we can port it too. It's just that it's the least of the priorities
[G2 Developer Discussion [Developers Only]] j1505243:
Couldn't we then just get away with the stock cam? :) Camera2 API gives freedom about postprocessing, as I remember. But not sure about videos :/ Anyway thx for your work! :D
[G2 Developer Discussion [Developers Only]] EvilKing009:
Any progress on Nougat Roms? :)
[G2 Developer Discussion [Developers Only]] gokhanbilgin:
It's not work Resuraction remix marshmallow version. Freedcam not recording 1080 60 fps. Same Lg camera marshmallow version.
[G2 Developer Discussion [Developers Only]] shaneel1491:
Did you reset FreeDcam data?
[G2 Developer Discussion [Developers Only]] gokhanbilgin:
Yes.
[G2 Developer Discussion [Developers Only]] shaneel1491:
In FreeDcam go to video profile editor from slide out menu and change frame-rate to 60fps on 1080p. Also tell me what the device is in you build prop, does it say anywhere LG-D838?
[G2 Developer Discussion [Developers Only]] gokhanbilgin:
Yes devices name d838.

I only flash this file.

(https://drive.google.com/open?id=0B23GqSfUuBdIdm4tRE5nbFRMVk0)

I Cleared freedcam data.

And i selected 1080hfr.

Video is taken but fps 12-14.

I sent screenshots because my English is weak. Thank you for helping.
[G2 Developer Discussion [Developers Only]] shaneel1491:
Just try 720p HFR and see if the preview goes super dark when you record? I remember also having a slower framerate at some stage, is that 14 -17 fps video playing in slowmotion on video players?
[G2 Developer Discussion [Developers Only]] gokhanbilgin:
Yes 720 hfr very dark. And playing slow mo. But it's not like the lg roms. There is a terrible video. 60 fps impossible?
[G2 Developer Discussion [Developers Only]] shaneel1491:
It is actually 60 fps in the 1080 hfr mode, but for some reason in the HAL, the driver records the video in slow motion, if you were to speed it up to normal speed you would see it being 60fps, this was as far as we could get it due to limitations of LG's driver. What we did was actually used some libs from the G Pro 2 which supports manual mode but obviosly was not perfectly compatible with our device, I think the 1080 60fps only can record in slow motion, you can use some video player (VLC, MX Player) to speed it up
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Real life made me wrecked.

I'm gonna clean up the gdrive, update the op (since many are confused) and check if our lg_overlay method are ever called.
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Two tasks for you ;)

Main Task:

Other task:
[G2 Developer Discussion [Developers Only]] EvilKing009:
Main Task:

I Tested it, Clean flashed PA 6.0.3, flashed everything in order, LG Camera still Force closing.

After the FCing of LGCamera, window and transition animation scales are turned off itself.

Haven't founded anything related "Lgeresoverlay" or something on logcat but founded some LG Camera force closes errors and logs.(I have been attached a zip file containing the one with full logcat and the other one with "lge" filtered name logcat).

Other task:

Here you go, its in the attachment. ;)
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
DEXPREOPT removed the dex files of boot jars (probably the flashable zip of PA has precompiled oats) :3

Deleting the oat files will make the ROM non-bootable but it is the only legit way of rebuilding it.

I'll try another method, which will remove the need of rebuilding the oat files, and I will also try another way of loading lge-res.apk without modifying framework.jar
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
CM still has the dex files intact inside boot jars. Let's add that to task queue :P
[G2 Developer Discussion [Developers Only]] Gafi.90:
have anything to try to flash on AICP 12 Nougat?
[G2 Developer Discussion [Developers Only]] Guzansky:
One more that always see this topic to know if there is any new release to Nougat!
[G2 Developer Discussion [Developers Only]] denissxrus:
CM14.1, LG Framework V22, Lambda Kernel - installed successfully, but LG Camera not working.

Отправлено с моего LG-F320L через Tapatalk
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Please upload any CM's framework.jar here and services.jar...

I want to test something

Btw... Experiment 22 is not working, there is no CLASSPATH entry on init.environ.rc, I think. I reverted the "Experiment (framework).zip" file back to v21.
[G2 Developer Discussion [Developers Only]] Startrek852:
Here you go. They're not exactly from CM, but it's from AICP which is based on CM. And FYI, they're from Nougat.
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Push this to system via adb after clean flashing Exp21. I made changes that are framework specific (universal method will come after this?) and also patched services.jar to accept all signatures (unsafe, will try to make a workaround next time) since android won't parse lge-res apk due to signature mismatch. Let''s hope LG Apps will work now :fingers-crossed::p

framework.jar

services.jar

PS. I can't upload directly to xda :eek:
[G2 Developer Discussion [Developers Only]] denissxrus:
Bootloop on AICP from 28.12.16
[G2 Developer Discussion [Developers Only]] Startrek852:
OK, I'm done. I wiped System, Data, Dalvik, and Cache, then I flashed my ROM, then GApps, SuperSU, blastagator's bumpboot zip, then the framework zip, then I ADB pushed the framework.jar and services.jar. There were no reboots in between any of the steps. Now what do I do?

EDIT: [MENTION=5749560]denissxrus[/MENTION] No bootloop here on D801 12/28 build.
[G2 Developer Discussion [Developers Only]] denissxrus:
I used D802 28.12.16 build on my F320, maybe that was a reason of bootloop.

[MENTION=6545782]xxoscarxx28[/MENTION] can you mod framework and services from XOSP 7.1
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Can I have a complete logcat and try launching unmodified LG Camera also

I can but maybe we should see first if the other one is working :P
[G2 Developer Discussion [Developers Only]] Startrek852:
The logcat is attached. Also, LG Camera won't open, I took a logcat after it crashed, it's also attached. Also, I did a little digging and I found out that lge-res and lge-res-permission didn't get installed even though they were in the correct place, so I thought I would try running pm install on them to see what it said. For lge-res, it gave me this error:

Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed reading res/drawable-xxhdpi-v4/switch_bg_focused_holo_dark_latin.9.png in android.util.jar.StrictJarFile@a1aee36: META-INF/MANIFEST.MF has invalid digest for res/drawable-xxhdpi-v4/switch_bg_focused_holo_dark_latin.9.png in res/drawable-xxhdpi-v4/switch_bg_focused_holo_dark_latin.9.png]

and for lge-res-permission it gave it this error:

Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE: Package couldn't be installed in /data/app/com.lge.permissions-1: Package com.lge.permissions has no signatures that match those in shared user android.uid.system; ignoring!]
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Try this new services.jar... I fixed some things I missed (bypass <checkSignaturesLP> method where the error came from) I can't think of any fix for the first error for now.(EDIT2 is a possible fix?)

EDIT: Seems like I messed up something in signatures of lge-res??? :eek: (which made the first error you got)

Replace lge-res of Experiment 21 with this one then clean flash the new zip, then push framework.jar and services.jar, then clean dalvik-cache just to be sure. If the error becomes different, name it as Experiment 23 then upload here :)

EDIT2: Maybe I could just also bypass digest checking in case the lge-res.apk here doesn't work??? (another compromise)
[G2 Developer Discussion [Developers Only]] Nando_aot:
[MENTION=6545782]xxoscarxx28[/MENTION] which version should I flash on Nougat 7.1?

Thanks
[G2 Developer Discussion [Developers Only]] Startrek852:
So, the new services.jar worked for lge-res-permission, but the new lge-res didn't work. It still gave the exact same error when trying to install it, so I resigned the APK and that worked, but then it gave me almost the exact same error that it gave me for lge-res-permission, so then I tried adding another patch to services.jar, AND IT WORKED!!! Both lge-res and lge-res-permission got installed!! But LG Camera still won't open. I attached a logcat for that, Experiment 23 with the working lge-res, and my new services.jar.
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Let's see what error it gives us now :P

EDIT: Ummmm... lgcamera_logcat.zip only has 178 bytes??? Invalid zip file. Please re-upload all attachments. They are all 178 bytes.
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
All Experiment zips are universal... The framework.jar and services.jar that are in the works, is still specific to the device being worked on (currently it will only work with [MENTION=6622051]Startrek852[/MENTION]'s g2 or any device with the same ROM). I'll implement a universal version of these after the tests
[G2 Developer Discussion [Developers Only]] NimaXDA:
I want to port G Pro2 camera & weather app that work on CM13. Can somebody help?
[G2 Developer Discussion [Developers Only]] jabi_james:
:good::good::cool:
[G2 Developer Discussion [Developers Only]] impactor:
This thread is paved with great promises, good ideas and great hopes. But little more.

After ten months, has anything functional been produced here? At least one feature that works which didn't? Maybe I haven't been following it very closely so correct me if I am wrong - but there is nothing. I haven't seen a single post from a user who flashed this and said "yeah, it works!" with regard to at least one feature listed in the OP.

Therefore, I remain hopeless about this project and the likelihood it can produce anything close to what was promised.
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Can't argue with most of that but pls do remember this is wip and no one else is helping me with this except the guys that helps me with the tasks I'm giving. I thought that this thread could spur collaboration with the other devs but no, it seems like no one would like to give a hand. I understand it though. This project might seem to be something that will not finish well. I know that fact well, but as long as I could, I will continue this even if I no longer have any android device and no one helps. (I still believe in the community)

This project already gave me lots of information on how LG implement their "customizations" (but there are still holes). I also already have the "VBM" ready in the GDrive which will serve a purpose after getting a proper port. A dev also gave us the 4K mod that works for MM. Progress is still progress.

The framework here is named as Experiment and is obviously not the final product. If you are checking the logs being uploaded, you can see that com.lge.frameworks.jar are now fully ported and working, only the resources are not (which are the ones being tested lately) and things that I don't know hiding in Android framework (two already found: lge-res.apk declaration as another resource library, and a certain class about telephony needed by LG Cam).
[G2 Developer Discussion [Developers Only]] ppjanssen:
Keep up the good work! It would be great if this is going to work. :cool:
[G2 Developer Discussion [Developers Only]] Guzansky:
I would like to help.

This port made custo MM camera almost equal to Stock Camera.

I'm on AOSP Extended 7.1.1

2017/01/03

I just need to understand the way to make those logs.
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
su -c logcat -d > /sdcard/name_of_log

The file will be inside internal memory named name_of_log
[G2 Developer Discussion [Developers Only]] gokhanbilgin:
Nougat port?
[G2 Developer Discussion [Developers Only]] Startrek852:
I'm really sorry, I just now saw the edit you made. All 3 files are attached.
[G2 Developer Discussion [Developers Only]] acrocosm:
Yes it works. I'm using this camera for the last few months on CM13. Is it perfect? No. But I prefer it to any other available option.

Remain all hopeless you like but why don't you download and test for yourself?

No, your device will not explode if that's what you are afraid of. Neither your ass will sag ffs
[G2 Developer Discussion [Developers Only]] vagkoun83:
I want to test with an aosp 6 rom. But I am a bit confused about what to install and what's the profit. I respect this project and people who try but I haven't understand clearly ..it's ok to install framework zip and lg camera? Is the any other profit or differences ?
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
The links worked :D

I'll check it now
[G2 Developer Discussion [Developers Only]] Startrek852:
Here you go!
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Woah hahaha

So it seems that we also must edit framework-res.apk :/

Edit: How about searching for 0x101005a???
[G2 Developer Discussion [Developers Only]] Startrek852:
Searching for that gave me nothing.
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
I forgot that it is a typed value :/

After a little research, the problem somewhat points to how resource handling is done.

Resources.Theme

Then that means we really do need to modify framework-res.apk :/ (xml etc.)
[G2 Developer Discussion [Developers Only]] gokhanbilgin:
Really its not working. I installed cm 13 last day and not working. 1080p 60Fps 4k both not working

İ m not hopping this thread.
[G2 Developer Discussion [Developers Only]] j1505243:
RIP this thread :| Maybe Camera HALv3 would be more possible than the framework, but whatever, as 90% people likely keep G2 as a secondary device now :)
[G2 Developer Discussion [Developers Only]] balakay4312:
Dev please continue. I'm sure there are lots of people still waiting and would like an update on any sort of progress being made.
[G2 Developer Discussion [Developers Only]] gokhanbilgin:
İt's not possible. Camera freamwork close source
[G2 Developer Discussion [Developers Only]] balakay4312:
Yes but that's what this thread is about.
[G2 Developer Discussion [Developers Only]] matteo0026:
Guys if camera framework is closed source, if there will be really interest here (I'm so much interested), dev can do reverse engineering. I know that's not a good thing, but it's the only way to reach the sources.
[G2 Developer Discussion [Developers Only]] Startrek852:
delete
[G2 Developer Discussion [Developers Only]] matteo0026:
Yeah, I hope that knowledges are enough for going away with the project... This device has still much to give to people and now it can't stop to be developed.
[G2 Developer Discussion [Developers Only]] m.ali hasan:
is dev working on this project, or it is dead?
[G2 Developer Discussion [Developers Only]] j1505243:
[MENTION=6545782]xxoscarxx28[/MENTION]

If you are alive... https://gitlab.com/iuni/u3/tree/master/vendor/qcom/proprietary

Maybe we could just build the camera libs from the source? As LG broke theirs? We would need no framework then.
[G2 Developer Discussion [Developers Only]] Startrek852:
The framework isn't just for the camera, it's also for other LG apps.
[G2 Developer Discussion [Developers Only]] j1505243:
That's right, but we have everything basic supported now on LOS, besides camera features.
[G2 Developer Discussion [Developers Only]] @Peterrrrr:
Is it hard to port the orignal Kit Kat camera to LOS?
[G2 Developer Discussion [Developers Only]] bob1791:
Guys, have you tried telegram x app ? I'm running LOS 14.1 and i saw telegram x's camera works smoothly as stock kk
[G2 Developer Discussion [Developers Only]] raptorddd:
no one has flash this yet.?
[G2 Developer Discussion [Developers Only]] Startrek852:
Why are you mentioning me?
[G2 Developer Discussion [Developers Only]] duki994:
hook_jni is used evverywhere.

It's Android SDK's connection/hook to call native functions embedded within app. Look at local libraries. If they don't exist or there is/are generic ones, the one you searching for is probably (statically) linked via those generic ones.

Is there any lib symbol (name of function/function pointer) near hook_jni? It should point you in right direction. If you can't find it, then dissassemble libs that look most probably the place of that func and look through code. I personally use IDA for dissassembling :)
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
Welp never mind xD sorry for mentioning you :P
[G2 Developer Discussion [Developers Only]] xxoscarxx28:
IDA is good for easier disassembly but objdump seems to be better suited for my purpose (and easier to do bulk ops)