Addon.d script for Xposed to survive CM13 dirtyFlashes!! thnx to @adlx.xda

Search This thread

objr

Senior Member
Aug 8, 2012
472
227
Italy
/system/addon.d/ is a folder in CM ROMs where the user (and sometimes apps) can put scripts that will be run when you flash a new version of the ROM.

Tipically those scripts are used to backup system apps, and their files, so that they can survive a format and reFlash.

For example, this is how you would keep SuperSU (root), Avast Agent,...

I made the script below so that @rovo89's Xposed for Marshmallow will survive (that is keep it installed) when I flash a new CM13 nightly.

Tested on my phone #MotoG #Falcon (32bits), just flashed latest CM13 nightly, wiped cache and dalvik-cache and the phone rebooted fine (and Xposed was still working). Tested on latest TWRP might not work with other recovery.

Warning: It's for Xposed for Marsshmallow only. It work as of today. It might not work later with new future versions of Xposed. Also not sure it would work for 64bits.

If you use superSu or you have root permitions, you can put this file under "/system/addon.d" and give it the right permitions as the other files in the folder:
81-Xposed.sh

Or just flash the zip attached!!

Haven't tested it on 64bit but It should work, please try and report back!!

this was possible thanks to @adlx.xda so just go over his thread and grab him a beer!! Thank him as well!!

??Thank me if you appreciate??
 

Attachments

  • 81-Xposed-update-signed.zip
    125.3 KB · Views: 5,040
Last edited:

marsaltito

Senior Member
Oct 24, 2008
298
47
Just tested it on Flo (Nexus 7 2013) and it works , next time i will try without cleaning cache .
 

.MoHaMaD

Senior Member
Mar 19, 2012
287
1,011
Just add

bin/app_process32
bin/app_process64

The script@adlx.xda
worked my rom

Code:
. /tmp/backuptool.functions

list_files() {
cat <<EOF
bin/app_process32
bin/app_process32_xposed
bin/dex2oat
bin/oatdump
bin/patchoat
framework/XposedBridge.jar
lib/libart-compiler.so
lib/libart-disassembler.so
lib/libart.so
lib/libsigchain.so
lib/libxposed_art.so
xposed.prop
EOF
}

case "$1" in
  backup)
    echo "STARTING TO BACKUP XPOSED"
    list_files | while read FILE DUMMY; do
      echo backup_file $S/"$FILE"
      backup_file $S/"$FILE"
    done
    ls -al /tmp
    echo "ENDING TO BACKUP XPOSED"
  ;;
  restore)
    echo "STARTING TO RESTORE XPOSED"
    list_files | while read FILE REPLACEMENT; do
      R=""
      [ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
      [ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
      echo $S/$FILE $( ls -alZ $S/$FILE )
    done
    echo "ENDING TO RESTORE XPOSED"
  ;;
  pre-backup)
    # Stub
  ;;
  post-backup)
    # Stub
  ;;
  pre-restore)
    # Stub
  ;;
  post-restore)
echo "STARTING POST-RESTORE XPOSED"
# /system/bin/app_process32
chmod 0755 /system/bin/app_process32
chown root:shell /system/bin/app_process32
chcon u:object_r:zygote_exec:s0 /system/bin/app_process32
# /system/bin/app_process
chmod 0755 /system/bin/app_process32_xposed
chown root:shell /system/bin/app_process32_xposed
chcon u:object_r:zygote_exec:s0 /system/bin/app_process32_xposed
# /system/bin/dex2oat
chmod 0755 /system/bin/dex2oat
chown root:shell /system/bin/dex2oat
chcon u:object_r:dex2oat_exec:s0 /system/bin/dex2oat
# /system/bin/oatdump
chmod 0755 /system/bin/oatdump
chown root:shell /system/bin/oatdump
chcon u:object_r:system_file:s0 /system/bin/oatdump
# /system/bin/patchoat
chmod 0755 /system/bin/patchoat
chown root:shell /system/bin/patchoat
chcon u:object_r:dex2oat_exec:s0 /system/bin/patchoat
# /system/framework/XposedBridge.jar
chmod 0644 /system/framework/XposedBridge.jar
chown root:root /system/framework/XposedBridge.jar
chcon u:object_r:system_file:s0 /system/framework/XposedBridge.jar
# /system/lib/libart-compiler.so
chmod 0644 /system/lib/libart-compiler.so
chown root:root /system/lib/libart-compiler.so
chcon u:object_r:system_file:s0 /system/lib/libart-compiler.so
# /system/lib/libart-disassembler.so
chmod 0644 /system/lib/libart-disassembler.so
chown root:root /system/lib/libart-disassembler.so
chcon u:object_r:system_file:s0 /system/lib/libart-disassembler.so
# /system/lib/libart.so
chmod 0644 /system/lib/libart.so
chown root:root /system/lib/libart.so
chcon u:object_r:system_file:s0 /system/lib/libart.so
# /system/lib/libsigchain.so
chmod 0644 /system/lib/libsigchain.so
chown root:root /system/lib/libsigchain.so
chcon u:object_r:system_file:s0 /system/lib/libsigchain.so
# /system/lib/libxposed_art.so
chmod 0644 /system/lib/libxposed_art.so
chown root:root /system/lib/libxposed_art.so
chcon u:object_r:system_file:s0 /system/lib/libxposed_art.so
# /system/xposed.prop
chmod 0644 /system/xposed.prop
chown root:root /system/xposed.prop
chcon u:object_r:system_file:s0 /system/xposed.prop
echo "DONE POST-RESTORE XPOSED"
  ;;
