tslocum / aafm

!!! Use https://gitlab.com/tslocum/adbfm instead !!! Android ADB file manager
Other
27 stars 4 forks source link

[CLOSED] Can't see any files on the android device #2 #45

Closed tslocum closed 10 years ago

tslocum commented 10 years ago

Issue by ds9 Wednesday Oct 03, 2012 at 03:30 GMT Originally opened as https://github.com/sole/aafm/issues/45


Hi, I know you closed my original thread, this is what you wrote in the last comment:

Doesn't this ring a bell?

EXECUTE= adb shell ls --help /bin/sh: adb: not found

If not, then maybe you didn't read and follow the instructions on the project page regarding setting adb in $PATH: https://github.com/sole/aafm

But you closed the topic before I could respond. I DID read your instructions. They say this:

In case it doesn't work, you need to add the path to ADB to the environment PATH variable. In Linux this is done by editing a file called .bashrc in your home folder (.bash_profile in Mac OS). Locate a line that looks like PATH=$PATH and make it look like this:

PATH=$PATH:~/Applications/android-sdk-linux_86/platform-tools

Well, in my .bashrc there is no line with the PATH variable on it. The word PATH isn't in the file at all. So, being not very familiar with the Linux coding stuff, I wasn't sure what to do. I am not that familiar with this stuff, so I don't want to go changing files without someone knowledgeable telling me it is okay. I hesitated to just add this line to the bashrc file, because obviously on my system the PATH variable is being managed elsewhere - where? - and I don't know the ramifications of adding something like this to this file.

Are you able to tell me how to update this PATH variable so adb can run, or do you think I need to turn elsewhere for help?

Thanks.

tslocum commented 10 years ago

Comment by sole Wednesday Oct 03, 2012 at 09:35 GMT


Yes I closed it, and felt bad afterwards! :-)

Anyway, this one is the most useful message you've posted until now. Why? Because you describe what you did and what you didn't, and the problems you found. That's the only way I can help you because

a) I'm not you b) I'm not sitting in front of your computer

So please keep providing details when reporting that things don't work for you! :-)

Back to the issue, I think we can fix this, no need for you to go elsewhere:

Don't worry about adding the path line I mention in the instructions. What that means is: add this new value to the existing values. So you won't lose data.

But my line doesn't work for you because from what I read in the original issue #44 , your adb executable is on a different place, /home/main1/applications/asdk/android-sdk-linux/platform-tools/adb

Therefore what you need to add to .bashrc is

PATH=$PATH:/home/main1/applications/asdk/android-sdk-linux/platform-tools/

save the file, and then open a new terminal to launch aafm, so that the new terminal will be using the new settings in .bashrc

Hope that makes sense now and you can see files in your device!

tslocum commented 10 years ago

Comment by ds9 Wednesday Oct 03, 2012 at 12:45 GMT


Thanks again for your help.

I added the line you recommend to the .bashrc file, and it works. Problem solved!

Just out of curiousity -

How would I find out where the PATH variable is being managed on my system? (Because there was no PATH entry in my .bashrc file.)

Also - Before you responded above, I'd spent a few hours trying to figure this stuff out, did a good deal of internet searching. I had found a posting in which someone said I need to add to my .bashrc file the same line you suggested above, only instead of

PATH=$PATH:/........

it should be this:

EXPORT PATH =$PATH:/.......

I've tried it both ways, it appears both work just fine. Do you know what the difference is?

I know this forum is to help with problems getting aafm to work, rather than to be a general linux training site, so I'm really asking if you know whether the two different forms are going to have different ramifications for how aafm works.

Thanks again for your help.

tslocum commented 10 years ago

Comment by sole Wednesday Oct 03, 2012 at 14:35 GMT


Excellent! Glad it's working now.

Actually you gave me an idea--to explicitly check if adb is correctly found instead of assuming it is. So this bug has been very productive!

Regarding export vs not using export it seems it's a matter of whether the variable you set with export needs to be available for child processes later, or not. Here's a discussion: http://superuser.com/questions/143413/setting-linux-environment-variables

I think for aafm case it's not applicable since the bashrc file is ran before we can execute aafm , so it should be OK both ways.

And the default path and other environment variables--I think they are defined in /etc/profile or a similar file.

It's great that you're investigating and trying this out. It's the best way to learn!

Let me know if you find any other issue... or close the issue if you consider this solved ;)

tslocum commented 10 years ago

Comment by ds9 Wednesday Oct 03, 2012 at 23:42 GMT


I think all is well here, thanks for your help. I'll close this now.

tslocum commented 10 years ago

Comment by sole Friday Oct 05, 2012 at 23:37 GMT


:-)

Hope aafm works well from now on!