[ROM] - Universal ROM One UI for any Galaxy A - Samsung Galaxy A70 ROMs, Kernels, Recoveries, & Ot

Universal ROM One UI for any Galaxy A:
Hello guys, this time I bring you something different... it is a zip to convert stock to rom, this project is based on Dynamic Installer.
I am not responsible for damaged phones, install at your own risk.
Dynamic Installer: https://forum.xda-developers.com/t/...1-android-10-or-earlier.4279541/post-85046055
Features:
Spoiler: Features
Working on Snapdragon and Exynos devices
Debloat
Mod flag secure
Mod Outdoor mode
Mod remove permission when installing apps
Mod Theme Store
Vaultkeeper disabled
Proca disabled
Cass disabled
SCS disabled
CSC Features
Floating Features
knox counter at 0 (Samsung Health)
optimizations
Higher audio quality (Disabled DRC, which deeply compresses audio)
Deknoxed full (Including KnoxGuard)
Fix bluetooth pairings loss
and more
Installation:
This zip is meant to install from stock, if you have any problems please send it to me Universal_ROM_v2.x.log and recovery.log too, If it's a problem with the debloat send me too:
/sdcard/blacklist.txt
/Sdcard/packages.txt
Have stock One UI installed
Make a backup of the partitions (optional)
Just flash via recovery (TWRP recommended)
Format data
Reboot system
Downloads:
Version 2.1.1:
MD5: aa4e1555a5911b38687acd87568ce0af
AndroidFileHost: Download
Version 2.1.2:
MD5: 70607d913bd219018bea53321be43c5c
AndroidFileHost: Download
Version 2.1.3:
MD5: 4c24c7c2a0c22eb3678af6664ae02108
AndroidFileHost: Download
Version 2.1.4:
MD5: 83c658902ef14b675da9c61223fcca88
AndroidFileHost: Download
Version 2.1.5:
MD5: 8a91a604a7a3079571e7d25d93f8c38a
AndroidFileHost: Download
Version 2.2:
MD5: c4b8a62e229733b47ab73206e773ca36
AndroidFileHost: Download
Version 2.2.1:
MD5: 98696b8a42b7c02880891ec60c783c34
AndroidFileHost: Download
Version 2.2.1-b:
MD5: dbe0fd10d866ca8e2839de72cb7c1629
AndroidFileHost: Download
Credits:
@Gollo99 - Help and tips
@Nico04 - Help and tips
@3arthur6 - Fixed bluetooth pairing
@ShaDisNX255 - Mods
@BlassGO - Dynamic installer.
Thanks to all the users who tested
Paypal: Paypal.me ...
if you want to support the project
Telegram:
Channel: t.me/Swx...
XDA: DevDB Information
Universal, ROM for any Samsung Galaxy A
ROM OS Version: Android 11
Based on: ONE UI
Version Information
Status: Stable
Current Stable Versionl: 2.2.1-b
Stable Release Date: 2021-11-30
Edit the zip
Something I like about using this zip is that you can edit it according to your tastes or needs. I will show you how (Dynamic Installer Based Script Codes)
- Debloat:
You just have to add or delete the name of the apks that you want to be deleted during the installation in:
Apk name: "Universal ROM One UI v2.x.zip/META-INF/addons/blacklist.txt"
Apk package name: "Universal ROM One UI v2.x.zip/META-INF/addons/blacklist_packages.txt"
Script code:
Bash:
#Debloat normal
setdefault debloat_paths "
/system/app
/system/priv-app
/product/app
/product/priv-app
"
#Check IF AAPT WORKS
if ! can_run aapt; then
savelog "AAPT: FAIL"
else
savelog "AAPT: WORKS"
fi
#Start
apps=0
bloat=0
delete "$TMP/userlist.txt"
delete "$TMP/packages.txt"
for search in $debloat_paths; do
for userlist in $(find $search -type f -name "*.apk"); do
package=$(apk_package "$userlist")
echo "$userlist" >> "$TMP/userlist.txt"
echo "$(basename "$userlist")=$package" >> "$TMP/packages.txt"
export apps=$(($apps + 1))
done
done
#CAt debloat list
cat "$TMP/userlist.txt" > /sdcard/userlist.txt
cat "$TMP/packages.txt" > /sdcard/packages.txt
#Debloat blacklist.txt
for blacklist in $(cat "$addons/blacklist.txt"); do
black=$(grep -m1 "$blacklist" "$TMP/userlist.txt")
if defined black && exist "$black"; then
delete_recursive "$black"
if ! exist "$black"; then
export bloat=$(($bloat + 1))
package=$(get_file_prop $TMP/packages.txt "$(basename "$black")")
savelog " removed:blacklist:$bloat: package=$package path=$black"
huh=$(string escape "$(basename "$black")")
sed -i "/$huh/d" "$TMP/userlist.txt"
sed -i "/$huh/d" "$TMP/packages.txt"
else
savelog " -- CANT DELETE: $(basename "$black") "
fi
fi
done
#Debloat blacklist_packages.txt
for blackpack in $(cat "$addons/blacklist_packages.txt"); do
black=$(grep -m1 "$blackpack" "$TMP/packages.txt" | cut -d '=' -f1)
[ -z "$black" ] && continue
black=$(grep -m1 "$black" $TMP/userlist.txt)
if defined black && exist "$black"; then
delete_recursive "$black"
if ! exist "$black"; then
export bloat=$(($bloat + 1))
package=$(get_file_prop $TMP/packages.txt "$(basename "$black")")
savelog " removed:blacklist:$bloat: package=$package path=$black"
huh=$(string escape "$(basename "$black")")
sed -i "/$huh/d" "$TMP/userlist.txt"
sed -i "/$huh/d" "$TMP/packages.txt"
else
savelog " -- CANT DELETE: $(basename "$black") "
fi
fi
done
#end of debloat
ui_print " -- Removed $bloat of $apps applications"
- Decode OMC and csc features
Edit the following .xml files which are the features that will be added
cscfeatures.xml: "Universal ROM One UI v2.x.zip/omc/cscfeatures.xml"
cscfeatures_network.xml: "Universal ROM One UI v2.x.zip/omc/cscfeatures_network.xml"
Script code:
Bash:
#OMC
try_mount -e -rw /odm
#Check if dalvikvm work
run_jar_addon omc-decoder.jar > /dev/null || abort " CANT USE: run_jar: dalvikvm not available"
#Getting OMC type
if exist /system_root/optics/configs /system_root/prism/etc; then ported=true
elif exist /optics /prism; then newdevice=true
elif exist "$(find /product -type d -name "omc")" || exist "$(find /odm -type d -name "omc")"; then partdevice=true
elif exist "$(find /system -type d -name "omc")" || exist /system/csc; then olddevice=true
fi
#Getting OMC path
if defined newdevice; then
try_mount -rw -e /optics || abort " CANT MOUNT: /optics "
omc_path=/optics
elif defined partdevice; then
for omc in /product /odm; do
tryomc=$(find "$omc" -type f -name "cscfeature.xml" | head -n1)
if defined tryomc; then
if is_substring "/conf/" "$tryomc"; then
conf=true
omc_path=$(dirname "$(dirname "$(dirname "$tryomc")")")
else
omc_path=$(dirname "$(dirname "$tryomc")")
fi
fi
done
elif defined olddevice; then
if exist /system/csc; then
omc_path=/system/csc
else
tryomc=$(find /system -type f -name "cscfeature.xml" | head -n1)
if defined tryomc; then
omc_path=$(dirname "$(dirname "$tryomc")")
fi
fi
fi
#Decode All cscfeature.xml cscfeature_network.xml
error=0
ui_print " -- Decoding: $omc_path"
while read csc; do
if undefined csc; then abort "CANT FIND VALID PATH"; fi
if ! run_jar_addon omc-decoder.jar -d -i "$csc" -o "$csc"; then echo2 "CANT DECODE: $csc" && error=$(calc $error + 1); fi
done <<< $(find "$omc_path" -type f -name cscfeature.xml -o -name cscfeature_network.xml)
#Check results
if [[ "$error" != "0" ]]; then
abort " -- The installation had: $error ERRORs "
fi
#CSC Features
ui_print " -- Adding csc features... "
package_extract_dir omc "$TMP/omc"
#Get custom cscfeature.xml cscfeature_network.xml
base_csc=$(cat "$TMP/omc/cscfeature.xml")
base_network=$(cat "$TMP/omc/cscfeature_network.xml")
#Editing cscfeature.xml
for csc in $(find $omc_path -type f -name cscfeature.xml); do
content=$(string -f "$csc" extract '<FeatureSet>' '</FeatureSet>')
if defined content; then
replace "$content" "$base_csc" "$csc"
else
echo2 "CANT GET CONTENT: $csc"
fi
done
#Editing cscfeature_network.xml
for csc in $(find $omc_path -type f -name cscfeature_network.xml); do
content=$(string -f "$csc" extract '<FeatureSet>' '</FeatureSet>')
if defined content; then
replace "$content" "$base_network" "$csc"
else
echo2 "CANT GET CONTENT: $csc"
fi
done
#Remove enforcedeletepackage.txt enforceskippingpackages.txt
find $omc_path -type f -name enforcedeletepackage.txt -delete
find $omc_path -type f -name enforceskippingpackages.txt -delete
- Floating Features
Edit the following file to add the features to floating features (It does not matter if the line already exists in the stock file, it will be omitted)
Floating_Features.xml: "Universal ROM One UI v2.x.zip/META-INF/addons/floating.txt"
Script code:
Bash:
#Floating features
ui_print " -- Adding Features... "
update_file_string '<SEC_FLOATING_FEATURE_FRAMEWORK_CONFIG_AOD_ITEM>aodversion=7,clearcoveroff,clocktransition</SEC_FLOATING_FEATURE_FRAMEWORK_CONFIG_AOD_ITEM>' /vendor/etc/floating_feature.xml
force_update_file_addon floating.txt /vendor/etc/floating_feature.xml
- Tweaks build.prop
You can add or remove tweaks in the following files (in the same way as floating, if the line already exists it will be omitted)
/system/build.prop: "Universal ROM One UI v2.x.zip/META-INF/addons/newprops.txt"
/vendor/build.prop: "Universal ROM One UI v2.x.zip/META-INF/addons/vendorprops.txt"
Script code:
Bash:
#Define common files
if exist /system/build.prop; then
system_build="/system/build.prop"
else
abort "FATAL ERROR: Failed to find system partition "
fi
if exist /vendor/build.prop; then
vendor_build="/vendor/build.prop"
else
abort "FATAL ERROR: Failed to find vendor partition "
fi
#build.prop
update_file_string 'ro.build.display.id=Universal ROM One UI v2.2.1-b' $system_build
replace "ro.config.tima=1" "ro.config.tima=0" $system_build
update_file_string 'ro.config.dmverity=false' $system_build
force_update_file_addon newprops.txt $system_build
force_update_file_addon vendorprops.txt $vendor_build
update_file_string 'restore.feature.use_samsung_smart_switch_flow=0' /system/etc/prop.default
- Extra script codes
Flag Secure
Bash:
ui_print " "
ui_print " You want the patch for Flag Secure? "
press
if $yes; then
ui_print " -- Flag secure will be disabled"
flag=true
else
ui_print " -- Flag secure will not be disabled"
fi
#Flag secure
disable='
.locals 1
const/4 v0, 0x0
return v0
'
if defined flag; then
stock_services="/system/framework/services.jar"
mod_services="/system/framework/services.jar"
if ! unzip -l "$stock_services" | grep classes.dex >/dev/null; then
abort " You need a deodexed services.jar"
fi
ui_print " -- Decompiling services.jar... "
apktool -f d "$stock_services" -o "$TMP/services"
ui_print " -- Disabling Flag Secure... "
smali_kit -c -m "isSecureLocked()Z" -re "$disable" -d "$TMP/services"
smali_kit -c -m "preventTakingScreenshotToTargetWindow" -re "$disable" -d "$TMP/services"
ui_print " -- Recompiling services.jar (Please wait)..."
apktool --copy-original -f b "$TMP/services" -o "$mod_services"
if [ ! -e "$mod_services" ]; then
abort " -- Some ERROR occurred during the recompilation of services.jar ! "
elif ! unzip -l "$mod_services" | grep classes.dex >/dev/null; then
abort " -- Invalid file: services.jar "
fi
fi
Outdoor mode
Bash:
ui_print " "
ui_print " -- You want mod of Outdoor mode? "
press
if $yes; then
outdoor=true
ui_print " -- Outdoor mode will be enabled"
else
ui_print " -- Outdoor mod will not apply"
fi
#Outdoor mode
enable='
.locals 1
const/4 v0, 0x1
return v0
'
if defined outdoor; then
ui_print " -- Finding SecSettings.apk"
SecSettings=$(find_apk com.android.settings /system)
if undefined SecSettings; then
abort " CANT FIND: SecSettings.apk"
fi
ui_print " -- Decompiling SecSettings.apk"
dynamic_apktool -decompile "$SecSettings" -output "$TMP/Settings"
ui_print " -- Enabling outdoor mode..."
smali_kit -c -m "isAvailable" -remake "$enable" -dir "$TMP/Settings" -name "SecOutDoorModePreferenceController"
ui_print " -- Recompiling SecSettings.apk (Please wait)..."
dynamic_apktool -preserve-signature -recompile "$TMP/Settings" -output "$SecSettings"
if ! is_valid "$SecSettings"; then
abort "Some error in the SecSettings.apk recompilation"
fi
fi
ThemeCenter Patch
Bash:
ui_print " "
ui_print " -- You want mod of ThemeCenter Patch? "
press
if $yes; then
themes=true
ui_print " -- The mod will be applied"
else
ui_print " -- Mod will not apply"
fi
#ThemesCenter mod
dummy='
.registers 5
return-void
'
if defined themes; then
ui_print " -- Finding ThemeCenter.apk"
ThemesCenter=$(find_apk com.samsung.android.themecenter /system)
if undefined ThemesCenter; then
abort " CANT FIND: ThemesCenter.apk"
fi
ui_print " -- Decompiling ThemeCenter.apk"
dynamic_apktool -decompile "$ThemesCenter" -output "$TMP/Center"
ui_print " -- Patching ThemeCenter.apk..."
smali_kit -c -m "setTrialExpiredPackage" -remake "$dummy" -d "$TMP/Center"
smali_kit -c -m "setAlarm" -remake "$dummy" -d "$TMP/Center"
ui_print " -- Recompiling ThemeCenter.apk (Please wait)..."
dynamic_apktool -preserve-signature -recompile "$TMP/Center" -output "$ThemesCenter"
if ! is_valid "$ThemesCenter"; then
abort "Some error in the ThemesCenter.apk recompilation"
fi
fi
permission when installing apps
Bash:
ui_print " "
ui_print " -- You want remove permission when installing apps? "
press
if $yes; then
permission=true
ui_print " -- The mod will be applied"
else
ui_print " -- Mod will not apply"
fi
#permission when installing apps
disabledd='
.registers 6
invoke-direct {p0}, Lcom/android/packageinstaller/PackageInstallerActivity;->initiateInstall()V
return-void
'
if defined permission; then
ui_print " -- Finding GooglePackageInstaller.apk "
googleinstaller=$(find_apk com.google.android.packageinstaller /system)
if undefined googleinstaller; then
abort " CANT FIND: GooglePackageInstaller.apk"
fi
ui_print " -- Decompiling GooglePackageInstaller.apk"
dynamic_apktool -decompile "$googleinstaller" -output "$TMP/googleinstaller"
ui_print " -- Removing permission when installing apps..."
smali_kit -c -m "checkIfAllowedAndInitiateInstall" -remake "$disabledd" -dir "$TMP/googleinstaller" -name "PackageInstallerActivity"
ui_print " -- Recompiling GooglePackageInstaller.apk (Please wait)..."
dynamic_apktool -preserve-signature -recompile "$TMP/googleinstaller" -output "$googleinstaller"
if ! is_valid "$googleinstaller"; then
abort "Some error in the GooglePackageInstaller.apk recompilation"
fi
fi
fstab file (encryption storage)
Bash:
#fstab
for fstab in $(find /vendor/etc -type f -name "fstab.*"); do
if $(cat "$fstab" | grep -q "encryptable=ice"); then
savelog "device no encrypt"
else
ui_print " -- Patching $fstab... "
replace "fileencryption" "encryptable" $fstab
fi
done

