Friday, July 15, 2016

Running Scratch Jr Android App in Linux Mint 17.3

I was searching for some app for android tablet that would help my kid in learning something new. I do not own an android tablet but I was thinking of getting one if it would help in enriching the learning experience for my kid. Well, my kid is still small and will begun proper schooling next year. So, I have time.

My search led me to various nursery rhymes, alphabet writing, phonics, and other painting and drawing apps. But, I would really prefer these tasks to be done by parents with their kids in a traditional way. I read somewhere that parents can inculcate a routine in a kid only till the kid reaches eight years of age. So, its time we parents allocate at least one hour per day for studies for our kids from now. If you do not have anything specific to teach, then you could just hum a nursery rhyme, do some drawings, paintings etc., in that one hour.

Ok, so I did not want these apps. These apps my become valuable at a later stage but not just now. Then after more searching I reached the page for a programming language 'Scratch'. This is a wonderful program to tech kids programming from an early age. And I think programming is very important in today's digital age. But Scratch is for little older kids, around eight plus years. But, there is another branch Scratch Jr that is available for five plus year kids.

I was very intrigued to learn a little more about Scratch Jr. So I tried to install it on my smartphone. But it gave a message that it is not compatible. Also on its website it is mentioned that Scratch Jr is for tablets with size seven inch and larger. I really wanted to try this out but it just was not possible without a proper tablet computer.

Next, I also saw that this app is available for Chrome OS. So I started thinking that if this can run on Chrome OS then maybe with a little bit of searching on the web, this could run on Chrome browser. So, I searched for methods for running these android and chrome os apps on the chrome browser and lo and behold I found the answer: ARChon Runtime for Chrome (http://archon-runtime.github.io/)

Let us see how to use this great piece of software to run the android app Scratch Jr: (I use Linux Mint 17.3 Xfce 64-bit version as my OS, so the instructions will be for this OS.)
  1. Download ARChon from the website http://archon-runtime.github.io/
    • I downloaded the 'ARChon 1.2 Stable (ARC 38.4410.120.43)' version for 64-bit chrome.
  2. Use the instructions given in the 'Quick Setup' section on the ARChon website.
    • The instruction is:
      • Download the ARChon runtime, extract it, navigate to chrome://extensions, enable "Developer Mode", load the runtime
        • The download is of nearly 96 MB
        • After extracting, you will get a folder.
      • On selecting the 'Developer Mode' option you are presented with a few more buttons.
      • You are required to click the 'Load unpacked extension' 
      • When you extract the ARChon archive you will get a folder. Select this folder to load using the 'Load unpacked extension' button.
      • Some message will be shown. Just ignore these messages.
    • Now, you can also try using Sample App (the 2048 game) to make sure that the runtime is working.
      • It works.
      • Just download from the location mentioned in the 'Quick Setup' section of the ARChon website.
      • The location is https://github.com/vladikoff/chromeos-apk/releases/download/v3.0.0/com.uberspot.a2048.android-ARChon-runtime.zip
      • Extract it, load it as an unpacked extention, click "Launch".
        • 'Launch' is a link present in the extention block/page itself.
    • Next, download the apk for Scratch Jr.
      • I used the online apk download website: https://apps.evozi.com/apk-downloader/
      • The apk link is: https://play.google.com/store/apps/details?id=org.scratchjr.android
      • The downloaded apk will be 'org.scratchjr.android.apk', of around 24 MB
    • Next, you are required to convert the apk to an unpacked extention form.
      • You can do this in many ways as described on the ARChon page.
      • I chose to use the 'chromeos-apk (CLI app conversion tool)'
      • The install instuctions for this conversion tool is given on the tool's page. Here: https://github.com/vladikoff/chromeos-apk
      • As stated on that page, on Ubuntu (Linux Mint) you should run this command:
        • sudo apt-get install lib32stdc++6
          • I do not know whether this is really required, but I installed this anyway.
      • Next, install nodejs. I did this as follows:
        • curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
        • sudo apt-get install -y nodejs
        • sudo apt-get install -y build-essential
        • You can choose to use another method, but I think this one was better.
      • Next, install the tool by using this command:
        • sudo npm install chromeos-apk -g
      • Next, convert the apk by using this command:
        • First go to the directory where you have downloaded the apk, then:
        • chromeos-apk org.scratchjr.android.apk --tablet
        • A new folder is created as the extension
    • Next, load this extension in chrome using the 'Load unpacked extension' button and then selecting this new extension folder.
      • Error occurs: Some message element is missing for key extName.
      • Cancel the operation.
      • This error does not occur with the sample app (2048 app)
      • After a quick search on the internet I found the solution at this page: https://github.com/vladikoff/chromeos-apk/issues/111
      • The solution given on this page is:

        • This is an easy fix.

        • $vim /path_to_com_dir/manifest.json
        • Copy the "name" parameter: "name": "field text"

        • $vim /path_to_com_dir/_locale/language/message.json
        • add the parameter to the "extName":
        • "extName": {
        • "description": "Extension name",
        • "message": "field text"
        • }

        • Don't forget the comma.
      • I used Gedit and did the above.
      • Now try again to load the unpacked extention.
      • Success (with some message - ignore the message)
    • Now click Launch for the extention.
      • The app runs.
The app runs successfully. I have not yet tried this app to its fullest, but is works.

Scratch Jr is a good beginning for kids to learn how to give instructions and branch instructions when an event occurs. A good app for kids of five plus years. To fully use the app, I think a kid must have understanding of plus and minus and English words. My kid is underage for this app and will have to wait till next year to get hands on a tablet.

Anyways, I got some more tools to use and I will use this tool to use some interesting Android apps in Linux.

No comments:

Post a Comment