Addon.d script for Xposed to survive CM12 flashes - Xposed General

/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 Lollipop will survive (that is keep it installed) when I flash a new CM12 nightly.
Tested on my phone (32bits), just flashed latest CM12 nightly, wiped cache and dalvik-cache and the phone rebooted fine (and Xposed was still working). Tested on TWRP 2.8.5.1, might not work with other recovery.
Warning: It's for Xposed for Lollipop 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.
Download script only:
If you use SuperSu:
81-Xposed.sh
Or flashable zip, see post attachment below:
If you don't use SuperSu, see and flash this other version by DualJoe, see http://forum.xda-developers.com/showthread.php?p=59199445.

So to clarify, this works when you dirty flash? But if you clean flash you need to set everything up again?
click here for my device info:
~~~~~~~~~~~~~~~~~~
DEVICE: SM-N900W8
ROM: Temasek's CM12 v7.7
BASEBAND: N900W8VLUCNI1
KERNEL: 3.4.106-f2fs-temasek-cm12-hlte-v0.66+
RECOVERY: TWRP 2.8.5.0 hlte
XPOSED? YEAH BABY!

vanisleguy1976 said:
So to clarify, this works when you dirty flash? But if you clean flash you need to set everything up again?
click here for my device info:
~~~~~~~~~~~~~~~~~~
DEVICE: SM-N900W8
ROM: Temasek's CM12 v7.7
BASEBAND: N900W8VLUCNI1
KERNEL: 3.4.106-f2fs-temasek-cm12-hlte-v0.66+
RECOVERY: TWRP 2.8.5.0 hlte
XPOSED? YEAH BABY!
Click to expand...
Click to collapse
That's indeed a very good question ?.
Yes, I use it when dirty flashing, primarily to save time and streamline the process, that is, I avoid having to flash the Xposed zip over again.
If you do a clean flash (ie. with a wipe data) I think it should keep all the stuff in place (all the stuff installed by the Xposed zip). In that case thought, you'll need to reinstall the Xposed Installer, as well as all the modules you add. In that case you wouldn't really save much time I believe.
Sent from my OnePlus One using Tapatalk

And if real clean flash as like wipe system, it won't survive..
But for dirty it's great, going into recovery as writing it, thanks you..

reemar said:
And if real clean flash as like wipe system, it won't survive..
But for dirty it's great, going into recovery as writing it, thanks you..
Click to expand...
Click to collapse
Yeah, true, if you wipe system you remove that whole addon.d folder, which is good (might be needed).
Yes, it's basically for those who flash Nightlies every now and then (which don't require wiping more than cache and dalvik).
Sent from my OnePlus One using Tapatalk

adlx.xda said:
That's indeed a very good question ?.
Yes, I use it when dirty flashing, primarily to save time and streamline the process, that is, I avoid having to flash the Xposed zip over again.
If you do a clean flash (ie. with a wipe data) I think it should keep all the stuff in place (all the stuff installed by the Xposed zip). In that case thought, you'll need to reinstall the Xposed Installer, as well as all the modules you add. In that case you wouldn't really save much time I believe.
Sent from my OnePlus One using Tapatalk
Click to expand...
Click to collapse
I'll have to wait till Temasek comes back from holidays before I can test this

adlx.xda said:
/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 Lollipop will survive (that is keep it installed) when I flash a new CM12 nightly.
Tested on my phone (32bits), just flashed latest CM12 nightly, wiped cache and dalvik-cache and the phone rebooted fine (and Xposed was still working). Tested on TWRP 2.8.5.1, might not work with other recovery.
Warning: It's for Xposed for Lollipop 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.
Download script only: 81-Xposed.sh
Or flashable zip, see post attachment below:
Click to expand...
Click to collapse
I have some questions, please forgive my lack of knowledge.
How do you get the script into the addon folder in the CM nightly?
Also, do you know if it can be used in conjunction with Cyandelta updater?
Thnx, Alex

alexdpaul said:
I have some questions, please forgive my lack of knowledge.
How do you get the script into the addon folder in the CM nightly?
Also, do you know if it can be used in conjunction with Cyandelta updater?
Thnx, Alex
Click to expand...
Click to collapse
Just flash the zip in the fist post. This will install the script in the right place in your phone. After that you can flash Nightlies like you always do, manually or with Cyandelta (I use Cyandelta myself too).
You just have to flash the script once, it will also survive future flashes.
Sent from my OnePlus One using Tapatalk

