Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 06-04-2016, 07:27   #1
Registered User

Join Date: Dec 2011
Posts: 51
How to run command line in android app

I'm trying to preload my enc charts with the command line for senc creation but I don't understand how to do this in android. I've downloaded a terminal emulator app but the code given in the opencpn manual doesn't seem to work on android, ie:

@chagallwifi:/ $ opencpn [-unit_test_1]
/system/bin/sh: opencpn: not found

Presumably I have to tell it where to find opencpn in order to execute it, but I've got no idea how.
calderp is offline   Reply With Quote
Old 06-04-2016, 07:30   #2
Registered User

Join Date: Sep 2015
Location: Essex, England
Boat: Hartley Tahitian 48
Posts: 394
Re: How to run command line in android app

Use the full path to opencpn


ie. $/this dir/next dir /opencpn
paulajayne is offline   Reply With Quote
Old 06-04-2016, 07:47   #3
Registered User

Join Date: Dec 2011
Posts: 51
Re: How to run command line in android app

Sorry, can you be a bit more specific? I'm not at all familiar with android OS and its file systems. I tried a handful of combinations:

/system/bin/sh: opencpn: not found
127|u0_a200@chagallwifi:/ $ opencpn -unit_test_1
/system/bin/sh: opencpn: not found
127|u0_a200@chagallwifi:/ $ /storage/emulated/0/Android/data/org.opencpn.opencpn_free/files opencpn -unit_test_1
/system/bin/sh: /storage/emulated/0/Android/data/org.opencpn.opencpn_free/files: can't execute: Is a directory
126|u0_a200@chagallwifi:/ $ encpn: not found
/system/bin/sh: encpn:: not found
127|u0_a200@chagallwifi:/ $ 127|u0_a200@chagallwifi:/ $ /storage/emulated/0/Android/data/org.opencpn.opencpn_free/files opencpn -unit_test_1
/system/bin/sh: 127: not found
/system/bin/sh: u0_a200@chagallwifi:/: not found
127|u0_a200@chagallwifi:/ $
127|u0_a200@chagallwifi:/ $ data/org.opencpn.opencpn_free/files/opencpn -unit_test_1
/system/bin/sh: data/org.opencpn.opencpn_free/files/opencpn: not found
127|u0_a200@chagallwifi:/ $ data/org.opencpn.opencpn_free/files opencpn -unit_test_1
/system/bin/sh: data/org.opencpn.opencpn_free/files: not found
127|u0_a200@chagallwifi:/ $ /storage/emulated/0/Android/data/org.opencpn.opencpn_free/files/opencpn -unit_test_1
/system/bin/sh: /storage/emulated/0/Android/data/org.opencpn.opencpn_free/files/opencpn: not found
127|u0_a200@chagallwifi:/ $

I'm not sure that the this directory is even the one opencpn runs out of or just where it stores data, I actually don't know what I'm looking for since I'm not sure what the android equivalent of .exe is. I also suspect I'm entering the path wrong.
Thanks for the help!
calderp is offline   Reply With Quote
Old 06-04-2016, 07:56   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,494
Images: 2
Re: How to run command line in android app

Please direct all of your OpenCPN Android questions and comments to this forum

OpenCPN Android Forum

so that the AOCPN knowledge base can grow in one place
rgleason is offline   Reply With Quote
Old 06-04-2016, 15:46   #5
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,384
Re: How to run command line in android app

calderp...

While your idea is sound, this approach will not work for OpenCPN for Android. On un-rooted Android, there seems to be no way to start an app from a native command shell. One can start an arbitrary Activity from a remote adb shell, but I don't think that command line parameters can be passed for startup. Android Activities don't work that way.

Feature Request?

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 07-04-2016, 08:08   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,494
Images: 2
Re: How to run command line in android app

I've posted parts of this thread to the proper location..

Please direct all of your OpenCPN Android questions and comments to this forum

OpenCPN Android Forum

so that the AOCPN knowledge base can grow in one place!
rgleason is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line senc creation for all NOAA enc charts- bad idea? calderp OpenCPN 3 06-04-2016 07:28
Isotherm Freezer - Run, Stop, Run, Stop... Cruisin Cat Electrical: Batteries, Generators & Solar 8 24-04-2014 18:06
Android App Called EarthNC (Nav Charts) familycruisers Marine Electronics 35 24-09-2011 14:41

Advertise Here


All times are GMT -7. The time now is 03:14.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.