Daydream Functionality in Custom Roms - ZTE Axon 7 Guides, News, & Discussion

Hello fellow Axon 7 Users,
it seems that currently there's not much development focus on one of the main features and key selling points of this device (next to audio quality), which is Daydream.
After unlocking and flashing my first Axon 7 custom rom last week (NuclearRom), enjoying fluent system performance and finally trying out Daydream again (which i used for quite a decent time on the stock A2017G B02-Nougat rom with several bought apps), my enthusiasm went from "yaaay!" to "something is not right".
My observations were:
* mediocre performance in the Daydream-VR-Main-UI
* slight jittery head-tracking (no filtering of very small movement due to breathing)
* several daydream apps not working in VR-mode, like Google Arts & Culture => the app doesn't change to split-VR-mode but instead to a single screen, which is not compatible to the Daydream View
I did a quick testrun with logcat on and started Google Arts & Culture through the Daydream-UI in VR, which unfortunately were not shown in Splitscreen-VR-Mode. Here's the extract:
Code:
04-30 18:33:35.107 3980 3980 I GVR : [vr/gvr/capi/src/gvr.cc:96] Initialized GVR version 1.42.0
04-30 18:33:35.147 3980 3980 I GVR : [vr/gvr/render/scanline_racer.cc:928] Configuring scanline racer for axon7 using default config.
04-30 18:33:35.147 3980 3980 E GvrLayoutImpl: Failed to initialize async reprojection, unsupported device.
...
04-30 18:33:58.343 4684 4684 D SdkConfigurationReader: Fetched params from VrParamsProvider: allow_dynamic_library_loading: false
04-30 18:33:58.343 4684 4684 D SdkConfigurationReader: cpu_late_latching_enabled: false
04-30 18:33:58.343 4684 4684 D SdkConfigurationReader: daydream_image_alignment: 3
04-30 18:33:58.343 4684 4684 D SdkConfigurationReader: use_magnetometer_in_sensor_fusion: false
04-30 18:33:58.343 4684 4684 D SdkConfigurationReader: use_online_magnetometer_calibration: false
04-30 18:33:58.343 4684 4684 D SdkConfigurationReader: use_system_clock_for_sensor_timestamps: false
04-30 18:33:58.364 4684 4684 I GVR : [vr/gvr/capi/src/gvr.cc:94] Initialized GVR version 1.10.0
04-30 18:33:58.366 4684 4747 D NetworkSecurityConfig: No Network Security Config specified, using platform default
04-30 18:33:58.382 4684 4684 I GVR : [vr/gvr/render/scanline_racer.cc:998] Configuring scanline racer for axon7 using default config.
04-30 18:33:58.382 4684 4684 E GvrLayout: Failed to initialize async reprojection, unsupported device.
04-30 18:33:58.382 4684 4700 W Unity : GoogleVR Initialization Failed.
As it seems there are difficulties in the ("missing") implementation of async reprojection, one of the main requirements of daydream-compatibility. The Axon is shown here as "unsupported device". The adjusted build-prop- and hardware-compatibility-files seem not to be enough here for gaining daydream-support on the device.
When i was browsing the web, looking for error reports of the same issues, i found quite a few reports also on different devices like the Oneplus 3T and Nexus-Devices. There's a JIRA-Ticket for the Axon 7 listed on the main BugTracker of Lineage OS (which is the Base for countless roms) here jira.lineageos.org/browse/BUGBASH-284
I wanted to start this thread based around the daydream-topic, as it is one of the current issues facing the Axon 7 when swapping out roms to LOS-based roms.
Maybe we can gain some traction here on this matter and collect as much information as possible helping and assisting for a full implementation of Daydream on custom roms. (to finally get rid of Mifavor-UI )
I'm looking forward hearing about your experiences with Daydream on other roms, for example based on AOSP.
Greetings from Germany
Agent_no1

Your link was incomplete.
Here it is for people to go and up-vote it: https://jira.lineageos.org/browse/BUGBASH-284
I feel the same as you. Daydream was the only reason I chose this phone, but the stock ROM is absolute garbage without even basic functions like turning off the lock screen or even live wallpaper support (A2016G). Let's hope this gets votes and fixed. Already waited 10 months for this phone to be complete..... ZTE obviously in no hurry and focusing on the next stuff rather than fixing what they broke or giving us back what they stupidly took away.