adlx.xda said:
Just flash the zip in the fist post. This will install the script in the right place in your phone. After that you can flash Nightlies like you always do, manually or with Cyandelta (I use Cyandelta myself too).
You just have to flash the script once, it will also survive future flashes.
Sent from my OnePlus One using Tapatalk
Click to expand...
Click to collapse
Thanks, flashed the zip, just need to wait for the next nightly to see if it works for me.
Thanks for your quick reply!

You're missing at least one file (app_process32):
Code:
localhost bin # ls -l |grep app_
lrwxr-xr-x 1 root shell 13 Feb 23 20:53 app_process -> app_process32
lrwxrwxrwx 1 root root 32 Feb 24 17:36 app_process32 -> /system/bin/app_process32_xposed
-rwxr-xr-x 1 root shell 13664 Feb 23 20:53 app_process32_original
-rwxr-xr-x 1 root shell 72757 Feb 24 17:36 app_process32_xposed

DualJoe said:
You're missing at least one file (app_process32):
Code:
localhost bin # ls -l |grep app_
lrwxr-xr-x 1 root shell 13 Feb 23 20:53 app_process -> app_process32
lrwxrwxrwx 1 root root 32 Feb 24 17:36 app_process32 -> /system/bin/app_process32_xposed
-rwxr-xr-x 1 root shell 13664 Feb 23 20:53 app_process32_original
-rwxr-xr-x 1 root shell 72757 Feb 24 17:36 app_process32_xposed
Click to expand...
Click to collapse
I've been flashing various nightly and Xposed has survived all of them, so it works for me, no file missing as far as I can tell.
On my phone app_process32 is modified by SuperSu, and flash survival is handled by SuperSu script in addon.d (99-supersu.sh).
Sent from my OnePlus One using Tapatalk

adlx.xda said:
/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 Lollipop will survive (that is keep it installed) when I flash a new CM12 nightly.
Tested on my phone (32bits), just flashed latest CM12 nightly, wiped cache and dalvik-cache and the phone rebooted fine (and Xposed was still working). Tested on TWRP 2.8.5.1, might not work with other recovery.
Warning: It's for Xposed for Lollipop 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.
Download script only: 81-Xposed.sh
Or flashable zip, see post attachment below:
Click to expand...
Click to collapse
Work for me cm12(32bit) thx

Nice, it's work on my Xperia Z1 with CM12.

Not working for me on Oneplus One CM12, the XposedBridge.jar survives but not app_process, the OnePlus One has an ARM v7, so what do I need to modify in the config file?

card13 said:
Not working for me on Oneplus One CM12, the XposedBridge.jar survives but not app_process, the OnePlus One has an ARM v7, so what do I need to modify in the config file?
Click to expand...
Click to collapse
I also have a Oneplus One.
Do you have SuperSu? Go in SuperSu settings and check if you have installed the script to survive flashes.
Sent from my OnePlus One using Tapatalk

I don't have SuperSu, haven't used that since the nightlies became official and builtin su was working properly.

card13 said:
I don't have SuperSu, haven't used that since the nightlies became official and builtin su was working properly.
Click to expand...
Click to collapse
Ok, that's the reason why it fails for you then... I'll have to work that our then.
Sent from my OnePlus One using Tapatalk

How unistall this?

Rygiel98 said:
How unistall this?
Click to expand...
Click to collapse
Uninstall? Remove the file /system/addon.d/81-xposed.sh from your system.
Sent from my OnePlus One using Tapatalk

