Phone manufacturers hate it! Get true adoptable storage with this trick! - Xiaomi Mi A1 Guides, News, & Discussion

Joke title aside, I had an idea for getting unencrypted and thereby instantly mounting sdcard as internal storage.
The idea is simply going inti the fstab and simply changing the entry for /data into
Code:
/dev/block/mmcblk1p1
. This requires the sdcard to be freshly formatted I think (probably in either ext4 or f2fs)
Going even further, we could get back the internal storage and make it appear as an external sdcard, so it's not totally wasted. (In theory, maybe I'm overlooking something). For now, it's not in the modified fstab.
Only do this if you don't have anything to lose on the phone and on the sdcard
Here's the modified fstab. Would be interesting to see if someone could test it. Copy and paste the text in the spoiler into a new file called fstab.qcom (make sure to save in Linux line breaks if you're on Windows).
Make sure to make a backup of /system/vendor/etc/fstab.qcom before proceeding via adb pull or some other method.
Reboot to TWRP
Again, make sure you have backed up the file you're about to overwrite
Do adb push fstab.qcom /system/vendor/etc/
Reboot
See what happens
Spoiler
Code:
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,slotselect
/dev/block/mmcblk1p1 /data f2fs nosuid,nodev,noatime,discard,fsync_mode=nobarrier wait,check,encryptable=footer,quota
/dev/block/mmcblk1p1 /data ext4 nosuid,nodev,noatime,noauto_da_alloc wait,check,encryptable=footer,quota,formattable
/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 nosuid,nodev,noatime wait,check
/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev wait
/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
/dev/block/bootdevice/by-name/config /frp emmc defaults defaults
#/devices/platform/soc/7864900.sdhci/mmc_host* auto auto defaults wait,voldmanaged=sdcard1:auto,noemulatedsd,encryptable=userdata
/devices/platform/soc/7000000.ssusb/7000000.dwc3/xhci-hcd.0.auto* auto auto defaults wait,voldmanaged=usb:auto
#/dev/block/zram0 none swap defaults zramsize=536870912,max_comp_streams=8
Looking forward to hearing from someone if it worked and how the performance is.

Good Luck with testing.

"Phone manufacturers hate it! Get true garbage I/O performance with this trick!"

Emmc memory is much faster than sd-cards and even more importantly it's much more failproof than the regular consumer grade sd-card. But if low on storage for apps, sure

flex1911 said:
"Phone manufacturers hate it! Get true garbage I/O performance with this trick!"
Click to expand...
Click to collapse
Wel it wasn't intended to be a serious mod. I'm mostly just curious if it works and need a guinea pig as I can't afford wiping my phone right now ?

flex1911 said:
"Phone manufacturers hate it! Get true garbage I/O performance with this trick!"
Click to expand...
Click to collapse
LOL :laugh::laugh::laugh:

Related

getting stock rooted Calkulin rom converted to data/cache f2fs

