I am getting the following error when I try to pull a TWRP backup from my Nexus 4. Can anyone please help?
Code:
remote object '/sdcard/TWRP' does not exist
It doesn't exist there. /sdcard/ is really a symlink. The actual location is /data/media/0/TWRP, but try /storage/emulated/0/TWRP as well.
Next time type "adb shell" to go into the phone, then type:
find / -type d -iname twrp
this will search the entire phone for folders with the name TWRP and list their path.
/ is the root folder of the phone to search in
-type d means search for folders only, leave it out if you want to search for file names
-iname means to search for terms case insensitive
sent from xda premium app
Thanks for the help eksasol. I've tried to pull many different paths and they all return the same remote object does not exist error. I've even tried sudo adb pull, with the same result. I've tried this, find / -type d -iname twrp but, all I get is Permission denied. If anyone else has got some ideas I'd be happy to hear them. Thanks. :good:
If you are using Ubuntu or linux, typing 'find' only search what is in your PC. You get permission denied because you want to search in a root directly that required root permission.
To search for files in your phone, you need to log into your phone by typing "adb shell". TWRP give you root by default, then you can use the find command.
Since you have root by default in TWRP, you don't need to use sudo, also Android do not have "sudo" installed. The correct way to gain root privilege in linux (Android) is by typing: su -
To tell if you have are root, you should see # where your user name is in the command window.
Once you are done finding the path, you need to exit the adb shell in order to make contact with your PC, so just type exit. Only then you can start using "adb pull".
by the way, its "adb pull /data/media/0/TWRP/ \home\username\backup\"
Rememer in linux (Android), it's case sensitive.
OK, I see my mistakes now. I was not exiting adb shell when typing adb pull. Anyway, thanks to your help, everything is working correctly now. Thank you again, I really appreciate it. Now I can flash the 4.4 update safely.
eksasol said:
If you are using Ubuntu or linux, typing 'find' only search what is in your PC. You get permission denied because you want to search in a root directly that required root permission.
...
by the way, its "adb pull /data/media/0/TWRP/ \home\username\backup"
Rememer in linux (Android), it's case sensitive.
Click to expand...
Click to collapse
Thanks for helping me re-learn that linux (Android) is case sensitive
Related
Hey, I'm trying to push some stuff onto my mytouch using the included bridge tool, adb, and can't quite get it to work. AKA, I have no effing clue what I'm doing. I'm good with everything else, but when you sit me in front of Terminal I'm useless. Anyway, running Mac OS X, 10.5, I've got the SDK installed, exported, all that, but the internet has been no help with telling me what to do next. Please, someone help? D:
not sure on mac
but on pc i mostly put the files i want to push in to the sdk tools folder which gives you less to type
if you want to push stuff you need to know where to push on phone like
adb remount (makes drive read/write)
adb push xxxx.ogg /system/media/audio/ringtones/
if you want to install something
adb install twitter.apk
so my terminal looks like this (ignore errors phone not in usb)
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\SI>cd s\tools
C:\Users\SI\s\tools>adb remount
* daemon not running. starting it now *
* daemon started successfully *
error: device not found
C:\Users\SI\s\tools>adb push xxxx.ogg /system/media/audio/ringtones/
error: device not found
C:\Users\SI\s\tools>
sitimber has given some good tips. On a Mac, you have to put "./" in front of adb to get it to execute.
For example, I have the Android SDK installed in /Developer/Android. In order for me to use adb, I open terminal and do the following:
cd /
cd /Developer/Android/Tools
./adb (insert whatever adb command here)
jsnyng said:
cd /
cd /Developer/Android/Tools
./adb (insert whatever adb command here)
Click to expand...
Click to collapse
worked perfectly! all the info i was getting was either for windows or linux and i was getting wicked confused. i have like nooo training with terminal so i was lost. that worked perfectly, thank you :]
do i still have to type "adb (command)" when i'm in the shell? i know that far, that im in the adb shell when there's a # next to my open commandline.
This will make it a step easier. If you want to be able to "adb command" every time you open the shell without changing directories,
Open terminal.
Run:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
Click to expand...
Click to collapse
How you will be able to see hidden files.
Download the OSX SDK http://developer.android.com/sdk/download.html?v=android-sdk_r3-mac.zip
Unzip it. Move the entire folder into your root directory "/"
rename it to "android".
Launch TextEdit.app
Hit "Format>Make Plain Text"
Now type (in the document)
export PATH=${PATH}:/android/tools
Click to expand...
Click to collapse
Save is as
.bash_profile
in YOUR HOME DIRECTORY.
Make sure you uncheck "If no extension, use .txt"
Say yes when it asks if you want to make this a system file.
now close terminal (all the way) and relaunch. Type "adb" and whatever you'd like and you're set!
jewishjawsh said:
do i still have to type "adb (command)" when i'm in the shell? i know that far, that im in the adb shell when there's a # next to my open commandline.
Click to expand...
Click to collapse
No, you don't.
chordmasta's directions for creating a .bash_profile are correct, but I'll point out that you don't need to move it to root. I personally prefer not to clutter up root with my personal stuff. You also don't need to rename it if you don't want to.
For example, if you have it in "Documents", you would use this path (replacing my username "softbanksucks" with the name of your home directory.)
Code:
export PATH=${PATH}:/Users/softbanksucks/Documents/android-sdk-mac_x86-1.6_r1/tools
softbanksucks said:
No, you don't.
chordmasta's directions for creating a .bash_profile are correct, but I'll point out that you don't need to move it to root. I personally prefer not to clutter up root with my personal stuff. You also don't need to rename it if you don't want to.
For example, if you have it in "Documents", you would use this path (replacing my username "softbanksucks" with the name of your home directory.)
Code:
export PATH=${PATH}:/Users/softbanksucks/Documents/android-sdk-mac_x86-1.6_r1/tools
Click to expand...
Click to collapse
Thanks for pointing that out. I should have mentioned it. I knew this walkthrough would work without having to change values.
chordmasta said:
Thanks for pointing that out. I should have mentioned it. I knew this walkthrough would work without having to change values.
Click to expand...
Click to collapse
No prob - knew that you knew, just figured I'd point it out for those who don't
I try to install apk packages like godzson dialer and clear_keyboard and i get errors.
I used apps installer and android dev
apps installer tells me It cannot install the app
android dev I run
adb install C:\clear_keyboard\system\app\HTC_IME.apk
I get
failure [install_parse_failed_unexpected_exception]
I searched for hours finding solutions that say i need to push the files to /system/apps and doing that there is permissions involved and I cant seem to touch anything in /system.
When I run chmod 777 /system i get an error saying unable to change read only file system.
I thought all of this was going to be simple tasks but it's getting really annoying any help would be greatly appreciated. Thanks for everything.
if yr installing through and use
Make sure phone is synced
Make sure app is in tool file I'd adk file
Make sure when at command prompt Ur in adk/tools file first
Adb remount
Adb push (app.apk) /system/(app/framework)
ok I figured out my problem but fixing it is going to be quite confusing. Looks like I would have to know a lot more than I do to fix it. Basically the adb is not reading the phone as root (or something like that). And the ro.secure is set to 1 which it should be set to 0 to be considerd root. So therefore I have to reinstall a bootimg. Ive been reading it on another forum page but i cant post it cause my account hasn't been verified yet. but it's this forum and here is the thread showthread.php?t=443041&page=2
but it's like french to me!!! If anyone can dumb this down for me I would really appreciate it lol thanks a lot you guys have been so much help in the little amount of time ive been a member to this forum. Thank you
redlinethecar said:
I try to install apk packages like godzson dialer and clear_keyboard and i get errors.
I used apps installer and android dev
apps installer tells me It cannot install the app
android dev I run
adb install C:\clear_keyboard\system\app\HTC_IME.apk
I get
failure [install_parse_failed_unexpected_exception]
I searched for hours finding solutions that say i need to push the files to /system/apps and doing that there is permissions involved and I cant seem to touch anything in /system.
When I run chmod 777 /system i get an error saying unable to change read only file system.
I thought all of this was going to be simple tasks but it's getting really annoying any help would be greatly appreciated. Thanks for everything.
Click to expand...
Click to collapse
First, put your apk's in your "C:\AndroidSDK\Tools\" Folder
Second open the cmd window and do "cd C:\AndroidSDK\Tools\"
Third do "adb remount"
Fourth "adb push xxxx.apk /system/app/"
that will install them
When remounting I get error
Code:
remount failed: Operation not permitted
but I continue anyway and the
Code:
adb push HTC_IME.apk /system/app
sends the file with no problem but it doesn't install it though.
Here are steps to do if it is not already installed on your phone. However, if it is you can not install when it is already there. I'm not sure how to remove in terminal and everything I've tried it tells me read only blah, blah, blah...
I tried mount -o remount,rw /system---that is suppose to work.
1.Make sure anything you want installed is in
the root of the sdcard..(/sdcard/nameoffile.apk)
2. Download a terminal emulator from the market.
If it installs continue..If not then continue on back to the thread.
3. Open up the terminal emulator. It should ask permission from SU. >Always allow
4. Now type the following
su (hit enter)
install /sdcard/name_of_file.apk /system/app/name_of_file.apk----if it is a system app
If it is a downloaded app then use /data/app
Ok.... well I tried that way also and I get the error
Code:
install: not found
I downloaded the terminal app from the market and entered the commands as you said for ex.
Code:
install /sdcard/HTC_IME.apk /system/app/HTC_IME.apk
Thanks a lot though I wish it could have been that easy.
Hey Boys and Girls,
where i can find an manual to root the tattoo with a mac?
sorry, i have search for this, but i cant find information for this
I don't thing that there is a difference.
As soon as you have SDK installed and adb works, the commands are the same.
hi,
i'm also doing all the rooting process from mac, just put the directory contain 'adb' shell into your home/user places and executing it with 'terminal'..
Same here, using a Mac ever since and also using it for Android development. Due to the underlying Unix core of OS X you just have to follow the steps as described for Linux. If it's just adb commands it's the same on every platform anyway.
You might want to add a
Code:
export PATH=${PATH}:/Users/yourusername/android.sdk/tools
to your .bash_profile file in your home folder so you don't have to cd to the SDK tools folder everytime. Happy rooting!
Mod. edit: not dev related, moved to general
Okay thanks for yours answers but i'm a newbie.
the background story is, I want to edit the boot.mp3. Because the startsound is really annoying
So i have download SDK, open the terminal and switch to usb-debbugging mode on my tattoo.
And now? sorry, I'm still missing a few knowledge
thanks for your help
well just use the various adb commands in Terminal Just type in "adb", press enter and you'll get a list of all possible commands. Assuming you've added the path to your sdk tools folder to your bash profile. Otherwise just drag & drop the adb binary from the tools folder onto your Terminal window, et voila.
The most used commands are probably push and pull where you can, well, push stuff to your phone or pull it to your computer.
So if you want to modify the boot.mp3 you would pull the original from the phone to your computer, modify it and push it back, overwriting the original file. In Terminal speak: ;-)
adb pull /system/media/bootscreen/boot.mp3
adb push /path/to/boot.mp3 /system/media/bootscreen/boot.mp3
Please note depending on the ROM you're using the paths may be different. To browse the device via Terminal type in "adb shell" and make a simple "ls" to list the directories, "cd" to change directories etc.
Or if you just want to use another mp3:
adb push /path/to/whatever.mp3 /system/media/bootscreen/boot.mp3
Again, on the Mac you can just drag & drop files onto the Terminal to get their full Unix paths like to your custom mp3
Thanks a lot. i love it its really simple
and now i have load and edit the the boot.mp3. But i can't push it to my tattoo, because i can only read but not write
I have tried to root my phone with "adb root" but it is the message "adbd cannot run as root in production builds"
Terminal: "adb remount", then push again
damn the next bad message "remount failed: Operation not permitted"
You need to root your phone first.
http://forum.xda-developers.com/showthread.php?t=637927
Okay i have executed the instructions. But I've stop at this part:
You should get something like this:
Code:
# id
uid=0(root) gid=1000(shell) groups=1003(graphics),1004(input),1007(log),1011(adb),1015(sdcard_rw),3001(net_bt_admin),3002(net_bt),3003(inet)
uid=0(root) is important.
Click to expand...
Click to collapse
Yes i've root but i'cant download the "su binary" because its doesnt exist.
But its absolute essential to need the "su binary" to only copy the boot.mp3 to my phone? Or there is an other way? What are the commands to push the boot.mp3 back to may tattoo then i'm in the root mode like >> "#".
okay hope you understand me
You need "su" to do root stuff... no other way.
Download the package from 1 click root thread and find "su" there...
http://forum.xda-developers.com/showthread.php?t=644279
now, i have install the su binary. Then i does this command
user:~ user$ /Users/user/android-sdk-mac_86/tools/adb shell
$ /data/local/bin/su
#
Click to expand...
Click to collapse
And now? Is there a comand to push the boot.mp3 back to the phone in this mode >> "#" ?
I have try to open an new terminal window and type
adb push /path/to/boot.mp3 /system/media/bootscreen/boot.mp3
Click to expand...
Click to collapse
but the answer is
failed to copy '/Users/android-sdk-mac_86/boot.mp3' to '/system/media/bootscreen/boot.mp3': Permission denied
Click to expand...
Click to collapse
and adb remount doesnt work to
You also need tattoo-hack.ko file and do insmod tattoo-hack.ko to make /system writable.
Or even better... flash custom amon_ra recovery image and then a custom rom with all this already included.
Mine for example http://forum.xda-developers.com/showthread.php?t=702401
It doesnt have boot sound enabled
Okay thank you very much.
now it was successful
Hello all. I created a quick fix for a minor annoyance when using ADB on Ubuntu. It seems that at every reboot the adb server would not start as root and as a result i would end up with an error having to do with insufficient privileges when trying to run an adb command.
I created a fix; this might not be the right way to go so i'm open to suggestions, but so far it works for me.
I created a script to quickly restart the ADB server as root.
The script contains the following commands
adb kill-server
cd android-sdk-linux_x86/platform-tools
sudo ./adb start-server
adb devices
Notes:
1. If adb is located somewhere else on your computer, modify the 2nd line to match that location.
2. It will ask you to elevate your privileges when you run it.
3. I placed the script in my home folder and gave it executable permissions so that i could run it by simply typing "./adbrestart" without the quotes from a freshly opened terminal. I recommend unzipping this into your home folder for that reason
Again, this is just a method that works well for me, if someone has a better method of doing this, please feel free to chime in.
Running with instructions here:
http://wiki.cyanogenmod.org/wiki/HTC_Glacier:_Full_Update_Guide#Rooting_the_HTC_Glacier
but after going into adb shell and running:
adb push busybox /data/local/tmp/
I'm getting a "permission denied" error for any adb for that or any adb command I throw at it.
I do notice that my adb shell starts with $ instead of # but not sure what step I'm missing. Any help would be greatly appreciated. Trying to breath new life in this thing and don't have any account/market setup on it - so if I can do the rooting through this it'll be easier for me otherwise I'll go ahead and setup another G-account to do it that way if I have to :\
Try executing "adb shell mkdir /data/local/tmp" and try again.
If doesn't work - try changing all /data/local/tmp references to /data/local
thanks for the feedback Jack_R1
Unfortunately that's a no go... same error even with that
Then you're doing something wrong. Follow the guides EXACTLY. Don't do stuff that's not written, do the stuff that's written EXACTLY as it's written, verify that you're starting where the guides expect you to and have all the prerequisites, and it'll work. Your phone isn't different from any other phone, and if something that works for million others doesn't work for you - then you're doing something wrong.
For example, nobody asked you to get into ADB shell to run these commands you're running. You can't run "adb" while being inside ADB shell. Read the guide PROPERLY.
Jack_R1 said:
Then you're doing something wrong. Follow the guides EXACTLY. Don't do stuff that's not written, do the stuff that's written EXACTLY as it's written, verify that you're starting where the guides expect you to and have all the prerequisites, and it'll work. Your phone isn't different from any other phone, and if something that works for million others doesn't work for you - then you're doing something wrong.
For example, nobody asked you to get into ADB shell to run these commands you're running. You can't run "adb" while being inside ADB shell. Read the guide PROPERLY.
Click to expand...
Click to collapse
Thanks,
I did try to follow things to the T but diverted away from doing things -exactly- since starting with "adb push busybox /data/local/tmp/" command I keep getting a "cannot stat 'busybox': No such file or directory"
So in reality.. .THAT was my main issue which is leading to me trying other stuff such as the "adb shell" and not getting # (since I'm pushing files to gain root)
Turns out I'm now able to get "adb push" working on my files since.. I hate myself for it being this simple... I just had to "CD" into my /platform-tools folder since command prompt started in my documents folder by default thus it was looking there for my files
Welp, thanks for the help anyway. Seen this question lingering around in Google Search and hope this helps out someone else :good: