Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to copy to overlayFS using adb shell? #73

Open
Uzver123 opened this issue May 31, 2024 · 3 comments
Open

How to copy to overlayFS using adb shell? #73

Uzver123 opened this issue May 31, 2024 · 3 comments

Comments

@Uzver123
Copy link

Uzver123 commented May 31, 2024

Using ADB shell command to write directly to location gives error even after overlayFS is installed:

mv: /vendor/etc/camera/camxoverridesettings.txt: Read-only file system

I found this answer suggesting need to write to location where overlayFS is mounted instead /tmp/overlay/, but on android this path is not existing, what's the path where overlayFS is mounted so i can use command line to move files to read only partitions?

@link-fgfgui
Copy link

same problem

@Uzver123
Copy link
Author

Uzver123 commented Jun 5, 2024

I found command mount in android terminal shows list of all mounts, got to figure out which mount corresponds to what partition though because too many.

You can run

adb shell
su
mount

one of the records

overlay on /vendor/etc type overlay (ro,seclabel,relatime,lowerdir=/vendor,upperdir=/dev/mount_overlayfs/upper/vendor,workdir=/dev/mount_overlayfs/worker/64521/2)

lowerdir=/vendor
upperdir=/dev/mount_overlayfs/upper/vendor
workdir=/dev/mount_overlayfs/worker/64521/2

ls: /dev/mount_overlayfs/: No such file or directory

@Uzver123
Copy link
Author

Uzver123 commented Jul 12, 2024

Solution turned out to be was very simple

find the overlay mount i.e. /odm/lib64
mount | grep /odm/lib64

remount as RW

mount -o remount,rw /odm/lib64

now can with ADB push files to /odm/lib64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants