[Q] ADB shell privileges can't write to SD card - Galaxy Tab 2 Q&A, Help & Troubleshooting

On my other Android devices (Acer Iconia A500, Nook Color, Motorola Droid), when I invoke "adb shell" from my PC, I get a "shell" user prompt ("$"), and I can read and copy files to directories on my SD card.
When I attempt to do that on the Tab2 (7.0"), I can read files on the SD card, but I cannot write to any directory there (/storage/extSdCard mount point).
Since I'm rooted, I can "su" to a "root" user prompt and do what I want. However, what I really want is to move files to the SD card via "adb push", which uses the "shell" user, and thus doesn't work.
I've tried "adb root" from the PC, and that just disconnects the PC from the Tab2 until I unplug and replug the USB cable into the PC.
GT-P3113 running stock 4.1.1 (except for rooting via Odin).
Any suggestions as to what might be wrong?

ADB Root should automatically reconnect the device in root mode.
Go to
Settings==>Developer Options==>Root access
make sure its set to "Apps and ADB"?
Alternately try pushing to
/extSdCard and not /storage/exSdCard
It works without root for me.

Not yet
wjptam said:
ADB Root should automatically reconnect the device in root mode.
Go to Settings==>Developer Options==>Root access
make sure its set to "Apps and ADB"?
Alternately try pushing to /extSdCard and not /storage/exSdCard
It works without root for me.
Click to expand...
Click to collapse
"adb root" gives "adbd cannot run as root in production builds"
Under Settings/Developer Options, I have no "Root access" setting
There is no "/extSdCard" at the root level, and "adb push" to it fails.
Edit: Permissions on the mount points:
[email protected]:/etc # lo /storage/
lo /storage/
d--------- system system 2013-03-06 17:34 UsbDriveA
d--------- system system 2013-03-06 17:34 UsbDriveB
d--------- system system 2013-03-06 17:34 UsbDriveC
d--------- system system 2013-03-06 17:34 UsbDriveD
d--------- system system 2013-03-06 17:34 UsbDriveE
d--------- system system 2013-03-06 17:34 UsbDriveF
drwxrwxr-x system media_rw 1969-12-31 16:00 extSdCard
drwxrwxr-x root sdcard_rw 2013-03-06 17:41 sdcard0
It's the "media_rw" group owner, rather than the "sdcard_rw" group owner, that is the problem. The "shell" user has group access to "sdcard_rw" but not "media_rw". Of course "addgroup shell media_rw" (and its numerical equivalents) fails.

I too find this very annoying
adb shell...
sgn2$ id
uid=2000 gid=2000 groups=1003,1004,1007,1009,1011,1015,1028,3001,3002,3003,3006
sgn2$ ls -lad /storage/extSdCard
drwxrwxr-x 39 1000 1023 16384 Jan 1 1970 /storage/extSdCard
so adb doesn't have group 1023 needed to write to the external sd card. /etc/group doesn't exist. I don't know how to change this, and googling for a fix brought me here!
thanks very much for any help
Paul
---------- Post added at 08:09 AM ---------- Previous post was at 07:57 AM ----------
OK, after random googling I found this:
so the permission to write to the card is defined here:
http://developer.android.com/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE
and somehow we should be able to use the "pm" command to add permission:
http://developer.android.com/tools/help/adb.html
"list permission-groups"
"grant permission".
but adb isn't a package. hmmm.

!SOLVED!
so in group ID terms, adb shell gets sdcard_rw but not media_rw which is the group we need to have write on the external sd card.. a reminder:
Code:
[email protected]:/ $ ls -lad /storage/extSdCard /storage/sdcard0
drwxrwxr-x system media_rw 1970-01-01 01:00 extSdCard
drwxrwxr-x root sdcard_rw 2013-05-17 11:52 sdcard0
or numerically...
[email protected]:/ $ ls -ladn /storage/extSdCard /storage/sdcard0
drwxrwxr-x 39 1000 1023 16384 Jan 1 1970 /storage/extSdCard
drwxrwxr-x 47 0 1015 4096 May 17 10:52 /storage/sdcard0
ah... http://forum.xda-developers.com/showthread.php?p=40845568
suggests that editing the /etc/permissions/platform.xml might work?
looking in platform.xml I see...
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
and
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
<group gid="media_rw" />
</permission>
I think the each permission name should only have ONE entry, i.e. the WRITE_EXTERNAL_STORAGE should be just sdcard_rw, the media_rw is bogus and gets ignored.
so, let's add this line:
Code:
<assign-permission name="android.permission.WRITE_MEDIA_STORAGE" uid="shell" />
then reboot. and voila!
Code:
[email protected]:/ $ id -a
uid=2000(shell) gid=2000(shell) groups=1003(graphics),1004(input),1007(log),1009(mount),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats)
my adb shell now has the required privilege to write to the external sdcard
--edit--
ok, no, it didn't work.

Related

A2SD with FRESH 2.0d

