[Android Software/Hacking General [Developers Only]] modchen:
Hi,

I'm currently trying to port the samsung smart view app to my HTC DHD. Currently I've problems with some libraries included in the apk.

10-02 10:25:52.427 E/AndroidRuntime( 2732): FATAL EXCEPTION: main
10-02 10:25:52.427 E/AndroidRuntime( 2732): java.lang.UnsatisfiedLinkError: Initialize
10-02 10:25:52.427 E/AndroidRuntime( 2732): at com.sec.android.jni.player.DualTVPlayer.Initialize(Native Method)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at com.samsung.smartview.mw.DualViewMWEvent.createPlayerHandler(DualViewMWEvent.java:41)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at com.samsung.smartview.DualViewActivity.createMWInstance(DualViewActivity.java:154)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at com.samsung.smartview.DualViewActivity.onCreate(DualViewActivity.java:87)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1836)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1893)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at android.app.ActivityThread.access$1500(ActivityThread.java:135)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1054)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at android.os.Handler.dispatchMessage(Handler.java:99)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at android.os.Looper.loop(Looper.java:150)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at android.app.ActivityThread.main(ActivityThread.java:4385)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at java.lang.reflect.Method.invokeNative(Native Method)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at java.lang.reflect.Method.invoke(Method.java:507)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
10-02 10:25:52.427 E/AndroidRuntime( 2732): at dalvik.system.NativeStart.main(Native Method)
10-02 10:25:52.437 W/ActivityManager( 1721): Force finishing activity com.samsung.smartview/.DualViewActivity
10-02 10:25:52.437 W/ActivityManager( 1721): Force finishing activity com.samsung.smartview/com.samsung.remoteTV.presentation.Main

The library is

D/dalvikvm( 2893): Trying to load lib /data/data/com.samsung.smartview/lib/libTMI_stagefright_jni.so 0x40514330

E/JNI ( 2893): TMI_stagefright_jni loadLibrary Fail

if you look at the corresponding code

package com.sec.android.jni.player;

import android.util.Log;
import android.view.Surface;

public class DualTVPlayer
{
public static final int HDCP_STREAM = 1;
public static final int PLAIN_STREAM = 0;
private static final String TAG = "TMI-DualTVPlayer";
private Surface mSurface = null;
private DualTVPlayerListener mlistener = null;

private native int setVideoSurface();

public void EndOfStreamNotify()
{
int i = Log.d("TMI-DualTVPlayer", "EndOfStreamNotify");
if (this.mlistener == null)
return;
this.mlistener.EndOfStreamNotifyMessage();
}

public void ErrorNotify(int paramInt1, int paramInt2, int paramInt3)
{
String str = ">>>>>> ErrorNotifyMessage " + paramInt1 + " " + paramInt2 + " " + paramInt3;
int i = Log.d("TMI-DualTVPlayer", str);
if (this.mlistener == null)
return;
this.mlistener.ErrorNotifyMessage(paramInt1, paramInt2, paramInt3);
}

public native void Finalize();

public void HDCPStreamNotify()
{
int i = Log.d("TMI-DualTVPlayer", "HDCPStreamNotify");
if (this.mlistener == null)
return;
this.mlistener.HDCPStreamNotifyMessage();
}

public native int Initialize();

public void SetListener(DualTVPlayerListener paramDualTVPlayerListener)
{
this.mlistener = paramDualTVPlayerListener;
}

public void StartVideoNotify()
{
int i = Log.d("TMI-DualTVPlayer", "StartVideoNotify");
if (this.mlistener == null)
return;
this.mlistener.StartVideoNotifyMessage();
}

public native int getVideoHeight();

public native int getVideoWidth();

public native int setDataSource(String paramString, int paramInt);

public native void setSWAudioDecoder(boolean paramBoolean);

public int setVideoSurface(Surface paramSurface)
{
this.mSurface = paramSurface;
int i = setVideoSurface();
return 0;
}

public native int start();

public native int stop();
}

Is there any possibility to decompile/recompile or port this library to my DHD ?