Mount errors when using compiled TWRP with UBIFS support - General Questions and Answers

I have compiled the TWRP custom recovery using @yuweng 's excellent AIO-TWRP-Compiler script on BBQLinux.
I cloned the OmniROM repositories, and chose the Android 5.1 branch. (My device, the Tinashi DigiLand DL718M, runs Android 5.1)
When I made the device tree, it directed me to this Gerrit request from @Dees_Troy , so I downloaded and applied that patch to my omni/bootable/recovery directory, and removed that check from twrp shell script.
I then compiled TWRP and had one error:
Code:
In file included from bootable/recovery/ui.cpp:36:0:
bootable/recovery/roots.h:30:1: error: 'Volume' does not name a type
Volume* volume_for_path(const char* path);
I found someone with a similar problem who said to just comment out the line, which fixed the problem and allowed it to build successfully.
I then flashed it using SP Flash Tool and it booted (amazing in itself since I didn't unlock the bootloader), but had the following errors, presumably because /system, /cache, and /data are UBIFS partitions:
Code:
I:Processing '/boot'
E:Unable to find partition size for '/boot'
I:Processing '/recovery'
E:Unable to find partition size for '/recovery'
I:Processing '/cache'
E:bad mtd index for /dev/cache
I:Processing '/data'
I:Setting up '/data' as data/media emulated storage.
I:Created '/sdcard' folder.
E:bad mtd index for /dev/usrdata
E:bad mtd index for /dev/usrdata
E:Unable to recreate /data/media folder.
I:Processing '/misc'
E:Unable to find partition size for '/misc'
I:Processing '/system'
I:Processing '/sd-ext'
I:Created '/sd-ext' folder.
I:Backup folder set to '/data/media/TWRP/BACKUPS/DL718M'
I:Settings storage is '/data/media'
Updating partition details...
E:bad mtd index for /dev/cache
E:bad mtd index for /dev/usrdata
E:bad mtd index for /dev/android
I:Unable to mount '/sd-ext'
I:Actual block device: '', current file system: 'vfat'
...done
E:bad mtd index for /dev/usrdata
E:Unable to mount storage.
Here is the output of all of the commands I used to find the partitions on my device (cat /proc/dumchar_info and more), as well as recovery.fstab (used in building) and recovery.log.
Note: Since slashes are invalid in filenames, I have replaced slashes in the commands I ran with periods.
How can I get it to mount my UBIFS partitions properly?
Any help is appreciated.
If any more information is needed, please let me know!
UPDATE: I've now gotten it to work using mtd names in recovery.fstab (kind of). I have updated my recovery.fstab in the link.
However, now all of the SELinux contexts on /system, /data, and /cache are
Code:
u:object_r:unlabeled:s0
.
@Dees_Troy will your patch work with SELinux?
UPDATE 2: I have confirmed by attempting chcon that @Dees_Troy 's patch does NOT implement SELinux support.

I know its over a year old this post but your problem was that you were setting your mount points as /dev/boot etc only emmc devices use such layout also using dumchar and mtd commands will not isaue the correct mount points for it nor the fstabs unfortunately,
To mount ubifs properly you need to set mounts out for all ubifs partitions see the example below
/system..... ubifs......system
/cache....... ubifs......cache
/data...........ubifs......userdata
/fat............. vfat.......fat
/expdb.......yaffs2....expdbd
/nvram.......yaffs2....nvram
/sec_ro.......mtd.......sec_ro
/pro_info....mtd.......pro_info
/boot..........mtd.......boot
/recovery...mtd.......recovery
/misc.........mtd.......misc
Alternatively you can also add the second block device mount also which would look something like this for example
/system....ubifs....system.../dev/ubi0_0
/cache....yaffs2....cache..../dev/block/mtdblock15
/boot.........mtd......boot....../dev/block/mtdblock8
any chance you have a link at all to your recovery?? id be keen to port it over for my MT6572 ubifs china phone if you wouldnt mind me doing so ? ive got ubifs chinaphone ive built CM 11 for and also got a TWRP 2.7 for ubifs to work after some porting but is very very buggy to say the least and dosent flash roms properly also got twrp 3.1.0 to work BUT wont mount ubifs will only mount yaffs, emmc and ext4 and im not keen on the ancient CWM stuff at all,
Id appreciate any help if you still got it

Related

[Completed] internal memory brick by twrp recovery (0mb left internal storage)

hello accidently i brick my internal storage memory...
what i've done :
twp recovery > partition sd card>Change value (EXT Swap/ swap size)
now if i go in file mannager (twarp> (internal memory 0 / external storage XXXX)
If i try to Advanced wipe
Updating partition details...
E:Unable to mount '/cache'
E:Unable to mount '/data'
E:Unable to mount '/system'
E:Unable to mount Storage.
If i try to install rom... same
E:Unable to mount '/cache'
E:Unable to mount '/data'
E:Unable to mount '/system'
E:Unable to mount Storage.
please i need help step by step
Lenovo a328
yonut32 said:
hello accidently i brick my internal storage memory...
what i've done :
twp recovery > partition sd card>Change value (EXT Swap/ swap size)
now if i go in file mannager (twarp> (internal memory 0 / external storage XXXX)
If i try to Advanced wipe
Updating partition details...
E:Unable to mount '/cache'
E:Unable to mount '/data'
E:Unable to mount '/system'
E:Unable to mount Storage.
If i try to install rom... same
E:Unable to mount '/cache'
E:Unable to mount '/data'
E:Unable to mount '/system'
E:Unable to mount Storage.
please i need help step by step
Lenovo a328
Click to expand...
Click to collapse
Hello. You can try asking here http://forum.xda-developers.com/android/help where someone might help you with your issue.
Good luck

Android partitions(system,cache,data,emmc) missing..how to repartition

so first i bricked my device.but i can install the recovery via fastboot.so in recovery i tried to install this rom.
https://forum.xda-developers.com/an...-aosprime-v0-6-4-lg-l-bello-lollipop-t3374627
this is what the output looks like
E:UNABLE TO MOUNT '/SYSTEM'
E:UNABLE TO MOUNT '/CACHE'
E:UNABLE TO MOUNT '/DATA'
E:UNABLE TO MOUNT '/EMMC'
NOW WHAT THE HELL I DO
promitheus said:
so first i bricked my device.but i can install the recovery via fastboot.so in recovery i tried to install this rom.
https://forum.xda-developers.com/an...-aosprime-v0-6-4-lg-l-bello-lollipop-t3374627
this is what the output looks like
E:UNABLE TO MOUNT '/SYSTEM'
E:UNABLE TO MOUNT '/CACHE'
E:UNABLE TO MOUNT '/DATA'
E:UNABLE TO MOUNT '/EMMC'
NOW WHAT THE HELL I DO
Click to expand...
Click to collapse
Can you fastboot stock firmware? I'm not familiar with fastboot anymore.
promitheus said:
so first i bricked my device.but i can install the recovery via fastboot.so in recovery i tried to install this rom.
https://forum.xda-developers.com/an...-aosprime-v0-6-4-lg-l-bello-lollipop-t3374627
this is what the output looks like
E:UNABLE TO MOUNT '/SYSTEM'
E:UNABLE TO MOUNT '/CACHE'
E:UNABLE TO MOUNT '/DATA'
E:UNABLE TO MOUNT '/EMMC'
NOW WHAT THE HELL I DO
Click to expand...
Click to collapse
What did you do to brick the device?
I DO NOT PROVIDE HELP IN PM, KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE

Nexus 5 E:primary block device,y-name/userdata for mount point /data is not present!

Hi guys,
I've got a trouble. My phone has turned off and had a google screen loader . I can turn on TWRP and the phone is shown on the computer, but i can't push any file in "can not copy file" and the phone is empty. A few months ago i had the same trouble, on my phone all the files dissapeared and after 15 times of reloading it turned on and all the files appeared and it was working a week then it repeated when the phone turned on again i reinstalled SuperSu and the phone was working for 2 months correctly, but this trouble repeated tomorrow again.
When i turn it off i can see this
E: primary block device /dev/block/platform/msm_sdcc/1./b
y-name/userdata for mount point /data is not present!
E:unable to mount /data
E:unable to find partition size for /boot
E:unable to find partition size for /recovery
E:unable to find partition size for /misc
E:unable to find partition size for /radio
E:unable to find partition size for /sbl1
E:unable to find partition size for /tz
E:unable to find partition size for /rpm
E:unable to find partition size for /sdi
E:unable to find partition size for /aboot
E:unable to find partition size for /imgdata
E:unable to find partition size for /efs1
E:unable to find partition size for /efs2
I'm so sorry for my English, but people on my native forum couldn't help me.
I have solved this problem I have just installed recovery 3.0 from fastboot and it has worked, there are all the files on my phone.

Latest Magisk messed up my boot. Can I recover without losing everything?

Hi - I tried updating Magisk this morning, and it semi-bricked my OP7P. When I rebooted my phone, I got stuck in FastBoot Mode.
I'm running the latest Android 10 OOS.
My first step at that point was to do a fastboot boot twrp-3.4.0-0-guacamole.img to get into Recovery Mode. That worked, and I tried switching to my SLOT B to boot from.
That seemed to work at first ... but not really.
While my OP7P appeared to be booting from Slot B, it was stuck in a boot loop, with the OOS boot screen "circling electron dot" rotating very, very slowly. After about 5 minutes, I gave up on that.
So, I did another fastboot boot twrp-3.4.0-0-guacamole.img to get into Recovery Mode again, and did a backup of all the partitions (Boot, System Image, Vendor Image, Data, Modem, and EFS) and saved that off.
Now that I backed up all my previous partitions, is there a way for me to get my OP7P back to where it was before I corrupted my boot with Magisk? Can I just recover the Boot Partition from a previous TWRP backup? Or, reinstall some stock image of OOS, reinstall TWRP 3.4.0.0, and then recover some of the partitions I just backed up?
I'm going to hold off until I hear a response back ... I'm afraid if I take any other steps at this point, I could cause irreparable damage - if I haven't already.
¿GJ?
Twrp --> flash your boot.img (with "payload dumper" it can be extracted from the full OTA update file)
Then flash twrp.zip, reboot in to twrp, flash magisk.zip (21.4 or 22), wipe dalvik cache
Reboot and provit ;-)
Ps: for magisk22, rename magisk22.apk to magisk22.zip
Thanks, @ghost323 ! You're a lifesaver!
That is exactly the answer I was looking for, and my OP7P is operational again without any issues.
I'm bookmarking this page, and also putting some notes into my Android stuff for future reference ... Though, I hope I don't have to reference it again.
¿GJ?
ghost323 said:
Twrp --> flash your boot.img (with "payload dumper" it can be extracted from the full OTA update file)
Then flash twrp.zip, reboot in to twrp, flash magisk.zip (21.4 or 22), wipe dalvik cache
Reboot and provit ;-)
Ps: for magisk22, rename magisk22.apk to magisk22.zip
Click to expand...
Click to collapse
Not all super heroes wear capes! Thank you so much!
it is asking which parttition to flash , Boot / System image./ Vendor / ramdisk..
which one to select ?
I flashed boot.img to "boot" and flashed twrp.zip
Was on Havoc OS.
Tried to rebooting , it booted into another slot i think , didnt mount the parition. So had to reboot again .. but this time it went to bootloop again with animation.
Now i cant able to go into twrp or fastboot.
Have ti soft bricked ? Atleast took a backup when i was inside TWRP.
can someone help me ? When i boot (not turned off) , it is showing as " Unknown USB Device (Device Descriptor Request Failed)"
Boot partition is correct. Did you reboot in twrp and then installed the magisk.zip?
OK tried vol down and power -- it booted into twrp , but both slots dont show or mount OS parition
Install your magisk.zip then try a restart. If you have a bootloop, go back to twrp, change the slot (a / b), install magisk.zip and restart again.
Plan B: install your current firmware via twrp (as if you were doing an update).
Then flash twrp.zip
Then restart again directly in twrp
Then flash magisk.zip
Then delete dalvik cache
Then restart into the system
Good luck
i cant mount or its not showing "sdcard"
its not showing sdcard , also you said to flash the boot.img , when i did it asked me where .. I select "Boot" parititon , is that correct ?
I think i am in X parition where its not showing SDcard content or data ..
really bad day.. didint think magisk would wreak the phone for so many. Atleast they should stop this upgrade for time being.
Sorry i'm @ work...
WTF?!
Have you already tried a USB stick? Maybe this will be shown to you if you have the right cable.
Thanks for the replies.. Even from work..
I dont even know which partition i am in. I tried to reboot into recovery and its working. From there i went to change from slot a to b and its showing
unable to mount /data/media/TWRP/ .twrps
Problem is i cant able to mount "data".
also dm-verity is not disabled in my op7pro , is that causing any issue ?
For now it seems TWRP doesnt know where "data" is , thats is what i am thinking.
Shall i flash twrp again using "tool all in one" ?
when i try to reboot into "bootloader" , it doesnt show "bootloader version" , Baseband version.
just putting it here to identify the issue.
when booting up into twrp , its not asking for my PIN , so its not mouting the normal parition. it is going into some other partition from which it cant mount data/media - sdcard because of encryption.. my guess..
I was able to pull the recovery.log.. please let me know if that could be any help
I think its the partition which is not loading,i think just dirty flashing the ROM should work , but for that i need to mount the data/media/sdcard or internal storage right ? Or will not help ?
I once again flashed TWRP through "TAIO"tool and it flashed on both slot A and slot B.
Looking into log here :
Code:
I:Switching packages (splash)
=> Linking mtab
I:Setting active slot B
=> Processing /etc/twrp.fstab for SAR-detection
I:Reading /etc/twrp.fstab
I:Done processing fstab files
I:SAR-DETECT: SAR System detected
=> Processing /etc/twrp.fstab
I:Reading /etc/twrp.fstab
I:Processing '/boot'
I:Processing '/system'
I:Created '/system' folder.
I:Processing '/system_image'
I:Processing '/vendor'
I:Processing '/vendor_image'
I:Processing '/metadata'
I:Processing '/data'
I:FBE contents 'ice', filenames 'aes-256-cts'
I:Flag identified for processing, but later unmatched: 36
I:Processing '/firmware'
I:Created '/firmware' folder.
I:Processing '/misc'
I:Processing '/modem'
I:Processing '/bluetooth'
I:Processing '/dsp'
I:Processing '/efs1'
I:Processing '/efs2'
I:Processing '/efsc'
I:Processing '/efsg'
I:Processing '/op2'
I:Created '/op2' folder.
I:Processing '/usbstorage'
I:Created '/usbstorage' folder.
I:Done processing fstab files
I:Setting up '/data' as data/media emulated storage.
I:Can't probe device /dev/block/sda19
I:Unable to mount '/data'
I:Actual block device: '/dev/block/sda19', current file system: 'ext4'
I:Can't probe device /dev/block/sda19
I:Unable to mount '/data'
I:Actual block device: '/dev/block/sda19', current file system: 'ext4'
I:Backup folder set to '/data/media/TWRP/BACKUPS/b2562ef9'
I:Settings storage is '/data/media'
libc: Unable to set property "ro.crypto.state" to "encrypted": error code: 0xb
libc: Unable to set property "ro.crypto.type" to "file": error code: 0xb
e4crypt_mount_metadata_encrypted: /data 0
key_dir/key: /metadata/vold/metadata_encryption/key
Key exists, using: /metadata/vold/metadata_encryption/key
Using Keymaster HAL: 4 from QTI for encryption. Security level: TRUSTED_ENVIRONMENT, HAL: [email protected]::IKeymasterDevice/default
begin failed, code -62
Upgrading key in memory only: /metadata/vold/metadata_encryption/key
upgrade_key failed, code -38
I:Unable to decrypt metadata encryption
libc: Unable to set property "ro.crypto.state" to "encrypted": error code: 0xb
libc: Unable to set property "ro.crypto.type" to "block": error code: 0xb
E:Unexpected value for crypto key location
E:Error getting crypt footer and key
Updating partition details...
I:App found at '/system_root/system/priv-app/twrpapp'
I:Can't probe device /dev/block/sda19
I:Unable to mount '/data'
I:Actual block device: '/dev/block/sda19', current file system: 'ext4'
I:Unable to mount '/usbstorage'
I:Actual block device: '', current file system: 'vfat'
...done
I:Can't probe device /dev/block/sda19
I:Unable to mount '/data'
I:Actual block device: '/dev/block/sda19', current file system: 'ext4'
Unable to mount storage
I:Unmounting main partitions...

[Q] [TWRP] Before flashing any GSI on my system partition: E: unable to find partition size for /system_image

Whatever i tried to flash are phhuson's AOSP Squeak GSI, Lineage 19.1 GSI, and LeOSS GSI on specifically only the system image, but that error message isn't disappearing at all
Another error message also never disappears ...
Code:
E: unable to open or mount /system_root, /vendor, /odm, or /product (Block devices required)
Device: Samsung A125F; TWRP 3.6.11-Edward0181-DEV-RC4
But when trying to mount manuallly with mount -o rw,remount /system_root, it still reports ...
Code:
mount: '/system_root' not in /proc/mounts
Code:
E: error creating fstab
Then recreating dirs like /system_root, /system_image, /vendor, /odm, /product
Afterwards also running mount -o rw /system_root and mount -o rw system /system_image both reports ...
Code:
mount: 'system'->'/system_root': No such file or directory
mount: 'system'->'/system_image': No such file or directory
mount: 'vendor'->'/vendor': No such file or directory
mount: 'odm'->'/odm': No such file or directory
mount: 'product'->'/product': No such file or directory
Really everything missing? I'm quite unsure why it reports like those
Also, in Mount menu i'm also unable to remount System partition at all somewhy
Finally, mounting on /vendor, /odm, and /product also reports "no such files or directories"
symlinks missing - claim it to the maintainer (or fix fstab yourself)
https://github.com/edward0181/android_device_samsung_a12/tree/twrp-11.0/recovery/root/system/etc
Solved by last version of twrp.
https://github.com/edward0181/android_device_samsung_a12/releases

Categories

Resources