actually I don't know what we could do except opening a bounty for daydream. seems like OnePlus 3T users are not so interested in daydream...

I would be in with 10€ for a start, but right now i'm really not sure about how big the general interest is in Daydream. There are only a few devices supporting that plattform at the moment, so app development is still very thin. So far there are not many responses according to these issues and resolving the sound problems on LOS seems to be the main topic right now (which i can understand greatly, as the DACs are one of the main features of this phone).
The thing is that sooner or later when ZTE stops supporting this device, we won't have any other choice than swapping out our rom with a custom one to stay up to date with security patches. It would be unfortunate if until then this problem won't be solved on custom roms, so i hope that there will be interested developers, who we can support with testing and a keg of decent beer.

Related

[DEV] Acessing IR interface

I just started developing for my new Sony tablet and was curious if I can send IR codes with my own app instead of using the Sony app. Here is what I've achieved so far. Maybe someone finds this information usefull and maybe we can provide further information based on this.
The service kinda works, the callbacks get called, I can read raw commands using learnKey() method and I can get the keys for specific devices using getKeyList() but sending IR pattern or key codes to devices seems not to be working quire right, although the callback gets status OK after sending.
Sony created a DataProvider to share data between the app and the service. Thanks to this fact I queried following URI content://com.sony.nfx.app.irremote.provider/learnt and found all custom learnt codes I added via the Sony app. But even using this exact data doesn't seem to do anything when sending to the device.
Access to IR service is restricted by permission and process so our AndroidManifest.xml should look like this:
Code:
<uses-permission android:name="com.sony.nfx.app.irremoteservice.permission.EXECUTE_SERVICE"/>
<application ... android:process=":remote">
...
</application>
Required AIDL files:
Code:
package com.sony.nfx.app.irremoteservice;
import com.sony.nfx.app.irremoteservice.IUEIControlServiceCallback;
interface IUEIControlService {
int sendKey(int i, int j, int k, byte byte0);
int sendSonyCode(int i, int j, byte byte0, int k, byte byte1);
int sendIRPattern(int i, int j, byte byte0, in byte[] pattern);
int sendStopIRSend(int i);
int getKeyList(int i, int j);
int learnKey(int i);
void registerCallback(IUEIControlServiceCallback callback);
void unregisterCallback(IUEIControlServiceCallback callback);
}
Code:
package com.sony.nfx.app.irremoteservice;
interface IUEIControlServiceCallback {
void onCommandComplete(int i, int j);
void onLearntKey(int i, in byte[] abyte0);
void onGetKeyList(int i, int j, in int[] ai);
}
Basic sample code:
Code:
package ir.remote.android;
import java.util.Arrays;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import com.sony.nfx.app.irremoteservice.IUEIControlService;
import com.sony.nfx.app.irremoteservice.IUEIControlServiceCallback;
public class RemoteTest extends Activity implements ServiceConnection {
private static final String LOG_TAG = "RemoteTest";
private ServiceBinder serviceBinder = new ServiceBinder();
private IUEIControlService remoteService = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
String serviceAction = IUEIControlService.class.getName();
Intent serviceIntent = new Intent(serviceAction);
bindService(serviceIntent, this, Context.BIND_AUTO_CREATE);
}
public void onServiceConnected(ComponentName name, IBinder service) {
try {
Log.d(LOG_TAG, "Service connected!");
remoteService = IUEIControlService.Stub.asInterface(service);
remoteService.registerCallback(serviceBinder);
} catch (Exception e) {
Log.e(LOG_TAG, "Error connecting to service!", e);
}
}
public void onServiceDisconnected(ComponentName name) {
Log.d(LOG_TAG, "Service disconnected!");
remoteService = null;
}
public static class ServiceBinder extends IUEIControlServiceCallback.Stub {
public void onCommandComplete(int i, int j) throws RemoteException {
Log.d(LOG_TAG, "onCommandComplete(" + i + ", " + j + ")");
}
public void onGetKeyList(int i, int j, int[] ai) throws RemoteException {
Log.d(LOG_TAG, "onGetKeyList(" + i + ", " + j + ", " + Arrays.toString(ai) + ")");
}
public void onLearntKey(int key, byte[] value) throws RemoteException {
Log.d(LOG_TAG, "onLearntKey(" + key + ", " + Arrays.toString(value) + ")");
}
}
}
Good start
I'm really glad to see someone working on accessing the IR interface. The IR is the primary differentiator that made me decide to buy the Sony Tablet S. I haven't got it yet though, getting it on Monday evening.
I'm only a noob at development, but have started learning Android dev and the start you've made is bound to help. So thanks a lot.
I look forward to seeing your progress.
Luke
Hello Peacemaker2000,
I'm quite new to programing on android (and in java for that matter) so, sorry for the noob questions here.
I have just received my sony tablet last week-end and I think building a custom remote to my needs would be a great hands on exercice
Also I'm a bit disapointed by the natif app which doe not support macro nor look customizaton.
I have tried to start working with all your samples and code to see what I can get to work, but my first concern is about the AIDL files, how do you import the "com.sony.nfx.app.irremoteservice.IUEIControlServiceCallback" ?
The only file that i have found on my tablet, in a "framewok" folder somewhere is "com.sony.nfx.app.irremoteserviceif.jar", I have tried to referenced it by adding to the build path but it is as far as I have been for now.
Any more help / explanation would be greatly appreciated !
Thanks,
Tom.
Good Job Peacemaker,
Main reason i bought it is universal remote control (of course i m an android fan also). If you think that you have to pay 2000$ for a philips pronto remote, SONY did a good start. I am waiting for a customized remote software so to be able to add new buttons, keys etc.
Thank you,
Chris
+1 for me. the ability to have a custom layed out remote with macros and such, I would buy that app.
I ASSUME you have signed up for the sony developers kit they just released, I dl'd it but don't have the time to get into development currently.
Alan
I did subscripbe and download the sdk but only found samples / references for the largescreen / dualscreen layout of the 2 sony tablets, nothing related to the IR.
I did look in to doing something with the IR blaster but couldn't find anything about how to access it. I might start digging around to build the app I was thinking of in my time off over Christmas
Hello to everybody and i wish you a Happy New Year!!!!!!!!!
Any news about IR?
I wonder who will make a new software remote control more customizable, with macros, buttons etc.
Chris
Athens GREECE
I agree with everyone so far about wanting a better app than the remote control one supplied by Sony. I tried learning a macro from my PDA with its universal remote control app, but it refused to learn it. It was OK with single key presses, indeed it is very sensitive.
I bought the Tablet S for my wife, simply because of the eBook reader capability amongst other things but also as a trial for a new replacement universal remote control. This is the first device for ages to have an IR facility built in. I use an old HP Jornada but the screen is mis-behaving after around 10 years of hard labour as a Universal Remote Control. I have found the ability to program my own designed GUI for my numerous cinema, TV etc. devices has been excellent. The Tablet S app is OK in that it has enough keys to cover most remotes. The facility to be able to re-label the keys and choose which of the icons can be which keys is good. It is slightly limited as most of the icons on the left hand panel are fixed labels. Therefore it could be improved.
I would support anyone writing such an app. I would even pay for it! Now that's novel..... Good luck developers.
Thank you so much Peacemaker2000 for sharing your code and ideas.
It works like a charm getting the keys from a remote control and using the data for your own app. I would really like to know what kind of parameters you have to send to get a full keylist of a TV.
Right now I'm just saving the key data from my remote control and don't have any clues how to generally get all possible keys my TV understands. Would be great if you or anybody else who knows this, could share it with us.
If anybody would like to have a functional piece of code from my current prototype, just let me know, right now I have no problems of controlling my Sony Bravia KDL-32W4000.
Perhaps a Mystery Gift app could be developed for use with pokemon gold on a gameboy colour, those were the days
Seems to be quite easy to get a keylist from the actual service:
Code:
int REMOTE_TYPE_ID_KDL_32W4000 = 508;
remoteService.getKeyList(0, REMOTE_TYPE_ID_KDL_32W4000);
You'll get the list in IUEIControlServiceCallback.Stub.onGetKeyList() and execute the appropriate key with:
Code:
int REMOTE_TYPE_ID_KDL_32W4000 = 508;
int ON_OFF_KEY = 18;
remoteService.sendKey(0, REMOTE_TYPE_ID_KDL_32W4000, ON_OFF_KEY, (byte) 0);
remoteService.sendStopIRSend(0);
There you go, TV goes on and off.
I will donate to anyone developing better IR control app.
It will put all that smart LCD screen remotes that they are selling for $1000 and more out of existence.
There is an example of really good IR remote control application. Extremely feature rich. It is called RemoteControl II from http://wincesoft.de/html/remotecontrol_ii.html.
It is only available for Windows CE/Mobile devices.
open source project
hi all, it could be nice to start an open source project, so everyone can collaborate. like me.
david8 said:
hi all, it could be nice to start an open source project, so everyone can collaborate. like me.
Click to expand...
Click to collapse
I've just whipped up a quick Git repo now. Here's the link: https://github.com/agc93/Tablet-S-IR-Control
It'll only be empty atm, because I'm a bit busy at work, but if anyone wants to give it a try, feel free!
agc93 said:
I've just whipped up a quick Git repo now. Here's the link: https://github.com/agc93/Tablet-S-IR-Control
It'll only be empty atm, because I'm a bit busy at work, but if anyone wants to give it a try, feel free!
Click to expand...
Click to collapse
Great! It's a good beginning.
Hi,
I'm an Android beginner developer.
I recently bought a Sony Tablet S and trying to create my own IR Remote App...why?
Sony default IR Remote App don't provides macros.
Here are the main features i'm thiking about:
A dialog box popup automatically when tablet is removed from his dock and shaked...this is managed by a local service)
This dialog provides two options : 1) Default usage of the tablet or 2) Launch my own IR Remote App
This custom App provides only 2 macros : 1) Listen to music or 2) Watch TV
Main challenges i'm facing (as you can easily imagine) is the IR interface implementation.
There's not much code sample on the web, probably because Sony Tablet S is the only device on the market embedding IR interface.
Here are my questions :
Do some one has successfully experienced this technology ?
Is it necessary to root the device before coding with IR interface ?
Do Sony provides specific library to access to IR interface ?
I suppose that each device that i want to remote control (Denon amplifier AVR-2311 and DVico Tvix 6600n for music listening) has an Infrared Hex Code. How do i use it in my classes ?
Waiting for your help
Regards
I for one am very interested in any application that comes close to a Philips Pronto in respect of functionality. The ability to design your own buttons and layouts as wll as have macros is all that is missing from the sony software and I'm sure its possible.
My Pronto is over 10 years old now and one of the reasons for purchasing the Tablet s was as a replacement.
Have a look at the pronto forums on remotecentral.com theres a vast array of downloads of layouts for Pronto edit and hence the hex codes which can be extracted. Many include discrete codes that can't be learned from remotes and are invaluable for macros.
You can also obtain the original editing software and load onto a virtual pronto. If you can produce an ap anything like that then I think you're onto a winner.
Apologies I'm unable to assist on a coding front as I'm a bit of a technonumpty.
Another very confused developer here trying to work out how Sony's bizarre remote calls function. To be honest, not having much luck, and Sony won't help.
If anyone knows how to get it going, please share, because that's all thats stopping me at the moment.
I already posted a working example for sending an IR signal with the tablet. ;-)
I'm also working on an own app with makro-capabilities, custom button layouting (own text, pictures, size, placement) and even custom gestures. I think I can give out a demo in about two weeks, so be a little bit more patient. ;-)
Of course the app will only work with the Tablet S.

