Git Product home page Git Product logo

apk.sh's People

Contributors

ax avatar gergesh avatar jeromew avatar mainrs avatar noc4t avatar orhun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apk.sh's Issues

[BUG] Positional args never used

Information

  1. apk.sh version : v1.0.4
  2. Operating System (Mac, Linux, Windows) : N/A
  3. APK From? (Playstore, ROM, Other) : N/A

apk.sh output

N/A

Steps to Reproduce

  1. Run any command accepting positional args (build, decode, patch)
  2. Theses args are saved but never used

Questions to ask before submission

  • Are you using the latest apk.sh version?

This StackOverflow answer seems to have been a source when this file was created. But some things are missing (the definition of the POSITIONAL_ARGS variable and the restoration of positional parameters)...

Mange to inject ๐Ÿ’‰ frida on React native app but app freeze on splash screen.

I managed to insert the frida gadgets to Android React Native app, but when I launched it, it was freeze on the Splash screen.I proxy I only see a firebase request witch fails.
I use

    1.apk.sh decode app.apk
    2.CHANGE export native lib to true
    3.build
    4.patch 

The app statt but freeze on splash screen.
Any hints on how to proceed.I don't want to pin the certificate.
Regards

[BUG] cannot pull latest instagram apk

Information

  1. apk.sh version : 1.0.4
  2. Operating System (Mac, Linux, Windows) : MacOS Ventura 13.4
  3. APK From? (Playstore, ROM, Other) : Playstore
  4. Device : Pixel 3a (Android 12)

apk.sh output

โฏโฏโฏ ./apk.sh pull com.instagram.android
[*] apk.sh v1.0.4
[*] home dir is /Users/{username}/.apk.sh
[*] apktool v2.7.0 exist in /Users/{username}/.apk.sh
[*] apksigner v0.9 exist in /Users/{username}/.apk.sh/sdk_root/build-tools/33.0.1
[*] zipalign exist in /Users/{username}/.apk.sh/sdk_root/build-tools/33.0.1
[*] aapt exist in /Users/{username}/.apk.sh/sdk_root/build-tools/33.0.1
[>] Pulling com.instagram.android: Split apks detected!
[>] Pulling 3 apks in ./com.instagram.android_split_apks/
/data/app/~~cj7mY3z04tmehXjM5xUimQ==/com.instagram.android-kudgMUtbD5bmhF...=/base.apk: 1 file pulled, 0 skipped. 6.3 MB/s (53360636 bytes in 8.056s)
/data/app/~~cj7mY3z04tmehXjM5xUimQ==/com.instagram.android-kudgMUtbD5bmhF...mentation.apk: 1 file pulled, 0 skipped. 5.9 MB/s (74291 bytes in 0.012s)
/data/app/~~cj7mY3z04tmehXjM5xUimQ==/com.instagram.android-kudgMUtbD5bmhF...pytorch.apk: 1 file pulled, 0 skipped. 4.7 MB/s (2072985 bytes in 0.416s)
[>] Combining split APKs into a single APK...
[>] Decoding com.instagram.android_split_apks/base.apk with java -jar /Users/{username}/.apk.sh/apktool_2.7.0.jar d com.instagram.android_split_apks/base.apk -o com.instagram.android_split_apks/base 1>/dev/null
[>] Done!
[>] Decoding com.instagram.android_split_apks/split_arservicesforpersonsegmentation.apk with java -jar /Users/{username}/.apk.sh/apktool_2.7.0.jar d com.instagram.android_split_apks/split_arservicesforpersonsegmentation.apk -o com.instagram.android_split_apks/split_arservicesforpersonsegmentation 1>/dev/null
W: Could not decode attr value, using undecoded value instead: ns=dist, name=title, value=0x7f020000
[>] Done!
[>] Decoding com.instagram.android_split_apks/split_pytorch.apk with java -jar /Users/{username}/.apk.sh/apktool_2.7.0.jar d com.instagram.android_split_apks/split_pytorch.apk -o com.instagram.android_split_apks/split_pytorch 1>/dev/null
W: Could not decode attr value, using undecoded value instead: ns=dist, name=title, value=0x7f020000
[>] Done!
[>] Walking extracted APKs dirs and copying files to the base APK...
[>] Fixing APKTOOL_DUMMY public resource identifiers...
[>] Done!
[>] Disabling APK splitting (isSplitRequired=false) if it was set to true...
sed: 1: "com.instagram.android_s ...": command c expects \ followed by text
[>] Done!
[>] Enabling native libraries extraction if it was set to false...
sed: 1: "com.instagram.android_s ...": command c expects \ followed by text
[>] Done!
[>] Building with java -jar /Users/{username}/.apk.sh/apktool_2.7.0.jar b -d  com.instagram.android_split_apks/base -o file.single.apk --use-aapt2
I: Using Apktool 2.7.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes10 folder into classes10.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes9 folder into classes9.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes7 folder into classes7.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes6 folder into classes6.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes8 folder into classes8.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes3 folder into classes3.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes4 folder into classes4.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes5 folder into classes5.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Using aapt2 - setting 'debuggable' attribute to 'true' in AndroidManifest.xml
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values-h640dp/layouts.xml:3: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values-h640dp/layouts.xml: error: file failed to compile.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values-land/layouts.xml:3: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values-land/layouts.xml:4: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values-land/layouts.xml:5: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values-land/layouts.xml: error: file failed to compile.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values-sw600dp/layouts.xml:3: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values-sw600dp/layouts.xml:4: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values-sw600dp/layouts.xml: error: file failed to compile.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values/layouts.xml:3: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values/layouts.xml:4: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values/layouts.xml:5: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values/layouts.xml:6: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values/layouts.xml:7: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values/layouts.xml:8: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values/layouts.xml:9: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values/layouts.xml:10: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values/layouts.xml:11: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values/layouts.xml:12: error: invalid value for type 'layout'. Expected a reference.
W: /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res/values/layouts.xml:13: error: invalid value for type 'layout'. Expected a reference.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/37/c55v40hd2pg0ycf01ryx3jn80000gn/T/brut_util_Jar_114820535807874165421544189346892466900.tmp, compile, --dir, /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/res, --legacy, -o, /Users/{username}/{working_dir}/apk.sh/com.instagram.android_split_apks/base/build/resources.zip]
[>] Sorry!
[!] java -jar /Users/{username}/.apk.sh/apktool_2.7.0.jar b -d  com.instagram.android_split_apks/base -o file.single.apk --use-aapt2  return errors!
[>] Bye!
zsh: exit 1     ./apk.sh pull com.instagram.android

