未知的呼叫包名 xxx

作者: totoR13创建于 2021年2月15日更新于 2021年2月15日

Dear all, I created a new Android project by importing DroidPlugin as a module. I'm trying the DroidPlugin virtualization tool with different apps and for several of them (e.g., https://apkpure.com/it/puzzle/br.com.cjdinfo.puzzle or https://apkpure.com/it/italian-soccer-2020-2021/com.jappit.calcio) I received an error like this: E/MyCrashHandler: uncaughtExceptionjava.lang.SecurityException: Unknown calling package name 'br.com.cjdinfo.puzzle'. at android.os.Parcel.readException(Parcel.java:1683) at android.os.Parcel.readException(Parcel.java:1636) at ks.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:49) at kp.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:2) at kr.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:3) at ki.c(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:6) at kl.handleMessage(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:27) at android.os.Handler.dispatchMessage(Handler.java:102) at pg.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0) at pg.dispatchMessage(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0) at android.os.Looper.loop(Looper.java:154) at android.os.HandlerThread.run(HandlerThread.java:61) It seems that the proxy object doesn't work as expected: the tool does not change the plugin package name with the container one for system calls (e.g. like startActivity() call). Below I add some details about my configuration:

MainActivity public class MainActivity extends AppCompatActivity { [...] @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String apkPath = [...]; doInstall(new File(apkPath)); } private void doInstall(final File apkPath) { try { Activity activity = this; final PackageInfo info = getPackageManager().getPackageArchiveInfo(apkPath.getAbsolutePath(), PackageManager.GET_ACTIVITIES); if (info == null) { // handle error return; } final int re = PluginManager.getInstance().installPackage(apkPath.getAbsolutePath(), PackageManagerCompat.INSTALL_REPLACE_EXISTING); switch (re) { case PluginManager.INSTALL_FAILED_NO_REQUESTEDPERMISSION: Toast.makeText(activity, "Installation failed. Plugin app has too permissions.\n", Toast.LENGTH_SHORT).show(); break; case INSTALL_FAILED_NOT_SUPPORT_ABI: Toast.makeText(activity, "No supported ABI.\n", Toast.LENGTH_SHORT).show(); break; … } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } }

内容来源: DroidPluginTeam/DroidPlugin