[Q] App blocks ACTION_MEDIA_BUTTON

Hi.
I have almost no knowledge of Android development, sorry if the question is stupid or incorrectly formulated
An application named Sygic (satellite navigation, "com.sygic.aura" on Google Play) has a bug/feature that it blocks ACTION_MEDIA_BUTTON. From the user's point of view, media buttons of external keyboard or software buttons wit appropriate actions assigned (play/pause, skip, previous track) don't work when the app is running (in foregroud or even background as a service). As far as I could determine, the app doesn't register any broadcast receiver listening to MEDIA_BUTTON intent (at least not in Android Manifest). It certainly doesn't implement any useful feature based on media button presses.
Analysis of logcat didn't help me much. Below I quote both versions of log when I press Play and then Pause.
1. Standard log (filtered relevant entries) with no Sygic running (result is fine - music starts and then stops playing):
Code:
W/AudioTrack( 530): AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate (48000 vs 44100)
W/AppOps ( 530): Bad call: specified package android under uid 10006 but it is really 1000
W/AppOps ( 530): Bad call: specified package android under uid 10006 but it is really 1000
W/DvcNeonEqualizer( 4304): Starting fixed point NEON optimized equalizer with DVC
I/MediaFocusControl( 530): Remote Control registerMediaButtonIntent() for PendingIntent{41fa16e8: PendingIntentRecord{41fa20a0 com.maxmpz.audioplayer broad
castIntent}}
I/HeadsetService( 786): Audio session removed: 77
I/HeadsetService( 786): Selected configuration: speaker
I/PlayerService( 4304): ACTION_API_COMMAND cmd=1
I/MediaFocusControl( 530): AudioFocus requestAudioFocus() from [email protected][email protected]
I/MediaFocusControl( 530): Remote Control registerMediaButtonIntent() for PendingIntent{41f0a6b8: PendingIntentRecord{41fa20a0 com.maxmpz.audioplayer broad
castIntent}}
W/KeyguardUpdateMonitor( 650): Ignoring generation id 13 because it's not current
W/AudioTrack( 530): AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate (48000 vs 44100)
W/AppOps ( 530): Bad call: specified package android under uid 10006 but it is really 1000
I/PlayerService( 4304): ACTION_API_COMMAND cmd=1
W/AppOps ( 530): Bad call: specified package android under uid 10006 but it is really 1000
I/MediaFocusControl( 530): AudioFocus abandonAudioFocus() from [email protected][email protected]
W/PlayerService( 4304): Poweramp Player Service leaves the scene
2. With Sygic on it say only (no real action is visibly done):
Code:
W/AudioTrack( 530): AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate (48000 vs 44100)
W/AppOps ( 530): Bad call: specified package android under uid 10006 but it is really 1000
W/AppOps ( 530): Bad call: specified package android under uid 10006 but it is really 1000
Other applications are working just fine.
The developer (Sygic) is not communicating at all with me. Is there any chance to help myself with that? Settings? Xposed module? Some utility to filter broadcast receivers?

