Context ctx = getApplicationContext();
PackageManager pm = ctx.getPackageManager();
String pn = ctx.getPackageName();//包名
PackageInfo pi = pm.getPackageInfo(pn, 0);
long code = pi.getLongVersionCode();
String appName = pi.versionName;
File file = getDatabasePath("test");
String path = file.getPath();
// /data/user/0/com.jay.myappstudy/databases/test