esac
 
Last edited:
  • Like
Reactions: objr

maxfame

Senior Member
Jan 3, 2014
76
17
Sandomierz
Thanks you!
Can you make a script to survive SuperSU and ViperFX too? After every nightly I (and probably many other peoples) must flash it again.
 

objr

Senior Member
Aug 8, 2012
472
227
Italy
It does not work in @Sultanxda for CM13 ROM.
When upgrading to a new version is fixed at bootlogo and not continuous load
Ok. Sorry, I will look into it as soon as I have more time on?

Listen do you have any logs?

Did you wait enough? Sometime it take more time to boot. Or maybe there is something wrong with latest ROM.

Inviato dal mio Moto G utilizzando Tapatalk
 
  • Like
Reactions: raul.lopez1958

raul.lopez1958

Senior Member
Feb 13, 2010
278
99
Barcelona
Ok. Sorry, I will look into it as soon as I have more time on?

Listen do you have any logs?

Did you wait enough? Sometime it take more time to boot. Or maybe there is something wrong with latest ROM.

Inviato dal mio Moto G utilizzando Tapatalk

Thanks for your quick response.
I installed the zip is 81-Xposed-update-signed-modified.zip
I've seen one that is xposed-addon.d-script-arm.zip
What should I install?
I think it had two at a time and possibly that the problem is not it?
The time was 10 minutes bootlogo doing nothing.
How I can create a log to send?
 

objr

Senior Member
Aug 8, 2012
472
227
Italy
Please sir, consider using mine "81-Xposed-update-signed.zip"
Or just try the copy paste thing in the addon.d folder under system.

U can try making some test to determine either the problem comes with my zip or from ur ROM, like flshing your update without my zip and verifying if it boots.

For the log, I use to grab it from TWRP recovery after I flashed my stuff and before rebooting.

You can find the option under "Advanced" tab the "copy log to SD".
d285d7084494b2707ccd98cffa5054c9.jpg


Inviato dal mio Moto G utilizzando Tapatalk
 

marco2012

Senior Member
Sep 7, 2010
313
132
Does this work on AOSP Marshmallow? I'm on OnePlus One SlimSaber rom.THis script would be very useful. Thank you.
 

X-Lucky-Messi-X

Senior Member
Jan 10, 2016
86
3
/system/addon.d/ is a folder in CM ROMs where the user (and sometimes apps) can put scripts that will be run when you flash a new version of the ROM.

Tipically those scripts are used to backup system apps, and their files, so that they can survive a format and reFlash.

For example, this is how you would keep SuperSU (root), Avast Agent,...

I made the script below so that @rovo89's Xposed for Marshmallow will survive (that is keep it installed) when I flash a new CM13 nightly.

Tested on my phone #MotoG #Falcon (32bits), just flashed latest CM13 nightly, wiped cache and dalvik-cache and the phone rebooted fine (and Xposed was still working). Tested on latest TWRP might not work with other recovery.

Warning: It's for Xposed for Marsshmallow only. It work as of today. It might not work later with new future versions of Xposed. Also not sure it would work for 64bits.

If you use superSu or you have root permitions, you can put this file under "/system/addon.d" and give it the right permitions as the other files in the folder:
81-Xposed.sh

Or just flash the zip attached!!

Haven't tested it on 64bit but It should work, please try and report back!!

this was possible thanks to @adlx.xda so just go over his thread and grab him a beer!! Thank him as well!!

Thank me if you appreciate

Where' s the script?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 69
    /system/addon.d/ is a folder in CM ROMs where the user (and sometimes apps) can put scripts that will be run when you flash a new version of the ROM.

    Tipically those scripts are used to backup system apps, and their files, so that they can survive a format and reFlash.

    For example, this is how you would keep SuperSU (root), Avast Agent,...

    I made the script below so that @rovo89's Xposed for Marshmallow will survive (that is keep it installed) when I flash a new CM13 nightly.

    Tested on my phone #MotoG #Falcon (32bits), just flashed latest CM13 nightly, wiped cache and dalvik-cache and the phone rebooted fine (and Xposed was still working). Tested on latest TWRP might not work with other recovery.

    Warning: It's for Xposed for Marsshmallow only. It work as of today. It might not work later with new future versions of Xposed. Also not sure it would work for 64bits.

    If you use superSu or you have root permitions, you can put this file under "/system/addon.d" and give it the right permitions as the other files in the folder:
    81-Xposed.sh

    Or just flash the zip attached!!

    Haven't tested it on 64bit but It should work, please try and report back!!

    this was possible thanks to @adlx.xda so just go over his thread and grab him a beer!! Thank him as well!!

    ??Thank me if you appreciate??
    3
    I mean, I looked in the orginal post, the only attachment is the .zip file. That' s why I' m asking where cause I can' t find it in this thread.
    You didn't read OP carefully
    If you use superSu or you have root permitions, you can put this file under "/system/addon.d" and give it the right permitions as the other files in the folder:
    81-Xposed.sh

    Or just flash the zip attached!!
    1
    It works!
    Good work man, install nightlie and xposed still there..
    Niceee
    1
    Worked for me on lg g3 verizon

    Sent from my LG-VS985 using Tapatalk
    1
    Thx so much! Script worked perfectly on my Wileyfox Storm!
    Xposed v86 survived all wipes, so it makes updating twice faster! Brilliant!!