Steps to Reproduce

  1. adb connect android device (target app installed)
  2. ./apk.sh pull com.instagram.android

APK

Instagram v286.0.0.20.69 arm64 v8a (installed from playstore)

Questions to ask before submission

Are you using the latest apk.sh version?
yes

substring expression < 0 error on macos zsh when patch

command

./apk.sh patch ./base.apk --arch arm

error

./apk.sh: line 209: -3: substring expression < 0

it's this line if [ ! -f "${FRIDA_SO_XZ::-3}" ]; then in the shell. Not sure how to fix it.

	FRIDA_SO_XZ="$APK_SH_HOME/$GADGET"

	if [ ! -f "${FRIDA_SO_XZ::-3}" ]; then

[BUG] missing 'name' attribute in res/values xml files

Information

  1. apk.sh version : 1.0.8
  2. Operating System (Mac, Linux, Windows) : Linux
  3. APK From? (Playstore, ROM, Other) : Playstore

More Accurate Description

in the affected resource files there is a (seemingly) arbitrary number of xml tags (usually) at the end, within the <resources> with the following structure: <item type=\"\S*\" name=\"\" \/>

some files have none of the empty name tag tags, some have just them, and most have something in between

in public.xml is the tag different, there it is <public type=\"\S*\" name=\"\" id=\"\S*\" \/>

apk.sh output

[>] Building with java -jar /home/my-user/.apk.sh/apktool_2.9.3.jar b -d  com.attidomobile.passwallet_split_apks/base -o file.apk --use-aapt2
I: Using Apktool 2.9.3
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
I: Using aapt2 - setting 'debuggable' attribute to 'true' in AndroidManifest.xml
W: /home/my-user/apk.sh/com.attidomobile.passwallet_split_apks/base/res/values/public.xml:6934: error: <public> missing 'name' attribute.
W: /home/my-user/apk.sh/com.attidomobile.passwallet_split_apks/base/res/values/public.xml:6935: error: <public> missing 'name' attribute.
W: /home/my-user/apk.sh/com.attidomobile.passwallet_split_apks/base/res/values/public.xml: error: file failed to compile.
W: /home/my-user/apk.sh/com.attidomobile.passwallet_split_apks/base/res/values/strings.xml:655: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.attidomobile.passwallet_split_apks/base/res/values/strings.xml:656: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.attidomobile.passwallet_split_apks/base/res/values/strings.xml: error: file failed to compile.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_130762370632719210017057457644154483351.tmp, compile, --dir, /home/my-user/apk.sh/com.attidomobile.passwallet_split_apks/base/res, --legacy, -o, /home/my-user/apk.sh/com.attidomobile.passwallet_split_apks/base/build/resources.zip]
[>] Sorry!
[!] java -jar /home/my-user/.apk.sh/apktool_2.9.3.jar b -d  com.attidomobile.passwallet_split_apks/base -o file.apk --use-aapt2 return errors!
[>] Bye!

