Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.mobile.android > #141943 > unrolled thread

programming/scripting on an Android device - suggestions ?

Started by"R.Wieser" <address@is.invalid>
First post2024-06-11 14:53 +0200
Last post2024-06-12 21:32 +0200
Articles 12 on this page of 32 — 11 participants

Back to article view | Back to comp.mobile.android


Contents

  programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-11 14:53 +0200
    Re: programming/scripting on an Android device - suggestions ? Kees Nuyt <k.nuyt@nospam.demon.nl> - 2024-06-11 15:58 +0200
      Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-11 17:53 +0200
        Re: programming/scripting on an Android device - suggestions ? Andy Burns <usenet@andyburns.uk> - 2024-06-11 17:09 +0100
          Re: programming/scripting on an Android device - suggestions ? Andrew <andrew@spam.net> - 2024-06-11 20:05 +0000
          Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-12 08:15 +0200
        Re: programming/scripting on an Android device - suggestions ? Eli the Bearded <*@eli.users.panix.com> - 2024-06-11 21:12 +0000
          Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-12 08:19 +0200
            Re: programming/scripting on an Android device - suggestions ? Eli the Bearded <*@eli.users.panix.com> - 2024-06-14 00:20 +0000
              Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-15 10:06 +0200
                Re: programming/scripting on an Android device - suggestions ? Eli the Bearded <*@eli.users.panix.com> - 2024-06-16 07:28 +0000
                  Re: programming/scripting on an Android device - suggestions ? "W. Greenhouse" <wgreenhouse@tilde.club> - 2024-06-16 13:46 +0000
        Re: programming/scripting on an Android device - suggestions ? Bob Martin <bob.martin@excite.com> - 2024-06-12 05:10 +0000
          Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-12 21:13 +0200
    Re: programming/scripting on an Android device - suggestions ? Richmond <dnomhcir@gmx.com> - 2024-06-11 18:01 +0100
    Re: programming/scripting on an Android device - suggestions ? Andrew <andrew@spam.net> - 2024-06-11 20:05 +0000
      Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-12 08:02 +0200
    Re: programming/scripting on an Android device - suggestions ? Anne de Royde <AdR@spam.invalid> - 2024-06-12 06:19 +0000
      Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-12 20:42 +0200
        Re: programming/scripting on an Android device - suggestions ? Anne de Royde <AdR@spam.invalid> - 2024-06-13 08:18 +0000
          Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-13 10:48 +0200
            Re: programming/scripting on an Android device - suggestions ? Anne de Royde <AdR@spam.invalid> - 2024-06-14 07:25 +0000
              Re: programming/scripting on an Android device - suggestions ? Andrew <andrew@spam.net> - 2024-06-14 20:34 +0000
              Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-15 11:24 +0200
                Re: programming/scripting on an Android device - suggestions ? Anne de Royde <AdR@spam.invalid> - 2024-06-16 07:29 +0000
    Re: programming/scripting on an Android device - suggestions ? Dave Royal <dave@dave123royal.com> - 2024-06-12 07:26 +0100
      Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-12 20:58 +0200
        Re: programming/scripting on an Android device - suggestions ? Dave Royal <dave@dave123royal.com> - 2024-06-13 06:25 +0100
          Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-13 10:24 +0200
    Re: programming/scripting on an Android device - suggestions ? Arno Welzel <usenet@arnowelzel.de> - 2024-06-12 12:58 +0200
      Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-12 21:10 +0200
      Re: programming/scripting on an Android device - suggestions ? "R.Wieser" <address@is.invalid> - 2024-06-12 21:32 +0200

Page 2 of 2 — ← Prev page 1 [2]


#142014

From"R.Wieser" <address@is.invalid>
Date2024-06-13 10:48 +0200
Message-ID<v4ebrk$26buv$1@dont-email.me>
In reply to#142011
Anne,

> You can use one of these, installed on Android:
> *  TermOne Plus 
> <https://play.google.com/store/apps/details?id=com.termoneplus>
> *  Termux 
> <https://play.google.com/store/apps/details?id=com.termux>
>
> These give you a shell prompt in a terminal emulator window on Android.
> Like a Linux 'Terminal' window, or a Windows 'Command Prompt' window.

Thanks for the links.

> The commands available to you are whatever is already provided by your
> Android device.

:-)  And how do I know what my android device provides ?   Its not like 
we're in a cyberpunk world where I would just grab the knowledge chip that 
came with the phone and plug it into the socket in my neck.

IOW, I'm a noobie.  Do you know of a(ny) website carrying that kind of info 
(and preferrably some examples and perhaps even tutorials too) ?

>>> Other command-line utilities in Android's /system/bin are not APKs.
>>
>> A question though : where would I find the above folder ?  I've got a
>> file browser, but it doesn't show any such folder.
>
> I expect your file browser also does not show the folders where your
> APK apps are installed to.  For example,
> *  Where Firefox is installed:    /data/app/org.mozilla.firefox/
> *  Where MS Edge is installed:    /data/app/com.microsoft.emmx/

True.  I just checked and the best I can find in that direction is an 
"/Android" folder with the subfolders "data", "media" and "obb"  (I still 
have to check what those are ment for).

> Some ways to *find* the folder /system/bin

Thanks for those instructions.  I saved your message for future reference.

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#142038

FromAnne de Royde <AdR@spam.invalid>
Date2024-06-14 07:25 +0000
Message-ID<UfSaO.27327$PCJ6.16452@usenetxs.com>
In reply to#142014
R.Wieser wrote:
> Anne,
> 
>> The commands available to you are whatever is already provided by your
>> Android device.
> 
> :-)  And how do I know what my android device provides ?   Its not like
> we're in a cyberpunk world where I would just grab the knowledge chip that
> came with the phone and plug it into the socket in my neck.

Android is based on (a modified version of) Linux.

Get a manual of Linux commands. Then experiment. Try different
commands to see whether your particular Android device has that
command or not.

> IOW, I'm a noobie.  Do you know of a(ny) website carrying that kind of info
> (and preferrably some examples and perhaps even tutorials too) ?

If you are also a Linux noobie, start by learning about Linux commands.

 *  "The Linux command line for beginners"
    <https://ubuntu.com/tutorials/command-line-for-beginners>
    Although this tutorial was written for Ubuntu, much of it will
    also apply to Android - after you have installed a terminal
    emulator on Android.

 *  "The Linux Commands Handbook"
    <https://bjpcjp.github.io/pdfs/devops/linux-commands-handbook.pdf>

[toc] | [prev] | [next] | [standalone]


#142050

FromAndrew <andrew@spam.net>
Date2024-06-14 20:34 +0000
Message-ID<v4i9fo$l6m$1@nnrp.usenet.blueworldhosting.com>
In reply to#142038
Anne de Royde wrote on Fri, 14 Jun 2024 07:25:37 -0000 :

> Android is based on (a modified version of) Linux.

As an aside, anyone (even non rooted phones) can freely add almost any
Linux distro to Android, if that's something people might want to try.

                 <https://andronix.app/>

There are a lot of threads about this already, so no sense in repeating.

[toc] | [prev] | [next] | [standalone]


#142069

From"R.Wieser" <address@is.invalid>
Date2024-06-15 11:24 +0200
Message-ID<v4jmlo$3daj0$2@dont-email.me>
In reply to#142038
Anne,

> Android is based on (a modified version of) Linux.
>
> Get a manual of Linux commands. Then experiment.

:-) You're talking about the mundane stuff like being able to navigate the 
filesystem and run programs.   I'm rather sure that my time with a Raspberry 
Pi will have been beneficial toward that.  I just have to remember the 
execute bit and the ".\" prefix.

No, I'm talking about the specific Linux version on the phone and what it 
offers that other linux versions do not.

Especially in regard to programming (see subjectline), which means API 
support towards the devices capabilities.

If learning some basics of Linux (and C ) was my goal I would have kept my 
attention on a Raspberry Pi.  And that got, due to absense of information 
(and half implemented features but fully mentioned in header files), 
cumbersome fast.

... hence my request for information /before/ I go off the deep end.

> If you are also a Linux noobie,

I am.  Just like I will be a noobie on the next version of Windows - even if 
I've been using Windows in general for a good number of years now.

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#142081

FromAnne de Royde <AdR@spam.invalid>
Date2024-06-16 07:29 +0000
Message-ID<zvwbO.62463$ujOb.13311@usenetxs.com>
In reply to#142069
R.Wieser wrote:

> Especially in regard to programming (see subjectline), which means API
> support towards the devices capabilities.

Android itself is deliberately designed as an end-user GUI environment 
only, not a programming environment. In this matter Android differs from 
both Linux and Windows.

Yes, there is some support for scripting (see subjectline) in Android 
when you install a third-party terminal emulator.