@Calkulin (because you uploaded the rom)
@katinatez (because you are good folk)
@zaphodbeeb (becasue you are the one that taught me to convert to mixed partitions)
hoping to get some help on this for me and others wanting to try out the update.
i am trying to get the rooted 05q to work on my mixed f2fs/etx4 partitions. data/cache f2fs - system etx4 so i don't have to wipe my /data partition.
i have gone through several routes so far to no avail. sideloading/flashing. flashing the ak 113 kernel with instructions for the new update. updated to the new katinatez philz with the new f2fs comits.
1. updater script - i did not see a need in changing the /data to use busybox for f2fs as the line of code is already there.
2. fstab.bacon - i used zaphods new f2fs all or f2fs mixed
Code:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/system /system f2fs ro,noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,errors=panic wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/reserve4
/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait,nonremovable,encryptable=/dev/block/platform/msm_sdcc.1/by-name/reserve4
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
/devices/platform/xhci-hcd auto vfat defaults voldmanaged=usbdisk:auto
at first i just flashed the the new extras file (firmware modem linked with Calkulin's rom. then flashed the rom. i got stuck on the bootanimation for ten minutes.
then i thought it might be the kernel not 'jiving' with f2fs. so i sideloaded the ak_113 (on top of what i had already done) with the instructionsfrom @xlollomanx (thanks) linked from the ak kernel thread.
still.... stuck on cyanogen boot for ten minutes
then i restored my backup and sideloaded everything, ak kernel and all, from scratch.
once again... grrr. still stuck on boot animation for ten minutes.
any ideas on what i can do?

[RECOVERY][TWRP][ROOT] Ulefone Power

I've created TWRP 3.0.2 from sources (to be honest - only TWRP, Kernel is prebuilt from Stock ROM)
HowTo Flash TWRP
http://ulefone.com/download/power.html (no root required)
Or extract twrp.img from zip File and use Apps like Flashify (root required)
HowTo gain root
After this you can Flash flash SuperSU via TWRP:
http://forum.xda-developers.com/showthread.php?t=1538053
Thanks to
 @BlueFlame4
Nice!
Perfect thanks!!!
Thanks for your work.
Are you able to create a twrp for the ulefone power 2, if I provide you a scatter file of the power 2 stockrom?
I already tried it myself but ended up in many bootloops.
Greetings
Good evening.please help me.i want to uninstall custom recovery twrp (teamwin) can you tell me how to uninstall in order to install the official one?
kraftmaschine said:
Thanks for your work.
Are you able to create a twrp for the ulefone power 2, if I provide you a scatter file of the power 2 stockrom?
I already tried it myself but ended up in many bootloops.
Greetings
Click to expand...
Click to collapse
After I unlocked the bootloader, I tried to port TWRP from Oukitel k6000 plus since both have same chipset MT6750T and same resolution. I tried to follow this guide on youtube video using Carliv Image Kitchen. But I failed. Heck, I tried to flash the k6000 plus recovery and nothing. Not even boot loops , the stock recovery still shows up.
Edit: I was partially successful. I was able to get to TWRP but touch screen not working. I connected a mouse and was able to change the Russian language of the original k6000+ TWRP port. But what is not working is the mounts of partitions. I tried to copy the mount points from fstab.mt6755 which is in stock recovery to the new port. But the new port doesn't have such file, instead it has goldfish fstab files, I tried editing them manually to match them, but it didn't work.
This is just a stab in the dark. If anyone know how to fix partition mounts and why touch screen not working, I would be grateful.
I replaced recovery.fstab from stock to the ported one also replaced default.prop.
fstab.mt6755 <- That comes with stock recovery
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/system /system ext4 ro wait,verify
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/userdata /data ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check,resize,forceencrypt=/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/metadata
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/protect1 /protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/protect2 /protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/nvdata /nvdata ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check,formattable
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/frp /persistent emmc defaults defaults
/devices/mtk-msdc.0/11230000.msdc0* auto vfat defaults voldmanaged=sdcard0:auto
/devices/mtk-msdc.0/11240000.msdc1* auto vfat defaults voldmanaged=sdcard1:auto,encryptable=userdata
/devices/soc/11270000.usb3_xhci* auto vfat defaults voldmanaged=usbotg:auto
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/nvram /nvram emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/proinfo /proinfo emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/lk /bootloader emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/lk2 /bootloader2 emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/para /misc emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/boot /boot emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/logo /logo emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/expdb /expdb emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/secro /secro emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/seccfg /seccfg emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/md1img /md1img emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/md1dsp /md1dsp emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/md1arm7 /md1arm7 emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/md3img /md3img emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/ppl /ppl emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/tee1 /tee1 emmc defaults defaults
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/tee2 /tee2 emmc defaults defaults
Click to expand...
Click to collapse
fstab.ranchu <- That comes with Oukitel k6000+ TWRP recovery
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/vda /system ext4 ro wait
/dev/block/vdb /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
/dev/block/vdc /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
#/devices/platform/goldfish_mmc.0 auto vfat defaults voldmanaged=sdcard:auto
Click to expand...
Click to collapse
Also fstab.goldfish <- That comes with Oukitel k6000+ TWRP recovery
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/mtdblock0 /system ext4 ro,barrier=1 wait
/dev/block/mtdblock1 /data ext4 noatime,nosuid,nodev,barrier=1,nomblk_io_submit wait,check
/dev/block/mtdblock2 /cache ext4 noatime,nosuid,nodev wait,check
/devices/platform/goldfish_mmc.0* auto auto defaults voldmanaged=sdcard:auto,noemulatedsd
Click to expand...
Click to collapse
Ulefone Power2 volte is getting enabled.
I am not able to enable volte flag in ulefone power2... Does any one see volte flag as enabled. Even i am not able to root this phone
Please help

Encryption failure

Dears,
I installed TWRP on SM-A530F/DS and flashed no-verity-opt-encrypt-6.0 and formatted data to let the phone boot.
Well, I'd like to re-encrypt the phone like I've always been doing on sammys after TWRP or Magisk installation, but it doesn't work on this phone.
No matter if it's Nougat or Oreo, applying encryption nothing happens and phone crashes backing to lock screen in a minute.
Any suggestions?
Thanks everybody.
Id like to encrpt mine too. Twrp and rooted with magisk. when i try and encrpt it just reboots after a minute. SMA530W
Dear @jcadduono,
sorry to bother, I think this issue is caused by Samsung's firmwares but, in your opinion, could it be related to no-dm-verity patch?
Or, is it possible to edit the patch in order to not to disable encryption?
There's a modification (red color in code), I think operated by the patch, to ramdisk's fstab.
Stock fstab:
Code:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# system and vendor partition will be early-mounted by kernel
/dev/block/platform/13500000.dwmmc0/by-name/SYSTEM /system ext4 ro,errors=panic wait,verify
/dev/block/platform/13500000.dwmmc0/by-name/CACHE /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
/dev/block/platform/13500000.dwmmc0/by-name/USERDATA /data ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,[COLOR="Red"]forceencrypt=footer[/COLOR],quota
/dev/block/platform/13500000.dwmmc0/by-name/EFS /efs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
/dev/block/platform/13500000.dwmmc0/by-name/CPEFS /cpefs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,nofail
# VOLD
/dev/block/platform/13500000.dwmmc0/by-name/HIDDEN /preload ext4 defaults voldmanaged=preload:auto
/devices/platform/13550000.dwmmc2/mmc_host/mmc1* auto vfat defaults voldmanaged=sdcard:auto
/devices/platform/13600000.usb/13600000.dwc3* auto auto defaults voldmanaged=usb:auto
Patched fstab:
Code:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# system and vendor partition will be early-mounted by kernel
/dev/block/platform/13500000.dwmmc0/by-name/SYSTEM /system ext4 ro,errors=panic wait
/dev/block/platform/13500000.dwmmc0/by-name/CACHE /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
/dev/block/platform/13500000.dwmmc0/by-name/USERDATA /data ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,[COLOR="red"]encryptable=footer[/COLOR],quota
/dev/block/platform/13500000.dwmmc0/by-name/EFS /efs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
/dev/block/platform/13500000.dwmmc0/by-name/CPEFS /cpefs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,nofail
# VOLD
/dev/block/platform/13500000.dwmmc0/by-name/HIDDEN /preload ext4 defaults voldmanaged=preload:auto
/devices/platform/13550000.dwmmc2/mmc_host/mmc1* auto vfat defaults voldmanaged=sdcard:auto
/devices/platform/13600000.usb/13600000.dwc3* auto auto defaults voldmanaged=usb:auto
Patch operation sounds correct, but this is the only device that fails in encryption them.
Thank you so much.
It's actually not uncommon for a ROM to not be able to re-enable /data encryption from the regular settings, once disabled manually.
As far as I can tell, no-verity-opt-encrypt-6.0.zip replaces the "must encrypt" flag on /data with a "can encrypt if you want" flag. When you format /data from TWRP after flashing that zip, you obtain a non-encrypted partition, but it should be possible to re-encrypt it.
Have you guys tried encrypting data from the adb shell? Details here: http://niki.hammler.net/wiki/Android_Device_Encryption#Setting_up_encryption
This is also recommended reading: https://source.android.com/security/encryption/full-disk
You should also check the system log to see what goes wrong when you try to activate encryption. This is how: https://android.stackexchange.com/questions/26123/android-boot-up-messages-for-debugging

Permanently Remove TWRP 0mb Error By editing fstab.

#########Concept########
When phone data is encrypted so twrp can't decrypt it and ask for password.
So We need to find a "fstab" named file in "etc" folder and change its "encrypt" word to "decrypt"
This Fstab file is located inside "System" OR "Vendor folder".
Click to expand...
Click to collapse
For TWRP Recovery Users ( who don't have root)
PHP:
Open recovery mode and tap on "Advance>file manager" and go to this path
For Root Users Use any "Root File Manager".
PHP:
Go to "System/etc" path
OR
PHP:
go to "system_root/system/etc
If Fstab isn't available inside "system" then search it in *vendors* folder
PHP:
go to "vendor/etc"
find ("fstab") named file in etc folder.
maybe more than 1 fstab file will be there.
In that condition.
You need to check which one fstab file has partition blocks names like ("system, vendor, userdata) etc.
so just copy this Fstab file to SD card Or anywhere you like, for editing.
###Editing####
Download"Quick Edit Apk" from store.
Open This fstab file using this Quick edit tool and find line which has word like "data" or "userdata".
Something like these two lines.
PHP:
"dev/block/bootdevice/by-name/userdata"
OR
PHP:
"dev/block/bootdevice/by-name/data"
Something like these above lines.
Click to expand...
Click to collapse
Now Find word similar to "Encrypt" in this line.
Change "encrypt" word to "decrypt" of this userdata line.
You will find one of these like words .
Hint
PHP:
"forceencrypt" >>>>>>>>>>>>>>change it to "forcedecrypt"
PHP:
"encryptable" >>>>>>>>>>>>>>>>>change it to "decryptable"
PHP:
"encrypt" >>>>>>>>>>>>>>>>>>>>change it to "decrypt"
PHP:
"encryption" >>>>>>>>>>>>>>>>>>change it to "decryption"
See I Just Change "en" to "de"
Mean ”En”crypt to ”de”crypt
For example on my phone fstab the line was this.
PHP:
/dev/block/platform/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,noflush_merge wait,check,quota,reservedsize=128M,formattable,resize,forceencrypt=/dev/block/platform/bootdevice/by-name/metadata,
You can see, for me the word was "forcedecrypt".
Click to expand...
Click to collapse
After (by-name) the word was "Userdata" .
Click to expand...
Click to collapse
Now I founded both "userdata" and "forceencrypt" and i changed it according to my need.
("Root Users, You have done eding" Now reset you device and enjoy")
### TWRP Users you can continue ###
go back to recovery and copy this edited fstab to
"it's original location (where you found it).
(For me it was founded in vendor/etc path and i pasted this edited fstab there)
after pasting done, then again go to it's original location (Pasted location)(For me it was vendor/etc)
And tap on this edited "fstab" and select on "chmod" option And set permission to 0644 of this file.
wipe your data, internal storage and dalvik-cable.
Reboot
now error is completely gone
Watch this video of you're still confused.
I think this would cause error, if we ever want to re encrypt the device. Just change forceencrypt to encryptable and perform a factory reset. You will have a unencrypted device with encryption option available.
Please Correct me if I am wrong.
Yes, after your device is decrypted then you can again encrypt it by just changing the word from decrypt>>> to "encrypt" and do a factory reset.
The important part is to find the right "fstab" file from (etc) folder located inside system OR vendor directory's.
And change the encrypt word to decrypt and do a factory reset.
Wrong,
Force-encrypt to decrypt.
Riight
Force-encrypt to force-decrypt.
The number of words should be same after changed.
Like "forceencrypt" (12 words) and i changed it to "forcedecrypt" (12 words).
You just need to change en to de.
Understand.
That's a Common sense.
Abdulrehman130 said:
Yes, after your device is decrypted then you can again encrypt it by just changing the word from decrypt>>> to "encrypt" and do a factory reset.
The important part is to find the right "fstab" file from (etc) folder located inside system OR vendor directory's.
And change the encrypt word to decrypt and do a factory reset.
Wrong,
Force-encrypt to decrypt.
Riight
Force-encrypt to force-decrypt.
The number of words should be same age changed.
You just need to change en to de.
Understand.
That's a Common sense.
Click to expand...
Click to collapse
Wouldn't it be easy just to re-encrypt from setting menu instead of everyone we have to encrypt or decrypt, changing the fstab file. While your way is working, it would be best to make device encrypt-decrypt from setting. Also a plus side we don't need to perform factory reset after we encrypt and decrypt it again.
Cheers!
SHAH RUKH 45 said:
Wouldn't it be easy just to re-encrypt from setting menu instead of everyone we have to encrypt or decrypt, changing the fstab file. While your way is working, it would be best to make device encrypt-decrypt from setting. Also a plus side we don't need to perform factory reset after we encrypt and decrypt it again.
Cheers!
Click to expand...
Click to collapse
But Every device doesn't have encryption and decryption option available in settings.
Sometimes this process failed and phone OS said that we need a factor reset.
Abdulrehman130 said:
But Every device doesn't have encryption and decryption option available in settings.
Sometimes this process failed and phone OS said that we need a factor reset.
Click to expand...
Click to collapse
I have never seen a device without a encryption option.
SHAH RUKH 45 said:
I have never seen a device without a encryption option.
Click to expand...
Click to collapse
Yes, true.
But sometimes encryption needs to be disabled to fix 0mb/ unable to mount /data partition error.
My edition here, looking reasonable and feeling good? My device is Samsung A125F
Code:
# /system/etc/recovery.fstab
rootfs / ext4 rw,barrier=1 wait,logical,first_stage_mounst
system /system ext4 rw,barrier=1 wait,logical,first_stage_mount
system /system_root ext4 rw,barrier=1 wait,logical,first_stage_mount
vendor /vendor ext4 rw,barrier=1 wait,logical,first_stage_mount
product /product ext4 rw,barrier=1 wait,logical,first_stage_mount
odm /odm ext4 rw,barrier=1 wait,logical,first_stage_mount
/dev/block/platform/bootdevice/by-name/md_udc /metadata ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic,sync wait,check,formattable,first_stage_mount
/dev/block/platform/bootdevice/by-name/userdata /data ext2 rw,noatime,nosuid,nodev,discard,usrquota,grpquota,fsync_mode=nobarrier,reserve_root=32768,resgid=5678,inlinecrypt latemount,wait,check,quota,reservedsize=128M,forcedecrypt=/dev/block/platform/bootdevice/by-name/metadata
/dev/block/platform/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,formattable
/dev/block/platform/bootdevice/by-name/protect1 /mnt/vendor/protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,formattable
/dev/block/platform/bootdevice/by-name/protect2 /mnt/vendor/protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,formattable
/dev/block/platform/bootdevice/by-name/nvdata /mnt/vendor/nvdata ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,formattable
/dev/block/platform/bootdevice/by-name/nvcfg /mnt/vendor/nvcfg ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,formattable
/dev/block/platform/bootdevice/by-name/prism /prism ext4 ro,barrier=1 nofail,avb,first_stage_mount
/dev/block/platform/bootdevice/by-name/optics /optics ext4 ro,barrier=1 nofail,avb,first_stage_mount
/dev/block/platform/bootdevice/by-name/efs /efs ext2 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,formattable
/dev/block/platform/bootdevice/by-name/keydata /keydata ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic,inlinecrypt wait,check,formattable,fileencryption=aes-256-xts,nofail
/dev/block/platform/bootdevice/by-name/keyrefuge /keyrefuge ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic,inlinecrypt wait,check,formattable,fileencryption=aes-256-xts,nofail
/dev/block/platform/bootdevice/by-name/frp /persistent emmc defaults defaults
/dev/block/platform/bootdevice/by-name/nvram /nvram emmc defaults defaults
/dev/block/platform/bootdevice/by-name/proinfo /proinfo emmc defaults defaults
/dev/block/platform/bootdevice/by-name/lk /bootloader emmc defaults defaults
/dev/block/platform/bootdevice/by-name/lk2 /bootloader2 emmc defaults defaults
/dev/block/platform/bootdevice/by-name/para /para emmc defaults defaults
/dev/block/platform/bootdevice/by-name/misc /misc emmc defaults defaults,first_stage_mount
/dev/block/platform/bootdevice/by-name/boot /boot emmc defaults first_stage_mount,nofail,
/dev/block/platform/bootdevice/by-name/recovery /recovery emmc defaults first_stage_mount,nofail,
/dev/block/platform/bootdevice/by-name/logo /logo emmc defaults defaults
/dev/block/platform/bootdevice/by-name/expdb /expdb emmc defaults defaults
/dev/block/platform/bootdevice/by-name/seccfg /seccfg emmc defaults defaults
/dev/block/platform/bootdevice/by-name/tee1 /tee1 emmc defaults defaults
/dev/block/platform/bootdevice/by-name/tee2 /tee2 emmc defaults defaults
/dev/block/platform/bootdevice/by-name/scp1 /scp1 emmc defaults defaults
/dev/block/platform/bootdevice/by-name/scp2 /scp2 emmc defaults defaults
/dev/block/platform/bootdevice/by-name/sspm_1 /sspm_1 emmc defaults defaults
/dev/block/platform/bootdevice/by-name/sspm_2 /sspm_2 emmc defaults defaults
/dev/block/platform/bootdevice/by-name/efuse /efuse emmc defaults defaults
/dev/block/platform/bootdevice/by-name/md1img /md1img emmc defaults defaults
/dev/block/platform/bootdevice/by-name/md1dsp /md1dsp emmc defaults defaults
/dev/block/platform/bootdevice/by-name/md1arm7 /md1arm7 emmc defaults defaults
/dev/block/platform/bootdevice/by-name/md3img /md3img emmc defaults defaults
/dev/block/platform/bootdevice/by-name/gz1 /gz1 emmc defaults defaults
/dev/block/platform/bootdevice/by-name/gz2 /gz2 emmc defaults defaults
/dev/block/platform/bootdevice/by-name/spmfw /spmfw emmc defaults defaults
/dev/block/platform/bootdevice/by-name/boot_para /boot_para emmc defaults defaults
/dev/block/platform/bootdevice/by-name/odmdtbo /odmdtbo emmc defaults defaults
/dev/block/platform/bootdevice/by-name/dtbo /dtbo emmc defaults defaults
/dev/block/platform/bootdevice/by-name/vbmeta /vbmeta emmc defaults defaults
/dev/block/platform/bootdevice/by-name/uh /uh emmc defaults defaults
Abdulrehman130 said:
#########Concept########
For TWRP Recovery Users ( who don't have root)
PHP:
Open recovery mode and tap on "Advance>file manager" and go to this path
For Root Users Use any "Root File Manager".
PHP:
Go to "System/etc" path
OR
PHP:
go to "system_root/system/etc
If Fstab isn't available inside "system" then search it in *vendors* folder
PHP:
go to "vendor/etc"
find ("fstab") named file in etc folder.
maybe more than 1 fstab file will be there.
In that condition.
You need to check which one fstab file has partition blocks names like ("system, vendor, userdata) etc.
so just copy this Fstab file to SD card Or anywhere you like, for editing.
###Editing####
Download"Quick Edit Apk" from store.
Open This fstab file using this Quick edit tool and find line which has word like "data" or "userdata".
Something like these two lines.
PHP:
"dev/block/bootdevice/by-name/userdata"
OR
PHP:
"dev/block/bootdevice/by-name/data"
Now Find word similar to "Encrypt" in this line.
Change "encrypt" word to "decrypt" of this userdata line.
You will find one of these like words .
Hint
PHP:
"forceencrypt" >>>>>>>>>>>>>>change it to "forcedecrypt"
PHP:
"encryptable" >>>>>>>>>>>>>>>>>change it to "decryptable"
PHP:
"encrypt" >>>>>>>>>>>>>>>>>>>>change it to "decrypt"
PHP:
"encryption" >>>>>>>>>>>>>>>>>>change it to "decryption"
See I Just Change "en" to "de"
Mean ”En”crypt to ”de”crypt
For example on my phone fstab the line was this.
PHP:
/dev/block/platform/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,noflush_merge wait,check,quota,reservedsize=128M,formattable,resize,forceencrypt=/dev/block/platform/bootdevice/by-name/metadata,
Now I founded both "userdata" and "forceencrypt" and i changed it according to my need.
("Root Users, You have done eding" Now reset you device and enjoy")
### TWRP Users you can continue ###
go back to recovery and copy this edited fstab to
"it's original location (where you found it).
(For me it was founded in vendor/etc path and i pasted this edited fstab there)
after pasting done, then again go to it's original location (Pasted location)(For me it was vendor/etc)
And tap on this edited "fstab" and select on "chmod" option And set permission to 0644 of this file.
wipe your data, internal storage and dalvik-cable.
Reboot
now error is completely gone
Watch this video of you're still confused.
Click to expand...
Click to collapse

Advice needed porting TWRP to AllWinner a50

Heya guys!
So I've been busy making a TWRP recovery image for my unlocked chinese tablet (a Deejoy q728) that I bought from Amazon. It's a reaaaaally generic one with literally no firmware available over the entirety of the webs(yes I followed every tutorial you could think of that explains how to find firmware, believe me *sigh*).
Now I've gotten TWRP 2.3.6 to actually boot. I used the recovery img from another tablet with almost the same hardware(Concord HS or something) as a base and brought the necessary files into a TWRP 2.6.3 for the AllWinner A23 SoC. with Android Image Kitchen. The steps I took are from this post on DroidWin. It boots but I am encountering the following(major) problems.
1. Even though it displays in landscape, the touch screen seems to think it's in portrait.
2. Partitions just can't be found whatsoever. I think this might have to do with the fact that I don't know too much about fstab.
3. Adbd doesn't work.
By the by, I also edited the fstab files so that they contain the specific partition info of my tablet, not the Concord, as the Concord has several partitions that simply don't exist on mine. Code for twrp.fstab and recovery.fstab down below:
Code:
twrp.fstab:
/boot emmc /dev/block/by-name/boot
/recovery emmc /dev/block/by-name/recovery
/system ext4 /dev/block/by-name/system
/data ext4 /dev/block/by-name/UDISK flags=encryptable=/dev/block/by-name/metadata
/cache ext4 /dev/block/by-name/cache
/misc emmc /dev/block/by-name/misc
/external_sd vfat /dev/block/mmcblk1p1 flags=removable;storage;display="SDCARD"
/usb-otg auto /dev/block/sda1 flags=removable;storage;display="USB-OTG"
recovery.fstab:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/by-name/system /system ext4 ro,barrier=1 wait,first_stage_mount,logical,avb=vbmeta,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey
/dev/block/by-name/vendor /vendor ext4 ro,barrier=1 wait,first_stage_mount,logical
#product /product ext4 ro,barrier=1 wait,first_stage_mount,logical
/dev/block/by-name/UDISK /data ext4 noatime,nosuid,nodev,discard wait,check,formattable,fileencryption=adiantum,quota,reservedsize=33554432
/dev/block/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,formattable
/dev/block/by-name/metadata /metadata ext4 nodev,noatime,nosuid,errors=panic wait,first_stage_mount,formattable
/dev/block/by-name/boot /boot emmc defaults defaults
/dev/block/by-name/recovery /recovery emmc defaults defaults
/dev/block/by-name/misc /misc emmc defaults defaults
#/dev/block/by-name/super /super emmc defaults defaults
/dev/block/by-name/frp /persistent emmc defaults defaults
/dev/block/zram0 none swap defaults zramsize=75%
/devices/platform/soc/sdc0/mmc_host/mmc* auto auto defaults voldmanaged=extsd:auto,encryptable=footer
/devices/platform/soc/usbc0/usb* auto auto defaults voldmanaged=usb:auto,encryptable=footer
/devices/platform/soc/5101000.ehci0-controller/usb* auto auto defaults voldmanaged=usb:auto,encryptable=footer
/devices/platform/soc/5200000.ehci1-controller/usb* auto auto defaults voldmanaged=usb:auto,encryptable=footer
/devices/platform/soc/5101000.ohci0-controller/usb* auto auto defaults voldmanaged=usb:auto,encryptable=footer
/devices/platform/soc/5200000.ohci1-controller/usb* auto auto defaults voldmanaged=usb:auto,encryptable=footer
/external_sd vfat /dev/block/mmcblk1p1 flags=removable;storage;display="SDCARD"
/usb-otg auto /dev/block/sda1 flags=removable;storage;display="USB-OTG"
# add for recovery
none /sdcard emmc defaults defaults
Edit: The main reason I really want this to end up working is because there are a ton of cheap allwinner a50 tablets and most of them(at least mine) are bootloader unlockable. Add Magisk to these babies and voila! Ya got a cheap device that you can theme to your hearts content. Toying around with tech has always been my thing haha.
So if anyone has any tips for me to get a sorta head start on this, I would really appreciate it!
Sincerely,
Snow
snowlily said:
Heya guys!
So I've been busy making a TWRP recovery image for my unlocked chinese tablet (a Deejoy q728) that I bought from Amazon. It's a reaaaaally generic one with literally no firmware available over the entirety of the webs(yes I followed every tutorial you could think of that explains how to find firmware, believe me *sigh*).
Now I've gotten TWRP 2.3.6 to actually boot. I used the recovery img from another tablet with almost the same hardware(Concord HS or something) as a base and brought the necessary files into a TWRP 2.6.3 for the AllWinner A23 SoC. with Android Image Kitchen. The steps I took are from this post on DroidWin. It boots but I am encountering the following(major) problems.
1. Even though it displays in landscape, the touch screen seems to think it's in portrait.
2. Partitions just can't be found whatsoever. I think this might have to do with the fact that I don't know too much about fstab.
3. Adbd doesn't work.
By the by, I also edited the fstab files so that they contain the specific partition info of my tablet, not the Concord, as the Concord has several partitions that simply don't exist on mine. Code for twrp.fstab and recovery.fstab down below:
Code:
twrp.fstab:
/boot emmc /dev/block/by-name/boot
/recovery emmc /dev/block/by-name/recovery
/system ext4 /dev/block/by-name/system
/data ext4 /dev/block/by-name/UDISK flags=encryptable=/dev/block/by-name/metadata
/cache ext4 /dev/block/by-name/cache
/misc emmc /dev/block/by-name/misc
/external_sd vfat /dev/block/mmcblk1p1 flags=removable;storage;display="SDCARD"
/usb-otg auto /dev/block/sda1 flags=removable;storage;display="USB-OTG"
recovery.fstab:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/by-name/system /system ext4 ro,barrier=1 wait,first_stage_mount,logical,avb=vbmeta,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey
/dev/block/by-name/vendor /vendor ext4 ro,barrier=1 wait,first_stage_mount,logical
#product /product ext4 ro,barrier=1 wait,first_stage_mount,logical
/dev/block/by-name/UDISK /data ext4 noatime,nosuid,nodev,discard wait,check,formattable,fileencryption=adiantum,quota,reservedsize=33554432
/dev/block/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,formattable
/dev/block/by-name/metadata /metadata ext4 nodev,noatime,nosuid,errors=panic wait,first_stage_mount,formattable
/dev/block/by-name/boot /boot emmc defaults defaults
/dev/block/by-name/recovery /recovery emmc defaults defaults
/dev/block/by-name/misc /misc emmc defaults defaults
#/dev/block/by-name/super /super emmc defaults defaults
/dev/block/by-name/frp /persistent emmc defaults defaults
/dev/block/zram0 none swap defaults zramsize=75%
/devices/platform/soc/sdc0/mmc_host/mmc* auto auto defaults voldmanaged=extsd:auto,encryptable=footer
/devices/platform/soc/usbc0/usb* auto auto defaults voldmanaged=usb:auto,encryptable=footer
/devices/platform/soc/5101000.ehci0-controller/usb* auto auto defaults voldmanaged=usb:auto,encryptable=footer
/devices/platform/soc/5200000.ehci1-controller/usb* auto auto defaults voldmanaged=usb:auto,encryptable=footer
/devices/platform/soc/5101000.ohci0-controller/usb* auto auto defaults voldmanaged=usb:auto,encryptable=footer
/devices/platform/soc/5200000.ohci1-controller/usb* auto auto defaults voldmanaged=usb:auto,encryptable=footer
/external_sd vfat /dev/block/mmcblk1p1 flags=removable;storage;display="SDCARD"
/usb-otg auto /dev/block/sda1 flags=removable;storage;display="USB-OTG"
# add for recovery
none /sdcard emmc defaults defaults
Edit: The main reason I really want this to end up working is because there are a ton of cheap allwinner a50 tablets and most of them(at least mine) are bootloader unlockable. Add Magisk to these babies and voila! Ya got a cheap device that you can theme to your hearts content. Toying around with tech has always been my thing haha.
So if anyone has any tips for me to get a sorta head start on this, I would really appreciate it!
Sincerely,
Snow
Click to expand...
Click to collapse
I realize this port is now months old, but I did want to ask how your TWRP port worked out? I'm presently working on Allwinner-a50 and Allwinner-100 tablet projects.
Viva La Android said:
I realize this port is now months old, but I did want to ask how your TWRP port worked out? I'm presently working on Allwinner-a50 and Allwinner-100 tablet projects.
Click to expand...
Click to collapse
Welllll I have no idea how I did it, but I got it to boot. Touch screen drivers functioned overall but while being horizontal, the touch screen responded as if in portrait, so I literally ended up measuring where what button would be on the touch screen compared what was actually displayed. I eventually gave up as something tells me that the A50 might have very proprietary storage drivers, because no matter what I do, twrp refuses to see any device attached. Also, though most allwinner socs are well docd, the a50 isn't as much and afaik the allwinner barely acknowledges the a50. Though I am really happy I got to develop some more experience with things like fstab and it was a lot of fun
snowlily said:
Welllll I have no idea how I did it, but I got it to boot. Touch screen drivers functioned overall but while being horizontal, the touch screen responded as if in portrait, so I literally ended up measuring where what button would be on the touch screen compared what was actually displayed. I eventually gave up as something tells me that the A50 might have very proprietary storage drivers, because no matter what I do, twrp refuses to see any device attached. Also, though most allwinner socs are well docd, the a50 isn't as much and afaik the allwinner barely acknowledges the a50. Though I am really happy I got to develop some more experience with things like fstab and it was a lot of fun
Click to expand...
Click to collapse
Outstanding job. That's no small feat when dealing with Allwinner, and especially their more obscure A-series chipset like the a50. So, TWRP will not recognize USB OTG device or other attached devices?
Viva La Android said:
Outstanding job. That's no small feat when dealing with Allwinner, and especially their more obscure A-series chipset like the a50. So, TWRP will not recognize USB OTG device or other attached devices?
Click to expand...
Click to collapse
It won't even recognize the internal storage. When maneuver my why with the barely functional touchscreen to the log option, it just shows a long list of "couldn't mount"s. And no matter what I do TWRP has zero access to internal or external storage. Be it otg or microsd. I've tried several way of formatting the fstabs layout. Be it the average template I would find within twrp, or base my fstabs on those in stock recovery. Anyhow, it was taking alot of time in my life and started to get annoying /hj. Though I am glad I developed some experience. But I wanted to make something that would require alot more time, but would be alot more fun to make. It's a series called "Bull[censored] simulator." Though it's not really a simulator. And the real game lies within. Well... The game itself. As in the hexadecimal, the itchio page's assets and so on. Atm I am busy with a part that inserts it's lore into a Pokémon rom hack I will probably call Bull**** Sim: Pokémon Edition(Working title of course lol) so sorry for abandoning this job. Though I AM glad that people still take interest. Maybe I'll get back to it someday if I ain't beaten to the chase

Categories

Resources