unable to mount the Internal Storage, system, cache and data. - Android Q&A, Help & Troubleshooting

hello'
1- LG L3 stack on logo even after recovery.
I managed to install TWRP through SRKTOLLS2.1.
When I try to install a ROM ZIP file I'm having post:
unable to mount the Internal Storage, system, cache and data.
ADB interface device I manage to see the folders and system files.
*/ SDCARD is empty and there is no file.
/BOOT is empty and there is no file
/cache & /data folders contain folders in the name of lost + found,
/dev contains several directories,
/etc contains files: fstab, mtab, recovery.fstab and to more,
and the other system folders'
I can explorer them via TWRP file manager a and see the contents of folders, copy files or move files.
TNX :good:

Related

AOSP flash results in empty boot and system directories

I'm trying to build aosp for my galaxy tab 10.1 wifi (p4wifi). I've included the relevant device and vendor projects, as well as an updated bionic with tegra2 support for libc. It successfully builds, but flashing the resulting otapackage (using twrp) or the img files (using heimdall) results in empty boot and system directories on the device.
The system directory within the otapackage isn't empty, and the img files aren't as well. The updater-script extracts the system directory as normal.
Edit (Solved):
The partitions weren't being mounted in recovery, but I believe they are mounted normally. "mount /system" mounted the partition and it contains the expected files. Still not booting properly, but at least I know this isn't my issue.

root cannot read from /storage/sdcardn/; su error: could not open file

Trying to copy files from /storage/sdcard to the /system partition. Landvo L200 running Android 4.4. Rooted. Kitkat SD fix in place (in platform.xml, the media_rw-group is added to WRITE_EXTERNAL_STORAGE). This problem is about _reading_ from SD rather than writing to it.
Using adb, I can do su and become root. As root, I can remount /system as rw and rename files on it. But when I go to /storage/sdcard0/ or /storage/sdcard1/, I cannot see any of the files there. When I drop back to the regular user (so not root), I can see the files on both the /storage/sdcardn/.
Using Total Commander, exactly the same seems to happen, because I can rename files on /system (TC gets root and automatically remounts in rw), but I cannot copy a file from one of the sdcards to /system/<whatever dir>. I get as error message: su error: could not open source file. Apparently this was reported before, without resolution: http://www.ghisler.ch/board/viewtopic.php?t=38910&view=next
Anyone knows a workaround to this?
{EDIT} ES file explorer _is_ capable of copying from /storage/sdcard to the /system partition. How do they do it?

If ... then ... else and init.rc

Hi, I'd like to ask a general question about device boot. I'd like to mount /system, /data, and /cache partitions in selected locations based on detection of sdcard in the device.
How could I add an if ... then ... else statement to init.rc before that /system, /data, and /cache partitions are mounted? Any ideas?
Solved
I've found a way to perform this task. It's possible to place if ... then ... else statement into a shell script and put the shell script into ramdisk root directory of boot.img. Then, just run the script by busybox ash command from init.rc (with busybox located into ramdisk root directory).
cristian_c said:
I've found a way to perform this task. It's possible to place if ... then ... else statement into a shell script and put the shell script into ramdisk root directory of boot.img. Then, just run the script by busybox ash command from init.rc (with busybox located into ramdisk root directory).
Click to expand...
Click to collapse
Hey... I managed to mount /dev/block/mmcblk1p2 as my /data partition by editing my boot.img ramdisk(the 3. fstab files and the .rc files... i replaced [email protected] with dev/block/mmcblk1p2 wherever i saw them)
So i was trying to use an if statement in some of the .rc files to check if /dev/block/mmcblk1p2 was mounted on /data and if not then mount /dev/block/mmcblk0p9 (my usrdata partition) on /data... Soon i realised that this isn't exactly bash...
Please explain how you managed to get a .sh to run from your .rc files( or do you only need it in the init.rc, and remove all the /data mounting lines from them and do it all from the script???)
I don't always have access to a pc so if my sdcard somehow dies i want my phone to boot using the internal /data partition otherwise i will bootloop until i flash the original boot.img
nullbyte001 said:
Hey... I managed to mount /dev/block/mmcblk1p2 as my /data partition by editing my boot.img ramdisk(the 3. fstab files and the .rc files... i replaced [email protected] with dev/block/mmcblk1p2 wherever i saw them)
So i was trying to use an if statement in some of the .rc files to check if /dev/block/mmcblk1p2 was mounted on /data and if not then mount /dev/block/mmcblk0p9 (my usrdata partition) on /data... Soon i realised that this isn't exactly bash...
Please explain how you managed to get a .sh to run from your .rc files( or do you only need it in the init.rc, and remove all the /data mounting lines from them and do it all from the script???)
I don't always have access to a pc so if my sdcard somehow dies i want my phone to boot using the internal /data partition otherwise i will bootloop until i flash the original boot.img
Click to expand...
Click to collapse
I've found on fs_property:ro.mount.fs=EXT4 in init.rc. In that section, I've added the following iine:
Code:
exec /busybox ash /mount_partitions.sh
[of course, I've placed busybox arm compiled binary (the version provided by busybox android app should work) and a mount_partitions.sh script (created by myself) into boot image ramdisk (I mean / main directory, the same where init.rc is located) ]
You could also need to give permissions to busybox and to .sh script. You could also need to remount / in read-write mode, in case of issues with the above command.

Change TWRP /sdcard symlink location from /data/media/0 to /data/media

Hi, I recently compiled a TWRP for E506 plus, the problem is that the internal memory of the device is /data/media but the TWRP continues reading /data/media/0 also creating a new folder inside the internal memory called 0. In this way it is not possible to install zip from the internal memory if not manually browsing to /data/media, how can I solve?
I also tried to modify the fstab like this:
Code:
/sdcard auto /data/media
But it didn't work and I also tried to create a symlink but nothing.
Device Tree: https://github.com/XRedCubeX/twrp_device_E506plus
Thread closed per OP request.

rooted phone, corrupt file can't delete permission denied

I have a Motorola Edge+ 2022 phone that I rooted with magisk.
I was in the process of copying files from a USB flash drive to the phone's storage, when suddenly a file stopped copying in Magisk. It's actually an empty folder now.
I am unable to do anything with this empty folder. I can't delete the empty folder (rm -rf) in Magisk or in ADB. If I try to delete it in ADB I get a permission denied error.
I've tried setting the permissions to 777 but I am unable to change the permissions. I've also tried installing Termux, then using a root terminal in Termux to delete it but that does not work. I also tried to rename (move) the folder in Termux and I get an interesting error: "Math result not representable".
Any thoughts?
navigate to /data/media/0 and try again
aIecxs said:
navigate to /data/media/0 and try again
Click to expand...
Click to collapse
That worked!!! Why does it work, is it because that mountpoint has different permissions?
/data is mount point of underlaying block partition with (kinda) raw access to ext4/f2fs file system, while /storage/emulated is sdcardfs file system emulated on top of /data/media for MTP compatibility. yes, additionally isolated mount namespaces, SELinux or disk quota may disturb disk access as the permissions differ.

Categories

Resources