Version 1.1.0:
- Fixed side key option (Bixby removed)
- Added ViperFX and OnePlus Launcher to apps that should not be removed
- Themes mod was added (Apply themes without trial limit)
- DFE was added on installation
- Optimizations
Version 1.1.1:
- Random WIFI MAC address error fixed
- Samsung Max was added to the apps that need to be removed
Version 2.1.1:
- Now works on any Galaxy A device that is Snapdragon or Exynos
- Optimizations added
- Updated the base of Dynamic Installer to version 3.0
- Other changes
Version 2.1.2:
- Fixed some bugs in exynos
- Other small changes
Version 2.1.3:
- Added ripple animation on devices with FOD (optional)
- Fixed option to change clock on devices without always on display
- Corrections in the debloat
Version 2.1.4:
- The following services were disabled: Frp, cass, vaultkeeperd, proca, wsm and encryption [fstab file]
- AirCommand added [SPen feature] (optional)
- Disable DRC audio is now optional
- Removed multidisabler and DFE
- Dynamic Installer base was updated to version 3.2
- Some corrections
Version 2.1.5:
- Fixed creating custom omc on devices with unsupported csc (Csc Features)
- Knox removal improved
- Camera features returns for Galaxy A70 devices
- Debloat was improved for snapdragon devices with dynamic partitions
- Removing some apps like Chrome, Game Launcher, Samsung Free, etc, is now optional (This will only ask if the app exists)
Version 2.2:
- Fixed installation on newer devices like Galaxy A72, A52, etc
- The system should be more stable
- Debloat improvements
- Redesigned debloat code logic
- Now decode the existing cscfeatures.xml and cscfeatures_network.xml during the installation and add the new features in them (before it deleted the existing ones and created a new one)
- The precision of the extra debloat was improved
- Added flag secure mod
- Now the bootanimation will keep the stock
- Will now delete bixby residues
- DeKnox improvements (will now clear knox permissions)
- Now delete permissions of some deleted apps
- Now disable scs service (services disabler)
- Now recovery-from-boot.p is also deleted
- Fixes some file contexts on installation
- AirComand was deleted
- Camera features was deleted from galaxy a70 due to some bugs
- The visual error in the TIMA version was corrected
- Smart switch is disabled in the initial android setup
- Samsung cloud was deleted because if bixby does not work it does not work and is useless
- Now wipe cache and dalvik is automatic at the end of the installation
- Wallpaper was updated
- Dynamic Installer base was updated to version 4.x
- And more
Version 2.2.1:
- Dynamic Installer base was updated to version 4.1-b
- Outdoor mod added
- Added mod of disable permission when installing apps
- Fixed selection to remove Chrome and Google app on devices with dynamic partitions
- VPN networks should work now
- Debloat improvements
- Now a installation log is created in /sdcard/Universal_ROM_v2.1.1.log, if you have any problems please send it to me and recovery.log too, If it's a problem with the debloat send me too:
/sdcard/blacklist.txt
/Sdcard/packages.txt
Version 2.2.1-b:
- Project name change to "Universal ROM One UI"
- Theme Store mod added

Devices tested:
- Galaxy A20
- Galaxy A30
- Galaxy A70
- Galaxy A51
- Galaxy A71
- Galaxy A21s
Please let me know if it works on other devices.

This is modifed original ROM?

oli231 said:
This is modifed original ROM?
Click to expand...
Click to collapse
It is a zip to edit your stock rom or stock base with only flash that you already have installed

Followed your steps and am having a bloat-free experience till now. Samasung health also working. No bugs whatsoever. Excited for future updates. Would really appreciate more development for this device. (A705gm)
Thanks

kirbyNx said:
Universal ROM Galaxy A70:
Hi guys, this time I bring something different... it is a zip to convert stock to a rom, this project is based on Dynamic Installer and SuperR custom zip.
This time it works for all variants of the Galaxy A70 ( SM-: A705FN, A705MN, A705GM, etc...)
I am not responsible for damaged phones, install at your own risk.
FEATURES:
Spoiler: Features
Debloat
Vaultkeeper disabled
Proca disabled
Wsm disabled
Cass disabled
Custom CSC Features
Floating Features
knox counter at 0 (Samsung Health)
optimizations
Higher audio quality (Disabled DRC, which deeply compresses audio)
Deknoxed full (Including KnoxGuard)
Secure Folder working
Multidisabler
Fix bluetooth pairings loss
and more
Installation:
This zip is intended to be installed over stock but if you get bootloop you can use one of the bases where encryption is disabled to allow booting
Just flash via recovery (TWRP recommended)
Format data
Reboot system
Downloads:
Version 1.0.1:
AndroidFileHost: download
Version 1.1.1:
AndroidFileHost: download
Download direct: download
Bases stock:
Extract .7z with an unzip program
Reboot recovery
Full wipes (Cache, Dalvik cache, system, vendor y data)
Install "system.img" as "system" image in TWRP
Install "vendor.img" as "vendor" image in TWRP
Install "boot.img" as "boot" image in TWRP
SM-A705MN: download
SM-A705FN: download
SM-A705GM: download
Credits:
@Gollo99 - Help and suggestions
@SuperR. - kitchen SuperR to make the zip
@Nico04 - Help and suggestions
@3arthur6 - Fixed bluetooth pairing
@BlassGO - Mods, secure folder, Dynamic Installer.
@itz_rogue_77 - Help, suggestions, and more
@ Samsung - FIrmware
Samsung Open Source
opensource.samsung.com
BTC: bc1qqtg3pgxkhm7egmh35qnsq8xmnjjte6zeyz8s30
Paypal: Paypal.me...
if you want to support the project
XDA: DevDB Information
Universal, ROM for the Samsung Galaxy A70
ROM OS Version: Android 11
Based On: ONE UI
Version Information
Status: Stable
Current Stable Version: 1.1.0
Stable Release Date: 2021-07-18
Click to expand...
Click to collapse
Al flashear el archivo pierde la aleatorizacion de Mac address y muestra la del dispositivo, puede solucionar eso por favor? . Mac Rndomization es muy importante para la privacidad
When flashing the file loses the Mac address randomization and shows that of the device, can you fix that please? . Mac Rndomization is very important for privacy

javierami said:
Al flashear el archivo pierde la aleatorizacion de Mac address y muestra la del dispositivo, puede solucionar eso por favor? . Mac Rndomization es muy importante para la privacidad
When flashing the file loses the Mac address randomization and shows that of the device, can you fix that please? . Mac Rndomization is very important for privacy
Click to expand...
Click to collapse
Logs please...

logs mac randomization not work

javierami said:
logs mac randomization not work
Click to expand...
Click to collapse
Ok, I have fixed it, I will update Universal ROM later

javierami said:
logs mac randomization not work
Click to expand...
Click to collapse
Meanwhile, you can fix it with just flash this file

after installing rom it goes in downoald mode

what are the differences between this and swx rom?

Awesome software and all working like it should GZ!!
One question, does this method remove TWRP? I cant enter it somehow. What are the keys to press? I watched youtube and none work...

rolarocka said:
Awesome software and all working like it should GZ!!
One question, does this method remove TWRP? I cant enter it somehow. What are the keys to press? I watched youtube and none work...
Click to expand...
Click to collapse
I think you can Access twrp if your phone connected to cable and use combination (up+power) then release
Second if you have root access you can use magisk manager or any boot app to enter twrp

Kraitos said:
I think you can Access twrp if your phone connected to cable and use combination (up+power) then release
Second if you have root access you can use magisk manager or any boot app to enter twrp
Click to expand...
Click to collapse
True, didn't know they changed that and made it annoying

Flash this file, and you will be able to turn on TWRP mode without connecting the power cord

kissa67zwi said:
Flash this file, and you will be able to turn on TWRP mode without connecting the power cord
Click to expand...
Click to collapse
Tyvm

kissa67zwi said:
Flash this file, and you will be able to turn on TWRP mode without connecting the power cord
Click to expand...
Click to collapse
Flash it how. i tried with twrp and it tells me i need magisk to use that file.

WharfRat4 said:
Flash it how. i tried with twrp and it tells me i need magisk to use that file.
Click to expand...
Click to collapse
After flashing magisk this file works

Related

[TEMPORARY FIX][TWEAK][MT6582] Xposed Installer Log File Gets Big