card13 said:
Not working for me on Oneplus One CM12, the XposedBridge.jar survives but not app_process, the OnePlus One has an ARM v7, so what do I need to modify in the config file?
Click to expand...
Click to collapse
Here is a fixed version.
Added entry:
[...]
list_files() {
cat <<EOF
bin/app_process32
bin/app_process32_xposed
bin/dex2oat
bin/oatdump
[...]
Click to expand...
Click to collapse

Related

[PATCH] Everything about Android "Master Key" Vulnerability

Hello everybody!
You might have heard of the notorious "Master Key" Vulnerabilty that affects 99% of Android devices. It basically allows a knowledged attacker to access all private and application data. For more information visit: http://bluebox.com/corporate-blog/bluebox-uncovers-android-master-key/.
CM team has recently (on 7th July) committed the fix for the patch. Here it is: https://github.com/CyanogenMod/android_libcore/commit/fe70e697810a7a8b9ce47325f53d16fdbc19f1f8. Gerrit link: http://review.cyanogenmod.org/#/c/45251/
I went back to stock V20a to test it and it is vulnerable as I expected. But not anymore! I've created a patch from the differences of an older and a newer, patched core.jar from CM 10.1.
Things in attachment:
A before and an after screenshot
The patch
V20a core.jar patched (This is very likely to work on other V20 roms as well.) -> How to install? Replace the core.jar file in '/system/framework/' (create a backup first to be sure) and wipe dalvik cache in recovery. The patch of course works without an unlocked bootloader too, in this case, delete all files from '/data/dalvik-cache/' (don't delete the directory). Of course this needs root.
List of invulnerable (patched) roms:
CM 10.1.1 stable
CM nightlies starting from 8th July (There isn't any build on 7th July.)
araragi's custom CM 10.1 build
Any other roms that are not in the list are vulnerable! If you bump into this thread, please test the rom you are using and report so I can extend the list. Thx! Perform the test with this app: https://play.google.com/store/apps/details?id=com.bluebox.labs.onerootscanner.
Every custom modification to devices have risks. Use this at your own risk!
Have fun and enjoy!
I have Stock V20A Euro-Open and ran the BlueBox Scan and my Phone It's already Patched without doing anythings so I gues everyone with the same ROM must be safe!!!
how to apply patch?
mcboykin said:
how to apply patch?
Click to expand...
Click to collapse
Adam77Root said:
How to install? Replace the core.jar file in '/system/framework/' (create a backup first to be sure) and wipe dalvik cache in recovery. The patch of course works without an unlocked bootloader too, in this case, delete all files from '/data/dalvik-cache/' (don't delete the directory). Of course this needs root.
Click to expand...
Click to collapse
2chars
Adam77Root said:
2chars
Click to expand...
Click to collapse
done, thanks
20a Euro-Open is vunerable i just checked it.
Doesn't work on P88020a-EUR-XXX.
After changing core.jar and cleaning dalvik cache, no app started anymore.
I had to delete core.jar and rename the backuped core.jar via adb.
Bud Cord said:
Doesn't work on P88020a-EUR-XXX.
After changing core.jar and cleaning dalvik cache, no app started anymore.
I had to delete core.jar and rename the backuped core.jar via adb.
Click to expand...
Click to collapse
You have to delete/backup the odex file too on stock.
Adam77Root said:
You have to delete/backup the odex file too on stock.
Click to expand...
Click to collapse
This information would have been helpful in the first posting.
No matter - now it stays that way until I install CM.
Patch status : Patched for bug 8219321 -Patched for bug 9695860
Carbon Rom latest build available,ported by Demetris

[Solution] Getting Android Pay working on Pure Nexus , Chroma, or OMNI

Special thanks to @funkyboy1281, @lentm, @macboy3000 for helping getting this work. As far as I can tell, this is the easiest and most straight forward instruction set for getting Android Pay to work on the latest version of Pure Nexus, Chroma, or OMNI Rom
Clean Flashing
Download the appropriate Rom.
Pure Nexus Discussion​Chroma Discussion​OMNI (no link available, sorry)​
Download Pure Nexus Dynamic Gapps 2-3-16 (Very important, you cannot use 15-3-16 or later). Yes, even if you use Chroma or OMNI, these Gapps should work for you. Link
Download the unSU script for completely unrooting before installing systemless root. Link
Download SuperSU 2.68 (or higher) Link || Discussion
Advance wipe in recovery all but internal storage
Install the ROM, gapps, and unSU
Optional: Install custom kernel
In TWRP, under advanced, go to terminal and type the following:
Code:
echo SYSTEMLESS=true>>/data/.supersu
echo BINDSYSTEMXBIN=false>>/data/.supersu
Note: You may also do this using ADB in recovery (adb shell, and then enter the same commands. This is much easier in my opinion, and is the method I used.
Flash 2.68 beta in TWRP
Fully reboot, go through initial device setup
Verify in SuperSU that you cannot install SU to the system. This will verify that we are using the systemless root option
Download SafetyNet Helper and make sure it passes
Install Android Pay and profit!
Dirty Flashing
Verify that SafetyNet still passes in Android.
Verify in Android that /data/.supersu is still present and contains the appropriate options (see clean flashing). You may also verify in recovery by going to terminal commands and entering in:
Code:
cat /data/.supersu
Install the updated ROM (do not reinstall gapps unless your ROM builder specifically tells you to do so. Pure nexus does not require a reflash)
Optional: Install unSU. This was not necessary on PureNexus, but I cannot be sure for other roms. It shouldn't hurt anything to flash.
Optional: Install custom kernel
Install SuperSu 2.68 (or higher)
Check SafetyNet Helper and make sure it still passes
FAQ
Q. Can I still install and use AdAway?
A. Yes. You must first install something in recovery before installing AdAway. See the discussion Thread. You should be installing v3.1 of the app after you install the recovery zip.
Q. Can I still use V4A?
A. Yes. I do not use this however, but it has been reported that nothing special needs to be done.
Q. Can I change the screen density?
A. We have not found a way to do this without tripping Safety Net
..
@skaforey thanks for this thread! Might want to note in the OP that Wiping Data erases the internal storage. Some people may not know that.
MrBrady said:
@skaforey thanks for this thread! Might want to note in the OP that Wiping Data erases the internal storage. Some people may not know that.
Click to expand...
Click to collapse
Noted, thank you! Still hoping some of the lucky folks that have it working can help us out here.
Has anyone found a way to adjust the screen density while keeping Android Pay functional?
MrBrady said:
Has anyone found a way to adjust the screen density while keeping Android Pay functional?
Click to expand...
Click to collapse
You (should) be able to change the density through adb using
Code:
adb shell wm density DPI
with dpi being what you want, or if you have root you can do that from a terminal emulator, just remove the adb shell part.
I tried the 2nd method without formating data in different combos to no avail, still hesitant to wipe my internal sdcard, it shouldn't be that hard man, will follow this thread
anyone know other aosp ROMs that have AP working outside of pure nexus?
Sent from my Nexus 6 using Tapatalk
Following the steps in the top most instructions in the OP...
1) Pure Nexus 3/8 does not have root out of the box, so the Unroot step was not needed.
2) TWRP did not show any files/folders in the /su directory, so the Terminal command didn't work. I booted up the device and did it through the Terminal there instead and then rebooted.
After that, loaded up Android Pay and it says "Android Pay can't be used".
Running SafetyNet reports....
SafteyNet request: success
Response validation: success
CTS profile match: false
Tried different methods, not working for me.
1. Download Pure Nexus 1/03/16 or newer (Layers), the latest PN GApps, UnSU, the latest SuperSU.
2. Backup any important data.
3. Boot into TWRP and wipe everything including internal storage
4. Format data.
5. reboot TWRP with USB-OTG that has fines necessary.
6. Flash Pure Nexus.
7. Flash GApps.
8. Flash UnSU.
9. In terminal I saw I still had a folder /supersu so I deleted that.
reboot. Setup phone with google account. Did not have it restore apps, but did have it restore basic setup from google.
Install Safetynet helper
Still fail CTS Profile Match
Don't know what the people are doing different, but not working for me.
Are you using the PN-Gapps or others?
The updated-unsu is what date?
Thanks!
The only way I have gotten AP to work is from a stock image based ROM. It doesn't seem to work with AOSP ROMs like Pure Nexus.
For example, I am currently running Tupac's debloated stock ROM with Cataclysm MOD, Viper4Android and AdAway ad blocking. Android Pay works fine, as long as you follow the SU steps listed in the OP of this thread.
What I did to get AP to work was removing these lines from updater-script located in META-INF > com > google > android
Code:
ui_print("Flashing SuperSU..");
package_extract_dir("supersu", "/tmp/supersu");
run_program("/sbin/busybox", "unzip", "/tmp/supersu/supersu.zip", "META-INF/com/google/android/*", "-d", "/tmp/supersu");
run_program("/sbin/busybox", "sh", "/tmp/supersu/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/supersu/supersu.zip");
ui_print(" ");
and removed the supersu folder inside the zip file. I then installed my custom kernel and systemless supersu. After that, I set the permissions for bin folder inside su to 751 using a root explorer and deleted xbin_bind.
@macboy3000 what kernel and what version of SuperSU did you use, ? I tried your method, ROM booted fine but safetynet test failed...
this is how I did it
unzip ROM
edit code out
delete supersu folder
zip ROM
advance wipe everything but internal
flash ROM
flash pn gapps
flash elemental kernel
flash supersu
boot into android, delete xbin_bind
reboot system
permissions on bin folder were already 751, so didn't need to change
Sent from my Nexus 6 using Tapatalk
sgloki77 said:
@macboy3000 what kernel and what version of SuperSU did you use, ? I tried your method, ROM booted fine but safetynet test failed...
this is how I did it
unzip ROM
edit code out
delete supersu folder
zip ROM
advance wipe everything but internal
flash ROM
flash pn gapps
flash elemental kernel
flash supersu
boot into android, delete xbin_bind
reboot system
permissions on bin folder were already 751, so didn't need to change
Sent from my Nexus 6 using Tapatalk
Click to expand...
Click to collapse
Weird...I'm using SuperSU 2.67 and I'm also using Elemental kernel.
macboy3000 said:
Weird...I'm using SuperSU 2.67 and I'm also using Elemental kernel.
Click to expand...
Click to collapse
Did you format data? I'll give it a shot with 2.67, I used 2.68
Sent from my Nexus 6 using Tapatalk
sgloki77 said:
Did you format data? I'll give it a shot with 2.67, I used 2.68
Sent from my Nexus 6 using Tapatalk
Click to expand...
Click to collapse
I formatted everything except internal storage before installing.
macboy3000 said:
What I did to get AP to work was removing these lines from updater-script located in META-INF > com > google > android
Code:
ui_print("Flashing SuperSU..");
package_extract_dir("supersu", "/tmp/supersu");
run_program("/sbin/busybox", "unzip", "/tmp/supersu/supersu.zip", "META-INF/com/google/android/*", "-d", "/tmp/supersu");
run_program("/sbin/busybox", "sh", "/tmp/supersu/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/supersu/supersu.zip");
ui_print(" ");
and removed the supersu folder inside the zip file. I then installed my custom kernel and systemless supersu. After that, I set the permissions for bin folder inside su to 751 using a root explorer and deleted xbin_bind.
Click to expand...
Click to collapse
Well I tried this and still no luck
I even tried flashing the modified ROM, gapps, and never flashing SuperSU at all (so my rom wasn't rooted at all), and SafetyNet still gives me a red screen. I really wish I knew what was triggering this for some and how others can make it work.
I tried again using 2.57 SuperSU and Elemental X and still fails. Would someone that got it working be able to post a more detailed log of exactly what steps you're using and exactly what files you're flashing.
MrBrady said:
The only way I have gotten AP to work is from a stock image based ROM. It doesn't seem to work with AOSP ROMs like Pure Nexus.
For example, I am currently running Tupac's debloated stock ROM with Cataclysm MOD, Viper4Android and AdAway ad blocking. Android Pay works fine, as long as you follow the SU steps listed in the OP of this thread.
Click to expand...
Click to collapse
This has been my experience as well !
jcrompton said:
This has been my experience as well !
Click to expand...
Click to collapse
Got Android Pay working with Tupac's debloated stock ROM too! Thanks!
Is it possible to change DPI and keep Android Pay working?
lentm said:
Got Android Pay working with Tupac's debloated stock ROM too! Thanks!
Is it possible to change DPI and keep Android Pay working?
Click to expand...
Click to collapse
Not that I have found, unfortunately. Even via just ADB commands.

(Link) Xposed FOR OPEN BETA 7 November 1 patch

Rovo89 has released new Xposed framework version that works with latest beta built v7 of OOS. I've just tried it and it work.
First uninstall few unwanted apps from system . Uninstalling swift keyboard / Android pay from system will work .
Go to twrp mount system and now go to / advanced/ file manager/ system/ Android pay or swift keyboard
if you get error like no space (1) etc..
This new build will not give bootloop. It works with Nov 1 patch!.
!!!!This is a test version risk is all on you don't blame me.!!!
Download
http://dl-xda.xposed.info/framework/sdk23/arm64/xposed-v87-sdk23-arm64-test1.zip
Link to new Version if available
http://dl-xda.xposed.info/framework/sdk23/arm64/
Please hit thanks if this helped​
Hi
Has there been a systemless version of this yet ?
i tried googling but no luck
Thanks for this Xposed version, works fine for me
I will give it a try now. Works fine on my device
30GB free: no place left on device :-/
fonsi78 said:
30GB free: no place left on device :-/ 30GB
Click to expand...
Click to collapse
What do you mean?
i have 30gb free storage left....but in twrp the installaition process says i have no storage left.
fonsi78 said:
i have 30gb free storage left....but in twrp the installation process says i have no storage left.
Click to expand...
Click to collapse
You have 30 Gb of free storage but your System is full - that's why you're unable to write anything to it. Try deleting some unneeded application (i.e. Android pay) with Root Explorer or from within TWRP (Advanced - file manager) from the system/app folder
fonsi78 said:
30GB free: no place left on device :-/
Click to expand...
Click to collapse
Go to twrp mount system and now go to / advanced/ file manager/ system/ Android pay or swift keyboard
Go to twrp mount system and now go to / advanced/ file manager/ system/ Android pay or swift keyboard
Got installed but modules are making bootloops.
Device is not booting after restarting the cell to activate modules.
Thx guys!
Varun1985 said:
Got installed but modules are making bootloops.
Device is not booting after restarting the cell to activate modules.
Click to expand...
Click to collapse
What modules do you have. I heard GravityBox causes boot loops
charliemike234 said:
What modules do you have. I heard GravityBox causes boot loops
Click to expand...
Click to collapse
gravitybox is working fine for me.
these modules r not working
1) android n-ify
2) AppOps Xposed
3) custom slider
4) settings editor
Any help?
3.2.8 has November Security Patch, i installed the latest version 87 and it is causing bootloops, how to fix without data loss?
paul369741 said:
Any help?
3.2.8 has November Security Patch, i installed the latest version 87 and it is causing bootloops, how to fix without data loss?
Click to expand...
Click to collapse
Use the Uninstaller by flashing it in twrp: http://dl-xda.xposed.info/framework/uninstaller/xposed-uninstaller-20160829-arm64.zip
Or
Flash the rom again without wiping data.
AdrianM said:
Use the Uninstaller by flashing it in twrp: http://dl-xda.xposed.info/framework/uninstaller/xposed-uninstaller-20160829-arm64.zip
Or
Flash the rom again without wiping data.
Click to expand...
Click to collapse
Uninstaller didnt work, flashing 3.2.8 worked, so no way of installing Xposed?
@Nishidh Xposed v87 has been released @paul369741 Uninstaller works on my device.
Gravitybox is definitely causing me issues...bootlooping like a mofo.....can't seen to get xposed activated....

Magisk addon.d script?

Is there anyway someone can make an addon.d script for both magisk and the phh root? There's a similar script that you can find here that does this for xposed. Also, the Gapps use it. This would be very helpful so we don't have to reflash the scripts everytime.
Link_of_Hyrule said:
Is there anyway someone can make an addon.d script for both magisk and the phh root? There's a similar script that you can find here that does this for xposed. Also, the Gapps use it. This would be very helpful so we don't have to reflash the scripts everytime.
Click to expand...
Click to collapse
Ummm...
That makes no sense...
The magisk.img is in data... Survives dirty flash... The magical part of magisk... Is injected into the boot.img... Which, afaik, isn't possible via addon.d
Link_of_Hyrule said:
Is there anyway someone can make an addon.d script for both magisk and the phh root? There's a similar script that you can find here that does this for xposed. Also, the Gapps use it. This would be very helpful so we don't have to reflash the scripts everytime.
Click to expand...
Click to collapse
That makes no sense like the other guy said & only works with ROMs that have implemented that function (generally update-script that calls a script in root of the zip in CyanogenMods). If you install any ROM that have not that function, then nothing is backed up & /system is replaced as regular.
Addon.d is simply a folder with .sh scripts that are run when flashing a new rom update. Obviously, this won't work with stock roms but it should work for Lineage OS and similar roms I think. Sadly I don't know how to write .sh scripts.
Link_of_Hyrule said:
Addon.d is simply a folder with .sh scripts that are run when flashing a new rom update. Obviously, this won't work with stock roms but it should work for Lineage OS and similar roms I think. Sadly I don't know how to write .sh scripts.
Click to expand...
Click to collapse
Learn Bash, is easy to do like check how works other .sh scripts or if you are lazy search tutorials in Google xD...
Old thread, but I just discovered this "Flash After Update" script (actually @osm0sis pointed it out to me) which will flash any zip in a designated folder after flashing rom update.
osm0sis said:
99-flashafterupdate.sh addon.d script (many devices) - attached
For ROMs that don't have "Flash After Update" support built into their delta/update process. During an upgrade, this script will flash zips from a sdcard directory after all other addon.d backup/restore actions have completed. This can be used to flash SuperSU and then an AnyKernel2 kernel on CyanogenMod, for example. Remove the .txt extension once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
Click to expand...
Click to collapse
Especially handy if you keep your device unrooted, and can't use a tool such as this:
https://play.google.com/store/apps/details?id=se.davison.autoflasher
Link_of_Hyrule said:
Is there anyway someone can make an addon.d script for both magisk and the phh root? There's a similar script that you can find here that does this for xposed. Also, the Gapps use it. This would be very helpful so we don't have to reflash the scripts everytime.
Click to expand...
Click to collapse
Have a look at this:
https://github.com/topjohnwu/Magisk/issues/175
So is he integration the feature directly into Magisk?
Why don't you submit the changes as a pull request?
Edit: Tested the script. I can use the official Lineage OS updater now! No need for a third party app to auto flash Magisk want update.
Sent from my Nexus 7 using Tapatalk

