Enable file encryption for android 9 based xiaomi.eu(xiaomi.eu_multi_MI6_V10.4.2.0) - Xiaomi Mi 6 Guides, News, & Discussion

In the 'xiaomi.eu_multi_MI6_V10.4.2.0', xiaomi.eu has removed essential files which actually did the encryption job. In this case, modification of "vendor/etc/fstab.qcomm" is not enough for /sdcard/ encryption. Below file lists should be added/replaced from china miui rom (about 3 MB) to 'xiaomi.eu_multi_MI6_V10.4.2.0' to enable encryption.
Ps., some of below files are not necessary, but I am not sure which one did the trick.
/system/vendor/etc/gps.conf
/system/vendor/etc/mixer_paths_overlay_dynamic.xml
/system/vendor/etc/init/hw/init.qcom.rc
/system/vendor/etc/izat.conf
/system/vendor/etc/wifi/WCNSS_qcom_cfg.ini
/system/vendor/etc/fstab.qcom
/system/vendor/app/TrustZoneAccessService/TrustZoneAccessService.apk
/system/vendor/app/TrustZoneAccessService/oat/arm64/TrustZoneAccessService.odex
/system/vendor/app/TrustZoneAccessService/oat/arm64/TrustZoneAccessService.vdex
/system/vendor/app/ConnectionSecurityService/oat/arm64/ConnectionSecurityService.odex
/system/vendor/app/ConnectionSecurityService/oat/arm64/ConnectionSecurityService.vdex
/system/vendor/app/PowerOffAlarm/oat/arm64/PowerOffAlarm.vdex
/system/vendor/app/PowerOffAlarm/oat/arm64/PowerOffAlarm.odex
/system/vendor/app/PowerOffAlarm/PowerOffAlarm.apk
/system/vendor/app/SSGTelemetryService/oat/arm64/SSGTelemetryService.odex
/system/vendor/app/SSGTelemetryService/oat/arm64/SSGTelemetryService.vdex
/system/vendor/app/TimeService/oat/arm64/TimeService.odex
/system/vendor/app/TimeService/oat/arm64/TimeService.vdex
/system/vendor/app/TimeService/TimeService.apk
/system/vendor/lib/mediadrm/libdrmclearkeyplugin.so
/system/vendor/lib/mediadrm/libwvdrmengine.so
/system/vendor/lib/libmmcamera_imx386_semco.so
On Mi6 10.4.2.0, encryption of /sdcard/ succeeded with above files.
If you only modify fstab.qcomm, but do not copy files which actually did the encryption job, encryption is fake (although it showed encrypted on "setting"). Check this by : goto twrp, click 'cancel' when it asks for gesture, then you would find you can still access files on /sdcard/ (without encryption).
See also https://forum.xda-developers.com/xi...ypt-data-data-sdcard-xiaomi-eu-t3946130/page2
Update: in the recent mi6 xiaomi.eu's miui v11 rom, modification of "vendor/etc/fstab.qcomm" is enough for /sdcard/ encryption!

Does it affect anything? performance? battery life?

FSLRMH said:
Does it affect anything? performance? battery life?
Click to expand...
Click to collapse
I did not observe any difference in terms of performance and "battery life".

Can you install AOSP roms when Xiaomi.eu was installed previously without wiping internal storage afterwards by doing this mod?

Related

How do I decrypt my 6p

I flashed CM when it first arrived and encrypted my phone. How do I unencrypt it again? Thanks in advance.
jdub251 said:
I flashed CM when it first arrived and encrypted my phone. How do I unencrypt it again? Thanks in advance.
Click to expand...
Click to collapse
I don't think you can decrypt without formatting the area.
jdub251 said:
I flashed CM when it first arrived and encrypted my phone. How do I unencrypt it again? Thanks in advance.
Click to expand...
Click to collapse
You need a kernel that does not force encryption. I believe ex kernel is an option. I run benzo rom which does not force encryption. Make sure yo backup any data you want to keep. The process should go as follows:
Flash rom
Flash gapps
Flash kernel
Select wipe
Format data
Reboot Recovery
Reboot system
n.halepat said:
You need a kernel that does not force encryption. I believe ex kernel is an option. I run benzo rom which does not force encryption. Make sure yo backup any data you want to keep. The process should go as follows:
Flash rom
Flash gapps
Flash kernel
Select wipe
Format data
Reboot Recovery
Reboot system
Click to expand...
Click to collapse
Ok! Will try this! Thanks! I believe this will work!
Sent from my Nexus 6P using Tapatalk
jdub251 said:
Ok! Will try this! Thanks! I believe this will work!
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
Just make sure you format data, not wipe.
n.halepat said:
You need a kernel that does not force encryption. I believe ex kernel is an option. I run benzo rom which does not force encryption. Make sure yo backup any data you want to keep. The process should go as follows:
Flash rom
Flash gapps
Flash kernel
Select wipe
Format data
Reboot Recovery
Reboot system
Click to expand...
Click to collapse
Heisenberg said:
Just make sure you format data, not wipe.
Click to expand...
Click to collapse
Have you noticed any speed difference after decrypting?
Also is it possible to decrypt using a kernel that doesn't force encryption and then switch to a kernel that may not have that? I would still have to turn encryption on via Settings -> Encrypt is what I'm thinking.
exSD said:
Have you noticed any speed difference after decrypting?
Also is it possible to decrypt using a kernel that doesn't force encryption and then switch to a kernel that may not have that? I would still have to turn encryption on via Settings -> Encrypt is what I'm thinking.
Click to expand...
Click to collapse
I've seen some testing regarding encrypted vs decrypted, the performance gain is so small it's negligible. If you switch to a kernel that forces encryption, it'll encrypt automatically on boot.
Heisenberg said:
I've seen some testing regarding encrypted vs decrypted, the performance gain is so small it's negligible. If you switch to a kernel that forces encryption, it'll encrypt automatically on boot.
Click to expand...
Click to collapse
Have you read http://www.anandtech.com/show/9820/the-google-nexus-6p-review ?
The difference in storage speeds is drastic.
Encrypted: 75.7MB/s seq read, 40.6MB/s seq write, 7.4MB/s rand read, 1.0MB/s rand write.
Unencrypted: 179.7MB/s seq read, 52MB/s seq write, 14.73MB/s rand read, 6.3MB/s rand write.
exSD said:
Have you read http://www.anandtech.com/show/9820/the-google-nexus-6p-review ?
The difference in storage speeds is drastic.
Encrypted: 75.7MB/s seq read, 40.6MB/s seq write, 7.4MB/s rand read, 1.0MB/s rand write.
Unencrypted: 179.7MB/s seq read, 52MB/s seq write, 14.73MB/s rand read, 6.3MB/s rand write.
Click to expand...
Click to collapse
No I hadn't seen that particular article. I guess the results must vary, the results I saw showed performance gains in the order of less than a percent.
Heisenberg said:
No I hadn't seen that particular article. I guess the results must vary, the results I saw showed performance gains in the order of less than a percent.
Click to expand...
Click to collapse
In terms of power consumption, the CPU is processing an extra step for every instruction it has passed to it. I would think that with the inefficient chip the 810 already is that this would impact battery life more than real world opening apps type speed.
I think I'll decrypt to see if I can notice any power differences.
so if i copy all my files to my PC before following these steps, I would still be able to use them afterwards? ie pictures, sounds, images, and titanium backup files? i'm wanting to try benzorom and it sounds like it doesn't get along with encryption very well.
glhelinski said:
so if i copy all my files to my PC before following these steps, I would still be able to use them afterwards? ie pictures, sounds, images, and titanium backup files? i'm wanting to try benzorom and it sounds like it doesn't get along with encryption very well.
Click to expand...
Click to collapse
Yeah, as long as you back up everything to your PC you can just transfer them all back to your phone after you do this.
if i do a nandroid backup (from TWRP) of an encrypted system then create backup of /sdcard, wipe userdata than restore /sdcard and restore backup with a non forcing kernel will i get a decrypted device with all data restored?
answering my own question:
- twrp backup data
- copy /sdcard to pc
- fastboot format userdata
- copy from pc to /sdcard
- restore data in twrp
are the needed steps to decrypt without losing any data.
A bit of a necro, so I apologize for that.
@ratson: I am attempting to do exactly what you have mentioned here, although I am not an experienced user. Can I get some clarification on the following:
TWRP backup: Done. It keeps wanting to restrict my permissions on this folder, but I was able to get it off the device (Nexus6p Huawei) and backed up onto my PC.
copy the /sdcard to the PC. Man, what a problem I am having with this. First off, when it gets to a folder called /kick it fails because it says it's not a directory. It does this on some long hex named file that actually isn't a directory, but it seems to want to recognize it as one anyway, and then fail the pull because of this.
So, I cut the entire /kick folder through ES Explorer, and temporarily pasted it into my dropbox. Restarted the adb pull through my shell. It seemed to be working ok, until it got to the TWRP folder. While backing that up (I already did this, but it is still on the device as I only copied it. Should I be deleting this before backing up the rest of the /sdcard?) it fails because it says permission denied when it tries to pull some of the backup files.
At this point I've restarted the pull, and tried different things for several hours. Before I continue to bang my head against the wall, I'd like to get some advice.
How do you pull the /sdcard to your pc? what method? what commands? do you do it from TWRP recovery mode, from the system? Pretend I'm an android toddler (I kind of am). Is there anyway to not start from scratch every time the pull fails? Is there ways to pre-empt the failures?
Once this is complete, when you restore the data, can you please also list the commands for that?
I greatly appreciate your, or anyone elses help to reads this.
Thanks,
For the record:
Make sure battery is charged!
On PC: adb reboot recovery
In TWRP: select BACKUP, select DATA, swipe
When finished
On PC:
mkdir DATA-BACKUP
adb pull /data/media/0/TWRP/BACKUPS
fastboot reboot bootloader
fastboot format userdata
On Phone:
arrow down to select recovery, power to enter
cd DATA-BACKUP
adb push * /data/media/TWRP/BACKUPS
When finished
In TWRP: Restore, select the backup, swipe
rchtk said:
For the record:
Make sure battery is charged!
On PC: adb reboot recovery
In TWRP: select BACKUP, select DATA, swipe
When finished
On PC:
mkdir DATA-BACKUP
adb pull /data/media/0/TWRP/BACKUPS
fastboot reboot bootloader
fastboot format userdata
On Phone:
arrow down to select recovery, power to enter
cd DATA-BACKUP
adb push * /data/media/TWRP/BACKUPS
When finished
In TWRP: Restore, select the backup, swipe
Click to expand...
Click to collapse
This will backup and restore the nandroid backup, but not the sdcard, correct? Or am i getting it wrong?
Kalamos said:
This will backup and restore the nandroid backup, but not the sdcard, correct? Or am i getting it wrong?
Click to expand...
Click to collapse
It will restore what you backed up: the complete data partition: app settings, contacts, media,.. All your datas..
rchtk said:
It will restore what you backed up: the complete data partition: app settings, contacts, media,.. All your datas..
Click to expand...
Click to collapse
I was under the impression that a nandroid backup didnnot include apps, user settings, etc. Otherwise, what is the use of Titanium Backup? Perhaps I'm jist confused.
I'm curious if 7.1 still has a huge performance hit with encrypted partitions.
Anyone know of a good app for checking performance of the data partition? All I've seen is internal/external storage.
Thanks.

