Recent

Author Topic: Create apk FPC JVM project  (Read 13652 times)

zeljkoc

  • Full Member
  • ***
  • Posts: 145
    • Zeljko Cvijanovic
Create apk FPC JVM project
« on: May 20, 2016, 03:23:37 pm »
pandroid

Create apk JVM FPC

debian jessie 8 64
edit Typhon 64

project
https://github.com/zeljkoc/pandroid

example
 TempFirebird.apk
Android to firebird
https://github.com/zeljkoc/pandroid/tree/master/example/TempFirebird



« Last Edit: May 20, 2016, 04:45:45 pm by zeljkoc »

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: Create apk FPC JVM project
« Reply #1 on: May 20, 2016, 03:34:31 pm »
Thanks for the sharing.
It's will be great if it has documentation.

I run it on my phone and if I press the "Select" button, I get this error:
Quote
Error: Can't load library: /system/lib/lib/fbclient.so.3.0.0.

It sounds you forget to provide the library file.

zeljkoc

  • Full Member
  • ***
  • Posts: 145
    • Zeljko Cvijanovic
Re: Create apk FPC JVM project
« Reply #2 on: May 20, 2016, 03:39:28 pm »
copy libfbclient.so.3.0.0 to android

adb push libfbclient.so.3.0.0 /system/lib/libfbclient.so.3.0.0

https://github.com/zeljkoc/pandroid/tree/master/library/Firebird/download/FirebirdLibrary

« Last Edit: May 20, 2016, 03:41:03 pm by zeljkoc »

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: Create apk FPC JVM project
« Reply #3 on: May 20, 2016, 03:54:21 pm »
copy libfbclient.so.3.0.0 to android

adb push libfbclient.so.3.0.0 /system/lib/libfbclient.so.3.0.0

I don't use and don't understand "adb". I run it on my 'real' Android phone. I usually copy/paste things to my phone using usb cable. I found your library file but I can't copy it to my phone. Because my Linux file manager can only access my phone's internal storage, not the system folder.

zeljkoc

  • Full Member
  • ***
  • Posts: 145
    • Zeljko Cvijanovic
Re: Create apk FPC JVM project
« Reply #4 on: May 20, 2016, 03:57:45 pm »
copy firebird client library libfbclietn.so.3.0.0 to
android telephone

/system/lib/

adb command sdk android

https://github.com/zeljkoc/pandroid/tree/master/sdk/platform-tools
« Last Edit: May 20, 2016, 03:59:43 pm by zeljkoc »

zeljkoc

  • Full Member
  • ***
  • Posts: 145
    • Zeljko Cvijanovic
Re: Create apk FPC JVM project
« Reply #5 on: May 20, 2016, 04:02:30 pm »
debian install

#: apt-get install ant
#: apt-get install android-tools-adb

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: Create apk FPC JVM project
« Reply #6 on: May 20, 2016, 04:11:22 pm »
The adb tool and Ant have already installed. I can build Android apks using my computer and run it on my phone. But I never tried to use adb to copy file to my device. I use Linux file manager to copy to my phone memory and then I use my phone file browser to run it.

If I run the adb command, I'll get this messages:
Quote
daemon not running. starting it now on port 5037
daemon started successfully
error: device not found

What wrong? I've already plugged usb cable to my phone and my computer.

I can use file manager to browse to the system folder. But an error happens if is try to paste the file:
Quote
You cannot paste here because the file system is read-only.

You may need to make the library file installed automatically, so common users can run your Android applications easily.

zeljkoc

  • Full Member
  • ***
  • Posts: 145
    • Zeljko Cvijanovic
Re: Create apk FPC JVM project
« Reply #7 on: May 20, 2016, 04:18:23 pm »
http://wiki.lazarus.freepascal.org/FPC_JVM_Android_Development

#: adb shell ls /system/lib/libsqlite*
/system/lib/libsqlite.so
/system/lib/libsqlite_jni.so