But if you also require API support towards device capabilities, you may 
need to call Android APIs from Kotlin or Java and cross-compile for 
Android on a desktop computer.  :-(

There is also the matter of Android permissions. For example, to access 
the device's camera the program needs the Android 'Camera' permission. 
Scripts do not have Android permissions. Only APK apps can have Android 
permissions.


[toc] | [prev] | [next] | [standalone]


#141981

FromDave Royal <dave@dave123royal.com>
Date2024-06-12 07:26 +0100
Message-ID<v4bf2m$1h142$1@dont-email.me>
In reply to#141943
"R.Wieser" <address@is.invalid> Wrote in message:

> Hello all,
> 
> I would like to be able to program/script on a smartphone itself (meaning: 
> not having to use a PC).
> 
> I did find a script-language launcher but surprisingly no APK downloads to 
> programming/scripting languages.
> 
> I've found some mentioning of a few different programming/scripting 
> languages (like lua and python), but surprisingly no indication of APK 
> downloads to any of them.
> 
> Question:
> 
> Does someone know of websites offering APKs for download ?
> 
> - or even better: websites which offer the APK as well as containing a 
> tutorial to its usage (on an Android smartphone).
> 
> Regards,
> Rudy Wieser

Years ago I used SL4A, Py4A to run Python scripts on Android but I
 don't think it has worked for several years:
<https://github.com/kuri65536/sl4a>
I see the ex-maintainer mentions using termux:
<https://github.com/kuri65536/sl4a/issues/50>

I've also used pydroid and I see that pydroid3 is in the
 playstore. It wasn't a paid app when I used it.

These days I use Kivy but I develop on a Linux PC and build an
 Android apk. Kivy provides a gui api which you can use in Python.
 (There's also a layout builder though I've not used it.) There
 used to be a Kivy Launcher app which would run a Kivy/Python
 script on Android but it's not it the playstore though it was a
 couple of years ago.
-- 
Remove numerics from my email address.

[toc] | [prev] | [next] | [standalone]


#141989

From"R.Wieser" <address@is.invalid>
Date2024-06-12 20:58 +0200
Message-ID<v4crr6$1pumc$2@dont-email.me>
In reply to#141981
Dave,

> Years ago I used SL4A, Py4A to run Python scripts on Android but
> I don't think it has worked for several years:
> <https://github.com/kuri65536/sl4a>

Hmmm.. while googeling I also found it, and an APK to it.  But as it 
presented itself as a layer upon which scripting interpreters could be 
installed (read: it doesn't offer any scripting capabilities itself) I 
decided to see if simpler solutions where available.

> I see the ex-maintainer mentions using termux:
> <https://github.com/kuri65536/sl4a/issues/50>

Thats a +1 for termux I guess. :-)

> These days I use Kivy but I develop on a Linux PC and build
> an Android apk.

I also encountered that one, but its what I'm trying to evade, having to use 
a PC.   You see, I don't think that my old 'puter running XP (or a single 
other one running Win7) wil be able to run stuff like that.

Any ideas about using a Raspberry Pi for it ?

> ... it's not it the playstore

I have absolutily zero problems with staying outof googles garden.

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#142007

FromDave Royal <dave@dave123royal.com>
Date2024-06-13 06:25 +0100
Message-ID<v4dvt3$245h5$1@dont-email.me>
In reply to#141989
"R.Wieser" <address@is.invalid> Wrote in message:

> Dave,
> 
>> Years ago I used SL4A, Py4A to run Python scripts on Android but
>> I don't think it has worked for several years:
>> <https://github.com/kuri65536/sl4a>
> 
> Hmmm.. while googeling I also found it, and an APK to it.  But as it 
> presented itself as a layer upon which scripting interpreters could be 
> installed (read: it doesn't offer any scripting capabilities itself) I 
> decided to see if simpler solutions where available.

PY4A - Python for Android - ran on SL4A. But I suspect you need an
 old version of Android to run it.

>> I see the ex-maintainer mentions using termux:
>> <https://github.com/kuri65536/sl4a/issues/50>
> 
> Thats a +1 for termux I guess. :-)
> 
>> These days I use Kivy but I develop on a Linux PC and build
>> an Android apk.
> 
> I also encountered that one, but its what I'm trying to evade, having to use 
> a PC.   You see, I don't think that my old 'puter running XP (or a single 
> other one running Win7) wil be able to run stuff like that.
> 
> Any ideas about using a Raspberry Pi for it ?

<https://kivy.org/doc/stable/installation/installation-rpi.html>
The documentaion is extensive but cryptic!

I build and initially test on Linux, but you have to allow for the
 different display size/resolution. A proper keyboard and screen
 is the important thing.

Whether kivy is for you depends what you want to build. 

>> ... it's not it the playstore
> 
> I have absolutily zero problems with staying outof googles garden.

It was just an example. I'm using a standard in-support tablet here.

They may call pydroid an IDE, btw, but I'm pretty sure you can run
 scripts developed outside it. QPython was like that.
-- 
Remove numerics from my email address.

[toc] | [prev] | [next] | [standalone]


#142012

From"R.Wieser" <address@is.invalid>
Date2024-06-13 10:24 +0200
Message-ID<v4eadc$263dv$2@dont-email.me>
In reply to#142007
Dave,

> PY4A - Python for Android - ran on SL4A. But I suspect you need
> an old version of Android to run it.

The AndroidManifest.xml of the SL4A APK I downloaded shows a 
"targetSdkVersion" of 14, which translates to below Android  v4.1.   And as 
AFAIK my phone runs Android 13 ...  Yep, it goes onto the garbage heap. :-\

>> Any ideas about using a Raspberry Pi for it ?
>
> <https://kivy.org/doc/stable/installation/installation-rpi.html>
> The documentaion is extensive but cryptic!
>
> I build and initially test on Linux, but you have to allow for the
> different display size/resolution. A proper keyboard and screen
> is the important thing.

Yikes!  I might be a hobby programmer, but asking a first-timer to configure 
something without clear instructions is just asking him to fail.  Which 
(having to go thru a gazillion of tries to get the whole thing to work) 
isn't really my cup of tea.

> Whether kivy is for you depends what you want to build.

:-)  I started off with the desire to just being able to run a script or 
two.  I'm not at all sure what I want to build.  Starting with the famous 
"hello world" would be a first step, activating the "buzzer" a likely 
second.  But being able to do something with BLE (detecting "beacon" 
broadcasts) has been in the back of my mind.    I might even want to build 
something which draws stuff in a ... what do you call those apps which have 
a full-screen GUI presence ?

