Skip to content
CourvilleSoftware edited this page May 30, 2024 · 15 revisions

ADB logs

  1. enable developer options: settings->about->build (click several times) until the message "You are now a developer" appears
  2. enable ADB: settings->system preferences->developer options->enable ADB debugging
  3. identify IP address in settings->network
  4. have Android device and debug host connected to same local network
  5. on host install Android SDK and debug tools
  6. on host launch adb connect or connect to device via USB (does not require any adb connect command)
  7. set the android serial so that no -s argument is required on adb: export ANDROID_SERIAL="IDOFMYDEVICE" where IDOFMYDEVICE is identified via adb devices

Multimedia debugging

adb shell cat /vendor/etc/media_codecs_*.xml
adb shell dumpsys media.player
  • relevant logs when playing the file on the device can be extracted using adb logcat -v brief | grep -i -E "avos|mediacodec|omx|audio"
  • multimedia native core can be debugged via options using CLI tool av.sh
  • video av.sh dbgv 2 (look at buffer fill [ 0%])
  • buffer size av.sh smb
  • stream av.sh dbgs 2
  • others dbgcv dbgp dbgmng dbgsub dbgy dbgm dbgca
  • audio av.sh dbgca 2

slf4j/logback debug infrastructure

Starting with v5.15.16 version, nova uses slf4j and logback-android debug infrastructure allowing to activate logs on release app when needed through pushing the logback.xml specific configuration file in /sdcard/Android/data/org.courville.nova/files/Android/data/org.courville.nova/files/logback/ via:

adb push logback.xml /sdcard/Android/data/org.courville.nova/files/Android/data/org.courville.nova/files/logback/logback.xml

After force stop nova and relaunch of nova, it should generates logs and you can pull them via:

adb pull /sdcard/Download/org.courville.nova/nova.log nova.log

To stop all logs to be generated you can:

adb shell
cd /sdcard/Download/org.courville.nova
rm logback.xml
exit

Possible logback.xml files can be found below. One specific file for SMB:

<appender name="SMB_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
  <file>${LOG_DIR}/nova-smb.log</file>
  <encoder>
    <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
  </encoder>
  <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
    <fileNamePattern>${LOG_DIR}/nova-log-smb.%d.txt</fileNamePattern>
    <maxHistory>7</maxHistory>
    <totalSizeCap>50MB</totalSizeCap>
  </rollingPolicy>
</appender>

<logger name="com.archos.filecorelibrary.jcifs" level="DEBUG">
  <appender-ref ref="SMB_FILE"/>
  <appender-ref ref="logcat"/>
</logger>

<logger name="com.archos.filecorelibrary.samba" level="DEBUG">
  <appender-ref ref="SMB_FILE"/>
  <appender-ref ref="logcat"/>
</logger>

<logger name="jcifs.netbios.UdpDiscovery" level="DEBUG">
  <appender-ref ref="SMB_FILE"/>
  <appender-ref ref="logcat"/>
</logger>

<logger name="jcifs.netbios.NameServiceClientImpl" level="TRACE">
  <appender-ref ref="SMB_FILE"/>
</logger>

<logger name="jcifs.smb.SmbSessionImpl" level="TRACE">
  <appender-ref ref="SMB_FILE"/>
</logger>


<logger name="jcifs.smb.SmbTransportImpl" level="TRACE">
  <appender-ref ref="SMB_FILE"/>
</logger>

Other options can be activated for instance:

  <!--logger name="com.archos.mediacenter.video.browser.MainActivity" level="DEBUG"/-->

  <!--logger name="com.archos.mediacenter.video.player.Player" level="DEBUG"/-->
  <!--logger name="com.archos.mediacenter.video.player.PlayerActivity" level="DEBUG"/-->

  <!--logger name="com.archos.mediascraper.AutoScrapeService" level="DEBUG"/-->
  <!-- MovieScraper3: TRACE for http client debug or DEBUG -->
  <!--logger name="com.archos.mediascraper.xml.MovieScraper3" level="DEBUG"/-->
  <!-- ShowScraper3: TRACE for http client debug or DEBUG -->
  <!--logger name="com.archos.mediascraper.xml.ShowScraper3" level="DEBUG"/-->
  <!--logger name="com.archos.mediascraper.AllCollectionScrapeService" level="DEBUG"/-->

  <!--logger name="com.archos.mediascraper.ShowTags" level="DEBUG"/-->
  <!--logger name="com.archos.mediascraper.MovieTags" level="DEBUG"/-->
  <!--logger name="com.archos.mediascraper.CollectionTags" level="DEBUG"/-->

  <!--logger name="com.archos.mediascraper.thetvdb.MyTheTVdb" level="TRACE"/-->
  <!--logger name="com.archos.mediascraper.themoviedb3.MyTmdb" level="TRACE"/-->

  <!--logger name="com.archos.environment.NetworkState" level="DEBUG"/-->
  <!--logger name="com.archos.mediaprovider.video.RemoteStateService" level="DEBUG"/-->

  <!-- SubtitlesDownloaderActivity: TRACE for client debug or DEBUG -->
  <!--logger name="com.archos.mediacenter.video.utils.SubtitlesDownloaderActivity" level="TRACE"/-->

  <!-- ftp: TRACE for verbose or DEBUG -->
  <!--logger name="com.archos.filecorelibrary.ftp" level="DEBUG"/-->

To activate any of these options remove the starting !-- and trailing --.

Get a dump of nova media database

To dump nova mediaDb you can click 10 times on the nova settings->software decoding, it will enable more options, one of them at the end of the settings list being media database export. You will need to pull it from internal storage located in /sdcard/org.courville.nova-media.db on v5 but located in /sdcard/Android/org.courville.nova/files/org.courville.nova-media.db on v6.