@@ -255,12 +255,21 @@ private static String installGmsInternal(Activity activity, ProgressDialog dialo
255255 return "Download gms config failed, please check your network, error: 9" ;
256256 }
257257
258+ String yalpStoreUrl = null ;
259+ try {
260+ yalpStoreUrl = jsonObject .getString ("yalp" );
261+ } catch (JSONException e ) {
262+ // ignore.
263+ Log .i (TAG , "Download gms config failed, please check your network" );
264+ }
265+
258266 updateMessage (activity , dialog , "config parse success!" );
259267
260268 File gmsCoreFile = new File (cacheDir , "gms.apk" );
261269 File gmsServiceFile = new File (cacheDir , "gsf.apk" );
262270 File storeFile = new File (cacheDir , "store.apk" );
263271 File fakeGappsFile = new File (cacheDir , "fakegapps.apk" );
272+ File yalpStoreFile = new File (cacheDir , "yalpStore.apk" );
264273
265274 // clear old files.
266275 if (gmsCoreFile .exists ()) {
@@ -303,6 +312,11 @@ private static String installGmsInternal(Activity activity, ProgressDialog dialo
303312 return "Download gms config failed, please check your network, error: 13" ;
304313 }
305314
315+ if (yalpStoreUrl != null ) {
316+ downloadFile (yalpStoreUrl ,yalpStoreFile ,
317+ (progress -> updateMessage (activity , dialog , "download yalp store.." + progress + "%" )));
318+ }
319+
306320 updateMessage (activity , dialog , "installing gms core" );
307321 InstallResult installResult = VirtualCore .get ().installPackage (gmsCoreFile .getAbsolutePath (), InstallStrategy .UPDATE_IF_EXIST );
308322
@@ -328,6 +342,11 @@ private static String installGmsInternal(Activity activity, ProgressDialog dialo
328342 return "install gms xposed module failed: " + installResult .error ;
329343 }
330344
345+ if (yalpStoreFile .exists ()) {
346+ updateMessage (activity , dialog , "installing yalp store..." );
347+ VirtualCore .get ().installPackage (yalpStoreFile .getAbsolutePath (), InstallStrategy .UPDATE_IF_EXIST );
348+ }
349+
331350 // Enable the Xposed module.
332351 File dataDir = VEnvironment .getDataUserPackageDirectory (0 , "de.robv.android.xposed.installer" );
333352 File modulePath = VEnvironment .getPackageResourcePath (FAKE_GAPPS_PKG );
0 commit comments