Lilipop (CM12) mounting a filesystem as root (not accessable to any other user) - Android Q&A, Help & Troubleshooting

I have liliopop CM12 installed on my Note3, I have a encrypted partition, which I mount using luks, I have the mount working now with out issues so the encrypted part can be ignored, if any one is interested I can explain how I did what I did and post the actual scripts used.
The problem is that if I su - from juicessh and then mount the partition the partition is mounted, but only the juice su'ed user can see it. I can log this user out and back in and still see it, but only this users sees it.
For instance
$whoami
10211
#su -
0
#exit
$whoami
10211
now if I run:
$su -l --shell /system/bin/sh -c 'mkdir /storage/sdcard2 ; chmod 777 /storage/sdcard2 ; mount -t ext4 /dev/sda1 /storage/sdcard2 ; df ; exit' ; df
Now this will show that /storage/sdcard2 is mounted when I'm root
when I'm non-root (AKA not ID 0) then I do not see the mount.
Now I login as root using sshdroid:
#whoami
root
#df
does not show sdcard2
Lastly via "Root explorer":
does not see anything mount in /storage/sdcard2 either.
So the issue I'm facing is that I can mount a partition as root and access it, but only as the user I mounted it as, in fact what even makes less sense is that root via sshdroid and root via juicessh can not see what the other user did (mount wise), though if I create a root accessible file that is fine. I used to do this is CM11 using the same commands (different mount points do to the OS change) without any issue. It is as if each root user is unique which is fine on the surface, but since I need access to this encrypted partition, only when accessing documents for work, which normally it is not mounted, but once mounted I need it to be accessible as any other sdcard. Any suggestions?
Thanks,
ERIC

Partly working
I got it partly working if I disable "Mount namespace separation", however I still have an issue that /storage/emulated/0 does not exist, until I use a program like Root Explorer, I mean it exists, but the shell script can not change to it (mount point not found exception), I'm assuming this is also something to do with Lilipop, but I'm not sure what or how to resolve it.
ERIC

Hi,
I state that they are not very knowledgeable about linux commands.
I have installed on my SM-G900F ROM cm12 and it works!
I created a second user, but it does not have root privileges.
I would like, however, to know how you can create a secono user with root privileges?
Thanks for the reply

Related

Using all of the NTs storage

