[Free] Extension. Terminal. Using LINUX commands. Copy files from assets

Hola amigos,

I have updated my com.KIO4_Terminal.aix extension.

With this extension you can execute many LINUX commands.
Comments on the use of these commands were posted on the App Inventor forums.

Using LINUX commands in App Inventor. Extension - App Showcase - MIT App Inventor Community
awk ::: base64 ::: basename ::: bunzip2 ::: bzcat ::: bzip2 ::: cal ::: cat ::: cksum ::: cp ::: curl ::: cut :::: date ::: dd ::: df ::: diff ::: dirname ::: du ::: echo ::: egrep ::: env ::: fgrep ::: file ::: find ::: ::: getprop ::: grep ::: gunzip ::: gzip ::: head ::: hostname ::: ifconfig ::: ip ::: ls ::: md5sum ::: mkdir ::: mount ::: mv ::: netstat ::: ping ::: printf ::: ps ::: rm ::: rmdir ::: sed ::: service ::: tail ::: tar ::: top ::: touch ::: toybox ::: tr ::: truncate ::: uptime ::: uudecode ::: uuencode ::: wc ::: zcat ::: zip_utils.

In this update I have added two blocks to be able to copy files from the assets.
Using the “CopyFromAssets” block we can copy an asset file to /mnt/sdcard/
Using the “AssetsToCacheDir” block we can copy an asset file to the CacheDir directory of the same application, it is affordable.

Here an example:

Terminal_sell.aia (517.4 KB)

You can download the extension of:
http://kio4.com/appinventor/278_extension_shell.htm

Regards,
Juan A. Villalpando.

17 Likes

@juananton1991

I tryed Get user’s data using CURL from FireBase Auth.

Link documentation

curl ‘https://identitytoolkit.googleapis.com/v1/accounts:lookup?key=[API_KEY]
-H ‘Content-Type: application/json’ --data-binary ‘{“idToken”:"[FIREBASE_ID_TOKEN]"}’

image

I didn’t get a response from KIO4_Terminal.
Could you help me find out what I’m missing? Thanks.

I have not tried curl with firebase, try:
https://cloud.google.com/identity-platform/docs/use-rest-api

With Airtable it would be like this:

1 Like

I have updated my com.KIO4_Terminal.aix extension with more functions with the assets.
For these blocks to work, the app must be installed.

ListAllAssets, get a list from files in assets.
CopyAllAssets, copy all user files from assets to dir in SdCard.
CopyAllAssetsX, copy all files from assets to dir in SdCard.
CopyFromAssets, copy a file from assets to dir in SdCard.
PathFileAssets, get path file in assets when app is installed.

You can download extension from:
http://kio4.com/appinventor/278_extension_shell.htm

I use the Instagram API, and run CURL with this extension but it doesn’t show anything.

By the new update of Kodular 1.4D i have this error in compiler:

java.lang.RuntimeException: no such class: com.KIO4_Terminal.KIO4_Terminal

but maybe issue is in Kodular :


Will see after fix updates.

@juananton1991

can this extention work in Andeoid 11?

1 Like

yes
however the new file access restrictions in SDK30 are also valid for this extension…

a file extension might be easier for you to use…

however you will have to try something to get something running…

Taifun

3 Likes

No, he will definitely not use any extension where he is asked to show what he has tried. He need ready made blocks. :joy:

Sorry . . .
didn’t work !

sorry…
nobody knows what you are talking about…
btw. your contribution also can be considered as spam, as it does not help anyone…

Taifun

I’m So sorry, My mistake!
I meant , I couldn’t successfully copy image file from app assets to my phone storage,
By using this extension !
I’m new in kodular , and I’m Trying to know how to let the user of my apps sharing my assets app images !

use the file component to copy files from the assets to shared storage

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun

Using curl

It either returns random characters in compainion or just nothing in the apk.

Any help is appreciated.