[DEPRECATED] [Module/Tool] [2018.10.9] F2FS Loopback Bug Workaround -- No Kernel Patch Needed

THIS PROJECT IS NO LONGER SUPPORTED.
# F2FS Loopback Bug Workaround
## README.md
### Copyright (C) 2017-2018, VR25 @ xda-developers
#### License: GPL v3+
---
#### DISCLAIMER
This software is provided as is, in the hope that it will be useful, but without any warranty. Always read/reread this reference prior to installing/upgrading. While no cats have been harmed, I assume no responsibility under anything which might go wrong due to the use/misuse of it.
A copy of the GNU General Public License, version 3 or newer ships with every build. Please, read it prior to using, modifying and/or sharing any part of this work.
To prevent fraud, DO NOT mirror any link associated with this project; DO NOT share ready-to-flash-builds (zips) on-line!
---
#### DESCRIPTION
Some kernels from devices with F2FS-formatted data partition (i.e., Motorola) have a bug which prevents loopback devices (.img files) from being mounted read-write. This limits systemless modifications that can otherwise be achieved with Magisk.
This module works by moving magisk.img to the cache partition (EXT[2-4]-formatted) and linking it to its actual location (i.e., /data/adb/magisk.img). The other half of the process consists on automatically recreating magisk_merge.img shortly after boot and handling it the same way as magisk.img.
With this workaround, a patched kernel is dispensable.
Cache partition's size is essentially the only limiting factor -- and that's pretty much self-explanatory.
/cache/magisk_.img is automatically backed up to/data/adb on boot (only if modified) & restored on install. Thus, whenever cache is wiped, magisk_.img and its respective symlink can easily be restored by simply reinstalling the module.
---
#### PRE-REQUISITES
- Magisk v15+
- F2FS-formatted data partition
- EXT[2-4]-formatted cache partition
---
#### SETUP STEPS
Fist time
- Install from custom recovery as a regular flashable zip.
Upgrades
- Install from Magisk Manager or custom recovery.
- Reinstall after cache wipes to restore magisk.img backup.
---
#### NOTES/TIPS
Always install large modules from custom recovery only. In fact, I recommend installing every module from recovery if your device's cache partition has a very small size (i.e., only a few Megabytes).
To revert changes, uninstall the module, boot into custom recovery and delete </data/adb/magisk.img> & <magisk.img.bkp>. Lastly (while still in custom recovery), move </cache/magisk_.img> to </data/adb/magisk.img>.
Updates and reinstalls can be carried out from Magisk Manager as well.
---
#### ONLINE SUPPORT
- [Facebook Support Page](https://facebook.com/VR25-at-xda-developers-258150974794782/)
- [Git Repository](https://github.com/Magisk-Modules-Repo/f2fs-loopback-bug-workaround/)
- [XDA Thread](https://forum.xda-developers.com/apps/magisk/guide-magisk-official-version-including-t3577875/)
---
#### RECENT CHANGES
**2018.10.9 (201810090)**
- Bug fixes
- Latest module template, with added sugar.
- Magisk 15-17.2 support
- Updated documentation
**2018.9.2 (201809020)**
- Improved compatibility
- Major optimizations
- Updated documentation
**2018.8.1 (201808010)**
- General optimizations
- Striped down (removed unnecessary code & files)
- Updated documentation
**2018.7.24 (201807240)**
- Fixed modPath detection issue (Magisk V16.6).
- Updated documentation
Works with stock roms as well ?
My cat lost two and half lives because of this thread. Sadly, the disclaimer is in order, so I can't sue.
Is this for Nougat or Marshmallow?
does this work on nougat update or only on MM?
Can someone please confirm if it will work on retin channel with dual sim... I am running stock nougat... Will it work or does it only work on MM rom...
Anybody know how to fix notifications without breaking safety net?
VR25 said:
DISCLAIMER
Not taking responsibility for any thermonuclear war or cat harm. Do it at your any risk.
NEEDED
[Unlocked Bootloader] https://youshouldknowthisbynow.com
[Latest TWRP] https://forum.xda-developers.com/mo...recovery-unofficial-twrp-moto-z-play-t3495629 credits @Alberto97
[Latest FSFS patched Kernel] https://forum.xda-developers.com/moto-z-play/development/kernel-stock-kernel-f2fs-patched-t3546732 credits @tomparr
[Latest Magisk zip] https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445 credits @topjohnwu
[Latest Magisk Manager app] https://play.google.com/store/apps/details?id=com.topjohnwu.magisk&hl=en credits @topjohnwu
PROCEDURE
0. reboot bootloader
1. fastboot boot twrp.img
2. adb sideload fsfs patched kernel
3. adb sideload magisk
4. reboot system
5. install magisk manager from play store
6. reboot bootloader [yes, again]
7. fastboot boot twrp.img [yes, again]
8. adb sideload magisk [yes, again]
9. reboot system [yes, ag... you get the point]
10. open magisk manager settings, enable "magisk hide"
11. reboot, done
Click to expand...
Click to collapse
Works like a charm.
I however did not temporarly boot into TWRP, I flashed it as such.
mhp1995 said:
does this work on nougat update or only on MM?
Click to expand...
Click to collapse
I'm on Android 7.0 Nougat.
Thanks!
Erwin
fortunz said:
My cat lost two and half lives because of this thread. Sadly, the disclaimer is in order, so I can't sue.
Click to expand...
Click to collapse
Hopefully your cat is ok now
jjdavis699 said:
Is this for Nougat or Marshmallow?
Click to expand...
Click to collapse
mhp1995 said:
does this work on nougat update or only on MM?
Click to expand...
Click to collapse
mhp1995 said:
Can someone please confirm if it will work on retin channel with dual sim... I am running stock nougat... Will it work or does it only work on MM rom...
Click to expand...
Click to collapse
It should work on both Marshmallow and Nougat, as long as you pick the appropriate kernel for your system version (6 or 7). @mhp1995, I don't think the software channel matters. It should work across all (retus, retin , reteu, etc.).
xxBrun0xx said:
Anybody know how to fix notifications without breaking safety net?
Click to expand...
Click to collapse
No idea at this point, man. I've never had to fix mine. Perhaps only some people have it...?
@erwin, I chose not to touch the stock recovery to keep OTA installations straightforward. Easy for everyone.
one question... if i wanted to install viper4android and xposed framework, should i download it from the magisk download tab or shud i flash them manually via TWRP? thanks
mhp1995 said:
one question... if i wanted to install viper4android and xposed framework, should i download it from the magisk download tab or shud i flash them manually via TWRP? thanks
Click to expand...
Click to collapse
There are specific versions of these modified for systemless root. DO NOT install the standard versions. You should follow the instructions given in Magisk Manager app to download and install.
VR25 said:
There are specific versions of these modified for systemless root. DO NOT install the standard versions. You should follow the instructions given in Magisk Manager app to download and install.
Click to expand...
Click to collapse
Ok :good: I think xposed is not available at the moment for nougat ..Its WIP....If possible when the time comes try to include installing xposed via Magisk tutorial in this thread too.... Coming to the posts, u mind if i add this rooting tutorial in my all-in-one thread? Of course credits will be given
mhp1995 said:
Ok :good: I think xposed is not available at the moment for nougat ..Its WIP....If possible when the time comes try to include installing xposed via Magisk tutorial in this thread too.... Coming to the posts, u mind if i add this rooting tutorial in my all-in-one thread? Of course credits will be given
Click to expand...
Click to collapse
Oh, yes the availability... I forgot to mention that. Hopefully a proper Xposed version will be available for nougat very soon. When that happens, I'll update the thread.
About adding the tutorial to your thread... sure, go ahead.
I honestly declare I didn't read whole thread - is this method work for stock Nougat rom - I need root for Titanium Backup only for now , since facebook messenger goes crazy on my new phone MZP :-/ . Or maybe there is a way to restore old conversations ,not restored automatically in Facebook Messenger - anybody knows how to do it ? . On every phone I had I used root for two things mainly - Titanium Backup and to block adds - dns66 do block adds very well without root but , Titanium Backup has no alternative for me .
Just for the records: Magisk 12 release works fine.
@sebx_g1 incredible 2 pages! That are more than 10 postings! Sure nobody can read so much. And nearly all ask or answer your question, but it is just too much ...
tag68 said:
Just for the records: Magisk 12 release works fine.
@sebx_g1 incredible 2 pages! That are more than 10 postings! Sure nobody can read so much. And nearly all ask or answer your question, but it is just too much ...
Click to expand...
Click to collapse
[emoji4] but voting is only 3 works 2 not, so?
Wysłane z mojego XT1635-02 przy użyciu Tapatalka
What is expected to be done for next OTA to work? Just restore Nandroid backup of boot partition and everything should be ready for patchlevel newer than January 2017, right? And afterwards f2fs fixed kernel and Magisk again for having root again of course.
(twrp not flashed, no logo modified, system should be untouched)
---------- Post added at 09:14 PM ---------- Previous post was at 09:11 PM ----------
sebx_g1 said:
[emoji4] but voting is only 3 works 2 not, so?
Click to expand...
Click to collapse
Xposed does not work on Nougat by now. Magisk does. The 2 negative votes you counted referred to Xposed
Anyone have an adblock that works with systemless and passes safetynet? Do we need to check the "enable systemless for adblocks" in Magisk settings?
DNS66 do the same what do adblock, you can use it without root. But yes, there is special version of adblock systemless.
Wysłane z mojego XT1635-02 przy użyciu Tapatalka
Worked fantastically, thanks a lot!

Categories

Resources