This may be a super n00b question, but I previously ran a MoDaCo ROM, and was able to use the A2SD instructions from code.google.com to get my apps to store to the SD. Today I upgraded to Fresh 2.0d, (which is awesome btw) and no matter what I do, it seems that downloading apps keeps using my system memory. here is the output of busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 95.5M 0 95.5M 0% /dev
tmpfs 4.0M 4.0K 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 170.0M 135.4M 34.6M 80% /system
/dev/block/mtdblock5 159.5M 60.2M 99.3M 38% /data
/dev/block/mtdblock4 130.0M 1.1M 128.9M 1% /cache
/dev/block/mmcblk0p2 677.4M 71.4M 569.9M 11% /system/sd
/dev/block//vold/179:1
2.9G 2.1G 788.2M 73% /sdcard
Is there a step that I'm missing somewhere? My use% on the /data partition seems to keep going up.
Thanks in advance for the help!!
See next comment
&RoidRage said:
See next comment
Click to expand...
Click to collapse
I'm sorry, I don't understand.
SchmediumTux said:
This may be a super n00b question, but I previously ran a MoDaCo ROM, and was able to use the A2SD instructions from code.google.com to get my apps to store to the SD. Today I upgraded to Fresh 2.0d, (which is awesome btw) and no matter what I do, it seems that downloading apps keeps using my system memory. here is the output of busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 95.5M 0 95.5M 0% /dev
tmpfs 4.0M 4.0K 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 170.0M 135.4M 34.6M 80% /system
/dev/block/mtdblock5 159.5M 60.2M 99.3M 38% /data
/dev/block/mtdblock4 130.0M 1.1M 128.9M 1% /cache
/dev/block/mmcblk0p2 677.4M 71.4M 569.9M 11% /system/sd
/dev/block//vold/179:1
2.9G 2.1G 788.2M 73% /sdcard
Is there a step that I'm missing somewhere? My use% on the /data partition seems to keep going up.
Thanks in advance for the help!!
Click to expand...
Click to collapse
1. Remount the drive by typing this command: adb remount
2. Enter the phone shell: adb shell
3. Type ls -l /data to get a directory listing of /data
4. Look for an entry named app. If the following is to the right of the entry, a2sd is running: "-> /system/sd/app"
5. If not, type the following commands:
cp /data/app/* /system/sd/app
cp /data/app-private/* /system/sd/app-private
rm -r /data/app
rm -r /data/app-private
ln -s /data/app /system/sd/app
ln -s /data/app-private /system/sd/app
That should, hopefully, fix your issue.
Wow.. Thank you sooo much. I'm still in the early learning stages of Linux and android, so I needed that direction. I really appreciate you taking the time to help me out^^
tkirton said:
1. Remount the drive by typing this command: adb remount
2. Enter the phone shell: adb shell
3. Type ls -l /data to get a directory listing of /data
4. Look for an entry named app. If the following is to the right of the entry, a2sd is running: "-> /system/sd/app"
5. If not, type the following commands:
cp /data/app/* /system/sd/app
cp /data/app-private/* /system/sd/app-private
rm -r /data/app
rm -r /data/app-private
ln -s /data/app /system/sd/app
ln -s /data/app-private /system/sd/app
That should, hopefully, fix your issue.
Click to expand...
Click to collapse
I get the results you said but yet everytime i download an app my internal memory is going down. I also cd /system/sd/app and everything I dl'ed is in there, do i need to redo my sd?
ABNinja said:
I get the results you said but yet everytime i download an app my internal memory is going down. I also cd /system/sd/app and everything I dl'ed is in there, do i need to redo my sd?
Click to expand...
Click to collapse
it wont help as it seems to be a bug.
Fresh 2.0d A2SD Apps not being moved out of internal memory
I have HTC HERO, Fresh 2.0d rom, 16gb sd card and RA 1.6.2. I have partitioned sd, created ext2, converted ext2 to ext3 and installed rom and apps. All apps load and function but they are being put into internal mem and copied rather than moved to sd\apps. Memory check shows internal and sd memory decreases with installation of apps.
Here's a screen shot of my command prompt showing that Apps and Apps Private are being reassigned to sd card properly:
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\VP>cd\
C:\>cd tools
C:\tools>adb remount
* daemon not running. starting it now *
* daemon started successfully *
remount succeeded
C:\tools>adb shell
# ls -l /data
ls -l /data
drwxr-xr-x system system 2010-04-26 10:55 tombstones
drwx------ system system 2010-04-26 10:08 backup
prw-r--r-- system system 2010-04-23 16:32 gps_nmea_fifo
-rw-rw-rw- media system 12 2010-04-26 00:04 StreamingPacketLost.txt
-rw-rw-rw- media system 2 2010-04-26 12:11 pvcodec.txt
drwxrwxr-x system system 2010-04-26 11:54 system
drwxrwx--x system system 2010-04-23 16:28 anr
drwx------ root root 2010-04-26 10:09 agent
drwx------ root root 2010-04-23 16:27 agent_htc
lrwxrwxrwx root root 2010-04-23 16:27 app-private -> /system/sd
/app-private
lrwxrwxrwx root root 2010-04-23 16:27 app -> /system/sd/app
drwxrwxrwx bluetooth bluetooth 2010-04-26 10:09 btips
drwxrwxrwx root root 2010-04-23 16:27 DxDrm
drwxrwx--x system system 2010-04-26 10:54 dalvik-cache
lrwxrwxrwx root root 2010-04-23 16:27 drm -> /data/local
drwx------ root root 2010-04-26 10:07 property
drwxrwx--x system system 2010-04-26 10:54 data
drwxr-xr-x shell shell 2010-04-23 16:27 local
drwxrwxrwx wimax wimax 2010-04-23 16:27 wimax
drwxrwx--t system misc 2010-04-26 12:10 misc
drwxr-x--- root log 2010-04-23 16:27 dontpanic
drwxrwx--- root root 2010-04-23 16:27 lost+found
# exit
exit
C:\tools>
Please let me know what I can do to get A2sd working properly on Fresh 2.0d rom whether its a manual or auto version or any other fix. I use lots of apps and I am getting low memory warning from the system.
Thanks
Same problem here. Please help
Easy fix. just flash Tkirton's Darktremor A2SD zip in recovery. Works perfectly. http://forum.xda-developers.com/showthread.php?t=670087
What do you type in the terminal to make it show that infomation?
4SidedDie said:
What do you type in the terminal to make it show that infomation?
Click to expand...
Click to collapse
ls -l /data
That will give you a directory listing.
I installed apps2sd 2.5 and my internal memory went from 50 to 129.
Darktremor A2SD version 2.6.1
I get fielded with a lot of questions that ask "How can I verify if the Apps2SD (or a2sd) is working correctly." And many people, including myself, have written message after message regarding how you can check to see if your data is on the SD card.
I'm not complaining, mind you...I personally like the attention. But, I'm also trained from various programming jobs that require a lot of support (the one I'm currently at is a good example). When I see a lot of people asking the same questions, I think to myself "there's got to be an easier way to do this." That's when I start working on a program solution to the issue.
For those of you who are new to Apps2SD, here's what you do:
1. Follow the installation instructions on the first message in this thread: http://forum.xda-developers.com/showthread.php?t=670087
2. Once you are in the shell, type /system/bin/a2sd check. A report will print on your screen telling you if you have issues with your A2SD setup.
3. If you do run into issues, you can fix them easily by typing /system/bin/a2sd repair.
4. If nothing is setup, try running the installer again: /system/bin/a2sd install
Click to expand...
Click to collapse
Now, if you do decide to run the stock A2SD, or any other variant, here's how you check that version (this will also work for any version of Darktremor A2SD):
1. Setup your SD card. (Follow the steps If you have not setup your SD Card: http://forum.xda-developers.com/showthread.php?t=670087).
If you are using the A2SD that came with the kernel, you don't have to do step i. If you are using another version besides Darktremor, follow step i, but put the file you got from the A2SD provider on the SD card).
2. While still in recovery, flash the A2SD you obtained as you would a normal ROM. If you are using the included A2SD for your particular ROM, skip this step.
3. Reboot the phone and allow the phone to completely load.
4. Enter a phone shell by typing in a command window: adb shell
5. Type the following in adb shell:
cd /data/app
pwd
If you get /system/sd/app returned, then A2SD installed correctly. If you get /data/app, A2SD did not move the data.
Click to expand...
Click to collapse
You can manually move the data yourself by typing the following commands:
mkdir /system/sd/app
mkdir /system/sd/app-private
chmod 777 /system/sd/app
chmod 777 /system/sd/app-private
cp /data/app/* /system/sd/app
cp /data/app-private/* /system/sd/app-private
rm /data/app
rm /data/app-private
ln -s /system/sd/app /data/app
ln -s /system/sd/app-private /data/app-private
1. Flash the Darktremor A2SD 2.6.1: http://forum.xda-developers.com/showthread.php?t=670087
2. Reboot
3. Once the phone reboots, go into your phone (adb shell) and type:
/system/bin/a2sd cache
That will move the dalvik-cache. Once the move is complete, reboot the phone.
jtology said:
I have HTC HERO, Fresh 2.0d rom, 16gb sd card and RA 1.6.2. I have partitioned sd, created ext2, converted ext2 to ext3 and installed rom and apps. All apps load and function but they are being put into internal mem and copied rather than moved to sd\apps. Memory check shows internal and sd memory decreases with installation of apps.
Here's a screen shot of my command prompt showing that Apps and Apps Private are being reassigned to sd card properly:
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\VP>cd\
C:\>cd tools
C:\tools>adb remount
* daemon not running. starting it now *
* daemon started successfully *
remount succeeded
C:\tools>adb shell
# ls -l /data
ls -l /data
drwxr-xr-x system system 2010-04-26 10:55 tombstones
drwx------ system system 2010-04-26 10:08 backup
prw-r--r-- system system 2010-04-23 16:32 gps_nmea_fifo
-rw-rw-rw- media system 12 2010-04-26 00:04 StreamingPacketLost.txt
-rw-rw-rw- media system 2 2010-04-26 12:11 pvcodec.txt
drwxrwxr-x system system 2010-04-26 11:54 system
drwxrwx--x system system 2010-04-23 16:28 anr
drwx------ root root 2010-04-26 10:09 agent
drwx------ root root 2010-04-23 16:27 agent_htc
lrwxrwxrwx root root 2010-04-23 16:27 app-private -> /system/sd
/app-private
lrwxrwxrwx root root 2010-04-23 16:27 app -> /system/sd/app
drwxrwxrwx bluetooth bluetooth 2010-04-26 10:09 btips
drwxrwxrwx root root 2010-04-23 16:27 DxDrm
drwxrwx--x system system 2010-04-26 10:54 dalvik-cache
lrwxrwxrwx root root 2010-04-23 16:27 drm -> /data/local
drwx------ root root 2010-04-26 10:07 property
drwxrwx--x system system 2010-04-26 10:54 data
drwxr-xr-x shell shell 2010-04-23 16:27 local
drwxrwxrwx wimax wimax 2010-04-23 16:27 wimax
drwxrwx--t system misc 2010-04-26 12:10 misc
drwxr-x--- root log 2010-04-23 16:27 dontpanic
drwxrwx--- root root 2010-04-23 16:27 lost+found
# exit
exit
C:\tools>
Please let me know what I can do to get A2sd working properly on Fresh 2.0d rom whether its a manual or auto version or any other fix. I use lots of apps and I am getting low memory warning from the system.
Thanks
Click to expand...
Click to collapse
Hey i just got finished installing A2SD 2.6.1 and i have a class 2 16gb sd card and my internal mem is reading like 74/159, is that normal?
I DID install the correct version for class 2 cards
and i did your /system/bin/a2sd check
and it looked like everthing checks ok
In A2SD status report i got this
[*] /data/app link active
[*] /data/app-private link active
[*] /data/dalvik-cache NOT active
No Cache flag file present
[X] Swap partition NOT present
i read that the other guy had 100+ mb free after A2SD and i also remember back on 1.5 when i had tried it out i got similar numbers.
Anything else i can do to maybe check if i did everything alright?
or maybe already know why im getting still such a low internal mem?
you should check out the GUI version of apps2sd http://forum.xda-developers.com/showthread.php?t=670098
2.5 just crashed my phone, the GUI version not only fixed all my problems but it sped everything up signaficantly. Im not an expert with computers either so this was very easy to use
You picked up the one that doesn't activate the cache on boot. Just type
/system/bin/a2sd cache in adb shell.
frostrunner said:
Hey i just got finished installing A2SD 2.6.1 and i have a class 2 16gb sd card and my internal mem is reading like 74/159, is that normal?
I DID install the correct version for class 2 cards
and i did your /system/bin/a2sd check
and it looked like everthing checks ok
In A2SD status report i got this
[*] /data/app link active
[*] /data/app-private link active
[*] /data/dalvik-cache NOT active
No Cache flag file present
[X] Swap partition NOT present
i read that the other guy had 100+ mb free after A2SD and i also remember back on 1.5 when i had tried it out i got similar numbers.
Anything else i can do to maybe check if i did everything alright?
or maybe already know why im getting still such a low internal mem?
Click to expand...
Click to collapse
tkirton said:
You picked up the one that doesn't activate the cache on boot. Just type
/system/bin/a2sd cache in adb shell.
Click to expand...
Click to collapse
Actually i did, and my memory stayed the same at 70~
fallentimm said:
you should check out the GUI version of apps2sd http://forum.xda-developers.com/showthread.php?t=670098
2.5 just crashed my phone, the GUI version not only fixed all my problems but it sped everything up signaficantly. Im not an expert with computers either so this was very easy to use
Click to expand...
Click to collapse
Wow...and you didn't even give me a chance to fix it.
Treve uses a GUI to set things up. Other than that, the basic concept is the same (it's based on my earlier Darktremor A2SD, which itself is based on the original Cyanogen Apps2SD). It pretty much follows the same method to move files as I do. His is easier to setup if you are new at this. I try to make mine automatically set things up.
Nothing is wrong with what he's doing...it's definitely a different way of doing it and, as long as it works, more power to him.

Cannot write direclty to /mnt/extSdCard with adb or Android Commander

In adb shell, with myself set as su, I cannot write directly to /mnt/extSdCard. Get's "permission denied"
When I do a chmod or chown to root, I get an "operation not permitted"
I have to copy (push) files to /mnt/sdcard and use the device to move/copy stuff over to /mnt/extSdCard.....pretty annoying.
I guess the reason is because the ownership looks like this:
ls -al
...
drwxrwxr-x system media_rw 2012-10-12 10:07 extSdCard
drwxr-xr-x root system 2012-10-11 09:10 obb
drwxrwxr-x root sdcard_rw 2012-10-12 10:29 sdcard
drwx------ root root 2012-10-11 09:10 secure
Any ideas how I can write to /mnt/extSdCard - even Android Commander is not doing anything
I think you have to mount it first with something that should look like,
"Adb mount /mnt/blk/[some wierd path here]/" or something
Not sure but that's my best guess since no one else was offering insight
Sent from my GT-N8013 using xda app-developers app
Same problem here, have you already found a solution or workaround?

[Q] [A700] CyanogenMod 10.1.2 adb access to /data/media/

I can't post this to the thread:
"[NIGHTLY][ROM][4.2.2] CyanogenMod 10.1 for Acer A700"
because of forum rules. Anyway I hope someone sees this ...
I just installed cm-10.1.2-a700 (2013.07.11) to my A700.
Installed CWM and boot.img via fastboot did a complete wipe and formated all the storage.
(Did this multiple times just to ensure I did not make anything wrong)
CM is working so far.
But I think there is a bug with permissions:
Trying to push files via adb to /data/media results in an error with "permissions denied".
The reason is:
the directory tree of /data/media is owned by user and group: media_rw
Code:
ls -l /data/media
drwxrwx--- 18 media_rw media_rw 4096 Jul 14 14:20 0
drwxrwxr-x 2 media_rw media_rw 4096 Jul 13 03:18 legacy
drwxrwx--- 14 media_rw media_rw 4096 Jul 14 14:05 obb
adb connects the A700 als user "shell".
But user shell does not belong into group media_rw
Code:
[email protected] / $ whoami
shell
[email protected] / $ groups
shell graphics input log mount adb sdcard_rw sdcard_r net_bt_admin net_bt inet net_bw_stats
also the file "/system/etc/permissions/platform.xml" states:
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_rw" />
</permission>
but correct would be:
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Anyway changing that does not fix the problem.
Group and user IDs are hardcoded in Android so without baking the ROM myself there is no fix for the permission denied Problem. (am I right?)
Starting adbd with "adb root" would do the trick but only in developer builds, so this would be no solution for distributing a file transfer script which I am writing ...
Is there a solution or is this a real bug in cm-10.1.2 for A700?
lieschenmueller said:
I can't post this to the thread:
"[NIGHTLY][ROM][4.2.2] CyanogenMod 10.1 for Acer A700"
because of forum rules. Anyway I hope someone sees this ...
I just installed cm-10.1.2-a700 (2013.07.11) to my A700.
Installed CWM and boot.img via fastboot did a complete wipe and formated all the storage.
(Did this multiple times just to ensure I did not make anything wrong)
CM is working so far.
But I think there is a bug with permissions:
Trying to push files via adb to /data/media results in an error with "permissions denied".
The reason is:
the directory tree of /data/media is owned by user and group: media_rw
Code:
ls -l /data/media
drwxrwx--- 18 media_rw media_rw 4096 Jul 14 14:20 0
drwxrwxr-x 2 media_rw media_rw 4096 Jul 13 03:18 legacy
drwxrwx--- 14 media_rw media_rw 4096 Jul 14 14:05 obb
adb connects the A700 als user "shell".
But user shell does not belong into group media_rw
Code:
[email protected] / $ whoami
shell
[email protected] / $ groups
shell graphics input log mount adb sdcard_rw sdcard_r net_bt_admin net_bt inet net_bw_stats
also the file "/system/etc/permissions/platform.xml" states:
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_rw" />
</permission>
but correct would be:
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Anyway changing that does not fix the problem.
Group and user IDs are hardcoded in Android so without baking the ROM myself there is no fix for the permission denied Problem. (am I right?)
Starting adbd with "adb root" would do the trick but only in developer builds, so this would be no solution for distributing a file transfer script which I am writing ...
Is there a solution or is this a real bug in cm-10.1.2 for A700?
Click to expand...
Click to collapse
Well, don't have time to look at the issue, but can only state what I know about CM, PA, and that is, these roms change the directory structure of internal and external storage.
I always run into the issue, where evreything is put in a directory called "0". And sometimes, it will replicate itself, with several subdirectories called "0". Depends on how often you flash CM roms. (on my A501 it filled the internal memory, which is why I don't run CM anymore)
Hence, my former CWM backups don't work, as they have issues with this directory structure.
Not sure if this helps.
MD
I'm running cm10.1.2 stable with out that issue.
Currently that dir is owned by root
Is this the first rom you've loaded past stock?
My platform.xml looks the same as yours.
Just gid=sdcard_rw
jamart3d said:
I'm running cm10.1.2 stable with out that issue.
Currently that dir is owned by root
Is this the first rom you've loaded past stock?
My platform.xml looks the same as yours.
Just gid=sdcard_rw
Click to expand...
Click to collapse
Naw, I've flashed plenty, but mainly run my own custom from stock unless I'm testing somebody's build.
Like I said, even on my A501, everytime I flashed a CM build, I wound up with the directory "0". This also was created on the internal sd as well. Each sub-dir "0" contained an image of the previous contents. Haven't investigated it a lot, but suspect maybe CWM versions or something else, however, I typically run the latest.
With my rom, I can simply do a "mount /data" and push without issues.
EDIT I'll check out pushing to the media folder. I notice there are no permissions on "Other" for that folder.
A chmod in the script perhaps would fix?
Sorry MD, I was asking the op.
I've loaded cm10.1.+ before and after the build he ref'd.
I think if he loads the stable, he may not have this issue
Anyway, just trying to get my 10 posts too.
hey guys thanks for your replys!
@Moscow Desire
I always run into the issue, where evreything is put in a directory called "0". And sometimes, it will replicate itself, with several subdirectories called "0". Depends on how often you flash CM roms. (on my A501 it filled the internal memory, which is why I don't run CM anymore)
Hence, my former CWM backups don't work, as they have issues with this directory structure.
Click to expand...
Click to collapse
Yeah I recognized that. but I do not see a problem there, because log in as root and move the data and most stuff is working. It has to be done only right after you flash the ROM, so I don't care.
doing a chmod right after flashing so that /data/media/ belongs to sdcard_r ... I did that once and quite some apps were broken afterwards.
So messing with chmod onto /data/media seems not a good idea. Also doing a "fix permissions" in CWM resets the access rights, anyway ...
(and the other way: doing a chmod in the script won't work because shell has no rights on /data/media)
Not beeing able to access data which belongs to user and group "media_rw" via adb is my problem.
@jamart3d
if uid = root and gid = media_rw, then the same problem occures. User "shell" can't access, because he has uid=shell and does not belong to group media_rw.
last half year or so i had iconiaN 2.6 running, right before i testet an nightly version of cyanogenmod 10.0, but was not satisfied. Last days I thought i might improve my A700 with cyanogenmod 10.1.2, but I'm not that happy with it yet.
----
I further poked into darkness of the rom...
I found that "/mnt/shell/emulated" is the fuse-mounted dir of /data/media/, so that might do as workaround.
But I still think that user "shell" should belong into group media_rw. And that beeing not the case I would say it is a bug.
Sorry, I can't replicate the bug in stable version after 711
Have you tired 7comp version?
jamart3d said:
Sorry, I can't replicate the bug in stable version after 711
Have you tired 7comp version?
Click to expand...
Click to collapse
I cant find a stable version more recent than 2013.07.11 or do you mean a nightly build?
I have not tried 7comp yet.
Sorry, yes I did mean 2013.07.11. stable,
It is the version I'm on now.
For some reason I thought you were trying the version just before.

[Completed] move album to SD Card

I have screen captures and downloads on my phone that I want to move to my SD card.
When I mount the phone on my Linux computer, I see:
/run/user/1000/gvfs/mtp:host=%5Busb%3A010%2C018%5D$ ls -l
total 0
drwx------ 1 me me 0 Dec 31 1969 Card
drwx------ 1 me me 0 Dec 31 1969 Phone
I did: mkdir Card/DCIM/Screenshots and that worked.
cp -a Phone/Pictures/Screenshots Card/DCIM/Screenshots gives the error "Operation not supported".
I checked the permissions on all the directories in the path and they seem ok.
I tried to chmod to make everything writeable by everyone but that fails too.
I've tried to copy/move the files with a file manager on the phone but that fails too.
$ ls -l
total 0
dr-x------ 1 me me 0 Dec 31 1969 mtp:host=%5Busb%3A010%2C018%5D
$ chmod o+w *
chmod: changing permissions of 'mtp:host=%5Busb%3A010%2C018%5D': Operation not supported
bjlockie said:
I have screen captures and downloads on my phone that I want to move to my SD card.
When I mount the phone on my Linux computer, I see:
/run/user/1000/gvfs/mtp:host=%5Busb%3A010%2C018%5D$ ls -l
total 0
drwx------ 1 me me 0 Dec 31 1969 Card
drwx------ 1 me me 0 Dec 31 1969 Phone
I did: mkdir Card/DCIM/Screenshots and that worked.
cp -a Phone/Pictures/Screenshots Card/DCIM/Screenshots gives the error "Operation not supported".
I checked the permissions on all the directories in the path and they seem ok.
I tried to chmod to make everything writeable by everyone but that fails too.
I've tried to copy/move the files with a file manager on the phone but that fails too.
$ ls -l
total 0
dr-x------ 1 me me 0 Dec 31 1969 mtp:host=%5Busb%3A010%2C018%5D
$ chmod o+w *
chmod: changing permissions of 'mtp:host=%5Busb%3A010%2C018%5D': Operation not supported
Click to expand...
Click to collapse
Hi,
Try this:
Code:
/run/user/1000/gvfs/mtp:host=%5Busb%3A010%2C018%5D$ cp -R Phone/Pictures/Screenshots $HOME/Card/DCIM/Screenshots
I might have your file paths wrong but the logic should work.

Disabling LG RCT (LG Root Checker Tool) on the V60

Here is a little tutorial for disabling LG RCT (Root Checker Tool), this currently has not much use for the avg. user since it does not impact performance as far as i know, but this might help other Developers. This Requires the System Partition to be writable, e.g. with SystemRW tool.
Required:
Unlocked Bootloader (Obviously)
SystemRW Mod
Disable DM-Verity (AVB) (Will be disabled by the SystemRW Mod)
Part 1:
1. adb shell, pm uninstall -k --user 0 com.lge.rctprovider
2. adb reboot bootloader, Fastboot erase rct
Reboot to System
3. adb shell, pm uninstall -k --user 0 com.lge.srtc
4. Edit /system_ext/etc/init/init.lge.system_ext.service.rc (copy to storage, rename to txt and remove that completely:
########################################
# LG RCT(Rooting Check Tool)
########################################
service rctd /system_ext/bin/rctd
class late_start
user root
group root
seclabel u:r:rctd:s0
)
5. Remove .txt extension and copy back to original place (Keep old permissions on file: rw-r--r--) and reboot
Now the RCT Service is stopped.
--------------------------------
Part 2:
1. Delete /system/system_ext/app/RctProvider Folder and /system/system_ext/bin/rctd file
2. Delete /mnt/Product/Persist-LG/RCT Folder
Done, how to check if it is disabled? "Adb shell", "su" and "getprop | grep rct". If it shows nothing as output that means the service is not running. After that check the service menu *#546368#*600# > SVC Menu > LG RCT (Has to say Disabled)
Credits to Th3-Hunter333 (ps3hacker3 on XDA) and Leronex (Leronex_1 on XDA)
how to do
怎么弄
Thanks a lot for the guide!
I don't have a linux workstation around and decided to edit the init.lge.system_ext.services.rc file and copy it back using Total Commander. Total Commander can remount the file system as r/w, but for whatever reason any file I create in /system/etc/init has "0" size. I tried to save init.lge.system_ext.services.rc under a different name in the same folder and it became empty. I can delete or create a new file but all my files have zero size.
I also tried to remount the /system as r/w using "mount -o rw,remount /" command from adb shell. It sort of works, I can change the permissions for files and folders but again, I can't edit files. I even tried vi editor from the adb shell (busybox vi ...) and while it doesn't complain about the r/o file I still can't add anything to it.
Here is a result of the "ls -la" command after I changed permissions to 777 for init.lge.system_ext.services.rc
-rw-r--r-- 1 root root 0 2008-12-31 16:00 init.lge.system.on_post_fs.rc
-rw-r--r-- 1 root root 429 2008-12-31 16:00 init.lge.system.on_post_fs_data.rc
-rw-r--r-- 1 root root 260 2008-12-31 16:00 init.lge.system.on_property.rc
-rwxrwxrwx 1 root root 0 2021-12-07 16:19 init.lge.system.services.rc
-rw-r--r-- 1 root root 4674 2008-12-31 16:00 installd.rc
-rw-r--r-- 1 root root 1104 2008-12-31 16:00 iorapd.rc
Just wondering if anyone have a solution to that. Thank you.
G0bl1n said:
Thanks a lot for the guide!
I don't have a linux workstation around and decided to edit the init.lge.system_ext.services.rc file and copy it back using Total Commander. Total Commander can remount the file system as r/w, but for whatever reason any file I create in /system/etc/init has "0" size. I tried to save init.lge.system_ext.services.rc under a different name in the same folder and it became empty. I can delete or create a new file but all my files have zero size.
I also tried to remount the /system as r/w using "mount -o rw,remount /" command from adb shell. It sort of works, I can change the permissions for files and folders but again, I can't edit files. I even tried vi editor from the adb shell (busybox vi ...) and while it doesn't complain about the r/o file I still can't add anything to it.
Here is a result of the "ls -la" command after I changed permissions to 777 for init.lge.system_ext.services.rc
-rw-r--r-- 1 root root 0 2008-12-31 16:00 init.lge.system.on_post_fs.rc
-rw-r--r-- 1 root root 429 2008-12-31 16:00 init.lge.system.on_post_fs_data.rc
-rw-r--r-- 1 root root 260 2008-12-31 16:00 init.lge.system.on_property.rc
-rwxrwxrwx 1 root root 0 2021-12-07 16:19 init.lge.system.services.rc
-rw-r--r-- 1 root root 4674 2008-12-31 16:00 installd.rc
-rw-r--r-- 1 root root 1104 2008-12-31 16:00 iorapd.rc
Just wondering if anyone have a solution to that. Thank you.
Click to expand...
Click to collapse
You didn't read the tutorial, the system NEEDS to be R/W before you do it.
Leronex_1 said:
You didn't read the tutorial, the system NEEDS to be R/W before you do it.
Click to expand...
Click to collapse
Oh I did read it, just was wondering if I can find a way around.
But from the file system perspective I don't understand how I can create an empty file or delete it but in the same time can't update the content.
What I did actually killed the RCT service, while it also killed a couple of other (useful) services listed in the services.rc. file. The phone works OK so far, I don't see anything strange though. I do have a copy of the original file and will copy it back once I have a linux setup on my PC.
Can someone upload the text for init.lge.system_ext.services.rc I accidentally deleted the whole thing when I saved.
I don't have com.lge.srtc
is it different on the verizon version?
Assasinx54 said:
Can someone upload the text for init.lge.system_ext.services.rc I accidentally deleted the whole thing when I saved.
Click to expand...
Click to collapse
here's mine
Code:
########################################
# CAPP_NFS
########################################
service nfsserversetup /system/bin/nfsserversetup
class late_start
user root
oneshot
########################################
# CAPP_MPROFILER
########################################
service lgprofd /system/bin/lgprofd
socket lgprofd stream 666
########################################
# CAPP_NFS
########################################
service nfskill /system/bin/nfskillprocess
disabled
oneshot
user root
on property:vold.decrypt=trigger_shutdown_framework
start nfskill
########################################
# bugreport is triggered by holding down volume down, volume up and power
########################################
service bugreport /system/bin/dumpstate -d -p -B -z \
-o /data/user_de/0/com.android.shell/files/bugreports/bugreport
class main
disabled
oneshot
keycodes 114 115 116
########################################
# LG RCT(Rooting Check Tool)
########################################
service rctd /system_ext/bin/rctd
class late_start
user root
group root
seclabel u:r:rctd:s0
########################################
# [email protected] fota
########################################
service uncrypt-fota /system/bin/uncrypt --fota
class main
socket uncrypt stream 600 system system
disabled
oneshot
service uncrypt-lcdoff /system/bin/uncrypt --lcdoff
class main
socket uncrypt stream 600 system system
disabled
oneshot
########################################
# LGP_DATA_DSQN
########################################
service dsqn /system_ext/bin/dsqn
disabled
user root
on property:persist.product.lge.data.dsqn=1
start dsqn
on property:persist.product.lge.data.dsqn=0
stop dsqn
########################################
# LGP_DATA_TCPIP_MPTCP
########################################
service socks /system_ext/bin/redsocks -c /system_ext/etc/redsocks.conf
disabled
user root
on property:product.lge.data.mptcp.enabled=1
start socks
on property:product.lge.data.mptcp.enabled=0
stop socks
service socks-v6 /system_ext/bin/redsocks-v6 -c /system_ext/etc/redsocks_v6.conf
disabled
user root
on property:product.lge.data.mptcp.enabled=1
start socks-v6
on property:product.lge.data.mptcp.enabled=0
stop socks-v6
########################################
# [email protected] ModemBSP
########################################
#LGE_CHANGE_S, Advanced MOCA, [email protected]
service moca_service /system_ext/bin/advanced_moca -s
class late_start
user root
group system sdcard_r sdcard_rw radio misc bluetooth
disabled
oneshot
socket Full.MOCA.port stream 660 system system
on property:persist.product.lge.service.moca.enable=1
start moca_service
on property:persist.product.lge.service.moca.enable=0
stop moca_service
#LGE_CHANGE_E, Advanced MOCA, [email protected]
Thanks dude I ended up reflashing the stock rom and rerooting. The problem was my device doesnt have R/W access. Im working with the guy that made the r/w script to get it working on the verizon v60
Assasinx54 said:
Thanks dude I ended up reflashing the stock rom and rerooting. The problem was my device doesnt have R/W access. Im working with the guy that made the r/w script to get it working on the verizon v60
Click to expand...
Click to collapse
are you getting
Code:
systemrw: Error! failed to create super_fixed.img file. Error code: 73
Yes error 73 is normal. I actually have created a better tutorial for this and I'll be updating it today.
I don't have a /system_ext
I do have a /system/etc/init
but I don't have init.lge.system_ext.service.rc
On v60_TMO that was crossflashed from v60_AM, I did the system_rw mod.
I was trying to follow the instructions here and ran the uninstall.sh from here, but that didn't work for me either.
*Edit: I found that the file for mine is /system/etc/init/init.lge.system.services.rc
I also don't have the directories from part 2, but part 1 seems to have *stopped the rct service.
deathglass said:
I don't have a /system_ext
I do have a /system/etc/init
but I don't have init.lge.system_ext.service.rc
On v60_TMO that was crossflashed from v60_AM, I did the system_rw mod.
I was trying to follow the instructions here and ran the uninstall.sh from here, but that didn't work for me either.
Click to expand...
Click to collapse
The uninstall.sh script in that repo is for removing the Magisk module. Does the Magisk module not work?
null-dev said:
The uninstall.sh script in that repo is for removing the Magisk module. Does the Magisk module not work?
Click to expand...
Click to collapse
I have no idea what the script was supposed to do (as far as rct goes), was just trying to follow the instructions. It said "Download and install the Magisk module (with a link to your disable magisk script), then reboot phone"
deathglass said:
I have no idea what the script was supposed to do, was just trying to follow the instructions.
Click to expand...
Click to collapse
The instructions say to install a Magisk module though, did you do that and it still didn't work?
null-dev said:
The instructions say to install a Magisk module though, did you do that and it still didn't work?
Click to expand...
Click to collapse
Oh, I didn't realize that magisk module meant through the Magisk app. I installed it and everything seems to be working, thank you.
Step-by-step worked for me, but local banking app still detecting root
dangtoi1993 said:
Step-by-step worked for me, but local banking app still detecting root
Click to expand...
Click to collapse
This is not how you bypass that
Leronex_1 said:
This is not how you bypass that
Click to expand...
Click to collapse
So there is anyway to pass safetynet while keeping root?
dangtoi1993 said:
So there is anyway to pass safetynet while keeping root?
Click to expand...
Click to collapse
Google "bypass safetynet root"

Categories

Resources