Aefyr / SAI

Android split APKs installer
GNU General Public License v3.0
2.48k stars 251 forks source link

Install OBB files #213

Closed arielquadros closed 3 years ago

arielquadros commented 3 years ago

Hello, is there a possibility to install OBB apps? Do you do freelance work?

zhongqingsong commented 3 years ago

The obb is usually in getObbDir(), but it's not 100%, some game will save obb in another dir. So, auto install obb will bring some risk. But Fortunately, the XAPK's obb has common rule, In theory, it can come true: when we open the xapk as a ZipFile, we can see that. If xapk has path like "com.XXX.xapk\Android\obb\pkgName\XXX.obb", we can 100% confirm the obb is the Normal Path. It means we can do it. So there are some Pseudocode.

String gamePkg = "The app's package name we can find it in xml"; String wantedPath = "Android\obb\"+gamePkg+"\.....obb"; if (!checkPathIsInXapk(wantedPath)){ return; // check xapk whether has the desired path, if not, we can't ensure the obb's path,just exit } File folder = new File(Environment.getExternalStoragePublicDirectory("Android") + "/obb/" + gamePkg); if (!folder.exists()){ folder.mkdir(); } // unzip the xapk , get the obb file File obbFile = unzipXapk(); // we copy the obb to the folder , then we done! copyObbFile2WantedPath(folder);

arielquadros commented 3 years ago

Hi, thanks for reply. Do you know to make this work on SAI project? Do you accept a freelancer to make this? Have a contact? email, skype, discord, etc.

github-actions[bot] commented 3 years ago

This issue hasn't had any activity for the last 60 days and will be automatically closed in 7 days from now