Dual/Multi Boot Possible on Verizon Note 4 [LP/MM]

I have looked around and haven't seen anyone mention this so I thought I would post about it since I've been using it and thought it was cool. I hope others find this useful.
The thread I'm talking about: http://forum.xda-developers.com/note-4/general/dual-boot-n910f-snap-dragon-variant-t3065211
The original thread quoted by @aukhan: http://forum.xda-developers.com/showthread.php?t=2447534
All credit goes to the original developers for this tool.
Thanks to @aukhan, @rlorange, @chenxialong, and other contributors.
Download the first .apk (Dual Boot Patcher). That is the only app that you should need to complete the process. A video guide is posted by @aukhan here: https://www.youtube.com/watch?v=h_i3GW_s-VE&spfreload=10
That is the best walkthrough I've seen.
Since it was requested, I've made a video walkthrough of this process: https://youtu.be/5VzYED1hhUA
Basically you patch all of the .zip files that you would have flashed normally and then you flash them to a new ROM slot. If there are more questions that the video doesn't answer I'll be happy to answer them or post a better walkthrough if needed.
It should be noted that to switch back and forth you'll need to install the Dual Boot Patcher apk on both ROMs. This does not affect TWRP Recovery.
I have run this with JasmineROM as the primary and CM13 as the secondary as well as CM13 as primary and JasmineROM as Secondary. I currently have this set-up to try different ROMs without needing to completely wipe my phone and deal with backups/restores. I also use it to use CM13 as my primary while having stock options (S-Pen, Car BT, and other Samsung stuff) available in a quick reboot.
Edit:
More Specific Instructions:
1) Download all .zip files that you would flash if you were going to flash the ROM normally (ex. CM13, Gapps, SuperSu, XPosed, datafixes, kernels, etc)
2) Download the Dual Boot Patcher apk: https://snapshots.noobdev.io/ and install it on your phone
3) Open ES File Explorer or another Root Explorer app and navigate to /sdcard/MultiBoot
4) Create a folder labeled "dual" in that directory (now there is a folder /sdcard/MultiBoot/dual)
5) Open Dual Boot Patcher app and tap the three lines in the upper left then select "Patch Zip File"
6) Tap the plus button and find each of the .zip files that you will be flashing. After selecting one make sure to change "Partition Configuration" to "Secondary"
7) A file browser will now open. Navigate to /sdcard/MultiBoot/dual and save the patched zip file there.
8) You may now repeat steps 6 and 7 to add the rest of the zip files
9) Tap the check mark in the upper right to "Patch" all of the .zip files
10) Tap the three lines in the upper left again and select ROMs
11) Tap the phone icon in the lower right and push okay
12) Tap the plus button in the lower right and navigate to the /sdcard/MultiBoot/dual folder. Select the main ROM (CM13, Kyubi, JasmineROM, etc) and tap "keep location"
13) Repeat step 12 until all zips are added in the order you want them flashed (the order is important). If you mess up swipe the one that's wrong to the right to remove it from the list
14) Tap the check mark in the upper right. A console should appear and it should virtually flash the ROM as you would expect in TWRP
15) Once it says "x/x completed" in cyan text and it has stopped you can just tap the back arrow in the upper left
16) If you go back to the ROMs page there should now be a "Secondary" ROM. To test it out you'll need to select it and then reboot the phone.
17) Once it has booted and you are past the setup you'll need to enable "unknown sources" in the menu and install Dual Boot Patcher. Once it's installed, open it. It should find the two ROMs and you'll be able to select Primary from the ROMs menu and reboot back
Edit 2:
This process can be done using any of the partition configurations listed when patching a Zip file. Secondary and Multi Slots go to the System partition, data slot goes to internal storage, and Extsd slot goes to the External SD card. I recommend not using the Multi Slots since more than two ROMs is a lot on the system partition.
If you have problems make sure to set the kernel and update the ramdisk before flashing and that the files are in the right folder typed exactly as it says in the prompt when patching the file.
I have noticed many problems when using a non-Touchwiz ROM as stock and trying to dual boot to a Touchwiz ROM. I have had bootloop situations when trying to dual boot to Kyubi or PaulPizz from CM13, but with PaulPizz as primary I have no issues switching back and forth.
In the event of a bootloop you can recover your primary ROM by entering TWRP, tapping install, selecting image in the bottom right corner, navigating to the /sdcard/MultiBoot/primary folder, and selecting the "boot.img" file. This will return your phone back to the primary ROM.
Edit 3: Video Tutorial: https://youtu.be/5VzYED1hhUA
If it is too blurry I can make another one, but I think you can see what you need to just fine. I hope it helps. I also forgot to mention that if you later want to flash anything to the ROM that you're "dual booting" into then all you have to do is patch the zip files and flash them like before except you're flashing to a slot that already has a ROM now.
Edit 4: I have now tested this on Marshmallow with success. I still recommend using a Touchwiz ROM as primary and you'll need to have a kernel that's permissive. I'm using Emotion, but I think Oscar's kernel should work as well. I have PaulPizzRom.VRU2CPF3.r-2 installed as primary with the CPF3 modem and Emotion kernel and CM13 as secondary (pretty much my daily driver at this point). Everything has been working so far.
Isn't there a kernel patch requirement for this to work?
Just tried it and working great for me. Jasmine primary, cm13 secondary. Definitely easier than messing with twrp to test roms. Thanks for the info!
jal3223 said:
Isn't there a kernel patch requirement for this to work?
Click to expand...
Click to collapse
I didn't need one to get this to work. You may be thinking of Multisystem, which is different and requires both ROMs to run the same kernel.
As far as I can tell this method boots each ROM with its own kernel. CM13 and JasmineROM both use a version of the Multisystem kernel, but I just checked and they are running different kernels.
I'll probably try the PaulPizz or Kyubi ROMs since I've been having some freeze issues with JasmineROM and see if the others work just as well.
shadeau said:
I didn't need one to get this to work. You may be thinking of Multisystem, which is different and requires both ROMs to run the same kernel.
As far as I can tell this method boots each ROM with its own kernel. CM13 and JasmineROM both use a version of the Multisystem kernel, but I just checked and they are running different kernels.
I'll probably try the PaulPizz or Kyubi ROMs since I've been having some freeze issues with JasmineROM and see if the others work just as well.
Click to expand...
Click to collapse
Awesome, thanks! I'm definitely going to give it a try.
I cannot seem to get it to recognize the path with the patched ROM file. none of the storage paths on my device show as "sdcard", they are either sdcard0 or ExtSdCard.
Even though the folder structure is created on the Internal storage, the DualBoot app does not recognize it.
EDIT: Nevermind, I realized I do not need that app. I just patched the ROM and then added it in the Patcher app mentioned above. The added the patched ROM to it and it shows up in the ROMs menu
EDIT2: This is just not working, I try and apply the ROM for dual boot/swap, however it fails to complete the configuration. I am on a rooted stock phone..could that be the issue?
jal3223 said:
Awesome, thanks! I'm definitely going to give it a try.
Click to expand...
Click to collapse
I just wanted to give an update and say I tried Kyubi ROM the other day and got it to boot just fine. I had one time where I needed to pull the battery, but then it rebooted to Kyubi and ran normally. I don't know if that was just bad luck or something else. I'm planning on trying PaulPizz's ROM today.
ssb13 said:
I cannot seem to get it to recognize the path with the patched ROM file. none of the storage paths on my device show as "sdcard", they are either sdcard0 or ExtSdCard.
Even though the folder structure is created on the Internal storage, the DualBoot app does not recognize it.
EDIT: Nevermind, I realized I do not need that app. I just patched the ROM and then added it in the Patcher app mentioned above. The added the patched ROM to it and it shows up in the ROMs menu
EDIT2: This is just not working, I try and apply the ROM for dual boot/swap, however it fails to complete the configuration. I am on a rooted stock phone..could that be the issue?
Click to expand...
Click to collapse
I added some better instructions in the OP. Can you tell me what step you're having problems with? JasmineROM is pretty close to stock so I assumed this would work just as well on the PaulPizz or stock ROM, but I personally haven't tried on either yet.
shadeau said:
I just wanted to give an update and say I tried Kyubi ROM the other day and got it to boot just fine. I had one time where I needed to pull the battery, but then it rebooted to Kyubi and ran normally. I don't know if that was just bad luck or something else. I'm planning on trying PaulPizz's ROM today.
I added some better instructions in the OP. Can you tell me what step you're having problems with? JasmineROM is pretty close to stock so I assumed this would work just as well on the PaulPizz or stock ROM, but I personally haven't tried on either yet.
Click to expand...
Click to collapse
I'll give it a try with the more specific steps. I think part of my issue was all the videos and other walk-throughs are with older versions of the software. I was also trying to use the other Dual Boot app that is in the other posts....that is where I had the path name issue.
I was finally able to get CM13 on the list of ROMs, however it would fail to switch to it....but that was using the Win32 app to patch it. I'll try it all with the phone app.
ssb13 said:
I'll give it a try with the more specific steps. I think part of my issue was all the videos and other walk-throughs are with older versions of the software. I was also trying to use the other Dual Boot app that is in the other posts....that is where I had the path name issue.
I was finally able to get CM13 on the list of ROMs, however it would fail to switch to it....but that was using the Win32 app to patch it. I'll try it all with the phone app.
Click to expand...
Click to collapse
I followed it to the T and here was my result...(screenshot attached)
EDIT: Added log file. Seems like perhaps it is either permissions, path, and or space issues.
ssb13 said:
I followed it to the T and here was my result...(screenshot attached)
EDIT: Added log file. Seems like perhaps it is either permissions, path, and or space issues.
Click to expand...
Click to collapse
I'll have to look at it tomorrow when I have time. You said you were on stock. What exactly are you running on your phone? What are the firmware version and the kernel? Also, how much free space is on your internal storage and are you using an SD card?
shadeau said:
I'll have to look at it tomorrow when I have time. You said you were on stock. What exactly are you running on your phone? What are the firmware version and the kernel? Also, how much free space is on your internal storage and are you using an SD card?
Click to expand...
Click to collapse
14gb free. About 40gb free on SD card.
Stock 5.1.1 bpa1.
Xceed kernel
Sent from my SM-N910V using Tapatalk
ssb13 said:
14gb free. About 40gb free on SD card.
Stock 5.1.1 bpa1.
Xceed kernel View attachment 3739482
Sent from my SM-N910V using Tapatalk
Click to expand...
Click to collapse
Try deleting all of the patched zip files and starting over. In the ROMs menu tap the three dots on the primary ROM and scroll down to the bottom. Update the ramdisk and set the kernel then reboot. Make a new folder in the sdcard/MultiBoot folder labeled "data-slot-1" all lowercase. Patch your .zip files and instead of selecting secondary select "Data Slot" and when it asks you what slot name, type "1". After tapping continue, navigate to the sdcard/MultiBoot/data-slot-1 folder and save the .zip files there. After the first time you should be able to select "1 (Data Slot)" for partition configuration instead of manually assigning one for subsequent .zips. Once you're done patching the files go back to the ROMs page and add a ROM then the .zips (selecting keep location like before) and see if that works.
The dual slot saves all ROM data to your system partition which could be pretty full even if your internal storage shows plenty of space. Since all apps are still on the system partition regardless of which slot you pick it may be good to look at how much free space is left before flashing. You can see how much space is left by tapping "Free Space" underneath the "Patch Zip File" button. The /system directory is your system partition.
shadeau said:
Try deleting all of the patched zip files and starting over. In the ROMs menu tap the three dots on the primary ROM and scroll down to the bottom. Update the ramdisk and set the kernel then reboot. Make a new folder in the sdcard/MultiBoot folder labeled "data-slot-1" all lowercase. Patch your .zip files and instead of selecting secondary select "Data Slot" and when it asks you what slot name, type "1". After tapping continue, navigate to the sdcard/MultiBoot/data-slot-1 folder and save the .zip files there. After the first time you should be able to select "1 (Data Slot)" for partition configuration instead of manually assigning one for subsequent .zips. Once you're done patching the files go back to the ROMs page and add a ROM then the .zips (selecting keep location like before) and see if that works.
The dual slot saves all ROM data to your system partition which could be pretty full even if your internal storage shows plenty of space. Since all apps are still on the system partition regardless of which slot you pick it may be good to look at how much free space is left before flashing. You can see how much space is left by tapping "Free Space" underneath the "Patch Zip File" button. The /system directory is your system partition.
Click to expand...
Click to collapse
Thank, I will try this method. I did check and the /raw/system partition is full. Should it be?
ssb13 said:
Thank, I will try this method. I did check and the /raw/system partition is full. Should it be?
Click to expand...
Click to collapse
My system partition says "Total size: 3.94 GiB, Free: 569.43 MiB" and that's with CM13 on Primary and PaulPizz on Secondary with Kyubi on data-slot-1. I haven't booted Kyubi yet so that may decrease my free space even further, but if your system partition is already full I don't think you'll be able to flash anything. You might try looking for big files in the /system directory. Also check to see if there are any files in /system/multiboot/dual and delete them. Do you have a lot of apps installed?
shadeau said:
My system partition says "Total size: 3.94 GiB, Free: 569.43 MiB" and that's with CM13 on Primary and PaulPizz on Secondary with Kyubi on data-slot-1. I haven't booted Kyubi yet so that may decrease my free space even further, but if your system partition is already full I don't think you'll be able to flash anything. You might try looking for big files in the /system directory. Also check to see if there are any files in /system/multiboot/dual and delete them. Do you have a lot of apps installed?
Click to expand...
Click to collapse
Mine says 56K free. Maybe I should revert to my nandroid which is pre-dualboot attempts and see. However I am on stock , rooted. Not even ROM, just the a rooted converter retail to DE. So perhaps the stock uses more system space.
ssb13 said:
Mine says 56K free. Maybe I should revert to my nandroid which is pre-dualboot attempts and see. However I am on stock , rooted. Not even ROM, just the a rooted converter retail to DE. So perhaps the stock uses more system space.
Click to expand...
Click to collapse
That might be a good option. If I tap the three dots for each of my ROMs the PaulPizz (essentially stock) lists a system size of 2.09 GiB, which is half the size of the system partition. You might want to check yours and see what it lists as the system size.
You might also just try using the data-slot-1 and see if it works before the nandroid revert.
shadeau said:
That might be a good option. If I tap the three dots for each of my ROMs the PaulPizz (essentially stock) lists a system size of 2.09 GiB, which is half the size of the system partition. You might want to check yours and see what it lists as the system size.
You might also just try using the data-slot-1 and see if it works before the nandroid revert.
Click to expand...
Click to collapse
Using data-slot-1 I received an exit code of 0 and a 2/2 completed!!!
I cannot reboot now because I am waiting for a phone call, but when I do I'll report in. :highfive:
ssb13 said:
Using data-slot-1 I received an exit code of 0 and a 2/2 completed!!!
I cannot reboot now because I am waiting for a phone call, but when I do I'll report in. :highfive:
Click to expand...
Click to collapse
So that did work. Now I have a follow up question. Say I flash a ROM, like CM13 and GAPPS...but when I boot a bunch of apps keep FC'ing and they keep relaunching, like the SetupWizard...basically I'm stuck clicking OK on all the messsages and they just keep coming back.
My question...am I stuck? How can I flip back to booting to my primary ROM? can I delete the files from the data-slot-1 folder? Any thoughts?
ssb13 said:
So that did work. Now I have a follow up question. Say I flash a ROM, like CM13 and GAPPS...but when I boot a bunch of apps keep FC'ing and they keep relaunching, like the SetupWizard...basically I'm stuck clicking OK on all the messsages and they just keep coming back.
My question...am I stuck? How can I flip back to booting to my primary ROM? can I delete the files from the data-slot-1 folder? Any thoughts?
Click to expand...
Click to collapse
It's actually pretty easy to revert back with TWRP. I was going to add this to the OP when I had time: Boot to recovery and tap install, then select image in the bottom right and navigate to /system/MultiBoot/Primary and select the boot.img, then flash it to the boot partition. That will let you boot to the primary ROM.
shadeau said:
It's actually pretty easy to revert back with TWRP. I was going to add this to the OP when I had time: Boot to recovery and tap install, then select image in the bottom right and navigate to /system/MultiBoot/Primary and select the boot.img, then flash it to the boot partition. That will let you boot to the primary ROM.
Click to expand...
Click to collapse
Thanks.

