Run ManagerServer on arm linux (on android device)

Hello all,

I’m trying to install manager server trial version on my rooted android phone using Linux deploy app.

As i know the Ubuntu distribution which installed via Linux deploy app is just have the basics files to run Ubuntu. (ex. wget command not installed by defult so i must download it using apt-get install wget) .

After go to Installing Prerequisite Software

and follow the steps, i run the app using mono ManagerServer.exe and cheer! i run the manager server on my android device and i can see my prot 8080 is open.

root@localhost:/usr/share/manager-server# mono ManagerServer.exe
Manager Server [Version 19.10.6]
Copyright (c) 2019 NGSoftware.  All rights reserved.

Syntax:

    mono ManagerServer.exe [options]

Options:

    -port [number]     Set port on which HTTP server should listen on.
    -path [directory]  Set directory where Manager should look for data.

Examples:

    mono ManagerServer.exe
    mono ManagerServer.exe -port 80
    mono ManagerServer.exe -port 80 -path "/root/.local/share/Manager"


[15:30:20] HTTP server listening on port 8080

But after went to my PC and open the browser and go to 192.168.1.230:8080 the manager server show this error on my Ubuntu system which installed on my phone.

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'SQLite.SQLiteConnection' threw an exception. ---> System.DllNotFoundException: e_sqlite3
  at (wrapper managed-to-native) SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods:sqlite3_libversion_number ()
  at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number () [0x00000] in <b9a32b664ac94072a1d6818d0d51235a>:0
  at SQLitePCL.raw.SetProvider (SQLitePCL.ISQLite3Provider imp) [0x00008] in <1087f93847e244b6a7258d70cb1cb617>:0
  at SQLitePCL.Batteries.Init () [0x00005] in <8fa947fbd5c34a21ac1310d9379e8f7a>:0
  at SQLite.SQLiteConnection..cctor () [0x00000] in <d99df9bc3e8e44e69fa595e0813d407b>:0
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_generic_class_init (intptr)
  at Manager.ApplicationData.SQLiteConnection (System.Guid fileId) [0x00040] in <bc06837b34884699a6cd09f184b5fc95>:0
  at Manager.ApplicationData.Get (System.Guid entityId) [0x00044] in <bc06837b34884699a6cd09f184b5fc95>:0
  at ManagerServer.HttpHandlers.Login.Get (System.String username, System.Boolean error) [0x000ea] in <3c1a94f17808442ba0e9a319cd3fc896>:0
  at ManagerServer.HttpHandlers.Login.Get () [0x000a2] in <3c1a94f17808442ba0e9a319cd3fc896>:0
  at HttpFramework.HttpApplication.ProcessRequest (HttpFramework.HttpRequest request, HttpFramework.HttpResponse response) [0x000ae] in <26562913d9e741fca75fbff666fb579b>:0
  at ManagerServer.HttpApplication.ProcessRequest (HttpFramework.HttpRequest request, HttpFramework.HttpResponse response) [0x00117] in <3c1a94f17808442ba0e9a319cd3fc896>:0
  at HttpFramework.HttpServer.Worker () [0x000d0] in <26562913d9e741fca75fbff666fb579b>:0
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <8f2c484307284b51944a1a13a14c0266>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <8f2c484307284b51944a1a13a14c0266>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <8f2c484307284b51944a1a13a14c0266>:0
  at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <8f2c484307284b51944a1a13a14c0266>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'SQLite.SQLiteConnection' threw an exception. ---> System.DllNotFoundException: e_sqlite3
  at (wrapper managed-to-native) SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods:sqlite3_libversion_number ()
  at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number () [0x00000] in <b9a32b664ac94072a1d6818d0d51235a>:0
  at SQLitePCL.raw.SetProvider (SQLitePCL.ISQLite3Provider imp) [0x00008] in <1087f93847e244b6a7258d70cb1cb617>:0
  at SQLitePCL.Batteries.Init () [0x00005] in <8fa947fbd5c34a21ac1310d9379e8f7a>:0
  at SQLite.SQLiteConnection..cctor () [0x00000] in <d99df9bc3e8e44e69fa595e0813d407b>:0
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_generic_class_init (intptr)
  at Manager.ApplicationData.SQLiteConnection (System.Guid fileId) [0x00040] in <bc06837b34884699a6cd09f184b5fc95>:0
  at Manager.ApplicationData.Get (System.Guid entityId) [0x00044] in <bc06837b34884699a6cd09f184b5fc95>:0
  at ManagerServer.HttpHandlers.Login.Get (System.String username, System.Boolean error) [0x000ea] in <3c1a94f17808442ba0e9a319cd3fc896>:0
  at ManagerServer.HttpHandlers.Login.Get () [0x000a2] in <3c1a94f17808442ba0e9a319cd3fc896>:0
  at HttpFramework.HttpApplication.ProcessRequest (HttpFramework.HttpRequest request, HttpFramework.HttpResponse response) [0x000ae] in <26562913d9e741fca75fbff666fb579b>:0
  at ManagerServer.HttpApplication.ProcessRequest (HttpFramework.HttpRequest request, HttpFramework.HttpResponse response) [0x00117] in <3c1a94f17808442ba0e9a319cd3fc896>:0
  at HttpFramework.HttpServer.Worker () [0x000d0] in <26562913d9e741fca75fbff666fb579b>:0
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <8f2c484307284b51944a1a13a14c0266>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <8f2c484307284b51944a1a13a14c0266>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <8f2c484307284b51944a1a13a14c0266>:0
  at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <8f2c484307284b51944a1a13a14c0266>:0

