[HOW TO] Root Fire on Linux - Kindle Fire General

If this is a duplicate feel free to delete Admin. I see the one click via windows but I can't seem to find the Linux method. This works after the 6.2 update so I assume it would work with any firmware.
http://androidadvices.com/root-amazon-kindle-fire-mac-os-linux/3/
First up download and unzip the Kindle Fire Rooting Package for Linux in your Linux based computer and then you need to proceed to open the terminal window.
Go to the folder where you have unzipped the contents of downloaded file and then open the terminal window in your computer to enter the below mentioned commands.
cd Downloads/KindleFireRootLinux
sudo mkdir ~/.android
sudo cp adb_usb.ini ~/.android/.
./adb-linux kill-server
So, once you have finished entering the commands which are mentioned above, you now need to execute two more command which are,
./adb-linux devices
sh runmelinux.sh
Device will reboot. I then use Voodoo OTA RootKeeper for Amazon content that is broken when device has root.

Does this work for Mac also?

Related

[adb] [Ubuntu] [script] Quick ADB restart as root script

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.

[Q] Help with ADB

I rooted my fire using SuperOneclick afew weeks ago, now while trying to install TWRP I get the following error on Command Prompt :
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
E:\Documents and Settings\Mookie>adb push u-boot.bin /sdcard/
'adb' is not recognized as an internal or external command,
operable program or batch file.
E:\Documents and Settings\Mookie>
E:\ My HDD -- C:\Kindle
Am new to all this but I can follow instructions.
I have Super User showing on Kindle and Windows is showing Kindle under Hardware Devices (driver).
You need to add the location of adb into your environment path.
Follow step #3 here - http://www.addictivetips.com/mobile/what-is-adb-and-how-to-install-it-android/
Make sure ;c:\android-sdk-windows\tools;c:\android-sdk-windows\platform-tools is where your sdk is installed. Mine is under c:\program files\android\android-sdk-windows\tools and c:\program files\android\android-sdk-windows\platform-tools
Sent from my Kindle Fire using xda premium
Mine is under E:\Program Files\Android\android-sdk\platform-tools.
This may sound stupid, but what do I type in the command prompt, just to make sure I don't screw-up. I am trying to learn.
instructions say to type:
adb push u-boot.bin /sdcard/
thanks.
If you are following the directions that use "dd" commands...stop. Do not use them. Instead follow the directions here to install TWRP. http://forum.xda-developers.com/showthread.php?t=1398603
OK. let's see if I follow you correctly.
Plug Fire to Pc> open command prompt>type cd E:\Program Files\Android\android-sdk\platform-tools (enter)
adb shell (enter) and then follow new instructions
Also, when I placed the recovery file in in the directory adb is in I did not see a fastboot file, where do I get the fastboot file from, sorry for the stupidity.
You can DL fastboot from http://koushikdutta.blurryfox.com/G1/
You'll follow the commands on the link, but the fastboot command is done from a second cmd window, not while you're in adb.
Thanks, I'll download Fastboot, I think I'll do some more reading, since all this is new to me, before attempting this.
Good idea. It's not hard to brick your device while playing with it.
Sent from my Kindle Fire using xda premium

[GUIDE] Root Kindle with 6.2.1 using JCase method

