yashsingh1/xdaforums huggingface dataset:
[OnePlus X Android Development] lfc222222:
questions regarding Camera and SD card

I'm currently testing the existing release (Alpha-1). Great news about camera being enabled!!! Couple of related questions:

1. Will there be an updated Onyx release zip file to enable Camera anytime soon?

2. Is there a fix/workaround to have SD card reflected in any SFOS UI? I looked at the original thread and someone mentioned there is a "workaround for SD card"...

I'm currently not able to verify the card I inserted is actually reflected in any SFOS menu, but I'm new to SFOS usage, so it's possible I'm looking in the wrong place...

df -kh does show : /dev/mmcblk1 ... /media/sdcard/0000-EAF0
[OnePlus X Android Development] jobe-m:
I leave the decision to release alpha-2 to Kimmo. If you are really interested to test an intermediate testing release from me I might share my build privately. I want to avoid that people ask for bugfixes which are already fixed but not yet in my ROM build.

/media/sdcard/<id> is actually the place where the SD card will be mounted.

Try to put some mp3 music files in the SD card. They should pop up in the jolla mediaplayer. (Install with "pkcon install jolla-mediaplayer" in the terminal)

Or install a file manager where you can look at the SD card content: https://openrepos.net/content/cepiperez/filecase-0 (Use warehouse app from openrepos or download the rpm for armv7hl and install locally with pkcon)
[OnePlus X Android Development] adco:
Hi... im having bootloop no matter what i try...

i use twrp 2.8.7.0

tried to flash CM Build 12.0s and than sailfish

ans also CM Build 13.0s and than sailfish

what am i missing???
[OnePlus X Android Development] jobe-m:
I am using twrp 3.0, don't know if that is needed but worth a try.

Also you need to flash first CM Build _12.1_ and then Sailfish.

HTH
[OnePlus X Android Development] kimmoli:
* Wipe to factory (basic default wipe)

* Flash with twrp http://xdaforums.com/devdb/project/dl/?id=16557

* Flash with twrp http://images.devaamo.fi/sfe/onyx/alpha-1/sailfishos-onyx-release-2.0.0.10-alpha-1.zip

* Reboot system

---------- Post added at 10:31 AM ---------- Previous post was at 10:28 AM ----------

I have high hopes to release alpha-2 tomorrow (friday) (2016-03-25. Before midnight EEST)
[OnePlus X Android Development] mousse04:
Great. Can't wait :)
[OnePlus X Android Development] szymeczek34:
That's fast! Thanks, I can't wait!
[OnePlus X Android Development] jobe-m:
Wow, you have an incredible pace :)

I realized that I do not have yet your patches for droidmedia in my own build. This package really looks weird.

I configured it under $ANDROID_ROOT/external/droidmedia. But how is it actually built?

In mer OBS I did find only projects with droidmedia package which are either unresolvable or otherwise incomplete. E.g. where do I get BuildRequire droid-bin-src-full from?

My Sailfish build got the droidmedia package from OBS repo of project nemo:devel:hw: oneplus: onyx. But the package is not in that project. It seems that it was just injected in the repo...

Would be really great to understand how this package is build as it seems to be one of the core elements in the HAL.
[OnePlus X Android Development] kimmoli:
Released

:) i would like to understand it too.

The hadk-faq explains how to build droidmedia (and minimediaservice,..) it provides ~copypasteable scriptlets for that.

Removing binaries from out/ -step is important before building droid-hal-$device
[OnePlus X Android Development] knauji:
can we dirty flash over the alpha-1?
[OnePlus X Android Development] jobe-m:
Did I say incred... wait for it.... incredible :D

Thanks for the pointer. I somehow missed it ;)
[OnePlus X Android Development] kimmoli:
Unfortunately OTA and incremental not yet tested, only re-install possible now. Will erase your data.
[OnePlus X Android Development] mousse04:
[MENTION=1082346]kimmoli[/MENTION] do you know what's the problem of the vibra ?
[OnePlus X Android Development] kimmoli:
Yes. The ff_memless driver fails to probe.
[OnePlus X Android Development] mousse04:
Strange, just install alpha2, but camera does not work ...

Yes, it works :). Perfect :)

Thanks [MENTION=1082346]kimmoli[/MENTION], adding gesture is a must :)
[OnePlus X Android Development] philwinchester:
First, thanks for the update :)

I have a Problem. i dunno what iam doing wrong.

This is how i do it.

- Factory reset

- Flashing cm. then Sailfish on top

iam getting ERROR 7

assert failed getprop(''ro.product.device'') == "onyx" || getprop(''ro.build.product'') == "onyx" ||

getprop(''ro.cm.device'') == "onyx"

any ideas? the alpha 1 before was working fine.
[OnePlus X Android Development] mousse04:
yes, you have to open the zip file (with winrar for instance) go to :

META-INF\com\google\android

and edit the file : updater-script

then remove the line about "assert ... ony ... getprop ...".

Then, put the file updated in your zip and try again.
[OnePlus X Android Development] philwinchester:
thanks alot its working fine now :)
[OnePlus X Android Development] kimmoli:
Eh. Never needed to do that. I tested the zip installation with wipe, flash CM, flash Sailfish... ??? :confused:
[OnePlus X Android Development] mousse04:
It happens sometimes on some zip
[OnePlus X Android Development] adco:
This is what I did...but then i reflashed the twrp and it worked....

Thanks
[OnePlus X Android Development] lfc222222:
Thank you all for your efforts! In addition to Camera being enabled, what else is new compared to Alpha-1?
[OnePlus X Android Development] kimmoli:
see here http://xdaforums.com/showpost.php?p=65510059&postcount=3

Also i just got the vibrator working properly, will be included in alpha-3
[OnePlus X Android Development] IchBinNoob:
Hey, I love SFOS but I really need apps like YouTube, Whatsapp, and several Google play apps and so far I know, I'm not able to install Google play apps, or? If there is and way to install Google play apps please tell me, thanks ;)
[OnePlus X Android Development] szymeczek34:
No, you can't but soon you'll be able to have Sailfish and Android installed at the same time and switch between them in no time.

There is also a chance of sfdroid which is a full Android OS run in a window on SFOS.
[OnePlus X Android Development] mousse04:
That's a very good news :)
[OnePlus X Android Development] IchBinNoob:
And is there a way to install "sfdroid" in sfos for our OPX?
[OnePlus X Android Development] DavyA:
Good New for Us!

MultiRom's TWRP with Sailfish OS support is coming!
[OnePlus X Android Development] szymeczek34:
Not yet or at least I know no method of doing it.
[OnePlus X Android Development] Dr.Electronic:
Please smilar video recording by OPOX

Sailfish OS installation on Oneplus One

https://www.youtube.com/watch?v=rhYEM03MELQ
[OnePlus X Android Development] lfc222222:
Is it too premature/inappropriate to provide bug feedback for alpha-2?

Also, what's the criteria/timeline for moving from Alpha, to Beta, to stable release?

(not trying to be pushy, just curious)
[OnePlus X Android Development] jobe-m:
I guess without bug reports we will never know all bugs and there won't be any beta release with lesser bugs;)

So here are my findings after now using the OPX as my daily phone since last friday.

It is really annoying not to have access to Jolla store since some of the apps I used on the Jolla phone in the past are only available there and are not available from sources. There is a workaround to grap all pieces of an app (acutally an rpm package) and take it to the new phone. I have done so for the little app nightsilence which I really missed. (On Jolla phone do in the terminal (devel-su): rpm -ql harbour-nightsilence | xargs tar -zcvf /home/nemo/nightsilence.tgz -> copy tgz archive to /home/nemo/ on OPX -> on the OPX do in the terminal (devel-su): cd / && tar -zxvf /home/nemo/nightsilence.tgz)

I am really impressed how stable the SW is already with alpha-2. However there are some gliches. This is what I found so far:

- camera saves pictures always in landscape format

- pinch to zoom in gallery on pictures does not work always, Sometimes when you place the second finger on the display the first finger is lost

- gestures on the blank screen (Flashlight, music control...) sometimes are not recognized and you need to try a second, third or fourth time
[OnePlus X Android Development] kimmoli:
Yes please, check mer wiki and here for known issues first.

too complicated...

i would use pkcon download and then pkcon install-local

and most (and more) apps are available also from openrepos...

Known issue, working on solution. seems to be also on some other ports. Exif tag orientation is not processed correctly somewhere.

Seems to be little glitchy, dunno what causes it. maybe caused multi-touch-protocol "b".

I haven't recognized any big issues with them

---------- Post added at 08:04 PM ---------- Previous post was at 08:02 PM ----------

We have a roadmap for alpha-3. I think beta will be available earliest when store access is available.
[OnePlus X Android Development] CertifiedBlyndGuy:
Noticed that 12.1 13S caused a bootloop to recovery and that I had to remove the build assertion in the update script in order to flash this with MR 33 (weird).

Downloading 12S right now forest if that fixes the issue as that's what is recommended.
[OnePlus X Android Development] taaeem:
Please use the cm zip mentioned in OP, since we compile against that version.

You probably still have to remove the first line in the updater script, that's a known issue, which will be fixed in the next release.

No byline
[OnePlus X Android Development] lfc222222:
Also, camera ui in Settings -> Apps shows photo resolution for main/front camera as 8/2 mpix respectively , even tho opx sensors are 13/8mpix (actual image resolution is correct)
[OnePlus X Android Development] CertifiedBlyndGuy:
Gave it a shot and it worked... Weird considering that 13S was a simple maintnence update though.

That said, Alpha 2 is far more usable. I cant add a Jolla account anymore due to IMEI issues but besides that, I think its pretty awesome. Thanks for the great work. Hope to see a beta with the store soon. Thats the only thing keeping me from using this as a daily driver.

When we manage to fix that one issue with MR thay should change however ;)
[OnePlus X Android Development] ashwany.yadav:
I am getting mount data error device or resource busy
[OnePlus X Android Development] lfc222222:
Can anyone confirm whether they have issues sending/receiving MMS (multi-media msgs)? I suspect it's a carrier compatibility with auto APN settings, tho my N9 works just fine...
[OnePlus X Android Development] szymeczek34:
I haven't configured anything and I just sent and received mms.
[OnePlus X Android Development] szymeczek34:
Quick report: I'm using OPX with SFOS on a daily basis as my main cell. It works perfect, of course there are a couple of glitches noted before but they are not significant. Oh, one thing nobody said before is that bluetooth headphones don't seem to work, they pair but don't connect or the phone doesn't use them.
[OnePlus X Android Development] loknar299:
Another happy user

Reporting another working use-case :). I bought Oneplus X pretty much because of two things: it has AMOLED display (i got used to low power mode from Nokia N9) and it has working port of Sailfish OS (so stock operating system survived like 10 minutes before being overwritten by CM12.1 and subsequentially by Sailfish :o) ). Also, HW wise it's one of the most powerful sailfish device.

I am curious about one thing, can someone point me to some document describing what work has to be done, to port camera? I'd like to make some adjustments resolution (Oneplus X can do 4K in CM12.1) and bitrate wise, and when i compared files from Jolla and Onyx, there are some configuration files either missing, or they are somewhere else/in binary format.
[OnePlus X Android Development] szymeczek34:
It used to be in here: /usr/share/jolla-camera/presets/GstOMXMPEG4VideoEnc-omxmpeg4videoenc.prs

Although that was a long time ago on version around 1.0.0.25, it could have changed since then.

Did you manage to get LPM working on OPX? I miss it so much.

Edit. Yep, it's gone.
[OnePlus X Android Development] loknar299:
LPM how to

Exactly, and i didn't managed to find it anywhere else.

Well, LPM was (and in a way still is) tough nut to crack, but what i did:

Enabling LPM (in terminal under root)

mcetool --set-low-power-mode=enabled

After this it's there, but only for several seconds, i also added it as reaction to powerkey press

mcetool --set-powerkey-blanking=lpm

And because i want it there all the time (unlike Jolla's we have AMOLED's so we can afford it battery wise) this is how to change timeout:

mcetool --set-blank-from-lpm-on-timeout=130

(It's in seconds, I started with one day - 86400, but unfortunately it doesn't update [time stays the same "forever"], so it's kind of pointless)

So to address this, with help of some older sailfish OS forum posts i created configuration, that updates LPM every minute, but only when it's already active (pretty much switching it off and on immediately, since i didn't find out how to just refresh it )

It has three parts:

lpm.service

file, that determines what to run - lpm.sh script in my case,

lpm.service

should be placed in

/etc/systemd/system/

lpm.timer

file, that sets how often should lpm.service run, should also be placed in

/etc/systemd/system/

and also it needs to be activated

systemctl enable lpm.timer

and started (or you can reboot, then it of course starts automatically, since it's activated)

systemctl start lpm.timer

and finally

lpm.sh

script, that checks, whether system is active or locked and update when necessary (has to be runnable [chmod +x lpm.sh] of course)

Unfortunately, so far LPM consumes battery a lot (something between 1-2 % per hour), for me it is acceptable, and also if you need to get longer life, just put it display down, since proximity sensor switches LPM off (then it's more like 1 % down in three hours).

lpm.timer:

[Unit]
Description=LPM Update

[Timer]
OnCalendar=*-*-* *:*:00
#This means that service with the same name (lpm) is activated every minute

[Install]
WantedBy=timers.target

lpm.service

[Unit]
Description=LPM refresh

[Service]
ExecStart=/root/lpm.sh

lpm.sh (very simple, i hope it can be done better way, but so far i don't know how)

#!/bin/bash
if grep mce /sys/power/wake_lock >/dev/null 2>&1
#checks whether phone is awake
then
if /usr/sbin/mcetool | /bin/grep Inactivity | /bin/grep inactive >/dev/null 2>&1
#checks whether LPM is active
then
/usr/sbin/mcetool -d
#switches display on
/usr/sbin/mcetool --blank-screen-lpm
#switches back to LPM, but with updated time
fi
fi
[OnePlus X Android Development] szymeczek34:
Wow, great, thanks. I'll check it when I find some free time.

I'm wondering how guys at Nokia manage to do this. On the N9 LPM didn't eat much battery, even on old symbian phones it was alright and now Samsung's always on clock or whatever it is called drains about 1% an hour.
[OnePlus X Android Development] loknar299:
One more thing, in default is shows only date,time&notifications, if you want also status bar (battery,provider,icons) you need to either install patch, or change one of the system files

(i cannot post links, so add https)

openrepos.net/content/ancelad/patch-show-statusbar-sneak-peek-screen

--- jolla/usr/share/lipstick-jolla-home-qt5/lockscreen/LockScreen.qml	2016-01-07 05:20:31.898628438 +0330
+++ alina/usr/share/lipstick-jolla-home-qt5/lockscreen/LockScreen.qml	2016-01-07 05:23:15.390633288 +0330
@@ -148,8 +148,8 @@
updatesEnabled: lockScreen.locked
color: lockScreen.textColor
opacity: !waitingSystemStart.running && vignette.opened
- ? (deviceLockContainer.isCurrentItem ? deviceLockItem.opacity : lockItem.clock.opacity)
- : 0.0
+ ? (deviceLockContainer.isCurrentItem ? deviceLockItem.opacity : 1.0)
+ : 1.0
}

In this case it's clear, system won't suspend as long as there is anything on the screen, be it normal screen or lpm, maybe some workaround can be made, but it's pretty much only for Sailfish AMOLED users, so i guess a few dozens :).
[OnePlus X Android Development] Riggs888:
Can someone show me a filebrowser APP like es file Explorer. How can i stream Videos from my nas.

A tip would be great. And are you using whatsapp?
[OnePlus X Android Development] loknar299:
You should find all you need on openrepos.net

File managers:

FileCase

Filetug
[OnePlus X Android Development] lfc222222:
Has anyone figured out how to add screen blanking "on/off" capability (similar to N9 coderus Unrestricted System UI)? I could not find a patch for it on openrepos.net. It can be helpful when using maps/navigation while driving (atm I'm using HERE maps on browser).
[OnePlus X Android Development] loknar299:
It should be possible to do it with mcetool, and there's a gui for it in openrepos.net

Either

--set-demo-mode=on

or

--set-never-blank=enabled

Didn't need it so far though.
[OnePlus X Android Development] CertifiedBlyndGuy:
FileCase is the best browser I've used
[OnePlus X Android Development] Alecsandru90:
how about 2.0.1.7 can this build be updated? , thank you for your work
[OnePlus X Android Development] kimmoli:
Lots of activity here , been busy in RW

recommended mcetool -Ddim (if it was already in mce on alpha-2)
[OnePlus X Android Development] loknar299:
4K video

I've managed to configure jolla-camera to capture 4K (3840x2160) video (possible thanks to [MENTION=4800121]Sultanxda[/MENTION] ), unfortunately it's kinda experimental right now, since i lost ability to take still images in jolla-camera (but it still works ie in hidden camera - without viewfinder), also framerate isn't very stable varies between 20-30 fps, on CM12.1 holds 30 fps though.

You can look, and also download the original test video here:

https://www.youtube.com/watch?v=_TlNeCSwmr8

If you want to try it, you are doing it at YOUR OWN RISK as usual with these things

How to in general is:

Flash CM12.1 as usually

Flash Sultanxda patch

http://xdaforums.com/oneplus-x/orig-development/mod-custom-camera-hal-4k-uhd-dci-30-fps-t3315382

Flash Sailfish

After that it is necessary to change two aspects of configuration

-bitrate (default is very low 12Mbps)

-resolution (default is FullHD)

Bitrate can be changed in file

/usr/lib/qt5/qml/com/jolla/camera/settings.qml

It's variable:

property int videoBitRate: 12000000

I used 65000000

Resolution is specified in file

/etc/dconf/db/vendor.d/jolla-camera-hw.txt

I added it as an attachement, so backup your original, then copy my version and after that, run under root in terminal:

dconf update

And try to take a video :good:
[OnePlus X Android Development] kimmoli:
nice

>> Photo capture up to 4208x3120 resolution (instead of 4160x3120)

Check from logcat what resolutions it shows, if that above is changed, edit jolla-camera-hw.txt with that new image resolution?
[OnePlus X Android Development] loknar299:
I tried to change it, but no change in behavior.

Maybe I described it incorrectly, camera viewfinder for static images didn't work from the beginning (in my case flash cm12.1, flash camera patch, flash sailfish), and since camera patch contains only one configuration file (media_profiles.xml), which is i think only for configuring video, and several libraries, i think there will be some difference in calling of these libraries causing this behavior. I looked into HADK, but unfortunately in camera section there is only "TODO" :(. Possible solution might be to build sailfish against CM12.1 with already applied 4K patch, but i don't know how (yet :) ).

As far as logs go, there are a lot of errors

from journalctl:

Apr 08 09:33:54 localhost [19219]: [W] CameraBinSession:: processBusMessage:1027 - CameraBin error: "failed to negotiate caps"
Apr 08 09:33:54 localhost [19219]: [W] CameraBinSession:: processBusMessage:1027 - CameraBin error: "The stream is in the wrong format."
Apr 08 09:33:54 localhost [19219]: [W] CameraBinSession:: processBusMessage:1027 - CameraBin error: "Filter caps do not completely specify the output format"
Apr 08 09:33:54 localhost [19219]: [W] CameraBinSession:: processBusMessage:1027 - CameraBin error: "Internal data stream error."

(and last message goes over and over again)

and from logcat i attached it as a file (very long)
[OnePlus X Android Development] JeffHoogland:
Does anyone have SFDroid running on the OnePlus X under sailfish yet? Thinking about swapping my Nexus 5 out for one of these, but need a few Android applications still and don't want to dual boot the device.
[OnePlus X Android Development] kimmoli:
ok

I used this to get camera resolutions, leave it running and start camera.. i couldn't see such in logcat you attached.

/system/bin/logcat 2>&1 | grep "supported.*sizes"

maybe the changed drivers/libs use different strings or none at all...

The viewfinder has its own caps., which propably thn fail for images.

>> CameraBin error: "failed to negotiate caps"

If you want lots of logs... (or :7), it might tell why caps failed?

GST_DEBUG="*:5" jolla-camera

I might have some time today to try this too..
[OnePlus X Android Development] iamsunface:
Error

I get an " update error:7" message while installing. I did all the procedure correctly
[OnePlus X Android Development] taaeem:
Remove the assert line from the updater-script in the zip file, will be addressed in the next release.
[OnePlus X Android Development] loknar299:
Thanks for getting me on the right track, resolution was the key to the problem.

It bothered me, why capturing movies was possible, but taking pictures was not, so i tried to find differences in configuration.

For some reason, in jolla-camera-hw.txt, variable for viewfinder had completely wrong value - viewfinderResolution='2048x1536', after i changed it to 1920x1080, it works like a charm, so thanks for the help. :good:

I also reedited my original 4K post so other might try it in a more simple way :)
[OnePlus X Android Development] kimmoli:
Seems to work. I just flashed Sultan camera patch on top of sailfish installation with twrp. Then modified qml and jolla-camera-hw.

Video-preview shows green line in bottom (?)

the primary camera resolutions for 4:3 and 16:9 i changed

dconf write /apps/jolla-camera/primary/image/viewfinderResolution_4_3 "'1440x1080'"
dconf write /apps/jolla-camera/primary/image/imageResolution_4_3 "'4208x3120'"

dconf write /apps/jolla-camera/primary/image/viewfinderResolution_16_9 "'1920x1080'"
dconf write /apps/jolla-camera/primary/image/imageResolution_16_9 "'4160x2340'"

I'll keep investigating a bit more
[OnePlus X Android Development] loknar299:
About that green line, i read that someone (i didn't considered it important, so i didn't bookmarked it) has video with output 1920x1089 instead of 1920x1080, and in 4K it says (only in VLC though, couldn't confirm it anywhere else) resolution is 3840x2178, so maybe the green line is those extra pixels (invisible anywhere else).
[OnePlus X Android Development] kimmoli:
Hi [MENTION=5898947]loknar299[/MENTION] - you might be interested on what i wrapped up; onyx-camera-settings-plugin

https://build.merproject.org/packag...ngs-plugin?repository=sailfish_latest_armv7hl

sources: https://github.com/kimmoli/onyx-camera-settings-plugin

0.0.5 - Add video bitrate setting

EDIT: 0.0.6 - Add missing file to rpm :rolleyes: , Czech translation

Help other languages: https://www.transifex.com/kimmoli/onyx-camera-settings-plugin/
[OnePlus X Android Development] loknar299:
Wow, nice :)

So pretty much last thing that is left is to find out, how (or whether at all) can we control framerate, camera shoud be able to do 3840x2160@30fps, 1920x1080@60fps and 1280x720@120 fps

Wicked, that's actually better than what can Jolla owners do :D
[OnePlus X Android Development] iamsunface:
Thanks a lot. I flashed the os. But I am stuck in bootloop and always redirected to recovery
[OnePlus X Android Development] taaeem:
You followed the instructions exactly?
[OnePlus X Android Development] kimmoli:
You can change bitrate also via dconf (as nemo) so no need to edit qml

dconf write /apps/jolla-camera/videoBitRate 65000000

I'm adding this to next version of onyx-camera-settings-plugin