Fool-proof, 100% squeaky clean oneplus 2 custom rom installation for max stability

​Welcome to a simple tutorial that will help OnePlus 2 (OP2) owners and possibly other device owners install custom ROMs in such a way that eliminates most, if not all possibility of system errors, resulting in the longest lasting and most stable custom ROM installations!
DISCLAIMER: Your Warranty was voided long before you were ever even ready to complete this tutorial.
Therefore, I am not responsible for a broken or bricked device, especially if your rage towards a bricked device caused you to throw your device into a wall. This tutorial is actually designed to reduce the amount of "Rage Quitting" on modifying your device.​
This Tutorial assumes you have already completed OEM Unlock, Root, installed TWRP or other Custom Recovery, and are basically ready to install a custom ROM on your OP2.
Before beginning, backup any files you may need, I upload mine to my Google Drive then download after completing the ROM install. You can also use Nandroid to backup your current system (optional as there are methods to restore even the most bricked OP2 that doesnt even have a working recovery or OS, trust me I have done it at least 5 times because I constantly try new ROMs and mods). There are three necessary prerequisite steps required to complete before using this method to install your custom ROM. These prerequisites are listed below:​
Prerequisite One: Ensure your OnePlus 2 has been FULLY updated on the stock Oxygen OS ROM before you install your TWRP or other Custom Recovery. If not, Return to factory ROM, Un-Root, and update until you cannot update any more, then return to this tutorial afterwards.
Prerequisite Two: Ensure your OnePlus 2 has the latest update of the TWRP or other Custom Recovery. The Latest TWRP for the OP2 can be found here: https://twrp.me/oneplus/oneplustwo.html
Prerequisite Three: Ensure your device can receive files via ADB PUSH while in custom recovery. To do this, reboot your phone into recovery, connect to PC, hold down the "Shift" key and while holding, right-click in a window containing a file you wish to transfer, and select "Open Windows PowerShell Here" or "Open Command Prompt Here". Use the command "adb push Lin15.zip /sdcard" (remove the quotes, "Lin15.zip" is an example file) to push the file onto your device. Then, if your custom recovery has a file explorer as TWRP does, use it to navigate to /sdcard and see if the file is there. Also, your windows should show a successful transfer and should say "Okay" underneath your command line. If unsuccessful, install OnePlus 2 Drivers along with Universal ADB drivers and then try again. If still unsuccessful, try TWRP 3.1.1-0 (Download Link Below 2 Paragraphs in Blue Text Section). If unsuccessful at this point, there is something wrong as Win 10 with OP2 Drivers, Universal ADB Drivers, and TWRP 3.1.1-0 is my exact setup.
There are many custom ROMs available for the OP2. The method for installing custom ROMs is generally the same, but can differ in certain ways. This method SHOULD work for your custom ROM, but is not guaranteed. If this method fails, then visit your custom ROM's development page, and follow their instructions instead.
In this Example, I will be installing the latest (at the time of writing) Lineage 15 Android Oreo 8.0 Third Alpha Build OS/ROM and will be including instructions for the proper installation of the A.R.I.S.E. Magnum Opus System Sound Mod (Based on Viper4Android). I will include links to downloads, but their main XDA page can be found here: https://forum.xda-developers.com/android/software/r-s-e-sound-systems-auditory-research-t3379709 This installation will use the latest (at the time of writing) TWRP 3.1.1-0 Custom Recovery.
INSTALL TIME:​
Begin by rebooting into recovery. Under "Wipe" options, you will first want to format data, select the option and type "yes" when prompted to confirm the operation. Repeat this step once again to ensure a squeaky clean wipe.
Next, also under "Wipe" Options, select the "Advanced Wipe" Options. You will then select EVERY BOX (Yes, this includes Internal Storage and will wipe EVERY SINGLE FILE from your device, this is INTENTIONAL and is why you MUST have a device that can accept ADB PUSH files in recovery!). This will wipe every file from existence, completely. This is what allows such a stable, squeaky clean install, as not a single piece of evidence from any other ROM/OS will be left behind, leaving basically no chance for errors or conflicts during installation of new ROM. You will want to complete this step again to ensure a squeaky clean wipe.
Navigate to the TWRP Home/Start-Up Screen and connect your device to your PC (WARNING: DO NOT USE ADB SIDELOAD MODE!!! I HAVE NEVER, EVER HAD A SUCCESSFUL ROM INSTALL FROM SIDELOAD!!!). Simply leave the device at this screen, and do not touch it. At this point, if you do not have all the necessary files to install your custom ROM and mods, you will need to download them now. I ALWAYS recommend the "Pico" Gapps package if installed in a ROM (some ROMs include Gapps). The reason for this is because the Pico package includes the bare minimum to get Google Play Services and Google Play Store up and running. This eliminates unwanted Gapps and reduces the chance of installation conflicts. The golden rule is: The less you install in TWRP, the better. If you want more Gapps, then after setting up the phone at the end of the ROM install, just search for them in the Google Play Store, its how I get mine every time. In the case of Lineage 15, the list of downloads is below:
Lineage 15 OS/ROM: https://www.androidfilehost.com/?fid=961840155545594199 (Dev Page: https://forum.xda-developers.com/oneplus-2/development/rom-lineageos-15-0-t3668056)
Android Oreo 8.0 Pico Gapps Package: https://www.androidfilehost.com/?fid=817550096634796662
Super SU 2.82 Root Installer (Select the Flashable 2.82 ZIP file): http://www.supersu.com/download
BusyBox Flashable Zip Package (Large page with many tools, scroll down to find the BusyBox tool): https://forum.xda-developers.com/showthread.php?t=2239421
A.R.I.S.E. Magnum Opus System Sound Mod (Select the "ARISE+Deuteronomy+2.94+Modular+AROMA+Installer.zip" Option): https://www.androidfilehost.com/?w=files&flid=176171
Once all necessary files are downloaded, give them their own folder inside Windows and rename all of them to something simple as shown here:
View attachment 4273530
(Lin15.zip, Gap.zip, SU.zip, Busy.zip, Arise.zip)
Ensure your device is in custom recovery at the home/startup screen and is plugged firmly into your PC. DO NOT navigate ANYWHERE inside custom recovery or touch the device.
Now we will ADB PUSH these fresh install ZIP files over to your device. Inside the window containing your downloaded ROM files, hold down the "Shift" key and while holding, right-click and select "Open Windows PowerShell Here" or "Open Command Prompt Here". To ADB PUSH files, simply type "adb push FILE.zip /sdcard" where "FILE" is the target file and "/sdcard" is the target destination. Correct capitalization of letters is IMPORTANT! My window looked like this when finished:
View attachment 4273532
(adb push Lin15.zip /sdcard, adb push Gap.zip /sdcard, adb push SU.zip /sdcard, adb push Busy.zip /sdcard, adb push Arise.zip /sdcard)
Your ROM files should now appear on your device at your target destination. Disconnect your device and use the Custom Recovery File Explorer to navigate to the destination to confirm. "/sdcard" is the easiest to use destination.
Now we will install ALL of the ROM files, back-to-back with NO REBOOTS, NO WIPES, NO OPERATIONS WHATSOEVER INBETWEEN INSTALLS, THIS IS EXTREMELY IMPORTANT!!! Navigate to the Custom Recovery "Install" Section and navigate to your destination for your files. Flash the ZIP files in this order EXACTLY: Lin15, Gap, SU, Busy, Arise.
The A.R.I.S.E. Instillation is an AROMA style installer. It is a HUGE Sound Mod suite containing many options. Select the sound mods you like, but there is a module that is REQUIRED and 4 others that are highly recommended, listed below:
CORE Module is REQUIRED!!! Uninstall MusicFX, Remove Deep_Buffer, Set SELinux to Permissive, and SD Card Permissions fix are all highly recommended no matter what the ROM or mods, just in case. If these problems do not exist, selecting the options will not change anything, so do not worry.
My personal A.R.I.S.E. install included the following modules and delivers absolutely AMAZING sound quality while keeping installed modules to a minimum (otherwise known as a "Lightweight" install): Core Module, Viper4Arise 2.5.0.5, Viper4Arise Profiles, Uninstall MusicFX, Remove Deep_Buffer, Set SELinux to Permissive, and SD Card Permissions Fix. Its a highly recommended package
ONLY AFTER ALL FILES HAVE BEEN INSTALLED, navigate to Custom Recovery "Wipe" section, select "Advanced Wipe" and then check the "Dalvik Cache" and "Cache" options, DO NOT SELECT ANYTHING ELSE OR YOU WILL NEED TO START COMPLETELY OVER, WIPE PHONE AND RE-ADB PUSH FILES TO ENSURE A SQUEAKY CLEAN INSTALL!!! Perform this step again to ensure a squeaky clean wipe.
YOU ARE NOW FINISHED WITH A SQUEAKY CLEAN ROM INSTALL BUT THERE ARE A FEW MORE RECOMMENDED STEPS!
Recommended: DO NOT immediately reboot into system after install. Instead, navigate to Custom Recovery "Reboot" Section and select "Power Off" Instead. Once device is off, plug into A/C Outlet charger (DO NOT USE A PC, DETECTION OF PC WILL CAUSE DEVICE TO BOOT), and allow to fully charge, then cool off. This will ensure that Battery Calibration is set to 100% upon Initial Boot
Initial Boot: Boot Device, Initial boot will take around 5-10 minutes. DO NOT TOUCH THE DEVICE DURING THIS TIME. When you see the startup screen, STILL DO NOT TOUCH THE DEVICE! Instead, allow device to sit and idle, allowing the ROM to "Settle" for a MINUMUM of 5 minutes, 10 is recommended. Then, BEFORE setting up the device, reboot and allow another 5 minutes of "settling".
Run through the Device Initial Setup. You will want to select any desired options now, and avoid having to search settings later. Once at Device Home Screen, immediately open app drawer and select SuperSU app. Inside SuperSU, navigate to settings and apply the following options:
Disable Re-Authentication, Default Access: Grant, Enable SU During Boot, Trust System User
These SuperSU options will allow mods to function with complete stability and no interference, leading to a smoother experience. After, completing this step, Reboot your phone and ENJOY YOUR NEW, ROCK-SOLID, STABLE ROM INSTALL!!!
Nice job bro thanks working here!
Nopes. It did not work out for me. I flashed ROM, Gapps, and Magisk before and landed on your thread and flashed only the ARISE zip. But it did not flashed properly and I got an error 1 or something like that. What could be the reason?
Why are people recommending using adb push to get the files on the phone.
I always just drag and drop them on the phone in windows explorer, never had any problems.
Only time I ever need adb is for flashing recovery.
shailinder said:
Nopes. It did not work out for me. I flashed ROM, Gapps, and Magisk before and landed on your thread and flashed only the ARISE zip. But it did not flashed properly and I got an error 1 or something like that. What could be the reason?
Click to expand...
Click to collapse
Now I tried it again and this time flashed busy box as well but the same error.
Screen shot for your reference. Is there another way to install it?
shailinder said:
Nopes. It did not work out for me. I flashed ROM, Gapps, and Magisk before and landed on your thread and flashed only the ARISE zip. But it did not flashed properly and I got an error 1 or something like that. What could be the reason?
Click to expand...
Click to collapse
Error 1 is what occurs on the non-AROMA older A.R.I.S.E. package install if you have not set up any settings in the customizable .prop file that comes with the ZIP. Upon initial install, this "Error 1" will install a .prop file under /sdcard. If you open this .prop file with a text editor, you can then use examples such as "install.core=true" to install the core. However, the AROMA installer requires none of this. And as far as I experienced, NONE of the other packages work on Lineage 15. You will want to delete whatever A.R.I.S.E. zip you have now, and follow my download link for the AROMA version. Then, wipe everything and perform a "Squeaky Clean" ROM install as shown in this thread, and it should work and be rock-solid stable.
pops106 said:
Why are people recommending using adb push to get the files on the phone.
I always just drag and drop them on the phone in windows explorer, never had any problems.
Only time I ever need adb is for flashing recovery.
Click to expand...
Click to collapse
Well we all know performing this method of install is not a requirement for installing ROMs, but it is the most fool-proof method and ensures there are no file conflicts between old and new ROMs/OS's. I cannot even tell you how many times I have done quick, minimal work installs and end up with tons of errors, laggy or freezing screens at random times, force closing apps, busybox system link failures, the list goes on and on. After using the "Squeaky Clean" method, I can honestly say Lineage 15 is as stable as the Stock/Factory Oxygen OS.
wallacengineering said:
Error 1 is what occurs on the non-AROMA older A.R.I.S.E. package install if you have not set up any settings in the customizable .prop file that comes with the ZIP. Upon initial install, this "Error 1" will install a .prop file under /sdcard. If you open this .prop file with a text editor, you can then use examples such as "install.core=true" to install the core. However, the AROMA installer requires none of this. And as far as I experienced, NONE of the other packages work on Lineage 15. You will want to delete whatever A.R.I.S.E. zip you have now, and follow my download link for the AROMA version. Then, wipe everything and perform a "Squeaky Clean" ROM install as shown in this thread, and it should work and be rock-solid stable.
Click to expand...
Click to collapse
Thanks. I got it install using a different method and it is working wonderfully.
wallacengineering said:
Error 1 is what occurs on the non-AROMA older A.R.I.S.E. package install if you have not set up any settings in the customizable .prop file that comes with the ZIP. Upon initial install, this "Error 1" will install a .prop file under /sdcard. If you open this .prop file with a text editor, you can then use examples such as "install.core=true" to install the core. However, the AROMA installer requires none of this. And as far as I experienced, NONE of the other packages work on Lineage 15. You will want to delete whatever A.R.I.S.E. zip you have now, and follow my download link for the AROMA version. Then, wipe everything and perform a "Squeaky Clean" ROM install as shown in this thread, and it should work and be rock-solid stable.
Click to expand...
Click to collapse
Fair enough
And thanks to the opp for the thread
pops106 said:
Fair enough
And thanks to the opp for the thread
Click to expand...
Click to collapse
No problem, the thread was a random idea after accidentally stumbling across the fact that TWRP can accept ADB PUSH files. I honestly had no idea, and was stuck in a bootloop after a custom ROM failed to install correctly. I had no backup and was getting ready to just give up, enter Qualcomm Diagnostics Mode and perform the Oxygen OS Firmware/Software OEM install when I decided to reboot into Recovery and attempt SideLoad of a previous ROM that had worked.
This did not work, as sideload is apparently a dumb way of doing things. I never understood why sideload tries to install a file that is in the middle of transferring. Just seems like a flawed concept to me. Anyways the install was very slow, buggy and laggy, and when finished had installed such a corrupt system, due to installing a partially transferred file while it is being transfered and then sticking all the pieces together, was so unstable that more than a minute idling at the home screen or any attempt to open ANY app caused the phone to reboot.
Sideload is a worthless feature in my opinion and I will never use it for any operation ever again so long as I live. So all of a sudden I decide to plug the phone into my PC while in recovery and observe how Windows detects the phone when you turn Sideload mode on and off, as to try and troubleshoot my sideload to get an effective install (which by the way will never happen, to this day I have never had a sideload install work correctly), and noticed when I turned it off, the device still showed up as a recognized Android device under Windows Device Manager. Then, you may not believe me on this, but I did actually randomly decide that more than likely, it was interfaced on Universal ADB, and that it I typed "adb devices" into a windows command prompt, it should show, and it did. The rest is history.
I know the feature had been around for some time as I found out later on, but I had never seen any information about it anywhere on any thread, and even when I asked for ideas for troubleshooting, while XDA users helped for sure, I guess they just didnt have that idea, and gave me alternative routes as well such as the Qualcomm Diagnostics full OEM wipe method which I was already familiar with. This does show, however; that experimenting and troubleshooting on your own can be a great way to learn new things!
Hi, thank you for the post.
I am enjoying v4a bcoz of you only.
I got a query btw, can I install dolby & atmos along with v4Arise?
Please add a note for HaruhiOS
HaruhiOS checks if a clean flash is required before flashing and will abort to tell the user that a clean flash is necessary if ever. It is my design goal to avoid the need for clean flashing as much as possible
Due to this the user should avoid unnecessary clean flashing, which actually ruins performance and battery life and reduces device health when using my ROM
if already.....
hey,
if one would already go thus far to wipe internal storage as well, i'd say that it's making sense to format storage by changen from ext4 to ext2 and back to ext4. wiping is not always getting us rid of all residues while changing the file system and going back to the one we want/need does indeed reformat everything, this is a procedure that is useful once the storage card is corrupted.
magnamentis said:
hey,
if one would already go thus far to wipe internal storage as well, i'd say that it's making sense to format storage by changen from ext4 to ext2 and back to ext4. wiping is not always getting us rid of all residues while changing the file system and going back to the one we want/need does indeed reformat everything, this is a procedure that is useful once the storage card is corrupted.
Click to expand...
Click to collapse
Apparently e2fsck and fsck.f2fs is too hard
Once the storage card is corrupt no formatting will help you anyways
Just stop believing in dumb stuff. If you have to clean flash every other build a ROM developer releases they messed up big time and they should fix their code

