در این مطلب از نرم افزار (SAP (Split Apk Packer رونمایی می شود که بوسیله آن میتوانید فایل های XAPK و APKs را به یک فایل APK تبدیل کنید. (سطح آموزش: پیشرفته)

خلاصه مطلب: در این مطلب لینک دانلود SAP و نحوه کار با نرم افزار تشریح شده اما با توجه زمان زیادی که برای فرآیند تبدیل xapk به apk صرف می شود، استفاده از این نرم افزار بصورت کلی پیشنهاد نمی شود و توصیه من همچنان استفاده از نسخه apk قبلی برنامه ها در نرم افزار apkpure است.

XAPK چیست؟

همه چیز از اینجا شروع شد که گوگل پلی یک قابلیت جدید برای توسعه دهندگان قرار داد تا بجای اینکه فایل APK را بارگذاری کنند، باندل(bundle)  آپلود کنند. باندل یک خروجی از کد اندروید با فرمت aar است که این امکان را به گوگل پلی می دهد تا از روی آن فایل های apk مختلف برای هر دستگاه بسازد. به همین خاطر ممکن است شما یک برنامه اندروید با دستگاه خودتان از پلی استور دانلود کنید، اما آن برنامه روی دستگاه دوستتان نصب نشود! چون گوگل پلی هنگام نصب برنامه توسط کاربران، با استفاده از باندل، برای هر دستگاه یک فایل apk متفاوت با حجم کمتر ارائه می کند. 

استفاده از باندل با هدف کم کردن حجم اپ، روز به روز در پلی استور بیشتر شده و باعث ایجاد مشکل جدیدی در فرایند ویرایش اپلیکیشن ها شده است. بنابراین نسخه ای از برنامه که شما ویرایش میکنید  ممکن است در دستگاه سایر کاربران نصب نشود.

حال XAPK چیست؟ درواقع xapk یک فایل زیپ شده است که چندین apk دیگر درون آن قرار دارند.

با استفاده از نرم افزار SAP میتوان فایل های مجزای درون یک xapk را ادغام کرد و به یک apk تبدیل کرد.

 

نحوه عملکرد برنامه SAP

این برنامه apkهای داخل یک فایل xapk را استخراج کرده، با apktool دیکامپایل کرده و سپس آن ها را باهم ترکیب میکند و در نهایت یک فایل apk تحویل می دهد.

نحوه استفاده:

دو روش برای ایجاد یک پروژه  وجود دارد:

  • - دکمه "Directory" برای انتخاب پوشه ای که شامل apkهای تقسیم شده برای ادغام است.
  • - دکمه «Archive» برای انتخاب فایل xapk با یکی از فرمت های ZIP .apks ، .xapk ، .zip.

توجه کنید که بعد از انتخاب فایل xapk ابتدا نرم افزار SAP فایل شما را طی حدود 30ثانیه تا دو دقیقه بررسی کرده و سپس میتوانید دکمه "start" را فعال کنید.
در صورت موفقیت در ساخت ، APK حاصل در پوشه «build» قرار میگیرد.

امکانات اضافی:

wrokers:  تعداد هسته هایی از cpu که میخواهید درگیر این پردازش شود.
sign: اگر میخواهید فایل apk شما بعد از ساخته شدن خودکار ساین شود میتوانید این گزینه را تیک بزنید.(البته باید مشخصات کی استور خود را از دکمه keystore وارد کنید)

درصورتی که نمیخواهید از گزینه ساین استفاده کنید، میتوانید خودتان بعدا با apksigner برنامه را ساین کنید.

 

لینک دانلود

لینک دانلود SAP از گوگل درایو

 

لینک دانلود SAP از Box

 

 

منبع: ‌andnixsh

توضیحات انگلیسی را در ادامه میتوانید از زبان برنامه نویس آن مطالعه کنید.

 


English

SAP (Split APKs Packer)
Requirements: JRE/OpenJDK 1.8 or above
Overview: A simple and fast tool to transform Android App Bundles into single Android Packages.
Image

HOW IT WORKS
SAP uses Apktool to decode the resources of the files included in the bundle to be processed.
Then it merges all these files into the base package folder before adjusting and correcting them.
Apktool is used to build the single package, Uber-APK-Signer for zipAlign/sign processes.
SAP doesn't work on dynamic features but configuration modules only.

INFO:
SAP is a portable application ; all files present in its folder are necessary.
For better overall compatibility sap is a 32-bit compiled binary ;)
Two versions are available:
- for Windows OS ; tested working fine with Wine.
- for Linux based OS.

REQUIREMENTS:
The two fonts provided must be installed.
JRE/OpenJDK 1.8 or above ; Java binaries folder must be present in the system PATH.

USAGE:
Two ways to create a project:
- with « Directory » button to choose the folder that contains the split packages to merge.
    SAP will work inside.
- with « Archive » button to choose a ZIP archive (.apks, .xapk, .zip).
    SAP will extract its content in a new folder next to it (archive_name_SAP_Project) and work inside.
SAP check the validity of the bundle then « Select » and « Start » buttons are enabled.
If build succeeded the resulting APK will be found in the « build » folder inside the project directory with the log file.

FEATURES:
« Select » button allows to customize the project by selecting the wanted split packages:
    - multi-selection and selection of several ranges of items are possible with CTRL key and mouse.

Image

« Workers » spinner defines the number of concurrent threads to be created for decodings:
- the maximum number is defined by the number of CPUs.
« Sign » checkbox allows the resulting APK to be zip-aligned and signed:
- a debug key is used by default. A custom key can be imported thanks to « Keystore » button.

Image
 
An obfuscated config file is created that contains the parent directory of the last project and the few settings used:
- it is updated when a custom keystore is imported and when the app is exited.
A log file is created inside the project folder:
- it is moved into « build » folder at the end of the successful process.
« Start » button will launch the process:
- split packages decoding.
During decoding « Start » button is changed to « Cancel » that allows to abandon the project.
- SAP works on decoded files
- finally it try to build a single package.
SAP tool allows to merge new split packages with an already SAP repacked APK.

MANUAL MODE:
If build failed, SAP switch to « Manual Mode »:
- the « Start » button is changed to « Build » and allows to retry after manual changes.
- Most of fails are due to not well-formed xml files. Apktool warnings in the log file will help to create fix(es).
The failed project can be abandoned and reopened later.
If the project consists of a single file which is already a SAP repacking, it is automatically decoded.
SAP then switches to « Manual Mode » to allow modding.

CREDITS:
Kirlif' - Release APK
Connor Tumbleson & Ryszard Wisniewski for Apktool: https://github.com/iBotPeaches/Apktool
Patrick Favre-Bulle for Uber Apk Signer: https://github.com/patrickfav/uber-apk-signer
Souradip Mookerjee for unapkm: https://github.com/souramoo/unapkm
Kay Hayen and Nuitka Organization for Nuitka: https://github.com/Nuitka/Nuitka
Markus Oberhumer, Laszlo Molnar & John Reiser for UPX: https://github.com/upx/upx

NOTE:
Feel free to manually import the « config » file from your previous version.

CONTACT:

sap_dev@tuta.io
 
VIDEO TUTORIAL:
 
 
resource: