Originally Posted by chrisaw
Care to share?
I already have a flashable ZIP that I flash after every nightly - updates the DPI, switched the language from US to GB. Installs openssl and curl for a tasker profile I'm running and adds browser2ram. Adding this script would be no problem and would certainly resolve the 'issue'.
Ok, here is what I did. I'm using CM10.1 and update the nightlies via CyanDelta. I don't wipe /data, so the only thing that gets overwritten by the new version is /system/bin/xposed. I read somewhere that /system/addon.d/ contains scripts to backup and restore files. So I just copied 50-cm.sh to 90-xposed.sh and changed two lines and the comment:
# During an upgrade, this script backs up /system/bin/app_process,
# /system is formatted and reinstalled, then the file is restored.
case "$1" in
list_files | while read FILE DUMMY; do
list_files | while read FILE REPLACEMENT; do
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
I think this should work on any CyanogenMod-based ROM. If you have a /system/addon.d/ and it contains similar files, there are good chances it works. I suggest you copy one of the existing files and adjust it (instead of using the example above). If no such folder exists, it will not work.
One risk with this procedure: I don't know if the restore of these files can be prevented. So if for whatever reason Xposed's app_process executable becomes incompatible with a new CM version, you would have a hard time restoring the original executable.