[GUIDE] MTP doesn't work for you on GNU/Linux? Use adb. - General Topics

In this guide I will show you how to use adb to move files to or from your device. Especially helpful if your device has MTP and you can't get it to work with mtpfs on GNU/Linux.
What do you need?
Computer with GNU/Linux.
Connection to the Internet.
The 32bit adb binary or the 64bit adb binary, they are added as attachment to this post. (1)
An Android phone with USB debugging on.
Steps:
Connect your phone with a USB cable to your computer. Make sure you have USB debugging on! (2) Put the adb binary in a folder where you can open a terminal. With the terminal open type:
Code:
./adb devices
Make sure it says something like this:
Code:
List of devices attached
XXXXXXXXXXXXXdevice
Now you know you properly connected your device type:
Code:
./adb pull /sdcard/
or
Code:
./adb push /sdcard/
More info on adb commands you can find here:
http://developer.android.com/tools/help/adb.html
(1): If you are using the Debian or Ubuntu distro (or another wich allows you to install *.deb files) you can install the 32- or 64 bit adb packages and use adb from every folder. Download them from the attachments. If you use this type adb instead of ./adb.
(2): Don't know how to turn on USB debugging? Go to settings, scroll down to the About phone menu item. Tap it and scroll down again to Build number and tap it many times! Then go to settings, and tap developer options and find the USB debugging option.

I hope this was helpful, but I think not, because I get no replies...

AW: [GUIDE] MTP doesn't work for you on GNU/Linux? Use adb.
http://www.webupd8.org/2012/12/how-to-mount-android-40-ubuntu-go-mtpfs.html
I usually use sftp to transfer files. No cable and shell access included.
Sent from my GT-I9100 using xda app-developers app

If you want to copy lots of files, like your music collection or movies, wireless is not fast enough. That's why I use adb, because it's very fast.

Related

Boot Animation with SkyRaider

Sorry about the post but I cannot find the post were it tells me how to install custom boot animations. I also need to be able to do the sounds. As far as I understand I have to put it in the media folder. I found the original one but it does not allow me to move it. I'm assuming I have to do it from recovery but I don't know how. Detailed instructions would be appreciated. I have a cold and the old brain is doing so well. Thanks
s-off your dinc and you can do it while booted
I was trying to avoid that because they do not have a way to undo s-off yet. Just incase my phone dies I dont want verizon to say I voided the warranty. Any way to do it without?
You can flash some of them from rom manager...that's how I did mine.
If you have rooted your phone, which you must have in order to install a custom ROM, you've already voided your warranty.
Adding S-OFF wouldn't change anything in the eyes of Verizon, and you can always drop your phone until it's physically broken if you need to take it in.
rom manager -> download rom -> Ihtfp69 -> boot animations -> download -> pick one
thats where i got mine from
MMBosstones86 said:
rom manager -> download rom -> Ihtfp69 -> boot animations -> download -> pick one
thats where i got mine from
Click to expand...
Click to collapse
When I try to install from Rom manager it doesn't load it says verification failed or something. Does anyone know how to manually install Droid 2 boot screen.
HTC incredible
SR sense 2. 5. 2
Radio 2. 15
Sent from my ADR6300 using XDA App
Did mine 'manually', since I'm rooted I have clockwork mod installed.
1. Boot into recovery (clockwork mod)
2. launched android SDK adb daemon
3. moved file from 'tools' folder of sdk to the proper destination on the phone.
4. Done.
Doctor Butts said:
Did mine 'manually', since I'm rooted I have clockwork mod installed.
1. Boot into recovery (clockwork mod)
2. launched android SDK adb daemon
3. moved file from 'tools' folder of sdk to the proper destination on the phone.
4. Done.
Click to expand...
Click to collapse
I'm not sure how to do step 2 your referring to. If you have a link to a thread that explains how to do that, it would be greatly appreciated.
Sent from my ADR6300 using XDA App
Well, you have to go to the android website and download the android SDK. Install it somewhere on your computer that's easy to access, preferably put the folder at the root of one of your hard drives.
You'll go into command prompt after that to do a lot of the work to transfer files.
So, make sure USB debugging is enabled (just in case) and boot your phone into cwm recovery. Connect the phone to your computer via USB.
in command prompt, cd to the android sdk's tools directory. From there, you can use the adb commands to transfer files.
So, for me, after connecting the phone I do the following in command prompt:
cd G:
cd androidsdk/tools
and then I use ADB to communicate with phone, first by verifying the phone is connected:
adb devices
(if adb is on your pc, it will auto run the daemon if it is not running)
If your phone shows up in recovery mode, you're set.
You may need to go into cwm and mount your system/sd card before transferring the file.
From there, you use adb shell to acess the phone's file systems.
If you put the boot animation to the phone you'll do something like (while in shell) mv bootanimation.zip system/somethingorother/bootanimation.zip
But don't take the above line as gospel. I dont remember the exact command line to use. Check the thread on "How 2 - ADB, Rooting...." for a list of commands in ADB shell and search for a webpage that gives basic linux commands.
Doctor Butts said:
Well, you have to go to the android website and download the android SDK. Install it somewhere on your computer that's easy to access, preferably put the folder at the root of one of your hard drives.
You'll go into command prompt after that to do a lot of the work to transfer files.
So, make sure USB debugging is enabled (just in case) and boot your phone into cwm recovery. Connect the phone to your computer via USB.
in command prompt, cd to the android sdk's tools directory. From there, you can use the adb commands to transfer files.
So, for me, after connecting the phone I do the following in command prompt:
cd G:
cd androidsdk/tools
and then I use ADB to communicate with phone, first by verifying the phone is connected:
adb devices
(if adb is on your pc, it will auto run the daemon if it is not running)
If your phone shows up in recovery mode, you're set.
You may need to go into cwm and mount your system/sd card before transferring the file.
From there, you use adb shell to acess the phone's file systems.
If you put the boot animation to the phone you'll do something like (while in shell) mv bootanimation.zip system/somethingorother/bootanimation.zip
But don't take the above line as gospel. I dont remember the exact command line to use. Check the thread on "How 2 - ADB, Rooting...." for a list of commands in ADB shell and search for a webpage that gives basic linux commands.
Click to expand...
Click to collapse
THANK YOU SIR. MUCH APPRECIATED.
Sent from my ADR6300 using XDA App

[Q] LG Thrill 4G new ROM Help

I have a LG Thrill 4G. I rooted the phone using superonelick, root checker says it is rooted. Downloaded ROM Manger and flashed clockworkmod. I cannot click boot into recovery, it just restarts the phone. I have tried to reboot into recovery by pressing 3d button, down volume, and power and it boots me into the android recovery but not clockworkmod, so I can not find anyway in to download the new rom from the zip file. Has had any other people had trouble with this? I have spent over 2 days searching the internet but I cannot find any similar problems, is there anyway to get into the recovery mode to install the new ROM without it just restarting the phone?
LG Thrill 4G ClockworkMod Installation (correct method)
1) You need to have ROOT access at the least (see link below)
It will also be good to have ADB (and hence LG Thrill drivers) installed properly
http://forum.pandaapp.com/thread/2/11/20110919/4e77f603d22632913-1.html
2) Get the recovery image from here and keep it on your PC in a folder accessible by ADB.
OR (if no ADB then) directly put it on your LG Thrill SDCard root
http://forum.xda-developers.com/showthread.php?t=1257588
4) If you have ADB then follow the instructions in the first link above to push the recovery image to your phone.
OR
if no ADB then open Terminal Emulator (install it from Market) and type su and click allow if the prompt comes up
5) Now you can follow instructions in the first link (far above) again, starting from the 'dd if=...' step. But instead of rebooting you could just power off
6) Clockwork recovery should now be flashed. To enter recovery, keep the 3D button, Vol-down and Power button pressed until you see the LG logo
Thank you for getting back with me. I tried to follow these steps and when I am in the Terminal Emulator and type adb push recovery.img /data it comes back with adb: not found. I have redownloaded the recovery file that you have attached to the SD card, same error, and then I tried to copy to the phone itself and same error. I can do any of the other prompts for the emulator but nothing that has to do with the recovery file it will not work. I am guessing maybe this is the problem because if it cannot find the recovery file, I cant do much of anything else. Do you have any suggestions of why the file still cannot be found on my phone?
connect adb through tcp
Try this:
1. If you are using terminal emulator to access adb then try downloading the app called remote adb. This tool will allow you to connect your device via tcp. Take note of the ip adress and port number. Usually the default port is fine.
2. Now open sshdroid, connectbot, terminal emulator and start an ssh session with the adb shell. You must have the correct public ip and port entered in to access the adb via tcp.
3. Once you have made the ssh connection between what ever emulator you are using and remote adb, start a shell as su.
4. Type the commands mentioned earlier.
This should let you run the whole thing from within your phone.
Alternatively...
1. start remote adb on your device.
2. start a terminal or cmd prompt on your cpu.
3. cd to androidSDK\platform-tools
4. type ---> adb start-server
The server then sets up connections to all running emulator/device instances. It locates emulator/device instances by scanning odd-numbered ports in the range 5555 to 5585, the range used by emulators/devices. Where the server finds an adb daemon, it sets up a connection to that port.
Note that each emulator/device instance acquires a pair of sequential ports — an even-numbered port for console connections and an odd-numbered port for adb connections. For example:
Emulator 1, console: 5554
Emulator 1, adb: 5555
Emulator 2, console: 5556
Emulator 2, adb: 5557 ...
As shown, the emulator instance connected to adb on port 5555 is the same as the instance whose console listens on port 5554.
Once the server has set up connections to all emulator instances, you can use adb commands to control and access those instances. Because the server manages connections to emulator/device instances and handles commands from multiple adb clients, you can control any emulator/device instance from any client (or from a script).
5. type --> adb forward tcp:5554 tcp:5555
5. type ---> adb devices. In response, adb prints this status information for your device. If there is no emulator/device running, adb returns no device, and you have not made a tcp connection.
6. Take note of the serial number listed. You will use it later to direct commands to device.
7. Type --> adb shell
8. Type --> su
9. Use commands from other post to achieve whatever you need.
10. once finished with shell, type --> exit twice to leave the shell
11. Finally, type --> adb server-kill
Hope that helps. Seems like you were having issues making the connection from device to adb, so that is what I focused on. If I can help anymore, just ask. We are all continually learning and the only stupid question is the one never asked.
B^)

execute "adb tcpip <port_no>" command without using usb

NON ROOTED PHONE
I am trying to create to backup of all application in android but I don't want the users to connect to USB even for the first time.
okay let me first explain what happens when we connect our phone with USB to ADB client
0. USB Debugging mode is enabled in the phone.
1. The phone is connected to PC using a USB cord.
2. We run
Code:
adb tcpip 9999
command from cmd with ADB already installed.
The above command helps now switched the abd demon (adbd) inside the android phone to listen through TCP-IP protocol
3. now we can disconnect the phone from the PC
4. using a terminal emulator application we can now fire the commands
a)
Code:
adb connect localhost:999
b)
Code:
backup -all -f /sdcard/dev/bck.ab
now a backup pop-up will open up, you can simply click backup button.
Now we can anytime execute the command in 4.a and 4.b util the user restarts the phone or
but the problem is I wish to execute
Code:
adb tcpip 9999
without PC. Can someone suggest me how to approach this problem. From where should I start reading or there is some existing application that can do this on a non-root phone.

How to enable USB debuggin with broken touchscreen?

Hi
I have a old nexus with broken touchscreen . I want to use it via mirror on pc.
unfortunatly USB debuggin wasn't enable so i can't install any app.
any tips?
thanks
PS: i saw many use usb adapter to connect a mouse but i don't have it
EDIT: right now i just need a rom/kernel with USB debugging mode enabled by default
the screen still works , only the touch screen is broken
power , and volume bottons still work
the device is rooted
If it's only installing apps you could install them via recovery. (as zip)
Or you could check for a cheap replacement touchscreen.
nonameleft4me said:
If it's only installing apps you could install them via recovery. (as zip)
Or you could check for a cheap replacement touchscreen.
Click to expand...
Click to collapse
thanks for the answer!
sorry i forgot to mention that i need USB debuggin for make the app works correctly.
I'm trying now to find out what rom i have installed and maybe then find a kernel with OTG support . (yes i found a otg cable )
i'm not a expert of rooting
I think google has an app called voice control. Not sure how operational it is though. Supposedly you can control the entire system via voice.
nonameleft4me said:
I think google has an app called voice control. Not sure how operational it is though. Supposedly you can control the entire system via voice.
Click to expand...
Click to collapse
i need to unlock the phone and tap on the widget "search" to start voice command .
I think the best way is to find a way to enable OTG and then use a usb mouse
Boot into Recovery and mount*Data*partition.
Open a shell on PC and type:
adb pull /data/property/persist.sys.usb.config ~/
Repace*~/*with home directory of your OS.
Open that file in a text editor and you would possibly see*mtp*written there. Change it to*mtp,adb.
Note that sometimes Android doesn't understand the text file changes if the line terminator is "DOS Terminators" which Notepad would probably do on Windows (mine is Linux so no issue here).
In that case, I would suggest not using*adb pullbut doing:
adb shell echo 'mtp,adb' > /data/property/persist.sys.usb.config
You may verify that the*echo*command overwrote the file by using:
adb pull /data/property/persist.sys.usb.config ~/
and seeing the file's content in some text editor.
Unmount*Data*and reboot into Android OS. USB Debugging would probably be enabled.
Sent from my Aqua Trend using Tapatalk
Itzabhaysingj said:
Boot into Recovery and mount*Data*partition.
Open a shell on PC and type:
adb pull /data/property/persist.sys.usb.config ~/
Repace*~/*with home directory of your OS.
Open that file in a text editor and you would possibly see*mtp*written there. Change it to*mtp,adb.
Note that sometimes Android doesn't understand the text file changes if the line terminator is "DOS Terminators" which Notepad would probably do on Windows (mine is Linux so no issue here).
In that case, I would suggest not using*adb pullbut doing:
adb shell echo 'mtp,adb' > /data/property/persist.sys.usb.config
You may verify that the*echo*command overwrote the file by using:
adb pull /data/property/persist.sys.usb.config ~/
and seeing the file's content in some text editor.
Unmount*Data*and reboot into Android OS. USB Debugging would probably be enabled.
Sent from my Aqua Trend using Tapatalk
Click to expand...
Click to collapse
thanks!
i tryed
1) i went in recovery mode
2) i connect via usb the nexus4 to my pc
3)went in "mounts and storage"
4)then "mount /data"
5)in cmd i tryed your command "adb pull /data/property/persist.sys.usb.config" but i says i'm unauthorized
i checked via command "adb devices" and it return a alphanumerica string plus "unauthorized"
i tryed then to
Reboot your phone into recovery mode.
Connect it to your computer.
Open the terminal and type:
cd ~/.android
adb push adbkey.pub /data/misc/adb/adb_keys
adb shell reboot
but it still says error : device unauthorizated . please check the confirmation dialog on your device
i tryed also with a different version of adb and now gives me after "adb devices" an "offline" response
NB: if i connect the phone (not in recovery mode) via usb i can copy files in and out (i can explore onlyfew folders) , maybe this could help.
hartman11 said:
i tryed also with a different version of adb and now gives me after "adb devices" an "offline" response
NB: if i connect the phone (not in recovery mode) via usb i can copy files in and out (i can explore onlyfew folders) , maybe this could help.
Click to expand...
Click to collapse
Sorry but this could not help... Now only thing you can do is connect any USB mouse to your phone via otg cable (as it is not costly also), and you can also try USB gamepad. I also have used USB gamepad before when my touchscreen was not working.
Second thing you can do is download any android device manager for your PC like mobogenie or mobilego they directly install any app from play store to you android device, through USB.And I don't think they need USB debugging option to be enabled.
Sent from my Aqua Trend using Tapatalk
my problem is not installing an app (i could do it in recovery mode with a .zip) but enabling the USB debuggin
I have a otg cable but not the "Y" type ( the one with power source ) , also i don't know if OTG is supported by my kernel . I would like to install maybe another kernel which has OTG support and usb debuggin mode enable by default but i don't know what kind of rom i have D:
right now i just need a rom/kernel with USB debugging mode enabled by default
up

Add Right click Context Menu for ADB File Transfer | Transfer files faster and as easy as mtp mode

Use ADB Push to copy files to device by a simple right click on windows
(No CMD commands needed)​
You can simply right click any file on your Computer to send to your phone via adb push commands(without needing to type commands)
This makes file transfers significantly faster -especially when you have a large number of small files. MTP is a pain to use. This helps me transfer 100 gb of files in less than 40minutes whereas mtp transfer will take over 4 hours.
1. Install ADB Platform Tools for windows from official website
2. Extract the platform tools to 'C:\' such that your adb directory becomes "C:\platform-tools"
3. Copy the following code and paste it into a new .txt file created on your Computer.
Save it and change extension to .reg. Double click the file to install the registry entry.
3. Create a folder named 'ADBPush' in base directory of your internal storage on your phone - using a file manager. Create a folder named 'ADBPush' in root of your hard drive,i.e, C:\
4. Enable developer options and enable usb debugging on your mobile, accept the request for usb debugging access seen on your phone when you try to run adb command for the first time.
5. You can do this through wireless adb as well but first, you must use the command 'adb connect 192.168.xxx' to connect adb wirelessly first. Replace ip address with your phones current ip adresss.
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\ADB Push to Phone]
[HKEY_CLASSES_ROOT\*\shell\ADB Push to Phone\command]
@="\"C:\\Windows\\System32\\cmd.exe\" /k C:\\platform-tools\\adb.exe push \"%1\" /sdcard/ADBPush/"
[HKEY_CLASSES_ROOT\Folder\shell\ADB Push to Phone]
[HKEY_CLASSES_ROOT\Folder\shell\ADB Push to Phone\command]
@="\"C:\\Windows\\System32\\cmd.exe\" /k C:\\platform-tools\\adb.exe push \"%1\" /sdcard/ADBPush/"
Done!
Now you can simply right click context menu to push files using adb - as simple as copy paste
I couldnt get it to work with adb pull as worng directory path if used. Anyone got ideas for getting adb pull working by above method?

Categories

Resources