Skip to content

Commit

Permalink
Merge pull request #880 from android-hacker/64bit
Browse files Browse the repository at this point in the history
64bit app support
  • Loading branch information
tiann authored Jul 11, 2020
2 parents effcb5e + f5b0cb2 commit a1e2b2a
Show file tree
Hide file tree
Showing 14 changed files with 660 additions and 272 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,4 @@ Credits

1. [VirtualApp](https://github.com/asLody/VirtualApp)
2. [Xposed](https://github.com/rovo89/Xposed)
3. [And64InlineHook](https://github.com/Rprop/And64InlineHook)
6 changes: 3 additions & 3 deletions VirtualApp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ android {
applicationId "io.va.exposed"
minSdkVersion 21
targetSdkVersion 23
versionCode 182
versionName "0.18.2"
versionCode 190
versionName "0.19.0"
multiDexEnabled false
android {
defaultConfig {
ndk {
abiFilters "armeabi-v7a", "x86"
abiFilters "arm64-v8a", "x86_64"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public void onBindViewHolder(ViewHolder holder, int position) {
holder.itemView.setOnClickListener(v -> {
mItemEventListener.onItemClick(info, position);
});
holder.itemView.setEnabled(info.is64bit);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ public class AppInfo {
public CharSequence version;
public int cloneCount;
public boolean disableMultiVersion;
public boolean is64bit;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.lody.virtual.GmsSupport;
import com.lody.virtual.client.core.InstallStrategy;
import com.lody.virtual.client.core.VirtualCore;
import com.lody.virtual.helper.compat.NativeLibraryHelperCompat;
import com.lody.virtual.helper.utils.DeviceUtil;
import com.lody.virtual.remote.InstallResult;
import com.lody.virtual.remote.InstalledAppInfo;
Expand Down Expand Up @@ -200,6 +201,7 @@ private List<AppInfo> convertPackageInfoToAppData(Context context, List<PackageI
info.disableMultiVersion = true;
info.cloneCount = 0;
}
info.is64bit = NativeLibraryHelperCompat.isApk64(ai.sourceDir);
list.add(info);
}
// sort by name
Expand Down
2 changes: 1 addition & 1 deletion VirtualApp/lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
versionName "1.0"
externalNativeBuild {
ndkBuild {
abiFilters "armeabi-v7a", "x86"
abiFilters "arm64-v8a", "x86_64"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,7 @@ private static Set<String> getABIsFromApk(String apk) {
return null;
}

public static boolean isApk64(String apk) {
return isVM64(getABIsFromApk(apk));
}
}
Loading

0 comments on commit a1e2b2a

Please sign in to comment.