Decrypt - Tweaks - & more

I thought id put together a thread with all my main tweaks and modifications to allow our device to perform better
lets start!
Decrypt
this ones an easy one - flash noverity and decrypt and you're on your way right?
i took this a step further and modified the boot.img for 4.7.6 to remove encryption and verity and added some mount flags
the flags ive added are:
noatime - noauto_da_alloc - nodiratime - data=writeback - barrier=0 - nobh
you can google to find out more information about these flags, but they all deliver top performance with minimal risk (possible risk: sudden power off may result in data loss)
How to
easy! *required /data to be formatted if you are not already decrypted
flash the modified boot image: https://drive.google.com/open?id=1WItoR1ifuCRYXwBvzBdis3hUnCftlUd-
format /data
flash supersu / magisk if you were rooted otherwise stay stock
if you want to flash a kernel you need to replace the fstab.qcom with the modified version (to do this open the kernel zip and paste over the fstab.qcom)
kernel fstab.qcom: https://drive.google.com/open?id=1XRI5EWwREnvxCVWrjY4FFu1PQs1bbUje
Disable journaling completely
my favourite tweak - disables journaling
How to
i like doing this before first boot but you can do it whenever really
ideally in TWRP
first, explorer /dev/block/
for every file you see in /dev/block you add tune2fs -O ^has_journal before it
so for example, if /dev/block has a file called sdd01
you will type: tune2fs -O ^has_journal /dev/block/sdd01 in TWRP terminal
and so on for sdd02 etc etc (or you can create a script to do this for you) it will not succeed on all blocks as some dont have this features.
DOES NOT WORK ON 5T FOR SOME REASON WILL NOT BOOT INTO OS AFTER THIS IS DONE
Misc tweaks
some other tweaks i have not tested to see if they're working on the 5T
but here they are
How to
Scripts (you can run on boot or on demand):
fstrim (requires busybox): https://drive.google.com/open?id=1MSqvVlOr59Y8y-3DiJ3Snms_rEvJWVzX
sqlite vaccum and reindex database: https://drive.google.com/open?id=1NcW33rvoInQPSx9w8RcQ__GC_5Vhv-6a
also requires this file in xbin: https://drive.google.com/open?id=1p2COCUjhiAaIjyZjV84EmvUgntp0_bdi
zipalign: https://drive.google.com/open?id=1wWyfoy6QuVCtwUUkI9TVrobNbv7Kset8
also requires this file in xbin: https://drive.google.com/open?id=1K25bOrA7eVUacHEVrHNN2At6D-Dnfgmi
mark disk as non-rotational,disable iostats, simple iomerges no hash lookup, rq_Affinity set to 2 - best for multitasking uses all cores to complete request instead of cpu 'group' : https://drive.google.com/open?id=1YJ5GHGqwl8tzxvRyEGYINPIp4zdHUgTd
Stock Boot 4-7-6
https://drive.google.com/open?id=1OQKJB9gRj2SG7WS9J-ucuUaWmqPn1gMl
Stock Boot 4-7-6 no flags, decrypt no verity
https://drive.google.com/open?id=1gXYYw7E2fzSRkh2J-1hZIS4EH34zeBPT
if anyone has any other tweaks they'd like to share ill be sure to add them in!
THIS WORK IS OPEN TO ANYONE FOR USE
FREE KNOWLEDGE FOR ALL​
Thank for the tips, could you post the boot img for 4.7.6 with out the flags being set.
freegame619 said:
Thank for the tips, could you post the boot img for 4.7.6 with out the flags being set.
Click to expand...
Click to collapse
updated OP
Hi @virtyx
I'm sorry I'm hijacking this thread but I can't find answers to my questions anywhere.
Why would you decrypt the phone ? Why is useful ? Does TWRP can't read from the sdcard partition if the phone is encrypted ? What can't you do with an encrypted phone ?
Everybody is talking about decrypting the phone but nobody says why is it for.
raptor2003 said:
Hi @virtyx
I'm sorry I'm hijacking this thread but I can't find answers to my questions anywhere.
Why would you decrypt the phone ? Why is useful ? Does TWRP can't read from the sdcard partition if the phone is encrypted ? What can't you do with an encrypted phone ?
Everybody is talking about decrypting the phone but nobody says why is it for.
Click to expand...
Click to collapse
in my experience decrypting makes the phone perform better (people will argue it makes no difference) but every time ive done it i notice improvement.
twrp is fine for reading the sdcard, decrpytion has its benefits but also drawbacks (easier to hack, etc) you can do the research yourself, but there are benchmarks showing the differences (mainly reads are affected)
if you're smart with your phone (i.e dont download suspicious stuff) you should be fine without encryption.
ive never had it on, except when i cant turn it off
raptor2003 said:
Hi @virtyx
I'm sorry I'm hijacking this thread but I can't find answers to my questions anywhere.
Why would you decrypt the phone ? Why is useful ? Does TWRP can't read from the sdcard partition if the phone is encrypted ? What can't you do with an encrypted phone ?
Everybody is talking about decrypting the phone but nobody says why is it for.
Click to expand...
Click to collapse
To run decrypted ROMs mainly. I see no other reason but im curious too
Since some ROMs can only boot if you are decrypted i guess it's that
Did a very quick lookup of that journaling business and it sounds interesting. Have you noticed much of a difference in performance on vs disabled?
virtyx said:
updated OP
Click to expand...
Click to collapse
I was mentioning about the boot img without the flags being set not the one without the encryption turned off.
freegame619 said:
I was mentioning about the boot img without the flags being set not the one without the encryption turned off.
Click to expand...
Click to collapse
oh ok sorry i thought you meant stock boot.img
updated.
showofdeth said:
Did a very quick lookup of that journaling business and it sounds interesting. Have you noticed much of a difference in performance on vs disabled?
Click to expand...
Click to collapse
definitely found better responsiveness with it disabled, and multitasking is much better
Can u help me to create script for disabling journal? I had 100 files on block folder ?
Oh and also, can I flash ur modified boot.img on 4.7.5? Because I haven't got system update to 4.7.6. it would be troubling me if I had to reflash the whole 4.7.6 rom since I had around 300 apps installed. Thanks before btw
andrizmitnick said:
Can u help me to create script for disabling journal? I had 100 files on block folder
Oh and also, can I flash ur modified boot.img on 4.7.5? Because I haven't got system update to 4.7.6. it would be troubling me if I had to reflash the whole 4.7.6 rom since I had around 300 apps installed. Thanks before btw
Click to expand...
Click to collapse
Shouldn't have a problem booting 476 on 475 but you need to test
virtyx said:
oh ok sorry i thought you meant stock boot.img
I am on OB1 oreo, encrypted, oreo compatible twrp, rooted with magisk 15.2, the boot image available here are for nougat, is it possible you can do it for oreo, or any help towards this, thanks for your help, Regards.
Click to expand...
Click to collapse
vtec303 said:
virtyx said:
oh ok sorry i thought you meant stock boot.img
I am on OB1 oreo, encrypted, oreo compatible twrp, rooted with magisk 15.2, the boot image available here are for nougat, is it possible you can do it for oreo, or any help towards this, thanks for your help, Regards.
Click to expand...
Click to collapse
when I get time I'll look for the oreo boot img
Click to expand...
Click to collapse
virtyx said:
vtec303 said:
when I get time I'll look for the oreo boot img
Click to expand...
Click to collapse
ok thanks mate, cheers.
Click to expand...
Click to collapse

Tarb, A Backup Solution for Android, With Recovery Mode Support

Backup/restore apps and respective data, SSAIDs, runtime permissions, generic system settings, Magisk modules, and more.
Works in recovery mode as well.
Refer to the upstream repository to get started.
I would like to be the first to thank you for this solution, i have one question how to make a full backup all accounts and data i saw in the guide tarb -badsm10 . but im not sure if its full backup or no
yassine2217 said:
I would like to be the first to thank you for this solution, i have one question how to make a full backup all accounts and data i saw in the guide tarb -badsm10 . but im not sure if its full backup or no
Click to expand...
Click to collapse
tarb -badsm10 . would backup the following:
a) All user and updated system APKs;
d) Data of those apps (also includes device-encrypted data (user_de), which can be excluded with D);
s) Generic system settings (quick toggles, sounds, display, etc.);
m) Magisk data (everything from /data/adb/, except magisk/ and magisk.db);
10) This instructs tarb to use 10 as the zstd compression level (default is 1);
This is a complete backup, except if you also want external data. If so, you would add the e flag.
External data includes /sdcard/Android/data/, /sdcard/Android/media/ (can be excluded with M), and /sdcard/Android/obb (can be excluded with O).
Note: backing up Google accounts on recent Android versions is just not a thing. You could try, but there's no guarantee that the restore will work. It may even cause problems. The target data keeps changing with new Android releases, and those changes are fairly unpredictable -- all thanks to Google, yay!
Cool, so this will replace Migrator right
VR25 said:
tarb -badsm10 . would backup the following:
a) All user and updated system APKs;
d) Data of those apps (also includes device-encrypted data (user_de), which can be excluded with D);
s) Generic system settings (quick toggles, sounds, display, etc.);
m) Magisk data (everything from /data/adb/, except magisk/ and magisk.db);
10) This instructs tarb to use 10 as the zstd compression level (default is 1);
This is a complete backup, except if you also want external data. If so, you would add the e flag.
External data includes /sdcard/Android/data/, /sdcard/Android/media/ (can be excluded with M), and /sdcard/Android/obb (can be excluded with O).
Note: backing up Google accounts on recent Android versions is just not a thing. You could try, but there's no guarantee that the restore will work. It may even cause problems. The target data keeps changing with new Android releases, and those changes are fairly unpredictable -- all thanks to Google, yay!
Click to expand...
Click to collapse
Thank you for the clear explaination
v2022.5.12 202205120
- C flag: exclude all *[cC]ache* files/directories globally (alternative to -X '*[cC]ache*');
- Do not backup/restore SSAIDs if /data/system/users/0/settings_ssaid.xml is encrypted;
- Updated info and support texts.
Try upgrading with tarb -u.
v2022.5.15 202205150
- Fixed -rnx ['regex'];
- -r shall have no fallback regex, just like -b;
- Skip GMS data backup/restore.
Try upgrading with tarb -u (interactive) or tarb -uu (no prompts).
v2022.5.16 202205160
- Fixed "backup/restore stops right after gms";
- Remind user to disable/remove Magisk modules that may cause bootloop;
- Updated Telegram group link.
v2022.5.25 202205250
- Architecture-aware self-backup
- Build script gets version from changelog
- Fixed `-rnx ['regex']`
- Fixed settings backup output inconsistencies
v2022.6.4
- cf899cd Remove debugging line, and reword a comment
- f8fdb0f Update help text
- bae6a39 C == "-X [Cc]ache" (non-greedy)
- 9a9138e Always exclude external cache
- 6d29dd6 Only restore SSAIDs and runtime perms after successful data restore
- fb0d1e9 Fix build/VERSION
Hello, I tried using this and I'm not having success. I installed as a Magisk Module with the -m flag and rebooted afterwards. Installed the arm64 as I have the SD855.
When I run the command tarb -badsm10 I get the following:
settings global
settings secure
settings system
/data/adb
Click to expand...
Click to collapse
And on the tarb folder I get a file with 30MB, that's all.
Thanks!
jakito said:
Hello, I tried using this and I'm not having success. I installed as a Magisk Module with the -m flag and rebooted afterwards. Installed the arm64 as I have the SD855.
When I run the command tarb -badsm10 I get the following:
And on the tarb folder I get a file with 30MB, that's all.
Thanks!
Click to expand...
Click to collapse
Perhaps the period is missing at the end of command line. Write command as follows:
tarb -badsm10 .
cave.man1908 said:
Perhaps the period is missing at the end of command line. Write command as follows:
tarb -badsm10 .
Click to expand...
Click to collapse
Yes, that worked. My bad!
Thank you
Edit: fixed
How do you use this in recovery? This works for a12 and a12 recoveries?
parag0n1986 said:
How do you use this in recovery? This works for a12 and a12 recoveries?
Click to expand...
Click to collapse
Only custom recoveries that can decrypt data are supported.
If you've installed tarb as a Magisk module (-m), /data/t is available for use in recovery.
Run /data/t -badems ..
It'll backup (-b):
* All user and updated system apps (a) with respective data (d) and external data (e), excluding cache;
* Magisk modules (m);
* Generic system settings (s).
If you haven't installed it, assuming it's located in /sdcard/Download, run sh /sdcard/Download/tarb-arm64 -badems ...
Use adb shell or recovery's own terminal.
v2022.6.25
ece9f5c Add Zelle donation info
e667f34 Add support for -bnx 'regex'
b1d3484 Remove obsolete lines
2e50b94 Fix: incomplete apk backup
5b268d9 Flag D implies d; M/O imply e
d898768 Make "o" flag work with "-b" as well
9715bbb Update usage examples
ff40224 Exclude internal cache by default
VR25 said:
Only custom recoveries that can decrypt data are supported.
If you've installed tarb as a Magisk module (-m), /data/t is available for use in recovery.
Run /data/t -badems ..
It'll backup (-b):
* All user and updated system apps (a) with respective data (d) and external data (e), excluding cache;
* Magisk modules (m);
* Generic system settings (s).
If you haven't installed it, assuming it's located in /sdcard/Download, run sh /sdcard/Download/tarb-arm64 -badems ...
Use adb shell or recovery's own terminal.
Click to expand...
Click to collapse
So if I'm on an a12 custom ROM, I would have to flash DFE so I am unencrypted and this should work? I've tried DFE on a couple of the 12.1 ROMs and it doesn't work any ideas to get it unencrypted on all these new rooms? I'm assuming I have to use TWRP I didn't know if any of these a12s have a terminal yet
parag0n1986 said:
So if I'm on an a12 custom ROM, I would have to flash DFE so I am unencrypted and this should work? I've tried DFE on a couple of the 12.1 ROMs and it doesn't work any ideas to get it unencrypted on all these new rooms? I'm assuming I have to use TWRP I didn't know if any of these a12s have a terminal yet
Click to expand...
Click to collapse
Android ROMs almost never ship with a terminal emulator. You can always install one or just use adb shell.
Modern custom recoveries (TWRP and derivatives) all have a built-in terminal.
Some recoveries can decrypt data.
When this is not the case, one must disable forced encryption to be able to read /data from recovery (mandatory for tarb to work there).
If Magisk cannot disable encryption, you have to patch /vendor/etc/fstab* file(s). This is usually just a matter of replacing "fileencryption=" with "encryptable=", rebooting, and formatting (not just wiping) the userdata partition.
VR25 said:
Android ROMs almost never ship with a terminal emulator. You can always install one or just use adb shell.
Modern custom recoveries (TWRP and derivatives) all have a built-in terminal.
Some recoveries can decrypt data.
When this is not the case, one must disable forced encryption to be able to read /data from recovery (mandatory for tarb to work there).
If Magisk cannot disable encryption, you have to patch /vendor/etc/fstab* file(s). This is usually just a matter of replacing "fileencryption=" with "encryptable=", rebooting, and formatting (not just wiping) the userdata partition.
Click to expand...
Click to collapse
So basically, using ADB shell while you're in nameless or Evo X recovery, for example, is just like using the built-in TWRP terminal? Just need ADB enabled in recovery mode?
How do I have magisk disable encryption? I've noticed when you flash magisk, It usually shows keep verity and force encryption = true. How do you make magisk disable them when you first flash magisk?
Sorry about all the questions, just really want to learn this stuff more, and you're amazing for explaining this stuff! I miss being able to backup/restore data nandroid style!
One last question. You said manually patch /vendor/etc/fstab.qcom? Do you replace anything that says file encryption with encryptable, or only in the /userdata area in the fstab? Here is what mine says. Would love to know what change in there and put it back and reformat and be unencrypted on a12!
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt latemount,wait,check,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,metadata_encryption=aes-256-xts:wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption,quota,reservedsize=512M,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc,checkpoint=fs
That's line #45 in my fstab.qcom file. So from that, my current ROM is FBEv2? And f2fs format for data?

Categories

Resources