ibraray more application use not apk one library

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: Create apk FPC JVM project
« Reply #8 on: May 20, 2016, 04:24:54 pm »
#: adb shell ls /system/lib/libsqlite*
/system/lib/libsqlite.so
/system/lib/libsqlite_jni.so

Thanks for the help. But if I run the command:
Quote
adb shell ls /system/lib/libsqlite

I'll get this error:
Quote
error: device not found

zeljkoc

  • Full Member
  • ***
  • Posts: 145
    • Zeljko Cvijanovic
Re: Create apk FPC JVM project
« Reply #9 on: May 20, 2016, 04:37:16 pm »
attempt

$: ./adb kill-server
$: sudo ./adb start-server
$:./adb devices


Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: Create apk FPC JVM project
« Reply #10 on: May 20, 2016, 06:25:40 pm »
If I run adb devices command, I see only:

Quote
List of devices attached


Nothing was in the list.

But if I run my Caja file browser, I can see the Android phone is connected. I can browse, copy/paste files in the internal storage of the phone. I never use adb before. So far use only file manager on both my computer and phone.

I'm using Ubuntu Mate 15.10 64-bit and Asus Intel-based Zenfone 2. Android SDK and NDK R11C are already installed.

zeljkoc

  • Full Member
  • ***
  • Posts: 145
    • Zeljko Cvijanovic
Re: Create apk FPC JVM project
« Reply #11 on: May 20, 2016, 08:35:04 pm »
new apk
https://github.com/zeljkoc/pandroid/tree/master/example/TempFirebird/TempFirebird.apk

push menu and Edit ini file

setings path library, database firebird ....
test firebird 2.5 and firebird 2.1

save ini file exit application and start

test example

DemoChart
https://github.com/zeljkoc/pandroid/tree/master/example/DemoChart
DemoChart.apk

DemoPrint (print to bluetooth printers)
https://github.com/zeljkoc/pandroid/tree/master/example/DemoPrint
DemoPrint.apk

TestBarCode (read bar code to http://www.gepir.org/)
https://github.com/zeljkoc/pandroid/tree/master/example/TestBarCode
TestBarCode.apk


« Last Edit: May 22, 2016, 07:36:26 am by zeljkoc »

tintinux

  • Sr. Member
  • ****
  • Posts: 325
    • Gestinux
Re: Create apk FPC JVM project
« Reply #12 on: May 26, 2016, 09:12:24 am »
Quote
If I run adb devices command, I see only:
    List of devices attached
Nothing in the list.

You are not alone !
It looks like that some devices don't work with adb (even if you enable it of course).
I have spent hours on one particular LOGICOM ARM phone, and found no adb driver working.
On other devices I have, it works fine and it is now well supported by LAMW enabling automatic installation and launch after the build, saving a lot of time.

Regards
Initiator of gestinux, open-source, multi-database and multilingual accounting and billing software made with LAZARUS.

You can help to develop, to make and improve translations, and to provide examples of legal charts and reports from more countries.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Create apk FPC JVM project
« Reply #13 on: May 26, 2016, 10:18:33 am »
Quote
If I run adb devices command, I see only:
    List of devices attached
Nothing in the list.

You are not alone !
It looks like that some devices don't work with adb (even if you enable it of course).
I have spent hours on one particular LOGICOM ARM phone, and found no adb driver working.
On other devices I have, it works fine and it is now well supported by LAMW enabling automatic installation and launch after the build, saving a lot of time.

Regards
ADB requires USB driver to recognize the device to be installed, on Windows this is usually provided by the phone vendor. On Linux, a package containing udev rules for (growing list of) devices is available (in Manjaro, the package name is android-udev, no idea with other distributions). Even if your device is not in the list (e.g.: you use a very antique device), you can just look at the vendor and product id via lsusb, then add it to the udev rules manually.

zeljkoc

  • Full Member
  • ***
  • Posts: 145
    • Zeljko Cvijanovic
Re: Create apk FPC JVM project
« Reply #14 on: May 26, 2016, 11:53:55 am »
May help:

#: apt-get install mtp-tools

 

TinyPortal © 2005-2018