It's not even now how many games are written by Unity3d.
Operation is very convenient, in unity to write a program, directly generated Android APK
But the inside is actually listening complex, for scripts generated in C # need to use mono to explain the execution
The Android app is running on the Dalvik Java virtual machine, which runs after two layers of runtime
But we're more "perverted" and we want to run the Unity program with Mono in Qemu-arm (host is x86)
The result is a problem.
Mono Error
Mono: * Assertion at mini-posix.c:382, condition ' sigaction (Signo, &SA, &PREVIOUS_SA)! =-1 ' not met
Plus log found to be a problem with settings interrupts 33
======== do_sigaction Sig Host_sig Ret-1
02-10 03:54:43.441 147 186 F Mono: * Assertion at mini-posix.c:382, condition ' sigaction (Signo, &sa, &previous_s a)! =-1 ' not met
Wrote a small program PNP5 direct intercept Interrupt 33 error
$ ld_library_path=./system/bionic_arm/system/lib./system/target_libc/system/bin/qemu-arm./system/bionic_arm/ System/bin/pnp5
Sigaction return-1
It is also an error to compile this program with GLIBC
Should be Ubuntu Linux don't let setup interrupt
But since Unity is so popular, it's not going to go wrong in arm phone testing
Using the NDK to compile this program, there is no error
So in Android Linux, interrupt 33 is allowed to be set
List of programs
[Email protected]:~/pnp/pnp5$ cat android.mk #ifeq ($ (target_arch), arm) local_path:= $ (call My-dir) include $ (clear_vars ) local_src_files:= main.clocal_module:= Pnp5local_module_tags: = Optionalinclude $ (build_executable) #endif [email p rotected]:~/pnp/pnp5$ cat main.c #include <signal.h> #include <stdio.h>voidtermination_handler (int signum ) {/* struct temp_file *p; for (p = temp_file_list; p; p = p->next) unlink (p->name); */}intmain (void) {struct sigaction new_action, Old_ac tion; int my_singals[9] = {4,6,7,8,11,16,13,34,33}; int i=0; /* Set up the structure to specify the new action. */New_action.sa_handler = Termination_handler; Sigemptyset (&new_action.sa_mask); new_action.sa_flags = 0; for (i=0; i<9; i++) printf ("Sigaction%d return%d\n", My_singals[i], sigaction (My_singals[i], &new_action, &old_action)); return 0;}
In addition, Unity-generated x86 lib can be run under Ubuntu Linux, so only the Mono-arm library is set to interrupt 33
Unity3d Mono Arm non-eating interrupt 33