pelya / debian-noroot

Debian running on Android, without rooting your phone
https://play.google.com/store/apps/details?id=com.cuntubuntu
376 stars 69 forks source link

libandroid-shmem-.so question #49

Open JanuszChmiel opened 4 years ago

JanuszChmiel commented 4 years ago

Is it necessary to have Android device rooted to use yours libandroid-shmem-disableselinux.so

Because if The words disableselinux are The part of The .so library name, it is very probably necessary to disable disable selinux. BUt I do not think, that it would be possible to do that as non root user on Android device. Do I understand it well? SO yours .so library can emulate shared memory support, but only on rooted Android device, where users are able to disable selinux? Thank you very much for yours explanation.

pelya commented 4 years ago

No, libandroid-shmem does not require root

On Tue, 28 Apr 2020, 19:14 JanuszChmiel, notifications@github.com wrote:

Is it necessary to have Android device rooted to use yours libandroid-shmem-disableselinux.so

Because if The words disableselinux are The part of The .so library name, it is very probably necessary to disable disable selinux. BUt I do not think, that it would be possible to do that as non root user on Android device. Do I understand it well? SO yours .so library can emulate shared memory support, but only on rooted Android device, where users are able to disable selinux? Thank you very much for yours explanation.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pelya/debian-noroot/issues/49, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABF5QAWKL6BEMZZXKWTLSDRO36EXANCNFSM4MS7AM6A .

JanuszChmiel commented 4 years ago

Oh so I could try it with Arch Linux on Arm 64 architecture with Termux and Proot? And it is necessary to give The library The exact name libandroid-shmem.so And place it to /usr/lib? And when I will add The following command as The last line inside /etc/profile file export LD_PRELOAD=/usr/lib/libandroid-shmem.so When some app will call some shm related function, it should work?

Thank you very much that you have implemented this C library.

Many c and C++ apps calls shared memory functions such as shmget.

pelya commented 4 years ago

It should work as long as you put the right path to LD_PRELOAD

On Wed, 29 Apr 2020, 18:57 JanuszChmiel, notifications@github.com wrote:

Oh so I could try it with Arch Linux on Arm 64 architecture with Termux and Proot? And it is necessary to give The library The exact name libandroid-shmem.so And place it to /usr/lib? And when I will add The following command as The last line inside /etc/profile file export LD_PRELOAD=/usr/lib/libandroid-shmem.so When some app will call some shm related function, it should work?

Thank you very much that you have implemented this C library.

Many c and C++ apps calls shared memory functions such as shmget.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pelya/debian-noroot/issues/49#issuecomment-621303738, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABF5QEM7HKFPHJMV2KGTSDRPBE6DANCNFSM4MS7AM6A .

JanuszChmiel commented 4 years ago

aAnd some limitations. Which latest Android version is supported by this library? Android 6 or I can even try it with Android 8.0?

pelya commented 4 years ago

Android 10 should be supported

On Wed, 29 Apr 2020, 19:11 JanuszChmiel, notifications@github.com wrote:

aAnd some limitations. Which latest Android version is supported by this library? Android 6 or I can even try it with Android 8.0?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pelya/debian-noroot/issues/49#issuecomment-621311969, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABF5QCZHWVTVKZ72JW6MRTRPBGULANCNFSM4MS7AM6A .

JanuszChmiel commented 4 years ago

aSo you are expert. We must only hope, that Powerful GOogle will not release Android path which will prevent from using The build in algorithm inside this perfect library.

I know, that sshared memory can not work exactly like in Linux. That shared memory blocks will be destroied soon after using them. Is it true or block will stay on its places as long as app will not clear them?

I have tried Userland. They have implemented very strange .so libraries for shared memory. The disadvantage of their approach is The fact, that when ever Debian or Ubuntu generating man DB pages, it crash with error segmentation fault. But may be, that this is not because shared memory library which they are using, that it is other issue. Since Userland developers recoded Proot binary which have not been created as a .so library originally. But some C experts have recreated Proot so it is The part of .so native library. So may be, that this is The reason for this little instability when mandb work.

JanuszChmiel commented 4 years ago

Yours shared memory library work outstandigly. I have tested it for many many hours with mate-deskto p environment. And it did not caused crash. I have even found its source code but it is really not toy for children, only experienced C programmers can effectively develop such libraryes. I have only found out, that Seamonkey for Arch Linux can not be terminated for A whole night if this shared memory is being used and it is being loaded. In other case, when user run Seamonkey after several hours of inactivity, trying to run Seamonkey will terminate Proot processes, no whole Termux. So it terminate Arch Linux including its running Bash shell.

I have one big programmers question to you. What should happen, if you reprogramm yours .so library so it would not automatically destroy previously allocated memory? Perhaps, some developer have tried to not auto free those memory regions. But which negative effrects it had on Android apps stability? Or it could cuase Kernel crashes or out of memory problems?

Seamonkey is exception of so severe crash. X11vnc is complex and I run -noshm and it is correct.

Other more simple memory shared apps not crash. Mate-session is long C code and everythink is working like A charm. Unfortunately, & sign causes newest Stable mate-session to auto suspend itself. It is not bug of Shmem, it is internal new changed code and I do not know, why Mate developers have done that.