I know this thread has come up before, but they are all piecemeal and I wanted to try to consolidate the knowledge. Here's what I have. Stock TMO S3 with a busted screen (aka, no pixel visible). I'm trying to get my files off and then use the device. Here's what I thought I would try, though I haven't tried any of it. Thought I would ask for input before I proceed.
Blind boot into Flash mode.
Flash CWM recovery
Blind boot into recovery
Attach USB debug
adb shell to mount my favorite destinations
tar off my favorite files through adb (hack stdin/stdout)
adb pull and unpack boot.img (with cygwin and help)
Edit default.prop to bypass RSA auth.
repack and adb push boot.img
Enable USB debug in non-recovery (sqlite3 hack)
adb reboot phone
Connect to device on ADB
Remote control the phone with androidscreencast
adb input tap to sling clicks without root.
root device if needed
Install Android VNC server for better control
Eat cake
I haven't seen anyone put this all together, so hopefully it works. Are there any big holes that any of you guys see?
Thx.
d4n13 said:
[6] tar off my favorite files through adb (hack stdin/stdout)
Click to expand...
Click to collapse
Finally tested this out, and found the magic to get past the dang ADB linefeed insertion. Usually not an issue, but when I'm DD'ing a partition, it is a problem. Sooo.... looks something like this:
Code:
adb shell "tar -cz folderToTar | uuencode -m /dev/stdout" | uudecode > folderToTar.tar.gz
Since my phone as uuencode in busybox, I'm clean on that end, but on the other end of the pipe (Windoze) I had to install Cygwin shartools (or something like that) to get uudecode.
To walk through it:
This will run a command on my phone:
Code:
adb shell "..."
Tar a folder:
Code:
tar -cz folderToTar ...
UUENCODE that tar with base64 and prepare it to be decoded from the pipe:
Code:
... | uuencode -m /dev/stdout
UUDECODE outside of adb accepting adb as the left side of the pipe:
Code:
adb shell "..." | uudecode
Spit the decoded stuff to whatever file you like:
Code:
... uudecode > folderToTar.tar.gz
This uuencode/uudecode introduces a 33% penalty but keeps from having to store on SD then pull from there. So in the end your still flinging less bits.
Related
Hi guys, I am trying to move some files into ext partition. I want to do it via adb but ...
It came to my attention that adb shell isn't the solution for adb push or adb pull. I need to do it via windows but whenever I do adb remount or adb kill-server and adb pull or adb push . When I input and press enter it shows an arrow I press enter cuz I dont know what I could input. It just tells me "push not found" or "adb not found" if I say adb push.
Please don't ask me what I do exactly just tell me the exact steps ^^
I would like to move Htc ime mod by jonasl by example.
Hope you will help me out guys
copy tools adb.exe, AdbWinApi.dll and AdbWinUsbApi.dll to the .../windows/system32/
Thank's but doesn't seem to work
I tried doing : cd C:\Program Files\Android SDK
adb push C:\Program Files\Android SDK\tools\su-2.1-e-signed\system\xbin\su \system\xbin\
but this just gives me all adb commands.
Doing this inside adb shell gives me the adb : not found
Any idea/ workaround? (< only adb plz I dont want to install linux)
Code:
cd C:\Program Files\Android SDK
adb remount
adb push tools\su-2.1-e-signed\system\xbin\su \system\xbin\
Give that a try.
You can't use push or pull with shell.
The biggest problem you sill face is having spaces in the PC side path names, try moving the SDK to c:\Android_SDK if the above fails
Try this:
Code:
cd C:\Program Files\Android SDK\tools
adb remount
adb push C:\Program Files\Android SDK\tools\su-2.1-e-signed\system\xbin\su /system/xbin/
AH great, by removing the space beetwin android and sdk I managed to get out but now I am facing Out of memory error
Damn I have like 1.5 gb of memory on my ext2 partition
Where can I check the remaining memory?
EDIT : su is 22ko so I dont think memory is the big deal. However I would still like to know what is left
Maybe my microSD is dying... Any idea?
Mister-Tea said:
yy whatever, if you don't want to answer then don't but don't look high on me.
lol......
Click to expand...
Click to collapse
1/ he already answer your question
2/ it's android DEV section, your question if far away from DEV
3/ You have to learn how to use command-line application (Windows suck at this, so you should try on a linux OS)
BTW: a little how-to
cd: a great command, you'll be able to change directory (yes you have "adb" on your harddrive, but you have to tell your computer where is it)
cp : copy
mv: move
ls: list content of working directory
pwd: print current working directory
Now: let say "adb" (adb.exe) is located here: /home/carbonyle/androidSDK/tools/
launch a terminal (WindowsKey + r on windows host, then type "cmd")
Yyour working directory maybe "C:" , or whatever (/home/carbonye/ for me)
now use "cd"
Code:
cd /home/carbonyle/androidSDK/tools/
<. of course adapt this to your environnment
(use ls / pwd to convince you what you're doing)
Code:
./adb reboot recovery
<- for linux user
Code:
adb reboot recovery
<- for Win**** users
Of course this will reboot your phone into recovery mode, just adapt command to your need
Right, this thread has gone far enough with enough flaming for today.
To all of you, im disappointed and you should all know better.
PLease refrain from further flames, tidy up in progress. I am also moving this to QnA.
@ Mister-Tea
You are equally responsible for the flaming by flaming yourself.
@ you all, quit it or i will take further action.
THanks.
Hello
Like some other guys i use linux on my PC. If you want to change your x10mini via shell you can do it but its not very confortable.
I made a few tools so it's easier to use.
Note: This "tricks" are only usefol to you if you are a little advanced with linux and want to "work" with your x10i via shell. I tested it all on a Debian 64bit but think most parts are universal.
1. Putting adb to /etc/bin
First of all you should put the adb-binary in /etc/bin/ so you can access it like every other cmd. You can use the binary in my attached tar or the one from SDK. use "sudo cp adb /system/bin/adb" (if you have a system with sudo, eg debian & ubuntu)
2. adb: error insufficient permissions for device
If you plug in the phone and want to connect via "adb shell" it may says that you don't have permissions for device. There is a workaround:
- Create file /etc/udev/rules.d/51-android.rules
- Put the following in the file:
Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0fce", ATTRS{idProduct}=="2137", MODE="0666"
- restart udev "sudo service udev restart" (again this is debian&ubuntu-only)
if you still got "insufficient permissions", i made a little shell-script "adb-fix-permissions" attached in tar-file
3. bash-completition for adb
Bash is really annoying whitout completion. That means you can just start to type a word, then press [tab] and bash complets it for you. For example you type "adb ki[tab]" and bash complets it to "adb kill server"
To get this you need "adb_completition" from my attached zip or from here. Put this file in /etc/bash_completion.d/ and you got it.
example command to copy it:
"sudo cp adb_completition /etc/bash_completion.d/adb_completition"
4. Some keys not work in adb shell
This is a known and annoying bug. Eg in nano text editor you cant use the [enter]-key. There is a (little unclean) workaround for it: start a telnet-service on the phone, forward ports via adb and connetc to your phone via telnet. You will need telnetd from the attached tar. And your phone needs to be rooted.
- Remount system writable:
Code:
adb remount
- Put telnetd on your phone
Code:
adb push telnetd /system/bin/telnetd
- Make it executable:
Code:
adb shell chmod +x /system/bin/telnetd
for usage i have a little made a little script (in attached tar) "adb-shell".
Or you can do it manual:
Code:
adb telnetd &
adb forward tcp:9999 tcp:23
telnet localhost 9999
.. to be continued...
if you have one, please share your linux-android-tricks with me
thanks
[Guide][ARM now supported] Android development/debugging on ChromeOS - ADB & fastboot
What you need to know before we begin:
ChromeOS (Or Chromium OS if you installed it on a non-chromebook) is based on Unix, and you can access a terminal with button combinations. This part of the guide is easy, but if I can get apt-get working, that's where it gets really complex.
What you'll need
A computer running ChromeOS/Chromium OS
An internet connection on it, or the files on a USB drive (and you to copy them to Downloads)
A little Linux knowledge
Some patience
1.) Download the correct files for system:
ChromeOS/ChromiumOS on an x86 based PC
ChromeOS on an ARM based PC
2.) When the zip has downloaded, extract it so both the adb and fastboot files are in the Downloads folder
3.) It's now time to access the terminal mode. It might be a good idea to get this guide on a phone or some other device so you don't have to switch out at any time.
If you're using a chromebook or an official chromeOS build, you need to access developer mode. Note: this will wipe all your data for security reasons. Full info is here: Chromium Project: Developer mode
4.) Press Ctrl-Alt-F2 on your keyboard, and the whole screen will be a terminal. Read the info at the top, and then login
NOTE: If you're using Chromium OS vanilla builds, the username and password are as follows:
Code:
User: chronos
Pass: facepunch
5.) You now have a localhost terminal, with no root permissions.
6.) Run this code, to locate the location of your Downloads folder:
Code:
ls /home
7.) Mount the filesystem as follows:
Code:
mount -o remount,rw /
8.) Using the name other than "root" and "user", run these commands:
Code:
cp /home/<name>/user/Downloads/adb /sbin/adb
For example, the Chromium one would be:
Code:
cp /home/chronos/user/Downloads/adb /sbin/adb
Repeat for Fastboot (replace "adb" with "fastboot" without the quotes)
9.) Test that it has worked by running:
Code:
adb
It should result in adb working
10.) You're done, adb and fastboot should work. You might need to reboot in some cases for it to work fully
11.) For more stuff, like Java and ant, wait a while until I work out how to get apt-get installed from dpkg
Credits:
Thanks to KMyers for compiling Fastboot for ARM devices, thread here
Reserved
And again
Once more, just in case
Whenever I go to check my path I get this response:
"cat: /usr/local/bin:/usr/bin:/bin:/opt/bin:/home/chronos/user/Downloads/android-sdk-linux/platform-tools: no such file or directory"
Help?
awacker89 said:
Whenever I go to check my path I get this response:
"cat: /usr/local/bin:/usr/bin:/bin:/opt/bin:/home/chronos/user/Downloads/android-sdk-linux/platform-tools: no such file or directory"
Help?
Click to expand...
Click to collapse
That is perfectly normal, every Linux based thing says no file or directory after the path to my knowledge
Sent from my GALAXY NEXUS using Tapatalk 4 (VIP)
Quinny899 said:
That is perfectly normal, every Linux based thing says no file or directory after the path to my knowledge
Sent from my GALAXY NEXUS using Tapatalk 4 (VIP)
Click to expand...
Click to collapse
And so it seems! Now it appears that any adb command returns a "Permission denied" message. Ideas?
Update: Same response for fastboot commands.
awacker89 said:
And so it seems! Now it appears that any adb command returns a "Permission denied" message. Ideas?
Update: Same response for fastboot commands.
Click to expand...
Click to collapse
Try this:
Code:
cd /home/chronos/user/Downloads/android-sdk-linux/platform-tools
chmod 755 adb
chmod 755 fastboot
Then exit back to the login screen on the terminal, login again and try running adb
Quinny899 said:
Try this:
Code:
cd /home/chronos/user/Downloads/android-sdk-linux/platform-tools
chmod 755 adb
chmod 755 fastboot
Then exit back to the login screen on the terminal, login again and try running adb
Click to expand...
Click to collapse
Still no dice
I'm starting to lose hope. I just keep getting "permission denied."
I thought maybe trying this would do the trick but still no response.
Code:
sudo ./adb devices
[code]
P.S. Guess I should mention that running just adb returns command not found, so I've been using ./adb. Maybe I just don't know what the hell I'm doing but I just can't get it to work.
Hmmm. Well, The SDKx86 (87mb) that were in the instructions so, I downloaded the ADT (399mb) instead, just a hint.
Is there a specific branch that is required to be on in chromeos in order for terminal to act correctly? I never get any chance to login once i get into the "crosh" terminal.
Quinny899 said:
That is perfectly normal, every Linux based thing says no file or directory after the path to my knowledge
Sent from my GALAXY NEXUS using Tapatalk 4 (VIP)
Click to expand...
Click to collapse
Instead of doing
Code:
cat $PATH
you should do
Code:
echo $PATH
The cat command is trying to concatenate a file with the name of your full path, which obviously doesn't exist. echo tells you the value of the $PATH variable, which is what you're actually trying to do.
I was trying to get this to work on my Chromebook Samsung Series 5 550
Furst thing I noticed was the absence of an f2 key - tried a usb keyboard no joy
I assume what I am trying to launch is Shell which can only be accessed with a Chrome OS device in developer mode. I really want to get this working so I will try activating developer mode and report back.
Update:
So Developer Mode resets and wipes your device (doh!) back to Step 1
Update 2: (Dev Mode activated function key labelled as "->" works as f2 and launches shell successfully"
Has anyone got this working? I noticed that the folder coming out of the SDK zip is called "sdk" but all the commands listed in the guide use "android-sdk-linux"
I used "sdk" and just get the Permission Denied issue even after chmod on adb
Will this work on the Samsung Series 3 with the ARM processor?
imtoomuch said:
Will this work on the Samsung Series 3 with the ARM processor?
Click to expand...
Click to collapse
Supposedly pulling the adb binary from an android device (/system/bin/adb) and using that would work. Don't know about fastboot though
Sent from my Galaxy Nexus using Tapatalk 4 Beta
jambamkin said:
I was trying to get this to work on my Chromebook Samsung Series 5 550
Furst thing I noticed was the absence of an f2 key - tried a usb keyboard no joy
I assume what I am trying to launch is Shell which can only be accessed with a Chrome OS device in developer mode. I really want to get this working so I will try activating developer mode and report back.
Update:
So Developer Mode resets and wipes your device (doh!) back to Step 1
Update 2: (Dev Mode activated function key labelled as "->" works as f2 and launches shell successfully"
Has anyone got this working? I noticed that the folder coming out of the SDK zip is called "sdk" but all the commands listed in the guide use "android-sdk-linux"
I used "sdk" and just get the Permission Denied issue even after chmod on adb
Click to expand...
Click to collapse
I had the same problems. And just stopped trying about 2 days of trying to figure it out.
I was able to find a version of adb compiled for ARM but it was from an older version which made it a no go on my Nexus 4 (4.2.2 requires updated adb to work with the new security enhancements built in).
I tried it on my Series 5 550 chromebook. Can't seem to get it to work.
I do all the commands and it shows up in echo $PATH but then when i try adb anything it says permission denied. I do the chmod 755 and still permission denied.
i tried to exit back to the login and then the folder wasn't in the echo path anymore. adb not working either. I tried rebooting chromebook and it wasnt there either.
Would it be cheating to get it running with crouton? Because I did get that done.
Sent from my NookColor using xda premium
yeah i've been having the same issue with my samsung 5 series chromebook. "permission denied" and all that. But on the fun side, i learned if you want to really make your chromebook bug-out; type cat adb whilst in /platform-tools.
Hello
There's a way for making a backup with RAW extension that can be flashed with fastboot in asus fonepad (i don't know about others)
See this: http://forum.xda-developers.com/showthread.php?t=1818321
Back up of the whole memory block (via adb)
Connect the phone in ADB mode and unlock the screen.
Open one Cygwin Terminal and enter (replace mmcblk0 if needed):
Code:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0
You will see the cursor blinking at the left. Now the phone is waiting to send the block over the network.
Open another Cygwin terminal and type:
Code:
adb forward tcp:5555 tcp:5555
cd /path/to/store/the/backup
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw
You will see how the image size is growing until it finishes. Now you have the whole phone backed up in raw format. You can see the contents of the GPT partition with gptfdisk tool, available for windows, linux and such. See official website and sourceforge to get it. You can do it the same from ClockWorkMod Recovery but you have to mount first the /system partition since the busybox included with clockworkmod does not come with netcat and you have to use the one from the system partition.
With further linux tools you could edit or extract single partitions from the whole block.
Click to expand...
Click to collapse
But it's for rooted devices only. how can i make a backup with busybox non-root?
Hello XDA-Devs,
I have to admit that I am not an Android or other smartphone OS developer but merely a dimwitted device user who struggles to get data off and onto his Android device.
First I thought that one could simply plug the device into one of my laptop's USB ports and mount it like any mass storage device.
But I had to learn that this simple mode has disappeared in Android versions higher than 2.X.
After several rather dissatisfying other attempts to transfer data, like e.g. via an OpenSSH server app on my (not yet rooted device), I finally came across a seemingly more appealing solution via the ADB USB mode, where the necessary steps were described in blog's posting whose link I not yet allowed to place here (i.e. <10 posts).
After a bit of fiddling I managed to get my device connected via USB and the ADB daemon.
Now I am still struggling how to efficiently get a bulk of e..g camera images from my device.
So far adb pull seems to be the appropriate command.
But somehow I can only download/pull single image files, and my loop isn't working.
Sadly the pull command doesn't have a bulk match option like an ftp client's mget.housand
Also I can't work out if shell globbing works the same as in an e.g. Bash.
See, while I can fetch a list of files, the loop expansion doesn't work, for what reason ever, and I would have to pull every file separately.
That looks strange. Maybe I only fell prey to some shell glob syntax issue here?
So bear with me.
Code:
[[email protected]:~/Pictures]
$ for f in $(adb shell ls /storage/sdcard0/DCIM/Camera/);do echo adb pull "/storage/sdcard0/DCIM/Camera/$f";done|tail
adb pull /storage/sdcard0/DCIM/Camera/20131111_192956.jpg
adb pull /storage/sdcard0/DCIM/Camera/20131111_193008.jpg
adb pull /storage/sdcard0/DCIM/Camera/20131111_193018.jpg
adb pull /storage/sdcard0/DCIM/Camera/20131111_193028.jpg
adb pull /storage/sdcard0/DCIM/Camera/20131111_193036.jpg
adb pull /storage/sdcard0/DCIM/Camera/20131111_193048.jpg
adb pull /storage/sdcard0/DCIM/Camera/20131111_193114_1.jpg
adb pull /storage/sdcard0/DCIM/Camera/20131113_005357.jpg
adb pull /storage/sdcard0/DCIM/Camera/20131113_005418.jpg
adb pull /storage/sdcard0/DCIM/Camera/20131113_005526.jpg
But when I remove the echo
Code:
[[email protected]:~/Pictures]
$ for f in $(adb shell ls /storage/sdcard0/DCIM/Camera/);do adb pull "/storage/sdcard0/DCIM/Camera/$f";done 2>&1|tail
' does not existstorage/sdcard0/DCIM/Camera/20131111_192956.jpg
' does not existstorage/sdcard0/DCIM/Camera/20131111_193008.jpg
' does not existstorage/sdcard0/DCIM/Camera/20131111_193018.jpg
' does not existstorage/sdcard0/DCIM/Camera/20131111_193028.jpg
' does not existstorage/sdcard0/DCIM/Camera/20131111_193036.jpg
' does not existstorage/sdcard0/DCIM/Camera/20131111_193048.jpg
' does not existstorage/sdcard0/DCIM/Camera/20131111_193114_1.jpg
' does not existstorage/sdcard0/DCIM/Camera/20131113_005357.jpg
' does not existstorage/sdcard0/DCIM/Camera/20131113_005418.jpg
' does not existstorage/sdcard0/DCIM/Camera/20131113_005526.jpg
But on a single file invocation I can pull it.
Code:
[[email protected]:~/Pictures]
$ adb pull -p /storage/sdcard0/DCIM/Camera/20131113_005526.jpg
Transferring: 569030/569030 (100%)
1966 KB/s (569030 bytes in 0.282s)
[[email protected]:~/Pictures]
$ identify 20131113_005526.jpg
20131113_005526.jpg JPEG 1920x1080 1920x1080+0+0 8-bit DirectClass 556kb
Strange.
I am convinced that there must be a more efficient way to bulk pull files from my device.
Is there a way to mount my device via ADB?
Having read the help screen of the adb command I only found a remount sub command which would remount the device's system FS as it seems.
Would I have to tinker with the udev rule to have my device mounted when plugged in?
[[email protected]:~/Pictures]
$ adb help 2>&1|grep mount
adb remount - remounts the /system partition on the device read-write
[[email protected]:~/Pictures]
$ lsusb|grep -i samsung
Bus 002 Device 006: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-I9300 Phone [Galaxy S III], GT-P7500 [Galaxy Tab 10.1]
[[email protected]:~/Pictures]
$ cat /etc/udev/rules.d/*android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0666", GROUP="adbandy"
[[email protected]:~/Pictures]
$ groups
fiddle wheel adbandy
[[email protected]:~/Pictures]
$ adb devices -l
List of devices attached
3b086527 device usb:2-1 product:jfltexx model:GT_I9505 device:jflte
Click to expand...
Click to collapse
My Android phones and tablets auto-mount as removable drives when I connect them to my Linux (Mint 17 Cinnamon) computers. Connection to PC is set on the devices as MTP.
I guess these MTP automounts use a FUSE driver?
Being on a RHEL 6.4 binary compatible distro (i.e. SL) I could only find libmtp pre-built RPMs.
But I suspect that the libs alone wouldn't suffice.
If I knew what parts are required to make a working MTP mount I could get all sources and patches, tinker up an RPM spec file and build my own RPM, I suppose.
Thanks for the hint.