Hi All,
I am a happy user of Xposed Installer and using Modules.
However, one day my friend asked me if I could help him to fix the logging problems of Xposed because it almost ate like ~500MB of his internal space without him knowing it. So, I made this simple script to make a temporary fix (although I can still make this a little more flexible by checking the log file instead of running it on a fixed interval). I hope this helps and I hope Xposed dev can make an option to cleanup the logs generated by the modules.
More power
The script - I found that (not really proven, but as observed) looping scripts in the init.d are not very well handled so I did a workaround. I have the main script (cleaner) inside data and one script (trigger) in init.d. So here are they:
The main script - I placed on /data/Tweaks/scripts:
Code:
#!/system/bin/sh
# Name: 50_XposedCleanLog
# Date: 10/27/2014
# Author: Arsie Organo Jr. - [email protected]
# Link:
# About: This will clean up Xposed Installer app generated
# logs every X minutes.
# 1. Rooted
# 2. Busybox is installed.
####################################################
# Interval between 50_XposedCleanLog runs, in seconds, 18000=.5hour
XPOSEDLOGS=/data/data/de.robv.android.xposed.installer/log/error.log
a=0
sleepme=18000
while [ $a -ge 0 ]
do
busybox rm -f $XPOSEDLOGS
busybox touch $XPOSEDLOGS
chown root:root $XPOSEDLOGS
echo "Xposed Logs Cleanup Started $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $XPOSEDLOGS;
echo "Cleanup will run again in the next $(expr $sleepme / 60) min" | tee -a $XPOSEDLOGS;
echo $a
a=`expr $a + 1`
echo "Xposed Logs cleaner completed at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $XPOSEDLOGS;
sleep $sleepme
done
# END
And the trigger is placed in /system/etc/init.d - 10_DONOTDELETE:
Code:
#!/system/bin/sh
# Name: 10_DONOTDELETE
# Date: 10/28/2014
# Author: Arsie Organo Jr. - [email protected]
# Link:
# About: This script is needed to run all the tweaks
# and looping scripts.
# You will need your device to be:
# 1. Rooted
# 2. Busybox is installed.
####################################################
datalog=/data/Tweaks/logs/10_DONOTDELETE.log
busybox rm -f $datalog
busybox touch $datalog
# Xposed logs cleaner
/system/bin/sh /data/Tweaks/scripts/50_XposedCleanLog.sh > /dev/null 2>&1 &
if [ `busybox ps -ef | grep Tweaks | grep 50_XposedCleanLog.sh | wc -l` -eq 1 ] ;
then
echo "$( date +"%m-%d-%Y %H:%M:%S" ) Xposed logs cleaner initiated" | tee -a $datalog;
else
echo "$( date +"%m-%d-%Y %H:%M:%S" ) Xposed logs cleaner initialization FAILED" | tee -a $datalog;
fi;
So this simply means that the main script will be called upon restart and then loop it in the background checking the log file every 30min.
Note: Phone needs to be rooted and must have busybox installed. Tested on MediaTek MT6582 (MP Agua Rio) JB version.
I have attached a flashable here.. direct flash only and there is no need to wipe your cache.
This will work ONLY if your phone supports init.d and the generated Xposed log file is located here - /data/data/de.robv.android.xposed.installer/log/error.log
Wow very nice keep it up sir. :good:
Rovo89 set limit for log file to 5 MB. https://github.com/rovo89/XposedBridge/commit/afcc3e1e788ea44bfd00245a24b5dfe6c86aa3d0
Cool!
pyler said:
Rovo89 set limit for log file to 5 MB. https://github.com/rovo89/XposedBridge/commit/afcc3e1e788ea44bfd00245a24b5dfe6c86aa3d0
Click to expand...
Click to collapse
That's cool, however using the latest Xposed (experimental version) we've seen the error.log can go more than 500mb.
You can check the ridiculous size of the error.log below. So to aid this, I made this looping script.
eyesfortech said:
That's cool, however using the latest Xposed (experimental version) we've seen the error.log can go more than 500mb.
You can check the ridiculous size of the error.log below. So to aid this, I made this looping script.
Click to expand...
Click to collapse
Yes, this change is not part of 2.7 exp1.
too bad but there is always hope
pyler said:
Yes, this change is not part of 2.7 exp1.
Click to expand...
Click to collapse
yeah... I guess so, but there's always hope
huge issue
I check and mine is 7gb but when I check application manager it says xposed is using 11gb why?
manual Clear logs
bigchuk00 said:
I check and mine is 7gb but when I check application manager it says xposed is using 11gb why?
Click to expand...
Click to collapse
Hi,
have you tried manually clearing the logs from Xposed Logs options?
No. I didn't. The flash able zip was what I used n it worked fine . thank you.
Cool! I guess the permanent solution will be provided in the next update of Xposed (hopefully!)
It's just absurd that these 'error logs' rack up over a 100mb per day. The Xposed chappies say look at the log to see what module is causing the problem - well, I can't make head nor tail of the logs. Should be a better way of dealing with it.
eyesfortech said:
Cool! I guess the permanent solution will be provided in the next update of Xposed (hopefully!)
Click to expand...
Click to collapse
I admire your genius in setting up cron & it works flawlessly on my device, please would be able to create a flashable script or cron that will make @zeppelinrox sclean(wipe dalvik & reboot) script to run once each week?
slimcyril said:
I admire your genius in setting up cron & it works flawlessly on my device, please would be able to create a flashable script or cron that will make @zeppelinrox sclean(wipe dalvik & reboot) script to run once each week?
Click to expand...
Click to collapse
Unfortunately I am currently swamped with my day job and I cannot promise anything sooner. Can you give me the link the one you wanted me to try? And on what device? Currently I am no longer using MTK so testing it will also be a problem.
Thanks.
eyesfortech said:
Unfortunately I am currently swamped with my day job and I cannot promise anything sooner. Can you give me the link the one you wanted me to try? And on what device? Currently I am no longer using MTK so testing it will also be a problem.
Thanks.
Click to expand...
Click to collapse
Thanks for your response I later found what I was looking here http://forum.xda-developers.com/showthread.php?t=2700146

[CLOSED][OUTDATED][2017.2.7][GUIDES & DOCS] Magisk All-In-One Wiki

