Hey guys, I am a pretty new to ADB, I spent all day yesterday trying to figure it out and I think I have a fairly loose understanding of how it works. But, my question is what are the differences in the rooting guide if I'm trying to root on a Mac?
yea unfortunately for us mac users trying to root any device is very scarce, most if not all rooting methods require windows, even if they say works for mac, it usually doesn't for some reason.
I use VM ware, just torrent it for free, and torrent a windows 7 as well, if ussed this to root my older Droid model.
Rooting a phone using ADB on a Mac is no different than on Windows. IMO it's easier on osx/linux, as you don't have to worry about USB drivers.
Assuming you don't have a PATH variable setup for the platform-tools directory, just type "./adb whatever" instead of "adb whatever". That's about the only difference.
GrdLock said:
Rooting a phone using ADB on a Mac is no different than on Windows. IMO it's easier on osx/linux, as you don't have to worry about USB drivers.
Assuming you don't have a PATH variable setup for the platform-tools directory, just type "./adb whatever" instead of "adb whatever". That's about the only difference.
Click to expand...
Click to collapse
+1. It's SOOO much easier on a Mac, no driver issues, same basic command lines.
The only time it's easier on Windows is if there's some one-click method that requires a windows executable...but you still have to worry about getting Win to recognize the phone.
Edit: to answer the original post, there's no difference. Just put ALL the files into the same folder on your computer. Open the terminal app, type in cd then drag and drop the folder onto the terminal and hit enter. Type in ls and enter to make sure the files are actually there. After that, just follow the guide step by step. You can even drag and drop or copy/paste the commands. That's what I did (to make sure I made no typos).
Come to think of it, if OSX has curl installed on it (which I have no clue if it does or not), the linux easyroot script in the development forum should work just fine.
If not you could probably just change curl to wget and it would work fine. I'm assuming OSX comes with wget.
GrdLock said:
Come to think of it, if OSX has curl installed on it (which I have no clue if it does or not), the linux easyroot script in the development forum should work just fine.
If not you could probably just change curl to wget and it would work fine. I'm assuming OSX comes with wget.
Click to expand...
Click to collapse
OS X comes with curl.
Related
I am trying to get adb to work. I am doing it on a x64 vista system and I think I am getting the Path wrong. I am trying to get it to run like the page says to initialize it to read the device so I know it is working.
I can't get it to start from command prompt with out navigating to the directory it resides in. Is that right for the newer versions of ADB or am I just a monkey and can't figure out simple pathing?
I just made a folder in my c drive called ADB, and placed the entire folder with adb and the dll files required in it, along with superuser, busybox, etc.
Right click on command prompt and run as administrator.
once at system32 type: cd C:\ADB
then you will have navigated to the folder containing your ADB files.
your command prompt should now read: C:\ADB
then you can type: adb devices
it will say something about starting daemon services, and then list attached devices.
you are free to proceed with whatever instruction or operation you are doing after that.
also, make sure you have the drivers for the phone installed, or your computer wont recognize the android debugging bridge.
LowRentTechGuy said:
I am trying to get adb to work. I am doing it on a x64 vista system and I think I am getting the Path wrong. I am trying to get it to run like the page says to initialize it to read the device so I know it is working.
I can't get it to start from command prompt with out navigating to the directory it resides in. Is that right for the newer versions of ADB or am I just a monkey and can't figure out simple pathing?
Click to expand...
Click to collapse
Android Development is not for questions or Problems
Please post in the correct Forums
Moving to General
Well thanks for moving it, I will keep a closer eye on which forum I am browsing when I post.
Sent from my SCH-I510 using Tapatalk
For whatever reason, my GT 7+ is showing: ????????? offline/device when I run adb devices. I've tried running adb kill/start as root, still nothing. I've cycled "USB debugging". I'm running ubuntu 10.10. Every thing but adb is working but adb
Any insight or help would be helpful.
udev.
See: http://wiki.cyanogenmod.com/wiki/Udev
Answered
Here's the rule I put up in /etc/udev/rules/98-android.rules:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666" #all samsung devices
Then restart udev and then restart adb and it's up!
This method is hard to remember. You can also start adb as root with:
adb start-server
and it should work that way, at least until adb is closed. You do not have to do all the adb commands as root, only the start.
Jason_25 said:
This method is hard to remember. You can also start adb as root with:
adb start-server
and it should work that way, at least until adb is closed. You do not have to do all the adb commands as root, only the start.
Click to expand...
Click to collapse
Why do you need to remember it? Create a udev rule once and you never have to deal with it again.
Running things as root should be avoided if possible.
I have found that there may be an issue with ubuntu 10.10 and this tablet. For me, it seems that the MTP crud is interfering with adb. If I freeze the MTP application on the tablet, I have no problem.
...and now it gets even stranger: If I boot ubuntu 10.10 in a virtual machine (vmware 8.x), its fine even with mtp enabled.
I haven't had any issue at all with my gentoo boot. (However, I've been trying to do the android development with ubuntu as it appears to be directly supported by google.)
(This really isn't an issue for me, as I actually prefer to keep MTP disabled so I don't get popups.)
Entropy512 said:
Why do you need to remember it? Create a udev rule once and you never have to deal with it again.
Running things as root should be avoided if possible.
Click to expand...
Click to collapse
Because I work on computers other than my own?
Because I have more than one computer?
Because I sometime reinstall the OS?
Because I don't have magical fail-proof hardware?
Because udev gets messed up and apt-get replaces the rules file?
This method is simpler for new users. The adb tools are straight from google so can be trusted and the udev approach just adds a lot of complexity.
edit:
garyd9 said:
I have found that there may be an issue with ubuntu 10.10 and this tablet. For me, it seems that the MTP crud is interfering with adb. If I freeze the MTP application on the tablet, I have no problem.
Click to expand...
Click to collapse
I do not seem to have any problem using 64-bit debian, which you probably know Ubuntu is based on. I have even built the AOSP with it without much trouble. Though, deploying it to a device is a different matter for me.
I have a B90 TF101 and I am able to get into recovery mode. I have no ROM on my internal SD card and have wiped and formatted everything. I have read that it is possible to push a file using ADB while in recovery.
However I am not able to see my device when I use the adb devices command. I noticed that the drivers for the transformer are not installed. So I tried to install them and it tells me that windows can't install. I am pointing the installer to the MTP devices driver folder.
How do I get the drivers to work so I can use ADB or can I set up ADB in Linux and not have to worry about the drivers?
edit: I forgot to mention I am running windows vista.
Hi! Search in transformer's support page, you can find the drivers there
Are you saying that the drivers in the MTP folder are not the right ones? I got them right from Asus' website. Which drivers should I be using?
Ageesaman, did you ever get the drivers working? I had the exact same problem (got adb working as far as listing devices, but then it returned with a blank line after "adb devices" in cmd window). I downloaded the ASUS site's USB drivers download as well as every other utility from that site; I also tried external sources; finally, I tried manually updating by pointing to the unzipped MTP folder - nothing worked. I used both 64 and 32 bit Windows 7 machines. I am stuck in the cwm recovery loop so I can't do much troubleshooting. I tried searching dozens of sites for several hours but came up short.
Thanks in advance for any help offered.
Unfortunately I have not found a solution to getting the drivers installed. I was hoping someone would be able to confirm/deny if I can do this in Linux without the drivers before going through with setting it up. However that will be my next step as soon as I have the time to do it.
Ageesaman,
Unfortunately I know nothing about Linux, but what finally got it working for me was starting the installation of PDANet for Android. I saw it look for and install the driver, then I got a ADB confirmation. I then canceled the PDANet install. If you decide to go this route and get error messages in the cmd window, retry "adb devices" up to 3 times. In the meantime, I hope you get your Linux answer. Good luck.
I will give that a try. Is PDAnet something from Asus? I will do a search and see if I can find it.
ageesaman said:
Unfortunately I have not found a solution to getting the drivers installed. I was hoping someone would be able to confirm/deny if I can do this in Linux without the drivers before going through with setting it up. However that will be my next step as soon as I have the time to do it.
Click to expand...
Click to collapse
Yes, I can confirm the TF101 works with ADB without drivers on Ubuntu linux [I am on 11.04]. The current [stable, with 12.04 betas] Ubuntu version is 11.10, and you can download it to a live CD and run it off the CD without installing it.
I just got my tf101 the other day and I tried using adb [and older version], and it did not show up. Then I downloaded the tf101 root.zip file, and tried the adb within that folder, and it worked.
I've uploaded it to mediafire:
adb-1.0.29 http://www.mediafire.com/?hqwxbljs2gbpfxe
md5 64c4afbab6d2f769ddbb229f0247cf8a
update: newest adb is 1.0.31 http://www.mediafire.com/download.php?vcvc4dxkdd57695
md5 ed5c8f9a221cae0cb24d6cdc8b76d396
download, and run
chmod +x ./adb-1.0.29
to make it executable
That worked! I can now connect to my device with ADB. Thanks for that pdanet advice.
Now I just need to figure out how to push the file. Can't seem to get it to work. Here is what I am typing in the cmd line.
adb push rom.zip /sdcard
The rom I am trying to push is in the Platform tools folder that I am using to access adb. Does anybody know what I am doing wrong? Any help would be awesome.
is the rom.zip in the same directory as you are in (cd <path>)?
What does it say when you try to transfer it?
You can also try to push it to the full path (/mnt/sdcard/)
The first issue I had was that Asus sync was on and causing problems. As soon as I shut that off ADB started to work and act normal.
The file is in the same path.
When I try the transfer it looks like it finishes and it just tells me the file size. It actually seems like it works I just can't find the file when it is finished. I tried rebooting recovery but it seems like the file is just not there.
I will try the /mnt/sdcard/ and see if that works.
ageesaman said:
The first issue I had was that Asus sync was on and causing problems. As soon as I shut that off ADB started to work and act normal.
The file is in the same path.
When I try the transfer it looks like it finishes and it just tells me the file size. It actually seems like it works I just can't find the file when it is finished. I tried rebooting recovery but it seems like the file is just not there.
I will try the /mnt/sdcard/ and see if that works.
Click to expand...
Click to collapse
It's probably because /sdcard is a soft link to /mnt/sdcard/
if you did /sdcard/, I think it should probably work.
You sir are the man! Thanks for your time.
To get the process all in the same place for anyone else who may need this here you go. Just to make it clear.... This is what I did on my device and it worked. It may or may not work for you but maybe it's worth a try.
1. Downloaded SDK and Java JDK.
2. Used PDAnet to force windows to install the correct ADB device drivers.
3. When the drivers where installed and ADB was working I used this command to push the .zip file to the internal sd card.
adb push rom.zip /sdcard/
Just a few notes for this.
ADB was not working well at first because I had Asus sync running in the background. Make sure this is off.
Also make sure you put the file you are trying to push in the same directory you are using for ADB. For instance I used C:/android-sdk/platform-tools/ to access ADB so the file had to be in that folder in windows explorer.
To make it easier to type (I had to do this a lot while troubleshooting) I changed the name of the rom I was trying to push to rom.zip. This made typos less of an issue.
Make sure that you put the file extension (.zip in my case) in the ADB command even if it doesn't say it when you look at the file in windows explorer.
I think that is it in a nutshell. I hope this helps anyone else who needs to push a rom.
Good Luck
This method in this post didn't work for me, but this one did: http://forum.xda-developers.com/showthread.php?t=1689193
I set Windows to look for driver in c:. After a while one was installed and worked.
What I did on windows 7
Go to Device manager
Find transformer , right click on faulty marked unit.
Select properties
go to tab driver
update driver
Select browse
select path to the subfolder ANDROID ( containing usb drivers from asus )
include subfolders
Windows will find to alternatives , choose xxxx ADB
Windows will complain, ignore
done
/Claes R
W
There are servel cmds which we can use
But I post only top 10 cmds to help that ones who need
###############
If I make a mistake so please reply with your suggestions
And if you want a cmd in the list .submit your reply with cmd and features ( full detail as you know.).
########cmds###########
For a lot of us, the fact that we can plug our Android phone or tablet into our computer and interact with it is a big plus. Besides the times when we've broken something and need to fix it, there are plenty of reasons why an advanced Android user would want to talk to his or her device. To do that, you need to have a few tools and know a few commands. That's what we're going to talk about today. Granted, this won't be the end-all be-all discussion of adb commands, but there are 10 basic commands everyone should know if they plan to get down and dirty with the command line.
The tools are easy. If you're a Mac or Linux user, you'll want to install the SDK as explained at the Android developers site. It's not hard, and you don't have the whole driver mess that Windows users do. Follow the directions and get things set up while I talk to the Windows using folks for a minute.
If you're using Windows, things are easier and harder at the same time. The tools themselves are the easy part. Download this file. Open the zip file and you'll see a folder named android-tools. Drag that folder somewhere easy to get to. Next, visit the manufacturers page for your device and install the adb and fastboot drivers for Windows. You'll need this so that your computer can talk to your Android device. If you hit a snag, visit the forums and somebody is bound to be able to help you through it.
Now that we're all on the same page, enable USB debugging on your device (see your devices manual if you need help finding it, and remember it was hidden in Android 4.2), and plug it in to your computer. Now skip past the break and let's begin!
1. The adb devices command
The adb devices command is the most important one of the bunch, as it's what is used to make sure your computer and Android device are communicating. That's why we're covering it first.
If you're a pro at the operating system on your computer, you'll want to add the directory with the Android tools to your path. If you're not, no worries. Just start up your terminal or command console and point it at the folder with the tools in it. This will be the file you downloaded earlier if you use Windows, or the platform-tools folder in the fully installed Android SDK. Windows users have another easy shortcut here, and can simply Shift + right click on the folder itself to open a console in the right spot. Mac and Linux users need to navigate there once the terminal is open, or install an extension for your file manager to do the same right click magic that's in Windows by default.
Once you're sure that you are in the right folder, type "adb devices" (without the quotes) at the command prompt. If you get a serial number, you're good to go! If you don't, make sure you're in the right folder and that you have the device driver installed correctly if you're using Windows. And be sure you have USB debugging turned on!
Now that we have everything set up, let's look at a few more commands.
2. The adb push command
If you want to move a file onto your Android device programmatically, you want to use the adb push command. You'll need to know a few parameters, namely the full path of the file you're pushing, and the full path to where you want to put it. Let's practice by placing a short video (in my case it's a poorly done cover of the Rick James tune Superfreak) into the Movies folder on your device storage.
I copied the superfreak.mp4 file into the android-tools folder so I didn't need to type out a long path to my desktop. I suggest you do the same. I jumped back to the command line and typed "adb push superfreak.mp4 /sdcard/Movies/" and the file copied itself to my Nexus 4, right in the Movies folder. If I hadn't dropped the file into my tools folder, I would have had to specify the full path to it -- something like C:\Users\Jerry\Desktop\superfreak.mp4. Either way works, but it's always easier to just drop the file into your tools folder and save the typing.
3. The adb pull command
If adb push sends files to your Android device, it stands to reason the adb pull command gets them out. That's exactly what it does, and it works the same way as the adb push command did. You need to know both the path of the file you want to pull off, as well as the path you want it placed into. You can leave the destination path blank and it will drop the file into your tools folder to make things easy.
In this example, I did it the hard way so you can see what it looks like. The path of the file on the device is "/sdcard/Movies/superfreak.mp4" and I put it on my Windows 8 desktop at "C:\Users\Jerry\Desktop". Again, the easy way it to just let it drop into your tools folder by not giving a destination, which would have been "adb pull /sdcard/Movies/superfreak.mp4". Remember your forwards slash for the Android side, and you'll have no problems here.
5. The adb reboot-bootloader and adb reboot recovery commands
Not only can you reboot your device, you can specify that it reboots to the bootloader. This is awfully handy, as sometimes those button combos are touchy, and if you have a lot of devices you can never remember them all. Some devices (the LG Optimus Black comes to mind) don't even a way to boot to the bootloader without this command. And once again, being able to use this command in a script is priceless. Doing it is easy, just type "adb reboot-bootloader" and hit the enter key.
Most devices can also boot to the recovery directly with the "adb reboot recovery" (note there is no hyphen in this one) and some can't. It won't hurt anything to try, and if yours can't nothing will happen.
6. The fastboot devices command
When you're working in the bootloader, adb no longer works. You're not yet booted into Android, and the debugging tools aren't active to communicate with. We use the fastboot command in it's place.
Fastboot is probably the most powerful tool available, and many devices don't have it enabled. If you're does, you need to be sure things are communicating. That's where the fastboot devices command comes into play. At the prompt, just type in "fastboot devices" and you should see a serial number, just like the adb devices command we looked at earlier.
If things aren't working and you are using Windows, you likely have a driver issue. Hit those forums for the answer.
7. The fastboot oem unlock command
The holy grail of Android commands, fastboot oem unlock does one thing, and one thing only -- unlocks your Nexus device (or an HTC device using their official tool). If you're using a phone from a different manufacturer, you have a different method of unlocking things -- maybe with ODIN or .sbf files -- and this won't apply to you. We're including it because even if you don't need it, it's an important part of Android's openness. Google doesn't care what we do with phones or tablets that we've bought, and include this easy way to crack them open. That's something you usually don't see from any tech company, and a big part of the reason why many of us choose Android.
Using it is easy enough. Once you've used fastboot devices to make sure everything is communicating, just type "fastboot oem unlock" at the prompt and hit enter. Look at your device, read carefully, and choose wisely.
Protip: Using "fastboot oem unlock" will erase everything on your device
8. The adb shell command
The adb shell command confuses a lot of folks. There are two ways to use it, one where you send a command to the device to run in its own command line shell, and one where you actually enter the device's command shell from your terminal. In the image above, I'm inside the device shell, listing the flies and folders on the device. Getting there is easy enough, just type "adb shell" and enter. Once inside, you can escalate yourself to root if you need to. I'll warn you, unless you're familiar with an ash or bash shell, you need to be careful here -- especially if you're root. Things can turn south quickly if you're not careful. If you're not familiar, ash and bash are command shells that a lot of folks use on their Linux or Mac computers. It's nothing like DOS.
The other method of using the adb shell command is in conjunction with one of those Ash commands your Android device can run. You'll often use it for more advanced tasks like changing permissions of files or folders, or running a script. Using it is easy -- "adb shell <command>". An example would be changing permissions on a file like so: "adb shell chmod 666 /data/somefile". As mentioned, be very careful running direct commands using these methods.
9. The adb install command
While adb push can copy files to our Android devices, adb install can actually install .apk files. Using it is similar to use the push command, because we need to provide the path to the file we're installing. That means it's always easier to just drop the app you're installing into your tools folder. Once you've got that path, you tell your device to sideload it like this: "adb install TheAppName.apk".
If you're updating an app, you use the -r switch: "adb install -r TheAppName.apk". There is also a -s switch which tries to install on the SD card if your ROM supports it, and the -l switch will forward lock the app (install it to /data/app-private). there are also some very advanced encryption switches, but those are best left for another article.
And finally, you can uninstall apps by their package name with "adb uninstall TheAppName.apk". Uninstall has a switch, too. The -k switch will uninstall the app but leave all the app data and cache in place.
10. The adb logcat command
The adb logcat command is one of the most useful commands for some folks, but just prints a bunch of gibberish unless you understand what you're seeing. It returns the events written to the various logs in the running Android system, providing invaluable information for app developers and system debuggers. Most of us will only run this one when asked by one of those developers, but it's very important that we know how to use it correctly.
To see the log output on your computer screen, just type "adb logcat" and hit enter. Things can scroll by pretty fast, and chances are you won't find what you're looking for. There are two ways to handle this one -- filters, or text output.
You also have to specify the cmds properly.
Hope it help you .
Like my work hit thanks button.
$$$$$$$$$$$$$$$$$$$$$$$$
Any suggestions most welcome.
$$$$$$$$$$$$$$$$$$$$$$$$$
Personally, after Windows 8, followed by Windows 10, I started to seriously look into Linux (which is free) as my primary desktop. Today LibreOffice (which is free) has more features than Microsoft Office and can open, edit, and save all of Microsoft Office's documents. Thanks to Steam's new deployment, I can even now run my Windows-only games on Linux too. The one thing I found very hard to swallow was trying to get my Andriod device (which is technically Unix too) to actually connect to my computer and I imagine that is because the documentation (even via a Google search) to using ADB or Fast Boot with Linux seems to be hidden among pages upon pages of Windows users.
For simple ease of reference as I couldn't even find this here on XDA, allow me to correct the matter.
Type out (or copy and paste) the following commands to install ADB and Fastboot.
Code:
sudo apt-get install adb
sudo apt-get install fastboot
Now you have both adb and fastboot installed. Next, you'll need to enable adb.
Code:
sudo adb
Now boot your phone to your bootloader screen (you get there by pressing both your power and lower volume keys at the same time). Once there load TWRP with the following command.
Code:
sudo fastboot boot '/your_path_here/twrp-3.2.3-0-payton.img'
Your path will be wherever you happen to have downloaded your copy of TWRP. From there I was able to successfully mount my device within TWRP and upload my ROM zip file as needed.
You will upload files to your phone using the "ADB PUSH" command to your /sdcard/ directory (as admin in windows or root in Linux). For example:
Code:
adb push lineage-16.0-20180921-UNOFFICIAL-payton.zip /sdcard/
I hope this was helpful.
Note: Because you're doing this in Linux, the files you upload to your phone may not have the correct permission settings (chmod settings) after they are uploaded. This is very unlikely, but still technically possible.
Thankfully, the folks at TWRP have thought of this and in the 'Advanced' menu, you will find a file manager. From there select the file of your choice and click the chmod button that reads "chmod 0777". Don't forget to mount the DATA partition (before using the file manager) else you may not see the file you are looking for.
or just download the package from here
https://developer.android.com/studio/releases/platform-tools
unzip and have fun
munchy_cool said:
or just download the package from here
https://developer.android.com/studio/releases/platform-tools
unzip and have fun
Click to expand...
Click to collapse
This is helpful, but most newbies to Linux wouldn't even know how to execute those base files. lol But Windows users coming to Linux do know how to run command prompts (good old Microsoft kept the command prompt around long enough that folks moving to Linux just associate the terminal in the same light). Which is why I thought to have them install a preconfigured program would be easier.
But thanks for the source. It is still useful.
MotoX4 said:
This is helpful, but most newbies to Linux wouldn't even know how to execute those base files. lol But Windows users coming to Linux do know how to run command prompts (good old Microsoft kept the command prompt around long enough that folks moving to Linux just associate the terminal in the same light). Which is why I thought to have them install a preconfigured program would be easier.
But thanks for the source. It is still useful.
Click to expand...
Click to collapse
lol..i thought the first thing a Linux newbie would learn is command prompt.
you need to read about terminal before you decide using a Linux box.
munchy_cool said:
lol.. I thought the first thing a Linux newbie would learn is the command prompt.
you need to read about terminal before you decide using a Linux box.
Click to expand...
Click to collapse
:laugh: I agree. But there are a lot of folks who feel intimidated whenever learning something new. If I had started this thread with a full introduction to manually configuring and executing everything, most folks would have easily been discouraged. Especially the younger or older generations who fall somewhere between the line of "I don't got time for that" or "why so difficult". lol :laugh: Inoculating folks into using Linux I feel works best. Keep it simple and suggest that there are more in-depth ways of doing things to peak curiosity. -- Which is why I'm glad you pointed that out and why I'm loving writing this reply at the moment. :angel: