yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device Development Themes and Apps] somberchocks:
Tried taking a snap and pressing it to enter the Gallery but wasn't happening so looks like you'll have to enter Gallery the default way. Also since you have installed the camera and the z4 framework into the system directly, it isn't as easy as uninstalling normal apps. Usually if its a standalone sys app, maybe you could convert it into a user app and uninstall it but since you have installed additional files here, you'd better ask the creator how to uninstall everything.

Depending on the aspect ratio you have selected, I am guessing you'll get the max resolution assigned to each of them.

Dude if you are running stock ROM, don't you already have all this to begin with?

This is for Xperia users with custom ROMs that don't have Sony's default camera app.
[Sony Cross-Device Development Themes and Apps] levone1:
Did you mod framework according to op? Not sure what ROM/build you have, but I'm currently using new cm12 build. I can share framework if you want...

https://xdaforums.com/showpost.php?p=70926556&postcount=1618
[Sony Cross-Device Development Themes and Apps] paul_evc7:
Yeah, I have Resurrection Remix 5.5.3 and I downloaded the file according to my ROM and model.

---------- Post added at 03:09 AM ---------- Previous post was at 02:58 AM ----------

Never mind I fix it, maybe did it in different order.
[Sony Cross-Device Development Themes and Apps] bluechip850:
PLEASE ... make this work for ACRO S.... on CM 14.1 pleasee :crying: :confused:
[Sony Cross-Device Development Themes and Apps] iXaidyiu:
Xperia has no 7.1.1 official firmware released yet, and this MOD even will not work for MM, so the possibility for it to work on N is really near to zero. I have told you in several threads and times already.
[Sony Cross-Device Development Themes and Apps] bluechip850:
oh, sorry for that... :(
[Sony Cross-Device Development Themes and Apps] sebasrock156:
Some method for port this to MM?
[Sony Cross-Device Development Themes and Apps] levone1:
Jishnu on G+ says it will work on MM, but I've tested with 3 different MM custom roms on Z1c, and no go... Maybe on non-Sony device with stock fw it might work...
[Sony Cross-Device Development Themes and Apps] sebasrock156:
Itsn't a Sony device for test....
[Sony Cross-Device Development Themes and Apps] Suvam Mondal:
My phone is Meizu m2 note and current ROM is Lineage OS 14.1 (Android 7.1.1)

Will it work if i flash this camera ?
[Sony Cross-Device Development Themes and Apps] iXaidyiu:
This mod won't work on AOSP based Android 6.0+ ROMs.
[Sony Cross-Device Development Themes and Apps] |>/\nte:
Kind of late as an answer, but what if I restore the drm keys when I run an a.o.s.p. rom?
[Sony Cross-Device Development Themes and Apps] iXaidyiu:
Restore it or not the SONY camera framework and such drivers that DRM keys aimed to unlock still missing.
[Sony Cross-Device Development Themes and Apps] levone1:
It's everyone's dream, and there seems to be some hope - https://xdaforums.com/crossdevice-dev/sony/poc-real-trim-instead-drm-fix-t3552893 - but I haven't seen the camera improved, even with ta restored. I've tested on several roms, and asked [MENTION=4120742]munjeni[/MENTION], and he's not sure why it doesn't affect the camera quality, but says maybe it's the type of kernel, (https://xdaforums.com/showpost.php?p=71247163&postcount=808). Still holding out hope...

Right, but that's the point of this thread, is a port of the framework, right, (https://xdaforums.com/crossdevice-dev/sony/guide-how-to-port-featured-sony-camera-t3169253)?
[Sony Cross-Device Development Themes and Apps] |>/\nte:
Damn it…I want something snappier and faster than the stock-based ROMs for my xperia t since it deserves that "flagship" feel, but I've tested many custom ROMs and I've found that the camera quality on the a.o.s.p.-based ones is almost on part with the stock ones …almost (photos are a bit more clear in the latter ones than on a.o.s.p. ROMs). I guess I live for the dream too.
[Sony Cross-Device Development Themes and Apps] iXaidyiu:
Yes, but sadly, not for MM+ AOSP(atm)...
[Sony Cross-Device Development Themes and Apps] levone1:
I've had the same experience, but I was told on G+ that people have gotten it working on MM. I tried with a couple of roms, and didn't work, but it's a little tricky, with apktool and smali/baksmali versions changing so often, to find the right tool and settings to use the files provided. I usually get some errors and have to mess around to get it to compile. I've wondered if there's a way to make it work, or maybe a certain rom... Anyway, meanwhile, the whole G+ thread is deleted and abandoned, and I don't know if I'm going to get back around to testing...

As for AOSP, I've gotten it working, but only on LP.
[Sony Cross-Device Development Themes and Apps] bluechip850:
[MENTION=5491189]xperiaz2[/MENTION] is there any available port for Acro S running Marshmallow ..??? :confused: im currently on nAOSP 6

---------- Post added at 08:07 PM ---------- Previous post was at 08:05 PM ----------

some ways to get this on Acro S, nAOSP MM..? :confused:

is there any thread, i'll try that out..
[Sony Cross-Device Development Themes and Apps] Manjot xda:
[MENTION=5491189]xperiaz2[/MENTION] there is not same files as u given in zip in my framework.
[Sony Cross-Device Development Themes and Apps] Marek8299:
Try .smali from sony's MM firmware
[Sony Cross-Device Development Themes and Apps] bluechip850:
OK thanks, could you please clear that, where should I download from, is it in your Op.?

Or should I find it somewhere..?
[Sony Cross-Device Development Themes and Apps] Marek8299:
Try files from this zip.

If you'll find something like 0x1xxxxxx in .smali, find it in public.xml and replace it with your value.
[Sony Cross-Device Development Themes and Apps] shrazy:
Is it possible to port this for LineageOS 14.1 for Z3 Compact? I want the sony camera and xperia x framework for los 14.1 if it's possible.

Thanks in advance.
[Sony Cross-Device Development Themes and Apps] bluechip850:
Replace with which value, and how do I flash this, could you please make a flashable zip, if I provide my framework.?
[Sony Cross-Device Development Themes and Apps] Ale-X:
Please, port for Z3 compact (Lineage OS 14.1)
[Sony Cross-Device Development Themes and Apps] Marek8299:
I'll try, upload your framework-res and framework.jar
[Sony Cross-Device Development Themes and Apps] panzerox123:
[MENTION=5159164]shrazy[/MENTION] [MENTION=7741265]Ale-X[/MENTION] you do realise that LOS already uses the stock framework right? If you're looking for the stock camera app, this is not the thread.
[Sony Cross-Device Development Themes and Apps] Ale-X:
and what do you suggest,to abandon the 4k mode and all other functions?

There are generally chances of porting the Sony camera app?
[Sony Cross-Device Development Themes and Apps] panzerox123:
Clearly this doesn't add 4K ... It's just the framework
[Sony Cross-Device Development Themes and Apps] Ale-X:
Then the question will be asked differently, can we make a full port for the Sony camera, with all its functionality?
[Sony Cross-Device Development Themes and Apps] panzerox123:
Possible maybe... Since we've got so far :) but this is not the place to ask... Since it's for Lollipop and only the framework... Which we already have .
[Sony Cross-Device Development Themes and Apps] bluechip850:
please have my framework, both flies are in it zipped

Google Drive: https://drive.google.com/file/d/0BwIj0WaOz2G9MmhtcDUxb3ZRdFk/view?usp=sharing

thanks in advance.
[Sony Cross-Device Development Themes and Apps] Ale-X:
But where to ask?
[Sony Cross-Device Development Themes and Apps] panzerox123:
I don't know... No appropriate thread ...
[Sony Cross-Device Development Themes and Apps] Ale-X:
I hope someone will do it, thank you!
[Sony Cross-Device Development Themes and Apps] Marek8299:
Try this.

Do a backup before flashing.
[Sony Cross-Device Development Themes and Apps] bluechip850:
OK, thanks a lot, I try and report..
[Sony Cross-Device Development Themes and Apps] bluechip850:
Hi,

i have downloaded that file, now as described on the OP, after downloading the Z4 camera port.zip....

what is that Flash Sweep Panorama Fix.? should i flash that too..?

also there is a XperiaZ4CameraFaceDetection.zip too...

Should all these files be flashed ..?

or

I do only that, framework+Z4cameraPort..?
[Sony Cross-Device Development Themes and Apps] Marek8299:
Flash framework, then Z4CameraPort, then SweepPanoramaFix and XperiaZ4CameraFaceDetection.
[Sony Cross-Device Development Themes and Apps] bluechip850:
HI, i flashed as per your direction, but after , i got only that camera widget, which i pulled to my homescreen from widgets menu, that in it.... the camera is not enabled.... only i can click that 'Panorama' icon, which itself opens to error.... is there anything wrong...???

the procedure done: (wipe dalvik and cache)

1: flashed framework.zip (which you modified for me)

2: camera port

3: Sweep panorama

4: face detection.

restart..

please suggest any wrong steps if any...

thank you..
[Sony Cross-Device Development Themes and Apps] Marek8299:
Can you send me log?
[Sony Cross-Device Development Themes and Apps] bluechip850:
How to get it,

Via Twrp.?
[Sony Cross-Device Development Themes and Apps] Manjot xda:
Logcat
[Sony Cross-Device Development Themes and Apps] bluechip850:
Sorry I have trouble getting the log, I saved log from Twrp, said it saved in SD card. But its too long and it contains long info about my backup before flashing.

Here I have attached a screenshot of my widget which I got after installing.

Repeating the steps once again :

Wiped Dalvik cache

Wiped cache

Installed framework.zip you gave me

Again wiped

Installed z4 port

Again wiped

Installed sweep panorama

Again wiped

Installed face detection

Again wiped

Restarted
[Sony Cross-Device Development Themes and Apps] iXaidyiu:
Send logs recorded when opening the Panorama app.
[Sony Cross-Device Development Themes and Apps] Marek8299:
Use CatLog from Play Store to get log.

If you don't have root, use ADB on PC.

How to take logcat: https://xdaforums.com/showthread.php?t=1726238
[Sony Cross-Device Development Themes and Apps] Marek8299:
I need log from android, not from TWRP. That doesn't help me.
[Sony Cross-Device Development Themes and Apps] bluechip850:
Sorry, I installed catlog logreader is that what you specified.?

This is the first time I'm using logtools, so could you please explain how to get it via that app.

Should I run it in background. And open panorama mode on Xperia cam widget.?

And copy that log here.?

Sorry making this more complicated, but I really needed to get that Xperia cam working... :confused:
[Sony Cross-Device Development Themes and Apps] iXaidyiu:
Let it run in background.
[Sony Cross-Device Development Themes and Apps] Marek8299:
I found this for you: https://www.youtube.com/watch?v=8cnlM6p5n1A
[Sony Cross-Device Development Themes and Apps] Andrey_Gruzdkov:
Hi, can anyone try to make a port for Xperia Z C6603 LOS 14.1?
[Sony Cross-Device Development Themes and Apps] :
Hello,

First of all, thanks for all of your hard work and contribution, it is very appreciated :)

I wanted to ask if anyone could help me out with a framework for my device (Z3 Compact CM12.1 20161016), since I don't know the first thing about compiling this stuff myself, as the guide requires.

I've attached my framework.jar, it would really make my day if somebody more experienced than me could make a Z4 framework with it for me.

Thanks a lot in advance! :)
[Sony Cross-Device Development Themes and Apps] Manjot xda:
Ok I'll try soon
[Sony Cross-Device Development Themes and Apps] :
Here's a more comprehensive guide for noobs like me on how to decompile, modify and recompile the framework.

1) Download and Install the latest JDK

2) System -> Advanced System Settings -> Advanced -> Environment Variables

3) Under "System Variables", edit "Path" and add a path to wherever your JDK binaries are located (for example "C:\Program Files (x86)\Java\jdk1.8.0_121\bin")

4) Download and extract "Z4FullyFeaturedCameraFramework.zip" from this thread and Rom Tools from here.

5) Copy "framework.jar" from your device's "/system/frameworks" folder to the PC

6) Extract "framework.jar" to a folder and copy "classes.dex" to the "input" folder of Rom Tools

7) In Rom Tools' folder run Script.bat, select the 1st option, "decompile classes.dex"

8) Go to where you extracted "Z4FullyFeaturedCameraFramework.zip"

9) Copy the "android" folder and paste it over the "android" folder in "..\Decompiled\Classout" under Rom Tools

10) Return to the window of "Script.bat" (or run it again) and select the 2nd option, "recompile classes.dex"

11) Copy the new "classes.dex" file from the "output" folder under Rom Tools into the folder where you extracted "framework.jar", ovewrite the existing one

12) Shift-RClick in the folder -> Open Command Window here

13) Type or paste "jar cf framework.jar META-INF classes.dex classes2.dex" and hit Enter

14) A "framework.jar" file will appear, copy or push it to your phone, overwrite the one in "/system/frameworks"

15) Chmod 755 the file you just copied

Hope this helps someone else, and I've attached my modified working framework.jar here.

Notice that it'll work only for Z3 Compact CM12.1 20161016.
[Sony Cross-Device Development Themes and Apps] ReaperXIII:
anyone know how to port the framework and stock camera to LOS 14.1 for Z2?
[Sony Cross-Device Development Themes and Apps] levone1:
You can also do it on your phone - https://xdaforums.com/showpost.php?p=72242257&postcount=531
[Sony Cross-Device Development Themes and Apps] alexs784:
This would be really nice, I am interested too
[Sony Cross-Device Development Themes and Apps] levone1:
Seems like [MENTION=5034254]Aeron sagar[/MENTION] is working on it and making progress - https://xdaforums.com/showthread.php?p=72328809#post72328809
[Sony Cross-Device Development Themes and Apps] Suvam Mondal:
My device is Meizu m2 note running on MIUI 8 (ported) based on Android version 5.0.2

Will it work ?
[Sony Cross-Device Development Themes and Apps] djfallen3334:
Mi4C

I've tried to port to Xiaomi mi4C but it's not working on any custom roms. There are missing smalis and if I try to add z4's smalis the baksmali gives me errors and I can't compile it back. Maybe it works on stock miui but i've never tried it.
[Sony Cross-Device Development Themes and Apps] levone1:
Don't know if it will work with that phone, but take a look at this - https://xdaforums.com/showpost.php?p=72242257&postcount=531. The smali files are old, so you need different version of apktool/baksmali so the code is compatible.
[Sony Cross-Device Development Themes and Apps] djfallen3334:
I'll test it on every lp,mm build, but generally the problem is, I haven't got the 13 smalis that I have to replace. I have only 7 or 10. I think it's a rom based thing. On my SP it worked flawlessly with rr or cm 12 roms :). I'll give it a try.

Update: Works near good on CM 12.1 (TeamSuperluminal latest build).

Working things: -Manual mode (only photo) from widget launch.

-Ar and other stuff are working.

Not working: - Launch from camera app is not working

- Video recording not working, force close

- Sometime random crashes

- Quality settings missing (no MP settings)

So it is not really functional. I'm waiting for N release. I'll try to help to port it, maybe there's an option for it.

Thank's for the thread and the guide!
[Sony Cross-Device Development Themes and Apps] jimmkhn:
which one work for lineageos 7.1.2?
[Sony Cross-Device Development Themes and Apps] iXaidyiu:
None. And please never should you quote such long posts.

Moreover, please make good use of the lovely Search button!
[Sony Cross-Device Development Themes and Apps] CAE_:
Will it work on CarbonROM Android 7.1.2 for Xperia Z1?
[Sony Cross-Device Development Themes and Apps] iXaidyiu:
There is another port for that collaborated by me on this forum, go check that out.
[Sony Cross-Device Development Themes and Apps] TheLastKnight0713:
Is there a port for Xperia tablet Z (SGP311U/B)? Trying to get remote play.
[Sony Cross-Device Development Themes and Apps] AbdalraziQ:
Can I do that for lineage os 14?

Xperia ZR
[Sony Cross-Device Development Themes and Apps] sirdoha:
Bro, please add support for the Z5. Thanks for your hard work! [MENTION=5491189]xperiaz2[/MENTION]
[Sony Cross-Device Development Themes and Apps] Vitorhugo162008:
Good work bro. Congratulations this so nice.
[Sony Cross-Device Development Themes and Apps] salama_ahmed:
Is it work with Xperia zr
[Sony Cross-Device Development Themes and Apps] iXaidyiu:
Depends on your Android version. Please refer to title for more info.
[Sony Cross-Device Development Themes and Apps] Maximus_11:
Hi, can you, please, make port for this ROM? (z3c, cm12.1)

https://xdaforums.com/z3-compact/or...t-cm12-android-5-0-freexperia-t2959667/page64

Because i can't find required ROM for your port

P.S.

I tried this:

https://xdaforums.com/crossdevice-dev/sony/guide-how-to-port-featured-sony-camera-t3169253

But this doesn't helped me, i got failed signature verification and broken ROM
[Sony Cross-Device Development Themes and Apps] pajos.gabros:
will it work with carbon rom cr 5.1 for z3c?
[Sony Cross-Device Development Themes and Apps] iXaidyiu:
No. Carbon ROM 5.1 is equivalent to CM14.1 and Android 7.1 Nougat, so a definite No can be concluded here. Perhaps you can try the new port by [MENTION=7796065]opendata[/MENTION] which can also be found on XDA.
[Sony Cross-Device Development Themes and Apps] salama_ahmed:
My Android version is lineage Os naugat
[Sony Cross-Device Development Themes and Apps] iXaidyiu:
So no, neither will opendata one's work for you, sorry.
[Sony Cross-Device Development Themes and Apps] Devet:
There is a good idea to add this lines to the framework.jar \ smali \ android \ hardware \ Camera$Face.smali

.class public Landroid/hardware/Camera$Face;
.super Ljava/lang/Object;
.source "Camera.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroid/hardware/Camera;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "Face"
.end annotation

# instance fields
.field public blinkDetected:I

.field public faceRecognised:I

.field public id:I

.field public leftEye:Landroid/graphics/Point;

.field public mouth:Landroid/graphics/Point;

.field public rect:Landroid/graphics/Rect;

.field public rightEye:Landroid/graphics/Point;

.field public score:I

.field public smileDegree:I

.field public smileScore:I

# direct methods
.method public constructor <init>()V
.locals 3

.prologue
const/4 v2, 0x0

const/4 v1, 0x0

.line 1563
invoke-direct {p0}, Ljava/lang/Object;-><init>()V

.line 1623
const/4 v0, -0x1

iput v0, p0, Landroid/hardware/Camera$Face;->id:I

.line 1632
iput-object v2, p0, Landroid/hardware/Camera$Face;->leftEye:Landroid/graphics/Point;

.line 1641
iput-object v2, p0, Landroid/hardware/Camera$Face;->rightEye:Landroid/graphics/Point;

.line 1650
iput-object v2, p0, Landroid/hardware/Camera$Face;->mouth:Landroid/graphics/Point;

.line 1627
iput v1, p0, Landroid/hardware/Camera$Face;->smileDegree:I

.line 1631
iput v1, p0, Landroid/hardware/Camera$Face;->smileScore:I

.line 1635
iput v1, p0, Landroid/hardware/Camera$Face;->blinkDetected:I

.line 1639
iput v1, p0, Landroid/hardware/Camera$Face;->faceRecognised:I

.line 1564
return-void
.end method

but for existing lines leave the old nubers of " .line "
[Sony Cross-Device Development Themes and Apps] pluckwallflower:
No download link for xperia sp aosp?
[Sony Cross-Device Development Themes and Apps] elcidx:
If older builds of RR 5.5.0 will work witch new 5.5.9?

Phone Z1 Compact
[Sony Cross-Device Development Themes and Apps] yogeshsoni9009:
xperia l cm12 PrimeXperia™ LP v2.5

hey friend, will this camera work on xperia l cm12 primeXperia LP 2.5 rom??

if works, have to flash z4 framework too or direct camera port??
[Sony Cross-Device Development Themes and Apps] rethinkk:
[MENTION=5491189]xperiaz2[/MENTION] big thanks bro for this amazing work, nice to see you again :)

C2105 cihazımdan Tapatalk kullanılarak gönderildi
[Sony Cross-Device Development Themes and Apps] somberchocks:
There's just one framework for Xperia L in the opening post and that's for CM12 Beta 6 whereas your ROM's different so I doubt it will work.

Well if you are feeling brave, you could always take a nandroid backup and give it a shot :p
[Sony Cross-Device Development Themes and Apps] NicestRudeGuy:
whats next 2 port bravia engine,ui etc :)
[Sony Cross-Device Development Themes and Apps] mansoorarb:
@ XenolithicYardZone.......is it confirm that the camera doesn't fc after initial FC's..... Cos I again flashed the ROM to remove the camera.....it was annoying when it fc in middle of taking a pic.....I want it badly as no other camera app takes a pic like this Z4 camera port app
[Sony Cross-Device Development Themes and Apps] somberchocks:
Well it does fc every once in a while but on the whole, I'd say its working and it has never fc while taking a pic. Also it will sometimes restart on its own but I have taken a dozen snaps with it and they have all come out well.

Did you dirty flash the ROM or did you perform a clean install? Did you flash all 3 requisite files? Which recovery are you using? Did you wipe cache and dalvik?

I know what you mean man...the default camera app sucks ass compared to this. I have used this app before when my brother's ZR was stock and I thought it was great. Its awesome we can use it on the SP now.

PS : At the start of the post, I am guessing you wanted to mention me. Don't leave a space between @ and the name next time. Used to make the same mistake myself in the past :p
[Sony Cross-Device Development Themes and Apps] Droidlover123:
[MENTION=5491189]xperiaz2[/MENTION] can you pls upload 20150507(YYYYDDMM) nightly for xperia M as it is not available at official web site!!!!

Or if anyone else have this nightly pls upload and post link

Thanks a lot.... :)
[Sony Cross-Device Development Themes and Apps] John.D..:
The big question: Now the camera takes pictures like a Stock?

Or is it just porting an application without the libs?
[Sony Cross-Device Development Themes and Apps] mansoorarb:
I clean flashed the rom....using twrp....all three files flashed with correct framework file for aicp 10....

It doesn't matter that it fc....but iys annoying when restarted and again it fc bfr taking a pic

---------- Post added at 02:00 AM ---------- Previous post was at 01:56 AM ----------

Request to the OP to include the album app too along with the camera app....just like the htc m9 camera port by jishnu where the gallery is included
[Sony Cross-Device Development Themes and Apps] anmolkakkar:
Dude, was wondering if could test this work of the dev on stock ROM, thats all!

Z1C does have Sony Camera but doesn't have the Z4 framework & Camera app which is new and better, so thought of giving it a whirl!

Anyways, thanks for replying :good:
[Sony Cross-Device Development Themes and Apps] somberchocks:
Ah I see. Thought all the Z series had the same camera app.

Well I can tell you one thing - its not without its issues...at least with AICP (maybe it works flawlessly with other ROMs) but there's also no denying its infinitely better than the damn stock camera app that comes with custom ROMs.

Well if you want it that bad, all you gotta do is flash RRv5.5.0 :p
[Sony Cross-Device Development Themes and Apps] anmolkakkar:
Nah, will not be flashing for now. I don't want to mess up the defaults in my phone (TWRP Backup & Restore is a long method :eek: ). Anyways it says only for AOSP :P

I definitely believe that this is better than the stock camera app in Z1C since the default app could use some tweaks for giving out the best performance.
[Sony Cross-Device Development Themes and Apps] yunamunchy:
not a bad port but still missing things and small bugs. photos wont save because it doesnt detect aosp gallery. anyways keep fixing things dev , thanks a lot
[Sony Cross-Device Development Themes and Apps] hxq88:
this mod only working on related rom? can i flash it on another AOSP?

edit: tried port for Crdroid, camera force close on auto mode xD