Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run as an Adroid Application #83

Open
furkanturkmn opened this issue May 4, 2023 · 5 comments
Open

Run as an Adroid Application #83

furkanturkmn opened this issue May 4, 2023 · 5 comments

Comments

@furkanturkmn
Copy link

I was trying to integrate the server into an android app by generating a library and starting the server through JNI call which is exposed over cgo. Inorder to build the server as a library I was using; CGO_ENABLED=1 GOOS=android GOARCH=arm64 CC=/home/dev/Android-SDK/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang go build -buildmode=c-shared -o libfoo.so main.go as a result the server gets called but somehow it crashes and the android subsystem repeatedly tries to reinitialize the server library. Do you have any clue what the problem might be?

@langhuihui
Copy link
Owner

have a look if there was a fatal.log file.

@furkanturkmn
Copy link
Author

W ResourcesOffloading: An exception occurred :
W ResourcesOffloading: java.io.EOFException
W ResourcesOffloading: at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2751)
W ResourcesOffloading: at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1378)
W ResourcesOffloading: at java.io.ObjectInputStream.readObject(ObjectInputStream.java:427)
W ResourcesOffloading: at android.app.ResourcesOffloading$ResourcesOffloadingRunnable.run(ResourcesOffloading.java:82)
W ResourcesOffloading: at java.lang.Thread.run(Thread.java:920)
D LoadedApk: LoadedApk::makeApplication() appContext.mOpPackageName=com.example.myapplication appContext.mBasePackageName=com.example.myapplication
D NetworkSecurityConfig: No Network Security Config specified, using platform default
D NetworkSecurityConfig: No Network Security Config specified, using platform default
D ActivityThread: handleBindApplication() --
D OpenGLRenderer: RenderThread::requireGlContext()
D MdnieScenarioControlService: packageName : com.example.myapplication className : com.example.myapplication.MainActivity
V MdnieScenarioControlService: setUIMode from UI function(3)
D OpenGLRenderer: RenderThread::setGrContext()
D AppCompatDelegate: Checking for metadata for AppLocalesMetadataHolderService : Service not found
I GenerationRegistry: mBackingStore.isClosed() : false
D ActivityManagerPerformance: AMP_release() ACT_RESUME
I HYPER-HAL: [RequestManager.cpp]releaseLocked(): Released ID : 485638
I EDEN : [Exynos][EDEN][v1.6.22][SERVICE] processAliveMointorMain:253: Try to check pid=(30609)...
E audit : type=1400 audit(1683551645.325:197829): avc: denied { read } for pid=17824 comm="e.myapplication" name="somaxconn" dev="proc" ino=13964411 scontext=u:r:untrusted_app:s0:c14,c256,c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file permissive=0 SEPF_SM-G973F_12_0001 audit_filtered
E audit : type=1300 audit(1683551645.325:197829): arch=c00000b7 syscall=56 success=no exit=-13 a0=ffffffffffffff9c a1=40003a0b00 a2=80000 a3=0 items=0 ppid=537 pid=17824 auid=4294967295 uid=10014 gid=10014 euid=10014 suid=10014 fsuid=10014 egid=10014 sgid=10014 fsgid=10014 tty=(none) ses=4294967295 comm="e.myapplication" exe="/system/bin/app_process64" subj=u:r:untrusted_app:s0:c14,c256,c512,c768 key=(null)
E audit : type=1327 audit(1683551645.325:197829): proctitle="com.example.myapplication"
V MdnieScenarioControlService: mAclOffEnabled : false mAclPreviewState : false mAclCompensationState : false
I ActivityManager: Process com.example.myapplication (pid 17824) has died: fg TOP (493,2129)
I libprocessgroup: Successfully killed process cgroup uid 10014 pid 17824 in 0ms
I Zygote : Process 17824 exited cleanly (1)

@langhuihui
Copy link
Owner

I means was there any fatal.log file created by m7s

@furkanturkmn
Copy link
Author

Sorry no. this is the logcat output from the ADB shell of the android device.

@langhuihui
Copy link
Owner

you can try to write another simple entry project , import less plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants