How to install my .xpi on firefox android

前端 未结 5 1093
自闭症患者
自闭症患者 2021-02-14 10:53

I work on a firefox addon using JPM.

I want to install it on my android phone, i\'ve run \"jpm xpi\" and copy xpi on my sdcard. When i browse to file://path/to/my/xpi in

相关标签:
5条回答
  • 2021-02-14 11:17

    This is a problem because of the different Versions. I had the same problem as you. I tried to install the xpi manually. The trick is to install versions that are older. So currently Firefox v43 does not work. But v38 or v39 for Example works without any problem.

    v42 for Example does not work. v41 works. It seems like they changed something here. Because the Explorer also offers 3 Options to Start Firefox with v42, but only 2 with v41.

    0 讨论(0)
  • 2021-02-14 11:27

    Create github repository for your addon. Then get this extension:

    https://addons.mozilla.org/en-US/firefox/addon/github-extension-installer/

    Then go to your github repository with firefox on android, then make it display "desktop version of website" from firefox menu icon at top right, then click "add to firefox".

    This is by far the easiest way to get addon from your computer onto android.

    0 讨论(0)
  • 2021-02-14 11:29

    Create a html file with this code:

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
    <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
            <title>Load files</title>
            <style>
            div#links a {
                display: block;
            }
            </style>
        </head>
        <body>
        <input type="file" onchange="add(this)"/>
        <div id="links"></div>
        <script>
            function add(obj) {
                var val = obj.value;
                addLink(val);
            }
    
            function addLink(dir){
                var links = document.getElementById('links');
                var a = document.createElement('a');
                a.href = dir;
                a.text = dir;
    
                links.appendChild(a);
            }
        </script>
        </body>
        </html>
    

    Then copy the xpi files into the same folder, you can load them dynamically and then click on corresponding link.

    0 讨论(0)
  • 2021-02-14 11:32

    You can create and install Firefox extensions locally on your Android device!

    I'm creating and installing simple Firefox extensions using nothing but my Android itself, instead of hooking it to (or programming on) my PC. To install extensions without involving a USB connection:

    If you're working with an existing addon from you PC, get the xpi onto your Android device (email it to yourself if you have no other method).

    1. Using Root Explorer (even though I'm not rooted on this tablet) or Explorer, the free version (sorry, they won't let me put more than 2 links), long-press on the xpi file and choose Open With.
    2. Choose the Apps tab (3rd one) and scroll down until you see Firefox (there are 3 Firefoxes in the list - these are Intents, I think).
    3. Choose the second Firefox in the list.
    4. If you selected the correct Firefox in the list, you will see a "Tab saved in Firefox" toast - DO NOT TAP IT! If not, try the procedure again, but select a different Firefox in Root Explorer's Open With App list.
    5. After the toast, if Firefox displayed an icon on your Notification Bar, activate it. This will bring up Firefox with a new tab where you have to give your approval to install the extension. If you don't have a Notification Bar icon, just open Firefox.

    Like most things, this is much simpler to do than to explain.

    Please note, I am using Firefox for Android 42.0.1. I also use the Console 1.1.1 (by DigDug) add-on for simple debugging. I had to download the Console extension from its Github site and install it using this method because I couldn't get it to install through Firefox's regular method, nor could I get "Githib Extension Installer" to work on my system. I am using a Samsung Galaxy TabPRO SM-T900 12.2" with Android 5.1.1.

    Good luck!

    0 讨论(0)
  • 2021-02-14 11:39

    Neither ES File Explorer nor X-plore worked for me (as per Trasd's comment). I saw the three Firefox's, but none of them triggered to install the XPI.

    The solution for me was creating an installer HTML file in the same directory as the .xpi files, like the following.

    install.html:

    <html><body>
    <a href="adblockplus.xpi">ABP</a>
    <a href="flashvideodownloader.xpi">FVD</a>
    <!-- replace the above with the names of your add-ons in the same directory -->
    </body></html>
    

    Then, you can either:

    1. Enter the path to this install file directly in Firefox, e.g. file:///storage/sdcard0/MyXPIFiles/install.html
    2. Or, navigate to the file in your File Manager and open it in Firefox when prompted.

    In Firefox viewing the install.html file you created, click on each link on the page, and you should see a prompt, "Firefox prevented this add-on from installing on your device." Just click "Allow", and it should install.

    EDIT: Apologies, I see you said that navigating to a URL did not work for you. But if no one minds, I'll leave my answer here, cause it's the only one that worked for me, and maybe others too.

    0 讨论(0)
提交回复
热议问题