I posted this in the nook touch forum by mistake. Please read below and let me know what you think.
One of the biggest issues I had with my nook was the 16/1GB division between content I can load and content from B&N/etc. Not being able to use that 16GB how I wanted was something I set forth to fix. Here is my solution to make this usable to non-rooted apps.
1) Root if not already rooted.
2) Make a directory inside of /data. I chose /data/usrdata.
3) remount / as RW with the command mount -o remount,rw -t rootfs rootfs / (credit to Indirect for this, as I could't find the command to do so)
4) mkdir /mnt/internal . We need somewhere to mount /data/usrdata/ and /mnt is public enough.
5) busybox mount -o bind /data/usrdata /mnt/internal. Mounts /data/usrdata to /mnt/internal.
6) For good measure, chmod 777 /mnt/internal and chmod 777 /data/usrdata.
Now, /mnt/internal should have whatever free space /data has, and should be read/write accessible from any program. A quick test with touch+terminal emulator shows new files as being created with RW permissions for all.
Alternatives: When I was initially thinking about ways to do this, my first reaction was to just open up /data to be read only to all, then have my usrdata folder be read/write all. However, I know part of android's app security model depends on some of these permissions. While I can't think of anything breaking or sensitive data being leaked, I decided against it. If anyone has any thoughts as to that scenario, I am very interested in hearing about it.
USB support: This will *not* be mountable under USB. Unfortunately you are still limited to transfering the data from a computer to the B&N internal storage or SDcard first, then moving the data internally. The problem that I see with this is similar to my understanding of the galaxy nexus situation, where the system can't unmount its /data partition and let the USB host take over. Another alternative to this could be to write an image file and mount that over usb (I've done this on my Evo, it worked so-so). Problem with that is that it really wouldn't grow/shrink with the storage. I suppose you could do some shell trickery and pipe it through gzip somehow, but that wouldn't help very much.
Let me know what you think and if you have any ways to improve this.
UPDATE: Persistance:
To make this persistant across reboots, run these commands as root:
1) mount -o rw,remount -t ext4 /dev/block/platform/mmci-omap-hs.1/by-name/system /system
2) echo mount -o remount,rw -t rootfs rootfs / >> /system/bin/clrbootcount.sh
3) echo mkdir /mnt/internal >> /system/bin/clrbootcount.sh
4) echo busybox mount -o bind /data/usrdata /mnt/internal >> /system/bin/clrbootcount.sh
5) echo mount -o remount,ro -t rootfs rootfs / >> /system/bin/clrbootcount.sh
All this does is put the following at the end of clrbootcount.sh
mount -o remount,rw -t rootfs rootfs / #Remounts root as RW. Root is regenerated at each reboot, so /mnt/internal is never going exist on a fresh startup
mkdir /mnt/internal #make /mnt/internal, see above
busybox mount -o bind /data/usrdata /mnt/internal #Binds the directory
mount -o remount,ro -t rootfs rootfs / #remounts root as RO. Unsure if this is necessary, but since it runs as RO, its probably better safe than sorry.
Thanks to eded333 for mentioning a good place for the script.
Click to expand...
Click to collapse
I was the one who wrote the script gameman. >.>'
Very nicely done.
Does Android possess a fstab? If so, could these changes (also) be made there and still be persistent?
this is a good work around
Am I understanding this correctly in that if I follow these guidelines I can move my data over to the Barnes and noble alotted storage that we were complaining about not having available?
Sent from my Nook Tablet using Tapatalk
downsay said:
Am I understanding this correctly in that if I follow these guidelines I can move my data over to the Barnes and noble alotted storage that we were complaining about not having available?
Sent from my Nook Tablet using Tapatalk
Click to expand...
Click to collapse
That is correct, from what I understand as well.
Sent from my BNTV250 using Tapatalk
liquidzoo said:
Very nicely done.
Does Android possess a fstab? If so, could these changes (also) be made there and still be persistent?
Click to expand...
Click to collapse
From what I could tell, it does, but its not the normal /etc/fstab. It looks like they have a daemon or something that mounts the sdcard and the media (1gb) drive. When I first looked at its version of the fstab, it looked like it only took a block device, which doesn't quite work for the directory binding.
downsay said:
Am I understanding this correctly in that if I follow these guidelines I can move my data over to the Barnes and noble alotted storage that we were complaining about not having available?
Click to expand...
Click to collapse
Yes that is correct. You still cannot mount it under USB, however. If you have some other way of getting the files there, however, its open as an option. I've been using swiFTP (in the market) to do that. Could also copy and move from the media/sd cards that do mount to the PC, but thats a two step process. I've thought about getting MTP setup so that you can see that folder via USB, but haven't really had a chance to look into how that would work.
*Note, when using swiFTP and other programs more than likely, you may get some file permissions errors or other odd errors about corrupt files. These are just the file permissions that the program defaulted to, and can be fixed by doing a 'chmod -R 777 /mnt/internal/'. Don't have this problem on sdcard or media because they are just FAT32 formatted, which don't support permissions.
Trying to understand ...
gameman733 said:
I posted this in the nook touch forum by mistake. Please read below and let me know what you think.
Click to expand...
Click to collapse
I don't understand the purpose of the mounts. Why not just create /data/usrdata and put your stuff in there?
I know /data has "access-only/no-read" access for non-system apps, but anything in /data/usrdata/ should be visible (and no need to modify clrbootcount.sh).
If you need "/mnt/internal" (I don't see the need for that either), why not just use a soft link (which is permanent)???
The primary reason for using the mounts was that I was originally planning on trying to mount it in a way that would ignore file permissions, but didn't know at the time that you can't do that with a bind mount. Using a simple link would be just as effective in this case.
However.. / is Read only. Even when remounted read-write, this filesystem is actually regenerated every boot. So nothing in /mnt would stay past the next restart.
The purpose for having it in /mnt (could have been anywhere, I suppose, but it seemed a little more appropriate) was for apps that can't browse /data. For example, gameboid and related programs would get to /data and show nothing, because you can't browse it as a non-rooted app. Having a symlink or bind mount elsewhere in the filesystem where they can browse helps with that. The alternative was to remove the no-browsing permissions from /data. I didn't feel comfortable with doing this, however, as I'm sure there are some security risks to doing this. It probably isn't a big deal, but since we have the tools to do it while maintaining those existing permissions, why not go ahead and do that?
Is there a solution that does not require being rooted?
[I was gonna start a thread about this 1.0 GB vs 16GB issue. Glad someone
beat me to it. ]
A day or two ago, I side-loaded a couple of movies, each about 400-MB in size,
and was surprised to notice that I had only 20% of my 1.0GB remaining.
I haven't 'bitten the bullet', and got brave enough to 'root' my Nook yet.
(Still not sure yet whether my wife will keep it, and it's an XMAS-gift for her.)
But, I'm quite fluent in Linux, so if we DO keep it, I'll definitely get around
to doing the 'root'.
Meanwhile, if anyone does find a way, without rooting, to re-allocate these
built-in assigned storage quotas, please post it in this thread.
Cheers...
gameman733 said:
The primary reason for using the mounts was that I was originally planning on trying to mount it in a way that would ignore file permissions, but didn't know at the time that you can't do that with a bind mount.
Click to expand...
Click to collapse
To solve this issue I've compiled fuse kernel module and bindfs userspace utility. Bindfs is similar to "mount -o bind" but can override permissions and ownerships. I can share how-to instruction and compiled binaries if you want

[Q] How can I mount /system as writeable in adb shell?

I thought I'd bricked my NT but it would appear that it is actually alive because it turns up with adb and I can get shell and then issue command su, but what I can't do is replace the old build.prop because file system is not writable. How do I remount it to be writeable from a shell please?
Thanks!
CelticWebSolutions said:
I thought I'd bricked my NT but it would appear that it is actually alive because it turns up with adb and I can get shell and then issue command su, but what I can't do is replace the old build.prop because file system is not writable. How do I remount it to be writeable from a shell please?
Thanks!
Click to expand...
Click to collapse
mount -o rw,remount -t ext4 /dev/block/mmcblk0p8 /system
Type mount to verify rw, make your changes
mount -o ro,remount -t ext4 /dev/block/mmcblk0p8 /system
Type mount to verify ro
Thank you!
hwong96 said:
mount -o rw,remount -t ext4 /dev/block/mmcblk0p8 /system
Type mount to verify rw, make your changes .....
Click to expand...
Click to collapse
I don't have this tablet but a phone with similar problem.
this does not work for me, although I have ROOTED phone MTK6572, android 4.2.2 ;
"/ root" gets RW, but "/system" stays RO.
I get this message:
error
"the item "system" is read only"
I have tried many apps in phone (remount system RW, FX file expl. ....), and mtkdroid-tools and ADB shell in PC.
I have tried many similar version of that command, too, inc. busybox remount. non of those work.
any ideas, what to try next?
what file or thing or item and where I need to change to get this remounting system to RW done?
it is ext4, and remountable.
I have SuperSU in phone but can't update its binaries: /system stays RO, what ever I try...
I can't change audios, anything in /system.
very annoying...
Jack_Rover said:
I don't have this tablet but a phone with similar problem.
this does not work for me, although I have ROOTED phone MTK6572, android 4.2.2 ;
"/ root" gets RW, but "/system" stays RO.
I get this message:
error
"the item "system" is read only"
I have tried many apps in phone (remount system RW, FX file expl. ....), and mtkdroid-tools and ADB shell in PC.
I have tried many similar version of that command, too, inc. busybox remount. non of those work.
any ideas, what to try next?
what file or thing or item and where I need to change to get this remounting system to RW done?
it is ext4, and remountable.
I have SuperSU in phone but can't update its binaries: /system stays RO, what ever I try...
I can't change audios, anything in /system.
very annoying...
Click to expand...
Click to collapse
I understand your frustration, however, you should try to post your question to the MTK6572 or Samsung S4 thread. Anyway, since you have asked I'll answer. The mount point for /system is different on each phone model. There is no one standard /system mount point. On the Nook Tablet and Nook Color it is mmcblk0p8. On your device it is different, so the command you tried will not work.
You need to find out what the /system mount point is for your phone.
Open terminal from phone and type su.
Press enter.
At the # prompt type cat /proc/mtd
Press enter.
Look at the output on the screen and see what the mount point is for /system.
A the the # prompt type mount -o rw,remount -t ext4 /dev/block/enteryoursystemmountpointhere /system
Note: replace enteryourmountpointhere with your mount point from the previous step.
Change /system to ro when done. Hope this works for you.
Also download root checker app to ensure you rooted properly.
hwong96 said:
I understand your frustration, however, you should try to post your question to the MTK6572 or Samsung S4 thread. ......
Click to expand...
Click to collapse
thanks for your responce.
with that "cat ..." I got : "no such file or dir"...
I know already that my mnt point is (did try already these earlier):
mount -o rw,remount /dev/block/mmcblk0p4 system
mount -o remount,rw -t ext4 /[email protected] /system
but no success, " system read only" stays, and no change.
Jack_Rover said:
thanks for your responce.
with that "cat ..." I got : "no such file or dir"...
I know already that my mnt point is (did try already these earlier):
mount -o rw,remount /dev/block/mmcblk0p4 system
mount -o remount,rw -t ext4 /[email protected] /system
but no success, " system read only" stays, and no change.
Click to expand...
Click to collapse
Did you use the root checker app to verify for proper root?
hwong96 said:
Did you use the root checker app to verify for proper root?
Click to expand...
Click to collapse
yes.
I have many apps (e.g. FX, ATools, TitaniumBup, busybox, ES, mount /system rw, SD maid, root expl., adbd insec., rootAppDel, a.s.o.) that use root rights, and phone's superSU gives the rights to them.
AT:s terminal has # prompt, so it must be root. (?)
adbd insecure's current status = binary: insecure; usb debugging: enabled.
I have earlier version SU's binaries working ok, but updating SU made this binary-update-issue: " binary update failure" and so SU-app won't open (it closes after failing binary update), though otherwise it works ok (and worked earlier until I did let G-play to update it, silly me!).
somehow my /system has been "open" i.e. RW earlier, since busybox and superSU has been installed, but now it is "stuck" to that RO-status. "/" opens, but "/system" not.
MTK Droid Root & Tools v2.5.3 (from here xdadevs) gets root shell ok, but fails when trying to install SU, busybox a.s.o. ("read-only system") - and it "crashes".
maybe kernel related? or boot loader, or .... what?
-----
btw, my apologises, that I wrote this issue to this thread, but I found my "problem" here with the search, and after posting I realized that this is "tablet area..."
so this part can be moved to better place by those who know best where to - though not to trash, anyway....
Jack_Rover said:
yes.
I have many apps (e.g. FX, ATools, TitaniumBup, busybox, ES, mount /system rw, SD maid, root expl., adbd insec., rootAppDel, a.s.o.) that use root rights, and phone's superSU gives the rights to them.
AT:s terminal has # prompt, so it must be root. (?)
adbd insecure's current status = binary: insecure; usb debugging: enabled.
I have earlier version SU's binaries working ok, but updating SU made this binary-update-issue: " binary update failure" and so SU-app won't open (it closes after failing binary update), though otherwise it works ok (and worked earlier until I did let G-play to update it, silly me!).
somehow my /system has been "open" i.e. RW earlier, since busybox and superSU has been installed, but now it is "stuck" to that RO-status. "/" opens, but "/system" not.
MTK Droid Root & Tools v2.5.3 (from here xdadevs) gets root shell ok, but fails when trying to install SU, busybox a.s.o. ("read-only system") - and it "crashes".
maybe kernel related? or boot loader, or .... what?
-----
btw, my apologises, that I wrote this issue to this thread, but I found my "problem" here with the search, and after posting I realized that this is "tablet area..."
so this part can be moved to better place by those who know best where to - though not to trash, anyway....
Click to expand...
Click to collapse
Don't know what else to suggest, except maybe contact Chainfire on G+.
.

Encryption - LUKS / EDS / Cryptonite

I recently upgraded from my S2, to the S4. I'm enjoying the snappiness, and as are we all, a bit disappointed by the locked down nature of it. One of the things I liked about my old phone was the ability to have an encrypted container for sensitive files. In particular, I was using LUKS Manager to mount encrypted folders and it worked perfectly. However the stock kernel on the S4 appears to lack the dm-crypt module, and I am therefore unable to use it on the new phone.
I've tried a few other things as well, including Cryptonite and EDS Lite (as well as the paid version), but ran into similar problems. With EDS paid version there is source available for the required kernel module, but it hasn't been built for the S4 yet, it seems.
I'm willing to get into some of the nitty gritty details, but I was wondering if anyone else had any success building dm-crypt or the eds module for the s4 yet. Or if anyone would have some resources that might be a good starting point so I could build them on my own.
Thanks!
(MJ7, rooted)
Edit:
After a bit more digging I found the LUKS Guardian project, which looks promising. (I can't post links yet, but google "android cryptsetup luksopen" and it should be the first result). Their binary is throwing a segfault when i try it, but I'll pull it down and play with it tonight at home to see if I can get anywhere.
I think our kernel may in fact have DM-CRYPT available, but for some reason it's simply not working. In LUKS when I attempt to mount a file, it thinks it successfully mounts (and creates a folder) but it when I unmount, anything I copied over is still there. I find it telling though that it will only "mount" a file with the correct password. So the encryption may be working, while the mounting is not. I'm very comfortable in linux so I'll poke around and see if there's anything I can glean from the terminal.
One step closer, but not quite there yet. I SSH'd in and started playing with the LUKS Manager app and have come to the conclusion that it's really the mounting that is causing problems.
LUKS Manager creates a shell script over in /system/bin/luks. I pulled this off and looked over it a bit, and managed to run the pieces one by one until I came to failure. Essentially what is happening is it's using busybox to do the following:
mknod
losetup
/system/bin/lm.cryptsetup luksOpen #Yay, I don't need to compile LUKS Guardian!
mkdir ${mount_path}
chmod 777 ${mount_path} # THIS FAILS
mount the mapper to the mount path
chmod 777 ${mount_path} # THIS FAILS
chmod 777 -R ${mount_path} # THIS FAILS
So what you're left with is an encrypted volume which mounts just fine, but is only readable by root. Permissions on ${mount_path} are 700 and neither busybox chmod nor standard chmod will change them. I've also tried mounting the mapper with the busybox mount as well as the builtin. Same result. Further, it looks like I'm unable to (as root) chmod pretty much anything.;
Frustrating, because I can clearly see that the data is there when I'm in a root terminal, but none of the apps can access it.
Anyone have any ideas on why I can't chmod? Or how to get mount to grant 777 in the first place?
spdqbr said:
One step closer, but not quite there yet. I SSH'd in and started playing with the LUKS Manager app and have come to the conclusion that it's really the mounting that is causing problems.
LUKS Manager creates a shell script over in /system/bin/luks. I pulled this off and looked over it a bit, and managed to run the pieces one by one until I came to failure. Essentially what is happening is it's using busybox to do the following:
mknod
losetup
/system/bin/lm.cryptsetup luksOpen #Yay, I don't need to compile LUKS Guardian!
mkdir ${mount_path}
chmod 777 ${mount_path} # THIS FAILS
mount the mapper to the mount path
chmod 777 ${mount_path} # THIS FAILS
chmod 777 -R ${mount_path} # THIS FAILS
So what you're left with is an encrypted volume which mounts just fine, but is only readable by root. Permissions on ${mount_path} are 700 and neither busybox chmod nor standard chmod will change them. I've also tried mounting the mapper with the busybox mount as well as the builtin. Same result. Further, it looks like I'm unable to (as root) chmod pretty much anything.;
Frustrating, because I can clearly see that the data is there when I'm in a root terminal, but none of the apps can access it.
Anyone have any ideas on why I can't chmod? Or how to get mount to grant 777 in the first place?
Click to expand...
Click to collapse
Since you're on MJ7, it's probably SELinux doing that to you.
You might try using chmod 555 (read + execute) to see if that's allowed.
What is the mount point that you're trying to use? Perhaps that's also being blocked by SELinux.
Thanks for the suggestions. I've poked around a bit at selinux, but with no hope of disabling it I'm not sure if I'll make it through the last hurdle. I've tried a few different mount points and a few different chmod permissions to no avail. I *did* however have one breakthrough, but now I'm just flat out puzzled.
I mounted it via the luks script I mentioned earlier, and then do a busybox umount on it (leaving the mapper in place). I then checked the mount options for my external sd card, since both it and the LUKS volume are vfat. I remounted the mapper using
busybox mount /dev/mapper/test /storage/extSdCard/test -o rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,iocharset=iso8859-1,shortname=mixed,utf8
This mounts the drive with user, group, and permissions all set exactly like other file in the external SD card. However es file explorer and all other apps show the mount point as simply empty. If I'm not on command line, I can't see anything in it, which is utterly baffling to me.
From the terminal I can copy files out to another location (this is a luks volume I created on the old phone, so it already had data in it) and access them just fine via esfile explorer and various text editors.
The data is there, it's decrypted, it's accessible through command line, but all my apps simply refuse to acknowledge it.
Edit:
I'm not the only one experiencing this mounting phenomena... https://groups.google.com/forum/#!topic/android-kernel/JeY_u-pHcxQ
Edit:
According to this, android 4.2 made is so that application-created mount points are not globally accessible. They suggest a few workarounds which I have not yet had a chance to try. This certainly explains the problem though!

How to auto mount cleanly a partiton on boot

I have a second partition on my SDCARD at /dev/block/mmcblk1p2, all I want to do is ensure that it is always mounted as /storage/sdcard0/mount seems simple I can do it in 5 second on Linux, on Android, it seems impossible I can try to add a hack, but that is lost every-time I update the ROM. There has to be some simple way to do it, that I'm missing. The best I have is to load up a terminal emulated su to root and run: mount -t ext4 /dev/block/mmcblk1p2 /storage/sdcard0/mount
Now in theory, the following would work but for 2 things:
mkdir /storage/sdcard0/mount
su - root -c 'mount -t ext4 /dev/block/mmcblk1p2 /storage/sdcard0/mount'
But for the fact the Android's su does not understand -c so that is out. as well as the fact that non-root users (u0_a216 in my case) can not access /storage/sdcard0.
All I want is a simple way to ensure that this is always mounted where I want it when I need it, yet this simple task is nearly impossible it appears on Android, so why is that?
The issue here is that the fat32 partition does not support large files so I need a separate partition that does such as ext4, in reality if the external sdcard could just be ext4 there would be no issues, and it would be faster, but that is Android for you.
Any suggestions?
Thanks,
ERIC
Insert mount script to init.d folder...
via XDA Premium
Ok, I have this mostly working with juicessh and tasker now for now
I have 2 shell scripts:
mountDev.sh:
Code:
mkdir /storage/sdcard2
chmod 777 /storage/sdcard2
mount -t ext4 /dev/block/mmcblk1p2 /storage/sdcard2
umountDev.sh
Code:
umount /storage/sdcard2
rmdir /storage/sdcard2
In Tasker I have 2 tasks defined:
I'm using the JuiceSSH plugin to open a terminal to localhost I then execute:
To Mount:
Code:
su -l --shell=/system/bin/sh --command='cd /storage/sdcard0 ; sh ./mountDSev.sh ; exit' ; exit
To umount:
Code:
su -l --shell=/system/bin/sh --command='cd /storage/sdcard0 ; sh ./mountDSev.sh ; exit' ; exit
I then created 2 icons, 1 for each operation on the home screen. I also created a Device Boot event to automatically execute and mount the task.
This works, mostly, however even though it is root, sometimes I get errors such as /storage/ is readonly, which makes no sense since it could create the directory at boot, but can not remove the directory later on, since it is readonly. Its a minor thing currently, but annoying.
The benefit of this is it is easy to transfer between ROM images and devices without worrying about it being wiped out every-time I update. In theory it also works without init.d support being enabled. Down side is it you need Tasker and the JuiceSSH plug-in so it costs money.
Hope this helps others.
ERIC

Help Remount Default /sdcard PATH, Please

Reasons:
0.) You know, apps like messing up internal storage.
1.) I have installed dozens of ROMs flashed with DualBoot Patcher(It's a great tool), and all of them share the same /sdcard path( /data/media/0, actually it's /raw/data/media/0 ), it's a terriable mess.
2.) Android Nougat does NOT have xposed yet, so I cannot use xposed module XInternalSD to do this.
Due to /sdcard being linked to /storage/emulated/0, I should mount -o bing $another_path to /storage/emulated/0.
What I want to do is:
remount $data_partition_mount_point/media/$my_path to /storage/emulated/0 when the phone is booting, so my system can use another path for internal storage
I want to unmount the default /storage/emulated and only to mount /storage/emulated/0 to keep /storage/emulated clean.
CAN I ?
But after too many times failed, I failed again. I CANNOT mount $my_path as Internal Storage again. It ends up with "Access Denied",or "cross-device link", or seperated permissions(not as a sdcard)
Also, I tried to modify install-recovery.sh to let my scripts execute when booting, but sepolicy denied my orders (like mkdir, mount, setenforce ). So, I run my scripts via APP "Boot Shell".
Is there anyone who know how to do this? Or, can a script change the default Internal Storage path?

Categories

Resources