[Magisk] Magisk Mount ReSize IMG - Magisk

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:

Related

[Q] Loop in bootanimation after update to CROMi-X 7.0.2

Hi to everyone.
I was updating my tab to the latest version of the ROM of sbdags.
Everything was fine until i reboot the tab to use it for the first time: loop in the boot animation and never come out from it.
I came from the previous version of the rom, the Cromi-x 6.1 with 10.26.1.18 bootloader.
The process i use to update was this:
1) wipe of data/factory reset, wipe with format /boot, wipe with format /system
2) Install the CWM recovery 6.0.5.0 and update the bootloader to 11.4.1.17 by flashing they with the file that you can find in the rom page.
3) repeat point 1
4) install the rom by flashing it from an SD. Complete the Aroma installer and answer to every option that it ask to me.
5) reboot the system and stuck in the bootanimation
I use the WW format cause i'm italian and i check the md5
What's wrong? I can go to recovery everytime i need and i have a backup just in case i need it.
Sdbags, i really want to offer you a beer for your work. I think i will do it in every case, but yes, kitkat on my tab would be great :victory:
Sorry for bad english. For every question, i'm here. Thanks a lot.
M.
aMachi said:
Hi to everyone.
I was updating my tab to the latest version of the ROM of sbdags.
Everything was fine until i reboot the tab to use it for the first time: loop in the boot animation and never come out from it.
I came from the previous version of the rom, the Cromi-x 6.1 with 10.26.1.18 bootloader.
The process i use to update was this:
1) wipe of data/factory reset, wipe with format /boot, wipe with format /system
2) Install the CWM recovery 6.0.5.0 and update the bootloader to 11.4.1.17 by flashing they with the file that you can find in the rom page.
3) repeat point 1
4) install the rom by flashing it from an SD. Complete the Aroma installer and answer to every option that it ask to me.
5) reboot the system and stuck in the bootanimation
I use the WW format cause i'm italian and i check the md5
What's wrong? I can go to recovery everytime i need and i have a backup just in case i need it.
Sdbags, i really want to offer you a beer for your work. I think i will do it in every case, but yes, kitkat on my tab would be great :victory:
Sorry for bad english. For every question, i'm here. Thanks a lot.
M.
Click to expand...
Click to collapse
Don't do step 3. Try it again please.
Try the default options first.
sbdags said:
Don't do step 3. Try it again please.
Try the default options first.
Click to expand...
Click to collapse
If default option are those who are pre-selected on the aroma installer i've already try it.
Also i try to do it without point 3. Nothing
Here a log of the installation of the rom
AROMA INSTALLER version 2.56
(c) 2012 by amarullz xda-developers
ROM Name : CROMi-Xenogenesis KitKat
ROM Version : 7.0.2 DEODEX
ROM Author : sbdags
Device : Asus Transformer TF701T
Start at : Mon Aug 25 20:30:02 2014
Thank you for installing CROMi-Xenogenesis KitKat 4.4.2!
Sit back and relax...
-----------------------------------------------------
This will take a few minutes!
Preparing File System...
about to run program [/sbin/umount] with 3 args
umount: can't umount /system: Invalid argument
run_program: child exited with status 1
about to run program [/sbin/umount] with 3 args
Formatting System....
Creating filesystem with parameters:
Size: 2147483648
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 8192
Label:
Blocks: 524288
Block groups: 16
Reserved block group size: 127
Created filesystem with 11/131072 inodes and 17193/524288 blocks
Tuning System....
about to run program [/tmp/tune2fs.ext4] with 6 args
tune2fs 1.41.12 (17-May-2010)
Tuning Data - Journaling Enabled.....
about to run program [/tmp/tune2fs.ext4] with 6 args
tune2fs 1.41.12 (17-May-2010)
Wiping Cache.....
Installing Core System.....
Installing Options...
Region Specific Files
- TF701 WW Build
Kernel Preparation
- sbdag's 11.4.1.17 Stock Modded Kernel
package_extract_file: no extras/kernel/sbmodded/701sb3.img in package
DPI Preparation
- 320 DPI
Resolution Preparation
- 2560x1600 res
Boot Animation
- Google Android-L
Launcher
- Asus Stock Launcher
Asus Apps 1
- Asus Email
- Asus Desk Clock & Widget
- Asus Weather & Time Widget
- Asus Splendid
- Asus Calculator
- Asus MyDictionary
- Asus Studio
Asus Apps 2
Google Apps 1
- Google Calendar
- Google Now and Voice Search
- Google Music
- News and Weather Genie
- YouTube
- Maps
- Hangouts
Google Apps 2
- Google Chrome
- Google Drive Docs
Misc Apps
- ES File Explorer
- AdAway installed
- Keyboard Manager
- Terminal Emulator
- Polaris Office
Installing CROMi-X System Tweaks.....
about to run program [/tmp/cromix-build-prop.sh] with 1 args
Tweaks and Scripts
- Browser2RAM enabled
- Ad Blocker enabled
- Zip Align Script installed
- Keyboard Dock Remapping installed
Building symlinks.....
Setting permissions.....
Installing BusyBox.....
about to run program [/system/xbin/busybox] with 4 args
Setting ROOT.....
DRM Options
- Google Video & Hulu+ DRM
Installing build.prop
about to run program [/sbin/sh] with 2 args
about to run program [/sbin/sh] with 2 args
Finalising ROM
about to run program [/sbin/umount] with 3 args
---------------------------------------
All Done!
Don't forget to follow @sbdags on Twitter
If you like it please donate to [email protected] on paypal
Enjoy CROMi-X!
script succeeded: result was [Enjoy CROMi-X!]
Installer Sucessfull (Status 0)
I don't know if this can be helpful, but if i restore the backup of the previous version of the rom everything work fine. I'm reading the discussion of the guy with the partition problem and i was wondering if maybe the problem was the same, but i don't think it.
Another time, sorry for bad english and thanks for all your work sdbags.
M.
That log is fine - everything is installed.
Read out the bootloader version from the bootloader screen to double check please.
Also you are rebooting after installing the bootloader and cwm package aren't you?
aMachi said:
If default option are those who are pre-selected on the aroma installer i've already try it.
Also i try to do it without point 3. Nothing
Here a log of the installation of the rom
AROMA INSTALLER version 2.56
(c) 2012 by amarullz xda-developers
ROM Name : CROMi-Xenogenesis KitKat
ROM Version : 7.0.2 DEODEX
ROM Author : sbdags
Device : Asus Transformer TF701T
Start at : Mon Aug 25 20:30:02 2014
Thank you for installing CROMi-Xenogenesis KitKat 4.4.2!
Sit back and relax...
-----------------------------------------------------
This will take a few minutes!
Preparing File System...
about to run program [/sbin/umount] with 3 args
umount: can't umount /system: Invalid argument
run_program: child exited with status 1
about to run program [/sbin/umount] with 3 args
Formatting System....
Creating filesystem with parameters:
Size: 2147483648
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 8192
Label:
Blocks: 524288
Block groups: 16
Reserved block group size: 127
Created filesystem with 11/131072 inodes and 17193/524288 blocks
Tuning System....
about to run program [/tmp/tune2fs.ext4] with 6 args
tune2fs 1.41.12 (17-May-2010)
Tuning Data - Journaling Enabled.....
about to run program [/tmp/tune2fs.ext4] with 6 args
tune2fs 1.41.12 (17-May-2010)
Wiping Cache.....
Installing Core System.....
Installing Options...
Region Specific Files
- TF701 WW Build
Kernel Preparation
- sbdag's 11.4.1.17 Stock Modded Kernel
package_extract_file: no extras/kernel/sbmodded/701sb3.img in package
DPI Preparation
- 320 DPI
Resolution Preparation
- 2560x1600 res
Boot Animation
- Google Android-L
Launcher
- Asus Stock Launcher
Asus Apps 1
- Asus Email
- Asus Desk Clock & Widget
- Asus Weather & Time Widget
- Asus Splendid
- Asus Calculator
- Asus MyDictionary
- Asus Studio
Asus Apps 2
Google Apps 1
- Google Calendar
- Google Now and Voice Search
- Google Music
- News and Weather Genie
- YouTube
- Maps
- Hangouts
Google Apps 2
- Google Chrome
- Google Drive Docs
Misc Apps
- ES File Explorer
- AdAway installed
- Keyboard Manager
- Terminal Emulator
- Polaris Office
Installing CROMi-X System Tweaks.....
about to run program [/tmp/cromix-build-prop.sh] with 1 args
Tweaks and Scripts
- Browser2RAM enabled
- Ad Blocker enabled
- Zip Align Script installed
- Keyboard Dock Remapping installed
Building symlinks.....
Setting permissions.....
Installing BusyBox.....
about to run program [/system/xbin/busybox] with 4 args
Setting ROOT.....
DRM Options
- Google Video & Hulu+ DRM
Installing build.prop
about to run program [/sbin/sh] with 2 args
about to run program [/sbin/sh] with 2 args
Finalising ROM
about to run program [/sbin/umount] with 3 args
---------------------------------------
All Done!
Don't forget to follow @sbdags on Twitter
If you like it please donate to [email protected] on paypal
Enjoy CROMi-X!
script succeeded: result was [Enjoy CROMi-X!]
Installer Sucessfull (Status 0)
I don't know if this can be helpful, but if i restore the backup of the previous version of the rom everything work fine. I'm reading the discussion of the guy with the partition problem and i was wondering if maybe the problem was the same, but i don't think it.
Another time, sorry for bad english and thanks for all your work sdbags.
M.
Click to expand...
Click to collapse
sbdags said:
That log is fine - everything is installed.
Read out the bootloader version from the bootloader screen to double check please.
Also you are rebooting after installing the bootloader and cwm package aren't you?
Click to expand...
Click to collapse
When i install cwm and bootloader package i reboot from cwm but i stuck in boot animation. The same that happen when i try to reboot after install the rom.
In bootloader screen i read
Android macallan-user BL released by WW_epad-11.4.1.17-20140711
aMachi said:
When i install cwm and bootloader package i reboot from cwm but i stuck in boot animation. The same that happen when i try to reboot after install the rom.
In bootloader screen i read
Android macallan-user BL released by WW_epad-11.4.1.17-20140711
Click to expand...
Click to collapse
Right and then you boot back to CWM, do a full wipe (you may need to wipe your internal sdcard so back it up first) and then flash the rom. After that it should boot fine.
If not please search xda for how to get a logcat and post one of it bootlooping please.
sbdags said:
Right and then you boot back to CWM, do a full wipe (you may need to wipe your internal sdcard so back it up first) and then flash the rom. After that it should boot fine.
If not please search xda for how to get a logcat and post one of it bootlooping please.
Click to expand...
Click to collapse
I try the first thing that you say but nothing, still loop in bootanimation.
I'll do a logcat through adb in the afternoon. Now i had some problem cause i can't mount usb storage through cwm for some reason. Late i'll find drivers or what's missing.
Maybe can help: when i reboot frequently cwm ask me if i want to fix root. It's normal?
Thanks you for your help.
aMachi said:
I try the first thing that you say but nothing, still loop in bootanimation.
I'll do a logcat through adb in the afternoon. Now i had some problem cause i can't mount usb storage through cwm for some reason. Late i'll find drivers or what's missing.
Maybe can help: when i reboot frequently cwm ask me if i want to fix root. It's normal?
Thanks you for your help.
Click to expand...
Click to collapse
That message is normal. Just a bug in CWM.
We need to find why you are bootlooping.
sbdags said:
That message is normal. Just a bug in CWM.
We need to find why you are bootlooping.
Click to expand...
Click to collapse
Ok, logcat is here.
Hope it can help.
aMachi said:
Ok, logcat is here.
Hope it can help.
Click to expand...
Click to collapse
OK You got some serious problems there. It would appear that your internal sdcard doesn't mount:
Code:
D/Vold ( 359): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 359): *********** Success!! "ro.epad.mount_point.sdcard=/mnt/media_rw/sdcard"
D/Vold ( 359): Volume usbdrive state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 359): *********** Success!! "ro.epad.mount_point.usbdrive=/mnt/media_rw/usbdrive"
I/Vold ( 359): opening the sysfs of TF701
E/Vold ( 359): lookupVolume usbdisk1 failed!
E/Vold ( 359): lookupVolume usbdisk2 failed!
E/Vold ( 359): lookupVolume sdreader failed!
D/Vold ( 359): checkUsbdisk sucess.
D/DirectVolume( 359): i:0 minor:48
D/Vold ( 359): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
D/DirectVolume( 359): i:1 minor:49
D/Vold ( 359): Volume sdcard state changing 2 (Pending) -> 1 (Idle-Unmounted)
@lj50036, @_that any suggestions for this one?
@aMachi - what is the SKU of your device? And you can restore a nandroid back to 4.3 and it works fine?
sbdags said:
OK You got some serious problems there. It would appear that your internal sdcard doesn't mount:
Code:
D/Vold ( 359): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 359): *********** Success!! "ro.epad.mount_point.sdcard=/mnt/media_rw/sdcard"
D/Vold ( 359): Volume usbdrive state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 359): *********** Success!! "ro.epad.mount_point.usbdrive=/mnt/media_rw/usbdrive"
I/Vold ( 359): opening the sysfs of TF701
E/Vold ( 359): lookupVolume usbdisk1 failed!
E/Vold ( 359): lookupVolume usbdisk2 failed!
E/Vold ( 359): lookupVolume sdreader failed!
D/Vold ( 359): checkUsbdisk sucess.
D/DirectVolume( 359): i:0 minor:48
D/Vold ( 359): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
D/DirectVolume( 359): i:1 minor:49
D/Vold ( 359): Volume sdcard state changing 2 (Pending) -> 1 (Idle-Unmounted)
@lj50036, @_that any suggestions for this one?
@aMachi - what is the SKU of your device? And you can restore a nandroid back to 4.3 and it works fine?
Click to expand...
Click to collapse
i've some problem to find the SKU code. I search on the box of the tablet but there are too many codes and i don't know what's the right. Can you give me an exemple of it?
Yes, i can restore to 4.3. In this right moment i'm writing with the tab with cromix 6. Everything seems to work fine.
In case like this you really know how much important is to do a backup..
aMachi said:
i've some problem to find the SKU code. I search on the box of the tablet but there are too many codes and i don't know what's the right. Can you give me an exemple of it?
Yes, i can restore to 4.3. In this right moment i'm writing with the tab with cromix 6. Everything seems to work fine.
In case like this you really know how much important is to do a backup..
Click to expand...
Click to collapse
SKU is just your country code - so if you have changed it it could be causing issues with the clean install.
US, WW, TW, CN, JP are the only 5 I know of.
So if you changed the bootloader from US to WW I heard another user reporting some issues.
But in your case I am at a loss as to how you can boot 4.3 but not 4.4.2 as you are apparently on a 4.4.2 compatible bootloader and recovery .......
sbdags said:
SKU is just your country code - so if you have changed it it could be causing issues with the clean install.
US, WW, TW, CN, JP are the only 5 I know of.
So if you changed the bootloader from US to WW I heard another user reporting some issues.
But in your case I am at a loss as to how you can boot 4.3 but not 4.4.2 as you are apparently on a 4.4.2 compatible bootloader and recovery .......
Click to expand...
Click to collapse
Ah, right, i understand. I am WW, and i use it in every installation that i've done on my eee pad, from the rooting process and the unlocking of bootloader to the change of the rom.
Now that i am on the previous version of your rom those are infos of kernel, firmware, ecc.
Android Version 4.3
Kernel Version 3.4.57-g47dbe4d [email protected]#1
Tue Dec 17 23.26.15 CST 2013
Build Number TF701T_CROMi-Xenogenesis-6.1-WW_DEODEX-ORIGINAL-10.26.1.18 020115_201310210002
In ROM Manager i can see that my Recovery still is the 6.0.5.0 version.
In bootloader i can see that it is "WW_epad-11.4.1.17-20140711"
Hope that this might be helpful and hope that i don't write anything of unsafe.
M.
aMachi said:
Ah, right, i understand. I am WW, and i use it in every installation that i've done on my eee pad, from the rooting process and the unlocking of bootloader to the change of the rom.
Now that i am on the previous version of your rom those are infos of kernel, firmware, ecc.
Android Version 4.3
Kernel Version 3.4.57-g47dbe4d [email protected]#1
Tue Dec 17 23.26.15 CST 2013
Build Number TF701T_CROMi-Xenogenesis-6.1-WW_DEODEX-ORIGINAL-10.26.1.18 020115_201310210002
In ROM Manager i can see that my Recovery still is the 6.0.5.0 version.
In bootloader i can see that it is "WW_epad-11.4.1.17-20140711"
Hope that this might be helpful and hope that i don't write anything of unsafe.
M.
Click to expand...
Click to collapse
NO that is expected but hat is not expected is why you can't boot 4.4.2. Let's wait for _that and lj50036 to cast their expert eyes over your issues.
sbdags said:
@lj50036, @_that any suggestions for this one?
Click to expand...
Click to collapse
This seems to be the core of the problem:
Code:
E/dalvikvm(13002): JNI posting fatal error: Native registration unable to find class 'com/android/internal/os/RuntimeInit'; aborting...
Check that the framework is correctly installed and the BOOTCLASSPATH is set correctly:
Code:
adb shell echo $BOOTCLASSPATH > bootclasspath.txt
adb shell ls -l /system/framework > framework.txt
_that said:
This seems to be the core of the problem:
Code:
E/dalvikvm(13002): JNI posting fatal error: Native registration unable to find class 'com/android/internal/os/RuntimeInit'; aborting...
Check that the framework is correctly installed and the BOOTCLASSPATH is set correctly:
Code:
adb shell echo $BOOTCLASSPATH > bootclasspath.txt
adb shell ls -l /system/framework > framework.txt
Click to expand...
Click to collapse
Ok, so maybe now i need some help.
I run adb in my pc then i type adb shell to run the remote shell interactively.
Then what i need to type?
Anyway if i type "ls -l /system/framework > framework.txt" the response is "No such file or directory"
Sorry for my n00b questions. Really hope to learn something here, and give a chance to reward everyone for the help.
aMachi said:
Ok, so maybe now i need some help.
I run adb in my pc then i type adb shell to run the remote shell interactively.
Then what i need to type?
Anyway if i type "ls -l /system/framework > framework.txt" the response is "No such file or directory"
Sorry for my n00b questions. Really hope to learn something here, and give a chance to reward everyone for the help.
Click to expand...
Click to collapse
The commands were supposed to be typed as is on your computer. However I think I missed to quote the "echo $BOOTCLASSPATH" - I want the bootclasspath of your device, not of your PC.
Anyway, if you type "adb shell" first and then "ls -l /system/framework" and you get back "No such file or directory" that's strange...
_that said:
The commands were supposed to be typed as is on your computer. However I think I missed to quote the "echo $BOOTCLASSPATH" - I want the bootclasspath of your device, not of your PC.
Anyway, if you type "adb shell" first and then "ls -l /system/framework" and you get back "No such file or directory" that's strange...
Click to expand...
Click to collapse
Ok so tomorrow i'll give you the result of this test. I hope that i learn how to right use this command.
Any other thing that i can do?
aMachi said:
Ok so tomorrow i'll give you the result of this test. I hope that i learn how to right use this command.
Any other thing that i can do?
Click to expand...
Click to collapse
Post screenshots of your cmd window so that they can see the actual input/output
berndblb said:
Post screenshots of your cmd window so that they can see the actual input/output
Click to expand...
Click to collapse
No need for a graphical screenshot - you can copy the text from the console window.

