Root Access (Linux) - Glass General

Hi All,
I haven't seen this posted here yet, so here are some instructions on how to gain root access on Glass using Linux.
(Do not use in OS X Terminal, you may soft brick).
Standard disclaimer, I'm not responsible for you doing this, etc.
These instructions are for Ubuntu but will work in other distros with very minor modification.
DOWNLOAD:
boot.img - developers.google .com/glass/downloads/system
(you'll probably want the XE11 version)
INSTRUCTIONS:
Open a terminal (ctrl+alt+t)
Get the necessary tools:
sudo apt-get install android-tools-adb
sudo apt-get install android-tools-fastboot
./adb devices
(should show your Glass serial number)
adb shell ls /data
adb root
adb reboot-bootloader
fastboot devices
(should show Glass serial number with "fastboot")
fastboot oem unlock
(ask you to re-enter command)
fastboot oem unlock
fastboot flash boot boot.img
fastboot reboot
adb root

Related

How to root the Hero using a MAC

I didn't find any mentions of this in the other threads or a thread dedicated to this, but just wanted to point out that it is very easy to do this on a Mac.
You will need to follow the same instructions in the other guides, but you can do it all from the Mac OS Terminal easily and no need to install drivers, just like you would with Linux.
In case someone wants step by step instructions, here they are modified for Mac OS:
Original instructions by chuckhriczko http://forum.xda-developers.com/showthread.php?t=581577
Step 1:
First you need to download the Android SDK. You can get it from http://developer.android.com/sdk/index.html. Download the Mac OS version and remember where the android-sdk-mac folder is (most likely in your Downloads folder)
The next thing we download is asroot2. This is a script that was developed that runs an exploit in Android's linux that allows us to run root. The link for that is here: http://forum.xda-developers.com/attachment.php?attachmentid=244212&d=1257621154. Unzip that file and place it in a directory of your choice (I used android-sdk-mac/tools). Also download http://www.androidspin.com/downloads.php?dir=amon_ra/RECOVERY/&file=recovery-RA-heroc-v1.2.3.img and place that into the same directory you extracted asroot2.
Step 2:
Connect the phone to the USB port.
Open a terminal and cd into the directory that you extracted the sdk into. Then cd into the tools directory. Then run the following commands:
sudo ./adb push /directory_you_placed_asroot2/asroot2 /data/local/
sudo ./adb shell chmod 0755 /data/local/asroot2
sudo ./adb shell /data/local/asroot2 /system/bin/sh
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4755 su
type exit until you are back to your Mac's prompt.
Now your phone is officially rooted! We arent done yet though. Now you need to flash the recovery image. If you are still in adb shell type in exit until you are out. You should be in the directory where you extracted the recovery image. If not go there. Type in the following:
sudo /.adb push recovery-RA-heroc-v1.2.3.img /sdcard/
Once that is done, type in sudo ./adb shell. If your command prompt is a dollar sign then type in su and press enter. If it is a pound sign you are good. Then type in the following:
flash_image recovery /sdcard/recovery-RA-heroc-v1.2.3.img
Once that is finished you are done. To reboot into recovery type in
sudo ./adb shell reboot recovery
If you are already in the shell, just type
reboot recovery
You should reboot into recovery mode and you can go from here. You can do a nandroid backup and then follow the other guides to install a different ROM or any other things you want to do.
If there are no instructions for Mac, just follow the Linux/Ubuntu instructions as they will be very similar if not the same.
Actually...
http://forum.xda-developers.com/showthread.php?t=581686
This is the thread I used to root my Hero CDMA from my Macbook, worked just fine...Thanks anyways for giving some love to macusers, guides are usually windows only.
I thought it was weird that there wasn't a Mac dedicated thread. I guess the search doesn't like 3 letter words.

How to flash a new recovery image thru windows

Device must be fully loaded with USB debugging enabled.
Code:
cd\
code:
cd androidsdk\tools\
code:
adb devices (if you do not see your sn # then something's wrong)
Code :
adb shell
code :
su
Code:
cd /sdcard/
Code:
flash_image recovery recovery-RA-heroc-v1.6.2.img(OR WHAT EVER YOU NAMED THE RECOVERY IMG FILE)
FLASHING TO THE RECOVERY TAKES SEVERAL SECONDS-- BE PATIENT. ENTER THE NEXT COMMAND ONLY AFTER THE COMMAND PROMPT RETURNS TO THE # (ROOT SYMBOL).
Code:
reboot recovery
Let me know anything.
just wanted too comment on your sn
smasung???
finnese said:
Device must be fully loaded with USB debugging enabled.
Code:
cd\
code:
cd androidsdk\tools\
code:
adb devices (if you do not see your sn # then something's wrong)
Code :
adb shell
code :
su
Code:
cd /sdcard/
Code:
flash_image recovery recovery-RA-heroc-v1.6.2.img(OR WHAT EVER YOU NAMED THE RECOVERY IMG FILE)
FLASHING TO THE RECOVERY TAKES SEVERAL SECONDS-- BE PATIENT. ENTER THE NEXT COMMAND ONLY AFTER THE COMMAND PROMPT RETURNS TO THE # (ROOT SYMBOL).
Code:
reboot recovery
Let me know anything.
Click to expand...
Click to collapse
Run or Search: cmd.exe thru windows
than you type your commands.

Adb installation instructions for Ubuntu

The Absent-Minded Professor and I just installed adb on Ubuntu; here is how to set up adb on Ubuntu Linux, Gutsy through Maverick.
Our port of the BX theme to CM6 stable is forthcoming.
first command after installing and updating sdk and extracting the tgz file to your home directory is== sudo gedit /etc/udev/rules.d/70-android.rules
NOTE: In the above file replace ## with the number 50 if you are running Gusty/Hardy/Dapper (50-android.rules) or with the number 70 if you are running Karmic Koala/Lucid Lynx(70-android.rules
after the window pops write this in the file==SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″ then save and close
the follwing commands is== sudo chmod a+rx /etc/udev/rules.d/70-android.rules
Then reboot.
Open a terminal and type== sudo gedit .bashrc
The file contents should be as follows== export PATH=${PATH}:~/home/user/android-sdk-linux_86/tools
Save and close.
Run the command== adb devices
If you see a serial number like this:
List of devices attached
HT99PHF02521 device
then you are done.
If you get error messages such as "no such command," cd to /home/user/android-sdk-linux_x86/tools and use the adb commands in this way:
./adb devices
./adb shell
etc.
If you get an error message here referencing insufficient device permissions, do the following:
./adb kill-server
sudo ./adb start-server
Now ./adb devices should work.
Courtesy of laie1472 and The Absent Minded Professor
Thanks to Esau Silva (http://esausilva.com/2010/05/13/setting-up-adbusb-drivers-for-android-devices-in-linux-ubuntu/) and Tobias Eisentrager (http://www.mail-archive.com/[email protected]/msg14211.html).

[SOLVED]Unable to get fastboot working on Ubuntu 16.04 LTS

Hey can anyone look into this?
I'm unable to get fastboot working on my laptop (ubuntu 16.04 LTS -everything updated). adb works fine.
I downloaded the platform tools from here: https://dl.google.com/android/repository/platform-tools-latest-linux.zip
After extracting it I even added to the path by adding the following to ~/.profile
Code:
# add Android SDK platform tools to path
if [ -d "$HOME/platform-tools" ] ; then
PATH="$HOME/platform-tools:$PATH"
fi
and then running source ~/.profile
So what I did further after putting my phone in bootloader/fastboot mode is
1. fastboot devices
This returns the following error:
Code:
no permissions (verify udev rules); see [http://developer.android.com/tools/device.html] fastboot
I tried adding the USB IDs in the /etc/udev/rules.d/51-android.rules and running chmod a+r /etc/udev/rules.d/51-android.rules as mentioned on the URL but still nothing. Also it has Motorola, Lenovo, Google and Qualcomm IDs but none worked.
2. fastboot erase cache
This returns
<waiting for any device>View attachment 4071566
I tried rebooting both my system and the phone but nothing works.
I have a Moto G Plus (XT1643)
WHAT SHOULD I DO?
All you need is the following command
sudo apt install android-tools-adb android-tools-fastboot
Then add the sudo word before your fastboot command.
USB debugging has to be on and in some cases, you have to change your USB mode from charging only to file transfer.
Sent from my Moto G4 Plus using Tapatalk
Silesh.Nair said:
All you need is the following command
sudo apt install android-tools-adb android-tools-fastboot
Then add the sudo word before your fastboot command.
USB debugging has to be on and in some cases, you have to change your USB mode from charging only to file transfer.
Sent from my Moto G4 Plus using Tapatalk
Click to expand...
Click to collapse
Woah... I was totally unaware of this. #beginner Thanks alot. works well.
 @Silesh.Nair I also found another solution:
Code:
$ wget -S -O - http://source.android.com/source/51-android.rules | sed "s/<username>/$USER/" | sudo tee >/dev/null /etc/udev/rules.d/51-android.rules; sudo udevadm control --reload-rules
Thread owner has found what he wants and fixed.
THREAD CLOSED on owner's request

How to pull/get the vendor folder and its files to your desktop via adb? (sharing)

My phone is android 4.4 (HTC M7 802t), and this works on most of the android devices
Prepare a USB cable and a usb dongle and connect ur phone.
Your device should be rooted and installed some kinds of root browser i.e: SU Root Browser . Browse where the vendor folder is located (/vendor/)
On your desktop, adb should be installed.
If you're a mac user, "Android File Transfer" should be running, as macos cannot read android file system directly.
Open a terminal and cd to the folder where adb is located (in my case, /Users/cupcoker/Desktop/rom_compiling_necessary_files/platform-tools, this was shown:
[email protected] platform-tools % )
input adb commands:
Windows:
adb devices
Linux:
sudo adb devices
Mac:
./adb devices
it should show somehow:
List of devices attached
VG38KC924147 device
Windows:
adb pull /vendor C:\Users\{your_username}\Desktop\vendor
Linux:
sudo adb pull /vendor ~/Desktop/vendor
Mac:
./adb pull /vendor ~/Desktop/vendor
Finally, the terminal should output this, and viola! It's done successfully:
/vendor/: 67 files pulled, 0 skipped. 5.6 MB/s (95715627 bytes in 16.212s)

Categories

Resources