This thread is outdated and will never be updated
Please check the official Magisk documentation on Github!
Magisk All-In-One Wiki​
Table of Contents
Module Creation And Online Repos
Create your first Magisk Module; Submit to Magisk Module Repo
Notes Regarding Magisk Module Repos
Magisk Guides and Tricks
How Do Magic Mount Behave
Manipulate system props (build.prop)
Remove files / folders
Cache mounts
Magisk Details (DEV)
sepolicy-inject tool
Work flow
File structure
Boot stages
Module Creation And Online Repos
Create your first Magisk Module; Submit to Magisk Module Repo
Details are all listed in the module template on Github.​
Notes Regarding Magisk Module Repos
Magisk module can be different kinds, for example it can be used to debloat your system; it can be used to install your favorite application into system to give it the privilege of system apps.; it can be a full custom rom; it can also be cool mods like Xposed and root. However I view the "Magisk Module Repo" as a platform to share modules that can be used on lots of devices, preferably universal to all Android devices. Device specific modules are OK if stated clearly in the descriptions, and actually doing something that is non-trivial.
I will moderate the "Magisk Module Repo" in my personal preference and standard, here are some that will not be included:
Modules that are too large. A full custom rom, for example, is too large to be hosted on Github effectively. You can share them on XDA forums in your device specific forums
Modules that are too trivial. For example: mods that simply just add apps to system; debloating selective apps; doing things that can be done in simple boot scripts. I'll add more here if when I face requests that I consider "trivial"
Modules that contains copyright property (unless given permission)
Modules that violates XDA rules
This thread is outdated and will never be updated
Please check the official Magisk documentation on Github!
Magisk Guides and Tricks
How Do Magic Mount Behave
Magic Mount by default merges the files in $MODPATH/system into the real /system. You can think as it dirty flashes the contents into /system.
Existing files will be replaced; new files will be added; will not remove any files
Directories under $MODPATH/system that contains a file named ".replace" will NOT merge into the system. It will directly replace the correspond directory in /system.
In the module template, you can list them in "config.sh", the scripts will create the ".replace" file automatically for you.
You can think as it wipes the existing folder, and then adds contents to that folder in /system.
The directory that contains ".replace" will replace the one in /system, all contents originally in the folder will be discarded
Adding items to system is relatively expensive, Magisk would need to do many under-the-hood tasks to achieve it (thus, called "Magic Mount")
Furthermore, the higher level the file is added, the more it effects the overall system
Only add new items if necessary! Think twice before adding items to /system root!
Replacing a whole folder is recommended if viable, it reduces the complicated process and speed up the booting time
Manipulate system props (build.prop)
Since the early days of XDA, people love "build.prop" mods. It can bring cool effects to our devices.
build.prop files are loaded early in the boot process, and once read-in, the values cannot be modified... in theory.
Magisk included a tool called "resetprop", it can modify any system props you want easily.
In the module template, you can set PROPFILE=true, then add your props into the file common/system.prop
Magisk by default reads the system.prop of each module and set the props.
Further resetprop options:
Code:
usage: /data/magisk/resetprop [-v] [-n] [--file propfile] [--delete name] [ name value ]
-v :
verbose output (Default: Disabled)
-n :
no event triggers when changing props (Default: Will trigger events)
--file propfile :
Read props from prop files (e.g. build.prop)
--delete name :
Remove a prop entry
Remove files / folders
It is complicated to actually remove a file (possible, not worth the effort). Replacing it with a dummy file should be good enough
Add an empty file with the same name and path into your module (easy way), or add this code to the updater-script to create it at flash time
Code:
# Example: you want to remove /system/media/audio/alarms/Argon.ogg
# Note: mktouch is a function defined in my updater-script, it is not a standard command!
mktouch $MODDIR/system/media/audio/alarms/Argon.ogg
It is complicated to actually remove a folder (possible, not worth the effort). Replacing it with an empty folder should be good enough
Add the folder to the replace list in "config.sh" in the module template, it will replace the folder with an empty one
Cache mounts
Some files requires to be mounted much earlier in the boot process, currently known are bootanimation, and some libs (most users won't change them).
You can place your files into the corresponding location under /cache/magisk_mount, Magisk will automagiskally manage selinux contexts, permissions and the mounting for you. For example, you want to replace /system/media/bootanimation.zip, copy your new boot animation zip to /cache/magisk_mount/system/media/bootanimation.zip, Magisk will mount your files in the next reboot​
More to come ...
This thread is outdated and will never be updated
Please check the official Magisk documentation on Github!
Magisk Details (DEV)
sepolicy-inject
Before starting, check the complete document from Chainfire
SELinux Policy Section in How-To SU
The included sepolicy manipulation tool is called "sepolicy-inject", it supports live patching, and also supports policy statements following the same syntax as supolicy:
Code:
sepolicy-inject [--live] [--minimal] [--load <infile>] [--save <outfile>] [policystatement...]
--live: directly load patched policy to device
--minimal: minimal patches for boot image to let Magisk live patch on boot
Supported policy statements:
"allow #source-class #target-class permission-class #permission"
"deny #source-class #target-class permission-class #permission"
"auditallow #source-class #target-class permission-class #permission"
"auditdeny #source-class #target-class permission-class #permission"
"create #class"
"permissive #class"
"enforcing #class"
"attradd #class #attribute"
"typetrans source-class target-class permission-class default-class (optional: object-name)"
source-class and target-class can be attributes (patches the whole group)
All sections (except typetrans) can be replaced with '*' to patch every possible matches
Sections marked with '#' can be replaced with collections in curly brackets
e.g: allow { source1 source2 } { target1 target2 } permission-class { permission1 permission2 }
Will be expanded to:
allow source1 target1 permission-class permission1
allow source1 target1 permission-class permission2
allow source1 target2 permission-class permission1
allow source1 target2 permission-class permission2
allow source2 target1 permission-class permission1
allow source2 target1 permission-class permission2
allow source2 target2 permission-class permission1
allow source2 target2 permission-class permission2
Work flow
Code:
--------post-fs---------
(Device Boots) -> Mount Magisk cache files -> (build.prop and persist prop loads) ->
-----------------------------post-fs-data---------------------------------
-> Live patch sepolicy -> mount magisk.img -> Preparation -> 5 stage of tasks ->
--------------late_start--------------
-> (System Start Up) -> run all service.sh -> Start Magisk Hide
-> (Parallel with other processes....)
(Preparation) Magisk will travel through all enabled module directories to collect info
(1st stage) Mount system (vendor) mirrors. This is used to revert dummy files
(2nd stage) Clone the system structure, and mount the dummy directories to provide a dummy skeleton
(3rd stage) Mount module items into the system (and dummy skeletons)
(4th stage) Execute scripts
(5th stage) Mount the mirror items back to the remaining dummy files
File Structures
A "Magisk Module" is a subfolder under magisk root directory
The structure of a Magisk Module do not have a strict restriction. However, here are some key files / folders:
Code:
/magisk
|
|-.core <--- Magisk auto-generated files. Do not mess with them :)
| |
| |
| |-hosts <--- This file will be mounted to /system/etc/hosts to enable
| | systemless support for AdBlocker apps.
| |-magiskhide <--- This folder holds the hide list and add/rm/list/enable/disable scripts
| | | Include the magiskhide binary
| | |-magiskhide
| | |-hidelist
| | |-add
| | |-rm
| | |-list
| | |-enable
| | |-disable
| |
| |-su <--- This folder holds the MagiskSU binaries and scripts
| | | Include the magiskhide binary
| | |-su
| | |-magisksu.sh
| | |-sbin_bind <--- This folder will bind mount to /sbin
| | |-.....
| |
| |-post-fs-data.d <--- Place scripts that should be executed at post-fs-data here
| | |-.....
| |
| |-service.d <--- Place scripts that should be executed at late_start service here
| |-.....
|
|
|-other_module
| |-.....
|
|-your_module
| |
| |-auto_mount <--- If this file exists, auto mount is enabled
| |
| |-disable <--- If this file exists, the module is disabled
| |
| |-remove <--- If this file exists, the whole module folder
| | will be removed in the next reboot
| |-module.prop <--- This files stores the info of your module
| |
| |-system.prop <--- This file will be read by resetprop
| |
| |-post-fs-data.sh <--- This script will be executed in post-fs-data
| |
| |-service.sh <--- This script will be executed in late_start service
| |
| |-system <--- If auto mount is enabled, Magisk will "Magic Mount" this folder
| | |-....
| | |-....
| | |-....
| | |-....
| |
| |-vendor <--- Auto generated. A symlink to $MODID/system/vendor
| | Dealing with separate vendor partitions
| |-..... <--- Any other files/folders are allowed
|
|-another_module
| |-.....
|-...
Other important folders (under /dev), these will be created every boot
Code:
/dev/busybox <--- Busybox applet symlinks will be created here
|-.... Will be bind mounted to /system/xbin if enable busybox in Magisk Manager
|-....
|-....
/dev/magisk
|
|-dummy <--- Lies all cloned dummy structures
| | Folders in here will be mounted to /system
| |-.....
|
|-mirror <--- Lies all mirrors
| |
| |-system
| | |-....
| |
| |-vendor <--- Could be a symlink to /dev/mirror/system/vendor
| |-....
|
|-mnt <--- Lies all mounting info
|
|-dummy <--- Lists all dummy mounts
| |-....
|
|-mirror <--- Lists all mirror mounts
| |-....
|
|-system <--- Lists all /system mounts
| |-....
|
|-vendor <--- Lists all /vendor mounts
|-....
Boot Stages
If you are working on complicated projects, you shall need more control to the whole process.
Magisk can run scripts in different boot stages, you can fine tune exactly what you want to do.
post-fs mode:
This stage is BLOCKING. Boot process will NOT continue until everything is done, or 20 seconds has passed
Happens after most partitions are mounted, except /data
Magisk will bind mount items in: /cache/magisk_mount/system (*1)
post-fs-data mode:
This stage is BLOCKING. Boot process will NOT continue until everything is done, or 60 seconds has passed
Happens after /data is ready (including encrypted data)
Happens before Zygote is started (which means pretty much everything)
/data/magisk.img will be mounted to /magisk
Magisk will bind mount items in: /magisk/$MODID/system (*2)
Magisk will run script: /magisk/$MODID/post-fs-data.sh
Magisk will run scripts in: /magisk/.core/post-fs-data.d
late_start service mode:
This stage is NON-BLOCKING, it will run parallel with other processes
Put time consuming but non time critical tasks here. In other modes, the boot process will be stuck if it took too long to finish your tasks.
Happens when class late_start is started . Most things are are loaded/loading in this case.
Magisk will run script: /magisk/$MODID/service.sh
Magisk will run scripts in: /magisk/.core/service.d
(*1) Bind mounting in post-fs only support simple bind mounts, which mean you cannot add files or replace directories.
It will only mount files that exist in the current system.
(*2) Bind mounting in post-fs-data support complex bind mounts. Please refer to the "Magic Mount" section
Thanks for this @topjohnwu.
If github is the where all modules need to be hosted, how do we plan on supporting closed source modules?
Or is closed source modules not supported?
@topjohnwu is there any thought about aroma installers being supported? is this already possible? or are you planning to add something similar?
I've tried to build a v7-compatible zip file for an app and Magisk Manager kept crashing with the following in its module.prop:
Code:
versionCode=7.1.3231428
Is it supposed to be a single round number (like a versionCode for Android apps)?
anantharam said:
Thanks for this @topjohnwu.
If github is the where all modules need to be hosted, how do we plan on supporting closed source modules?
Or is closed source modules not supported?
Click to expand...
Click to collapse
You can host closed source binary on Github.
ibrokemypie said:
@topjohnwu is there any thought about aroma installers being supported? is this already possible? or are you planning to add something similar?
Click to expand...
Click to collapse
You can flash the Magisk Module template in aroma with the same method to flash SuperSU. However if the module itself is made with aroma, it will not be able to flash in Magisk Manager
stangri said:
I've tried to build a v7-compatible zip file for an app and Magisk Manager kept crashing with the following in its module.prop:
Is it supposed to be a single round number (like a versionCode for Android apps)?
Click to expand...
Click to collapse
Yes, the versionCode is the similar concept of Android application's version code. It has to be a single number. You can place your long version number into version, which supports any string.
i have a problem with MagiskManager 2.0 launch.... app stopped after open it.
Zenfone ZE520KL...
Also, plz help - where can i found new supersu 2.78 for magisk?
topjohnwu said:
Yes, the versionCode is the similar concept of Android application's version code. It has to be a single number. You can place your long version number into version, which supports any string.
Click to expand...
Click to collapse
Still, the magisk manager shouldn't crash on invalid versionCode.
I need to patch in lines to audio_effects.conf rather than replace the file. Is there any way to do a systemless merge of lines within a conf with Magisk?
Hello, I'm trying to bring the OnePlus Camera to Magisk, and I'm having issues. I feel that I understand how to create a Magisk module from following your tutorial on Github, but apparently I don't. I just spent about 25 minutes trying to figure this out on my own, and couldn't.
When I flash my zip, I get error 255 in TWRP. It claims "/tmp/updater" doesn't exist. Magisk Manager also claims it's not a Magisk module when trying to manually add it in the app.
Below is the recovery.log, and link to the Github repo for what I'm working on. Any help is appreciated!
Source: https://github.com/ryanguy426/OnePlus-Camera-Magisk
recovery.log (PasteBin): http://pastebin.com/z0B9jaSM
ryanguy426 said:
When I flash my zip, I get error 255 in TWRP. It claims "/tmp/updater" doesn't exist. Magisk Manager also claims it's not a Magisk module when trying to manually add it in the app.
Source: https://github.com/ryanguy426/OnePlus-Camera-Magisk
recovery.log (PasteBin): http://pastebin.com/z0B9jaSM
Click to expand...
Click to collapse
AFAIK If you use the Magisk v7 template (from github), you do not flash resulting ZIP in recovery. Also, I'm not sure if just downloading the ZIP file from github will do, AFAIK doing that creates a nesting folder which is probably why Magisk refuses to add the module.
I can create the correct ZIP and I would have tried it on my phone, but I followed your support link and it leads to the generic Magisk thread and doesn't list specific models it's compatible with, so I refrained.
PS. Fix REPLACE in your config.sh
stangri said:
AFAIK If you use the Magisk v7 template (from github), you do not flash resulting ZIP in recovery. Also, I'm not sure if just downloading the ZIP file from github will do, AFAIK doing that creates a nesting folder which is probably why Magisk refuses to add the module.
I can create the correct ZIP and I would have tried it on my phone, but I followed your support link and it leads to the generic Magisk thread and doesn't list specific models it's compatible with, so I refrained.
PS. Fix REPLACE in your config.sh
Click to expand...
Click to collapse
I haven't created a support thread yet, as XDA doesn't allow placeholder threads. I'll create the thread when the module works.
I'll start over with it, and see if I can get it working. They're for the tips!
I have created a module that will enable miracast by adding a line to the build.prop. When I try to manually add the module to magisk I get an error saying "This zip is not a magisk module!!" Can someone please tell me what I'm doing wrong.
Here is the module : github.com/blake1029384756/EnableMiracast
Blake1029384756 said:
I have created a module that will enable miracast by adding a line to the build.prop. When I try to manually add the module to magisk I get an error saying "This zip is not a magisk module!!" Can someone please tell me what I'm doing wrong.
Here is the module : github.com/blake1029384756/EnableMiracast
Click to expand...
Click to collapse
If you are downloading the zip from github it nests a folder within it which magisk doesnt like, you need to zip up the files in the root of the zip.
ibrokemypie said:
If you are downloading the zip from github it nests a folder within it which magisk doesnt like, you need to zip up the files in the root of the zip.
Click to expand...
Click to collapse
I am aware that it does that and have made sure all files are in the root of the zip. Idk why it doesnt add to magisk manager
ahrion said:
I need to patch in lines to audio_effects.conf rather than replace the file. Is there any way to do a systemless merge of lines within a conf with Magisk?
Click to expand...
Click to collapse
Just make a copy of the file as /magisk/your_mldule/system/etc/audio_effects.conf, and modify the fake aidio_effects.conf which will be mounted during boot.
But the weird thing is that some setprop commands don't work when it is written in post-fs-data or post-fs, at least under Magisk v6 OnePlus 3 Oxygen OS. I have to write the setprop modifications in a fake build.prop instead.
Here is the module that I transplant from guitardedhero's ViPER4Audio_5.4_Stock.zip. Maybe it would help.
BTW: The attachment doesn't work well on v7, it stuck at boot animation. While it works well on v6.
Iceyogurt said:
Just make a copy of the file as /magisk/your_mldule/system/etc/audio_effects.conf, and modify the fake aidio_effects.conf which will be mounted during boot.
But the weird thing is that some setprop commands don't work when it is written in post-fs-data or post-fs, at least under Magisk v6 OnePlus 3 Oxygen OS. I have to write the setprop modifications in a fake build.prop instead.
Here is the module that I transplant from guitardedhero's ViPER4Audio_5.4_Stock.zip. Maybe it would help.
BTW: The attachment doesn't work well on v7, it stuck at boot animation. While it works well on v6.
Click to expand...
Click to collapse
Perhaps you might be able to tell me why Magisk Manager isn't recognizing my zip as a Magisk module...https://github.com/therealahrion/Audio-Modification-Framework
ahrion said:
Perhaps you might be able to tell me why Magisk Manager isn't recognizing my zip as a Magisk module...https://github.com/therealahrion/Audio-Modification-Framework
Click to expand...
Click to collapse
It is not easy to find a bug in my mobile browser. I'll try to look through your script more carefully when I get a PC. Now there is a mistake in the config.sh.
Code:
# This is an example
REPLACE="
/system/app/Youtube
/system/priv-app/SystemUI
/system/priv-app/Settings
/system/framework
"
# Construct your own list
REPLACE="
/system/etc
/system/vendor/etc
"
The first variable REPLACE is an example, so just delete it.(oh sorry, I forget it will be revalued because of the second one) And leave the second REPLACE void.
Code:
# Construct your own list
REPLACE=""
Since the value of REPLACE are folders, it mean replace an existing folder with a same-name-folder. The modified fake audio_effects.conf file will be mounted to replace the existing file automatically. No need to replace a whole folder.
ahrion said:
Perhaps you might be able to tell me why Magisk Manager isn't recognizing my zip as a Magisk module...https://github.com/therealahrion/Audio-Modification-Framework
Click to expand...
Click to collapse
Sorry about it, i can't figure out the reason either. I don't recommend you do the modification of the audio config files in post-fs-data.sh, which will be executed during every boot. I love your dax, wish it be a magisk module soon.

[Magisk] Magisk Mount ReSize IMG

