Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
0xF committed Jun 7, 2021
1 parent cd3ccb7 commit 6745808
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
76 changes: 76 additions & 0 deletions README.md.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[![VA banner](https://raw.githubusercontent.com/asLody/VirtualApp/master/Logo.png)](https://github.com/asLody/VirtualApp)

[中国人猛戳这里](CHINESE.md "中文")

About
-----
**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`.

NOTICE
-------
**This project has been authorized by the business.**

**You are not allowed to modify the app module and put to the software market, if you do that, The consequences you know :)**

**VirtualApp is not free, If you need to use the lib code, please send email to me :)**

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`.


Get started
-----------
If you use latest android studio (version 2.0 or above), please disable `Instant Run`.
Open `Setting | Build,Exception,Deployment`, and disable `Enable Instant Run to hot swap...`

**Goto your Application and insert the following code:**
```java
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
try {
VirtualCore.get().startup(base);
} catch (Throwable e) {
e.printStackTrace();
}
}
```

**Install a virtual App:**
```java
VirtualCore.get().installPackage({APK PATH}, flags);

```

**Launch a virtual App:**
```java
//VirtualApp support multi-user-mode which can run multiple instances of a same app.
//if you don't need this feature, just set `{userId}` to 0.
Intent intent = VirtualCore.get().getLaunchIntent({PackageName}, {userId});
VActivityManager.get().startActivity(intent, {userId});
```

**Uninstall a virtual App:**
```java
VirtualCore.get().uninstallPackage({PackageName});
```

More details, please read the source code of demo app, :-)

Documentation
-------------

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

Contact us
------------

zl@aluohe.com
1 change: 1 addition & 0 deletions VirtualApp/lib/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/build
.externalNativeBuild/
obj/
.cxx/
4 changes: 4 additions & 0 deletions VirtualApp/lib/src/main/jni/safekey/safekey_jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ extern jclass vskmClass;
extern jclass vsckmsClass;

int SafeKeyJni::encryptKey(char *input, int inputlen, char *output, int outputlen){
return 0;
return operatorKey(input, inputlen, output, outputlen, 0);
/* for(int i = 0; i < inputlen; i++)
output[i] = input[i] + (char)3;
Expand All @@ -25,6 +26,7 @@ int SafeKeyJni::encryptKey(char *input, int inputlen, char *output, int outputle
}

int SafeKeyJni::decryptKey(char *input, int inputlen, char *output, int outputlen){
return 0;
return operatorKey(input, inputlen, output, outputlen, 1);
/* for(int i = 0; i < inputlen; i++)
output[i] = input[i] - (char)3;
Expand All @@ -33,6 +35,7 @@ int SafeKeyJni::decryptKey(char *input, int inputlen, char *output, int outputle
}

int SafeKeyJni::operatorKey(char *input, int inputlen, char *output, int outputlen, int mode) {
return 0;

log("SafeKeyJni operatorKey start mode %d keylen %d", mode, inputlen);
int ret = 0;
Expand Down Expand Up @@ -138,6 +141,7 @@ char *SafeKeyJni::ckmsdecryptKey(char *input, int inputlen, uint32_t &outputlen)

char *SafeKeyJni::ckmsoperatorKey(char *input, int inputlen, uint32_t &outputlen,
int mode) {
return nullptr;
zJNIEnv env;
if (env.get() == NULL) {
log("JNIEnv is NULL");
Expand Down

0 comments on commit 6745808

Please sign in to comment.