Todo esto está hecho con prueba y error y alguna copia de script, sólo tengo vagos conocimientos de bash y absolutamente ninguna idea de lo que estoy arriesgando. Todo se hace con copias de seguridad y reflashes cuidadosos.
#!/sbin/sh
#
# /system/addon.d/77-MyApps.sh
#
# During a dirty flash, this script will backup files and apps at /system/*
# /system is formatted and reinstalled, then the files are restored.
#
. /tmp/backuptool.functions
list_files() {
cat <<EOF
app/ActionLauncher/base.apk
app/Dropbox/lib/arm/libblasV8.so
app/Dropbox/lib/arm/libDummyArchIndicator.so
app/Dropbox/lib/arm/librsjni.so
app/Dropbox/lib/arm/libRSSupport.so
app/Dropbox/base.apk
app/Eventbrite/base.apk
app/Flud/lib/arm/libclient.so
app/Flud/base.apk
app/GCalendar/base.apk
app/GMail/base.apk
app/GoogleCamera/lib/arm/libgcam.so
app/GoogleCamera/lib/arm/libgcam_swig_jni.so
app/GoogleCamera/lib/arm/libjni_pegutil.so
app/GoogleCamera/lib/arm/libjni_tinyplanet.so
app/GoogleCamera/lib/arm/libjpeg.so
app/GoogleCamera/lib/arm/liblightcycle.so
app/GoogleCamera/lib/arm/libnativehelper_compat_libc++.so
app/GoogleCamera/lib/arm/librefocus.so
app/GoogleCamera/lib/arm/librs.layered_filter_fast_f32.so
app/GoogleCamera/lib/arm/librsjni.so
app/GoogleCamera/lib/arm/libRSSupport.so
app/GoogleCamera/base.apk
app/GPlus/lib/arm/libcrashreporter.so
app/GPlus/lib/arm/libcronet.so
app/GPlus/lib/arm/libframesequence.so
app/GPlus/lib/arm/libphotoeditor_native.so
app/GPlus/lib/arm/libwebp_android.so
app/GPlus/base.apk
app/GPSStatus/base.apk
app/Greenify/base.apk
app/HereMaps/lib/arm/libCertResourcesPkg.so
app/HereMaps/lib/arm/libcrypto_here.so
app/HereMaps/lib/arm/libdatabase_sqlcipher.so
app/HereMaps/lib/arm/gnustl_shared.so
app/HereMaps/lib/arm/libLohitIndicFontPkg.so
app/HereMaps/lib/arm/libMapsEngineResourcePkg.so
app/HereMaps/lib/arm/libMAPSJNI.so
app/HereMaps/lib/arm/libNanumGothicFontPkg.so
app/HereMaps/lib/arm/libNuanceVocalizer.so
app/HereMaps/lib/arm/libposclient.so
app/HereMaps/lib/arm/libPureArabicFontPkg.so
app/HereMaps/lib/arm/libPureChineseFontPkg.so
app/HereMaps/lib/arm/libPureIndicSouthFontPkg.so
app/HereMaps/lib/arm/libPureThaiFontPkg.so
app/HereMaps/lib/arm/libSdkResourcePkg.so
app/HereMaps/lib/arm/libsqlcipher_android.so
app/HereMaps/lib/arm/libssl_here.so
app/HereMaps/lib/arm/libstlport_shared.so
app/HereMaps/base.apk
app/Keep/lib/arm/libsketchology_native.so
app/Keep/base.apk
app/KernelAdiutor/base.apk
app/Orbot/lib/arm/libtun2socks.so
app/Orbot/base.apk
app/Photos/lib/arm/libcrashreporterer.so
app/Photos/lib/arm/libfilterframework_jni.so
app/Photos/lib/arm/libcronet.so
app/Photos/lib/arm/libnative.so
app/Photos/lib/arm/framesequence.so
app/Photos/lib/arm/moviemaker-jni.so
app/Photos/base.apk
app/PlayGames/lib/arm/libgames_rtmp_jni.so
app/PlayGames/base.apk
app/PlayMusic/base.apk
app/Shuttle/base.apk
app/Polycon/base.apk
app/SEftp/base.apk
app/SolidExplorer/lib/arm/lib7z.so
app/SolidExplorer/lib/arm/libgif.so
app/SolidExplorer/base.apk
app/Webview/lib/arm/libwebviewchromium.so
app/Webview/base.apk
app/XDALabs/lib/arm/librealm-jni.so
app/XDALabs/base.apk
app/Xposed/base.apk
app/Youtube/lib/arm/libambisonic_audio_renderer.so
app/Youtube/lib/arm/libcronet.so
app/Youtube/lib/arm/libfilterframework_jni.so
app/Youtube/lib/arm/libluajit.so
app/Youtube/lib/arm/libm2ts_player.so
app/Youtube/lib/arm/libmoxie.so
app/Youtube/lib/arm/libmoxieclient.so
app/Youtube/lib/arm/librsjni.so
app/Youtube/lib/arm/libRSSupport.so
app/Youtube/lib/arm/libvpx.so
app/Youtube/lib/arm/libvpxJNI.so
app/Youtube/lib/arm/libvrtoolkit.so
app/Youtube/lib/arm/libwebp_android.so
app/Youtube/base.apk
EOF
}
case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/$FILE
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/$FILE $R
done
rm -rf /system/app/Chromium
rm -rf /system/app/Email
rm -rf /system/app/Calendar
rm -rf /system/app/webview
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Stub
;;
esac
He improvisado este script para hacer una copia de seguridad del mío (después de mucho reflashear y restaurar) y eliminar algunas alternativas de AOSP. Parece que hay que escribir el código que se va a ejecutar después de flashear por ahí ( webview
es de la antigua AOSP, mientras que Webview
es un lío más racionalizado). La plantilla está tomada de XDA con respecto a grinder777. Si esto funciona, regálate una tablet de chocolate y envíale (¿a ella?) un agradecimiento. Si no lo hace, no tengo idea de lo que lo hará, además de lo que dijo @Android Dev, pero eso no es permanente.
EDIT: Como dijo YouKnowNothingJohn, necesitas al menos un comando de respaldo. Ese comando puede ser cualquier cosa, incluso un archivo ficticio (al menos en >4.4). Gracias Sr. Snow.
0 votos
Podrías usar esta herramienta para crear un zip flasheable que elimine esos APKs. forum.xda-developers.com/showthread.php?t=2633379