Odd Linux fix I stumbled on. - OnePlus 7 Guides, News, & Discussion

For a while I had to keep running ADB commands from my Windows desktop because I couldn't get the USB authorization prompt to pop up on my Linux laptop running Ubuntu 18.04.
I noticed OnePlus included .exe files for Windows and I saw a .sh Linux/OSX file which I know is a script file.
Couldn't do anything with sudo which I though was odd. Opened the directory where the script is with my device connected, entered root user with "su"
Ran the script as su rather than just sudo
AND IT WORKED now I'm authorized with my Linux laptop and can resume under regular user. That was a weird problem.
That was a frustrating problem that had such a simple solution. Must not have had sudo access to adb.
Just sharing what worked for me! Linux > Windows for terminal use and adb stuff

Related

ADB freezes in Ubuntu 9.10 x64

I recently set up Ubuntu Karmic on my laptop's second hard drive, and I finished setting up Eclipse and the Android SDK yesterday. I set up ADB to work directly from the terminal without changing to the SDK Tools directory, and it works... kind of. I can get some ADB commands working, but most others won't. The only things that really work are "adb help" and "adb devices" at the moment. "adb install", "adb push" / "adb pull", and other similar commands seem to register, but then nothing happens after that- the terminal freezes, and inputting keys shows other characters. ]]^A and stuff like that. Can anyone help?
Ubuntu 9.10x64 adb works with sudo
$ sudo adb push...
I usually make sure the first adb command I use is sudo'd so it starts the daemon as root.
adb help - does not send any data to your droid. It's internal
adb device - shows which devices are on the USB bus.
The other adb command need to talk to the devices and depending on how your udev protections, device protections, and your personal group memberships are... it may not work.
sudo works for me always.
Ehud

Trying to root on a Mac

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.

Newbie help with rooting Asus Transformer Prime via ViperMOD

I have never rooted an android device before and this is my first time. The reason I'm rooting is so I can enable the Virtuous Prime ROM (the guide for Virtuous Prime suggested to use ViperMOD to root first)
[ROOT] [TOOL][Updated 2.22.12]viperMOD PrimeTime v4.5 | Auto Root/Unroot/Busybox/CMW - xda-developers
^I'm following the instructions from the link above word for word. So far I've met the following Criteria:
-Enabled USB Debugging
-Running build 9.4.2.15
-Have "ASUS Android Composite ADB Interface" drivers installed and updated
I downloaded the ViperMOD 4.5 zip and extracted it to my PC. I opened the folder and right clicked on "viperMOD Primer Tool v4.5 - copy.bat". A cmd popped up with several different options; I pressed 1 to root, and pressed enter to skip the following two prompts (that ask if USB debugging is enabled and asus usb drivers are installed).
The CMD then showed the following message:
*daemon not running. starting it now on port 5037*
*daemon started successfully*
However the CMD just stopped there. It didn't show the following flood of text that should show up when rooting w/ ViperMod (like shown in this video: http://www.youtube.com/watch?v=C3OQkxmUyLc at 2:35)
I'm not sure if I'm missing something here. The guide however did say that I needed to "Kill Asus Sync and Splashtop" though I'm not exactly sure what it means by "kill". I don't have Splashtop running on my Prime nor Splashtop remote running on my PC. I also don't have ASUS Sync software installed on my PC and I disabled Auto-Sync on my Prime (HOWEVER, the ASUS Sync icon is still visible in my Prime's notification bar when I connect it via USB to my PC).
Any advice?
I had a similar problem
I tried to use superoneclick to root my Samsung Gravity and it hung on waiting for phone. I used the adb commands to load the zergRush exploit. So you need to find which exploit works on your phone, adb push the exploit, busybox, and su to your phone and use adb shell to do the root.
** DISCLAIMER: I'm pulling this command sequence out of my memory... you should find a better guide but this stuff may give you clues as to what to google for, or if you're familiar with shell you may see the gist of what you're trying to do **
The commands will look something like this:
adb push exploitfilename
adb push busybox.apk
adb push su
adb shell
chmod 755 exploitfilename
./exploitfilename
(wait for the exploit to finish)
pm install busybox.apk
pm install su.apk
reboot
Once it rebooted, I installed terminal through the market so I could do cool stuf like so:
su
mount -o remount,rw /dev/whateverdevhasyoursystemfolder /system
rm /system/app/Vendorgarbagebloatapp.apk
and so forth. Knowledge of linux and shell commands is your friend here for sure. Basically, you should know what you're doing or don't do it. I'm no fan of one-clicks for anything like this, it's too hard to figure out what went wrong if it goes wrong, plus this way you can learn new skills.
Can't seem to run Vipermod
I am trying to run vipermod on my computer but when I try to run it, it flashes on the screen for less than a second and then re-closes.
For a little extra info I have a tf101 running the 9.2.1.17 build
My computer is running the window 8 developers copy( no i'm not a dev just love testing new things before most other people.)
I've tried running it as an admin and in compatibility mode but have had no success as of yet any help would be greatly appreciated.
sasori563 said:
I am trying to run vipermod on my computer but when I try to run it, it flashes on the screen for less than a second and then re-closes.
For a little extra info I have a tf101 running the 9.2.1.17 build
My computer is running the window 8 developers copy( no i'm not a dev just love testing new things before most other people.)
I've tried running it as an admin and in compatibility mode but have had no success as of yet any help would be greatly appreciated.
Click to expand...
Click to collapse
U should tried on another comp with windows seven imo
I would if i had one but my laptop got stolen so my only computer besides my desktop is my transformer, Are their any .bat files out their that i can use to run it from? I found out that its a problem with windows 8 not allowing .exe files to open command prompts, but if its a .bat file it will run.

Fastboot/ADB & Phone drivers Without Admin rights

Any way to setup a computer with ADB and Fastboot without admin rights? Can I setup up a flash drive with Fedora or Ubuntu, boot into that and get access? If so how do you set up drivers and adb on a linux distro.
Any help would be appreciated, Thanks!
I'm using Linuxmint 12 and I have ADB setup. Just click on the other platforms option and it gives you a pretty accurate description of how to set it up on linux.
I'm actually having a problem with using "fastboot oem get_identifier_token" on the bootloader unlock process because I get an error in the terminal saying the fastboot command isn't recognized in the terminal.
On Linux, I'm pretty sure all you need is the adb or fastboot executable. However, you must run it as root (either sudo or su into root). You can grab the exectuables by download the Android SDK.
If it's saying it can't find the fastboot executable, you're probably not in the same folder as fastboot. Type 'ls' and see if you see fastboot in the list. If it's not there, it won't work.
Hi,
is it just me or is there no answer to the question of the first post? Is there any way to install adb on a win Pc without admin rights?
regards

Debian/Ubuntu/Mint Linux and Moto X4

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:

Categories

Resources