Cruisers Forum
 


Join CruisersForum Today

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

Join Date: Dec 2011
Posts: 43
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, 08:30   #2
Registered User

Join Date: Sep 2015
Location: Essex, England
Boat: Hartley Tahitian 48
Posts: 284
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, 08:47   #3
Registered User

Join Date: Dec 2011
Posts: 43
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, 08:56   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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, 16:46   #5
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
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, 09:08   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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
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 08:28
Isotherm Freezer - Run, Stop, Run, Stop... Cruisin Cat Electrical: Batteries, Generators & Solar 8 24-04-2014 19:06
Android App Called EarthNC (Nav Charts) familycruisers Marine Electronics 35 24-09-2011 15:41



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 00:32.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.