Can anyone verify the following commands are universal via ADB? I want to make sure they work on multiple phones and not just specific to the S5.
Thanks,
To display phone partitions.....
adb shell su -c ls -l "/dev/block/platform/msm_sdcc.1/by-name > /sdcard/temp.txt" <- you will need to look at the file this creates on /sdcard called sdcard.txt and verify output is correct.
To display phones external storage path.....
adb shell su -c echo $SECONDARY_STORAGE <- This should output directly to the terminal window.
Didact74 said:
Can anyone verify the following commands are universal via ADB? I want to make sure they work on multiple phones and not just specific to the S5.
Thanks,
To display phone partitions.....
adb shell su -c ls -l "/dev/block/platform/msm_sdcc.1/by-name > /sdcard/temp.txt" <- you will need to look at the file this creates on /sdcard called sdcard.txt and verify output is correct.
To display phones external storage path.....
adb shell su -c echo $SECONDARY_STORAGE <- This should output directly to the terminal window.
Click to expand...
Click to collapse
I can verify both commands work. Just tried them.
Misterxtc said:
I can verify both commands work. Just tried them.
Click to expand...
Click to collapse
Thanks. Which device? I was hoping a few on different devices than the S5 could check as well.
I appreciate the feedback!
Didact74 said:
Thanks. Which device? I was hoping a few on different devices than the S5 could check as well.
I appreciate the feedback!
Click to expand...
Click to collapse
VZW S5 Retail
Related
Anyone out there willing to help me out?
I just someone to run this command with their phone hooked up, USB Debugging ENABLED:
adb shell ls -l -R /sys/class > class_structure_NEXUS_ONE.txt
This will output a text file in whichever directory you run the command from, that will list the hardware capabilities of the phone for me - this would help me IMMENSELY from a development standpoint!
Check out the text file - zero personal / private information will be in there!
Thanks!
No problem.
Rusty! said:
No problem.
Click to expand...
Click to collapse
Awesome. Are you fully stock, or rooted?
also need...
adb shell ls -l -R /sys/devices/platform > platform_structure_NEXUS_ONE.txt
and
adb shell ls -l -R /sys/devices/virtual > virtual_structure_NEXUS_ONE.txt
If you guys don't mind taking a moment
O/S is stock.
I assume you know the 2 commands you just listed are identical, so you're only getting one output
Rusty! said:
O/S is stock.
I assume you know the 2 commands you just listed are identical, so you're only getting one output
Click to expand...
Click to collapse
Yeah, I failed. Editing the post now to show the proper 2nd command. LOL! I need a long directory listing of the virtual directory as well
Anyone out there willing to help me out?
I just someone to run this command with their phone hooked up, USB Debugging ENABLED:
adb shell ls -l -R /sys/class > class_structure_LEGEND.txt
This will output a text file in whichever directory you run the command from, that will list the hardware capabilities of the phone for me - this would help me IMMENSELY from a development standpoint!
Check out the text file - zero personal / private information will be in there!
Thanks!
also need...
adb shell ls -l -R /sys/devices/platform > platform_structure_LEGEND.txt
and
adb shell ls -l -R /sys/devices/virtual > virtual_structure_LEGEND.txt
If you guys don't mind taking a moment
Here it is. FW - rooted original 2.03, will it do?
Definitely! Do you mind running that 2nd command again? (the virtual one)
I didn't mean to put the same command in twice, LOL!
Also, the -R MUST be capitalized! I'm afraid your logs weren't much help without that
Oops Here are the right ones
Firecold said:
Oops Here are the right ones
Click to expand...
Click to collapse
Thanks!! 10char
Anyone out there willing to help me out?
I just someone to run this command with their phone hooked up, USB Debugging ENABLED:
adb shell ls -l -R /sys/class > class_structure_DROID_X.txt
This will output a text file in whichever directory you run the command from, that will list the hardware capabilities of the phone for me - this would help me IMMENSELY from a development standpoint!
Check out the text file - zero personal / private information will be in there!
Thanks!
also need...
adb shell ls -l -R /sys/devices/platform > platform_structure_DROID_X.txt
and
adb shell ls -l -R /sys/devices/virtual > virtual_structure_DROID_X.txt
If you guys don't mind taking a moment
Here are the files
I've rooted mine and also edited framework-res.apk and services.jar
I noticed you listed the same command twice on your second post, I looked at your other posts and used this instead of the repeated command
Code:
adb shell ls -l -R /sys/devices/virtual > virtual_structure_DROID_X.txt
May I ask what these directory listings are for?
zanix said:
Here are the files
I've rooted mine and also edited framework-res.apk and services.jar
I noticed you listed the same command twice on your second post, I looked at your other posts and used this instead of the repeated command
Code:
adb shell ls -l -R /sys/devices/virtual > virtual_structure_DROID_X.txt
May I ask what these directory listings are for?
Click to expand...
Click to collapse
LOL, thank you!!
Basically, it's a full listing of what does and does not have read / write access, or via which GID has read/write access. Talking directly Linux here, rather than through the Android framework.
Because not every manufacturer is using the same permissions, or even the same file names, this will help immensely making sure that any direct-hardware access I do in developing programs works over a much wider range of devices
Cool, thanks! And you are welcome.
Hey all,
I'm trying to create a linux script that executes some adb commands. For example, I would like it to be able to automatically exchange nv_data.bin (which need 'su' rights as you certainly know). The problem begins here:
if I execute command: 'adb shell cp x.x y.y' is fine,
but 'adb shell su cp x.x y.y' is just now working.
So I would need help with this. How can I make it work? I tried adb shell & su and stuff like this, but just did not work... THanks in advance!
94kram01 said:
Hey all,
I'm trying to create a linux script that executes some adb commands. For example, I would like it to be able to automatically exchange nv_data.bin (which need 'su' rights as you certainly know). The problem begins here:
if I execute command: 'adb shell cp x.x y.y' is fine,
but 'adb shell su cp x.x y.y' is just now working.
So I would need help with this. How can I make it work? I tried adb shell & su and stuff like this, but just did not work... THanks in advance!
Click to expand...
Click to collapse
adb shell su -c ls
Thanks! It seems to work, but somehow it just did not ask for permission on the phone, so returns 'Permission denied.' I checked phone, but it didn't ask me if I want to enable or not.
Try
Code:
adb shell su -c "ls" -root
Hm, now it asks for it. Thanks! Is it possible, to ask for permission only once, at the beginning, and then be able to do everything?
94kram01 said:
Hm, now it asks for it. Thanks! Is it possible, to ask for permission only once, at the beginning, and then be able to do everything?
Click to expand...
Click to collapse
I'd think if u call it with -root it should only ask once.
Not sure though.
If it asks more than once, could you push a script to the device (somewhere that normally has full r/w access), run it with a single command, then delete it?
I have bricked my device when I tried to copy framework-res.apk to the system folder. I renamed the old framework-res.apk to framework-res.apk.bak but before I could paste the new one the phone freaked out and rebooted and now I'm stuck at the ATT white screen. I have adb access though so I'm hoping I can just push the framework-res file using adb. Every time I try this though I get an error saying file system is read only. I know all I probably need to do is get the computer to mount system as read/write. I just don't know how to do this. Is there anyone out there who can help me out?
Modified from:
http://forum.xda-developers.com/showthread.php?p=41339365
You may need to do:
mount -o remount,rw /system
chmod 777 /system/framework
Thank you for your quick reply. I'm kind of a novice when it comes to adb so bear with me, but when I use those commands I get 'mount' is not recognized as an internal or external command. I'm not sure if it matters or not but I'm running windows XP and my working directory is in c:\android-sdk\platform-tools when I tried executing "mount -o remount,rw /system".
Okay I tried changing the command to "adb shell mount -o remount,rw /system" now I get the error mount operation not permitted. I hope this doesn't mean I borked it. . . Also want to note that I did root the phone.
jack_slapped said:
Thank you for your quick reply. I'm kind of a novice when it comes to adb so bear with me, but when I use those commands I get 'mount' is not recognized as an internal or external command. I'm not sure if it matters or not but I'm running windows XP and my working directory is in c:\android-sdk\platform-tools when I tried executing "mount -o remount,rw /system".
Click to expand...
Click to collapse
You need to do some reading before you go any further - please. ADB is a command shell, and the commands he gave you are for running IN ADB after it's successfully connected to the phone.
There are lots of good writeups on using ADB all over the place.
jack_slapped said:
Okay I tried changing the command to "adb shell mount -o remount,rw /system" now I get the error mount operation not permitted. I hope this doesn't mean I borked it. . . Also want to note that I did root the phone.
Click to expand...
Click to collapse
You need to get INTO the shell first -- then execute the commands.
Also, always stop the system before modifying stuff, especially framework!
like so:
Code:
> [B]adb shell[/B]
$ [B]su[/B]
# [B]mount -o rw,remount /system[/B]
# [B]stop[/B]
# **[I]cp or mv whatever here[/I]**
# [B]reboot[/B]
your cmd prompt will return after reboot
alacrify said:
You need to do some reading before you go any further - please. ADB is a command shell, and the commands he gave you are for running IN ADB after it's successfully connected to the phone.
There are lots of good writeups on using ADB all over the place.
Click to expand...
Click to collapse
I know believe me when I say I'm trying to read as much as I possibly can. Nobody wants this phone fixed more than me. It's just alot of new stuff and I'm not entirely familiar with it. I think I'm connected with adb and started a shell using "adb -s myserial shell". I input the first command and got "mount: operation not permitted". Not really sure why it would say that considering I rooted the device.
jack_slapped said:
I know believe me when I say I'm trying to read as much as I possibly can. Nobody wants this phone fixed more than me. It's just alot of new stuff and I'm not entirely familiar with it. I think I'm connected with adb and started a shell using "adb -s myserial shell". I input the first command and got "mount: operation not permitted". Not really sure why it would say that considering I rooted the device.
Click to expand...
Click to collapse
Be sure to follow gwbard's directions a little closer. The first command inside the ADB shell is "su" which will elevate you to root - this will be necessary in order to execute the "mount" command.
From your command line (assuming in Windows), you'll run the "adb shell" command that gwbard showed. It should give you a prompt that ends with a dollar sign. Once you execute the "su" command, you'll see that change to a pound/hash sign (#).
gwbard said:
You need to get INTO the shell first -- then execute the commands.
Also, always stop the system before modifying stuff, especially framework!
like so:
Code:
> [B]adb shell[/B]
$ [B]su[/B]
# [B]mount -o rw,remount /system[/B]
# [B]stop[/B]
# **[I]cp or mv whatever here[/I]**
# [B]reboot[/B]
your cmd prompt will return after reboot
Click to expand...
Click to collapse
Dude you are the man! That did the trick. I really appreciate it. I'm still trying to figure out exactly what a shell is and how that ties into adb but I learned a good bit about it from today. I've used linux before and I have heard of a shell but never really understood what exactly it was. Anyways thanks again for everyone who helped me get this working.
Aou said:
Be sure to follow gwbard's directions a little closer. The first command inside the ADB shell is "su" which will elevate you to root - this will be necessary in order to execute the "mount" command.
From your command line (assuming in Windows), you'll run the "adb shell" command that gwbard showed. It should give you a prompt that ends with a dollar sign. Once you execute the "su" command, you'll see that change to a pound/hash sign (#).
Click to expand...
Click to collapse
Yea I posted that last one before I saw his instructions. They were right on point. Thanks guys!
jack_slapped said:
Dude you are the man! That did the trick. I really appreciate it. I'm still trying to figure out exactly what a shell is and how that ties into adb but I learned a good bit about it from today. I've used linux before and I have heard of a shell but never really understood what exactly it was. Anyways thanks again for everyone who helped me get this working.
Click to expand...
Click to collapse
When you click "start" and type "cmd", you're starting a shell. They're command interpreters that extend functionality in specific ways. like "dir" for the Windows/DOS command shell, and "su" or "mount" for adb. Lots of good writeups on that around too