Menu

Re: [x11-basic:discussion] How to for APK Android app using x11 basic

Android
bruno xxx
2013-09-04
2016-08-26
  • bruno xxx

    bruno xxx - 2013-09-04

    I try this :


    take the X11 basic.apk, unzip, delete the asset/bas/*  , put a simple basic program names autoexec.bas, pack a new zip of all and rename to toto.apk

    after on the photo, the apk launch to install, but after press installation, it terminates with 'application not installed' without log.

    Where is my mistake ?

    And have you an email link to a paypal account for donation

     

    Last edit: Markus Hoffmann 2016-06-16
  • Markus Hoffmann

    Markus Hoffmann - 2013-09-05

    OK, you are right, there is one major pitfall: unlike me, you do not have the original certificate to sign the modified or new files in the apk file.
    So I am not sure if it works at all.

    To customize X11-Basic.apk you should
    1. remove all asset/bas/*
    2. put your program there
    3. replace the X11-basic logo/icon with yours
    4. Rename the package (this involves a modification of AndroidManifest.xml) not to confuse the device with a parallel installation of the original X11-Basic.
    5. sign all new and modified files (and remove entries) in META-INF which belong to deleted and new files.

    There is also a downside:

    X11-Basic copies every file from assets/bas to /sdcard/bas on startup. So the sourcecode is visible to normal X11-basic users. If a file with this name already exists in /sdcard/bas/ it will not be overwritten.

    Altogether this is probably not a good concept of handling it.

    I am thinking of following improvements:

    a) The asset folder should contain a file called "autorun.inf"
    b) The first line of autorun.inf contains the filename of a program in assets/bas which is to be run automatically at startup of X11Basic. (this way the program can have any name)
    c) If a flag is set in "autorun.inf" the file will not be copied to /sdcard/ and instead loaded from the assets directly into X11Basic. (this way the problem with (not) overwriting files in /sdcard/bas and exposing the sourcecode can be avoided)
    d) It remains the problem, that the MANIFEST.MF CERT.SF and CERT.RSA files need to be modified or regenerated. Without dedicated tools (e.g. apktool, or the java development environment) this looks not possible. (What do yoou think? Would you use a complicated java installation for this purpose?)
    e) It remains the problem, that the X11-Basic package need to be renamed and therefor the AndroidManifest.xml needs to be modified. (Otherwise the original X11-Basic apk (and all modified apks) need to be removed before your customized apk can be installed.)

    Alternatively you can provide your .bas file or .b file (e.g. by downloading it from your website). Users will put them in their /sdcard/bas/ folders and can create a shourtcut to the desktop. This way it is like(!) a real app.

    What do you think?
    Do you know of a procedure how other Android languages do it?

     
  • bruno xxx

    bruno xxx - 2013-09-06

    hello,

    this week end I will try to understand how to sign a new apk with google sdk. I'm a neebie about java dev etc...
    I love X11basic because I used gfa basic with my atari st many years ago. A lot a command, mature basic et intuitive syntax. At the moment on Android I see X11 basic and RFO basic. I always prefer X11 basic but it seems that rfo basic has an app builder (http://mougino.free.fr/page1.html) . I will try to understand how it works (for sign) to write a little procedure for x11

    best
    bruno

     
  • Markus Hoffmann

    Markus Hoffmann - 2013-09-09

    Hello, looks like this app-builder is a huge piece of work. But as I understand this way of doing things could ba also used with X11-Basic. Maybe some modifications on the X11-basic side would be necessary, buth that probably could be done....

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.