[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.

How to patch `system.img` to root the Samsung S10 5G (Qualcomm) device?

Hi All,
Device Detail:
- Samsung S10 5G
- Qualcomm Device
- Model: SM-G977U
- ROM: VZW-G977UVRU2ASH7-20190827135903
- Kernel-Version - Linux version 4.14.83-16633035 ([email protected]) (clang version 6.0.10 for Android NDK) #2 SMP PREEMPT Wed Aug 14 16:23:48 KST 2019
Background: I have
- rooted the device with instructions given by Magisk.
- I can successfully reboot to the recovery rootfs.
Problem: I am trying to modify the `system.img.ext4.lz4` file to root the device with normal boot. I am aware that it will not let the device install OTA Updates.
Unpack-Pack System and make new AP.tar, flash:
- Without any modification to the `system.img`, I have just unpacked `system.img.ext4.lz4`->`system.img.ext4`->`system.img`->mounted to system directory and packed it back to `system.img`->`system.img.ext4`->`system.img.ext4.lz4`.
- Replaced unpack-packed `system.img.ext4.lz4` with the AP `system.img.ext4.lz4` and make a tar of it.
- Then I have flashed it using Odin v3.13 along with BL, CP, and HOME_CSC.
- Odin has show PASS and I have rebooted the device into recovery mode.
- Done the Wipe data/factory reset and reboot to recovery again but released the recovery key combination on splash screen as mentioned in the root instructions .
- The device stuck in a boot loop.
Tries:
1. Disable Dm-verity
- Removed `avb` flag from `boot.img` with
Code:
magiskboot dtb boot.img patch
- Removed `avb` and `verify` flags from `dtbo.img` with
Code:
magiskboot dtb dtbo.img patch
- Patched `ramdisk.cpio` with
Code:
magiskboot cpio ./initrd 'patch false true'
Patched `boot.img` and `dtbo.img` is working fine with magisk patched AP file but the `ramdisk.cpio` creating the issue: Stuck at splash screen when trying to go to recovery after successfully flash with Odin. Download mode is appearing on splash screen.
So, I have used `boot.img` and `dtbo.img` along with unpack-packed `system.img.ext4.lz4` but the result is still a boot loop. I have also tried a combination of `boot.img` and `dtbo.img` along with unpack-packed `vendor.img.ext4.lz4` and flashed the AP.tar with other files but still the result is a boot loop.
So, I want to debug the problem and got to know about `pstore` which preserve the logs when kernel panic.
2. pstore
- Checked that `/sys/fs/pstore` is mounted by the system with following in init file: Grep the pstore using `find . | grep '\.rc' | xargs cat | grep pstore -n -i` and get following result:
Code:
314: # pstore/ramoops previous console log
315: mount pstore pstore /sys/fs/pstore nodev noexec nosuid
316: chown system log /sys/fs/pstore/console-ramoops
317: chmod 0440 /sys/fs/pstore/console-ramoops
318: chown system log /sys/fs/pstore/console-ramoops-0
319: chmod 0440 /sys/fs/pstore/console-ramoops-0
320: chown system log /sys/fs/pstore/pmsg-ramoops-0
321: chmod 0440 /sys/fs/pstore/pmsg-ramoops-0
- Checked the kernel config by pulling the file from /proc/config.gz.
Code:
$ cat config | grep PSTORE
CONFIG_PSTORE=y
CONFIG_PSTORE_ZLIB_COMPRESS=y
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
CONFIG_PSTORE_PMSG_SSPLOG=y
CONFIG_PSTORE_RAM=y
- Check the `ramoops` configuration:
Code:
./sys/module/ramoops/parameters/console_size 262144
./sys/module/ramoops/parameters/dump_oops 1
./sys/module/ramoops/parameters/ecc 0
./sys/module/ramoops/parameters/ftrace_size 262144
./sys/module/ramoops/parameters/mem_address 3241148416
./sys/module/ramoops/parameters/mem_size 1048576
./sys/module/ramoops/parameters/mem_type 0
./sys/module/ramoops/parameters/pmsg_size 262144
./sys/module/ramoops/parameters/record_size 262144
`pstore` setup looks fine but when I am trying the get logs from `sys/fs/pstore` then I found nothing.
I have tried it by two ways:
1. Crash manually with panic kernel using:
Code:
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger
Followed Reading Kernel Logs
2. Flashing non-working rom that cause a boot loop and then flashed a working ROM with rooting steps and checked the file at `sys/fs/pstore`.
I need a favor in:
- Any steps to fix/debug the `pstore` problem?
- Any other way to find the kernel logs?
Update 1: I get the logs from recovery but I am not able to identify the problem.
Logs link: https://drive.google.com/file/d/1b-XNmjpYvH-L8lY0xA0SYr7XcITVCrVS/view?usp=sharing
Description: In this video, I have done the following:
1. Displayed recovery logs before: The last recovery logs are ends with 8.
2. Rebooted the device with a recovery key combination. I have already wipe data partition before making this video.
3. The boot loop happens and in the next reboot, I have pressed the recovery key combination to open the recovery mode where logs that end with 9 displayed.
4. Then I have recorded `last_history`, `last_avc_message_recovery`, `last_log.9` and `last_kmsg.9`
5. `last_history` and `last_avc_message_recovery` looks unchanged(same as before boot loop).
6. Then, I just have tried to mount the system but that didn't work.
7. At last, I have just rebooted the system normally without any recovery key combination.
Some Highlighted logs of last_log.9
exec -f /system/bin/e2fsck -v -y /dev/block/bootdevice/by-name/cache
error: _do_exec: can't run '/system/bin/e2fsck'
(errno 13 : Permission denied)
/system/bin/e2fsck terminated by exit(255)
...
E:Can't read /cache/recovery/last_locale: No such file or directory
...
W:Failed to unmount /efs: Device or resource busy
can't unmount /efs - Device or resource busy
...
W:Failed to set brightness: Invalid argument
I:Screensaver disabled
Atomic Commit failed in DisableNonMainCrtcs
Atomic Commit failed, rc = 0
...
Reboot Recovery Cause is [[BootChecker]RebootRecoveryWithKey]
...
print_recovery_cause() : reboot_reason=[[BootChecker]RebootRecoveryWithKey]
...
[property list]
persist.audio.fluence.speaker=true
...
ro.vendor.build.security_patch=2018-08-05
Supported API: 3
I:/efs is already mounted
W:Failed to unmount /efs: Device or resource busy
check_selective_file:Can't unmount /efs - Device or resource busy
just_reboot_after_update = 1
should_wipe_cahcewipe_cache
-- Wiping cache...
erase_volume(/cache)
...
MDF_I: Completed reset MDF flag!
MDF_I: Completed initialized MDF for Recovery!
mke2fs 1.43.3 (04-Sep-2016)
Discarding device blocksL 4096/153600??????????????????????????????done
Discard takes 0.00051s
Creating filesystem with 153600 4k blocks and 38400 inodes
...
Creating journal (2048 blocks): done
...
copy_logs
...
Cache wipe complete
[Checking pre-multi-csc2]
[start failed section]
sales_code=VZW
Carrier ID=[XAA]
[system partition space check]
The device has /product partition.
[out-recovery]
I:system root image is true, so need to change the unmount point from /system to /system_root
running out-recovery time : 0.000s
running recovery time: 1.738s
copy_avc_msg_to_data(1, )
I:fs_type "ext4" for /cache
copy_file 'proc/avc_msg' 'cache/recovery/last_avc_msg_recovery'
!__RECOVERY_FOR_ASSAMBLY
b_del_recovery_command = true
Rebooting...
## finish_recovery_terminate(del=1, reboot_cmd=reboot, clear_BCB=1)
## finish_recovery(delcmd=1,...
I:Saving locale "en-US"
I:fs_type "ext4" for /cache
I:[libfs_mgr]dt_fstab: Skip disabled entry for partition vm-linux
I:## unlink /cache/recovery/command
copy_logs
I:fs_type "ext4" for /cache
copy_log_file :: create recovery log file '/cache/recovery/log'
copy_log_file :: create recovery log file '/cache/recovery/last_log'
Click to expand...
Click to collapse
Is anyone have experience in detecting problems from the kernel logs?
i can not help you, but we can collect ideas. what about re-sign the system.img? there is a key somewhere, i guess just deleting won't work but maybe it is possible to calculate checksum
or maybe you can switch to SuperSU 2.79 SR3 (latest release from chainfire) or at least look inside the update-binary shell script how to root system.
regarding dm-verity i would start with searching for "verify" flag in your fstabs and remove it. magisk is also doing some hex patches and re-signing, it's the best source to look inside magisk installer zip update-binary/ updater-script, if you have the knowledge to read code
another option is try to port a twrp recovery from another snapdragon (i wonder if somebody did this already) if you can find a porting guide
so the vzw s10 5g is unlockable?
elliwigy said:
so the vzw s10 5g is unlockable?
Click to expand...
Click to collapse
yes
aIecxs said:
yes
Click to expand...
Click to collapse
Figures lol.. I have a g975u from big red n don't plan on buying another lol
aIecxs said:
yes
Click to expand...
Click to collapse
Message me on telegram and I can help you if you help me.. I'm curious in some logs and what not.. I also might have something you can use..
Did you get it working? I have the same phone and I want to use the 600mgz tmobile 5g in a few days, so I need the right rom.
elliwigy said:
so the vzw s10 5g is unlockable?
Click to expand...
Click to collapse
aIecxs said:
yes
Click to expand...
Click to collapse
Snapdragon bootloader unlockable? How?
I'm a VZW customer and can get the phone on an upgrade, but want to root it...
i got a g977p and twrp n magisk working great
do you think it is possible to flash other branding on verizon devices with modded odin?
aIecxs said:
do you think it is possible to flash other branding on verizon devices with modded odin?
Click to expand...
Click to collapse
dunno.. its not possible on n976v..
Was there any luck on rooting the Verizon G977U?
@Vats12 has already successful rooted with magisk in recovery. this thread is for rooting system (kind of rooting where su binary is placed in /system/xbin like for older devices, which breaks OTA)
aIecxs said:
@Vats12 has already successful rooted with magisk in recovery. this thread is for rooting system (kind of rooting where su binary is placed in /system/xbin like for older devices, which breaks OTA)
Click to expand...
Click to collapse
So you want like the supersu method?
ExtremeGrief said:
So you want like the supersu method?
Click to expand...
Click to collapse
Yes, do you know how to do this?
Magisk (guide) does a lot of other things too..
Maybe we can use Magisk to disable the securities and then SuperSu can help in the rooting system?
Vats12 said:
Yes, do you know how to do this?
Magisk (guide) does a lot of other things too..
Maybe we can use Magisk to disable the securities and then SuperSu can help in the rooting system?
Click to expand...
Click to collapse
But why? Safetynet will be gone
What model is the device?
ExtremeGrief said:
But why? Safetynet will be gone
What model is the device?
Click to expand...
Click to collapse
model see OP! i guess because of the buttons needed for booting in magiskrecovery, but the reason is not important only HOW (for Vats12, not for me i don't own this device)
Sorry but this thread needs to be closed
aIecxs said:
model see OP! i guess because of the buttons needed for booting in magiskrecovery, but the reason is not important only HOW (for Vats12, not for me i don't own this device)
Click to expand...
Click to collapse
I don't want to be the one who shouts fake, but the instructions you gave a link to says you have to be able to flash a bootloader first, which means an unlocked blootloader, if you have Verizon rom this is not possible, as the blootloader is locked.
If you did find a way to flash a modified bootloader, or a modified recovery those are the instructions we need, because in fastboot you are unable to do this with a locked bootloader and you are unable to unlock the bootloader on Verizon. If you have a modified bootloader or recovery flashed on your device what did you use to flash it with Odin? Because only way to flash a boot.img is either get into download mode and flash with Odin, or with Edl, if you got into edl mode then can you provide instructions on that, because we would like to know how to get the device into EDL mode as well
Sorry boys this is a hoax.
@DroidisLINUX there is video proof in OP, and again for you:
This is not a tutorial about unlocking and rooting, it is a question how he can modify /system to permanently integrate su

[ROM] - Universal ROM One UI for any Galaxy A

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

Categories

Resources