refactor: remove legacy BlackBox app shell

This commit is contained in:
Mahdi Karzari
2026-07-20 04:25:09 +03:30
parent 165c014d75
commit bf5f73e07a
154 changed files with 217 additions and 7140 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ static const char* blocked_files[] = {
"/data/data/com.lbe.parallel",
"/data/data/com.dual.dualspace",
"/data/data/com.ludashi.superboost",
"/data/data/top.niunaijun.blackboxa",
"/data/data/com.qm4rs.fridabox",
"/blackbox",
"/virtual",
@@ -1138,7 +1138,7 @@ public class BlackBoxCore extends ClientConfiguration {
try {
if (packageName.equals(getHostPkg())) {
return new InstallResult().installError("Cannot clone BlackBox app from within BlackBox. This would create infinite recursion and is not allowed for security reasons.");
return new InstallResult().installError("Cannot clone FridaBox from inside its own workspace. This would create infinite recursion and is not allowed for security reasons.");
}
PackageInfo packageInfo = getPackageManager().getPackageInfo(packageName, 0);
@@ -1156,7 +1156,7 @@ public class BlackBoxCore extends ClientConfiguration {
if (packageInfo != null) {
String packageName = packageInfo.packageName;
if (packageName.equals(getHostPkg())) {
return new InstallResult().installError("Cannot clone BlackBox app from within BlackBox. This would create infinite recursion and is not allowed for security reasons.");
return new InstallResult().installError("Cannot clone FridaBox from inside its own workspace. This would create infinite recursion and is not allowed for security reasons.");
}
}
} catch (Exception e) {
@@ -2126,7 +2126,7 @@ public class BlackBoxCore extends ClientConfiguration {
}
builder.setSmallIcon(android.R.drawable.stat_notify_error)
.setContentTitle("BlackBox Log Upload Failed")
.setContentTitle("FridaBox Log Upload Failed")
.setContentText(error)
.setAutoCancel(true);
@@ -2157,7 +2157,7 @@ public class BlackBoxCore extends ClientConfiguration {
}
builder.setSmallIcon(android.R.drawable.stat_sys_upload_done)
.setContentTitle("BlackBox Log Upload")
.setContentTitle("FridaBox Log Upload")
.setContentText("Logs sent successfully")
.setAutoCancel(true);
@@ -506,8 +506,8 @@ public class BPackageManager extends BlackManager<IBPackageManagerService> {
String packageName = packageInfo.packageName;
String hostPackageName = BlackBoxCore.getHostPkg();
if (packageName.equals(hostPackageName)) {
Log.w(TAG, "Attempt to install BlackBox app detected and blocked: " + packageName);
return new InstallResult().installError("Cannot clone BlackBox app from within BlackBox. This would create infinite recursion and is not allowed for security reasons.");
Log.w(TAG, "Attempt to install the FridaBox host app was blocked: " + packageName);
return new InstallResult().installError("Cannot clone FridaBox from inside its own workspace. This would create infinite recursion and is not allowed for security reasons.");
}
}
} catch (Exception e) {
@@ -768,8 +768,8 @@ public class IActivityManagerProxy extends ClassInvocationStub {
public static class getCurrentUser extends MethodHook {
@Override
protected Object hook(Object who, Method method, Object[] args) throws Throwable {
Object blackBox = BRUserInfo.get()._new(BActivityThread.getUserId(), "BlackBox", BRUserInfo.get().FLAG_PRIMARY());
return blackBox;
Object fridaBox = BRUserInfo.get()._new(BActivityThread.getUserId(), "FridaBox", BRUserInfo.get().FLAG_PRIMARY());
return fridaBox;
}
}
@@ -57,7 +57,7 @@ public class IDevicePolicyManagerProxy extends BinderInvocationStub {
@Override
protected Object hook(Object who, Method method, Object[] args) throws Throwable {
return "BlackBox";
return "FridaBox";
}
}
@@ -66,7 +66,7 @@ public class IDevicePolicyManagerProxy extends BinderInvocationStub {
@Override
protected Object hook(Object who, Method method, Object[] args) throws Throwable {
return "BlackBox";
return "FridaBox";
}
}
@@ -48,8 +48,8 @@ public class IUserManagerProxy extends BinderInvocationStub {
public static class GetProfileParent extends MethodHook {
@Override
protected Object hook(Object who, Method method, Object[] args) throws Throwable {
Object blackBox = BRUserInfo.get()._new(BActivityThread.getUserId(), "BlackBox", BRUserInfo.get().FLAG_PRIMARY());
return blackBox;
Object fridaBox = BRUserInfo.get()._new(BActivityThread.getUserId(), "FridaBox", BRUserInfo.get().FLAG_PRIMARY());
return fridaBox;
}
}
@@ -45,7 +45,7 @@ public class IWifiManagerProxy extends BinderInvocationStub {
WifiInfo wifiInfo = (WifiInfo) method.invoke(who, args);
BRWifiInfo.get(wifiInfo)._set_mBSSID("ac:62:5a:82:65:c4");
BRWifiInfo.get(wifiInfo)._set_mMacAddress("ac:62:5a:82:65:c4");
BRWifiInfo.get(wifiInfo)._set_mWifiSsid(BRWifiSsid.get().createFromAsciiEncoded("BlackBox_Wifi"));
BRWifiInfo.get(wifiInfo)._set_mWifiSsid(BRWifiSsid.get().createFromAsciiEncoded("FridaBox_Wifi"));
return wifiInfo;
}
@@ -139,9 +139,7 @@ public class WebViewProxy extends ClassInvocationStub {
String userAgent = settings.getUserAgentString();
if (userAgent != null && !userAgent.contains("BlackBox")) {
settings.setUserAgentString(userAgent + " BlackBox");
}
// Keep the guest's original user-agent; host branding must not leak into it.
try {
@@ -15,7 +15,7 @@ import top.niunaijun.blackbox.utils.Slog;
public class ProxyVpnService extends VpnService {
private static final String TAG = "ProxyVpnService";
private static final int NOTIFICATION_ID = 1001;
private static final String CHANNEL_ID = "BlackBoxVPN";
private static final String CHANNEL_ID = "FridaBoxVPN";
private ParcelFileDescriptor mVpnInterface = null;
private boolean mIsEstablished = false;
@@ -74,10 +74,10 @@ public class ProxyVpnService extends VpnService {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel channel = new NotificationChannel(
CHANNEL_ID,
"BlackBox VPN Service",
"FridaBox VPN Service",
NotificationManager.IMPORTANCE_LOW
);
channel.setDescription("VPN service for BlackBox network access");
channel.setDescription("VPN service for FridaBox network access");
channel.setShowBadge(false);
NotificationManager notificationManager = getSystemService(NotificationManager.class);
@@ -98,7 +98,7 @@ public class ProxyVpnService extends VpnService {
}
return builder
.setContentTitle("BlackBox VPN Active")
.setContentTitle("FridaBox VPN Active")
.setContentText("Managing network access for sandboxed apps")
.setSmallIcon(android.R.drawable.ic_dialog_info)
.setOngoing(true)
@@ -124,7 +124,7 @@ public class ProxyVpnService extends VpnService {
Builder builder = new Builder();
builder.setSession("BlackBox VPN");
builder.setSession("FridaBox VPN");
builder.addAddress("10.0.0.2", 32);
@@ -140,7 +140,7 @@ public class ProxyVpnService extends VpnService {
builder.addAllowedApplication(getPackageName());
builder.setSession("BlackBox Internet Access");
builder.setSession("FridaBox Internet Access");
Slog.d(TAG, "VPN builder configured, establishing interface...");
@@ -210,7 +210,7 @@ public class ProxyVpnService extends VpnService {
Slog.e(TAG, "Error in network monitoring: " + e.getMessage());
}
}
}, "BlackBoxNetworkHandler");
}, "FridaBoxNetworkHandler");
mNetworkThread.start();
Slog.d(TAG, "Network handling thread started");