[Galaxy Tab 10.1 Q&A, Help & Troubleshooting] Brad Justice:
problem with manual loading of libwilhelm.so

I am attempting to run the sdk native-audio example on Galaxy Tab 10.1.

I have attempted to implement the workaround by manually loading libwilhelm.so. I created an Android 3.1 virtual device and copied libwilhelm.so and libOpenSLES.so. I renamed them libMyWilhelm.so and libMyOpenSLES.so. I adjusted permissions to be rwxr-xr-x, matching the permissions on the project-generated lib. I created an and unpacked it, verifying that the libs were in the same directory. I modified the source to be:

try

{

System.loadLibrary("native-audio-jni");

}

catch (UnsatisfiedLinkError e)

{

System.loadLibrary("MyWilhelm");

System.loadLibrary("MyOpenSLES");

System.loadLibrary("jni_code_using_OpenSL");

}

When I run the app on the Galaxy Tab it crashes. Single stepping through the code, logcat shows:

I/DEBUG (27045): debuggerd: Jun 6 2011 09:10:57

D/dalvikvm(27018): Trying to load lib /data/data/com.example.nativeaudio/lib/libnative-audio-jni.so 0x408ace20

D/HierarchicalStateMachine( 282): handleMessage: E msg.what=83

D/HierarchicalStateMachine( 282): processMsg: ConnectedState

D/WifiStateMachine( 282): ConnectedState{ what=83 when=-4ms arg1=48 }

D/HierarchicalStateMachine( 282): handleMessage: X

W/ActivityManager( 282): Launch timeout has expired, giving up wake lock!

W/ActivityManager( 282): Activity idle timeout for ActivityRecord{40c9a348 com.example.nativeaudio/.NativeAudio}

D/HierarchicalStateMachine( 282): handleMessage: E msg.what=83

D/HierarchicalStateMachine( 282): processMsg: ConnectedState

D/WifiStateMachine( 282): ConnectedState{ what=83 when=-4ms arg1=48 }

D/HierarchicalStateMachine( 282): handleMessage: X