Magisk Mount , UnMount & ReSize IMG
This is Magisk Mount , UnMount & ReSize IMG ZIP for Users/Developers.
A.K.A. "M2RI" in Short For MagiskMountReSizeIMG.
By Dark❶
Profile @ XDA-Developers : Dark❶ .
Profile @ GitHub : Dark❶ .
Magisk Mount & UnMount IMG :-
GitHub Pages Site : Magisk Mount & UnMount IMG
GitHub Repository : MagiskMountUnMountIMG
XDA Developers Topic : [Magisk] Magisk Mount & UnMount IMG
Notes :
Useful for Users/Developers who wants to Edit Magisk IMG.
This script is Depending on "Magisk" Binary File , Will Not work without IT.
Module folder can be [Deleted/Added] to [Remove/Add] a Module.
File can be [Edited/Modified/Deleted/Added] as per Users/Developers wish.
This ZIP Mount's OR UnMount's on Different Condition's :
1. If "magisk.img" is NOT Mount'ed , Then Mount "magisk.img" To "/Magisk" .
2. If "magisk.img" is Mount'ed , Then UnMount "/Magisk" From "magisk.img" .
This ZIP ReSize's on Different Mounting OR UnMounting ReSize Mode Condition's.
Following is the Pseudo Code for Mount & UnMount :
IF [ ReSize Mode Only ] , Then :
Will UnMount Magisk IMG If Mounted. ~ UnMount "/Magisk" ⇏ "magisk.img" .
This ZIP will ReSize Magisk IMG as-per User Requirement.
ELSE-IF [ "magisk.img" is NOT Mount'ed AND Mounting is Allowed ] , Then :
This ZIP will ReSize Magisk IMG as-per User Requirement.
Then , will Mount Magisk IMG. ~ Mount "magisk.img" ➔ "/Magisk" .
ELSE-IF [ "magisk.img" is Mount'ed AND UnMounting is Allowed ] , Then :
This ZIP will UnMount Magisk IMG. ~ UnMount "/Magisk" ⇏ "magisk.img" .
Then , will ReSize Magisk IMG as-per User Requirement.
ELSE , Then :
This ZIP will Do Nothing BUT Print some Sh*t InFo.
Following is the Pseudo Code for ReSize Mode :
CASE "ReSizeMode" IN
0 , Then :
Display InFo of Magisk IMG "magisk.img".
1 , Then :
ReSize** to Default "64MB" OR MoRe Depending on Current Used IMG Size.
2 , Then :
ReSize to *User Specified Size* ,
BUT NOT less than "64MB" OR Current Used IMG Size.
*User Specified Size* Need's to be Positive[+] Only.
3 , Then :
**ReSize** to Current IMG Size + User Specified Size = Total,
BUT *Total* is *NOT* less than "64MB" OR Current Used IMG Size.
*User Specified Size* Can be Positive[+] OR Negative[-].
I have Copied the Code from "magisk-module-template" ZIP by @topjohnwu.
I have Edited some part of the Code to make it work.
I have Added some part of the Code to make it work.
I have Added some Necessary File(s).
I have Removed Un-Necessary part of Code Because It is Either Not Used OR Not Needed.
I have Removed Un-Necessary Directory(s) & File(s) Because It is Either Not Used OR Not Needed.
I have DoNe Some Optimization to code.
Download : MagiskMountReSizeIMG-v2.0.zip
Download History : XDA:DevDB Downloads OR This Post .
...
XDA:DevDB Information
Magisk Mount ReSize IMG, Tool/Utility for all devices (see above for details)
Contributors
Dark❶
Source Code: https://github.com/dark-1/MagiskMountReSizeIMG
Version Information
Status: Stable
Current Stable Version: 2.0.0
Stable Release Date: 2017-10-25
Created 2017-09-19
Last Updated 2017-10-25
Reserved
Reserved
Explanation :
Explanation from "config.sh" :
Code:
###############################################
## Mount / UnMount Switch [..SW] ##
###############################################
#
# To be Set For "MTSW" , "UTSW" & "ROSW". [..SW]
#
# Set to " true " , To Allow Mount / UnMount .
# Set to " false " , To Prevent Mount / UnMount .
#
# Default is " true " , For Both , "MTSW" & "UTSW". [..SW]
# And " false " For "ROSW".
#
###############################################
###############################################
## ReSize Mode [..RSMO] ##
###############################################
#
# To be Set For "MTRSMO" , "UTRSMO" & "RSMO". [..RSMO]
#
# Set to " 0 " , To Display InFo of Magisk IMG "magisk.img".
# Set to " 1 " , To ReSize to Default "64M" OR MoRe Depending on "Current Used Size".
# Set to " 2 " , To ReSize to "User Specified Size".
# Set to " 3 " , To ReSize to "Current IMG Size" + "User Specified Size".
#
# Default is " 0 " , For All , "MTRSMO" , "UTRSMO" & "RSMO". [..RSMO]
#
###############################################
###############################################
## User Specified Size [..RSMB] ##
###############################################
#
# To be Set For "MTRSMB" , "UTRSMB" & "RSMB". [..RSMB]
#
# All Number's Here Should be Multiple of " 4 " AND in MegaBytes[M].
# AND No Need to Specify character " M " OR " MB ", Just a Number.
#
# IF ReSizeMODE is " 2 " ,
# Then "User Specified Size" Should NOT be less-than "64MB" OR "Current Used IMG Size".
# AND "User Specified Size" Need's to be Positive[+] Only.
# No Need to Specify character " + ".
# IF ReSizeMODE is " 3 " ,
# Then "Current IMG Size" + "User Specified Size" = "Total",
# AND "Total" Should NOT be less-than "64MB" OR "Current Used IMG Size".
# "User Specified Size" Can be Positive[+] OR Negative[-],
# Hence Need to Specify character " + " OR " - ".
#
# Default is " 64 " , For All , "MTRSMB" , "UTRSMB" & "RSMB". [..RSMB]
#
###############################################
Example from "config.sh" :
Code:
###############################################
## Example's ##
###############################################
#
# While Mounting , you want the "magisk.img" to be 80MB,
# then "MTRSMO" & "MTRSMB" will be :
# MTRSMO=2
# MTRSMB=80
#
# Now , after Mounting the "magisk.img" ,
# And While UnMounting , you want the "magisk.img" to be Reduced by 12MB [-12MB],
# then "UTRSMO" & "UTRSMB" will be :
# UTRSMO=3
# UTRSMB=-12
#
###############################################
EnJoY ...
Download History :
Download :
v1.0 : MagiskMountReSizeIMG-v1.0.zip
v2.0 : MagiskMountReSizeIMG-v2.0.zip
Changelog
v0.0
- Initialized.
v1.0
- Initial Release.
- Copied the Code.
- Edited some part of the Code.
- Added some part of the Code.
- Added some Necessary File(s).
- Removed Un-Necessary part of Code.
- Removed Un-Necessary Directory(s) & File(s).
v2.0
- Yea! Jump in Version.
- Updated "update-binary".
- Fix a Critical Bug due to Duplicate Code.
- Optimized the Code.
- Added some Checks.
Credit's
Thank's @topjohnwu for Magisk & for the code in "magisk-module-template" , could not have done without it.
Announcement :
This Thread is not Completed , Kindly give Me some Time Slag .....
Thread is now Completed. Thanks for your Patience.
MagiskMountReSizeIMG v2.0
Here is MagiskMountReSizeIMG v2.0 :
- Yea! Jump in Version.
- Fix a Critical Bug due to Duplicate Code.
- Optimized the Code.
- Added some Checks.
Download : MagiskMountReSizeIMG-v2.0.zip
Wouldn't mind a set of usage instructions that are a bit clearer as opposed to being outlined in pseudo-code. What I'm gathering is that you flash to mount/unmount and that image resizing is automated based on your additions/deletions. That sound about right? Is this to be flashed in recovery or via Magisk Manager?
return.of.octobot said:
Wouldn't mind a set of usage instructions that are a bit clearer as opposed to being outlined in pseudo-code. What I'm gathering is that you flash to mount/unmount and that image resizing is automated based on your additions/deletions. That sound about right? Is this to be flashed in recovery or via Magisk Manager?
Click to expand...
Click to collapse
Yea!!!
& Only in Recovery. This is NOT a Module.
Check my 4th Post : https://forum.xda-developers.com/showpost.php?p=73852785&postcount=4
Cleaner Instruction than that ,,,, then I'll need some time.
Best regards. :good:
Dark❶ said:
Yea!!!
& Only in Recovery. This is NOT a Module.
Check my 4th Post : https://forum.xda-developers.com/showpost.php?p=73852785&postcount=4
Cleaner Instruction than that ,,,, then I'll need some time.
Best regards. :good:
Click to expand...
Click to collapse
No, you're right, my issues had less to do with lack of instructions and more to do with the fact that I'm trying to resize magisk.img on a device with A/B partitions. I don't know why it is, but I've tried plethora of resizing methods, as well as modules that should auto-resize but they all fail and I've discovered in the terminal app systemizer thread that there's a commonality of this issue on A/B devices.
Any chance for update, so it'll work with /data/adb/img?
ch3mn3y said:
Any chance for update, so it'll work with /data/adb/img?
Click to expand...
Click to collapse
Yea!!! I'll try , but no ETA.
I don't think it works with Magisk 17...
I get an error Magisk not found... ?
Dante63 said:
I don't think it works with Magisk 17...
I get an error Magisk not found... ?
Click to expand...
Click to collapse
Yea! I'll Update it soon ....
I am busy with other stuff...
Best regards :good:
Dark❶ said:
Yea! I'll Update it soon ....
I am busy with other stuff...
Best regards :good:
Click to expand...
Click to collapse
I'll be fixing myself...
I know what to do... ?
Great job though
Dante63 said:
I'll be fixing myself...
I know what to do... ?
Great job though
Click to expand...
Click to collapse
If you could make a PR , that would be highly appreciated my friend.
Best regards :good:
Dark❶ said:
If you could make a PR , that would be highly appreciated my friend.
Best regards :good:
Click to expand...
Click to collapse
I'm not good with binary I guess...
Since I get error 2...
I only do script...
I added the script in binary "I know it's different" but that's what I know and I simply crossed fingers hoping it's right ?...
I suppose I'll have to wait for you...
Dante63 said:
I'm not good with binary I guess...
Since I get error 2...
I only do script...
I added the script in binary "I know it's different" but that's what I know and I simply crossed fingers hoping it's right ...
I suppose I'll have to wait for you...
Click to expand...
Click to collapse
Hey!
Try this PR : https://github.com/dark-1/MagiskMountReSizeIMG
I have updated my repo , but it's not tested with all conditions yet.
but if you could , give it a try.
Best regards :good:

[WORKAROUND] - Magisk Not Installed - [Module]

I have Magisk v18.1 installed on my OG Pixel running PixelDust ROM and noticed every so often it loses root access. When entering the Magisk Manager app it also shows Magisk Not Installed. I did some investigating and found that magiskd (magisk daemon) gets terminated at some point randomly. Further testing revealed I could restart it manually by issuing "magisk --daemon" via SSH/ADB root shell.
I wrote a simple module to keep the daemon running and haven't noticed the "Magisk Not Found" error since. The module is just a simple bash script executed as service on boot that checks every minute for the daemon and runs the "magisk --daemon" command as root if not running. I am just posting it here to see if it can help anyone else who's root access disappears randomly on v17-19.3.
Please be aware that this is my first module ever. It was also originally started via an init.d script instead of the service hook in magisk, though it should work exactly the same. I have also noticed it is not possible for my module to restart magiskd yet if it was killed manually by the user.
GIt Repo:
https://github.com/Geofferey/mgkdhelper
Magisk Repo Submission:
https://github.com/Magisk-Modules-Repo/submission/issues/404
Release:
UNINSTALL INITIAL v1.0.0 RELEASE BEFORE INSTALL!!!
If you fail to do so you will have the old version and current version running at same time.
Download:
Current Release v2.1.0
Major thanks to @jcmm11 & @char101 whose contributions are now officially included in this module.
I just wanna say God bless you for this module, my man. I was frustratingly having my Magisk daemon getting killed 2-3 times a day On my LG V20. Since installing your module for the past 4 days ive yet to encounter such an issue. I greatly appreciate you coming up w/a solution to a problem that was frustrating me to the max
Geofferey said:
I wrote a simple module to keep the daemon running and haven't noticed the "Magisk Not Found" error since.
Click to expand...
Click to collapse
Thanks for that module. Very good idea and it's working perfectly fine. :good:
Hi,
There is no /data/local/run directory by default on my phone (OP6 Pie). So I suggest that either you create it first or simply uses /data/local/tmp to store the pid. Also creating the directory first might be a good idea. If you add -q to the grep command there is no need to redirect the output.
Code:
#!/system/xbin/bash
PIDFILE=/data/local/tmp/magiskd-helper.pid
LOGFILE=/data/local/tmp/magiskd-helper.log
is_magisk_running() {
ps -a | grep -q [m]agiskd
}
if [ ! -d /data/local/tmp ]; then
mkdir -p /data/local/tmp
fi
if [ -f $PIDFILE ]; then
kill -9 `cat $PIDFILE`
fi
echo $$ > $PIDFILE
RETRIES=0
while true; do
sleep 60
if ! is_magisk_running; then
echo `date` >> $LOGFILE
echo 'Magisk daemon appears to have crashed' >> $LOGFILE
echo 'Restarting magiskd...' >> $LOGFILE
/sbin/magisk --daemon
if is_magisk_running; then
echo 'Success!' >> $LOGFILE
RETRIES=0
else
echo 'Failure!' >> $LOGFILE
((++RETRIES))
if (( $RETRIES > 10 )); then
echo 'Giving up' >> $LOGFILE
break
fi
fi
echo >> $LOGFILE
fi
done
When first run, /system/bin/ps is linked to magisk builtin busybox, which don't have the -u option
Code:
ps: invalid option -- u
BusyBox v1.30.1-topjohnwu (2019-04-30 01:01:15 EDT) multi-call binary.
Usage: ps [-o COL1,COL2=HEADER] [-T]
Show list of processes
-o COL1,COL2=HEADER Select columns for display
-T Show threads
char101 said:
When first run, /system/bin/ps is linked to magisk builtin busybox, which don't have the -u option
Code:
ps: invalid option -- u
BusyBox v1.30.1-topjohnwu (2019-04-30 01:01:15 EDT) multi-call binary.
Usage: ps [-o COL1,COL2=HEADER] [-T]
Show list of processes
-o COL1,COL2=HEADER Select columns for display
-T Show threads
Click to expand...
Click to collapse
Try again after having install the 'Busybox for NDK' Magisk module (from osm0sis), maybe that the -u arg for ps command will works i ddon't remember me having testing it recently so idk if it will works but i think yeah
I have the GNU coreutils module installed so it is not the problem.
Also the original module redirect stderr to /dev/null so unless you modify it you won't see the error like I posted before.
My modifications
service.sh
Code:
#!/system/bin/sh
# Do NOT assume where your module will be located.
# ALWAYS use $MODDIR if you need to know where this script
# and module is placed.
# This will make sure your module will still work
# if Magisk change its mount point in the future
MODDIR=${0%/*}
# This script will be executed in late_start service mode
$MODDIR/common/magisk-monitor > /data/local/tmp/magisk-monitor.log 2>&1 &
magisk-monitor
Code:
#!/system/bin/sh
is_magisk_running() {
ps -A | grep -q [m]agiskd
}
sleep 300
echo `date`
echo 'magisk-monitor running'
echo
RETRIES=0
while true; do
sleep 60
if ! is_magisk_running; then
echo `date`
echo 'Magisk daemon appears to have crashed'
echo 'Restarting magiskd...'
/sbin/magisk --daemon
if is_magisk_running; then
echo 'Success!'
RETRIES=0
else
echo 'Failure!'
((++RETRIES))
if (( $RETRIES > 10 )); then
echo 'Giving up'
break
fi
fi
echo
fi
done
Rom said:
Try again after having install the 'Busybox for NDK' Magisk module (from osm0sis), maybe that the -u arg for ps command will works i ddon't remember me having testing it recently so idk if it will works but i think yeah
Click to expand...
Click to collapse
I doubt it... From busybox.net:
ps
Report process status
Options:
-o col1,col2=header Select columns for display
-T Show threads
Click to expand...
Click to collapse
It is better to just use 'ps -A' which will work on busybox ps and coreutils ps.
Didgeridoohan said:
I doubt it... From busybox.net:
Click to expand...
Click to collapse
I'm agree with u, but it was already happen for me that some other args works too, i had never know why.
I came across your module while looking for the same issue affecting many users on different devices (although it seems to be affecting Pie only). Magisk GitHub is also full of reports by people losing root and solving with a reboot. I don't know how impactful it is on the battery since it checks for Magisk every 60 seconds (I have just installed it) but so far your module is the only blessing we can get to avoid rebooting once/twice per day. I think you should definitely submit your module to the official repository!
P.s i had to create /data/local/run first for the pid
@Geoffrey another quick correction: in my case on MIUI 10 based on Pie, ps -a does not show the same output as ps -A. So I had to replace the -a in your script with an upper case A.
char101 said:
It is better to just use 'ps -A' which will work on busybox ps and coreutils ps.
Click to expand...
Click to collapse
Coreutils doesn't have a ps applet. If you want to use -u just use the full path /system/bin/ps to force the toybox applet.
@Geoffrey
First of all nice workaround. I did some cleanup and a few modifications if you want to post it to the Magisk repository (and I think you should).
Changed over to the current template.
Removed all the PID stuff, it's really not needed.
Replaced ps -a -u with pgrep. That eliminates any busybox vs toybox issues (at least the way it's being used here)
Removed bash. There's nothing here that requires a bash shell as opposed to the default shell.
Moved the script to it's own directory instead of xbin. Not all phones have xbin, and trying to use it on those that don't is problematic. Plus there's no reason the script needs to be in the PATH.
Added nohup to the script startup command in service.sh
Also always create the log file, with a "started on" line in it. That at least gives an indication that the script started.
So what we're left with.
mgkd-helper (in a script directory)
Code:
#!/system/bin/sh
LOGFILE=/data/local/tmp/magiskd-helper.log
rm -f $LOGFILE
echo "Started " $(date) >> $LOGFILE
echo "-----------------------------" >> $LOGFILE
echo >> $LOGFILE
while true; do
sleep 60
if ! pgrep magiskd >/dev/null; then
echo $(date) >> $LOGFILE
echo "Magisk daemon appears to have crashed" >> $LOGFILE
echo "Restarting magiskd..." >> $LOGFILE
if magisk --daemon; then
echo "success!" >> $LOGFILE
else
echo "failure!" >> $LOGFILE
fi
echo >> $LOGFILE
fi
done
service.sh
Code:
#!/system/bin/sh
# Do NOT assume where your module will be located.
# ALWAYS use $MODDIR if you need to know where this script
# and module is placed.
# This will make sure your module will still work
# if Magisk change its mount point in the future
MODDIR=${0%/*}
# This script will be executed in late_start service mode
#Magisk Daemon Helper
# Copyright (C) 2019 Geofferey @ XDA
# License: GPL V3+
nohup $MODDIR/script/mgkd-helper > /dev/null &
If you do decide to place it in the repository you need to do something with README.md
You should also replace META-INF/com/google/android/update-binary with the attached version. The included version is for standalone installs. Repository versions should use the alternate one. (Remove the ".txt")
Last note: tested this and it does work. I killed the running magiskd and a new one was started, with the appropriate log entry created
I wasn't able to start magiskd with "magisk -- daemon" via adb. It always says "No daemon found" instead of starting it. I seem to have lost root with the original script and I had to restart again. Any idea? I just enabled root via adb in Magisk. Not sure if that was the issue that I couldn't restart it.
And it seems like magiskd is killed in OxygenOS 9.0.5 on my OnePlus 6. Not sure if it is due to out of memory reasons but I can't get any logcat as I don't have root. Super annoying.
Will this be added to the magisk module repository? If it is there I couldn't find it. I do know there are links and a revision at the end of the thread by @jcmm11. I don't need the module, just curious if the revision will be put there eventually. I have had others with that problem that I have helped.
Thanks
martyfender said:
Will this be added to the magisk module repository? If it is there I couldn't find it. I do know there are links and a revision at the end of the thread by @jcmm11. I don't need the module, just curious if the revision will be put there eventually. I have had others with that problem that I have helped.
Thanks
Click to expand...
Click to collapse
I think it should be but it's up to @Geoffrey. It's his module. I cleaned it up a bit that's all. Most of the work is done. Biggest thing left to do is modify README.md
jcmm11 said:
@Geoffrey
First of all nice workaround. I did some cleanup and a few modifications if you want to post it to the Magisk repository (and I think you should).
Changed over to the current template.
Removed all the PID stuff, it's really not needed.
Replaced ps -a -u with pgrep. That eliminates any busybox vs toybox issues (at least the way it's being used here)
Removed bash. There's nothing here that requires a bash shell as opposed to the default shell.
Moved the script to it's own directory instead of xbin. Not all phones have xbin, and trying to use it on those that don't is problematic. Plus there's no reason the script needs to be in the PATH.
Added nohup to the script startup command in service.sh
Also always create the log file, with a "started on" line in it. That at least gives an indication that the script started.
So what we're left with.
mgkd-helper (in a script directory)
service.sh
If you do decide to place it in the repository you need to do something with README.md
You should also replace META-INF/com/google/android/update-binary with the attached version. The included version is for standalone installs. Repository versions should use the alternate one. (Remove the ".txt")
Last note: tested this and it does work. I killed the running magiskd and a new one was started, with the appropriate log entry created
Click to expand...
Click to collapse
Should we directly flash zip in twrp recovery
kryshnakishore said:
Should we directly flash zip in twrp recovery
Click to expand...
Click to collapse
You can flash it in recovery or via Magisk Manager, modules section, big + button at bottom of screen.
I've been looking for a solution to this since v17 ... started happening on 17, kept happening on 18, is even worse now on v19 ... :-/

[GUIDE][DEBLOB][OP3/3T] Deblob alipay, ifaa and tencent soter

TL; DR HydrogenOS, OxygenOS, LineageOS and most of custom ROMs for oneplus3 has ifaa and soter binary blobs for fingerprint/iris authorization which is used for confirm payment in Alipay and WeChat Pay the most popular mobile payment Apps in mainland China, in case you don't use them, just want to get rid of them, or having privacy or security concern, you can just flash this zip in TWRP to deblob them (require firmware OxygenOS 9.0.2+, system-as-root). You probably need to flash it along with your ROM each time you install a new ROM or update existing one.
IFAA is used by Alipay, Tencent soter is used in WeChat Pay.
Those blobs and proprietary files (including IFAAService and SoterService apk) are used for biometric authentication during confirm payment in Alipay and WeChat Pay (usually by touching fingerprint censor to avoid typing password each time during confirm payment, they are disabled by default in those Apps and password authentication works without them)
This zip remove binary blobs alipay.* and soter.* from modem partition (which comes from NON-HLOS.bin the FAT filesystem image in official OxygenOS zip), IFAAService and SoterService apk and related proprietary libraries.
IFAA Manager (org.ifaa.android.manager) is open source, this zip does not remove IFAA Manager because it's probably included in BOOTCLASSPATH and removing them will cause lags on app start. You may ask ROM maintainers to remove them at compile time to remove them.
faceapp.* in modem and vendor/lib/libmmcamera_facedetection_lib.so in system also looks suspicious, but this zip does not remove it. You can edit it to suit your needs.
Tested on firmware from OxygenOS 9.0.6, LineageOS 17.1 (unofficial), TWRP 3.3.1-0
META-INF/com/google/android/updater-script
Code:
assert(getprop("ro.product.device") == "OnePlus3" || getprop("ro.build.product") == "OnePlus3" ||
getprop("ro.product.device") == "oneplus3" || getprop("ro.build.product") == "oneplus3" ||
getprop("ro.product.device") == "OnePlus3T" || getprop("ro.build.product") == "OnePlus3T" ||
getprop("ro.product.device") == "oneplus3t" || getprop("ro.build.product") == "oneplus3t" || abort("E3004: This package is for device: OnePlus3,oneplus3,OnePlus3T,oneplus3t; this device is " + getprop("ro.product.device") + "."););
assert(op3.verify_modem("2019-05-11 00:00:51") == "1" || abort("This package is for modem firmware from OxygenOS 9.0.2 or newer"););
ui_print(" ");
ui_print("## Deblob alipay ifaa and tencent soter ##");
ui_print("## for OnePlus 3 and OnePlus 3T ##");
ui_print("## this won't remove org.ifaa.android.manager ##");
ui_print("## because it's may included in BOOTCLASSPATH ##");
ui_print("Mounting system and modem...");
run_program("/sbin/toybox", "mount", "/system");
run_program("/sbin/toybox", "mount", "/dev/block/by-name/modem", "/system/system/vendor/firmware_mnt");
ui_print("Deblob alipay from modem...");
delete("/system/system/vendor/firmware_mnt/image/alipay.b00");
delete("/system/system/vendor/firmware_mnt/image/alipay.b01");
delete("/system/system/vendor/firmware_mnt/image/alipay.b02");
delete("/system/system/vendor/firmware_mnt/image/alipay.b03");
delete("/system/system/vendor/firmware_mnt/image/alipay.b04");
delete("/system/system/vendor/firmware_mnt/image/alipay.b05");
delete("/system/system/vendor/firmware_mnt/image/alipay.b06");
delete("/system/system/vendor/firmware_mnt/image/alipay.mdt");
ui_print("Deblob soter from modem...");
delete("/system/system/vendor/firmware_mnt/image/soter64.b00");
delete("/system/system/vendor/firmware_mnt/image/soter64.b01");
delete("/system/system/vendor/firmware_mnt/image/soter64.b02");
delete("/system/system/vendor/firmware_mnt/image/soter64.b03");
delete("/system/system/vendor/firmware_mnt/image/soter64.b04");
delete("/system/system/vendor/firmware_mnt/image/soter64.b05");
delete("/system/system/vendor/firmware_mnt/image/soter64.b06");
delete("/system/system/vendor/firmware_mnt/image/soter64.mdt");
ui_print("Remove proprietary files of ifaa from system...");
delete_recursive("/system/system/priv-app/IFAAService");
delete("/system/system/lib64/[email protected]");
delete("/system/system/vendor/bin/hw/[email protected]");
delete("/system/system/vendor/etc/init/[email protected]");
## removing org.ifaa.android.manager will cause lags on app start if it's included in BOOTCLASSPATH
# run_program("/sbin/sed", "-i", "s#:/system/framework/org.ifaa.android.manager.jar##", "/system/init.environ.rc");
# delete("/system/system/framework/org.ifaa.android.manager.jar");
# delete("/system/system/framework/boot-org.ifaa.android.manager.vdex");
# delete("/system/system/framework/arm/boot-org.ifaa.android.manager.art");
# delete("/system/system/framework/arm/boot-org.ifaa.android.manager.oat");
# delete("/system/system/framework/arm/boot-org.ifaa.android.manager.vdex");
# delete("/system/system/framework/arm64/boot-org.ifaa.android.manager.art");
# delete("/system/system/framework/arm64/boot-org.ifaa.android.manager.oat");
# delete("/system/system/framework/arm64/boot-org.ifaa.android.manager.vdex");
ui_print("Remove proprietary files of soter from system...");
delete_recursive("/system/system/app/SoterService");
delete("/system/system/vendor/bin/hw/[email protected]");
delete("/system/system/vendor/etc/init/[email protected]");
delete("/system/system/vendor/lib64/hw/[email protected]");
delete("/system/system/vendor/lib64/[email protected]");
show_progress(1, 5);
ui_print("Unmounting...");
run_program("/sbin/toybox", "umount", "/system/system/vendor/firmware_mnt");
run_program("/sbin/toybox", "umount", "/system");
ui_print("## Finished deblob alipay ifaa and soter ##");
ui_print(" ");
To check if you have successfully deblob and removed these files, just check if these files are been removed in any file manager with root on Android, or run the following command in a Terminal Emulator App or adb and check the output.
Code:
OnePlus3:/ # find /system -iname "*ifaa*"
/system/framework/arm64/boot-org.ifaa.android.manager.art
/system/framework/arm64/boot-org.ifaa.android.manager.oat
/system/framework/arm64/boot-org.ifaa.android.manager.vdex
/system/framework/org.ifaa.android.manager.jar
/system/framework/arm/boot-org.ifaa.android.manager.art
/system/framework/arm/boot-org.ifaa.android.manager.oat
/system/framework/arm/boot-org.ifaa.android.manager.vdex
/system/framework/boot-org.ifaa.android.manager.vdex
OnePlus3:/ # find /system -iname "*soter*"
OnePlus3:/ #
UPDATE:
Rewrote the post to reduce the mess. Thanks @nvertigo67 for pointing out BOOTCLASSPATH and performance drop issue when ifaa manager was removed.
This is a good idea!
Just some notes:
It only works for system-as-root roms (most - if not all - android 10 source build roms), for all other roms (oos and most - if not all - android 9 and below source build roms) you need to replace "system/system" by "system". For my taste it would be easier to use a shell script instead of the edify interpreter. To tell sar roms from non-sar roms you can use something like this:
Code:
#!/sbin/sh
OUTPUT=/proc/self/fd/$2;
ui_print() {
until [ ! "$1" ]; do
echo -e "ui_print $1\nui_print" >$OUTPUT;
shift;
done;
}
ui_print "***********************************";
ui_print "Settting ";
ui_print "ro.build.version.security_patch to ";
ui_print "2019-04-01 matching OOS 9.0.2";
ui_print "build fingerprint";
ui_print "(c) 2019 [email protected] ";
ui_print "***********************************";
ui_print "mount system";
system_mounted=$(mount | grep "system")
if [ -z "$system_mounted" ]; then
mount -o rw /system;
else
umount /system;
mount -o rw /system;
fi
if [ -e /system/build.prop ]; then
PROPFILE=/system/build.prop
ui_print "using /system/build.prop";
else
if [ -e /system/system/build.prop ]; then
PROPFILE=/system/system/build.prop
ui_print "using /system/system/build.prop";
else
ui_print "Can't locate the build.prop file,";
ui_print "nothing will be changed!";
ui_print "unmounting system";
umount_msg=$(umount /system 2>&1);
if [ -z "$umount_msg" ]; then
ui_print "system unmounted";
else
ui_print "$umount_msg";
fi
exit 1;
fi
fi
Instead of PROPFILE set SYSTEM_PATH to /system/system or /system accordingly, before mounting firmware_mnt, then you can throw away the not needed files with
Code:
find $SYSTEM_PATH -iname \*ifaa\* -o -iname \*soter\* -o -iname \*alipay\* |xargs rm -rf
For some source build roms (at least for all los-16.0 and los-17.1 based roms) deleting the mentioned files is only the first part of the job. The second part is removing "/system/framework/org.ifaa.android.manager.jar:" from "BOOTCLASSPATH" in /init.environ.rc (for non-sar roms; probably /system/init.environ.rc for sar roms). Otherwise boot.art can't be assemled on boot time. The rom works without boot.art in image-less mode, but this is significantly slower causing lags on app start, unlock and many more actions as e.g. opening of Settings.
I guess this is easy for sar roms (just sed /system/init.environ.rc) but is ugly for non-sar roms: you need to unpack the ramdisk from the boot partition change init.environ.rc repack the boot image, resign (for locked bootloaders) and reflash it to the boot partition.
For extracting, changing init.environ.rc and reflashing the boot image you can use @osm0sis' anykernel3 templates (https://forum.xda-developers.com/showthread.php?t=2670512 ); for resigning you may want to use @Chainfire's VerifiedBootSigner (https://forum.xda-developers.com/an...signing-boot-images-android-verified-t3600606 ). I've made one, which uses the oneplus bootloader required aosp keys: https://forum.xda-developers.com/showpost.php?p=78433989&postcount=4
There's also some more cosmetics: to completely remove all traces of ifaa, soter and alipay, from the build I've needed these commits:
https://github.com/nvertigo/android...mmit/2ab32d492f0b8d109b503c86208394c8fa5e7486
https://github.com/nvertigo/proprie...mmit/99a6fdf5dbbc8f5f7a9d2ccf43d139b5eecc08d5
Hope this helps making a final zip.
Johan2020 said:
Could you already share your zip?
I tried the same but ended with a rom which was much slower as mentioned in the link above. Probably the environment.rc issue (luisrom btw, so based on Lineage 17)
Click to expand...
Click to collapse
I've not decided which way to go, so I've no zip currently. For testing I've made a build with the mentioned commits and deleted the fw stuff manually with find and xargs.
On los17 (sar) you should be able to locate init.environ.rc and delete the boot jar entry manually.
Phaech4x said:
Alipay and WeChat Pay works without these stuff but you can use fingerprint payment when you have them (by press on fingerprint censor to confirm a payment instead of typing password).
Click to expand...
Click to collapse
Can somebody confirm the validity of this information, please? With the op-mentioned files removed only the fingerprint authorized payment is lost, but Alipay and WeChatPay is still working with apps installed from playstore.
Thanx in advance.
nvertigo67 said:
I've not decided which way to go, so I've no zip currently. For testing I've made a build with the mentioned commits and deleted the fw stuff manually with find and xargs.
On los17 (sar) you should be able to locate init.environ.rc and delete the boot jar entry manually.
Click to expand...
Click to collapse
I have made a little script to remove some stuff after flashing and it seems this is doing the job, though performance is still dropping, even with modified /system/init.environ.rc.
Since I have limited Android background knowledge, I have no idea where to search to get an idea where the performance drop is coming from.
This is the script:
Code:
# First mount firmware_mnt
mount /dev/block/by-name/modem /system/system/vendor/firmware_mnt
# Remove all files with ifaa, soter and alipay
bloblist="
/system/system/framework/arm/boot-org.ifaa.android.manager.art
/system/system/framework/arm/boot-org.ifaa.android.manager.oat
/system/system/framework/arm/boot-org.ifaa.android.manager.vdex
/system/system/framework/arm64/boot-org.ifaa.android.manager.art
/system/system/framework/arm64/boot-org.ifaa.android.manager.oat
/system/system/framework/arm64/boot-org.ifaa.android.manager.vdex
/system/system/framework/boot-org.ifaa.android.manager.vdex
/system/system/framework/org.ifaa.android.manager.jar
/system/system/lib64/[email protected]
/system/system/vendor/bin/hw/[email protected]
/system/system/vendor/bin/hw/[email protected]
/system/system/vendor/etc/init/[email protected]
/system/system/vendor/etc/init/[email protected]
/system/system/vendor/firmware_mnt/image/alipay.b00
/system/system/vendor/firmware_mnt/image/alipay.b01
/system/system/vendor/firmware_mnt/image/alipay.b02
/system/system/vendor/firmware_mnt/image/alipay.b03
/system/system/vendor/firmware_mnt/image/alipay.b04
/system/system/vendor/firmware_mnt/image/alipay.b05
/system/system/vendor/firmware_mnt/image/alipay.b06
/system/system/vendor/firmware_mnt/image/alipay.mdt
/system/system/vendor/firmware_mnt/image/soter64.b00
/system/system/vendor/firmware_mnt/image/soter64.b01
/system/system/vendor/firmware_mnt/image/soter64.b02
/system/system/vendor/firmware_mnt/image/soter64.b03
/system/system/vendor/firmware_mnt/image/soter64.b04
/system/system/vendor/firmware_mnt/image/soter64.b05
/system/system/vendor/firmware_mnt/image/soter64.b06
/system/system/vendor/firmware_mnt/image/soter64.mdt
/system/system/vendor/lib64/hw/[email protected]
/system/system/vendor/lib64/[email protected]
"
for blobname in $bloblist
do
if [ -d "$blobname" ]; then
chmod -R 777 "$blobname" 2>/dev/null
rm -rf "${blobname:?}"/* 2>/dev/null
else
chmod 777 "$blobname" 2>/dev/null
rm -f "$blobname" 2>/dev/null
fi
done
# Remove org.ifaa.android.manager.jar from environ.rc
sed -i 's/:\/system\/framework\/org.ifaa.android.manager.jar//' /system/init.environ.rc
umount /system/system/vendor/firmware_mnt
And this is init.environ.rc after using sed (org.ifaa.android.manager.jar removed):
Code:
# set up the global environment
on early-init
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export ANDROID_STORAGE /storage
export ANDROID_RUNTIME_ROOT /apex/com.android.runtime
export ANDROID_TZDATA_ROOT /apex/com.android.tzdata
export EXTERNAL_STORAGE /sdcard
export ASEC_MOUNTPOINT /mnt/asec
export BOOTCLASSPATH /apex/com.android.runtime/javalib/core-oj.jar:/apex/com.android.runtime/javalib/core-libart.jar:/apex/com.android.runtime/javalib/okhttp.jar:/apex/com.android.runtime/javalib/bouncycastle.jar:/apex/com.android.runtime/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/android.test.base.jar:/system/framework/telephony-ext.jar:/system/framework/WfdCommon.jar:/apex/com.android.conscrypt/javalib/conscrypt.jar:/apex/com.android.media/javalib/updatable-media.jar
export DEX2OATBOOTCLASSPATH /apex/com.android.runtime/javalib/core-oj.jar:/apex/com.android.runtime/javalib/core-libart.jar:/apex/com.android.runtime/javalib/okhttp.jar:/apex/com.android.runtime/javalib/bouncycastle.jar:/apex/com.android.runtime/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/android.test.base.jar:/system/framework/telephony-ext.jar:/system/framework/WfdCommon.jar
export SYSTEMSERVERCLASSPATH /system/framework/org.lineageos.platform.jar:/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar:/system/framework/com.android.location.provider.jar
I have not used find because I had some issues in the past with find in combination of double astrix (*string*), though searching through /system after boot does not give any positive results on soter, alipay or ifaa so all seems removed. Have the feeling though, somewhere 'things' are linked to removed stuff which is the reason for the performance drop.
@Johan2020
for find: you need to make sure that the wildcards are passed to find and arn't substituted by the shell. If you don't escape the wildcards for the shell, they are only passed if the shell can't expand the expression.
for lag: you need to check the log. Increase the logbuffer size to 1 Mio (at least) to catch the complete boot, reboot and do something like
Code:
adb logcat -d | grep -i -e ifaa -e soter -e ali
nvertigo67 said:
@Johan2020
for find: you need to make sure that the wildcards are passed to find and arn't substituted by the shell. If you don't escape the wildcards for the shell, they are only passed if the shell can't expand the expression.
for lag: you need to check the log. Increase the logbuffer size to 1 Mio (at least) to catch the complete boot, reboot and do something like
Code:
adb logcat -d | grep -i -e ifaa -e soter -e ali
Click to expand...
Click to collapse
I guess I found something:
Code:
03-12 12:58:12.521 1818 1818 E dex2oat : Could not create image space with image file '/system/framework/boot.art'. Attempting to fall back to imageless running. Error was: Unexpected component count in /system/framework/arm64/boot.art, received 14, expected non-zero and <= 13
No output on ifaa, soter or ali though, but seems some checks are done in boot.art which are not correct anymore because of removed blobs?
Edit:
Did a new flash without removing the blobs (script from above) and do not have those errors in logcat.
So seems indeed related to removal.
Let me know if I can help with some other testing...
The number of boot jars seems to be somewhere, if rebooting to twrp and wiping caches doesn't help, I've no idea where to start searching. Maybe google is your friend to start investigating this.
nvertigo67 said:
The number of boot jars seems to be somewhere, if rebooting to twrp and wiping caches doesn't help, I've no idea where to start searching. Maybe google is your friend to start investigating this.
Click to expand...
Click to collapse
Ok, thanks. I always clear caches after new flash; rebooting and wiping did not solve the issue.
I probably have to live with it and keep the Ali, Soter and Ifaa stuff there where it is.
I only tried Alipay and it still works after removing these files. Fingerprint authorization payment for Alipay does not seems works on lineageos-17.1 tho (with official modem and keep these proprietary files), but I remembered it works on lineageos-16.0
I'm a bit curious now about who wrote IFAA Manager (org.ifaa.android.manager), where are these source code from and how was it been adopted by LineageOS. The comment message says IFAA protocol support fingerprint and iris authorization.
@nvertigo67 Thanks for your information, I didn't know removing these files cause lags for app start before. I can also confirm it cause noticeable lag, 1.30s to open settings, but cost 2.10s after remove these files.
@Johan2020 I have update the post and add a link to the updated zip, does not seems lag here after flash the zip which deblobbed the modem and removed IFAAService+SoterService apk but keep ifaa manager and other proprietary files.
This command output every *.odex file in `/system`, {boot,boot-org.ifaa.android.manager}.{oat,art} and org.ifaa.android.manager.jar
Code:
grep -rl org.ifaa.android.manager /system
Maybe this explained why it still lags after removed ifaamanager from init.environ.rc, then the only solution to remove these proprietary files without performance drop is remove them at build stage.
Phaech4x said:
I only tried Alipay and it still works after removing these files. Fingerprint authorization payment for Alipay does not seems works on lineageos-17.1 tho (with official modem and keep these proprietary files), but I remembered it works on lineageos-16.0
Click to expand...
Click to collapse
Thanx! I hate not being able to test something myself.
BTW: Is there any source of current data of WeChatPay usage? Honestly, I havn't known about the existence of WeChatPay until the tencent security/privacy flaw some time back...
Phaech4x said:
I'm a bit curious now about who wrote IFAA Manager (org.ifaa.android.manager), where are these source code from and how was it been adopted by LineageOS. The comment message says IFAA protocol support fingerprint and iris authorization.
Click to expand...
Click to collapse
It's from oss (don't mix with oos): https://github.com/LineageOS/androi...0ee28ea#diff-1eba4e28cf441865f85a2298f9bd8312
The very first version has been reverse engineered: https://github.com/LineageOS/androi...b113b64#diff-1eba4e28cf441865f85a2298f9bd8312
Phaech4x said:
@nvertigo67 Thanks for your information, I didn't know removing these files cause lags for app start before. I can also confirm it cause noticeable lag, 1.30s to open settings, but cost 2.10s after remove these files.
@Johan2020 I have update the post and add a link to the updated zip, does not seems lag here after flash the zip which deblobbed the modem and removed IFAAService+SoterService apk but keep ifaa manager and other proprietary files.
Click to expand...
Click to collapse
I guess it's safe to disable the ifaa daemon service as well, as long as the manager jar is available for assembling the boot jar.
Phaech4x said:
This command output every *.odex file in `/system`, {boot,boot-org.ifaa.android.manager}.{oat,art} and org.ifaa.android.manager.jar
Code:
grep -rl org.ifaa.android.manager /system
Maybe this explained why it still lags after removed ifaamanager from init.environ.rc, then the only solution to remove these proprietary files without performance drop is remove them at build stage.
Click to expand...
Click to collapse
Yep. Removing all ifaa, soter, AliPay stuff at compile time works flawlessly - inspired by your first posting: https://github.com/nvertigo/android...mmit/d8f0471eee92fe608b5e9b0b30d52b63d6d3d79f
JFYI: I've made alipay* and soter* free firmware packages with referenve to this very thread: https://forum.xda-developers.com/showpost.php?p=81997531&postcount=164
I'm running this combination without lag, drain or side effects (so far ). Though I've done it for los-16, I see no reason why it shouldn't work for los-17.1 as well.
What seems to work for removing on existing roms (so not on build stage) is to remove everything except org.ifaa.android.manager related stuff.
What I have removed is IFAAServices, Soterservices and everything related except in /system/system/framework.
This is what I have left:
Code:
/system/system/framework/arm/boot-org.ifaa.android.manager.art
/system/system/framework/arm/boot-org.ifaa.android.manager.oat
/system/system/framework/arm/boot-org.ifaa.android.manager.vdex
/system/system/framework/arm64/boot-org.ifaa.android.manager.art
/system/system/framework/arm64/boot-org.ifaa.android.manager.oat
/system/system/framework/arm64/boot-org.ifaa.android.manager.vdex
/system/system/framework/boot-org.ifaa.android.manager.vdex
/system/system/framework/org.ifaa.android.manager.jar
No delays and no issues in daily usage.
Edit:
Script part I am using now on non-deblobbed rom to remove just the stuff which can be removed (not the ifaa.android.manager files):
Code:
#!/sbin/sh
#
# https://forum.xda-developers.com/oneplus-3/how-to/guide-deblob-alipay-ifaa-tencent-soter-t4064893/
echo -n "Deblob AliPay, Soter & IFAA stuff..."
# First mount firmware_mnt
mount /dev/block/by-name/modem /system/system/vendor/firmware_mnt
# Remove all ifaa, soter and alipay blobs in Firmware
bloblist1="
/system/system/vendor/firmware_mnt/image/alipay.b00
/system/system/vendor/firmware_mnt/image/alipay.b01
/system/system/vendor/firmware_mnt/image/alipay.b02
/system/system/vendor/firmware_mnt/image/alipay.b03
/system/system/vendor/firmware_mnt/image/alipay.b04
/system/system/vendor/firmware_mnt/image/alipay.b05
/system/system/vendor/firmware_mnt/image/alipay.b06
/system/system/vendor/firmware_mnt/image/alipay.mdt
/system/system/vendor/firmware_mnt/image/soter64.b00
/system/system/vendor/firmware_mnt/image/soter64.b01
/system/system/vendor/firmware_mnt/image/soter64.b02
/system/system/vendor/firmware_mnt/image/soter64.b03
/system/system/vendor/firmware_mnt/image/soter64.b04
/system/system/vendor/firmware_mnt/image/soter64.b05
/system/system/vendor/firmware_mnt/image/soter64.b06
/system/system/vendor/firmware_mnt/image/soter64.mdt
"
for blobname in $bloblist1
do
if [ -d "$blobname" ]; then
chmod -R 777 "$blobname" 2>/dev/null
rm -rf "${blobname:?}"/* 2>/dev/null
else
chmod 777 "$blobname" 2>/dev/null
rm -f "$blobname" 2>/dev/null
fi
done
# Remove all ifaa, soter and alipay stuff in vendor and lib
bloblist2="
/system/system/vendor/bin/hw/[email protected]
/system/system/vendor/bin/hw/[email protected]
/system/system/vendor/etc/init/[email protected]
/system/system/vendor/etc/init/[email protected]
/system/system/vendor/lib64/hw/[email protected]
/system/system/vendor/lib64/[email protected]
/system/system/lib64/[email protected]
"
for blobname in $bloblist2
do
if [ -d "$blobname" ]; then
chmod -R 777 "$blobname" 2>/dev/null
rm -rf "${blobname:?}"/* 2>/dev/null
else
chmod 777 "$blobname" 2>/dev/null
rm -f "$blobname" 2>/dev/null
fi
done
# /system/system/framework/arm/boot-org.ifaa.android.manager.art
# /system/system/framework/arm/boot-org.ifaa.android.manager.oat
# /system/system/framework/arm/boot-org.ifaa.android.manager.vdex
# /system/system/framework/arm64/boot-org.ifaa.android.manager.art
# /system/system/framework/arm64/boot-org.ifaa.android.manager.oat
# /system/system/framework/arm64/boot-org.ifaa.android.manager.vdex
# /system/system/framework/boot-org.ifaa.android.manager.vdex
# /system/system/framework/org.ifaa.android.manager.jar
# Remove org.ifaa.android.manager.jar from environ.rc
# sed -i 's/:\/system\/framework\/org.ifaa.android.manager.jar//' /system/init.environ.rc
umount /system/system/vendor/firmware_mnt
echo " done!"
nvertigo67 said:
BTW: Is there any source of current data of WeChatPay usage? Honestly, I havn't known about the existence of WeChatPay until the tencent security/privacy flaw some time back...
I guess it's safe to disable the ifaa daemon service as well, as long as the manager jar is available for assembling the boot jar.
Click to expand...
Click to collapse
Ipsos's Report of Market Share of Third Party Mobile Payment in China (in Simplified Chinese)
Chi*na’s Mo*bile Pay*ments Mar*ket Grows Over 15% in Q3 2019, Ali*pay’s Mar*ket Share Ex*ceed Half | China Banking News (in English) seems the articles is about this report
In mainland China, Alibaba and Tencent own over 90% of mobile payment market, Alipay almost own the whole mobile payment market a few years ago, probably because of Alibaba's Taobao which is one of the most popular online shopping site in China.
Tencent has WeChat Pay, QQ Wallet and Tenpay. these reports which mentioned market share Tencent owned probably include them. WeChat Pay is included in WeChat and QQ Wallet is included in QQ, WeChat and QQ are most most popular instant messaging app in mainland China. imo the main reason WeChat Pay been popular in China is it has Red Envelope (Alipay also has it tho), Chines ppl like social, WeChat and QQ are more like social network than other instant messaging platform. WeChat Pay require fee for withdraw while Alipay is free to withdraw, and lots of Chinese ppl love the Red Envelope thing. It's like almost every smartphone/"internet" user in mainland China has a WeChat account, not only just for communicating with others, they use it to order a takeout, use Mini Program or something.
And Tencent also own the most Gaming Market in mainland China, there is QQ Currency which is usually used to buy items in games.
https://www.scmp.com/lifestyle/gadg...-wechat-pay-and-payme-put-test-find-out-which
According to a 2018 survey conducted by the Hong Kong Productivity Council on brand awareness of e-wallet services, Alipay, WeChat Pay, Apple Pay and PayMe were ranked top among users.
Click to expand...
Click to collapse
In Hong Kong, Apple Pay is the second most frequently used mobile payment in 2019, according to the survey conducted by JD Power, second only to AlipayHK.
Click to expand...
Click to collapse
I think Alipay and WeChat Pay are almost only used in China and Hong Kong. The only reason I can think of those mainland Chinese smartphone manufacturers include ifaa/soter in their international firmware/modem is that Alipay and WeChat Pay is also popular in Hong Kong where people have access to Internet and use GMS, beside they are too lazy to maintain variants of firmware/modem.
Johan2020 said:
What seems to work for removing on existing roms (so not on build stage) is to remove everything except org.ifaa.android.manager related stuff.
No delays and no issues in daily usage.
Click to expand...
Click to collapse
Thanks I have confirmed just keep ifaa manager won't cause lag on app start. In the other words, all of related blobs, proprietary files and related services files are been removed, only keep ifaa manager the open source part.
nvertigo67 said:
Can somebody confirm the validity of this information, please? With the op-mentioned files removed only the fingerprint authorized payment is lost, but Alipay and WeChatPay is still working with apps installed from playstore.
Thanx in advance.
Click to expand...
Click to collapse
Confirmed. Alipay and Wechatpay still works by typing password.
Firware: OP3T-9.0.6-fw-without-ifaa/soter
Rom: nlos-16.0-20200312
PS: It also affects unlocking Alipay using fingerprint which I don't use.
In case anyone is wondering:
I installed this with LineageOS 17.1 and nothing appears to be broken.
I do not use AliPay or any of those services so cannot comment on related effects.
Installed it on Lineageos 17.1 with SAR TWRP and it terminated with success. However, when rebooting to system and cross-checking, I recognised that the Blobs were still there. So I edited the updater script to replace /system with /system_root and voila, after flashing the modified package the Blobs are finally gone.
Ideally we'd have a check in the script if we're on SAR (check fstab?) and change the mount point accordingly, I think I've seen that somewhere here in the forums but lost the reference...
{Deleted, was sleeping I guess, had already answered my question myself....}
FYI, this is how I am removing Soter, Ifaa and Alipay stuff now, which is actually just a one-liner:
Code:
# Set root correctly depending on system as root or not
if [ -e "/system_root/system" ]; then
root="/system_root"
else
root="/system"
fi
# Mount firmware_mnt if not mounted already
if ! mountpoint -q "$root/system/vendor/firmware_mnt"; then
mount /dev/block/by-name/modem $root/system/vendor/firmware_mnt
fi
sleep 0.5
# Find and remove alipay, soter and ifaa stuff except boot-org.ifaa.android.manager
find $root/system ! -name "*manager*" -name "*alipay*" -name "*soter*" -name "*ifaa*" -type f -exec rm -f {} + 2>/dev/null
# Unmount firmware_mnt
umount $root/system/vendor/firmware_mnt
So the line which is removing the stuff is just:
Code:
find $root/system ! -name "*manager*" -name "*alipay*" -name "*soter*" -name "*ifaa*" -type f -exec rm -f {} + 2>/dev/null
Johan2020 said:
FYI, this is how I am removing Soter, Ifaa and Alipay stuff now, which is actually just a one-liner:
So the line which is removing the stuff is just:
Click to expand...
Click to collapse
Can u pls make it a flashable zip?
Adam Hui said:
Can u pls make it a flashable zip?
Click to expand...
Click to collapse
No, you can just make a bash script which you run after flash from TWRP command line
But if you want, feel free ofcourse :good:

Categories

Resources