Any one have idea what i missing to install on my ubuntu system which installed on my android?

Did you meet the minimum requirements for an Ubuntu installation on the Download page? I doubt it from your description.

Yes Tut, its a 16.04.

Is your hardware and or the host Android OS x32 or x64 ?
It looks like a fun idea to that though …:smile:

I installed a x64 ubuntu, May i try a x32 os.
Yes bro i think it easy way to work on your accounting software on anywhere with low cost.

To be honest with you, I was just taking a bit of a guess. Manager runs on x64, so there’s probably little or no point in trying anything x32.
As for it being a productive thing to do… I guess that depends upon a number of things, but first I would have to ask ‘why server edition’ ?.. You might get a better result using the Linux appimage via Linux deploy. (might be worth a try).
Meanwhile, you have got me thinking now… How about just using something like Sailfish, or UBports, or Pure, or Alpine or something along those lines as the basis for it rather than android which seems to be a rather dirty and potentially troublesome way to do things.
Or to be perhaps a bit boring (but non-the-less reliable in a conventional sense), you could deploy Manager server on a Raspberry Pi or maybe an existing NAS device or even a VPS all at very low cost.

1 Like

Linux package currently requires x64 processor architecture. Android phones are typically ARM.

The reason why Manager cannot run on ARM processors is due to SQLite dependency (libe_sqlite3.so) which is compiled for x64 only. For technical reasons, it’s not possible to provide multiple dependencies for each processor architecture side-by-side and I don’t really want to over-complicate build process by providing package for each CPU architecture when 99% people are fine with x64.

You can make Manager Server to run on Android Phone but you will need to compile SQLite for ARM yourself. There was an issue on Github about this exact thing about 2 years ago.

In the long-term, eventually Manager Server will work on everything including Android Phones out of the box - it seems like .NET Core makes it possible to deploy binaries for multiple CPU architectures side-by-side on Linux but I don’t expect to migrate Manager to .NET Core until version 5 is released which will be late next year.

1 Like

I found this today in magisk app ( root manager app ) and found this module


Then I back fast to this thread and I saw your replay, I’ll try it tomorrow and back with the feedback.

Edited: when I active this mod I search my phone for sqlite library and I found libsqlite.so then I copy this file to manager folder and rename it to libe_sqlite3.so but I got error again.
So i’ll try to search for a sqlite3 source code and compile it inside my arm Linux and see results.

@lubos thanks for attention.

Try libe_sqlite3.so from this package:

https://www.nuget.org/api/v2/package/SQLitePCLRaw.lib.e_sqlite3.linux/1.1.14

It will download .nupkg file which you just rename to .zip and unpack.

Then take libe_sqlite3.so from runtimes\linux-arm64 folder. By default, Manager Server is using libe_sqlite3.so from runtimes\linux-x64 folder.

1 Like

@lubos Thank you so much, It %100 worked.

I need say to who need this, you don’t need a rooted device to lunch it, there is an app called UserLAnd you can lunch Linux distribution without root.

@lubos, please can you adjust the title of this topic to be: Run Manager server on arm Linux?