[MAGISK][TWRP][ARM32/64][A8+]Universal Read Only to Read Write for android (RO2RW) | Auto converting SUPER "system partitions" to read/write mode - Android Software/Hacking General [Developers Only]

Read Only to Read Write for android (RO2RW) ​Update 03.01.2023 : Stable Beta v 3.7.2.1​The first truly working script, original and unique in its logic for all devices with a SUPER partition
Universal auto RO2RW | EROFS-2-RW | F2FS-2-RW by LeeGarChat
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Spoiler: Screenshots
Short description:
Converts EROFS, EXT4(RO), F2FS Super partition to RW
Description:
A simple utility to convert your Super partition to RW mode (Read/Write) As well as the expansion and distribution of free space for each section, depending on how much space is available in the original Super section.
You can flash both via:
1. TWRP: by using controls in the script: (Volume control (+) to switch, Volume control (-) to select) in this case, the new super RW is flashed directly.
2. Magisk module: in this case you will need to go to the terminal and enter RO2RW, and a new RW-super.img will be prepared in the internal memory, you can choose both image output for FASTBOOT and RECOVERY.
For these two modes, the creation of the original super as a backup is supported, the file will also be output to the internal memory as bak-super.img
Spoiler: FAQ
Do I need to format the data after installation?​- No, it is not necessary in normal cases, this script does not affect encryption in the data section. But in some cases, it is necessary to do the date format, it is not yet clear how this is related, for example on Asus devices.
Why do I need this script, for what and why; why do I, need it?​- When your system partitions have read-only mode (RO), then you cannot integrate modifications directly into the firmware, (such as Viper4Android) as well as manually edit/delete files from system partitions. This script converts it in the case of F2FS and EROFS to EXT4, or forcibly in the case of EXT4 enables the "Read/Write" (RW) mode, and also expands partitions as much as possible.
What are systems partitions?​What are system partitions?
- These are the sections that are located in the main container "super" (the script is focused only on devices with super), it includes system, product, vendor, etc., when mounting the system, the structure looks like this:
System <--- In TWRP it is mounted as /system_root
, in the system itself it is mounted as
Code:
/ <--- The main mount point for system
├── /product <--- The main mount point for product
├── /vendor <--- The main mount point for vendor
|
├── /system <--- Here are the main system files
│ │
│ ├── /system/vendor <--- Additional mount point for vendor
│ │
│ ├── /system/product <--- Additional mount point for product
And by analogy with product and system, all other partitions, or other mount points. This can be viewed in the fstab file located in vendor/etc/
Some files cannot be edited at the root, or even if they can be edited without RW, those modifications won't stick, because these are temporary files responsible for the operation of the kernel and the entire linux system, in this case android. For example, proc, or sys, if you open a clean image, or mount a system image, you will see that these folders are empty, and files appear there only after the system is started.
Is ROOT required?​- If you want to prepare a new super partition inside the system, then you need it, the firmware via TWRP does not need root.
How does the script work in Magisk?​- You need to install the archive via Magisk manager as a module, the script will tell you if you need to restart the device. Next, you need to launch the terminal and give it root rights with the command "su", Then enter the command "RO2RW" and the script will run, it will prepare an image of RW-super.img according to your choice and optionally backup the original super bak-super.img, these files will be located in internal memory, after which you need to them to a PC if it is a fastboot image, or flash it via TWRP as super img if the images are for recovery.
What does S=40% SE=10% and so on mean?​- This is the distribution of free space in the super between the partitions 'System=S' 'Product=P' 'System_ext=SE' 'Vendor=V' 'Other sections are there they are= OT'
- For example: The whole system occupies a conditional 4.7 GB. The super partition always has a fixed size in the memory block on the device, for example, take the example with PocoF3, it has 8.5GB there
Code:
Super size 8.5-GB
{1111111111,111111111111,111111111,11111,11111111,111111111111111,000000000000000}
System System_ext Product Odm Vendor Others if any Unused memory
2.2/2.2G 0.5/0.5G 0.8/0.8G 7/7M 1.2/1.2G 1/1GB 3.8~G
- As you can see, there is unused space for the second slot in the section (In 99.99% of cases it is not needed for users with root), and we can use this space for expansion of the partitions, and for system, 40% of this free space will be distributed. For system_ext 10%, for other partitions, if there are any, conditional 10% will be divided between all of them
RO2RW worked correctly, and the system started, but I can't delete or change files, what is the reason?​- Perhaps you have some Magisk module installed that prevents you from doing this, for example OverlayFS.
Also, the reason may be that your device is of the MTK family, in some models there is a restriction at the kernel level for changing system partitions, and therefore mounting in RW, you will not even be able to reinstall magisk on such devices from the system
In this case, you open the way only to modding via TWRP
Also, you need to use the latest version of a normal file manager, these are the ones I recommend:
Solid Explorer File Manager
Solid Explorer File Manager - Apps on Google Play
Organize, protect and share your files in a dual pane layout.
play.google.com
Root Explorer
Root Explorer - Apps on Google Play
The ultimate file manager for rooted devices. The original and still the best.
play.google.com
MT manager
下载 | MT管理器
MT管理器官网
mt2.cn
RO2RW worked correctly, the system started, but in any section, for example vendor, there is little free space available, 2-10mb, can it be expanded somehow?​In- That's how it will not be possible to expand a lot, this is due to the limitation of space in the super itself. System partitions occupy a certain amount of space in it, in response to "What does S=40% SE=10% and so on mean?" there is an example of how it works inside. So, perhaps your firmware weighs a lot, and there is simply not enough space in the super itself, you can fix it if you know what you are doing, you need to remove any garbage, applications from the system partitions.
"/" is system, including "/system/
"/vendor" is a vendor, including "/system/vendor", with the rest of the sections in the same way by analogy. Some partitions have a different mount point, this can be viewed in your fstab, it is located along the path /vendor/etc/*fstab*.
So, you first need to delete something from the system partitions, after which, according to the configuration in RO2RW (it is available in config.txt inside the archive, or in the first choice when installing where "max expansion"), distribute the size according to percentages or a fixed size, i.e. flash ro2rw again, or generate rw-super one more time.
Will RW disappear after the OTA software update?​- Yes, in this case, after OTA, you need to boot into the system first, the process will take place, re-mark super for new data, after that you can make a new super through the system or through TWRP:
1. OTA installation
2. Reboot into the system
3. Preparing a new super, or rebooting in TWRP
4. Installing a new super via fastboot, or firmware the archive inside TWRP
How to flash a file via fastboot?​- You need to move the finished file from the phone to the PC, throw RW-super.img into the folder with fastboot/adb, switch to fastboot mode on the phone, and enter the command in the console on the PC "fastboot flash super RW-super.img".
Read more about using fastboot in the branch of your device.
What are the differences between the first 4 options and the rest when first selected in the script?​- The first four expand the sections based on the maximum size of the super, the rest expand on a fixed scale for each section, for example, it is more logical for OnePlus to choose one of the first 4, since there are a lot of sections, about 8, and it will be very large size to expand each by the same 200 MB.
I cannot delete or modify files from /system/app or from /product/app or from any other specific directory, but at the same time in this directory or I can create a file, and at the same time in the neighboring directory I can change files, the system is RW, how to fix it?​- This happens due to the non-direct mounting of specific folders, it is called overlay filesystem, more about it here: https://wiki.archlinux.org/title/Overlay_filesystem
It specifically mounts any folder read-only. At the moment, you can delete or change or add to this directory only via TWRP, having previously flashed RO2RW by selecting the LiteRW option.
Or go to the terminal and write the commands:
Code:
su
magisk --path
The last command will show the path to the magisk directory, you will need to follow the path:
"The path that the magisk --path command displayed"/.magisk/mirror/
There will be partitions that Magisk mounts directly; by going to them, you will be able to change files without obstacles from OverlayFS.
I have a device with 32GB of memory, I do not know which option to choose so that the memory does not suffer?​- The super section occupies a fixed size in the device's memory and has already been marked up by the manufacturer, i.e. even if the system takes up a conditional 2 GB, super still takes up all its conditional 6 GB in memory, I wrote above about how memory is distributed in super.
Why does the script at some point ask to delete some applications?​- This means that the firmware weighs a lot, and after conversion to RW, it does not fit into super, my script suggests deleting some system applications, for example, in Chinese miui there are such stupid advertising things as TikTok, MiShop, etc. Applications are removed from temporary partitions that are being prepared for conversion to super, from the installed system you do not delete anything, well, if you only interrupt the process, after installing a new super, naturally the applications will disappear.
So why should I redistribute something, I didn't understand. I don't care how the system distributes its "empty space" there, they are still not used by me for files, because it's still a system partition. Just need RW super in the same form as it is. That's all. Is it possible somehow without distribution?​- No, you can't, because it won't be original anyway, it won't affect user memory, it won't affect the OTA process if the firmware is pumping FullOTA, only the process of light (incremental) updates that weigh from 2mb to 800mb on average will be prohibited, and the process will not become faster. And if you don't care, then don't you care that there is free memory in the system partitions? in any case, you can fix it through the config as you need and give 1% for all partitions, or 10 or less MB for all partitions.
If all the tests turn out to be successful, I will start adding more features to the script, so I'm waiting for the tests, and also please fill out the Google form if RO2RW worked correctly or incorrectly, by doing this you help the development, as well as other people to understand how it works on their device and their ROM
Do not PM me about the script and help without permission, write to the support group
DOWNLOAD - SourceForge
TG Group
Telegram support chat for quick feedback
Donate only TG link https://t.me/mfpupdate/47
Credits:
- Thanks to the first link in a Google search for" e2fsck --help" link for clarification on disabling RO
- Many thanks to my own tests with the super section and the official Google utilits lpdump/lpmake/lpunpack as well as the --help menu for it
- Many thanks to the first Google search result for explaining tune2fs and resize2fs
- Thanks to the Magisk team for the BusyBox and bootctl binary
- Thanks to the kory-vadim with UKA for the make_ext4fs bibary, and thanks help menu make_ext4fs
- Thanks to SKKK for the erofs.unpack binary
- Thanks all test users
Please take the survey for more RO2RW statistics
Google Forms: Sign-in
Access Google Forms with a personal Google account or Google Workspace account (for business use).
docs.google.com
Also, the entire list from the survey will be available on this table
RO2RW Support list
Ответы на форму (1) Отметка времени,You Device name: Example "Poco F3",You Device Code: Example "Alioth",ROM: Example "ArrowOS Official 12.11.22",Was the installation successful?,Attach a log file. Located on the path /sdcard/NEO.LOGS/,A brief description of wishes or problems,Which version RO2R...
docs.google.com

Changelog:
Stable Beta 3.7.0.0:
[MAGISK][TWRP][ARM32/64][A8+]Universal Read Only to Read Write for android (RO2RW) | Auto converting SUPER "system partitions" to read/write mode
Read Only to Read Write for android (RO2RW) Update 03.01.2023 : Stable Beta v 3.7.2.1 The first truly working script, original and unique in its logic for all devices with a SUPER partition Universal auto RO2RW | EROFS-2-RW | F2FS-2-RW by...
forum.xda-developers.com
- Fixed non-removable logs. (To delete old logs from versions 3.6.2.1 and below, go to the /data/media/0/NEO.LOGS directory and you can delete them, or in TWRP and delete them
- Changed configuration logic for RW_SIZE and RW_SIZE_MOD parameters
- Changed the logical chain of appearance of SELECT MENU when there was a request for mount2ext4 or continue without mounting
- The logic has been completely redesigned, when in case of unsuccessful mounting, all partitions were not mounted, now everything will be mounted, except for unsuccessful ones during installation, only EXT4 is affected
- Completely redesigned config.txt, a simple one will open it and be surprised
- Now added support for forced start of the script (FOR TWRP), just configure the config as you need, in case of any failure, the script will fall into an error, do not be afraid
- Added a parameter to the config to disable timeout for the volume keys, so that the script does not fall into an error when you do not press the button for a long time
Stable Beta 3.6.2.0:
- Added avbctl for arm32, thanks for providing binaries: brigudav and Bodya-Kolibass
Stable Beta 3.6.1.1:
- Fixed work in arm32
- fixed chcon
Stable Betav3.6.0.0
- Add with only arm32 linker devices support (Support arm32)
Stable Betav3.5
- Added support for OTG and MicroSD
- Added LiteRW for Recovery mode. Some firmware is enough LiteRW
- Added manual configurator inside the script during execution in a running system through the terminal
- Added display of main paths to directories
- Fixed work for encrypted date if it is not available
- Fixed work "check RW and free size"
- Improved LiteRW code compared to LiteRW 3.0
Stable Beta 3.4.2
- Added the ability to check for RW partitions, and for free space in them. Access is available in TWRP and Terminal via termux
- Added the ability to delete pre-delete system applications
- There is an opportunity to choose "Forced deactivation of verivication and verity, or prepare patched vbmeta for manual firmware
- Fixed the work of ignoring the mounting of partitions for checking in the case of ext4
- Fixed code optimization in half of the code, cut the code thanks to universal functions
- Fixed a bunch of issues
- Fixed work install.sh in TWRP, after separating from update-binary
- Fixed work config.txt
- Fixed bash shell operation
- Fixed the calculation of free space in the super section
- Still need Samsung testers for F2FS
Beta 3.3
- Added e2fsck,tune2fs,resize2fs binaries from termux libraries
- Added the ability to ignore additional checks for ext4 systems, because of which images will not be mounted, because of which it is possible to bypass one of the errors in the previous version. But in this case DFE will not be installed
- Another fix for working with F2FS images
- Added an additional method for cases when you need to mount system images to migrate files to a new image, if direct mounting fails, an image dump will be created and it will already be mounted
- Fixed English language in the script
- Added "SKIP" option for DFE, if you don't know what it is, then press SKIP
- Moved to the bash shell, taken from the termux library, now the sh shell built into recovery / android will not be used.
- Executable script is now separated from update-binary
- Other minor fixes
- now u can use commands: RO2RW,ro2rw
Stable Beta 3.2
- Fixed work for F2FS systems, for Samsung. But you need to do additional manipulations for this, for example, to flash a custom kernel according to tests with a Samsung user comes out exactly like this.
- Fixed the problem of detecting an active slot
- The output of files has become with an informative file name like super.sparse.fastboot.active.slot._a.img
- Also, no patches are applied inside the active system, now you need to flash the same vbmeta through the rrecovery, or fastboot, it will also be output as patched and original in the case of a backup
Stable Beta 3.1.1
- Fix modified fstab for F2FS
Stable beta 3.1
- Add dfe (legacy mode) as an additional option
- Fix 55 error and need 9+gb free space for all devices
- Many text inscriptions for users have been corrected and new ones have been added so that users do not swear and understand what is happening
Beta 3.0.4:
- A lot of fixes when converting images
- Fixed a problem when dm-verity sometimes did not turn off
Beta 3.0.3:
- Fixed installation in Magisk
Beta 3.0.2:
- Small fixes
Beta 3.0.1:
- Slightly tweaked the calculator, some problems may have been fixed
Beta 3.0
- Maybe fixed the issue for some OnePlus devices
- Maybe fixed issue for new Samsung devices
Alexey NoOne in MFP, DFЕ, RO2RW, for Android 10+
t.me
- Added the ability to make a backup of the original super inside the custom recovery (TWRP,OFox)
- The methods for converting images from versions 2.8 and 2.9 are combined, and it seems to me that F2FS support has been added, in theory it should work, but testing is needed
Spoiler: Older
Beta 2.9
- The procedure for converting to EXT4.img has been redesigned, there is no longer a need to mount the file system, except in cases where you need to free memory (remove) any garbage from images
Beta 2.8
- Fixed counting and comparison of large numbers for some devices
ZeReF ft in MFP, DFЕ, RO2RW, for Android 10+
t.me
ZeReF ft in MFP, DFЕ, RO2RW, for Android 10+
look at the size how to fix it
t.me
ZeReF ft in MFP, DFЕ, RO2RW, for Android 10+
t.me
Alexey NoOne in MFP, DFЕ, RO2RW, for Android 10+
t.me
- Added check for free memory before creating RW-super.img. will loop until there is enough free space
- Added an inscription about updating the script for magisk, if there was an update, then you do not need to restart the system, otherwise it will be said that you need to restart the system
Alexey NoOne in MFP, DFЕ, RO2RW, for Android 10+
t.me
- Added the ability to backup the original super partition, both in row for recovery and sparse for fastboot
Alexey NoOne in MFP, DFЕ, RO2RW, for Android 10+
t.me
- Added extensive log file with output folder /storage/emulated/0/NEO.LOGS a.k.a /sdcard/NEO.LOGS
Alexey NoOne in MFP, DFЕ, RO2RW, for Android 10+
t.me
Beta 2.7
- Fixed a critical issue when the script was interrupted halfway through and was restarted, in which case data from system partitions could be deleted
- Fix metadata read, moved to android-tools binary from termux pkg
Toni Moon in MFP, DFЕ, RO2RW, for Android 10+
Screenshot (20 nov 2022 23:19:06)
t.me
- Fix install for magisk with hide magisk app
Toni Moon in MFP, DFЕ, RO2RW, for Android 10+
t.me
- Fix calculate size for fixed size like 200-250mb
Thequellu in MFP, DFЕ, RO2RW, for Android 10+
Not work 150,200,250 for me
t.me
- Fixed a bug of different binary files in ROM, moved to a single busybox
Beta 2.6
- Added mode for Magisk.
Spoiler: DEMO MAGISK
Your browser is not able to display this video.
- Fixed some bugs that I don't remember anymore
Beta2.5:
-Fix awk calculate for any device
Sergiocubano1 in MFP, DFЕ, RO2RW, for Android 10+
t.me
Sergiocubano1 in MFP, DFЕ, RO2RW, for Android 10+
t.me
-add config.txt and added option to expand partitions in % or size Mb
Alexey NoOne in MFP, DFЕ, RO2RW, for Android 10+
t.me
Beta2.4:
-Fix problem with a-only devices or like system partition name when not sustem_a/_b
Alexey NoOne in MFP, DFЕ, RO2RW, for Android 10+
Like this https://t.me/PocoF3DFE/65768 ?
t.me
Beta2.3:
-fix problem when "need -(minus)xxxx Mb free size"
Cookies in MFP, DFЕ, RO2RW, for Android 10+
Why me got -3835
t.me
Beta2.2:
-Fix problem when partition have name main or same name
Ngô Túc Thanh in MFP, DFЕ, RO2RW, for Android 10+
t.me
Ngô Túc Thanh in MFP, DFЕ, RO2RW, for Android 10+
t.me
Beta2.1:
- Fix this problem with RW for partition into TWRP ( works )
bad habbit in MFP, DFЕ, RO2RW, for Android 10+
t.me
- nject a crutch for large ROMs to fix the problem ( works with later miui cn on poco f3 )
Deleted Account in MFP, DFЕ, RO2RW, for Android 10+
t.me
- Maybe Fix for A-only devices with super partition ( need test )
Alexey NoOne in MFP, DFЕ, RO2RW, for Android 10+
t.me
- Inject binary for disable DM-verity
Beta2:
-first release for test

Changelog:
Beta 3.0
- Maybe fixed the issue for some OnePlus devices
- Maybe fixed issue for new Samsung devices
Alexey NoOne in MFP, DFЕ, RO2RW, for Android 10+
t.me
- Added the ability to make a backup of the original super inside the custom recovery (TWRP,OFox)
- The methods for converting images from versions 2.8 and 2.9 are combined, and it seems to me that F2FS support has been added, in theory it should work, but testing is needed

Changelog:
Beta 3.0.4:
- A lot of fixes when converting images
- Fixed a problem when dm-verity sometimes did not turn off
Beta 3.0.3:
- Fixed installation in Magisk
Beta 3.0.2:
- Small fixes
Beta 3.0.1:
- Slightly tweaked the calculator, some problems may have been fixed

Just flash the zip in recovery?

TheGhost1951 said:
Just flash the zip in recovery?
Click to expand...
Click to collapse
Good luck getting all the the instructions it is never just flash zip with this stuff and the telegram thread or whatever is probably the hardest telegram thread to figure out in all of telegram. I have over 200 telegram threads I watch normally you'll have pinned messages with download and another pinned message with instructions a to z laid. Not this guy you'll have to figure out the puzzle that is his way of doing things

Techguy777 said:
Good luck getting all the the instructions it is never just flash zip with this stuff and the telegram thread or whatever is probably the hardest telegram thread to figure out in all of telegram. I have over 200 telegram threads I watch normally you'll have pinned messages with download and another pinned message with instructions a to z laid. Not this guy you'll have to figure out the puzzle that is his way of doing things
Click to expand...
Click to collapse
That is one of the reasons I trust lebigmac script, he is through and instructions are clear!

TheGhost1951 said:
That is one of the reasons I trust lebigmac script, he is through and instructions are clear!
Click to expand...
Click to collapse
I have been into xda now for about 6 or 7 years. I was edger to learn and even built 3 custom roms back in android 9. Every year or 2 now google makes changes that are huge changes and I still find myself having to learn things like day 1 at times. The new EROFS kernels and roms is brand new I have no idea how they work. F2FS is samsung and thats one of the reasons I was interested because I have a tab s8 plus. The problem is for this to work it makes a copy of your super partition your system. I was trying to figure all of that out and they get pissed you dont understand all of it already. Well I tried flashing it on poco f3 because I thought I was on a RO rom because of EROFS and it failed and I had 13gb of img files in a couple of folders. It requires a lot of free space and if people have there phone filled up and start flashing it will fill it all the way up depending on how big your system is compared to storage. That should be mentioned its not.

Techguy777 said:
Good luck getting all the the instructions it is never just flash zip with this stuff and the telegram thread or whatever is probably the hardest telegram thread to figure out in all of telegram. I have over 200 telegram threads I watch normally you'll have pinned messages with download and another pinned message with instructions a to z laid. Not this guy you'll have to figure out the puzzle that is his way of doing things
Click to expand...
Click to collapse
TheGhost1951 said:
Just flash the zip in recovery?
Click to expand...
Click to collapse
Techguy777 said:
I have been into xda now for about 6 or 7 years. I was edger to learn and even built 3 custom roms back in android 9. Every year or 2 now google makes changes that are huge changes and I still find myself having to learn things like day 1 at times. The new EROFS kernels and roms is brand new I have no idea how they work. F2FS is samsung and thats one of the reasons I was interested because I have a tab s8 plus. The problem is for this to work it makes a copy of your super partition your system. I was trying to figure all of that out and they get pissed you dont understand all of it already. Well I tried flashing it on poco f3 because I thought I was on a RO rom because of EROFS and it failed and I had 13gb of img files in a couple of folders. It requires a lot of free space and if people have there phone filled up and start flashing it will fill it all the way up depending on how big your system is compared to storage. That should be mentioned its not.
Click to expand...
Click to collapse
I have added a FAQ, if there are any more questions, I will expand the FAQ

TheGhost1951 said:
That is one of the reasons I trust lebigmac script, he is through and instructions are clear!
Click to expand...
Click to collapse
My script also does RW-Super.img, if you use it from the system. In any case, I started to do the design, because I started to do work on another forum. Now it is similar to that on 4 pda

LeeGarChat said:
My script also does RW-Super.img, if you use it from the system. In any case, I started to do the design, because I started to do work on another forum. Now it is similar to that on 4 pda
Click to expand...
Click to collapse
Not very clear " if you use it from the system". I have no clue what you are saying here.

TheGhost1951 said:
Not very clear " if you use it from the system". I have no clue what you are saying here.
Click to expand...
Click to collapse
If you use a script from Termux or another terminal in the running system (that is, not via TWRP), after installing as a Magisk module. I'll fix it now, I'm bad at English

Working

izsdeaman said:
View attachment 5781557Working
Click to expand...
Click to collapse
Need "mount -o rw,remount /parts"

LeeGarChat said:
Need "mount -o rw,remount /parts"
Click to expand...
Click to collapse
your script works perfectly, partitions are both readable and writable, i flashed another system.img after running the script so it doesn't have rw yet.

Update to Stable beta 3.1
- Add dfe (legacy mode) as an additional option
- Fix 55 error and need 9+gb free space for all devices
- Many text inscriptions for users have been corrected and new ones have been added so that users do not swear and understand what is happening

Stable Beta 3.1.1
- Fix modified fstab for F2FS

I have used your Script with TWRP at Xiaomi Redmi Note 10 Pro (#sweet) and it works perfectly, partitions are both readable and writable.
Many thx

I used your script with TWRP as well on OnePlus Pro 9 in combination with lebigmac's script because his script doesn't make all folders / files in the main root storage R/W. Your script helped make it possible.
My main concern: In TWRP, if I try to place any file I backed up from the system to a folder / file that is usually R/O, I get Error:1 in twrp for a simple copy and paste job. Any reason for this? Sorry I am not an expert in android file systems.

immortalwon said:
I used your script with TWRP as well on OnePlus Pro 9 in combination with lebigmac's script because his script doesn't make all folders / files in the main root storage R/W. Your script helped make it possible.
My main concern: In TWRP, if I try to place any file I backed up from the system to a folder / file that is usually R/O, I get Error:1 in twrp for a simple copy and paste job. Any reason for this? Sorry I am not an expert in android file systems.
Click to expand...
Click to collapse
Need after mount partitions "mount -o rw,remount /system_root" for system. "mount -o rw,remount /vendor" for vendor and etc partitions.
Go to advance menu, mount. Mount all parts.
Go to advance menu. Terminal and write this commands

Related

[TOOLS][ZIPS][SCRIPTS] osm0sis' Odds and Ends [Multiple Devices/Platforms]

osm0sis' Odds and Ends -- Misc./Batch Tools, Flashable Zips, Scripts, etc.
General Information
In a nutshell, I just wanted a single thread to gather links to some of my other, larger projects, but also serve as a spot I could put some smaller scripts and zips I've created that I don't think merit their own separate threads. This is partially for my own sanity and will hopefully make it easier for others to find some things as well. A lot of the stuff here was developed with the GN, N4, N5, N7s or N5X, OP5/T, OP6/T, OP7Pro/T, OP8Pro/T or OP9Pro (my devices) and Windows in mind, but could generally be applicable to most devices either out-of-the-box or with some slight modification. If you see something that inspires you, go ahead and mod it, just let me know and give me some credit somewhere. If anyone would like to know the specifics of what's in a particular script that I haven't already linked to more information on, just let me know and I'll post that in here as well.
Note: Older zips with a "cwm-" prefix are NOT only for the now-defunct ClockworkMod Recovery, the prefix was used to denote a flashable zip before I adopted Chainfire's "UPDATE-" prefix. Please use a currently maintained recovery, like TWRP, for all zips to ensure the best compatibility/results.
My development work on my many projects comes out of my free time, so if you enjoy this project or anything else I've done on xda, please consider sponsoring my ongoing work using my GitHub Sponsors profile. For a one-time donation you can hit the donate link from my profile. Thank you for your support!
Misc./Batch Tools
AnyKernel3 (many devices) - link
AnyKernel was a simple template for an update.zip that could apply any kernel to any ROM, regardless of ramdisk to reduce the chance of any issues arising from the custom kernel pairing. The drawback to this is that some kernels require modifications to the ramdisk to enable/set up kernel features, and in the old AnyKernel format there was no way to do this. AnyKernel3 pushes the format even further by allowing kernel developers to modify the underlying ramdisk for kernel feature support easily using a number of included command methods along with properties and variables to customize the install experience.
APK-Patcher (many devices) - link
A proof-of-concept, simplifies APK modification to make it easier for modification creators to keep creating. Using JesusFreke's brilliant bak/smali and iBotPeaches' excellent apktool, modified to run on-device along with the various binaries required, allows on-the-fly APK modifications to be applied via recovery, to whatever ROM APK is present, taking the constant update burden off of the modification creator. The zip is smart and automated, using the APK name to run all the various parts involved for complicated patches and is extensible to any number of APKs in a single zip.
Android Image Kitchen (many devices) - link
A collection of Windows/Android ports of the necessary Linux utilities for Android image (kernel+recovery) mod work, and my own automation script to unpack, edit and repack the ramdisk. Other guides/scripts exist but none of them are universal for target device, compression and/or developed for Windows/Android. Now also Linux builds to bring my improved featureset back to where it came from, recently extended to macOS as well. Has been extremely useful for me in my messing around with kernel ramdisks.
ADB Screenshot (many devices) - attached
Take screenshots while in recovery. Useful for development of recovery apps or error reporting. Original method had lots of different threads around with the general method for various devices but I figured out a couple tricks required for getting it working on the Galaxy Nexus and then automated the process. Tested and confirmed working with both pixel formats of CWM and TWRP. More information in this GN Q&A FFmpeg thread. New method uses fb2png and should work on all ARM devices.
ADBsync sdcard Backup (many devices) - attached
Backs up the entire sdcard so that you can have a complete snapshot of your device when you make periodic backups, and be able to restore things exactly as they were. Automates the sync process of Renate NST's great adbsync utility which makes only newer files get pulled, significantly decreasing backup time for the sdcard compared to "adb pull". Original version posted in the old adbsync thread. Defaults for devices with /data/media/ internal sdcards (Nexus devices, etc.), but is easily customizable to backup other mountpoints or backup via ADB over WiFI.
Flashable Script Zips
TWRP A/B Retention Module script (many devices) - link
We need an interoperable root ecosystem again. A/B and system-as-root were a big setback to the root community in this respect. To help alleviate this issue, this atypical Magisk script zip "module" will keep TWRP installed to both slots when flashed from Magisk Manager after an A/B OTA has installed in the background, but before you use Manager to install Magisk to inactive slot.
Nexus BootUnlocker script (GN, N4, N5, N7 '13, N10) - attached
I don't know about everyone else but sometimes I find I've rebooted into the bootloader only to realize I've forgotten to unlock it in segv11's excellent BootUnlocker App beforehand. Well, I decided to make a BootUnlocker Script for my Galaxy Nexus so I could just boot to recovery quickly, unlock, then adb reboot-bootloader (or use my Reboot To Bootloader script below) to get back without having to fully boot the OS to make the change. Also extremely useful in the case you aren't able to boot. As with the app there is no data loss like there would be with fastboot, allowing you to relock for safety. Originally posted in the GN EDIFY Scripting thread. Modified for the newer Nexus devices and combined into a single Nexus BootUnlocker zip with tamperbit reset support added using information from the BootUnlocker App Dev thread. For newer devices using Factory Reset Protection (N6 and later), the BootUnlocker Script can't directly toggle the lockstate due to new security tokens, but it does now toggle the ability to use "fastboot oem unlock" without needing a booted device.
N7 BootUnlocker script (N7 '12) [creation guide] - link
The Nexus 7 2012 is a special case. Per-device encryption of an entire partition makes it impossible to support the N7 '12 in a simple root app, or flashable zip as above, however using my guide and included script you can now create a working BootUnlocker Script Zip for your specific device. As with the above scripts there is no data loss like there would be with fastboot, allowing you to relock for safety.
sdcard Fix Permissions script (many devices) - attached
A little flashable zip script to fix ownership and permissions of files and directories on the sdcard to what they would be if Android OS had put them there itself, since some apps can't access pushed files that have root.root as owner/group. This is useful when restoring to your sdcard backup, as with my ADBsync sdcard Backup batch script above, since generally, pushed files get root.root from adb shell and higher permissions than usual. Also a solution for a bug where sdcard files get lower permissions somehow, resulting in similar access problems. Currently written for devices with /data/media/ internal sdcards (Nexus devices, etc.), but could easily be modified for other mountpoints. No longer required on Oreo since it fixes these itself at boot.
Recovery SLAM script (many devices) - link
Recovery "Simple Legacy Auto-Mount" (SLAM!) is for devices that have been updated to SAR, but there are older zips that break in TWRP because they rely on the mounts occuring a certain way, especially during a ROM OTA. Recovery SLAM mounts them more as the zips would expect, generally allowing them to proceed. Most useful for premounting /system before a legacy zip with my FlashAfterUpdate addon.d script.
SUmount script (many devices) - attached
Another tool for the toolkit of anyone using Chainfire's SuperSU or topjohnwu's Magisk systemless root, this simple flashable zip script toggles the mounting of the su.img, magisk.img and magisk_merge.img while in recovery to allow easier access to the /su, /magisk and /magisk_merge filesystems, simplifying manipulating it via ADB shell, AROMA Filemanager or TWRP's terminal/file manager. Especially useful to anyone who uses su.d/post-fs-data.d scripts or can't boot due to some issue with a user addition in /su/su.d, /su/bin or a Magisk module.
unSU script (many devices) - link
While experimenting with Chainfire's brilliant SuperSU systemless root, I discovered that uninstalling the older style system-modifying root through his app (<2.60) didn't restore all of the modified system files correctly, so I wrote this script to do so and aid in people wanting to unroot from recovery. Expanded to support uninstallation of Koush's SuperUser, phh's Superuser, SuperSU Systemless (su.img and BINDSBIN), Magisk, LineageOS addonsu and custom ROM su binaries.
Adreno Systemless Installer script (N5, N6, N7 '13) - link
For use with Qualcomm's official updated preview GPU drivers packages for Adreno 3xx/4xx-powered Nexus stock images. This is a different frontend to take whatever device zip from Qualcomm is in the same directory as it (also searching /sdcard), then unpack and install it as a Magisk module or into the SuperSU systemless root /su filesystem, instead of the usual /system.
Kernel MultiROM Injector script (many devices) - attached
Intended for use in Chainfire's excellent FlashFire app to automate re-injecting the current boot image ramdisk with Tasssadar's brilliant MultiROM's trampoline bootmenu; this avoids having to do this as an extra step in MR-TWRP following an OTA, ROM Delta or SuperSU update. Should work for all EMMC devices with MultiROM installed.
GN PIT Editor script (GN) - link
Dumps and alters the Galaxy Nexus' Partition Information Table (PIT) to reclaim unneeded space from the /cache partition and add it to /system to allow for larger ROMs and GApps packages to make continued support for Lollipop+ easier. The resulting file is byte-for-byte identical to those created by external tools like PIT Magic, so that it may be flashed back to the device in Odin Mode to complete the repartitioning.
Kernel Emergency Reset script (many devices) - link
Basically a go-to cure-all for custom kernel users experiencing issues after an upgrade due to old settings left over in a kernel control app (eg. franco.Kernel updater, Trickster, etc.), or problematic init.d/userinit.d scripts. It's also useful if you just want to make sure you're running clean defaults without conflicts.
Reboot To Bootloader script (all devices) - attached
Those who preferred using CWM may have noticed a couple of things missing that the other popular custom recovery, TWRP, has built-in. One of these is a file explorer/manager, which is answered by amarullz' brilliant AROMA Filemanager. Another thing I found myself wanting was a way to reboot back to the bootloader once I'm in recovery, so I created this very very simple flashable zip script. (No longer required on CWM >=6.0.3.5). Note: Once in the bootloader, "Start" will boot you back to recovery. Not sure why, but it's not a big deal, just reboot normally from recovery at that point.
Flashable Installer Zips
Flashlt Installer (many devices) - attached
Installs my Flashlt script to allow easy flash and dump of boot, recovery and radio/modem (possibly others) EMMC or MTD partitions while booted, and trimming of null characters from files. Also installs a script zip that makes flashing boot.img (kernel), recovery.img, and radio.img/modem.img (baseband) files via recovery simple. It aims to save the average user the hassle of repacking their own image zip, or using the command-line or fastboot to flash it. Place an appropriately named file in the same directory as the zip and flash away! Should work on all devices with normal partition naming ("boot", "recovery" and "radio" or "modem") which accept Android standards-compliant images (including a/b slot devices like Pixel). Extremely handy when used with amarullz' brilliant AROMA Filemanager, and/or my Android Image Kitchen: Mobile Edition (linked above).
Busybox Installer (all devices) - attached
A byproduct of building my own static busybox compiles in all Android architectures for my AIK-mobile package, I figured I might as well offer them up separately as well since there weren't any providers making Android x64 builds when I was researching. Detects device (ARM/64, x86/_64, MIPS/64) to install the busybox binary, cleans up symlinks from any previous install and generates new ones. Detects and supports SuperSU/Magisk systemless installs. Please read the release post about applet inclusion and special features.
nano Terminal Editor Installer (many devices) - attached
An installer to push my own static Android ARM build of the nano editor and required files to /system/xbin and /system/etc/terminfo, with a wrapper adding a --term option to try terminfo profiles more easily. Detects and supports SuperSU/Magisk systemless installs. Can then be used from Terminal while booted. When flashed in recovery also allows temporary recovery use by pushing a script to /sbin/nano with the required setup, so you can trigger it from adb shell or TWRP Terminal. Makes it extremely easy and worry-free to tweak and mod on the go, knowing you can edit the faulty build.prop or startup script if something goes wrong.
adb + fastboot Installer (many devices) - attached
Marshmallow removed adb from the /system/bin directory. For those wanting this functionality back, here's an installer to push static compiles of adb and fastboot to /system/xbin, with a wrapper to point adb to the correct HOME directory and set TMPDIR for compatibility. Detects and supports SuperSU/Magisk systemless installs. Can then be used from Terminal while booted.
Nexus Media Installer (many devices) - attached
Custom ROMs usually don't include Google ringtones/notifications/system sounds and bootanimation, instead including numerous terrible sounds and often less-than-desirable visuals. This installs the media from old Nexus devices systemlessly (SuperSU and Magisk supported), or to system with an addon.d script to survive a ROM update or dirty flash, and using the zip name (also reading from /data/.nexusmedia) to allow user choice.
mtd-utils Installer (many devices) - attached
mtd-utils (flash_erase, nanddump, nandwrite) are necessary for mod work on a number of Android devices using mtd/char devices instead of the more standard emmc/block devices, and where the busybox versions have been less reliable in the past (especially where it doesn't include flash_erase), using the official suite is preferable. The older ARM builds available on XDA were about a decade old, so I worked out how to configure and cross-compile from the latest source. Detects and supports SuperSU/Magisk systemless installs. Can then be used from Terminal while booted
ZipSigner + Zip Installer (many devices) - attached
Signing zips and APKs on-device has always been a tricky proposition due to memory requirements of the old SignApk.jar, running a jar on an Android device, and other complications for script-based zips. Android has always been missing a zip binary (for unzip see my Busybox Installer). ZipAlign is also handy if you do APK work. To remedy this once and for all, here's an installer to push my dexed version of topjohnwu's brilliant zipsigner.jar and static ARM compiles of zip and zipalign to /system/xbin, with a wrapper to run zipsigner with Android's dalvikvm. Detects and supports SuperSU/Magisk systemless installs. Can then be used from Terminal while booted.
odex Script Installer (all devices) - attached
Based on the great work and binaries from this thread, a simple installer to push my odex script along with the required dexopt-wrapper and zip binaries to /system/xbin and set the appropriate permissions. Automates the procedure to odex any apk or jar from the commandline to potentially improve performance. Dalvik runtime (KitKat and below) only. Also uses cut from busybox.
N5X/6P BLOD Workaround Injector (N5X, N6P) - link
When, unfortunately, my Nexus 5X was recently stricken with the abominable Bootloop of Death, I looked into the well-publicized workaround and turns out it was all contained in the ramdisk and cmdline of a Android image. This is the perfect application of AnyKernel2, so I made an AK2 add-on zip to patch both the current boot and recovery partitions with all the current workarounds to help others afflicted by this issue to hopefully regain their data/device as easily as possible. Linked is the Nexus 5X thread, the Nexus 6P thread may be found here.
N7'13 TWRP flo2flox Injector (N7 '13) - link
The Nexus 7 2013 (flo) has seen a bit of a resurgence with official Lineage 18.1 support repartitioned as "flox". Since official TWRP is still automatically being built only for flo and this isn't compatible with flox, and the minor changes required for flox support were a great application of AnyKernel3, this zip automates the patching process so making official TWRP from flo2flox is easy for all going forward.
GN Synapse Support Injector (GN) - link
This AK2 kernel add-on for the Galaxy Nexus injects support for the Synapse tweaking app into the current boot partition ramdisk, including all the Synapse interfaces for the GN I've maintained since the Franco Kernel and DirtyV Kernel days.
GN Recovery Color Correction Injector (GN) - link
The aging screen on the Galaxy Nexus was looking pretty rough in recovery until I discovered the recently added new OMAP kernel color correction was also present in the most recent TWRP recovery versions. So this add-on zip uses AK2 to patch the current recovery partition ramdisk to add the command to reduce that green/yellow SAMOLED nastiness.
Kernel init.d Support Injector (many devices) - attached
An experimental proof-of-concept. Following from great ideas by Captain_Throwback in my AnyKernel2 thread and using script from my Flashlt script above, this AK2 zip will inject basic init.d bootscript support into any kernel ramdisk on any emmc device with normal partition naming and using the Android bootable image standard, without having to bloat a ramdisk using a busybox binary. This zip is also signed, so could potentially be used with non-Nexus stock recovery on a locked bootloader.
CMSetup Fix for GApps Installer (many devices) - attached
Installs a su.d script fix to work around the CyanogenMod/LineageOS 13 ROM issue of a broken Quick Settings pull-down when CMSetupWizard is removed as part of a GApps installation. Removing CMSetupWizard is useful because it allows Google's SetupWizard to grant apps default permissions, so the workaround automatically executes the only required command at the appropriate time following first boot. Requires a SuperSU/Magisk installation (for su.d/post-fs-data.d support). Flash after the SuperSU/Magisk zip and your GApps.
Dev Team init.d Pack Installer (all devices) [see "950iosettings, etc." below] - link
A simple installer I wrote to create the /system/etc/init.d/ directory, extract the latest init.d scripts as published by the "Franco's Dev Team" tuning collective (of which I was a member), then set correct owner, group and permissions to the entire init.d directory. If you are a developer and would like to include these tunables/scripts in your kernel or ROM please provide credit. A lot of time and effort has gone into this project and that's all we ask.
Scripts
950iosettings + 875mntsettings + 925vmsettings + 975experimental init.d scripts (all devices) [with Franco's Dev Team] - links
Also available bundled in an installer. The scheduler tunables have already gained a bit of attention/adoption on various devices and kernels, but this is the init.d script I wrote to set the new custom scheduler tunables values as "default" by an independent loop, sleeping in the background and detecting each time the scheduler is changed. There is no effect on idle drain or deep sleep. The settings included are the complete work of the "Franco's Dev Team" (or "Team Franco") tuning collective, of which I was a member. We strove to perfect the scheduler, vm and various other settings for the smoothest and fastest experience available. The collective was: malaroth, osm0sis, joaquinf, The Gingerbread Man, pkgnex, Khrushy, shreddintyres. If you are a developer and would like to include these tunables/scripts in your kernel or ROM please provide credit. A lot of time and effort has gone into this project and that's all we ask. Lollipop(+) updated versions now also available through the continued excellent work of pkgnex.
999-flashafterupdate.sh addon.d+addon.d-v2 script (many devices) - attached
For ROMs that don't have "Flash After Update" support built into their delta/update process. During an upgrade, this script will flash zips from an sdcard directory, with several options (listed in the script header) for displayed output, after all other addon.d backup/restore actions have completed. This can be used to flash SuperSU and then an AnyKernel2 kernel on LineageOS, for example. Only zips that specifically support addon.d-v2 can be supported on A/B devices. See this how to for instructions for use with A/B devices. Unzip once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
98-twrp_ab.sh addon.d-v2 script (many devices) - attached
Allows you to keep TWRP installed in a boot partition through A/B OTAs with Magisk installed by copying the TWRP ramdisk from the current slot to the updated one, before Magisk's addon.d-v2 script patches it. Requires a current Magisk installation since we need the tools and Magisk's the only way to ensure a working addon.d-v2 environment across ROMs at the moment. Unzip once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
97-dumpimages.sh addon.d+addon.d-v2 script (many devices) - attached
For ROMs with boot.img, etc. inside an OTA payload.bin or otherwise inaccessible, it dumps the updated chosen partitions before further modifications (TWRP, Magisk, etc.), saving it to /sdcard/Download/boot.img or to/from other customizable locations at the top of the script. Unzip once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
00-omnirootfix.sh addon.d-v2 scipt (many devices) - attached
OmniROM appears to include 69-gapps.sh automatically in its /system/addon.d directory despite not shipping with any GApps; when not rooted this doesn't appear to present a problem, but really this is only because the script doesn't have enough permissions to run how it's supposed to since Omni's sepolicy doesn't let addon.d-v2 work correctly. Once Magisk is installed, providing more privileges to the addon.d-v2 update_engine, Omni's 69-gapps.sh would remove important system files during an A/B OTA when no GApps were installed, so this script will simply prevent that for those wanting to run Omni minimally and with root. Remove the .txt extension once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
00-resizesystem.sh addon.d script (many devices) - attached
One common solution for aging devices is to resize the /system partition so that it can hold newer, larger ROMs and, of course, GApps packages. On devices where the /system partition has been resized to hold larger GApps packages, but the ROM in use has system.dat format zips with no resizing functionality, the extra space would get lost in a ROM delta flash, breaking things when GApps attempted to restore. This script will resize the system partition to its maximum before the GApps restore occurs on EMMC-based devices with standard partition naming. Remove the .txt extension once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
10-extract-lineage-kernel.sh addon.d script (many devices) - attached
Nowadays with systemless root and other boot.img mods out there, it's good to have a backup of your ROM's unmodified boot.img handy in case you want to do a clean flash of your boot partition. Since LineageOS moved their update zips to a /data/data subdirectory that made this harder to get to, I automated the procedure as an addon.d script so that the newest gets extracted on each update. The output directory may be changed by editing the script. Remove the .txt extension once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
999-customkernel.sh addon.d script (many devices) - attached
Addon.d is awesome at restoring your GApps, root app, and other things after a ROM Delta, update, or dirty flash, but of course this can leave a lot of stuff out that you'd also have to re-flash (see below for a personal addon.d script you can modify to cover anything else you want to save). This script aims to help remedy the issue for custom kernel users on EMMC-based devices with standard partition naming by dumping the current kernel as part of the addon.d backup process, and then restoring it after the ROM has flashed its included kernel. Remove the .txt extension once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions. This is deprecated by my FlashAfterUpdate addon.d script, above.
logohack.sh (GN) - link
Galaxy Nexus bootloader image replacement hack script. Inspired by bitdomo's brilliant imgdata tool and replicating the functionality of Ezekeel's abandoned, broken paid Logo Me app, this script improves upon the app version by working on all Galaxy Nexus bootloaders and on-the-fly, to allow replacement of the Google logo and lock images within the sbl partition. Remove the .txt extension once downloaded and place in /system/bin/ or /su/bin/ with rwxr-xr-x (755) permissions. It can then be run from the Terminal.
flash_image (many devices) - attached
MTD devices require a little extra finesse when flashing partitions from the command prompt and multiple commands, versus MMC devices, for which we can just use the dd command both ways. I wrote this little script to simplify the process for myself in my MX Box tinkering. It parses /proc/mtd so you only need to enter the partition name. It requires _n0p_'s excellent MTD-Utils compiled for Android, and uses grep and cut from busybox. Remove the .txt extension once downloaded and place in /system/xbin/ with rwxr-xr-x (755) permissions. It can then be run from the Terminal.
getprio (all devices) - attached
Android doesn't allow you to check the priority (or "niceness") of a process with the getpriority command as you would with normal Linux, and busybox doesn't provide this functionality either, so I wrote this reasonably simple script to allow you to check the niceness of a process. Some kernels have been experimenting with increasing the priority of com.android.systemui for smoothness, so this command can be used for testing different levels and whether the renice command set it correctly. Remove the .txt extension once downloaded and place in /system/xbin/ with rwxr-xr-x (755) permissions. It can then be run from Terminal with either the pid (default), class or a class name search string. Uses pidof and pgrep from busybox.
gappsintegrator init.d script (many devices) - link
ROM GApps Auto-Integration of /data/app GApps into /system, complete with libs (unlike Titanium Backup), for Jelly Bean through Marshmallow. It should process things early enough in the boot that afterwards Dalvik will immediately do the cleanup ("Android is upgrading..."), much like following an OTA. An initial GApps installation is one requirement and there are some important notes for support of Lollipop and above. Intended for ROMs with a busybox installation. Can also remove libs from and zipalign the integrated APKs if those binaries are present in the ROM.
lmkwhitelist init.d script (all devices) - link
Users running ROMs or kernels with extremely aggressive custom lowmemorykiller (lmk) driver settings may notice their launcher redrawing frequently. Some kernels/ROMs also include an exclusion for this by making stock (or the included) launcher unkillable, however that still leaves all the 3rd party launchers out there that people use. I wrote this init.d script with a community created list of the most common launchers to make whichever one is installed unkillable. This also has instructions for how to set up init.d scripts. If your launcher isn't included in the list, you can modifiy it by adding the application class name (from the Play Store URL) to the list within quotes, separated by spaces. Also part of the 975experimental Franco's Dev Team init.d script, linked above.
dalvik2cache init.d script (all devices) - link
Bind mounts the dalvik-cache directory to the cache partition. Useful on devices where the cache is sizable and unlikely to be used for OTAs (custom ROM, etc.), and the data partition is not. Every little bit counts!
settingsdump.sh (all devices) - attached
In comparing vm settings from various kernels and ROMs to see what's out there, I wrote this script to generate a list of the values of all the relevant sysfs files and directories. Now expanded to cover cpu and governor as well. Remove the .txt extension once downloaded. To run it, assuming you just put it in /sdcard/, open Terminal Emulator and type: "sh /sdcard/settingsdump.sh" (without quotes). It will output the file to /sdcard/r*-output.txt where * is the revision of the kernel you're running. This makes it easier to compare what's changed between different nightlies, for example.
Other
BootUnlocker app (many devices) [with segv11] - link
With a number of users researching and contributing the bootloader lockbit and tamperbit offsets in threads around xda and to the development thread for seg11's excellent BootUnlocker app, I have begun making beta builds with these new devices added. With hopes of adding any/all that can be, it now supports all the older Nexus devices, OnePlus devices and several others. We are accepting Pull Requests and collaborators for further device/design updates. Check my original revival post for more details.
G-Box Midnight MX2 g18ref ROM, recovery and kernel osmods (MX Box) [with BenniBenassi & relol] - link
I bought one of these unbranded Android TV boxes and was immediately determined to tweak it as much as possible following my work on the Galaxy Nexus. Flashing the official Matricom stock ROM over the generic included one I also discovered the recovery didn't have any A/V output to my old CRT TV. I set out to dump the kernel and recovery images, fix the recovery images and tweak the kernel defaults for the most performance.
Holo Stock Notification Icons for Notification Toggle (many devices) - link
This was likely my first post ever on xda. It is a "Notificon" pack for j4velin's fantastic Notification Toggle App, bringing a seamless stock look to this indespensibly useful app. Also a great way to get back to Settings easily from the notification shade since Android 4.2, and add shutdown/reboot menu functionality to stock/vanilla ROMs.
My GN Kernel Settings + 900colorsettings init.d script (GN) - link
I was being asked a fair amount for my kernel settings over in the GN f.K thread where I helped out, so I posted them up. I also put up an init.d script for setting color values on boot, which can drastically change the outcome on older panels, and at least makes custom values seamless. Instructions for how to set up init.d scripts are included.
Galaxy Nexus Baseband Collection: maguro - i9250 / M420 / SC-04D Radios (GN) [with josteink] - link
Original thread author josteink moved on to other devices and asked me to take over the thread. Lots of great information on the GN radios, posted alphabetically by region and chronologically by the build string date I found embedded in the images. Huge respect and massive thanks to josteink for seeing the need for a baseband thread almost as soon as the Galaxy Nexus was launched, way back in December 2011, and maintaining it diligently.
TK GApps (many devices) [with TKruzze] - link
After helping TKruzze with some of the concept and script work for his famous Paranoid Android Google Apps packages (PA GApps 2.0), we decided to collaborate again for his return to XDA after a much-needed hiatus, with me doing the thread setup and management with DevDB, and a Q&A section so things don't get overwhelming for those trying to follow along. The main thread remains locked and can be subscribed-to for those wanting notification only when there's a new GApps release, and the Q&A functioned as the main discussion thread where people can help each other. Much of the script is the same from PA GApps but TKruzze has added some impressive new features, made many fixes and revamped a large portion of the documentation. I also continued as an adviser and submitted script when needed.
Nexus Louder Audio Improvement Patch (GN, N4, N5, N7 '12, N7 '13) [with Misledz] - link
One of my earliest forays into EDIFY scripting, I wrote the flashable zip install/revert scheme for this great volume boost mod by Misledz. The scripts check to see if the mod is already installed and if so recommends you flash the version-specific revert that goes with it. More on that in the Intelligent EDIFY thread. During install the script also backs up the ROM files it replaces so that you don't need to reflash your whole ROM if something goes wrong, just use the revert to restore the backups. I eventually rewrote this completely in shell script with a Universal install/revert, that detects which files to backup and leaves a list for itself to revert. I also wrote automation batch scripts for Misledz as the "Louder Build Farm" to simplify his work for all the versions of the mod he maintains for various devices, linked in the knowledge base below. GN/Dev thread linked; Other links can be found there.
Payload-Dumper-Go for Android Magisk Module (many devices) [with ssssut] - link
payload-dumper-go arm compile and wrapper for use extracting from payload.bin on-device.
Git for Android Magisk Module (many devices) [with Termux] - link
Hacked arm64 git commands for use on booted Android.
Google Experience XML Magisk Module (many devices) [with Google] - link
Hacked Google Nexus/Pixel/Android One sysconfig feature xml entries for use on non-Google devices.
Digital Wellbeing Add-on Magisk Module (many devices) [with Google & Open GApps] - link
Digital Wellbeing for Android 12L and 13 GApps that don't properly support it (like MindTheGapps).
Model Mod Magisk Module (many devices) - link
Experiment to append _SN to the existing device model to get CTS passing again after the September 2021 server-side SafetyNet changes, (superceded by kdrag0n's excellent Universal SafetyNet Fix module).
Xposed Framework Installer Zip (many devices) [with rovo89 & Tungstwenty] - link
When JB4.3 broke all previous root methods I made this simple frontend script to install rovo89's brilliant Xposed Framework for modding ROMs until they could release a new version themselves. Xposed Framework files and the install.sh used are the work of rovo89 and Tungstwenty; I have only created a recovery flashable zip and shell script to function as an alternative frontend for the framework installation process. Then updated to mimic the APK installation and allow devices with /system write protection like HTC's S-ON to install the framework. (Deprecated as of Xposed 2.5).
BBCode for my xda Signature (n/a) - link
Last and definitely least. A number of people have asked me about the formatting of my signature, so here are some simple BBCode tricks and workarounds I thought others might like too. Keep in mind that my signature can be significantly larger because of my RC status.
Enjoy!
Questions, comments and feedback welcome.
Credits & Thanks: All authors of any included binaries and libraries for their amazing work. Anyone who's helped me with these projects along the way.
Disclaimer: Naturally, you take all the responsibility for what happens to your device when you start messing around with things.
Knowledge Base
Links to information/research posts I've made and other experiments.
----
avbtool-arm (zip package) - link
AOSP's BootSignature.jar for AVB v1 was relatively simple to run on-device for boot.img modifying flashable zips like SuperSU and AnyKernel2 but avbtool for AVB v2 is written in Python, so that makes things a bit trickier. For experimentation I whipped up a little wrapper script to run avbtool on-device with an actual Python interpreter.
Omni SoundPacks (and Nexus Stock pack) - link
My suggested expansion to the Omni SoundPacks feature to allow it to cover all SystemUI sounds.
OnePlus FingerPrint Material Icons (Information) - link
My preferred fingerprint icon for the in-screen OP6T sensor using Zacharee1's excellent OPFPControl app.
----
Complete Shell Script Flashable Zip Replacement + Signing Documentation (Reference) - link
Using a shell script instead of an update-binary in flashable zips can make them universal for architecture and put a lot more power in the hands of the developer. This reference documents all of the analogous functions myself and others have written to make this easy.
Booted Zip Flashing Shell Setup Script (Reference/How-To) - link
My implementation of booted zip flashing, originally for AnyKernel2 in Franco Kernel Updater (now Franco Kernel Manager) and since expanded to support AK3's ability to be flashed from anywhere and support most other flashable zips on devices that allow remounting /.
Unified ext4/f2fs ramdisk + ROM installer (Reference) - link
Supporting multiple filesystems like ext4 and f2fs in a custom kernel boot.img ramdisk required some work before custom ROMs were updated to do this themselves and use fallback fstabs. This is the roll-up post gathering all the changes necessary for someone to add this pre-official support to their ramdisk, kernel and ROM installers.
FlashFire Recipe Book (Reference/How-To) - link
Just a quick reference of common tasks (OTA flashing, etc.) for people figuring out how to use Chainfire's brilliant flashing app.
personal addon.d (How-To/Template) - link
I was tired of having to redo a number of tasks (remove files, backup Nexus sounds and replace the AOSP ones, etc.) to get my device back to where I wanted it after flashing a newer nightly, so I wrote an addon.d script to do it all for me. Provided if anyone wants to modify it for their own personal setups.
KBox2: Set Up A Build Environment On Android (How-To) - link
Very cool Linux-like command prompt environment on Android. I originally had it set up as a native build environment with rudimentary git support. You can follow my steps to do the same.
Keeping SafetyNet Passing With Incremental Google OTA on Virtual A/B Devices (How-To) - link
Post-reboot checks added to the incremental OTA process for Virtual A/B devices using Google's servers made it impossible to remain rooted throughout the OTA process, but following these instructions you can complete the OTA then re-root without SafetyNet catching you.
Cygwin-Linux Cross-Compiler (How-To) - link
Compiling from Cygwin with a Linux target required some fixes to the toolchain, so I detailed them for future reference.
N4/N5/N7 '13 Qualcomm Optimized Bionic/Dalvik Patch Comparisons (updated zips) - link
Using Qualcomm optimized files on Snapdragon devices improves performance greatly on KitKat. Especially good on Nexus devices or AOSP ROMs. I took the time to dissect the required files and see what worked best.
AIK Build Farm (desktop shell script) - link
The Cygwin shell script "build farm" I wrote for my Android Image Kitchen project to perform all of the cross-compiles required for the mobile and Linux versions. Allows someone to setup the repos from scratch and build.
Louder Farm (zip packages) - link
The Nexus Louder project was a pretty massive system file modifcation undertaking. This details my work to make building the patch zips easy for co-dev Misledz, and includes the farm packages at various stages.
----
N7 '13 Bootloader cracking (Information) - link
Sat down with my parents' Nexus 7 2013 (before I got my own) over Christmas and cracked the bootloader for unlock support via my Nexus BootUnlocker Script zip and later the official BootUnlocker App.
N7 '13 Unbricking (Information) - link
Instructions I put together for recovering from a hard brick (bad bootloader flash usually), via the exposed Qualcomm/Marshall London "HS-USB Diagnostics 9006" mode.
Default System Alarm Setting Script (Information) - link
A script snippet function to allow easily changing the default alarm sound on ROMs that hide this ability, like OnePlus' OxygenOS.
SELinux Audit2Allow Script (Information) - link
A script snippet for turning SELinux audits in a logcat into allow statements ready for supolicy or magiskpolicy.
Partition Dumping Script (Information) - link
A script snippet for dumping all non-userland partitions from any eMMC device, useful for bootloader lockstate hacking.
GN Partition Information Table (PIT) Research (Information) - link
Wanting to push the GN as far as possible, several remaining users came together to discuss how it could be repartitioned to add more space to /system to better support Lollipop+ and I contributed a large amount of R&D over several posts throughout the thread which resulted in the PIT Editor script zip (posted above). Could be useful for other devices using PITs as well.
GN/N7 '12 tunables post (deprecated) (Reference) - link
The list of supported basic tunables on franco.Kernel for the Galaxy Nexus and Nexus 7 2012 back when those were my primary supported devices.
GN scheduler tunables HZ scale (Information) - link
The Galaxy Nexus scheduler (and other) tunables opperate on an odd scale due to the the device's HZ value in the source being weird. This post experiments with that and finding the method/equation behind it.
LMK boot timing (Information) - link
The Android lowmemorykiller module default tunables go through a bizarre sequence during boot, so I experimented and came up with a script to allow setting alternates as soon as possible.
LMK Launcher Whitelist/Niceness settings reversion (Information) - link
Setting oom_adj values and changing the niceness on launchers and systemui improved responsiveness and helped avoid these important processes being killed by LMK. Then I noticed sometimes they spontaneously reset; experimentation followed.
MTD partition flashing (Reference) - link
My MTD-based MX Box set-top device gave me a few hours of headaches until I figured out how to dump and flash the boot (kernel) partition correctly. This details my experiments and the correct procedure I discovered.
nano Android static build instructions (Reference) - link
A little documentation of all the dirty tricks I used to get the nano terminal editor utility to build for Android from the official git repo source.
mtd-utils Android static build instructions (Reference) - link
A little documentation of all the dirty tricks I used to get mtd-utils to build for Android from the official git repo source.
Pixel Launcher bind mount instructions (Reference) - link
I was annoyed that on stock Nexus 5X and 6P Pixel Launcher wasn't available and when sideloaded lost the Google Feed pane, so I replaced Google Now Launcher with Pixel Launcher using bind mounts.
Netflix broken DRM workaround instructions (Reference) - link
Custom Nexus 7 2013 ROMs Nougat+ have all had issues with Netflix due to some peculiarities of the DRM libraries the ROMs use, but some found that intentionally semi-breaking DRM using files from other devices allows Netflix to work again, but this broke Google Play Movies. I did some more testing, resolved the Play Movies issue and wrote up how to install the single needed replacement library either to system or with a systemless bind mount.
----
Thanks for the interest! More to come, I'm sure!
What can I say...
SUBSCRIBED
Sent from my Galaxy Nexus
Far superior
thanks
Franco Team always made a great work .... Keep it up.
Thanks for these great useful infos!
Bookmarked, subscribed and rated a well deserved 5 stars :good:
Thanks for sharing. Very useful.
Nice...
Envoyé depuis mon Galaxy Nexus avec Tapatalk
Nice collection osmosis
Many thanks osm0sis, to you and all the team for all your contributions Almost feel as though I know you since I've been hanging round GNex and N7 franco.Kernel threads for so long and if you pop up on the N4 thread it's like seeing an old friend I'm mostly quiet, but really appreciate all you do :thumbup:
Sent from my Nexus 4 using Tapatalk 2
Subscribed... Thanks dude...
-3StarsAndaSun
Subscribed. Thanks
Thanks back to you, everyone! I've learned a hell of a lot about Linux and Android in the year since I got my GN, and I mostly have xda to thank for that, even though I've always been the type to tinker and Google things. Still lots more to learn though! But, at the very least I guess nobody can say I haven't been busy since becoming a RC, huh?
Nice to see all these settings are adopted by others, also the interactive tuneables are used in ak kernel now.
Verstuurd van mijn Nexus 7 met Tapatalk
Subscribed :good: !
New version of testvalue.sh up. I added the input value to the output.txt file to make it easier to read since it starts at 0. Right now we're trying to work out the equation for the scale of certain cfq and deadline tunables on the GN, which is a bizarre one:
7, 15, 23, 31, 39, 46, 54, 62
Increases by 8s but occasionally (on the 5th jump, though sometimes 6th) it increases by 7.
Edit: Every 3rd increase of 7 occurs on the 6th instead of the 5th.
Edit 2: Stats genius of the group, @pkgnex worked out what the trick was; dropping the decimals once calculated.
So in Excel: y=TRUNC(x*7.8125,0)
:good:
The "why" of the GN tunables working this way, with a value of 125/16 is a very good question. No ideas there, personally. Something to do with the GN having a HZ value of 128 (where on others it's 100 or even 200) I'd assume, but I don't see the direct connection.
This was very handy to know though, because the cfq+deadline source requires the number of jumps (x) to hardcode the values, not the actual desired numbers like you'd expect.
Perfect!!!
Very interesting
Created a getprio script last night for use in /system/xbin as a runnable script to check the niceness of a process. It's up in the 2nd post now. It attempts to make up for Android not having "getpriority", and not displaying the niceness in "top" or "ps" like it would on mainstream Linux.
Code:
usage: getprio [-p] <pid> | -c <class> | -s <search string>
note - class name search will only use the top result
So you can either -p the numeric pid of a process if you know it (this is the default so the -p argument is optional), -c the class name of the process (eg. com.android.systemui), or -s a search string using part of the class name (eg. systemui). If there is more than one result for the search only the top result will be returned so if you are trying something like "-s mms", you'll only see the system mms process and not com.android.mms until you get more specific with "android.mms" or something. It's likely you've got a lower level process if you get the response "Warning: empty class name!" so that's your tip your search was too broad. Naturally, processes must be running in order to return info as well. :good:
Edit: ps -p will display niceness on Android, but it's not ideal if you want it only for a specific process like with getpriority. Thanks boype.

[APP][2.2+] Mounts2SD - Storage & Memory Management

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Mounts2SD - Storage & Memory Management
Mounts2SD started out as a simple sd-ext script which only difference between it an others like it, was that it did not use symlinks to create links between /data and /sd-ext. To day it has grown to be so much more. It now comes packed with an Application for controlling the script, viewing current states and more. The script itself has grown to become a large storage and management script with features that controlls SWAP, ZRAM, mount optimization, storage thresholds, different external and internal MMC configurations, cache and more. The content management is able to move a lot more different content between /data and /sd-ext, including the new internal storage, which on some devices, is placed in /data/media, and it also contains more than one option for storing system content on both /data and /sd-ext.
Mounts2SD is no longer just a script for devices with low storage capabilities. It can be used for a lot of things and is useful on almost any device, even those without external sdcard.
Links
The Source -> Go There
Documentation and Important Information -> Go There
Supported Languages
English
Danish
French (By @PerfectSlayer)
Dutch (By @Skippernl)
Portuguese (By @_MarcoMarinho_)
Italian (By @GMagician)
Hungarian (By @@steveboy25)
Upcoming Features
Since DevDB has future requests capabilities, I will keep a list here of planned/deciding features to avoid repeating requests.
Application Manager with fallowing options:
Convert/Revert regular applications to/from system applications
Status: Done
View and Clear Application Caches
Status: Pending
Manually kill the application
Status: Deciding (does not fit the Storage and Memory management category)
Downloads
Google Play
Install directly from Play Store
===========================
3.4.8 (6.0.20) APK (Nov 01, 2013)
[Default Mirror] SourceForge.net
This is the Application which can be installed directly on the phone
-------------------------------------------------
3.4.8 (6.0.20) Recovery ZIP (Nov 01, 2013)
[Default Mirror] SourceForge.net
This is the Recovery Package for when updating the ROM on an M2SD configured device
Older Downloads
2.2.0 (5.5.0) APK (Jan 26, 2013) (MD5: dd54ace01d9b17c72081a06cd1d072c7)
[Default Mirror] SourceForge.net
[Default Mirror] MediaFire.com
This is the Application which can be installed directly on the phone
-------------------------------------------------
2.2.0 (5.5.0) Ext4 ZIP (Jan 26, 2013) (MD5: 80c218ff53009c8a0ccde1927361def2)
[Default Mirror] SourceForge.net
[Default Mirror] MediaFire.com
This will provide you with an recovery ZIP for newer Ext4 devices
Does not have the file /proc/mtd
-------------------------------------------------
2.2.0 (5.5.0) MTD ZIP (Jan 26, 2013) (MD5: 4762d7d85c9cd934f97ba3ba36294fdd)
[Default Mirror] SourceForge.net
[Default Mirror] MediaFire.com
This will provide you with an recovery ZIP for older MTD devices
Will have the file /proc/mtd
Change Log
Version: 3.4.8
Added Hungarian translation by @steveboy25
Preferences: Fix nullPointerException issue
Upstart Script: Fix boot issues on a few devices
Older Change Log
Version: 3.4.6
Update RootFW
Script/App: Add busybox fail-safe
Tab Controller: Do not crash on IllegalStateException
Update Italian messages translation by @GMagician
Version: 3.4.4
Startup Script: Try default busybox as fallback if the runner selected one fails
Preferences: Fix another reported crash while loading configurations
EventHandler: Fix reported crash
Preferences: Fix reported crash while loading configurations
Fix internal busybox being restored on boot even thought it was removed
Upstart Script: Only unmount pre-mounted sd-ext if not on /data
Update Italian messages translation by @GMagician
Version: 3.4.2
Fix bug when sd-ext is not mounted
Fix typo which breaks IMMC configs on MTD devices
Fix reported nullPointerException crashes
RootFW: Fix nullPointerException crash on extensive loading
RootFW: Do not try to destroy a null property
Version: 3.4.1
Major rewrite
Complete rewrite of the entire application
Updated RootFW (Library)
Updated TaskManager (Library)
Added Debug File builder to the log tab
Added separate configure option for converted system applications
Minor typo fix in default locale by @GMagician
Italian translation updated to 3.3.2 by @GMagician
Version: 3.3.4
Fix sqlite3 installer to avoid boot loops
Replaced the binary and removed replacment of the libraries (They are kernel specific)
Handle old reversed mount from within the application
Is also handled by the script, but in case someone changes the configurations before rebooting after upgrading from the 2.x app, we need to have this handled before that
Version: 3.3.2
Fix reported crashes
Version: 3.3.0
Settings: Fix a few small bugs
Translated V3.2.0 new messages+some improvements by @GMagician
Add new App Manager
Used to convert apps into system apps and revert them back. No apps are moved to /system, but instead moved between /data/app and /data/app-system
Note that this feature is a paid feature. The downloads at XDA are unlocked, but installs and updates from Play Store is not
Settings: Add fallback installs for S-On devices
Uses the recovery as a fallback installer for the script and sqlite in case of HTC S-On protection
RootFW: Rebuild Instance Extender
Fixes a small issue where the shell was not always connected after boot on the first app launch
Version: 3.2.0
Add Italian translation by @GMagician
Preferences: Avoid using RootFW.Filesystem.statFstab if possible
RootFW.Filesystem.statMount is faster
Upstart Script: Fix a few shell bugs in environment setup
Possible boot loop cause
Settings: Cleanup script installer
Should fix the issue with the script not always getting installed
Settings: Add SQLite3 installer
New feature to install and/or fix the SQLite3 binary
RootFW: Do not use goldfish files on non-emulator devices
Avoid having wrong partitions located and recovery cleaned
Version: 3.1.8
Add Portuguese translation by @_MarcoMarinho_
Allow translating tab names for tablet layout
In tablet layout, there is text displayed for each tab. This should also be translated
Update English language file
Small corrections
Add missing tablet layout tab names strings
Add Danish translation
Settings: Allow translating upstart script info
Also display words like 'Versions', 'Bundled' and 'Installed' in Application Settings
Upstart Script: Fix not detecting folder suppport
Fix issue where the Application alerts about some Data folders not being moved
RootFW: Fix nullPointerException when no SWAPS are active
Issue where the Application would crash if no SWAP or ZRAM device was activated
RootFW: Fix hanging issues with Kutch SuperUser Daemon mode for Android 4.3
Bug in the SuperUser Daemon which would make some Shell types hang randomly
Version: 3.1.4
Added Dutch translation by @Skippernl
Upstart Script: Handle empty values better
Reset properties if their values are empty
Better log entry structure to better detect empty property values
RootFW: Fix write() not working
Bug in the write() method was causing empty values to be written to the property files
RootFW: Fix ArrayIndexOutOfBoundsException issue
Would sometimes cause a crash when getting stats on none existing directories
Version: 3.1.2
Update french locale and fix default one by @PerfectSlayer
Use the correct strings in the infobox
Display a log announcment instead of safe-mode information when there are warnings/errors in the log
RootFW - Fix java divide by zero Exception
Was causing crash when calculating usage percentage on partitions with 0 bytes used
Make better compatibility between different devices and ROM's
Revert Busybox binary
Create a more controlled environment to have the script executed in
Better variable export feature
Change temp dir /tmp ~> /mounts2sd-tmp
To fix issues where a ROM clears /tmp after boot
Generate more logging to help debug issues
Now generates both the regular /mounts2sd-tmp/log.txt and /data/local/mounts2sd.log which is not deleted on device shutdown
Click to expand...
Click to collapse
XDA:DevDB Information
Mounts2SD, a App for the No Device
Contributors
dk_zero-cool, PerfectSlayer, Skippernl, _MarcoMarinho_, GMagician
Version Information
Status: Stable
Current Stable Version: 3.4.8
Stable Release Date: 2013-11-01
Created 2013-09-04
Last Updated 2013-11-01
Reserved
Good job. And by the way u made small mistake. Stable version should be 3.1.8
Sent from my HTC Explorer A310e using Tapatalk 4
@rcane said:
Good job. And by the way u made small mistake. Stable version should be 3.1.8
Click to expand...
Click to collapse
Thanks, it has been corrected
When i try to install the script. Error popup that it failed to move 10mounts2sd.sh to system/etc/.
using galaxy note, jelly bean 4.1.3
jasonkhoo87 said:
When i try to install the script. Error popup that it failed to move 10mounts2sd.sh to system/etc/.
using galaxy note, jelly bean 4.1.3
Click to expand...
Click to collapse
Same problem here.
jasonkhoo87 said:
When i try to install the script. Error popup that it failed to move 10mounts2sd.sh to system/etc/.
using galaxy note, jelly bean 4.1.3
Click to expand...
Click to collapse
Okay, could you instead post this as an issue (top pane)?
Sent from my GT-I9300 using XDA Premium 4 mobile app
Says I need busybox and int. I should also say rooted sgh-i137 running skyrom 9.3
Sent from my SAMSUNG-SGH-I317 using Xparent Cyan Tapatalk 2
hmmmm....can't use this app on my Xperia Mini Pro (Carbon Rom v4.2.2)....i manage to install the scripts and after change a few in setup i reboot the phone then BAMMMMMMMM.....stuck on bootlogo....
iPusak Gaoq™ said:
hmmmm....can't use this app on my Xperia Mini Pro (Carbon Rom v4.2.2)....i manage to install the scripts and after change a few in setup i reboot the phone then BAMMMMMMMM.....stuck on bootlogo....
Click to expand...
Click to collapse
And I will gladly help you with this problem, but please use the Bug Report feature at the top of the Thread. It makes it much easier to keep track of current reports. Also, can you add a logcat entry of this issue as well?
dk_zero-cool said:
And I will gladly help you with this problem, but please use the Bug Report feature at the top of the Thread. It makes it much easier to keep track of current reports. Also, can you add a logcat entry of this issue as well?
Click to expand...
Click to collapse
Hope you have a copy of that paragraph so that can just paste.. probably need to use it often.
Sent from my OptimusBlack using xda app-developers app
Is it compatible with link2sd?
I'd like to move swap and cache on the second partition.
There's a separate q&a thread...just in case you weren't aware....
http://forum.xda-developers.com/showthread.php?t=1342387
romualdrichard said:
Is it compatible with link2sd?
I'd like to move swap and cache on the second partition.
Click to expand...
Click to collapse
Of cause not. Link2SD is not compatible with Mounts2SD or vise versa. You can't have two sd-ext scripts doing the same things and expect it to work.
using 4ext recovery and have sd-ext set up on sd card. rom boots fine. and i have the latest version of mounts2sd installed, under app settings i have the start up script installed, have green ck dot for applications, but still get insufficent avl, im very green when it comes to apps2sd and mounts2sd, the guides are not too helpful. any help here would be great. thx. jake
jaxenroth said:
using 4ext recovery and have sd-ext set up on sd card. rom boots fine. and i have the latest version of mounts2sd installed, under app settings i have the start up script installed, have green ck dot for applications, but still get insufficent avl, im very green when it comes to apps2sd and mounts2sd, the guides are not too helpful. any help here would be great. thx. jake
Click to expand...
Click to collapse
What does the size information say about your partitions? You can see this in the app. If cache or data is using to much space, it does not help much to have moved the APK's. And also, what about the Threshold, is that displaying more than what is left on data?
If dont check options that move data from /data/data into/sd ext/data/ whether to open the app to be faster?.
My memory card is 4gb class 4.
dejanxxxx said:
If dont check options that move data from /data/data into/sd ext/data/ whether to open the app to be faster?.
My memory card is 4gb class 4.
Click to expand...
Click to collapse
It all depends on the sdcard whether it slows down or not. I have a 16GB Kingston class4, and this card has faster read and write speed than the internal nand on the SGS3, so I actually gain speed by moving content to sd-ext.
The best cards when using sd-ext, is Kingston, Samsung and ScanDisk. The best class value is 2, 4 and 6 (High values is not good when using sd-ext). The worst is class10 (Don't know why). Also, lower readahead is mostly a good thing, but not if you do a lot of PC~>Phone transfers. So if you don't copy much from PC to Phone, I would lower it to 128KB.
Also, you could always try. If you think that your phone get's slower by moving /data/data, then you can just move it back.
dk_zero-cool said:
Kingston class4, so I actually gain speed by moving content to sd-ext.
The best cards when using sd-ext, is Kingston, Samsung and ScanDisk. The best class value is 2, 4 and 6 (High values is not good when using sd-ext). The worst is class10 (Don't know why). Also, lower readahead is mostly a good thing, but not if you do a lot of PC~>Phone transfers. So if you don't copy much from PC to Phone, I would lower it to 128KB.
Also, you could always try. If you think that your phone get's slower by moving /data/data, then you can just move it back.
Click to expand...
Click to collapse
Thanks, my card is Kingston, mean you say that be better that put lower readahead, on me when look on script for readahead is default 512kb, did leave thus?. Some say that be better that be a 2048kb readahead.
For copy from PC to phone, use air droid, I copy litlle much from PC to phone and conversely, and now how would you put in for readahead?
Ok, I do like you say for readahead,and leave on 512kb, it is deafult read.
Now I leave data/ data, on my internal memory,and only 47mb use.I have small internal memory 158mb free wheb flas ROM. On default is 512mb RAM.
dejanxxxx said:
Thanks, my card is Kingston, mean you say that be better that put lower readahead, on me when look on script for readahead is default 512kb, did leave thus?. Some say that be better that be a 2048kb readahead.
For copy from PC to phone, use air droid, I copy litlle much from PC to phone and conversely, and now how would you put in for readahead?
Ok, I do like you say for readahead,and leave on 512kb, it is deafult read.
Now I leave data/ data, on my internal memory,and only 47mb use.I have small internal memory 158mb free wheb flas ROM. On default is 512mb RAM.
Click to expand...
Click to collapse
Many people think that higher number means better performance, but they never take into account the scenarios. Large readahead is great for large file transfers and small readahead is good for many small reads and writes. So if you often copy multiple gb of music, movies etc to your phone, then yes, a large readahead would be better. If the system is constantly writing small amounts of data to the drive, then smaller readahead is better. The best would properly be around 4kb, but since you also use the first partition as a storage device, it is best to find a middle (Around 128kb, 256kb or 512kb depending of how much transfers you make).
It's like people who thinks that a large CPU is better in their computer, without thinking about whether or not their old HDD can actually keep up with that speed. Grater number does not mean better. A perfect balance is what you should go for.

[CLOSED][RECOVERY] [TWRP] Fix • Backup Internal Storage • backup option

O B S O L E T E
Fix for • Backup Internal Storage • backup option
Universal TWRP Bind Mount Enabler
​
It is a well known fact that TWRP Backup does did not include Internal Storage
aka /storage/emulated/0
If you ever wonder how to backup your Pictures and Downloads here is a solution
edit: Jun 24, 2020 TWRP 3.4.0-0 Released
just mark the checkbox for Internal Storage in TWRP menu
These instructions are obsolete starting with TWRP v3.4.0-0+
Prerequirements
device with external MicroSD Card
working TWRP image as file
ramdisk tool (i recommend AIK)
Instructions
unpack your recovery ramdisk
create a folder for bind mount
place the shell script /scard0/init in your ramdisk
when your busybox is older than v1.29: replace /sbin/busybox in your ramdisk
replace the shell script /sbin/permissive.sh in your ramdisk
edit the path in /sbin/permissive.sh
set permissions executable
make a new entry in /etc/recovery.fstab
Code:
/sdcard0 auto /sdcard flags=bind;display="Internal Storage";backup=1;usermrf;ignoreblkid
Downloads
Universal-TWRP-Bind-Mount-Enabler.zip (do not flash!)
XDA: DevDB Information
Universal TWRP Bind Mount Enabler, Tool/Utility for the Android General
Contributors
@aIecxs
@Dees_Troy (TWRP)
@osm0sis (AIK)
(attachment removed)
Bugs & Known Issues
Restoring works only with -> Settings -> Use rm -rf instead of formatting
Backup Internal Storage -> to Internal Storage
does not show backup size / wrong size
Progress bar does not work
Internal Storage not proper unmounted when unmounting data
TWRP shows errors in log (E:Unhandled flag 'bind')
TWRP shows errors in log when successfully mounted (Failed to mount '/sdcard0')
does not work with busybox v1.22 bionic (TWRP default)
does not work with toybox
made some minor fixes because of TWRP switched from busybox to toybox (i didn't know)
/sbin/busybox is hard-coded for now until i have time to fix toybox compatibility - not so universal anymore, sorry
toybox grep: No 'E' with 'w' (see "grep --help")
yet another case where you might use bind mounts
/system and /system_root hybrid for maximum compatibility
instead of flashing Mount-System.zip one can mount "System" (which is /system_root/system) from the usual mount check box, then flash old zips
why use bind mount instead of a simple symlink? the benefit of this method is commands like `mount /system` will still work, while it fails for symlinks
Code:
/system_root ext4 /dev/block/bootdevice/by-name/system flags=display="System Root";backup=1;wipeingui
/system ext4 /system_root/system flags=bind;backup=0;usermrf;ignoreblkid
Starting from TWRP version 3.4.0+ we can now make backup of Internal Storage straight from menu without any modification. also the fsflags="bind" is working, so this project becomes obsolete
the new syntax for bind mount is fsflags="bind"
Code:
/storage auto /sdcard flags=fsflags="bind";display="Internal Storage";backup=1;usermrf;ignoreblkid
thanks to the developers who finally decided to include that option after a long period of such feature request
aIecxs said:
Starting from TWRP version 3.4.0+ we can now make backup of Internal Storage straight from menu without any modification. also the fsflags="bind" is working, so this project becomes obsolete
the new syntax for bind mount is fsflags="bind"
Code:
/storage auto /sdcard flags=fsflags="bind";display="Internal Storage";backup=1;usermrf;ignoreblkid
thanks to the developers who finally decided to include that option after a long period of such feature request
Click to expand...
Click to collapse
I just tried with v3.4.0 on Samsung GalaxyS4. Not only was that option not present; I got a message in yellow telling me that the data backup did not include media /dwonloads etc i.e. internal storage. Could it be this feature isn't available in all versions for some reason ? Or amI missing something?
of course (as always) the maintainers should be informed about updating twrp.fstab (same for /system_root)
I can see the new TWRP 3.4 option on my LG V20 (but only option is beta: backup data/storage image - which seems to include free space from what I can see)
But on my Galaxy S4 TWRP 3.4 doesn't seem to have this option.
please address this to the maintainers @npjohnson @ripee they have to decide.
or include it yourself the instructions are same except you don't have to mess up with shell scripts so you can skip directly to last step /etc/recovery.fstab
aIecxs said:
please address this to the maintainers @npjohnson @ripee they have to decide.
or include it yourself the instructions are same except you don't have to mess up with shell scripts so you can skip directly to last step /etc/recovery.fstab
Click to expand...
Click to collapse
lacking context here - what is it you're asking?
npjohnson said:
lacking context here - what is it you're asking?
Click to expand...
Click to collapse
@npjohnson @ripee
Here's what the ask is (I believe):
TWRP 3.4.0-0 includes functionality to back up user data (Internal Storage at /data/media)...
however, this option does not appear in the Backup list of partitions, as Internal Storage is not included in the TWRP 3.4.0-0 twrp.fstab.
The ask is to include it in the next release so users to not need to know how to modify the twrp.fstab themselved.
(Example: I have a Moto X4 (A/B) and have no idea where to find the twrp.fstab file and what string to add to it.
OK, I am seeing some weird results and was hoping someone can shed some light on this issue:
The original unofficial TWRP version 3.4.0.0 for my phone did not include the "Internal Storage" option.
And when I go to do a backup, the "Data (excl storage)" partition showed a size of 8600MB, which makes sense because this does NOT include internal storage.
I then did the modification as mentioned in this post:
APP ❯ TWRP ❯❯ Tipatch • Backup internal storage • v1.6
Tipatch for TWRP • Backup internal storage at last by kdrag0n Use at your own risk. Note that wiping Data WILL also wipe internal storage, contrary to normal behavior. Introduction TWRP Data backups do not include Internal Storage, which...
forum.xda-developers.com
And this patch combines the data partition with the internal storage.
So, this resulted in the new "Data (inc storage)" to be 26000MB, which makes sense because my internal memory (emulated/0) was 17GB in size (9GB + 17GB = 26GB).
Then I modified the twrp.flags file and added this line as suggested in this thread:
/storage ext4 /data/media/0 flags=display="Internal Storage";usermrf;backup=1;fsflags="bind"
Now there is a new selectable "Internal Memory" partition, but it says it's size is 29000MB!
So, why is the "Internal Storage" partition showing 29GB and not 17GB like it should?
Settings - Disable free space check before backup
(refer to post #2)
aIecxs said:
Settings - Disable free space check before backup
(refer to post #2)
Click to expand...
Click to collapse
Thank you for the info.
I tried looking at the twrp.me site, but I couldn't find any documents that talk about the various parameters in the flags file.
For example, you mention in post #2 "Restoring works only with -> Settings -> Use rm -rf instead of formatti".
But on this page:
android_device_xiaomi_beryllium/recovery.fstab at android-9.0 · TeamWin/android_device_xiaomi_beryllium
For building TWRP for Pocophone F1 ONLY. Contribute to TeamWin/android_device_xiaomi_beryllium development by creating an account on GitHub.
github.com
It uses a flag named "usermrf" (on line 29) which suggests it might do the same thing as the global setting you mentioned, but will just apply to this one partition.
Another issue is that my Internal memory seems to use the f2fs format, so I don't know if that is a supported parameter to use in the "type" column, or should I use "auto".
So, is there a document that lists all these flags and what they do?
aIecxs said:
O B S O L E T E​
edit: Jun 24, 2020 TWRP 3.4.0-0 Released
just mark the checkbox for Internal Storage in TWRP menu
Click to expand...
Click to collapse
I have a SM-T550 (Samsung Galaxy Tab A 9.7 WiFi)
For this device, there is a official TWRP-Recovery:
Samsung Galaxy Tab A 9.7 WiFi
Disclaimer:Team Win strives to provide a quality product. However, it is your decision to install our software on your device. Team Win takes no ...
twrp.me
There are Versions available, f. ex. twrp-3.7.0 and twrp-3.6.2
Download TWRP for gt510wifi
Download TWRP Open Recovery for gt510wifi
eu.dl.twrp.me
I am running v 3.6.2
So version is much higher than 3.4.0.0
There is no checkbox for Internal Storage in TWRP menu.
I am confused. Would you be so kindly and explain that?
Thanks.
it's polite to read the thread before posting.
?
I dont understand what you mean
of course I read "the maintainers should be informed about updating twrp.fstab (same for /system_root)".
So it should not be possible for a maintainer to release a version of twrp which has a higher version-number without including that changes, right?
Thread closed on request of OP @aIecxs
Regards
Oswald Boelcke

[RECOVERY][Hiae] TWRP touch recovery

Code:
*** Disclaimer ***
All flashing is done at your own risk!
While nothing from this thread should break your device,
don't come back here blaming anyone if it does!
Introduction
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and
Click to expand...
Click to collapse
Images
Installation instructions
TWRP Image Install method:
Most devices can be updated quickly and easily within TWRP if you already have version 2.8.4.0 or higher installed.
Download the latest version of TWRP appropriate for your device/firmware
Reboot to TWRP
Hit Install and tap the "Install Image" button in the lower right
Browse to the location of the TWRP image on your device and select it
Select recovery from the partition list and swipe to flash
Alternate Installation Method:
Fastboot Install Method:
You will need the platform-tools from the Android SDK on your computer. Find the Android command line tools section on the page linked and install the SDK tools package. From the SDK Manager, download only the platform-tools to get adb and fastboot binaries.
Windows users will need proper drivers installed on their computer. You can try the Naked ADB drivers or the Universal ADB drivers if you don't already have a working driver installed
On your device, go into Settings -> About and find the Build Number and tap on it 7 times to enable developer settings. Press back and go into Developer Options and enable USB debugging. From your computer, open a command prompt and type:
Code:
adb reboot download
You should now be in fastboot mode.
Download the correct image file and copy the file into the same folder as your adb and fastboot binaries. Rename the image to twrp.img and type:
Code:
fastboot flash recovery twrp.img
Code:
fastboot reboot
Click to expand...
Click to collapse
Device Changelog
Current version: 3.5.1_9-0:
Initial official release - no device-specific changes
Click to expand...
Click to collapse
Older Device-specific versions:
3.3.1-1:
Update prebuilt kernel to support both stock and LOS decryption
3.2.0-1:
[Fix] Re-sync build tree so recovery boots
[Update] Source-built kernel with f2fs/ntfs/exfat support
Click to expand...
Click to collapse
Click to expand...
Click to collapse
TWRP Official Change Log
Downloads
Download
Latest Official versions
Latest Unofficial versions
Sources
Device tree
Kernel source
Click to expand...
Click to collapse
Known Issues
Device-specific
N/A
TWRP Upstream
Encrypted backups are broken - DO NOT USE THIS FEATURE!!
Click to expand...
Click to collapse
Bug Reporting
If you have an issue, the first step is to post a recovery log so we can determine the cause of the issue. This is done in recovery using Advanced -> Copy Log, or adb pull /tmp/recovery.log. Once a log is uploaded we can determine how best to proceed. NOTE: Posts that are reporting bugs or issues without an accompanying recovery log will be ignored! Additionally, providing details about your device setup, including variant, firmware version, and exact steps to reproduce your issue will also be helpful in diagnosing the problem.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If your issue is determined to be a bug, please consider posting it to our github issues log. It's pretty much impossible for us to keep up with the more than 40 threads that we have for the devices that we "directly" support. If you have a significant problem that cannot be answered in this thread, your best bet is to contact us via our website. If you see someone that's struggling, feel free to point it out to us. We need your help to help us keep track of all of our devices! Thanks!
Click to expand...
Click to collapse
TWRP Official Change Log
Current version: 3.5.1:
TeamWin has prepared a mini release before Android-11 support.
Android 9 Branch only:
Build fixes in 7.1 tree - CaptainThrowback
SAR Update script name for clarity - CaptainThrowback
SAR: Don't follow symbolic links for block devices - bigbiff
Android 9 and Android 10 Branches:
Wrappedkey support running only on FBE devices - CaptainThrowback
TWRP App log information reduced - epicX67
Refresh details after system wipe and adb sideload - AdrianDC
Chinese translation updates - betaxb
Support keymaster 2 - PeterCxy
add tzdata to TWRP for timezones - CaptainThrowback
ParitionManager: support delayed adopted storage mount - PeterCxy
Support to start terminal from file manager directory - AndroiableDroid
Nano support - nebrassy
Add nano support to open files from file manager - CaptainThrowback
Include new magisk apk support to be installed by TWRP - ianmacd
Add support to change directory name where TWRP stores backups - epicX67
Add bash support - not the default shell - DarthJabba9
ORS support to format data - AdrianDC
Add support to flash both slots when flashing an image - epicX67
NL translation updates - ianmacd
Cleanup
Installation cleanup - remove dupe PackageExtractFn - klabit87
Remove logd-reinit service - CaptainThrowback
Fixes
Restore system root context - bigbiff
Only include keymaster 2 if tree supports it - CaptainThrowback
Strip lines containing '--' in language_helper.py - ianmacd
Unlocalized string fix - ianmacd
Click to expand...
Click to collapse
Older versions:
3.5.0:
For this release we are breaking down new support for devices based on android trees and device compatibility. For Pie and earlier devices, they will be built out of the android-9.0 branch. For devices that
are released with Android Version 10, they will be supported under the android-10 branch. The separation became apparent when a lot of functionality was dropped in the android-10 release last year.
You will notice a new version scheme. Devices that are built in the android-9 tree will be suffixed with 3.5.0_9.
Devices built in the android-10 tree will be suffixed with 10 like 3.5.0_10. Each device tree update will have a
final suffix for any updates made for the device like 3.5.0_10-1.
Android 9 only
Fix building in android-5.1 trees - CaptainThrowback
New QTI Haptics Support - AndroidableDroid
New TSPDriver Haptics Support - LameMonster82
Selinux restore issues - AndroidableDroid
OEM build fixes - Fighter19
More file extension support in Gui file selector - Mauronofrio
FBE Fixes - CaptainThrowback
Ozip Decryption - Mauronofrio
Don't use persist for recovery logs - bigbiff
Delay touch startup if necessary - bigbiff
Spanish translation Updates - R0rt1z2
Fix cache wiping on Slot A only devices - AndroidableDroid
Exclude dumpsys directory from backups - DarthJabba9
Gerrman translation Updates - 4ndyZ
HW Rotation during runtime (does not affect touch panel) - webgeek1234
API 24 fixes - AndroidableDroid
vold_decrypt error on unmount - CaptainThrowback
Multiuser - warn when users are not decrypted - noahajac
FDE encryption fixes - CaptainThrowback
Crypto state fixes - nebrassy
Chinese translation Updates - Whyle
Theme updates to match android-10 release: CaptainThrowback
Move TWRP App install to Advanced page - Dees_Troy
Update Russian Translation - f2065
Android 10
Omni 10 minimal support: CaptainThrowback
General Bringup: Bigbiff, Mauronofrio, AndroidableDroid, CaptainThrowback, ianmacd, DarthJabba9
Encryption support: Bigbiff, Mauronofrio, CaptainThrowback
Fastbootd support: Bigbiff
Install Support: Bigbiff, CaptainThrowback
Magisk Support: Bigbiff
Backuptool Support: Chaosmaster
Apex support: Bigbiff
Dynamic Partition Support: Bigbiff
3.4.0:
System As Root (SAR)
Fix backup and restore using SAR - dianlujitao
System mount point - Chaosmaster
ORS - Chaosmaster
Zip install - Chaosmaster
system_root bind mount to /system - Chaosmaster
Autodetection of SAR - Chaosmaster
Digest
fix creation of digests for sub-partitions (was bugfix applied to many devices since last year) - Bigbiff
Encryption
ext4Crypt Wrapped Key Update - Peter Cai
Fix upgrading encryption key if export fails - Peter Cai
Fix wrapped key support for devices without metadata partition - mauronofrio
Don't skip decryption when using block map file in order to write to /data in ORS - CaptainThrowback
FDE - Decrypt master key first - AndroidableDroid
vold_decrypt - set Android version and patch level automatically - CaptainThrowback
Set wrapped decrypt support by twrp flag - Peter Cai
Don't try wrapped support unless needed - mauronofrio
restore ext4 policy on /data/cache - Bigbiff
multiuser decryption - Noah Jacobson
FDE retry - AndroidableDroid
TWRP App
unmount system after checking for app - Bigbiff
Prebuilt updates
[email protected] - cryptomilk
Compilation Fixes
TW_EXFAT_FUSE compilation fixes - Bigbiff
libuuid - cryptomilk
'system/etc/ld.config.txt' not found error - Martin Dünkelmann
Language Updates
Portugal - Vasco Machado
Dutch - Ian Macdonald
Turkish - Fatih Fırıncı
Localisation of Backup_Tar - Ian Macdonald
ld.config.txt
updates for 8.x trees - CaptainThrowback
fix search path for /sbin - CaptainThrowback
/sbin should come first in search path - Ian Macdonald
General Bugs
Fix persistent log storage - SyberHexen
Compress Persistent Logs - Bigbiff
FB2PNG compilation errors - Bigbiff
exclude per_boot from backups - Darth9
Unmount all directories that point to same block device - AndroidableDroid
Blank screen fixes - Sean hoyt
Toolbox is default on android-9+ - mauronofrio
Cleanup
Typo fix in comment - VDavid003
newlines in ext4crypt - CaptainThrowback
TW_OEM_BUILD compilation issue - Patrick Zacharias
Fix Dependency requirements - Dees_Troy
Fix Symbolic links for BB and Toolbox - Dees_Troy
Bootloader Message
cleanup - Alessandro Astone
add configurable offsets
Error Cleanup
uevent errors and decryption error - mauronofrio
using copy_file to copy files from /etc - CaptainThrowback
ueventd access to /acct - early directory creation in init - cryptomilk
Haptics
TSP Driver - LameMonster82
QTI Input - AndroidableDroid
update_engine
read all asserts - Hernán Castañón
Resetprop
Add Resetprop from Magisk - CaptainThrowback & mauronofrio
compile from source - Chaosmaster
fix for android-7 and earlier - Chaosmaster
cleanup for spaces in properties - AndroidableDroid
Properties
Add Property override - Chaosmaster
Backuptool
mount system and vendor for A/B installs for backuptool - Chaosmaster
twrpTar
fix backup freezes when pigz and openaes are used - Fabrice Bellet
Zip Installs
Info for A/B zip installing to inactive slot - Chaosmaster
Reboot to system button now allows to be rebooted to different partitions after zip install
progressbar rework - Chaosmaster
Magisk updates
update binaries from source - AndroidableDroid
A/B Updater Zip Template
rewrite A/B installer zip from scratch using a new generic template and latest magiskboot - osm0sis
installer zip support for recovery_a/recovery_b partition ramdisks on newer 2SI SAR A/B devices - osm0sis
generate installer zips for all prod A/B devices - bigbiff
improve installer zip dump/write speed and add more error catching - arter97 & osm0sis
OZIP Encryption Support
add OZIP encryption - mauronofrio
File Selector
Support for more extensions in File Selector - mauronofrio
3.3.1:
Fix selinux issues during formatting - dianlujitao
Various fixes for toybox and toolbox builds - CaptainThrowback and bigbiff
Flash both A and B partitions when installing a recovery ramdisk - Dees_Troy
Add option to uninstall TWRP app from /system - Dees_Troy
Create digest for subpartitions - bigbiff
3.3.0:
Merge AOSP 9.0 r3 (Dees_Troy)
Use ANDROID_ROOT variable instead of hard coding to /system (CaptainThrowback)
Decrypt FBE on 9.0 and metadata decrypt (Dees_Troy)
vold decrypt updates (nijel8, CaptainThrowback)
Support vibration on LED class devices (notsyncing)
Metadata decrypt support for Pixel 3 (Dees_Troy)
Support rotating the display via build flag (vladimiroltean)
Reboot to EDL mode button (mauronofrio)
Support MTP on FFS devices (bigbiff)
Update FDE decrypt to support keymaster 3 and 4 (Dees_Troy)
Detect mkfs.f2fs version to properly format on f2fs partitions (Dees_Troy)
Allow TWRP to use md5 and sha256 checksums for zip installs (bigbiff)
TWRP can use /data/cache/recovery and /persist/cache/recovery on AB devices with no cache partition (bigbiff)
Switch part of advanced menus in TWRP to use a listbox of options (Dees_Troy)
Use magiskboot to allow repacking boot images for installing TWRP (Dees_Troy with thanks to topjohnwu of course)
3.2.3:
Fix automatic installing of OTA zips on encrypted devices
Remove SuperSU from TWRP
Support both md5 and md5sum file extensions when doing MD5 checking for zip files
3.2.2:
adb backup fixes
OTA style update zips will now install automatically without prompting for decrypt
minor tweaks to handling date/time on Qualcomm devices
updates to some language translations
3.2.1:
minui fixes (cryptomilk)
Better android-8.0 compatibility in ROM trees (Dees_Troy)
Fix missing library in android-8.0 (nkk71)
Fix inconsistent SDCard naming (DevUt)
Default to TWRP restore instead of adb backup restore to fix restore on fresh TWRP boot (jlask)
3.2.0:
Allow restoring adb backups in the TWRP GUI (bigbiff)
Fix gzip backup error in adb backups (bigbiff)
Fix a bug in TWRP's backup routines that occasionally corrupted backup files (nkk71)
Better support for installing Android 8.0 based zips due to legacy props (nkk71)
Support vold decrypt with keymaster 3.0 in 8.0 firmwares (nkk71)
Decrypt of synthetic passwords for Pixel 2 (Dees_Troy)
Support newer ext4 FBE policies for backup and restore in libtar (Dees_Troy)
v2 fstab support (Dees_Troy)
Bring TWRP forward to android 8.0 AOSP base (Dees_Troy)
Various other minor bugfixes and tweaks
3.1.1:
Backups will now include adopted storage keys (Dees_Troy)
Fixed an adb restore issue (bigbiff)
Fixed rebooting when no OS is present (Dees_Troy)
Fixed line wrapping in the GUI terminal (_that)
Updated TWRP source code to AOSP 7.1.2 (Dees_Troy)
3.1.0:
vold decrypt on a few select HTC devices, TWRP will now attempt to use the system partition's vold and vdc binaries and libraries to decrypt the data partition (nkk71 and CaptainThrowback)
adb backup to stream a backup directly to or from your PC, see documentation here (bigbiff)
tweak MTP startup routines (mdmower)
support new Android 7.x xattrs for backup and restore to fix loss of data after a restore (Dees_Troy)
support POSIX file capabilities backup and restore to fix VoLTE on HTC devices and possibly other issues (Dees_Troy)
better indicate to users that internal storage is not backed up (Dees_Troy)
improve automatic determination of TW_THEME (mdmower)
minimal getcap and setcap support (_that)
try mounting both ext4 and f2fs during decrypt (jcadduono and Dees_Troy)
shut off backlight with power key (mdmower)
timeout during FDE decrypt (Dees_Troy and nkk71)
support for FBE decrypt and backing up and restoring FBE policies (Dees_Troy)
boot slot support (Dees_Troy)
TWRP app install prompt during reboot (Dees_Troy)
support for AB OTA zips (Dees_Troy)
support new Android 7.x log command (Dees_Troy)
update recovery sources to AOSP 7.1 (Dees_Troy)
numerous bugfixes and improvements by too many people to mention
3.0.3:
Partial release to help support the release of the Official TWRP app
3.0.2:
Fix a bug with the input box that affected masked inputs (passwords). This fixes decrypt of full device encryption on devices that support decrypt. This bug also impacts encrypted backups. Users are highly encouraged to stop using 3.0.1 if you use encrypted backups or if you need decrypt of data in TWRP.
Add Greek translation to some builds.
3.0.1:
support new CM 13.0 pattern encryption (sultanqasim)
fix slow flashing issue due to modprobe (present on only some devices) (#twrp)
libtar updated to latest upstream and fixes (jcadduono)
fixes for loading custom themes (_that)
TWRP will now detect and install TWRP themes automatically through the normal zip install process (Dees_Troy)
translation updates - added Italian, Czech and Polish and significant updates to Dutch
progress bar improvements - progress bar updates during image flashing and better tracks progress during file system backups (tar) (Dees_Troy)
fix input box text display (Dees_Troy)
reboot option after zip install complete (bigbiff)
other mostly invisible bug fixes and improvements
3.0.0:
Completely new theme - Much more modern and much nicer looking (by z31s1g)
True Terminal Emulator - Includes arrow keys, tab and tab completion, etc. (by _that)
Language translation - It won’t be perfect and especially some languages that require large font files like Chinese & Japanese won’t be availble on most devices. Also some languages may only be partially translated at this time. Feel free to submit more translations to OmniROM’s Gerrit. (mostly by Dees_Troy)
Flashing of sparse images - On select devices you will be able to flash some parts of factory images via the TWRP GUI (by HashBang173)
Adopted storage support for select devices - TWRP can now decrypt adopted storage partitions from Marshmallow
Reworked graphics to bring us more up to date with AOSP - includes support for adf and drm graphics (by Dees_Troy)
SuperSU prompt will no longer display if a Marshmallow ROM is installed
Update exfat, exfat fuse, dosfstools (by mdmower)
Update AOSP base to 6.0
A huge laundry list of other minor fixes and tweaks
Additional Notes
WARNING: This is our first release in a long time. We have a lot of new and somewhat aggressive changes in this new release. The changes to the graphics back-end may cause some devices to not boot up properly or have other display-related issues. If you are not in a position to reflash an older build of TWRP, then wait until you are or at least wait until others have tried the new version for your specific device. You don’t want to end up with a non-working recovery and have to wait several hours or days to get to a computer to be able to fix it.
Notes for themers: In addition to the updated theme, we have introduced a theme version variable to the TWRP theme system. If the theme version does not match the version that TWRP expects, TWRP will reject the custom theme and load its stock theme. This change will ensure that people who update TWRP without updating their theme will still have a workable recovery. We have removed libjpeg support. The stock theme was only using a jpeg image for the splash / curtain. This change means that any custom themes will no longer be able to use jpeg images. It also means that tools used to repack recovery images with a different curtain / splash will need to be updated to use the new method.
Version number notes: For a while we’ve been using a 4 digit version number and reserved the 4th digit for device-specific updates. For instance, we find and fix a device-specific issue like decryption of data on Nexus 5, we would release that as a 2.8.7.1. After a while, some people would start asking where 2.8.7.1 was for other devices. So, going forward we have decided to change the numbering scheme to 3.0.0-2, etc. Our hope is that this version numbering scheme will more clearly identify that the 4th digit does not indicate a version change for the code base.
We need your help! The bulk of TWRP work is done by 3 people on a volunteer basis. We have pushed most of our device files to our github and we have a gerrit instance. If you have the ability, please help us maintain our official devices and/or add your device to our official device list. Thanks in advance!
2.8.7.0:
Initial ground work for software drawn keyboard (_that)
Fix handling of wiping internal storage on datamedia devices (xuefer)
Allow DataManager to set and read values from the system properties (xuefer)
Fix crash when taking screenshots on arm64 devices (xuefer)
Fix error message after an ORS script completes (Dees_Troy)
Fix crashes / error when creating encrypted backups (_that, Dees_Troy)
Add system read only option – more details below (Dees_Troy)
Add resize2fs and GUI option to run resize2fs (Dees_Troy)
Fix crash loop caused by empty lines in AOSP recovery command file (_that)
Prevent duplicate page overlays such as multiple lock screens (mdmower)
Additional Notes
Note: As always, be sure your custom theme is up to date (or remove your custom theme) before updating TWRP.
System read only option: Devices that ship with 5.0 and higher as their initial OS are using block level OTA updates. With this style of OTA update, the update script checks to see if the system partition has ever been mounted read/write. Further, the script also usually runs an SHA sum of the entire system partition to detect if any changes have been made. If any changes have been made, the OTA update will refuse to install. Since not all OEMs and devices have factory images available, we have created a new feature in TWRP that detects if the system partition has ever been mounted read/write. If not, you will be prompted asking if you want TWRP to mount system as read/write. If you choose not to allow TWRP to mount as read/write, TWRP won’t prompt to install SuperSU and TWRP won’t try to patch the stock ROM to prevent TWRP from being replaced by stock recovery. The goal of this option is to hopefully allow the user to make a raw system image backup that they can use to get back to a state where they can take OTA updates again.
resize2fs feature: On some devices like the Nexus 6, the factory images include a userdata image that is the proper size only for the 32GB units. If you flash the factory image to a 64GB Nexus 6, the data partition will appear as if it only has the free space of a 32GB device. Using the resize2fs option, TWRP can resize your data partition to take up the full space available. The resize2fs may also be useful to resize system partitions on devices where custom ROM system images don’t take up the full partition space. Lastly, resize2fs may be useful in some cases to reserve the proper space at the end of a data partition for a full disk encryption key, should your partition be formatted incorrectly for some reason.
This new version also marks our first set of full builds using our new jenkins build server. You can track the progress of builds at https://jenkins.twrp.me and we have taken additional steps to make it easier for device maintainers to step up and submit patches to our gerrit server at https://gerrit.twrp.me to help us keep devices up to date and working.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Had to recreate this thread as the original version got lost when the forum got flattened.
Here is my log, could you check it please?
h**ps://www.filedropper.com/recovery_4
I had to slightly modify the link to be able to insert it.
Thanks
@Captain_Throwback
I forgot, when he created the log the usual errors appeared even if he says created successfully ..
fabulas_ said:
Here is my log, could you check it please?
h**ps://www.filedropper.com/recovery_4
I had to slightly modify the link to be able to insert it.
Thanks
@Captain_Throwback
I forgot, when he created the log the usual errors appeared even if he says created successfully ..
Click to expand...
Click to collapse
Please don't post pictures of your phone screen. The recovery log is sufficient. If you feel like you really have to give me a screenshot, please use Power+Volume Down to capture a proper screenshot.
As I told you in the other thread, to use the "Copy Log" feature, you need to switch the storage to your SD card first, since your "regular" storage isn't working properly.
Please try the TWRP linked below and let me know if you still see errors. If you do, please attach another recovery log, and also provide the output of
Code:
adb logcat > logcat.txt
https://drive.google.com/file/d/1VcYhdSIuX-8OazWcpP3JVXgpYezHo0OY/view?usp=sharing
Thanks.
P.S. Please provide recovery log even if it's working, actually.
P.P.S. Also, there's no need to mention me, as you're posting in my thread so I will be notified.
Captain_Throwback said:
Please don't post pictures of your phone screen. The recovery log is sufficient. If you feel like you really have to give me a screenshot, please use Power+Volume Down to capture a proper screenshot.
As I told you in the other thread, to use the "Copy Log" feature, you need to switch the storage to your SD card first, since your "regular" storage isn't working properly.
Please try the TWRP linked below and let me know if you still see errors. If you do, please attach another recovery log, and also provide the output of
Code:
adb logcat > logcat.txt
https://drive.google.com/file/d/1VcYhdSIuX-8OazWcpP3JVXgpYezHo0OY/view?usp=sharing
Thanks.
P.S. Please provide recovery log even if it's working, actually.
P.P.S. Also, there's no need to mention me, as you're posting in my thread so I will be notified.
Click to expand...
Click to collapse
It is not clear to me how to mount the microsd as internal memory ....
I go to Mount, in the screen that appears which folders should I select? microsd card and cache are selected by default.
the check on "Mount system partition read-only" I leave it?
and then I tap on "Mount Usb Storage"?
another question the recovery you gave me should I load it and try it only after loading the usb as internal memory?
I'm sorry for the many questions but I would like to avoid making mistakes otherwise the problem becomes even more complicated.
fabulas_ said:
It is not clear to me how to mount the microsd as internal memory ....
I go to Mount, in the screen that appears which folders should I select? microsd card and cache are selected by default.
the check on "Mount system partition read-only" I leave it?
and then I tap on "Mount Usb Storage"?
another question the recovery you gave me should I load it and try it only after loading the usb as internal memory?
I'm sorry for the many questions but I would like to avoid making mistakes otherwise the problem becomes even more complicated.
Click to expand...
Click to collapse
I didn't say to mount the SD card as internal memory - I just said to select it as default storage, as in Mount -> Select Storage -> choose "Micro SD Card" -> click OK. When you do that, TWRP will copy logs to the card instead of the broken internal storage. You don't need to touch anything else.
It doesn't matter whether you do that before or after flashing the new TWRP. Please just flash it and provide the recovery log.
Captain_Throwback said:
I didn't say to mount the SD card as internal memory - I just said to select it as default storage, as in Mount -> Select Storage -> choose "Micro SD Card" -> click OK. When you do that, TWRP will copy logs to the card instead of the broken internal storage. You don't need to touch anything else.
It doesn't matter whether you do that before or after flashing the new TWRP. Please just flash it and provide the recovery log.
Click to expand...
Click to collapse
I did exactly as you said
> Select Storage -> choose "Micro SD Card" -> click OK.
and then I went back without tapping on Mount usb storage. I tried to create the log always with the twrp I had and always the same errors it gives me ...
Then I put your TWRP, always done Mount> Select Storage -> choose "Micro SD Card" -> click OK. and then I created the log and it always gives me the same errors
Here is the log
h**p://www.filedropper.com/recovery_5
I didn't understand how to retrieve the logcat.txt file
fabulas_ said:
I did exactly as you said
> Select Storage -> choose "Micro SD Card" -> click OK.
and then I went back without tapping on Mount usb storage. I tried to create the log always with the twrp I had and always the same errors it gives me ...
Then I put your TWRP, always done Mount> Select Storage -> choose "Micro SD Card" -> click OK. and then I created the log and it always gives me the same errors
Here is the log
h**p://www.filedropper.com/recovery_5
I didn't understand how to retrieve the logcat.txt file
Click to expand...
Click to collapse
You have to use adb (from your PC) to retrieve the logcat, using the command I gave you.
But after looking at your log, it seems that you need to Format Data in TWRP. Wipe -> Format Data -> type "yes". Then reboot into Android and back to TWRP. Please let me know if that resolves your issue.
Captain_Throwback said:
You have to use adb (from your PC) to retrieve the logcat, using the command I gave you.
But after looking at your log, it seems that you need to Format Data in TWRP. Wipe -> Format Data -> type "yes". Then reboot into Android and back to TWRP. Please let me know if that resolves your issue.
Click to expand...
Click to collapse
I made a format data and I solved the errors .. now he doesn't make them + ... and this is already a very important first step .. I was sure that with you I would have solved it since you are the leader of the experts.
The weird thing I am wondering is when flashing the RUU doesn't it automatically do a format data? because the RUU I flashed it I don't know how many times and this problem was always present.
I'll put here a log made now after making the format data
http://www.filedropper.com/recovery_6
Still need the logcat file?
Now the famous screen that appeared to me every time whether to allow changes to the file system or keep read-only has also disappeared, and every time I selected "keep read-only" now it is not appearing +.
Now what do I do, I put Magisk v21 on sd and then from TWRP I install it? when I installed it yesterday, as I told you, it gave me the usual errors on the Twrp during installation even if he had installed Magisk Manager but the root was not done. checking the SafetyNet also the basic integrity was false as well as the CTS ... now I hope that installing it there are no errors, I assume not, and that the SafetyNet at least the basic integrity does not become false otherwise Magisk hide does not work for me ... and I'm interested in being able to use the banking apps .. I'm waiting for your message so I proceed based on what you tell me to do.
If you prefer we can return to the other thread.
thanks a lot
fabulas_ said:
I made a format data and I solved the errors .. now he doesn't make them + ... and this is already a very important first step .. I was sure that with you I would have solved it since you are the leader of the experts.
The weird thing I am wondering is when flashing the RUU doesn't it automatically do a format data? because the RUU I flashed it I don't know how many times and this problem was always present.
I'll put here a log made now after making the format data
http://www.filedropper.com/recovery_6
Still need the logcat file?
Now the famous screen that appeared to me every time whether to allow changes to the file system or keep read-only has also disappeared, and every time I selected "keep read-only" now it is not appearing +.
Now what do I do, I put Magisk v21 on sd and then from TWRP I install it? when I installed it yesterday, as I told you, it gave me the usual errors on the Twrp during installation even if he had installed Magisk Manager but the root was not done. checking the SafetyNet also the basic integrity was false as well as the CTS ... now I hope that installing it there are no errors, I assume not, and that the SafetyNet at least the basic integrity does not become false otherwise Magisk hide does not work for me ... and I'm interested in being able to use the banking apps .. I'm waiting for your message so I proceed based on what you tell me to do.
If you prefer we can return to the other thread.
thanks a lot
Click to expand...
Click to collapse
Yes, you can flash Magisk from TWRP, and then when you boot into Android, you have to open Magisk Manager settings and enable MagiskHide if you want to pass SafetyNet.
Captain_Throwback said:
Yes, you can flash Magisk from TWRP, and then when you boot into Android, you have to open Magisk Manager settings and enable MagiskHide if you want to pass SafetyNet.
Click to expand...
Click to collapse
Installed Magisk did not give me errors on Twrp, I checked the root with Root Checker and it is done ... the big problem is that as I expected now the Safetynet as basic integrity gives me "false" while before installing Magisk it gave me " true "checked with the" SafetyNet attest "app ... even the CTS is false, in this way I don't do anything about the root since I can't deprive myself of the various banking apps ... but how is it possible that the basic integrity before installing Magisk is okay and then after installing it does not pass the check? ....
fabulas_ said:
Installed Magisk did not give me errors on Twrp, I checked the root with Root Checker and it is done ... the big problem is that as I expected now the Safetynet as basic integrity gives me "false" while before installing Magisk it gave me " true "checked with the" SafetyNet attest "app ... even the CTS is false, in this way I don't do anything about the root since I can't deprive myself of the various banking apps ... but how is it possible that the basic integrity before installing Magisk is okay and then after installing it does not pass the check? ....
Click to expand...
Click to collapse
Did you enable MagiskHide like I said?
Captain_Throwback said:
Did you enable MagiskHide like I said?
Click to expand...
Click to collapse
sorry I had tapped on magisk hyde in the home and I thought it was that ... now I have activated it in the settings and redone the check and everything went ok ... I thank you immensely for helping me solve the problem.
so in the end I didn't have the damaged memory but a farmat data was enough ... as TWRP I can leave the one you gave me equally true?
fabulas_ said:
sorry I had tapped on magisk hyde in the home and I thought it was that ... now I have activated it in the settings and redone the check and everything went ok ... I thank you immensely for helping me solve the problem.
so in the end I didn't have the damaged memory but a farmat data was enough ... as TWRP I can leave the one you gave me equally true?
Click to expand...
Click to collapse
Yes, you can keep the one I gave you. It has some updates that won't be merged until the next official version, so enjoy!
Captain_Throwback said:
Yes, you can keep the one I gave you. It has some updates that won't be merged until the next official version, so enjoy!
Click to expand...
Click to collapse
Ok perfect .. very kind. Thanks.
Before unlocking the bootloader and then doing the root I had a space problem as the internal memory is only 16gb ... now since the phone is still fine I wanted to find a solution.
And I saw that through the Link2SD app I can move some apps to the microsd (maybe the apps I use less), to do this I read that you have to make a partition in the microsd so that you can move the apps and that it is seen as "an extension of the internal memory" ... so I should connect the microsd to the pc to create the partition ... then there is another way which is to format the microsd as internal memory but this is not recommended ... while instead do as I wrote before a partition in the microsd and use it as an "extension of the internal memory" do you think it is a good solution to solve the app space problem? because I only have the apps in the internal memory ... the media are automatically saved on microsd ... so in theory by making a partition in the microsd the partition is an extension of the internal memory and the non-partitioned part should be used by the camera to save photos and videos .. do you think it's feasible?
One last thing as an app to remove the various system apps that I don't use like some Google apps, now that I have root I can do it ... which app do you recommend to do this?
fabulas_ said:
Ok perfect .. very kind. Thanks.
Before unlocking the bootloader and then doing the root I had a space problem as the internal memory is only 16gb ... now since the phone is still fine I wanted to find a solution.
And I saw that through the Link2SD app I can move some apps to the microsd (maybe the apps I use less), to do this I read that you have to make a partition in the microsd so that you can move the apps and that it is seen as "an extension of the internal memory" ... so I should connect the microsd to the pc to create the partition ... then there is another way which is to format the microsd as internal memory but this is not recommended ... while instead do as I wrote before a partition in the microsd and use it as an "extension of the internal memory" do you think it is a good solution to solve the app space problem? because I only have the apps in the internal memory ... the media are automatically saved on microsd ... so in theory by making a partition in the microsd the partition is an extension of the internal memory and the non-partitioned part should be used by the camera to save photos and videos .. do you think it's feasible?
One last thing as an app to remove the various system apps that I don't use like some Google apps, now that I have root I can do it ... which app do you recommend to do this?
Click to expand...
Click to collapse
Titanium Backup or Oandbackupx.
My phone keep restarting after install twrp.
@andmars
I saw your post in the LOS thread and I believe several people have reported that 3.5.0 is the last version that boots for you. I just reset the device tree back to that version to see whether it's something I did that broke it (although I'm not sure how that's possible). So the below link is a test version I just built that resets things back to that point. I saw only one flag that was changed, but it's not one that should be relevant to the device booting or not. But if this works, I'll have to re-evaluate. Please try it at your earliest convenience, and if you know anyone else with the same issue, please direct them here to test as well.
twrp-3.6.0_9-0_CPTB-20211226-01-hiae.img
drive.google.com
Captain_Throwback said:
@andmars
I saw your post in the LOS thread and I believe several people have reported that 3.5.0 is the last version that boots for you. I just reset the device tree back to that version to see whether it's something I did that broke it (although I'm not sure how that's possible). So the below link is a test version I just built that resets things back to that point. I saw only one flag that was changed, but it's not one that should be relevant to the device booting or not. But if this works, I'll have to re-evaluate. Please try it at your earliest convenience, and if you know anyone else with the same issue, please direct them here to test as well.
twrp-3.6.0_9-0_CPTB-20211226-01-hiae.img
drive.google.com
Click to expand...
Click to collapse
Ahoi Captain,
I tested you version of 3.6.0 and it didn't boot. I get the red warning text, then a few seconds of blank screen after which it boots into normal os.
Greets
A

[A/B][A-ONLY][SCRIPT][READ-ONLY][EROFS][ANDROID 10+] Universal Disable Force Encryption for RO and RW "NEO STABLE"

Disable Force Encryption NEO​Do you all know what DFE is? no?
Anyway. Basically, your device has an encrypted data section "/data" by default. Let's look at the advantages of google's solution that we will lose after disabling encryption:
- Confidence in data retention. Even if your device has TWRP/OFOX or other custom Recvoery, before accessing your data, you will need to enter the password from the lockscreen, otherwise it will be impossible to read the data.
What disadvantages follow from this?
- As an enthusiast who wants to flash different ROMs, you may have noticed that every time that you flash a new ROM, you have to format the "/data" section. Which can be a pain.
Why is it necessary to do this?
- The fact that every ROM is assembled/compiled on a different database and may have different approaches (encryption keys) for data encryption. In order for this to work you need to format the data partition so that when the new ROM boots it can encrypt the system with its own unique encryption keys, so that the integrity of the data partition is maintained and it is accessible to the user.
So what does the DFE do?
- Removes the keys that are used to encrypt the data section from the fstab file
Read more about fstab here source.android.com
What are the advantages of using DFE?
- You don't need to FORMAT the data in the following cases:
*If you change the android database (From 11 to 12 and vice versa)
*If you change vendor database, miui/aosp/OOS/LOS and so on
*** !!!! You will still need to make wipe data for the ROM to work correctly
-There are also disadvantages:
*Since the data is not encrypted in any way, then access to them is free. Anyone who gets access to your device will be able to access ALL the data
*You need to carefully monitor the sequence of actions when installing or changing the ROM, so that the DFE is active, otherwise you may lose data because the data will try to be encrypted again, you will get a bootloop, and all data will be lost
What is DFE-NEO?
*Many people know DFE from this thread XDA, it has stopped working for A/B devices with dynamic partitions, there is also a problem that in some ROMs the system has the RO(Read-Only) status of the system partition. Starting with A13 Google will promote EROFS(Enhanced Read-Only File System) which will not be possible to manipulate without first converting to EXT4, in order to change the status to RW(Read-Write). Because of this, it is not possible to modify fstab directly in 100% of cases. This is where DFE-NEO comes in.
*The NEO method works by utilizing Magiskinit and Overlay.d GitHub
How does it work without Magisk?
*In fact, in no way. If my script does not detect magisk in the boot_a/Boot_b section, magisk will be installed, after which the main bianrys files will be deleted, so there will be no root access but magiskinit itself will continue to work. In this regard, the system boot time will be longer by 40-50 seconds ( from the brand logo )
And so what can this script do:
-Hides Encryption - Forces the system to think that the data is encrypted.
-Reflash recovery after OTA - only for devices with recovery in boot_a/_b
-Flash current recovery - only for devices with recovery in boot_a/_b
-Flash DFE
-Flash magisk
Spoiler: Arguments.txt
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If you want to change the parameters , then you need to change the file argumetns.txt inside the archive , or put the modified arguments.txt to the archive, or to rebuild the archive with the changed argumetns.txt
Code:
# legacy or neo
DFE method=neo
# both | in-current | un-current
Flash SLOT=both
# none|system|bootloader|recovery
Reboot after installing=none
# You can add your own language, to do this, just drop
a file into the language folder by analogy with the topic
that is already there
# indo|russian|english
Language=english
Code:
# ================================================== #
Force reading arguments.txt=false
# ================================================== #
Flash DFE= true
Disable AVB= true
Disable QUOTA= true
Hide not encrypted= true
# ================================================== #
Flash Magisk= false
# ================================================== #
Reflash Recovery for OTA= false
Reflash current Recovery for Recovery= false
# ================================================== #
Wipe DATA= false
Remove PIN= false
# ================================================== #
Skip warning= false
Modes of operation of these parameters
These parameters have two modes:
• true (yes, true),
• false(no, not true)
Exceptions for specific parameters
• DFE method(DFE method)= neo(new method)
Another argument for DFE method
legacy(old method)
• Flash slot= both (patching boot_a and boot_b sections, also applies to magisk firmware, twrp)
More arguments for Flash slot
• in-current (patching of the boot_x section, where x is the current slot, also applies to magisk firmware, twrp)
• un-current (patching the boot_x partition, where x is the opposite slot)
• Reboot after installing(Reboot after installation)= none (no, that is, there will be no reboot)
More arguments for Reboot after installing
• system(restart into the system, simple reboot)
• bootloader (reboot to fastboot mode)
• recovery (reboot into recovery mode)
• Language(installer language)=english(English)
More arguments for Language
• indo(Indonesian)
• russian (Russian language)
So we have sorted out the modes of operation of all parameters. Now, what does each of them mean.
The values of these parameters
Here the functions of the parameters are described in true mode, for exceptions depending on the mode of operation of the parameter
• DFE method - DFE patching method
• Flash slot - patching the boot partition
• Reboot after installing - reboot after installation
• DISABLE DINAMIC REFRESHRATE - disable dynamic screen formatting, ONLY FOR MIUI
• Language - the language of the installer
• Force reading arguments.txt - dfe-neo will immediately address the arguments in arguments.txt without the possibility of creating a temporary arguments.txt
• Flash DFE - DFE firmware
• Hide not encrypted - The ROM will think that encryption is enabled
• Skip warning - at the end, a guide will be shown on the correct use of dfe after firmware
• Reflash recovery for ota - reinstalling recovery after ota updates, according to the Flash slot parameter mode=
• Reflash current Recovery for Recovery - flash the current recovery, according to the Flash slot parameter mode=
• Wipe DATA - deleting the contents of the /data section without formatting the internal memory (where the Android, Downloads, Music, etc. folders are located) If you sew DFE for the first time, then we still do format data
• Remove PIN - remove password
• Disable AVB - system integrity check is disabled (or whatever you call it, you can set false if you flash magisk)
• Disable QUOTA - (to be honest, I didn't understand what it was, but you can leave it true)
• Flash Magisk - Installing Magisk, according to the Flash slot parameter mode=
And you can also set up your own temporary arguments.txt during installation:
In DFE-NEO, in addition to using arguments.txt in .zip archive, you can still set up your temporary one.
Launch the dfe-neo archive and select Configure Arguments now ( volume + >> volume - )
And we are offered to configure the parameters.
Volume + indicates change
Volume - indicates select
What should I choose DFE method= neo or legacy?
• Neo method - patches the boot partition, we leave neo if the system partitions are read-only, also suitable if the system partitions are editable
• Legacy method - patches fstab.qcom in the /vendor/etc/ section, this method cannot be used if the system partitions are read-only.
Also be careful and read what the script writes at the end of the installation
If you data is encrypted, then after flashing DFE you need to format data
If DFE was installed with Magisk you can upgrade or downgrade the Magisk version later without flashing DFE again
If you uninstall Magisk via uninstall or Magisk app Then the DFE will stop its work! In this case, you will need to flash the DFE again
If DFE was WITHOUT Magisk, it WILL work, but you can also install Magisk later. And also follow the warning 1 and 2
If you install TWRP or another custom recovery, then DFE by analogy with Magisk, will stop working
If you update/Install a new ROM, then DFE will need to be flashed again, by analogy with Magisk
You can install DFE as a magisk module. BUT THIS IS NOT A MODULE, BUT JUST AN INTERFACE FOR INSTALLATION
Demo vido: https://t.me/mfpupdate/22
And also you can flash as a regular zip archive via TWRP, while you do not have to reboot TWRP.
The work consists of the same mechanism as Magisk. If your recovery is located in boot, then after updating / flashing twrp, just like magisk, dfe will be overwritten
After updating/changing ROM you need to reflash dfe again
You can flash dfe without rebooting twrp
No needed for system to be RW for DFE to work
Support erofs
Support flashing from magisk app ( like module magisk )
Later from the computer I will supplement the post. I will add screenshots, etc.
Download link - SourceForge
TG group : @PocoF3DFE
Donate only TG link https://t.me/mfpupdate/47
Great job Alexey. Very useful mod
LeeGarChat said:
Hello everyone, I am writing a script to disable encryption on A/B devices. if you help me with testing on other devices, I will be glad, at the moment it works fine for Poco f3 ( Alioth/Aliothin ). I'm sure it will work just as well on other devices.
And so what can this script:
Hide no encrypted - Forces the system to think that the data is encrypted.
Reflash recovery after OTA - only for devices with recovery into boot_a/_b
Flash current recovery - only for devices with recovery into boot_a/_b
Flash DFE
Flash magisk
The work consists of the same mechanism as Magisk. If u recovery if your recovery is located in boot, then after updating / flashing twrp, just like magisk, dfe will turn off
After update/change ROM u need reflash dfe
You can flashing dfe without reboot twrp
No needed RW system
Support erofs
Support flashing from magisk app ( like module magisk )
Later from the computer I will supplement the post. I will add screenshots, etc.
TG group : @PocoF3DFE
Click to expand...
Click to collapse
Great job bro its perfectly work on my Redmi Note 11 Spes, thanks buddy
sorry for my noob question:does it solove the read-only attribute for erofs partion,my phone is civi (code mona)
wsdyleon said:
sorry for my noob question:does it solove the read-only attribute for erofs partion,my phone is civi (code mona)
Click to expand...
Click to collapse
Yes, if I understand u. Anyway it's working on RW system and RO system. But anyway waiting 0.8.0 beta, because in > 0.7.0 patching only boot partitions, I think need patching recovery partition for device with recovery
LeeGarChat said:
Yes, if I understand u. Anyway it's working on RW system and RO system. But anyway waiting 0.8.0 beta, because in > 0.7.0 patching only boot partitions, I think need patching recovery partition for device with recovery
Click to expand...
Click to collapse
thank u for your answer,but i donnt konw how to flash it.i flash"dfe+magisk+reflash"on my phone in twrp,but bootloop for me
LeeGarChat said:
Yes, if I understand u. Anyway it's working on RW system and RO system. But anyway waiting 0.8.0 beta, because in > 0.7.0 patching only boot partitions, I think need patching recovery partition for device with recovery
Click to expand...
Click to collapse
my english still sucks,after flashing the zip ,the ro system would still ro,just dfe。am i right?
LeeGarChat said:
Download link - SourceForge
Click to expand...
Click to collapse
Great and Congrats!
Can you explain about each zip file made?
Is there a situation for each file?
What does each file do exactly?
Which file should I choose?
----------------------------------------
UPD.
Okay OP. Good work but have consequencies........
Here what I made:
installed magisk;
installed DFE-NEO-0.7.0-BETA+HNE.zip via magisk - modules;
Rebooted device.
Problem: Red message in the screen (look attached SS).
Solved with:
USB Debugging enable;​Permission adb Okay;​cmd command:​
Code:
D:\Program Android\platform-tools>adb shell
Mydevice:/ $ pm list packages
package:com.google.android.networkstack.tethering
package:com.android.fmradio
package:com.android.temperature
[...]
package:com.android.theme.icon_pack.filled.settings
package:com.android.watermark
package:com.android.dreams.basic
[...]
Mydevice:/ $ pm uninstall --user 0 com.android.watermark
Success
127|Mydevice:/ $ exit
D:\Program Android\platform-tools>adb reboot
D:\Program Android\platform-tools>
Reboot device and Red message good bye.
My device fir reference: MTK arm64 -- armv8-a - A11 - TWRP AB - ro.virtual_ab.enabled=true
lopestom said:
Great and Congrats!
Can you explain about each zip file made?
Is there a situation for each file?
What does each file do exactly?
Which file should I choose?
----------------------------------------
UPD.
Okay OP. Good work but have consequencies........
Here what I made:
installed magisk;
installed DFE-NEO-0.7.0-BETA+HNE.zip via magisk - modules;
Rebooted device.
Problem: Red message in the screen (look attached SS).
Solved with:
USB Debugging enable;​Permission adb Okay;​cmd command:​
Code:
D:\Program Android\platform-tools>adb shell
Mydevice:/ $ pm list packages
package:com.google.android.networkstack.tethering
package:com.android.fmradio
package:com.android.temperature
[...]
package:com.android.theme.icon_pack.filled.settings
package:com.android.watermark
package:com.android.dreams.basic
[...]
Mydevice:/ $ pm uninstall --user 0 com.android.watermark
Success
127|Mydevice:/ $ exit
D:\Program Android\platform-tools>adb reboot
D:\Program Android\platform-tools>
Reboot device and Red message good bye.
My device fir reference: MTK arm64 -- armv8-a - A11 - TWRP AB - ro.virtual_ab.enabled=true
Click to expand...
Click to collapse
Thanks for feedback. I'll try fix it. After installing DFE noe, is your device no longer encrypted?
LeeGarChat said:
Thanks for feedback. I'll try fix it. After installing DFE noe, is your device no longer encrypted?
Click to expand...
Click to collapse
I can make backup of Data now with TWRP.
But..........
I need to do more testing regarding the ROM.
I fixed a reset - FORMAT DATA with TWRP to see/test if everything would work fine after that.
Knowing that there would be a possibility it might not work, re-install your zip file and reboot to test again.
So there's a big problem: - WiFi connection doesn't work
- going to settings - Security - Encryption&credentials =====>>> Black Screen .......... stop ............ go back setting automatically
- others??
Do not worry about me. I have experience in getting the device running normally. The device is also not for my daily use.
So I will need time for more testing or you should write for users not to do a factory reset.
lopestom said:
I can make backup of Data now with TWRP.
But..........
I need to do more testing regarding the ROM.
I fixed a reset - FORMAT DATA with TWRP to see/test if everything would work fine after that.
Knowing that there would be a possibility it might not work, re-install your zip file and reboot to test again.
So there's a big problem: - WiFi connection doesn't work
- going to settings - Security - Encryption&credentials =====>>> Black Screen .......... stop ............ go back setting automatically
- others??
Do not worry about me. I have experience in getting the device running normally. The device is also not for my daily use.
So I will need time for more testing or you should write for users not to do a factory reset.
Click to expand...
Click to collapse
Send me download link on you ROM. I'll check structure
LeeGarChat said:
Send me download link on you ROM. I'll check structure
Click to expand...
Click to collapse
UMIDIGI Power 5 4GB_N_V1.0_20220315 - SPFT release
UMIDIGI_POWER5_4GB_N_V1-0_20220315.rar
Great.
lopestom said:
I can make backup of Data now with TWRP.
But..........
I need to do more testing regarding the ROM.
I fixed a reset - FORMAT DATA with TWRP to see/test if everything would work fine after that.
Knowing that there would be a possibility it might not work, re-install your zip file and reboot to test again.
So there's a big problem: - WiFi connection doesn't work
- going to settings - Security - Encryption&credentials =====>>> Black Screen .......... stop ............ go back setting automatically
- others??
Do not worry about me. I have experience in getting the device running normally. The device is also not for my daily use.
So I will need time for more testing or you should write for users not to do a factory reset.
Click to expand...
Click to collapse
Test 0.9.0 version please
LeeGarChat said:
Test 0.9.0 version please
Click to expand...
Click to collapse
Thanks man. I appreciate what you're doing.
I already tried with this and newer version DFE-NEO-0.10.1-BETA.zip having the same situation as before.
Unfortunately there is something that blocks the wifi working after installing DFE-NEO-x.xx.x-BETA.zip. Regarding this, I tested restoring the NVRAM, NVCFG and NVDATA files and the wifi started to work, however the part that DFE-NEO does is lost.
Is there something that DFE-NEO does with NvRam, NvCfg and NvData partitions?? Is it something that is a prerequisite for the ROM to work encrypted and consequently to work or not work the wifi?
I couldn't try all possibilities to investigate and test as I have been sick for a few days.
lopestom said:
Thanks man. I appreciate what you're doing.
I already tried with this and newer version DFE-NEO-0.10.1-BETA.zip having the same situation as before.
Unfortunately there is something that blocks the wifi working after installing DFE-NEO-x.xx.x-BETA.zip. Regarding this, I tested restoring the NVRAM, NVCFG and NVDATA files and the wifi started to work, however the part that DFE-NEO does is lost.
Is there something that DFE-NEO does with NvRam, NvCfg and NvData partitions?? Is it something that is a prerequisite for the ROM to work encrypted and consequently to work or not work the wifi?
I couldn't try all possibilities to investigate and test as I have been sick for a few days.
Click to expand...
Click to collapse
Some ROMs may not work correctly with DFE, due to the fact that the ROMs are designed to work with an encrypted data partition, or there are any protections. also, on some ROMs, the data split must be formatted according to the associated with certain keys -C and -O -g. DFE-NEO does not modify any partitions except boot, just like magisk. DFE-NEO works thanks to magisk-init, which allows you to run custom scripts during ROM startup. the script that is executed during system startup, makes a copy of fstab, deletes the encryption keys and mounts it in place of the original fstab, there is no full-fledged verification of the system. all work is based on magisk logic
Awesome job LeeGarChat, much appreciated by all users I have quoted your post link in other threads too so all can see the magic .
My device is Shamshung Galeksi M21 2021 (SM-M215G) But when I flashed from TWRP it showed some red error : 577 something like that, then when I flashed from Majisk it showed error code 3 : DFE-NEO only for virtual_ab devices
Treble Check shows my device is treble compliant having AB partition and TWRP displays following partitions: System, Vendor, Product, Odm, Cache, Data, EFS, Metadata, Sec EFS, Micro SD Card, USB OTG.
In my Shaomi Readmi Note 10 (mohito) TWRP displays Slot A & Slot B under Advanced Tab and ROMs get directly flashed to Inactive Slot B, also everytime I try flash new custom ROM I have to first flash MyUi Factory ROM and also System partition doesnt show in TWRP Mount section.
My question is what is the difference between Shamshung Galeksi M21 Android 11 out-of-box & Shaomi Readmi Note 10 Mohito ? why TWRP shows System partition mount in Shamshung and not in shaomi though both are A/B devices?
Pls help.
LeeGarChat said:
Some ROMs may not work correctly with DFE, due to the fact that the ROMs are designed to work with an encrypted data partition, or there are any protections. also, on some ROMs, the data split must be formatted according to the associated with certain keys -C and -O -g. DFE-NEO does not modify any partitions except boot, just like magisk. DFE-NEO works thanks to magisk-init, which allows you to run custom scripts during ROM startup. the script that is executed during system startup, makes a copy of fstab, deletes the encryption keys and mounts it in place of the original fstab, there is no full-fledged verification of the system. all work is based on magisk logic
Click to expand...
Click to collapse
Great News!
@2mkl and me solved the Wi-Fi issue......... But I not write here about.
Thanks again
lopestom said:
Great News!
@2mkl and me solved the Wi-Fi issue......... But I not write here about.
Thanks again
Click to expand...
Click to collapse
can you tell us in PM how you fixed the problems you wrote about earlier
History of updates and news
June 16
Update DFE-NEO 0.10.0 beta
- Added Feature, choose wether you want to flash DFE legacy / neo ( for legacy need RW system and not working with erofs)
july 14
Update dfe-neo beta 0.11.0
- Add magisk 25.1
- Add volume key selector
- Add remove lockscreen-pin select for key selector
july 20
Update dfe-neo beta 0.12.0
- Add new arguments:
- Wipe data
- Reboot after
july 22
DFE-NEO-0.12.4-BETA update
- Add additional settings (optional) like wipe data, reboot after
- Add disable dynamic refrash rate display ( only miui and works with dfe-neo method )
july 23
DFE-NEO-0.13.0-BETA update
- Add new arguments into arguments.txt, now u can change it without volume key
- Add new options "remove avb" " remove quota" ( default removed )
- The code has been slightly rewritten
- Update somthing patches for safety net fix based on later version 2.3.1 https://github.com/kdrag0n/safetynet-fix/releases/tag/v2.3.1
july 24
DFE-NEO-0.13.3-BETA update
- Minor fix
- Cleaning ui print
- Added calculation of script running time
july 25
I show by my example how to install a ROM in conjunction with DFE-NEO, as well as additional zips
Download DFE-NEO LINK ( Alway later version )
Thread XDA LINK
Please subscribe to the updates and news channel LINK
Thanks
july 28
DFE-NEO-0.14.0-BETA update
- Add language select ( it is currently configured only in the file arguments.txt )
Languages:
• Russian
• English
• Indo
• you can add your own language
- Fix ro.dfe.neo.state
- Add force reading arguments.txt
july 30
DFE-NEO-0.14.1-BETA update
- Reworked my_print function to work correctly in other languages. previously, it worked fine only with English
- Updated the Russian language. fixed typos
july 30
DFE-NEO-0.15.0-BETA update
- Add support A-Only devices
Languages v003:
- There was a bug with a large number of characters ****

Categories

Resources