> They may call pydroid an IDE, btw, but I'm pretty sure you can run
> scripts developed outside it. QPython was like that.

My consideration was more the opposite of that : if I could run scripts 
(written using the IDE or not) without having to interact with the IDE every 
time.

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#141983

FromArno Welzel <usenet@arnowelzel.de>
Date2024-06-12 12:58 +0200
Message-ID<lctdb3FmbboU1@mid.individual.net>
In reply to#141943
R.Wieser, 2024-06-11 14:53:

> I would like to be able to program/script on a smartphone itself (meaning: 
> not having to use a PC).
> 
> I did find a script-language launcher but surprisingly no APK downloads to 
> programming/scripting languages.
> 
> I've found some mentioning of a few different programming/scripting 
> languages (like lua and python), but surprisingly no indication of APK 
> downloads to any of them.

Python:

<https://play.google.com/store/apps/details?id=ru.iiec.pydroid3>

Lua:

<https://play.google.com/store/apps/details?id=com.alif.ide.lua>

Both can be found quite easy by just searching von "Python" or "Lua" in
Google Play.


-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#141990

From"R.Wieser" <address@is.invalid>
Date2024-06-12 21:10 +0200
Message-ID<v4crr6$1pumc$3@dont-email.me>
In reply to#141983
Arno,

> Python:
>
> <https://play.google.com/store/apps/details?id=ru.iiec.pydroid3>
>
> Lua:
>
> <https://play.google.com/store/apps/details?id=com.alif.ide.lua>

Thanks.  But those are complete programming environments (IDEs), while I'm 
looking for just the interpreter program which will execute a script.

Like on my PC I can write scripts (in a few different languages) using any 
flat-text editor I want (notepad, word, norton editor), and than just run 
them by double-clicking them.

> Both can be found quite easy by just searching von "Python" or "Lua"
> in Google Play.

I've got a non-google android phone (Graphene OS), and if possible I want to 
keep it that way. (I wrote a small program to extract the permissions of 
APKs I downloaded onto my PC (so that I can backup them) and its sometimes 
frightening to see how many and which some programs seem to need).

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#141992

From"R.Wieser" <address@is.invalid>
Date2024-06-12 21:32 +0200
Message-ID<v4ct68$1q7d2$2@dont-email.me>
In reply to#141983
Arno,

> Lua:
>
> <https://play.google.com/store/apps/details?id=com.alif.ide.lua>

Hmmmm.  I just downloaded it (from apkpure) and checked the permissions (as 
provided by the androidmanifest.xml file), but didn't see any permissions 
for blootooth, wifi or even the buzzer.  Should I assume its a rather 
limited language (in regard to access of the smartphones hardware) ?

Regards,
Rudy Wieser

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.mobile.android


csiph-web