[Q] rooted - How to access system storage r/W from PC - Galaxy Tab S Q&A, Help & Troubleshooting

- what PC-tool to r/W access e.g. /system/etc/permission/platorm.xml from the PC (I tried MPE, but it fails when it comes to WRITE)
- what has to be done on the Tab to get this access (mayey be mount the System Partition r/w ?? I am a bit noob on those things)
Doing it by comandline (adb) is possible but boring

Related

Exploring how to get Android to cleanly unmount /data

Several of us are exploring how to change an Android build so that it unmounts the /data partition cleanly when shutting down. This thread is dedicated to discussion of how to do that. Solutions may eventually appear here, but will work their way into the various build and/or kernel threads.
reserved
Watch this space for a summary of answers and solutions.
Roughly how it works today
The Shutdown thread stops applications, and then tells the Volume Manager to shutdown. After that, the Shutdown thread calls reboot() which calls _reboot() which turns off power.
I think the key is in Volume Manager.
Volume Manager's Java code works with the C++ application "vold".
Volume Manager gets a list of mounted filesystems from vold.
Vold returns a list that it manages, not the same as "df" or "mount" from the command line. That list (at least in Fresh Froyo) does not include /data or /cache.
Volume Manager then, for each filesystem in the list, tells vold to unmount the filesystem. Each filesystem has a timeout, and Volume Manager eventually either finds success or gives up.
The "vold" application can be controlled with a command-line executable called "vdc". Commands like : "vdc volume unmount /sdcard" or "vdc volume list", use the same syntax as Volume Manager uses to talk to vold.
Perhaps the answer to all of this is to get /data registered with vold at startup.
What I have tried, with great failure, is a terrible hack where I modified the implementation of reboot() to call system("/system/bin/rosysdata") before calling _reboot(). Then I created /system/bin/rosysdata to remount /system and /data as r/o. That worked for a couple of shutdowns, but after that caused extreme filesystem failure a few times. It was a bad hack anyway, so I have never committed that.
If we can get the /data filesystem mounted by vold instead of just mounting it in the bootup scripts, it should get unmounted at shutdown, since VolumeManager gets a list of mounted volumes from vold and unmounts each of them.
I am trying this but don't have much success yet.
Another idea is to get android to execute a shutdown script as it shuts down.
The old initrd create severl problems with mounting because there was several binding to the data partition.
Now there is only one /data mounted to the partition.
The old script files has the problem with the binding but now they should work.
I think that vold can't be used with data so we need to exec:
Code:
sync
mount -o remount,ro /data
in a shutdown script.
energy cut
what about when the system crashes and battery has to be removed?
anergy cut ...
What about use different partitions?
/system, /data and /cache as different partitions...
the highest activity of reading and writing happens in /cache. Am I right?
I'll change the nbh and sysinit.rc to meet this.
tiagoclc said:
what about when the system crashes and battery has to be removed?
anergy cut ...
What about use different partitions?
/system, /data and /cache as different partitions...
the highest activity of reading and writing happens in /cache. Am I right?
I'll change the nbh and sysinit.rc to meet this.
Click to expand...
Click to collapse
Isn't /cache a symlink to /data/tmpcache ? couldn't we redirect to /mnt/sdcard/cache ? (or anywhere else ?)
Due to these issues I can reboot normally only if I clear Dalvik cache. Maybe it could be automatic on boot lol
drvitorino said:
Due to these issues I can reboot normally only if I clear Dalvik cache. Maybe it could be automatic on boot lol
Click to expand...
Click to collapse
I second this or how about we manually enter mount -o remount, ro /data on terminal before turning it off?
ohohoh, apparently L1qu1d fixed my issue with the new kernel and the update from http://forum.xda-developers.com/showthread.php?t=848921
Unfortunately wi-fi and data connection is still not working with the update in my kaiser. But L1qu1d may be happy to know that his code inside the update has something that fix data corruption when turning off/on the device.
drvitorino said:
ohohoh, apparently L1qu1d fixed my issue with the new kernel and the update from http://forum.xda-developers.com/showthread.php?t=848921
Unfortunately wi-fi and data connection is still not working with the update in my kaiser. But L1qu1d may be happy to know that his code inside the update has something that fix data corruption when turning off/on the device.
Click to expand...
Click to collapse
In my test, some data corruption still exists (when lots of widgets and data partition close to full) but is easily corrected by clearing the dalvik-cache, but some apps are lost in the launcher. I still think that unmounting the data partition before turning off or reboot is the best way to prevent this.
n2rjt said:
The Shutdown thread stops applications, and then tells the Volume Manager to shutdown. After that, the Shutdown thread calls reboot() which calls _reboot() which turns off power.
I think the key is in Volume Manager.
Volume Manager's Java code works with the C++ application "vold".
Volume Manager gets a list of mounted filesystems from vold.
Vold returns a list that it manages, not the same as "df" or "mount" from the command line. That list (at least in Fresh Froyo) does not include /data or /cache.
Volume Manager then, for each filesystem in the list, tells vold to unmount the filesystem. Each filesystem has a timeout, and Volume Manager eventually either finds success or gives up.
The "vold" application can be controlled with a command-line executable called "vdc". Commands like : "vdc volume unmount /sdcard" or "vdc volume list", use the same syntax as Volume Manager uses to talk to vold.
Perhaps the answer to all of this is to get /data registered with vold at startup.
Click to expand...
Click to collapse
Since our data is installed in NAND, I don't think "vold" can mount Nand partition. Not too sure though.
clemsyn said:
Since our data is installed in NAND, I don't think "vold" can mount Nand partition. Not too sure though.
Click to expand...
Click to collapse
from: http://osdir.com/ml/android-porting/2010-06/msg00279.html
Vold doesn't mount Nand.
Mounting of Nand partitions is done in init.rc
mountd: mount all fs defined in /system/etc/mountd.conf if started,
receive commands through local socket to mount any fs. The source is
in device/system/bin/mountd.
-
Sreekanth
On Jun 24, 5:47 pm, "Dennis.Yxun" <[email protected]> wrote:
> HI Community:
> I'm using donut branch, and my system have two block devices, I want them
> all mounted
> 1) nand flash: /dev/block/sdb
> 2) MMC/SD card: /dev/block/mmcblk0
>
> Current, I successfully use vold mount the MMC/SD card
> (/dev/block/vold/179:0 -> /dev/block/mmcblk0)
>
> My question here is :
> Does vold support to mount the Nand Device too? like
> mount /dev/block/sdb to /sdcard/nand
> mount /dev/block/mmcblk0 to /sdcard/mmc
>
> Dennis
is this true?

