I have a media player application.
On my phone, the player is stable and works as I expected.
However on android tv box, it stops after some time. (Rockchip TV BOX Android 8.1.0 API 25)
I have searched that I need to add some configurations to make it work on android tv boxes.
I have followed these steps in here = https://developer.android.com/training/tv/start/start.html#prerequisites
However still the player stops after some time.
This is the link of the log file from the start to the time that it is paused by the OS, I recommend to review this:
https://www.scribd.com/document/442914371/Hilallogcat-Tvbox-Sem-Log
There are some suspicious parts in the log file:
01-13 21:24:00.009 454 454 W System.err: java.io.FileNotFoundException: /dev/fd628_dev (Permission denied)
01-13 21:24:00.009 454 454 W System.err: at java.io.FileOutputStream.open(Native Method)
01-13 21:24:00.009 454 454 W System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
01-13 21:24:00.010 454 454 W System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:108)
01-13 21:24:00.010 454 454 W System.err: at com.android.server.NetworkTimeUpdateService.fd628_display(NetworkTimeUpdateService.java:439)
01-13 21:24:00.010 454 454 W System.err: at com.android.server.NetworkTimeUpdateService$4.onReceive(NetworkTimeUpdateService.java:522)
01-13 21:24:00.010 454 454 W System.err: at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1122)
01-13 21:24:00.010 454 454 W System.err: at android.os.Handler.handleCallback(Handler.java:755)
01-13 21:24:00.011 454 454 W System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
01-13 21:24:00.011 454 454 W System.err: at android.os.Looper.loop(Looper.java:154)
01-13 21:24:00.011 454 454 W System.err: at com.android.server.SystemServer.run(SystemServer.java:358)
01-13 21:24:00.012 454 454 W System.err: at com.android.server.SystemServer.main(SystemServer.java:225)
01-13 21:24:00.012 454 454 W System.err: at java.lang.reflect.Method.invoke(Native Method)
01-13 21:24:00.012 454 454 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
01-13 21:24:00.012 454 454 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
Also like this:
01-13 21:24:12.227 1595 1606 W art : Suspending all threads took: 16.847ms
This one:
01-13 21:26:17.182 193 6998 E RockFFPlayer: file_read: offset=9473373, c->offset=0, c->length=9473373
This one:
01-13 21:26:17.970 193 7000 W AudioDecoder: audio decode error send exception error
However I could not figure out the reason.
UPDATE:
After the suggestion of @CuriousMind I have added setTime to my application class. But we could not avoid the FileNotFoundException
.
This is the log file when I setTime at the beginning of the application:
https://www.scribd.com/document/442936061/hilallogcat-tvbox-setTime
UPDATE 2:
Inside of the /system/etc/
folder:
NOTICE.html.gz
audio_policy.conf
event-log-tags
init/
media_codecs_performance.xml
mkshrc
ppp/
recovery-resource.dat
smbpasswd
wifi/
alarm_filter.xml
bluetooth/
firmware/
media_codecs.xml
media_codecs_rk_vpu.xml
operator_table
preferred-apps/
seccomp_policy/
smbusers
apns-conf.xml
clatd.conf
fonts.xml
media_codecs_google_audio.xml
media_profiles_default.xml
package_performance.xml
preloaded-classes
security/
spn-conf.xml
audio_effects.conf
compiled-classes
hosts
media_codecs_google_video.xml
mixer_paths.xml
permissions/
public.libraries.txt
smb.conf
sysconfig/