These are my notes and guide for rooting the Kindle with 6.2.1 firmware. If I left something out, or something is not working, please leave a comment and I'll try to update.
Credit goes to JCase for the root. Please consider making a donation to him here:
https://market.android.com/details?id=net.andirc.jcasedonate
Original procedure is here:
http://www.androidpolice.com/2011/1...on-kindle-regardless-of-its-software-version/
ADB INSTALL AND TEST - Method 1 (skip to the ROOT INSTALL section if you already have a working ADB)
NOTE: ADB = Android Debug Bridge. It is a command line interface to the android device. A working ADB is required before you can root your Kindle. ADB is installed on a PC and accesses the Kindle via USB cable.
Install Java SE Development Kit 7 on PC
The Android SDK Manager requires Java SDK
http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html
Install Android SDK Manager on PC
The Android SDK has the drivers and ADB needed to perform the root procedure
http://developer.android.com/sdk/index.html
Uncheck Android 4.0
Check 2.33
Ensure Google USB Driver is checked
Install to c:\android to make typing easier later on
NOTE: The install can take a long time!
Manually update files so drivers will properly install
Open c:\users\your account name\.android\adb_usb.ini (or c:\documents and settings... if you have XP) and add the following
Code:
0x1949
Open c:\android\extras\google\usb_driver\android_winusb.inf and make additions as shown:
Code:
[Google.NTx86]
;Kindle Fire
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&MI_01
....
[Google.NTamd64]
;Kindle Fire
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&MI_01
Install drivers
Find the Kindle device in device manager and update drivers. Point to the location with android_winusb .inf
Verify ADB works
Open a command prompt
CD to c:\android\platform-tools
Code:
adb kill-server
adb devices
If it's working, ADB will return a large number, like this:
Code:
312342134231342 device
ADB INSTALL AND TEST - Method 2
NOTE: I have not tried this, but Vashypooh's app can apparently handle the driver install, and run ADB without installing the above software. If all of this works, then his app would be the best way IMO.
NOTE 2: I've seen a lot of comments suggesting the driver install in Vashypooh's app doesn't work at this point.
http://forum.xda-developers.com/showthread.php?t=1399889
ROOT INSTALL - Method 1
Install JCase's kindleroot_androidpolice.apk
JCase's app gives ADB root access. Once this is done, you still need to install the superuser app
Download kindleroot_androidpolice.apk to PC
http://www.multiupload.com/VNZ6Y41EQF
Ensure the Kindle is connected via USB, and copy file to Kindle sdcard
Using ES File Explorer on Kindle, navigate to the kindleroot_androidpolice.apk and launch
Follow prompts and click root
Install superuser app
Download superuser-2 to PC
http://www.multiupload.com/M2CX14W7Y0
Unzip to c:\download\sufiles
Use ADB to install SU app
Code:
adb root
adb remount
adb push c:\download\sufiles\su /system/xbin/su
adb shell chown 0.0 /system/xbin/su
adb shell chmod 06755 /system/xbin/su
adb install c:\download\sufiles\Superuser.apk
adb reboot
ROOT INSTALL - Method 2
NOTE: I have not tried this, but Vashypooh's app can apparently handle the root process.
BurritoRoot (Temporary)
Install Permanent Root with Superuser
http://forum.xda-developers.com/showthread.php?t=1399889
A+ instructions, wish I could write my own that good lol.
jcase said:
A+ instructions, wish I could write my own that good lol.
Click to expand...
Click to collapse
Thanks to you for the root. I hope the guide will help those trying to root!
Thanks for the clear and easy steps.
Great guide Ectoplasmic!
One thing I would add though, in step 5 "Verify ADB Works", before you use the "adb devices" command, you need to type "adb kill-server". If you don't type in "adb kill-server" first, the device won't show up when you use the "adb devices" command. Or at least it didn't for me.
Otherwise, everything worked FLAWLESSLY. I verified I was rooted using Root Checker. Thank you!
zopzop25 said:
Great guide Ectoplasmic!
One thing I would add though, in step 5 "Verify ADB Works", before you use the "adb devices" command, you need to type "adb kill-server". If you don't type in "adb kill-server" first, the device won't show up when you use the "adb devices" command. Or at least it didn't for me.
Otherwise, everything worked FLAWLESSLY. I verified I was rooted using Root Checker. Thank you!
Click to expand...
Click to collapse
Thanks, I added this to the guide.
Hi I use JCase method to root my 6.2.1 KF, then I need to unroot it so my kids can still enjoy the prime video, but I cannot. I try rootkeeper but failed. I also try the "kindleroot_androidpolice.apk" and click the unroot button, but it still cannot unroot. Pls help!
Get help in irc from jcase and vashypool theyll probably be able to help u
tkcctkcc said:
Hi I use JCase method to root my 6.2.1 KF, then I need to unroot it so my kids can still enjoy the prime video, but I cannot. I try rootkeeper but failed. I also try the "kindleroot_androidpolice.apk" and click the unroot button, but it still cannot unroot. Pls help!
Click to expand...
Click to collapse
Unroot in my app (BurritoRoot) does not remove su, it just turns off adb root (which is what my app turns on) sorry for the confusion.
Will add in the future when I release burritomod
Here's the equivalent instructions for Mac
I am pretty new myself, but I'm happy to share what I've come up with so far. I am on a Mac OS X 10.6.8
Download the Android SDK for Mac (dl.google.com/android/android-sdk_r16-macosx.zip), the easiest place to put it is at the top of your user directory, from the browser download window chose your username from places on the left side, then name the zip "Android"
Next from Finder, navigate to the place where you downloaded the SDK, and double-click on it which should unzip it and create a folder of the same name e.g "Android". Open that and inside it will be a folder "tools", and inside that there will be a file "android". Double-click that to run it and the "Android SDK Manager" program window will pop up, you will also see a Terminal window in the background, don't worry about that. Uncheck all the boxes, then check "Android SDK Platform-tools" which should be the third from the top, and click install. This gets you the actual "dab" program.
Once adb is setup, to get it to recognize your kindle fire on your mac, you may need to make an entry in a config file if you haven't already.
Start Terminal Applications > Utilities > Terminal or if you are used to using spotlight, simply type in "Terminal". (here's an intro to using Terminal guides.macrumors.com/Terminal) and navigate to the directory where you have adb, e.g. if you placed it at the top of your user directory that would be
Code:
cd Android
or if you left it in the default downloads directory it would be
Code:
cd Downloads/android-sdk-macosx/
then enter the following commands
Code:
mkdir ~/.android
You may get the following error
Code:
mkdir: /Users/<username>/.android: File exists
If so, that is fine, continue to the next step
Code:
touch ~/.android/adb_usb.ini
open -e ~/.android/adb_usb.ini
TextEdit will open with that file open, you should have an entry in it on a single line that says
Code:
0x1949
if not, copy that in, then save and close it, then
Code:
./adb kill-server
Connect your kindle to the mac if it isn't already, then
Code:
./adb devices
You should see a message like
Code:
List of devices attached
2ED6000600000001 device
On your kindle, make sure you have a file navigation app, the example above ES FileExplorer is excellent and is the one I use from Amazon app store
Download Burrito Root from Android Police ( androidpolice.com/2011/12/23/exclusive-how-to-easily-root-the-amazon-kindle-regardless-of-its-software-version/)
Also download the Superuser.zip from the same page (multiupload.com/ONH28CB1GU) and unzip, then make sure you move the contents "su" and "Superuser.apk" into the same directory as adb
Through Finder copy the "kindleroot_androidpolice.apk" file you downloaded earlier to your kindle, some place like "download" so you can find it easily later
Now on the Kindle, tap disconnect on your KIndle so you can get back to the apps screen, launch the file explorer you installed earlier, navigate to folder you copied it to, e.g. "download" then install the "kindleroot_androidpolice.apk", open it, and go through the steps to launch click "Root"
Back on the Mac, in the terminal window where you had adb going, enter the commands
Code:
./adb root
./adb remount
./adb push su /system/xbin/su
./adb shell chown 0.0 /system/xbin/su
./adb shell chmod 06755 /system/xbin/su
./adb install Superuser.apk
./adb reboot
You should be rooted now, then you can follow the other instructions out there for getting Android market, etc working
TIP
here's a tip if you don't want to have to type in the period and slash ahead of adb every time. from your terminal window enter the
Code:
cd ~
touch .profile
open -e .profile
That will open text editor, and paste in the following line,
Code:
PATH=${PATH}:/Users/<username>/<sdk-directory>/platform-tools
replacing both our user name and the path to where you have sdk e.g. in my case
Code:
PATH=${PATH}:/Users/kbiz/Android/platform-tools
Then close the terminal window and reopen a new one and you should be good to go, now you'll only need to type in "adb".
Let me know if I missed something, trying to give back since this forum has been super helpful.
---------- Post added at 01:04 AM ---------- Previous post was at 12:58 AM ----------
tkcctkcc said:
Hi I use JCase method to root my 6.2.1 KF, then I need to unroot it so my kids can still enjoy the prime video, but I cannot. I try rootkeeper but failed. I also try the "kindleroot_androidpolice.apk" and click the unroot button, but it still cannot unroot. Pls help!
Click to expand...
Click to collapse
OTA Rootkeeper should work but since its not, try this (courtesy rootkindlefire.com/kindle-fire-unroot/how-to-unroot-kindle-fire/)
Code:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
rm /system/app/Superuser.apk
rm /system/xbin/su
reboot
after your Kindle restarts you won't have root and Amazon Video should work just fine.
Hello,
I have successfully rooted my device with the above instructions. While installing the Android market I was abusing of my root privileges and I've successfully "burned" my device. That is, the Kindle won't start up anymore (it stays forever in the initial phase showing the kindleFire logo).
I don't know where else to turn for help so I'm writing about this here. If anyone has hints of how I could recover my kindle from the void, please let me know
Cheers
http://forum.xda-developers.com/showthread.php?t=1356257
Yesssssssssss
Yesssssssssssssssssss. So nice to have root again. My Titanium Backup and SUFBS works again
I had ADB and SDK working when I had my Glacier, but since I have gotten my SGS2, and my Kindle, Android SDK Manager will not open... It just opens a command prompt, and then closes.. I have reinstalled both the SDK Manager and the Java Kit... Any ideas?
EDIT:
I must have messed with something in my system settings somewhere to corrupt a bunch of stuff... I did a system restore to the 18th of December, reinstalled, and everything works perfect now... Oh well! Haha
Hey, I used a combo of the link JCase gave me when I had questions, this guide, and the links off the rootzwiki guide and managed to get it first try. It was actually easier than I thought it was going to be. I've never rooted anything before, I didn't even have ADB or the SDK until tonight. The process (while using both guides and video tut) went smoothly without a hitch. I just finished installing the Android Market but have to wait til morning to access it, as I have no WiFi at home, and its too late for me to be driving to a hotspot. Thank you very much. You(JCase) and your comrades who put this all together f**king rule.
a really clear and easy guide ! - congratulations - you shoud try to let it pin on top !
Ectoplasmic said:
NOTE 2: I've seen a lot of comments suggesting the driver install in Vashypooh's app doesn't work at this point.
Click to expand...
Click to collapse
the reason people have problems with vashipooh's driver installation seems to be the old drivers - they don't manage to clean up the old drivers:
disconnect KF
Open an (elevated for win7) command prompt:
set devmgr_show_nonpresent_devices=1
devmgmt.msc
device manager opens - click "view" - click "show hidden devices"
now you see all devices ever connected/installed
uninstall all devices regarding "kindle" and "android (composite) adb device"
connect KF - will startup by itself
select the most recent driver (that you have installed before by install_driver.bat from KFU) manually (check date/time)
now you should be set up with a good driver installation
btw. i'm on xp - it's working for xp and 7, 32 and 64 bit

[Q] Mac OSX - ADB - List of devices attached Blank

I am running on a Mac (OSX Lion) and have installed android-sdk-macosx.
I am trying to connect to a Kindle Fire 6.2.2
However, this is as far as I can get:
Code:
bash-3.2# ./adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
bash-3.2#
As you can see, no devices show up.
I have tried switching cables, USB ports, reboot the device and my machine... banging my head against the wall.
Nothing works.
I have read about 29 pages of posts through this forum, and Googled it.
No dice.
Any suggestions?
would not use the sdk at all - if you use the mac/linux version of kfu you save a lot of time and space - you don't need to use kfu if you don't like to - but all commands you'll ever need are in the tools folder of kfu - it also includes drivers and setup scripts - maybe give it a try:
http://forum.xda-developers.com/showpost.php?p=21369040&postcount=653
mkdir ~/.android
echo 0x1949 >> ~/.android/adb_usb.ini
ADB needs this entry to see the Kindle Fire no matter what OS you're on.
right - there is also a installation script for this included in the pack - install.sh if i remember right
took the advice above and it's still not working for me. i have the same exact problem. when i try to run install_drivers.sh i get:
cp: drivers/adb_usb.ini: No such file or directory
Done!
logout
[Process completed]
When I run KFU i get:
/Users/donaldclark/kfu/run.sh: line 84: seq: command not found
please help
as far as i know (don't own a mac) you have to call the commands with
./ from terminal window - eg ./run.sh
I also got the same error message at line 84 running the install script in OSX 10.6.8
-E
it's from eratosthene - give him a pm - i'm shure he can help you
http://forum.xda-developers.com/member.php?u=1616763
Try remove the usb driver from your device and re-install gain.
I use Kindle_Fire_Utility_MacLinux_0.9.2 3 with adb.mac
and its located right inside my root directory (not under users) step before.
I went to the files and I opened file called
install_drivers.sh
I did deleted everything behind -p and just dragged
the adb_usb.ini (its located in drivers) into that install_drivers.sh script and I hit save.
thats how it looks like
mkdir -p /Kindle_Fire_Utility_MacLinux_0.9.2 3/drivers/adb_usb.ini/adb_usb.ini
Than I just run adb.mac and all is operational
my kindle was rooted with burittoroot2
If you need those files send me a pm I have them in my dropbox.
somboonr said:
Try remove the usb driver from your device and re-install gain.
Click to expand...
Click to collapse
there is no uninstalling drivers like in windows.
line 84 SOLUTION
Incarnate609 said:
took the advice above and it's still not working for me. i have the same exact problem. when i try to run install_drivers.sh i get:
cp: drivers/adb_usb.ini: No such file or directory
Done!
logout
[Process completed]
When I run KFU i get:
/Users/donaldclark/kfu/run.sh: line 84: seq: command not found
please help
Click to expand...
Click to collapse
Regarding the "run.sh: line 84: seq: command not found", I found out that the "seq" command is not recognized with MAC OS... so I did a search and replace, replacing "seq" with "jot -". Now it works.
Reference: Search google for seq and mac
What worked for me.
I had the same problem after updated the sdk on my MacBook Mac OSX 10.6.8
cd to the tools directory (where android program is located)
run:
./android update usb
./android update adb
then edit the ~/.android/adb_usb.ini file and add 0x1949 as the last line (your previous adb_usb.ini file is overwritten by the above commands).

How to Root Nexus 4 in Linux the Linux way.

Note read other installation methods for windows and mac. This might help fill in the blanks.
I know us linux users don't understand all the wordy talk in android so I will be short and specific.
Because adb and fastboot are not native to ubuntu or any linux distro you must place these executable files in /bin or /usr/bin folder.
Open terminal type sudo Nautilus.
You must be superuser to copy and paste to /bin file system.
Next select View>Extra Panel
Third step go into Home>Downloads adt-bundle-linux-x86.zip
Unzip and extract file
Now Open extracted folder adt-bundle-linux-x86>sdk>platform-tools
The folder above is where you will find both adb and fastboot just drag and drop them into /bin
Must also get Supersu.zip
As well as ClockworkMod
Ready to Unlock Bootloader, flash image and gain Root access.
Type:
1. adb reboot bootloader = will show if any items are unlocked will be in red writing.
Unlock Bootloader
2. fastboot oem unlock - will unlock bootloader and flash information. Means you lose the data.
Root Device
1. adb reboot bootloader - at this point the bootloader should be in red because it is unlocked.
2. sudo fastboot flash recovery '/home/unityman/Downloads/recovery-clockwork-6.0.2.0-mako.img'
What should follow is
sending 'recovery (7804 KB)... OKAY
writing 'recovery'... OKAY
This point proceed to Clockworkmod by selecting it with the up and down volume
When in Clockworkmod select from sdcard again use up and down arrows and power button to confirm selection.
It should load the SuperSu.zip and show you have superuser permissions. Not when reboot SuperSu will ask if you want to grant su permissions select yes.
Note for ubuntu users. Because you loaded foreign terminal commands such as adb and fastboot. U will get error msg something wrong with file system. Nothing happens Ubuntu just complains about error in file system. I've ignored message and updated ubuntu twice.
Well got to run and load Ubuntu emulator
Cheers!
Happy Holidays
PS. What the biggest misunderstanding between linux and android is we don't grant Su or root permissions permanently. We grant superuser or temporary root permissions. Could you imagine if every person got onto your personal computer had root access system would be toast in 10 mins.
Thanks for the write up bro. I just wanted to point out that adb and fastboot are natively supported in Ubuntu 12.10.
Sent from my Nexus 4 using Tapatalk 2
culaterout said:
Note read other installation methods for windows and mac. This might help fill in the blanks.
I know us linux users don't understand all the wordy talk in android so I will be short and specific.
Because adb and fastboot are not native to ubuntu or any linux distro you must place these executable files in /bin or /usr/bin folder.
Open terminal type sudo Nautilus.
You must be superuser to copy and paste to /bin file system.
Next select View>Extra Panel
Third step go into Home>Downloads adt-bundle-linux-x86.zip
Unzip and extract file
Now Open extracted folder adt-bundle-linux-x86>sdk>platform-tools
The folder above is where you will find both adb and fastboot just drag and drop them into /bin
Must also get Supersu.zip
As well as ClockworkMod
Ready to Unlock Bootloader, flash image and gain Root access.
Type:
1. adb reboot bootloader = will show if any items are unlocked will be in red writing.
Unlock Bootloader
2. fastboot oem unlock - will unlock bootloader and flash information. Means you lose the data.
Root Device
1. adb reboot bootloader - at this point the bootloader should be in red because it is unlocked.
2. sudo fastboot flash recovery '/home/unityman/Downloads/recovery-clockwork-6.0.2.0-mako.img'
What should follow is
sending 'recovery (7804 KB)... OKAY
writing 'recovery'... OKAY
This point proceed to Clockworkmod by selecting it with the up and down volume
When in Clockworkmod select from sdcard again use up and down arrows and power button to confirm selection.
It should load the SuperSu.zip and show you have superuser permissions. Not when reboot SuperSu will ask if you want to grant su permissions select yes.
Note for ubuntu users. Because you loaded foreign terminal commands such as adb and fastboot. U will get error msg something wrong with file system. Nothing happens Ubuntu just complains about error in file system. I've ignored message and updated ubuntu twice.
Well got to run and load Ubuntu emulator
Cheers!
Happy Holidays
PS. What the biggest misunderstanding between linux and android is we don't grant Su or root permissions permanently. We grant superuser or temporary root permissions. Could you imagine if every person got onto your personal computer had root access system would be toast in 10 mins.
Click to expand...
Click to collapse
Thanks for the guide. I used this on my Ubuntu 12.10 box.
A few notes:
- I had to do add "sudo" for fastboot oem unlock so:
Code:
sudo fastboot oem unlock
- fastboot and adb are part of Ubuntu now as mentioned above, so I just installed using
Code:
sudo apt-get install android-tools-fastboot
sudo apt-get install android-tools-adb
Thanks again!
Thanks guys. I just successfully installed CWM and rooted my phone using the combination of your instructions.
I agree. Simple and clear instructions. Thanks for writing this up.
I downloaded the Android ADT package for Linux x64 (I run Debian Wheezy/Testing). Google distributes this as a zip, and it includes ADB etc, along with eclipse to start developing apps. I want to do that at some point so decided to download the whole thing. The problem though is that while the Eclipse binary included in the package is built for x64, adb and other tools are instead built for i386. So if you ./adb in the platform-tools directory, you will get a 'file or directory not found' error. To fix this -
Code:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install ia32-libs
You should now be able to execute adb, fastboot etc. I also recommend creating symlinks in the /usr/bin or similar for the tools you use frequently.
Please do never ever use sudo nautilus !!!
This might override the rights of some of your ~/ directory.
Use gksu/ gksudo instead.
Sent from my Nexus 4 using xda app-developers app
Nexus 4 Root via Linux Notes
I rooted my Nexus 4 with my Linux machine (Linux Mint) earlier today. I had a couple hiccups, notably:
If you download the 64-bit/x86_64 version of ADT (Android Developer Tools, i.e. adb/Eclipse/etc. for Android development), the executable tools such as adb and fastboot are actually 32-bit. If you have a relatively fresh Linux install, you need to install the 32-bit executable binaries (see note below). Otherwise you will get strange errors even though the files are marked executable.
I sometimes had issues with my computer connecting to the phone via USB, especially after rebooting the phone. I found simply swapping USB ports (switching between the mouse and the phone, for example) would cause the phone to be recognized again.
Otherwise the process was smooth.
Here are the notes I collected as I searched the forums and web for how to root the phone in case they are helpful to someone. They're not really in any particular order; it's just a collection of what I found.
I used the following instructions:
http://makegadgetswork.blogspot.com/2013/01/root-nexus-4-on-linux-mint-13-and.html
Code:
# It had been so long since I used my personal Linux box that I
# forgot the root password :).
# Reset root password and main user password
http://community.linuxmint.com/tutorial/view/339
# Boils down to:
1) Enter grub by holding down shift key during boot.
2) Change:
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=[letters and numbers]\[letters and numbers] ro quiet splash vt.handoff=7
to:
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=[letters and numbers]\[letters and numbers] rw init=/bin/bash
# In x86_64 disto of ADT (Android Developer Tools), ADB libs are 32-bit.
#
# Running the 32-bit libs without 32-bit support will cause strange errors
# such as 'adb: No such file or directory'
#
# Here is how to install 32-bit binary runtime support on your 64-bit OS:
apt-get install ia32-libs
# Also install Java:
apt-get install sun-java6-jdk
# How to mount Nexus 4 in Linux
http://forum.xda-developers.com/showthread.php?t=2004182
# How to backup phone prior to unlocking (unlocking will cause a factory reset)
http://forum.xda-developers.com/showpost.php?p=34744848&postcount=4
# Linux root guide (this is what I followed)
http://makegadgetswork.blogspot.com/2013/01/root-nexus-4-on-linux-mint-13-and.html
# Another good root guide (Windows oriented)
http://forum.xda-developers.com/showthread.php?t=2018179
# Linux root guide on XDA
http://forum.xda-developers.com/showthread.php?t=35217628
# Root guides (didn't really use these)
http://www.cultofandroid.com/23782/rooting-the-google-nexus-4-the-right-way-how-to/
http://forum.xda-developers.com/showthread.php?t=2010312&highlight=+waiting+for+device+
# How to fix Android devices not recognized by ADB
# (check that ~/.android is not owned by root)
http://www.tuxtrix.com/2013/03/how-to-fix-android-devices-not.html
# SuperSU download link:
http://download.chainfire.eu/282/SuperSU/
# CWM link:
http://www.clockworkmod.com/rommanager
# Setup device support for N4
sudo vi /etc/udev/rules.d/51-android.rules
# My /etc/udev/rules.d/51-android.rules
> cat /etc/udev/rules.d/51-android.rules
#LG - Nexus 4 - MTP (mount as media device)
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
# Bootloader Nexus 4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee0", MODE="0660", OWNER="ankit"
# Normal Nexus 4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee1", MODE="0660", OWNER="ankit"
# Debug & Recovery Nexus 4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee2", MODE="0660", OWNER="ankit"
# Aliases to mount device as MTP
alias n4_mt 'sudo mtpfs -o allow_other /media/nexus4'
alias n4_umt 'sudo umount /media/nexus4'
# File that contains USB/device settings for N4
/etc/udev/rules.d/51-android.rules
# Restart devices
sudo service udev restart
# Print USB devices
lsusb
# Print ADB help
adb
# Print connected devices
adb devices
# Print device serial number
adb get-serialno
# Print device state
adb get-state
# Restart ADB server
adb kill-server ; adb start-server
# Restore sdcard backup
adb push ~/n4_bak_7_28/sdcard /sdcard/
# Reboot device to bootloader mode (needed to run fastboot)
adb reboot bootloader
# Reboot device to recovery (needed for flashing partitions (i.e. custom recovery, ROM)
adb reboot recovery
# Restore backed up data
adb restore ~/n4_bak_7_28/backup.ab
# Run shell on device
adb shell
# Show devices connected to fastboot
sudo fastboot devices
# Unlock phone (must be running in bootloader mode)
sudo fastboot oem unlock
# Flash custom recovery
sudo fastboot flash recovery /home/femtodude/install_adb/adt-bundle-linux-x86_64-20130717/sdk/platform-tools/recovery-clockwork-touch-6.0.3.4-mako.img

Categories

Resources