GithubHelp home page GithubHelp logo

03050903 / virtualapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aslody/virtualapp

0.0 2.0 1.0 26.91 MB

An open source implementation of MultiAccount.

License: GNU Lesser General Public License v3.0

Java 100.00%

virtualapp's Introduction

VA banner

中文

About

Likes LBE Parallel Space, VirtualApp is an open platform for Android that allows you to create a Virtual Space, you can install and run apk inside. Beyond that, VirtualApp is also a Plugin Framework, the plugins running on VirtualApp does not require any constraints. VirtualApp does not require root, it is running on the local process.

Background

VirtualApp was born in early 2015, Originally, it is just a simple plugin framework, But as time goes on, the compatibility of it is getting better and better. in the end, it evolved into a Virtual Container.

Join our group

QQ Group: 553070909

Get started

  1. VirtualApp use the @hide API, so you must use our android.jar replace the old one (Android-SDK/platforms/android-23/{android.jar}).

  2. Include the following attributes in your AndroidManifest.xml:

    <permission
        android:name="com.lody.virtual.permission.VIRTUAL_BROADCAST"
        android:protectionLevel="signature" />
    <uses-permission android:name="com.lody.virtual.permission.VIRTUAL_BROADCAST" />
    <service android:name="com.lody.virtual.client.stub.KeepService" android:process=":x"/>
    <provider
            android:process=":x"
            android:authorities="virtual.service.BinderProvider"
            android:name="com.lody.virtual.service.BinderProvider"
            android:exported="false" />
    <activity
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:name="com.lody.virtual.client.stub.ShortcutHandleActivity" android:exported="true"/>        
    <activity
            android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
            android:name="com.lody.virtual.client.stub.StubActivity$C0" android:process=":p0" >
            <meta-data android:name="X-Identity" android:value="Stub-User"/>
    </activity>
    <provider
            android:process=":p0"
            android:authorities="virtual.client.stub.StubContentProvider0"
            android:name="com.lody.virtual.client.stub.StubContentProvider$C0"
            android:exported="false">
            <meta-data android:name="X-Identity" android:value="Stub-User"/>
    </provider>
    <!--and so on-->
  1. Add all permissions your host and your plugins need to use.

  2. Goto your Application and insert the following code:

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        try {
            VirtualCore.getCore().startup(base);
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    public void onCreate() {
        super.onCreate();
        VirtualCore.getCore().handleApplication(this);
        if (!VirtualCore.getCore().isVAppProcess()) {
            // Do some thing...
        }
    }
  1. For Install a virtual App, use this function:
    VirtualCore.getCore().installApp({APK PATH}, flags);
    
    //flags values
    
    public interface InstallStrategy {
	    int TERMINATE_IF_EXIST = 10;
	    int UPDATE_IF_EXIST = 11;
	    int COMPARE_VERSION = 12;
	    int IGNORE_NEW_VERSION = 13;
    }
    
  1. For Launch a virtual App, use this function:
    VirtualCore.getCore().launchApp({PackageName});
  1. For uninstall a virtual App, use this function:
    VirtualCore.getCore().uninstallApp({PackageName});
  1. If you need to get the details of App, use this function:
    VirtualCore.getCore().findApp({PackageName});

Documentation

VirtualApp currently has no documentation, If you are interested in VirtualApp,please send email to me.

License

LGPL 3.0

About Author

virtualapp's People

Contributors

dodola avatar dstmath avatar flyer88 avatar

Watchers

 avatar  avatar

Forkers

quincyc379

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.