Se pueden modificar e instalar split Apks con Adb - sin solución

Todavía sin solución.  

29-1

Desde apkpure descargue una versión de solo un apk, modifique código

firmé con uber signer e instalé con exito. Solución a medias.

https://m.apkpure.com 

 

Probé el instalador SAI.

https://play.google.com/store/apps/details?id=com.aefyr.sai

sin resultados.

Actualización: 

28-1

{

Android 7.0 introduces APK Signature Scheme v2, a new app-signing scheme that offers faster app install times and more protection against unauthorized alterations to APK files (See here and here for more details). Therefore, Google implemented their own apk signer called apksigner (duh!) The script file can be found in %ANDROID_HOME%/sdk/build-tools/24.0.3/ (the .jar is in the /lib subfolder). Use it like this

apksigner sign --ks-key-alias alias_name --ks my.keystore my-app.apk
 
Por lo tanto no utilizar jarsigner para las firmas. 

 }

Primero leí

 https://apk4all.com/android/how-to-combine-split-apks-into-one/

 en el cúal se combinan manualmente, pero luego encontre

este comando de adb que permite instalar los split apks de una sola vez.

ej.

adb install-multiple base.apk split_config.es.apk split_config.xxhdpi.apk split_config.arm64_v8a.apk


el problema es si modificamos el código y volvemos a firmar los apks nos da error :

adb: failed to finalize session
Failure [INSTALL_FAILED_INVALID_APK: /data/app/vmdl717492708.tmp/split_config.es.apk signatures are inconsistent]

no se puede hacer jarsign de cada apk por separado.sin antes decompilar con apktool.

Intenté con:

https://github.com/patrickfav/uber-apk-signer

 

Con Apktool 2.6 decompile, cambie datos del base.apk, build los 4 apks.

luego firmé con uber. Instalé con install-multiple , pero al intentar abrir la app no funciona.

 

Faltaría probar firmar con jarsigner reeplicando los pasos anteriores. no funciona.

 

$ apktool b base -o base.apk
I: Using Apktool 2.4.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes3 folder into classes3.dex...
I: Checking whether sources has changed...
I: Smaling smali_assets folder into assets.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
W: /home/lolo/ApkProjects/wardencam/base/AndroidManifest.xml:19: error: No resource identifier found for attribute 'preserveLegacyExternalStorage' in package 'android'
W:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_6011416972201449701.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 30, --version-code, 359, --version-name, 2.8.9, --no-version-vectors, -F, /tmp/APKTOOL11012886886736071916.tmp, -e, /tmp/APKTOOL18120623778602986224.tmp, -0, arsc, -I, /home/lolo/.local/share/apktool/framework/1.apk, -S, /home/lolo/ApkProjects/wardencam/base/res, -M, /home/lolo/ApkProjects/wardencam/base/AndroidManifest.xml]

borré:

linea 19

android:requestLegacyExternalStorage="true"


(base) root@pink:/home/lolo/pt# ./adb install-multiple base.apk split_config.es.apk split_config.xxhdpi.apk split_config.arm64_v8a.apk
adb: failed to finalize session
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl1174325525.tmp/base.apk: Attempt to get length of null array]

 ./adb shell pm list packages | grep war

 ./adb shell pm path com.warden.cam


./adb pull /data/app/com.warden.cam-fTopRtghap8jlMdGtf-s3w==/base.apk
./adb pull /data/app/com.warden.cam-fTopRtghap8jlMdGtf-s3w==/split_config.arm64_v8a.apk
./adb pull /data/app/com.warden.cam-fTopRtghap8jlMdGtf-s3w==/split_config.es.apk
./adb pull /data/app/com.warden.cam-fTopRtghap8jlMdGtf-s3w==/split_config.xxhdpi.apk


java -jar uber-apk-signer.jar --apks /path/to/apks


java -jar apktool.jar d base.apk

java -jar apktool.jar d split_config.arm64_v8a.apk

java -jar apktool.jar d split_config.es.apk

java -jar apktool.jar d split_config.xxhdpi.apk

build

java -jar apktool.jar b base -o   base.apk

java -jar apktool.jar b split_config.arm64_v8a -o   split_config.arm64_v8a.apk

java -jar apktool.jar b split_config.es -o   split_config.es.apk

java -jar apktool.jar b split_config.xxhdpi  -o   split_config.xxhdpi.apk


jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore keystore.keystore base.apk alias
 
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore keystore.keystore split_config.arm64_v8a.apk alias

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore keystore.keystore split_config.es.apk alias
   
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore keystore.keystore   split_config.xxhdpi.apk alias


(base) root@pink:/home/lolo/pt# ./adb install-multiple base.apk split_config.es.apk split_config.xxhdpi.apk split_config.arm64_v8a.apk
adb: failed to finalize session
Failure [INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2]

Entradas populares