Android Application Crashing Issue

Hi, Being a learner. I am here to participate just like other Mobile Development Blogs to enhance my knowledge regarding Android Programming & I would like to know that "my code sample below crash the application? How would we can modify the code to avoid this problem?", which has become difficult to debug. I hope any tech developer help me in resolving this issue
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
sendIntent.setType(HTTP.PLAIN_TEXT_TYPE); // "text/plain" MIME type
startActivity(sendIntent);

Help needed in Making HWC 1 .3 work on Android 9

Hello,
I'm porting Android 9 in SM-G355H phone from a Android 8 tree but I cannot get pass the black screen or frozen screen.
This happens whenever the SurfaceFlinger has to compose the layers (Client Compositing) because the Framebuffer Target Layer that the Hardware Composer 1.3 code expects always have a NULL buffer handle so there's nothing to be displayed.
Usually SPRD GSP (a hardware blitter) does the compositing for n layers so it's possible to have a working display with the Framebuffer target layer's buffer_handle being null unless the blitter fails or SurfaceFlinger forces Client composition.
I have noted that this is also the same outcome with Android 8 when HWC2on1 adapter is used, which is part of the reason I disabled it on the Android 8 tree and went with the HWC1 support within SurfaceFlinger. The HWC1 support was removed on Android 9, so HWC2on1 adapter is a must.
Any ways to get the HWC2on1 work on this device for Android 9 (and also Android 8)?
Should there be steps to be done before using the adapter? Like changing some code in the HWC or something?
Preamble
This may probably turn to a Q&A section. So, I'll include a preamble of some sort.
I was right that there is only one issue on Android 8 which also affects Android 9. (and maybe Android 10 and above)
I was wrong about something needed to be done about the adapter, it just works.
The problem lies in the how the vendor decides to use the native_handle_t created in gralloc for "framebuffer" handles or handles that handle framebuffer memory.
Yeah, this means only Framebuffers allocated from gralloc are affected. Any other buffers from gralloc are okay.
TL;DR; Basically, the vendor use -1 as a FD while the whole HIDL, native_handle_clone(), and kernel binder operations always expects a valid FD. I just need to work around that.
Unfortunately, it is not possible to decrease the number of FD's when creating the native_handle_t since the underlying blob, libMali.so, will reject it stating that the handle is not valid. It compares the number of FDs and number of INTs, you could check what the "struct native_handle" holds.
But then again, that FD is used by libMali.so as a dma_buf fd.
This means that having a valid fd will make libMali.so issue an ioctl call expecting a dma_buf so I cannot just plug in a valid FD to /dev/null.
And to point, dma_buf fb support does not exist in the kernel provided by Samsung so the FD is set to -1.
When this FD is -1, libMali.so simply moves on and uses alternative methods aside dma_buf.
Then the handle goes to binder or HIDL which in effect needs to duplicate all file descriptors (fd). dup() doesn't work on -1 since it's an invalid fd.
Thus, this problem will prevent the FramebufferTarget layer from having a native_handle_t simply because SurfaceFlinger cannot send it through HIDL.