^[[17~D/HierarchicalStateMachine( 282): handleMessage: E msg.what=83

D/HierarchicalStateMachine( 282): processMsg: ConnectedState

D/WifiStateMachine( 282): ConnectedState{ what=83 when=-4ms arg1=48 }

D/HierarchicalStateMachine( 282): handleMessage: X

D/dalvikvm(24008): GC_EXPLICIT freed 12K, 6% free 6315K/6659K, paused 2ms+2ms

D/UNA (24008): [PackageAgent] Finalizing

D/UNA (24008): [PackageAgent] Finalizing

D/dalvikvm(27018): Trying to load lib /data/data/com.example.nativeaudio/lib/libMyWilhelm.so 0x408ace20

I/DEBUG (27045): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

I/DEBUG (27045): Build fingerprint: 'samsung/GT-P7510/GT-P7510:3.1/HMJ37/UEKF3:user/release-keys'

I/DEBUG (27045): pid: 27018, tid: 27018 >>> com.example.nativeaudio <<<

I/DEBUG (27045): signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 80c081b4

I/DEBUG (27045): r0 80c081b4 r1 00000000 r2 00000e40 r3 c0000000

I/DEBUG (27045): r4 00000000 r5 00000000 r6 00000000 r7 00000000

I/DEBUG (27045): r8 b0014bc8 r9 000001b4 10 00008000 fp 80c00000

I/DEBUG (27045): ip 00000000 sp be9a8d40 lr 00000000 pc b000159c cpsr 80000010

I/DEBUG (27045): d0 4320000042700000 d1 cf000000000000a0

I/DEBUG (27045): d2 4e19dec642bd43f3 d3 4320000000680ff0

I/DEBUG (27045): d4 3f8000003f800000 d5 3fe9999943200000

I/DEBUG (27045): d6 3fe8000000000000 d7 000000a04f000000

I/DEBUG (27045): d8 0000000000000000 d9 0000000000000000

I/DEBUG (27045): d10 0000000000000000 d11 0000000000000000

I/DEBUG (27045): d12 0000000000000000 d13 0000000000000000

I/DEBUG (27045): d14 0000000000000000 d15 0000000000000000

I/DEBUG (27045): scr 60000012

I/DEBUG (27045):

D/HierarchicalStateMachine( 282): handleMessage: E msg.what=83

D/HierarchicalStateMachine( 282): processMsg: ConnectedState

D/WifiStateMachine( 282): ConnectedState{ what=83 when=-3ms arg1=48 }

D/HierarchicalStateMachine( 282): handleMessage: X

I/DEBUG (27045): #00 pc b000159c /system/bin/linker

I/DEBUG (27045): #01 lr 00000000 <unknown>

I/DEBUG (27045):

I/DEBUG (27045): libc base address: aff00000

I/DEBUG (27045):

I/DEBUG (27045): code around pc:

I/DEBUG (27045): b000157c e213301c 0a000008 e1530002 8202301c

I/DEBUG (27045): b000158c e0422003 e1b03e03 28a04002 28a04002

I/DEBUG (27045): b000159c 48a04002 e1b03103 24801004 e2522020

I/DEBUG (27045): b00015ac e1a03001 4a000002 e2522020 e8a050fa

I/DEBUG (27045): b00015bc 2afffffc e2822020 e1b02e02 28a0500a

I/DEBUG (27045):

I/DEBUG (27045): code around lr:

I/DEBUG (27045): 00000000 ffffffff ffffffff ffffffff ffffffff

I/DEBUG (27045): 00000010 ffffffff ffffffff ffffffff ffffffff

I/DEBUG (27045): 00000020 ffffffff ffffffff ffffffff ffffffff

I/DEBUG (27045): 00000030 ffffffff ffffffff ffffffff ffffffff

I/DEBUG (27045): 00000040 ffffffff ffffffff ffffffff ffffffff

I/DEBUG (27045):

I/DEBUG (27045): stack:

I/DEBUG (27045): be9a8d00 00000000

I/DEBUG (27045): be9a8d04 b0005dfb /system/bin/linker

I/DEBUG (27045): be9a8d08 ffffffff

I/DEBUG (27045): be9a8d0c 00000000

I/DEBUG (27045): be9a8d10 00000005

I/DEBUG (27045): be9a8d14 b000e740

I/DEBUG (27045): be9a8d18 b000950c

I/DEBUG (27045): be9a8d1c b0003daf /system/bin/linker

I/DEBUG (27045): be9a8d20 ffffffff

I/DEBUG (27045): be9a8d24 00000000

I/DEBUG (27045): be9a8d28 00140fd7

I/DEBUG (27045): be9a8d2c 00000118

I/DEBUG (27045): be9a8d30 00000007

I/DEBUG (27045): be9a8d34 00000024

I/DEBUG (27045): be9a8d38 df002777

I/DEBUG (27045): be9a8d3c e3a070ad

I/DEBUG (27045): #00 be9a8d40 80c081b4

I/DEBUG (27045): be9a8d44 b000e740

I/DEBUG (27045): be9a8d48 b0014c3c

I/DEBUG (27045): be9a8d4c 80c08000

I/DEBUG (27045): be9a8d50 80c08000

I/DEBUG (27045): be9a8d54 b0004e29 /system/bin/linker

I/DEBUG (27045): be9a8d58 00000024

I/DEBUG (27045): be9a8d5c 00007000

I/DEBUG (27045): be9a8d60 00000045

I/DEBUG (27045): be9a8d64 00e8d941

I/DEBUG (27045): be9a8d68 ad9f5758

I/DEBUG (27045): be9a8d6c fffffde0

I/DEBUG (27045): be9a8d70 adedd008

I/DEBUG (27045): be9a8d74 ad9b0201 /system/lib/libicui18n.so

I/DEBUG (27045): be9a8d78 0010002d

I/DEBUG (27045): be9a8d7c b00094e8

I/DEBUG (27045): be9a8d80 00000024

I/DEBUG (27045): be9a8d84 00000002

I/DEBUG (27045): dumpstate /data/log/dumpstate_app_native.txt

I/BootReceiver( 282): Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_TOMBSTONE)

I/dumpstate(27047): begin

D/dalvikvm( 282): GC_CONCURRENT freed 1815K, 25% free 17850K/23687K, paused 3ms+6ms

D/dalvikvm(26279): GC_EXPLICIT freed 2K, 8% free 7372K/7943K, paused 2ms+2ms

D/HierarchicalStateMachine( 282): handleMessage: E msg.what=83

D/HierarchicalStateMachine( 282): processMsg: ConnectedState

D/WifiStateMachine( 282): ConnectedState{ what=83 when=-3ms arg1=48 }

D/HierarchicalStateMachine( 282): handleMessage: X

D/HierarchicalStateMachine( 282): handleMessage: E msg.what=83

D/HierarchicalStateMachine( 282): processMsg: ConnectedState

D/WifiStateMachine( 282): ConnectedState{ what=83 when=-4ms arg1=48 }

D/HierarchicalStateMachine( 282): handleMessage: X

D/VoldCmdListener( 221): asec list

I/dumpstate(27047): done

D/Zygote ( 225): Process 27018 terminated by signal (7)

I am an Android newbie, so perhaps I am missing something. Any advice?

Thanking all in advance.