Ok so I am trying to get panda3d working on Android. I am using termux on Android to do the build. I built it and installed it to the device. Here is the command I used to build it python makepanda/makepanda.py --everything --installer --target android-21 --no-tiff --nogles. When I install it I try to run the a sample with panda/src/android/run_python samples/ball-in-maze/main.py, panda python pops up and then exits right away with no errors. I have tried running from the sd card as well and it does the same thing. Even with a program that just prints hello world, it does the same thing. What is going wrong here?
Anyone have any idea of what is going wrong here?
We’ll need to see the log. You can attach adb to it via network debugging and use logcat
to get the log output.
What’s likely happening is that you need to put the files in /sdcard so that the Panda app can read it.
Here is my log. Looks like it might be an issue with libc++_shared.so
11-09 08:47:21.007 4328 4328 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 10058 <<<<<<
11-09 08:47:21.008 4328 4328 D AndroidRuntime: CheckJNI is OFF
11-09 08:47:21.035 4328 4328 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
11-09 08:47:21.038 4328 4328 W art : Unexpected CPU variant for X86 using defaults: x86_64
11-09 08:47:21.041 4328 4328 W art : Could not create mount namespace.
11-09 08:47:21.041 4328 4328 W : Failed to bind-mount /system/lib64/x86_64/cpuinfo as /proc/cpuinfo: Operation not permitted
11-09 08:47:21.041 4328 4328 W : Failed to bind-mount /system/lib64/x86_64/cpuinfo as /etc/cpuinfo: Operation not permitted
11-09 08:47:21.048 4328 4328 E memtrack: Couldn’t load memtrack module (No such file or directory)
11-09 08:47:21.048 4328 4328 E android.os.Debug: failed to load memtrack module: -2
11-09 08:47:21.048 4328 4328 I Radio-JNI: register_android_hardware_Radio DONE
11-09 08:47:21.053 4328 4328 D AndroidRuntime: Calling main entry com.example.termuxam.Am
11-09 08:47:21.065 1823 2850 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=file:///storage/emulated/0/DCIM/SharedFolder/panda1.py flg=0x10008003 cmp=org.panda3d.sdk/org.panda3d.android.PythonActivity (has extras)} from uid 10058 on display 0
11-09 08:47:21.066 1823 2850 D ActivityManager: TopActivityInfo, pkgName: org.panda3d.sdk activityName: org.panda3d.android.PythonActivity callingPackage: com.termux bstSpecialAppKeyboardHandlingEnabled = false
11-09 08:47:21.067 1823 2850 D ActivityManager: Showing guidance for pkgName: org.panda3d.sdk
11-09 08:47:21.067 1823 4337 D ActivityManager: Sending TopActivity Info
11-09 08:47:21.068 1823 2850 D ActivityManager: Sending app launch intent for appName: Panda Viewer pkgName: org.panda3d.sdk
11-09 08:47:21.068 2109 2109 D GuidanceScreen.: mBstOemFeatures === 2111744
11-09 08:47:21.073 1823 2850 W AppOps : Finishing op nesting under-run: uid 10033 pkg com.bluestacks.appguidance code 24 time=0 duration=0 nesting=0
11-09 08:47:21.073 4328 4328 D AndroidRuntime: Shutting down VM
11-09 08:47:21.075 2109 2109 D GuidanceScreen.: event === app_launch
11-09 08:47:21.075 2109 2109 D GuidanceScreen.: hiding guidance
11-09 08:47:21.075 2109 2109 D GuidanceScreen.: hardKeyboard = 1
11-09 08:47:21.075 2109 2109 D GuidanceScreen.: controllerType === Keyboard
11-09 08:47:21.077 2109 2109 D GuidanceScreen.: appName: Panda Viewer, currentPkg: org.panda3d.sdk, event: app_launch, controller: Keyboard
11-09 08:47:21.077 2109 2109 D GuidanceScreen.: appName: Panda Viewer
11-09 08:47:21.080 2109 2109 D GuidanceScreen.Utils: checkAdExists() called with: context = [com.bluestacks.appguidance.GuidanceApplication@befbd31], hostPackageName = [org.panda3d.sdk], ignoreOccurrence = [true], adScreenService = [null], forceLaunch = [false], doNotSendStats = [false]
11-09 08:47:21.080 2109 2109 D GuidanceScreen.: showing guidance for Panda Viewer as not recommended ad found
11-09 08:47:21.081 2109 2109 D GuidanceScreen.: no guidance for org.panda3d.sdk.
11-09 08:47:21.087 1823 3712 D ActivityManager: TopActivityInfo, pkgName: org.panda3d.sdk activityName: org.panda3d.sdk/org.panda3d.android.PythonActivity callingPackage: bstSpecialAppKeyboardHandlingEnabled = false
11-09 08:47:21.088 2095 4338 D BstCommandProcessor-httpd: command: ping
11-09 08:47:21.088 2095 4338 D BstCommandProcessor-httpd: response: {“result”:“ok”}
11-09 08:47:21.091 1823 3712 D ActivityManager: Showing guidance for pkgName: org.panda3d.sdk
11-09 08:47:21.092 1823 3712 D ActivityManager: Sending app launch intent for appName: Panda Viewer pkgName: org.panda3d.sdk
11-09 08:47:21.098 1823 4339 D ActivityManager: Sending TopActivity Info
11-09 08:47:21.100 1541 1571 D gralloc_goldfish: gralloc_alloc: Creating ashmem region of size 7925760
11-09 08:47:21.108 1823 3712 I ActivityManager: Start proc 4341:org.panda3d.sdk/u0a61 for activity org.panda3d.sdk/org.panda3d.android.PythonActivity
11-09 08:47:21.117 2095 4340 D BstCommandProcessor-httpd: command: getdefaultlauncher
11-09 08:47:21.117 2095 4340 D BstCommandProcessor-Application: returning from waitForBootCompleted, isBootCompleted = true
11-09 08:47:21.118 2095 4340 D BstCommandProcessor-httpd: response: {“result”:“ok”,“defaultLauncher”:“com.bluestacks.gamepophome”}
11-09 08:47:21.131 4341 4341 I art : Late-enabling -Xcheck:jni
11-09 08:47:21.132 4341 4341 W art : Unexpected CPU variant for X86 using defaults: x86_64
11-09 08:47:21.165 1541 1571 D gralloc_goldfish: gralloc_alloc: Creating ashmem region of size 2752512
11-09 08:47:21.173 1823 3712 I PGA : PgaSocketInit: opened /dev/bstpgaipc: fd = 220
11-09 08:47:21.174 1823 3712 I PGA : Attempting to create new SOCKET connection pid = 1823, tid = 3712
11-09 08:47:21.177 1823 3712 I PGA : PgaSocketInitClientPgaIpc: data mapped to 0x7d76a407b000 with size 262144
11-09 08:47:21.177 1823 3712 I PGA : New SOCKET connection: system_server (pid 1823, tid 3712)
11-09 08:47:21.181 1541 1541 E EGL_emulation: tid 1541: eglCreateSyncKHR(1972): error 0x3004 (EGL_BAD_ATTRIBUTE)
11-09 08:47:21.220 2109 2109 D GuidanceScreen.Utils: checkAdExists() called with: context = [android.app.ReceiverRestrictedContext@c022997], hostPackageName = [org.panda3d.sdk], ignoreOccurrence = [true], adScreenService = [null], forceLaunch = [false], doNotSendStats = [false]
11-09 08:47:21.223 1823 3333 D WindowManager: in computeScreenConfigurationLocked() – hardKeyboardAvailable :true mHardKeyboardAvailable :true
11-09 08:47:21.227 2109 2109 D GuidanceScreen.: mBstOemFeatures === 2111744
11-09 08:47:21.232 1823 2850 W AppOps : Finishing op nesting under-run: uid 10033 pkg com.bluestacks.appguidance code 24 time=0 duration=0 nesting=0
11-09 08:47:21.249 2109 2109 D GuidanceScreen.: event === app_launch
11-09 08:47:21.249 2109 2109 D GuidanceScreen.: hiding guidance
11-09 08:47:21.249 2109 2109 D GuidanceScreen.: hardKeyboard = 1
11-09 08:47:21.249 2109 2109 D GuidanceScreen.: controllerType === Keyboard
11-09 08:47:21.253 4341 4341 D AndroidRuntime: Shutting down VM
11-09 08:47:21.253 4341 4341 D AndroidRuntime: procName from cmdline: org.panda3d.sdk
11-09 08:47:21.253 4341 4341 E AndroidRuntime: in writeCrashedAppName, pkgName :org.panda3d.sdk
11-09 08:47:21.253 4341 4341 D AndroidRuntime: file written successfully with content: org.panda3d.sdk StringBuffer : ;org.panda3d.sdk
11-09 08:47:21.254 2095 2220 D BstCommandProcessor-Application: Application crash has been observed.
11-09 08:47:21.254 4341 4341 E AndroidRuntime: FATAL EXCEPTION: main
11-09 08:47:21.254 4341 4341 E AndroidRuntime: Process: org.panda3d.sdk, PID: 4341
11-09 08:47:21.254 4341 4341 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library “libc++_shared.so” not found
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:994)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1562)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at org.panda3d.android.PandaActivity.(PandaActivity.java:117)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at java.lang.Class.newInstance(Native Method)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at android.app.Instrumentation.newActivity(Instrumentation.java:1108)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2560)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2729)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at android.app.ActivityThread.-wrap12(ActivityThread.java)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1480)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6138)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893)
11-09 08:47:21.254 4341 4341 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)
11-09 08:47:21.254 4341 4341 I Process : Sending signal. PID: 4341 SIG: 9
11-09 08:47:21.255 2109 2109 D GuidanceScreen.: appName: Panda Viewer, currentPkg: org.panda3d.sdk, event: app_launch, controller: Keyboard
11-09 08:47:21.256 2109 2109 D GuidanceScreen.: appName: Panda Viewer
11-09 08:47:21.268 2095 4360 W BstCommandProcessor-Application: in sendHttpRequest, requestType is of CRASH_APP type but one of the requiredInfo is NULL, crashedApp = BstCrashedAppInfo{pkgName:org.panda3d.sdk versionName:1.0 versionCode:1}
11-09 08:47:21.268 2109 2109 D GuidanceScreen.: no guidance for org.panda3d.sdk.
11-09 08:47:21.291 1823 1844 V WindowManager: isVisibleLw false for win : Window{b26e93b u0 com.termux/com.termux.app.TermuxActivity}
11-09 08:47:21.292 2095 4362 D BstCommandProcessor-httpd: command: runex com.termux/com.termux.app.TermuxActivity
11-09 08:47:21.297 2095 4361 D BstCommandProcessor-httpd: command: stopapp org.panda3d.sdk
11-09 08:47:21.297 1823 1838 D WindowManager: Sending appClickStats request with data: appVersionName=1.0 clickloc=system_server appname=Panda Viewer appver=1 package=org.panda3d.sdk
11-09 08:47:21.310 3847 3884 D EGL_emulation: eglMakeCurrent: 0x7d76bba1fa80: ver 3 0 (tinfo 0x7d76bba0c380)
11-09 08:47:21.316 1823 3023 I ActivityManager: Process org.panda3d.sdk (pid 4341) has died
11-09 08:47:21.316 1823 3023 D ActivityManager: cleanUpApplicationRecord – 4341
11-09 08:47:21.323 1823 3023 D ActivityManager: TopActivityInfo, pkgName: org.panda3d.sdk activityName: org.panda3d.sdk/org.panda3d.android.PythonActivity callingPackage: bstSpecialAppKeyboardHandlingEnabled = false
11-09 08:47:21.327 1823 3023 D ActivityManager: Showing guidance for pkgName: org.panda3d.sdk
11-09 08:47:21.329 2095 4361 D BstCommandProcessor-Application: in isSystemReady, isBootCompleted true External storage status: mounted External storage dir :/storage/emulated/0 isExternalStorageRemovable:false deviceProvisioned 1
11-09 08:47:21.329 2095 4361 D BstCommandProcessor-Application: returning from waitForSystemReady, isSystemReady = true
11-09 08:47:21.334 2109 2109 D GuidanceScreen.: mBstOemFeatures === 2111744
11-09 08:47:21.336 1823 3023 D ActivityManager: Sending app launch intent for appName: Panda Viewer pkgName: org.panda3d.sdk
11-09 08:47:21.339 1823 2290 W AppOps : Finishing op nesting under-run: uid 10033 pkg com.bluestacks.appguidance code 24 time=0 duration=0 nesting=0
11-09 08:47:21.342 2095 4362 D BstCommandProcessor-Application: in isSystemReady, isBootCompleted true External storage status: mounted External storage dir :/storage/emulated/0 isExternalStorageRemovable:false deviceProvisioned 1
11-09 08:47:21.342 2095 4362 D BstCommandProcessor-Application: returning from waitForSystemReady, isSystemReady = true
11-09 08:47:21.358 2109 2109 D GuidanceScreen.: event === app_launch
11-09 08:47:21.358 2109 2109 D GuidanceScreen.: hiding guidance
11-09 08:47:21.358 2109 2109 D GuidanceScreen.: hardKeyboard = 1
11-09 08:47:21.358 2109 2109 D GuidanceScreen.: controllerType === Keyboard
11-09 08:47:21.364 1823 3023 I ActivityManager: Start proc 4365:org.panda3d.sdk/u0a61 for activity org.panda3d.sdk/org.panda3d.android.PythonActivity
11-09 08:47:21.370 2095 4362 D BstCommandProcessor-CommandHandler: pkg found in recent tasks
11-09 08:47:21.371 2095 4362 D BstCommandProcessor-CommandHandler: moving 18 to front
11-09 08:47:21.373 2109 2109 D GuidanceScreen.: appName: Panda Viewer, currentPkg: org.panda3d.sdk, event: app_launch, controller: Keyboard
11-09 08:47:21.373 2109 2109 D GuidanceScreen.: appName: Panda Viewer
11-09 08:47:21.375 1823 3712 D ActivityManager: TopActivityInfo, pkgName: com.termux activityName: com.termux/.app.TermuxActivity callingPackage: bstSpecialAppKeyboardHandlingEnabled = false
11-09 08:47:21.375 2109 2109 D GuidanceScreen.: no guidance for org.panda3d.sdk.
11-09 08:47:21.375 1823 3712 D ActivityManager: Showing guidance for pkgName: com.termux
11-09 08:47:21.376 1823 3712 D ActivityManager: Sending app launch intent for appName: Termux pkgName: com.termux
11-09 08:47:21.377 1823 4364 D ActivityManager: Sending TopActivity Info
11-09 08:47:21.380 1823 3712 D WindowManager: in computeScreenConfigurationLocked() – hardKeyboardAvailable :true mHardKeyboardAvailable :true
11-09 08:47:21.390 2095 4361 D BstCommandProcessor-Application: in isSystemReady, isBootCompleted true External storage status: mounted External storage dir :/storage/emulated/0 isExternalStorageRemovable:false deviceProvisioned 1
11-09 08:47:21.390 2095 4361 D BstCommandProcessor-Application: returning from waitForSystemReady, isSystemReady = true
11-09 08:47:21.391 1823 2290 D VoldConnector: SND -> {11 asec list}
11-09 08:47:21.392 1823 1946 D VoldConnector: RCV <- {200 11 asec operation succeeded}
11-09 08:47:21.392 2095 4361 D BstCommandProcessor-CommandHandler: Package : org.panda3d.sdk doesn’t exist in secure applist, so setting isSecureAppsReady flag
11-09 08:47:21.393 4365 4365 I art : Late-enabling -Xcheck:jni
11-09 08:47:21.395 1823 4370 D ActivityManager: Sending TopActivity Info
11-09 08:47:21.413 4365 4365 W art : Unexpected CPU variant for X86 using defaults: x86_64
11-09 08:47:21.417 1823 3333 D WindowManager: relayoutVisibleWindow: Window{b26e93b u0 com.termux/com.termux.app.TermuxActivity EXITING} mAnimatingExit=true, mRemoveOnExit=false, mDestroying=false
11-09 08:47:21.472 2095 4362 E Sensor-AccelerometerUI: java.io.IOException: Connection refused
11-09 08:47:21.472 2109 2109 D GuidanceScreen.: mBstOemFeatures === 2111744
11-09 08:47:21.477 1823 3712 W AppOps : Finishing op nesting under-run: uid 10033 pkg com.bluestacks.appguidance code 24 time=0 duration=0 nesting=0
11-09 08:47:21.489 2095 4378 D BstCommandProcessor-httpd: command: ping
11-09 08:47:21.489 2095 4378 D BstCommandProcessor-httpd: response: {“result”:“ok”}
11-09 08:47:21.499 3847 3884 D EGL_emulation: eglMakeCurrent: 0x7d76bba1fa80: ver 3 0 (tinfo 0x7d76bba0c380)
11-09 08:47:21.504 2109 2109 D GuidanceScreen.: event === app_launch
11-09 08:47:21.504 2109 2109 D GuidanceScreen.: hiding guidance
11-09 08:47:21.504 2109 2109 D GuidanceScreen.: hardKeyboard = 1
11-09 08:47:21.504 2109 2109 D GuidanceScreen.: controllerType === Keyboard
11-09 08:47:21.504 2109 2109 D GuidanceScreen.: appName: Termux, currentPkg: com.termux, event: app_launch, controller: Keyboard
11-09 08:47:21.504 2109 2109 D GuidanceScreen.: appName: Termux
11-09 08:47:21.513 2095 4380 D BstCommandProcessor-httpd: command: getdefaultlauncher
11-09 08:47:21.513 2095 4380 D BstCommandProcessor-Application: returning from waitForBootCompleted, isBootCompleted = true
11-09 08:47:21.521 1823 1833 I art : Background partial concurrent mark sweep GC freed 36434(1875KB) AllocSpace objects, 19(380KB) LOS objects, 33% free, 10MB/15MB, paused 2.147ms total 306ms
11-09 08:47:21.522 1823 3023 I ActivityManager: Killing 4057:com.google.android.gms.unstable/u0a2 (adj 906): empty #5
11-09 08:47:21.527 1823 3796 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@d805edb attribute=null, token = android.os.BinderProxy@8dd3ca
11-09 08:47:21.536 2095 4380 D BstCommandProcessor-httpd: response: {“result”:“ok”,“defaultLauncher”:“com.bluestacks.gamepophome”}
11-09 08:47:21.536 2109 2109 D GuidanceScreen.Utils: checkAdExists() called with: context = [com.bluestacks.appguidance.GuidanceApplication@befbd31], hostPackageName = [com.termux], ignoreOccurrence = [true], adScreenService = [null], forceLaunch = [false], doNotSendStats = [false]
11-09 08:47:21.536 2109 2109 D GuidanceScreen.: showing guidance for Termux as not recommended ad found
11-09 08:47:21.569 2109 2109 D GuidanceScreen.: no guidance for com.termux.
11-09 08:47:21.612 1823 2850 D ActivityManager: cleanUpApplicationRecord – 4057
11-09 08:47:21.639 2109 2109 D GuidanceScreen.Utils: checkAdExists() called with: context = [android.app.ReceiverRestrictedContext@c022997], hostPackageName = [com.termux], ignoreOccurrence = [true], adScreenService = [null], forceLaunch = [false], doNotSendStats = [false]
11-09 08:47:21.647 2095 4361 D BstCommandProcessor-CommandHandler: Broadcasting STOP_APP intent with data: {“package”:“org.panda3d.sdk”,“isArmApp”:false} isArmApp: false
11-09 08:47:21.654 1823 1844 W WindowManager: Failed looking up window
11-09 08:47:21.654 1823 1844 W WindowManager: java.lang.IllegalArgumentException: Requested window android.view.ViewRootImpl$W@ec84f2e does not exist
11-09 08:47:21.654 1823 1844 W WindowManager: at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9670)
11-09 08:47:21.654 1823 1844 W WindowManager: at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9661)
11-09 08:47:21.654 1823 1844 W WindowManager: at com.android.server.wm.WindowManagerService.removeWindow(WindowManagerService.java:2411)
11-09 08:47:21.654 1823 1844 W WindowManager: at com.android.server.wm.Session.remove(Session.java:202)
11-09 08:47:21.654 1823 1844 W WindowManager: at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:3297)
11-09 08:47:21.654 1823 1844 W WindowManager: at android.view.ViewRootImpl.doDie(ViewRootImpl.java:5924)
11-09 08:47:21.654 1823 1844 W WindowManager: at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3633)
11-09 08:47:21.654 1823 1844 W WindowManager: at android.os.Handler.dispatchMessage(Handler.java:102)
11-09 08:47:21.654 1823 1844 W WindowManager: at android.os.Looper.loop(Looper.java:154)
11-09 08:47:21.654 1823 1844 W WindowManager: at android.os.HandlerThread.run(HandlerThread.java:61)
11-09 08:47:21.654 1823 1844 W WindowManager: at com.android.server.ServiceThread.run(ServiceThread.java:46)
11-09 08:47:21.658 1823 2286 I ActivityManager: Killing 4365:org.panda3d.sdk/u0a61 (adj 900): remove task
11-09 08:47:21.659 2095 4361 D BstCommandProcessor-httpd: response: {“result”:“ok”}
11-09 08:47:21.670 2095 4362 D BstCommandProcessor-CommandHandler: Sending startService intent with data: Intent { act=com.bluestacks.home.svc pkg=com.bluestacks.home }
11-09 08:47:21.674 2095 4362 D BstCommandProcessor-CommandHandler: Broadcasting START_APP intent with data: {“package”:“com.termux”,“isArmApp”:false} isArmApp: false
11-09 08:47:21.674 2095 4362 D BstCommandProcessor-httpd: response: {“result”:“ok”}
11-09 08:47:21.705 1823 2286 D ActivityManager: cleanUpApplicationRecord – 4365
apksigner did not sign the apk on my device…
It returns:
Unsupported command debug.ks!
Other means I tried worketh not!
What version is your apksigner?
I manually signed the APK file on my computer
it’s just a missing library in the apk there are multiple libc++ to choose from in ndk and apart from using the static one, it must be manually packaged. You should verify that makepandacore.py could copy it. an simple way is to open the apk with a zip tool and look into for ./lib/<somearchname>/libc++_shared.so