Need help unpackimg boot img

I checked around and I found some stuff for GS3 but nothing for ouya. I'm looking into checking out the boot image to make changes so my usb drive shows up as an sdcard. I've made some changes to init and vold files, but on reboot, the init gets replaced. I want to look at the boot image to see what I can change to enable something like this. Older version of the ouya firmware were having issues with usb drives not being mounted and the solution was to change the vold file to mount usbdrive in mnt/sdcard; which is what I want. Ouya devs heard our cries so secondary_storage in the other init file is listed for the mmc now and it labels usbdrive as external_Storage , to be mounted to mnt/usbdrive. I've got some games that don't save files to an external usbdrive and keeps looking for external storage that is NOT a usb drive; ie sdcard.
Namely the app I want is worms armageddon. I'm tired of using my fat thumbs to rope around. I want to try it out with the joystick.

[Q] Ntfs problem with s4 gt-i9515 4.4.2

hi , i got a galaxy s4 gt-i9515 4.4.2 (build ver. that ends with NK2)
i rooted it using this guide: " can't post the link since new user but is by mrwolf s4 towelroot etc.. ", with the right NK2 kernel file.
i checked with root checker and it says root is ok, and using the paragon ntfs app i see in settings that SELinux is on permissive.
My problem is that i can't figure out a way to read ntfs devices with s4; the only way i can read them is using Total Commander + Paragon Total Commander plugin but i don't like the Tot. Com. interface plus i need to download the file form the drive to see them.
Using Paragon ntfs app when i mount the drive (WD 1tb or any ntfs pendrive.. tried both) the warnign on top "blank disk etc. " remain and i can't find the files anywhere in the phone i tried using defalut viewer and File Manager with root access on it, i looked everywhere in any folder , i tried using different apps too like USB OTG helper but it says code 9 error and in the folder that it should be mounting the drive i can't see anything.. is empty.
Did i really root my phone?i see the knox counter is 0x0.
Plus i notice that in sdcard there are folders named paragonntfs_1 2 3... etc i can't even delete them .. i finally did delete the paragonntfs_4 fodler but the others says write protected
Can you help me?
This is the s4 Mini forum, model number i919x
Maybe try the forum for your phone instead

Huawei G8

I try to install update 5.1.1 for huawei g8 b160 but when it restart it go to recovery mode always and the is no files on phone memory even system files ( i accidentally format sys file from recovery ) so any one help me !!
To fix the issue that you are facing try to;
Use USB storage mode instead of MTP, if it is supported by the phone. This is apparently not an option for LG Optimus L5 (e610), because this phone has unified internal storage (file storage is in /data/media on the same ext4 filesystem as /data), which cannot be exported as an USB storage device.
Clear data of the “Media Storage” app, then use the SDrescan app to rebuild the media database (discussed here).
Share files over the network using third-party apps such as AirDroid or one of Samba server apps (in the latter case you will need to have root to make the server reachable from most clients, including Windows).
Get more details and many more different ideas in Huawei G8 Manual.

How to correctly mount and set permissions for ext4 MicroSd card on stock system ?

On ASUS stock rooted system, we can make use of fdisk to create a primary partition then use make_exr4fs to format that partition to ext4.
Once done and the /dev/block/mmcblk1p1 partition mounted as /storage/MicroSD it is possible as root to interact with it, but as non root you can only read data from there, not write.
How do you set selinux permissions correctly to allow writing without root ? The folder is set to 777, it cannot be a file permissions problem, it leaves us selinux policies to fix.
I tried to apply the selinux policy used for exfat external volumes but it still failed for writing.
Thanks to @Chainfire and Red Hat selinux documentation, I was able to resolve this without modifying the system, patching rules, disabling selinux or anything like that.
A two lines script can take care of this, requiring supersu and tools that are already on the device.
su --mount-master -c "mount -t ext4 -o discard /dev/block/mmcblk1p1 /storage/MicroSD"
chcon -R ubject_r:media_rw_data_file:s0 /storage/MicroSD
I'm still unsure to what each things are related to at 100%, but the context source of 3rd party application can write to media_rw_data_file , and this is what is applied on user's media folder inside data partition.
Some applications may still fail at understanding this is the external storage, but as my favorite file manager Fx does, that's what I want needed.
For some reasons the lost+found folder remains inaccessible, but the recursive part of chcon should take care of it on next boot.
Hope this will be useful to someone else.
Will your script work with another stock-ROM too? I've a Sony phone. Never had a phone I could get an ext4-formated sdcard working. Only with cyanogenmod installed ext4-formated cards work out of the box.
I'm a noob so I don't about scripting or understand details of file systems.
It will depend on where the Sony custom built system is mounting the micro sd card, if it mounts it at the same place, it will work.
But your message should have been a comment to my answer and not an answer proposal as you don't bring an alternative solution

Categories

Resources