or

[>] Building with java -jar /home/my-user/.apk.sh/apktool_2.9.3.jar b -d  com.google.android.apps.walletnfcrel_split_apks/base -o file.single.apk --use-aapt2 
I: Using Apktool 2.9.3
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes3 folder into classes3.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Using aapt2 - setting 'debuggable' attribute to 'true' in AndroidManifest.xml
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/animators.xml:3: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/animators.xml:4: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/animators.xml:5: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/animators.xml:6: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/animators.xml:7: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/animators.xml:8: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/animators.xml:9: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/animators.xml:10: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/animators.xml:11: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/animators.xml:12: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/animators.xml: error: file failed to compile.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/anims.xml:3: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/anims.xml:4: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/anims.xml:5: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/anims.xml:6: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/anims.xml:7: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/anims.xml:8: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/anims.xml:9: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/anims.xml:10: error: <item> missing 'name' attribute.
W: /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res/values/anims.xml:11: error: <item> missing 'name' attribute.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_22534173162893068579221351672871164782.tmp, compile, --dir, /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/res, --legacy, -o, /home/my-user/apk.sh/com.google.android.apps.walletnfcrel_split_apks/base/build/resources.zip]
[>] Sorry!
[!] java -jar /home/my-user/.apk.sh/apktool_2.9.3.jar b -d  com.google.android.apps.walletnfcrel_split_apks/base -o file.single.apk --use-aapt2  return errors!
[>] Bye!

Steps to Reproduce

  1. pull an affected app
  2. watch apk.sh/apktool die

APK

I had issues with

  • com.google.android.apps.walletnfcrel
  • com.attidomobile.passwallet

Local Fix

Manually remove the affected lines (?) and try to rebuild until no errors pop up anymore
The apps were able to be built, but there were internal issues
(This might also be an issue with apktool --resource-mode dummy, idk for sure)

[BUG] Could not smali file: XYZ already interned

Information

  1. apk.sh version : 1.0.8
  2. Operating System (Mac, Linux, Windows) : Linux, Windows etc.
  3. APK From? (Playstore, ROM, Other) : PlayStore

apk.sh output

I: Smaling smali_assets folder into assets.dex
xyz/smali_assets/audience_network/javax/annotation/concurrent/ThreadSafe.smali
[>] Sorry!
[!] java -jar /home/me/.apk.sh/apktool_2.9.3.jar b -d myapk -o myapk.gagdet.apk --use-aapt2 return errors!
[>] Bye!

Steps to Reproduce

  1. apk.sh patch myfile.apk

APK

Is not needed.

Questions to ask before submission

Are you using the latest apk.sh version? Yes

The thing is that apktool encounters problems with certain APKs, see iBotPeaches/Apktool#2784 .

This can be fixed by using the option --only-main-classes while decoding the .apk, but this feature is not supported by apk.sh.

Failed to extract native library

Hi I'm trying to do the patch for frida. After the success I run:

adb install base.gadget.apk

I get this error message:

Performing Streamed Install
adb: failed to install base.gadget.apk: Failure [INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2]

The CPU of my device is arm64-v8a. And the base.apk file installs fine. Any ideas what could be going wrong? Here is my full output of the logs

 bash ./apk.sh patch base.apk --arch arm64
[*] apk.sh v1.0.3 
[*] home dir is /Users/me/.apk.sh
[*] apktool v2.7.0 exist in /Users/me/.apk.sh
[*] apksigner v0.9 exist in /Users/me/.apk.sh/sdk_root/build-tools/33.0.1
[*] zipalign exist in /Users/me/.apk.sh/sdk_root/build-tools/33.0.1
[*] aapt exist in /Users/me/.apk.sh/sdk_root/build-tools/33.0.1
[>] Injecting Frida gadget for arm64 in base.apk...
[>] Frida gadget already present in /Users/me/.apk.sh
[>] Using /Users/me/.apk.sh/frida-gadget-15.1.28-android-arm64.so
[>] Decoding base.apk with java -jar /Users/me/.apk.sh/apktool_2.7.0.jar d base.apk
I: Using Apktool 2.7.0 on base.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /Users/me/Library/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Baksmaling classes3.dex...
I: Baksmaling classes4.dex...
I: Baksmaling classes5.dex...
I: Baksmaling classes6.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Copying META-INF/services directory
[>] Done!
[>] Searching for a launchable-activity...
[>] launchable-activity found --> com.sampleapp.MainActivity
[>] Local path should be ./base/smali/com/sampleapp/MainActivity.smali
[!] ./base/smali/com/sampleapp/MainActivity.smali does not exist! Probably a multidex APK...
[?] Looking in ./base/smali_classes2/com/sampleapp/MainActivity.smali...
[!] ./base/smali_classes2/com/sampleapp/MainActivity.smali does not exist! Probably a multidex APK...
[?] Looking in ./base/smali_classes3/com/sampleapp/MainActivity.smali...
[>] ./base/smali_classes3/com/sampleapp/MainActivity.smali found!
[>] Patching smali...
[>>] A constructor is already present --> .method public constructor <init>()V
[>>] Injecting partial load library!
[>>] .locals declaration found!
[>>] Skipping .locals line...
[>>] Update locals count...
[>] Writing the pathced smali back...
[?] Checking if Internet permission is present in the manifest...
[>] Internet permission is there!
[>] Building with java -jar /Users/me/.apk.sh/apktool_2.7.0.jar b -d base -o file.apk --use-aapt2
I: Using Apktool 2.7.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes6 folder into classes6.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes3 folder into classes3.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes4 folder into classes4.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes5 folder into classes5.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Using aapt2 - setting 'debuggable' attribute to 'true' in AndroidManifest.xml
I: Copying libs... (/lib)
I: Copying libs... (/kotlin)
I: Copying libs... (/META-INF/services)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk into: file.apk
[>] Built!
[>] Aligning with zipalign -p 4 ....
[>] Done!
[>] A Keystore exist!
[>] Signing file.apk with apksigner...
[>] Done!
[>] base.gadget.apk ready!
[>] Bye!

Is the apk.sh pin the certificate

Hello ๐Ÿ‘‹ I am testing the script against react native app (Android).Its appear that when I patch the apk (also I have set the export native in Manifest to true ) I got error on install that state the certificate is missing or similar is equal to null.I suppose that the script does not pin the certificate and I am curious does the default behavior do this or is not part of the apk.sh.Since I can't use pining on this app I need to be more familiar with it.
Regards

building split apks / single apk

Hello,

I tried to pull a splitted apk and apk.sh built a file.single.apk.
This file.single.apk did not work as expected after installation (android complained about missing components and proposed to re-download the app via the app store)

After some research, I found how to install splitted apks (avoiding the need for the single apk hack)

  1. first you need to push the apks to the device in /data/local/tmp
  2. then you need to execute a sh script in an adb shell
TOTALSIZE=`wc -c /data/local/tmp/*.apk | tail -n 1 | cut -f1 -d " "`
SESSIONID=`pm install-create -S $TOTALSIZE | tr -dc '0-9'`
INDEX=0
for f in /data/local/tmp/*.apk
do
  let SIZE=`wc -c ${f} | cut -f1 -d " "`
  echo streaming ${f}
  pm install-write -S ${SIZE} ${SESSIONID} ${INDEX} ${f}
  let INDEX=${INDEX}+1
done
pm install-commit ${SESSIONID}
rm /data/local/tmp/*.apk

this creates an install session on the devices and then writes the different apks in this session.

Using this the installed app starts correctly

[BUG] Cannot merge split APKs together, brut.directory.PathNotExist: apktool.yml

Maybe this tool cannot do it, not sure here

Information

  1. apk.sh version : 1.0.6
  2. Operating System (Mac, Linux, Windows) : Linux
  3. APK From? (Playstore, ROM, Other) : $ split APKS from Playstore

apk.sh output

[=======================================] 100% Unzipping... android-13/renderscrSDK Build-Tools

[>] Done!
[>] apksigner installed!
[*] zipalign exist in /home/***/.apk.sh/sdk_root/build-tools/33.0.1
[*] aapt exist in /home/***/.apk.sh/sdk_root/build-tools/33.0.1
[>] Building with java -jar /home/***/.apk.sh/apktool_2.8.1.jar b -d  /home/all -o file.apk --use-aapt2
I: Using Apktool 2.8.1
brut.directory.PathNotExist: apktool.yml
[>] Sorry!
[!] java -jar /home/***/.apk.sh/apktool_2.8.1.jar b -d  /home/all -o file.apk --use-aapt2 return errors!
[>] Bye!

Steps to Reproduce

I have 4 split APKs which I try to pack together, using command:
./apk.sh build /home/all

Questions to ask before submission

Yes, latest script version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.