Question App crashes with "To many Binders sent to SYSTEM"

12-02 16:38:13.792 E/BpBinder( 2658): Too many binder proxy objects sent to uid 1000 from uid 10363 (6000 proxies held)
12-02 16:38:13.792 E/ActivityManager( 2658): Uid 10363 sent too many Binders to uid 1000
12-02 16:38:13.796 I/sensors-hal( 1485): batch:207, android.sensor.accelerometer/11, period=200000000, max_latency=2000000000
12-02 16:38:13.796 I/sensors-hal( 1485): set_config:57, sample_period_ns is adjusted to 200000000 based on min/max delay_ns
12-02 16:38:13.796 I/sensors-hal( 1485): send_sensor_config_request:419, resampler is used, set resampler config
12-02 16:38:13.796 I/sensors-hal( 1485): send_sync_sensor_request:365, send sync request
12-02 16:38:13.796 I/sensors-hal( 1485): send_sync_sensor_request:391, wait for notification of response
12-02 16:38:13.798 I/ActivityManager( 2658): Killing 5973:com.innowireless.xcal.mobile5/u0a363 (adj 0): Too many Binders sent to SYSTEM
Can you tell what causes the App Crash?
If many calls are the cause, is there a way to plant a log of which uid is being called?
Any steps to reproduce that?
WalterCool said:
Any steps to reproduce that?
Click to expand...
Click to collapse
Thank you for your interest.
The ping test is conducted for 24 hours through the self-developed app.
Park Hyo Hyeon said:
Thank you for your interest.
The ping test is conducted for 24 hours through the self-developed app.
Click to expand...
Click to collapse
Hmmm, I think your problem is related to Android Development and not specific to Xperia 5 IV.
libs/binder/BpBinder.cpp - platform/frameworks/native - Git at Google
Looks like this error would happens when some application is spamming/abusing of binder calls. Just remember some background apps may fail to work after a while. Android recommends to use some Notification for background job at best.
WalterCool said:
Hmmm, I think your problem is related to Android Development and not specific to Xperia 5 IV.
libs/binder/BpBinder.cpp - platform/frameworks/native - Git at Google
Looks like this error would happens when some application is spamming/abusing of binder calls. Just remember some background apps may fail to work after a while. Android recommends to use some Notification for background job at best.
Click to expand...
Click to collapse
thank you
I will refer to the advice and check the error again.

Categories

Resources