[Nexus 7 (2013) General] Hnk1:
HOW TO ROOT YOUR DEVICE WITHOUT FLASHING RECOVERY

This can be done with two methods.

ADB or FASTBOOT.

I have tested both methods and they worked for me.

I tested this on JSS15J. I am not sure about any other versions but I guess it should work.

SOME BASIC INFORMATION

Usually when you want to root your device, you must have UNLOCKED BOOTLOADER.

A CUSTOM RECOVERY is usually used to flash SuperSU to gain root access.

CUSTOM RECOVERIES ARE USUALLY FLASHED (they permanently replace your stock recovery)

In this guide, You BOOT into custom recovery by going into BOOTLOADER and then using fastboot/adb tools to flash SuperSU .

Booting is temporary and thus once you restart from recovery, the custom recovery will be gone

Make sure, you have USB debugging mode enabled. To go into bootloader you can either use adb commands ( Type [adb reboot bootloader] in cmd in platform tools directory with your device connected) or do it manually by turning it off and then holding power and volume down.

You must also have platform tools of SDK (Fastboot and ADB) for this to work. MAKE SURE YOU OPEN CMD into the folder where platform tools are present.

Try it on OWN risk. I will not be responsible for bricked devices or any damage.

ADB METHOD

Connect to your PC and make sure USB debugging is on.

COMMANDS IN BRACKETS. DON'T WRITE THEM. COMMAND WOULD BE LIKE : fastboot boot recovery.img

MAKE SURE YOUR DEVICE HAS UNLOCKED BOOTLOADER

(fastboot boot [recovery.img])--------------------- Name of recovery to be here

Mount /system and push the necessary files once the recovery has started:

(adb push su /system/xbin)

(adb push Superuser.apk /system/app)

Set correct permissions:

(adb shell)------------------------------ You have got into your device's shell

(chmod 06755 /system/xbin/su)

(chmod 0644 /system/app/SuperSU.apk)

(exit)

Reboot:

(adb reboot)

FASTBOOT METHOD

This is relatively easier as you will boot into custom recovery temporarily and then flash ZIP of SuperSU. Afterwards I recommend to clear davik cache and restart.

UNLOCKED BOOTLOADER REQUIRED

Boot into bootloader.

Type these commands to boot into custom recovery. This will not flash recovery and you will have stock recovery once you restart.

fastboot boot recovery recovery.img where recovery.img will be the file name of recovery

(After 4.4, use this command "fastboot boot recovery.img" instead of above mentioned)

After booting into reccovery, flash SuperSU and you are done.

I recommend clearing dalvik cache before leaving and restart.

And you are done.

YOU CAN ALSO USE A PREROOTED KERNEL WHICH YOU CAN FLASH VIA FASTBOOT. I AM NOT SURE IF THERE IS ANY

For information on how to retain root after OTA, please refer to this :

Update Super SU is also taken from this guide.

http://xdaforums.com/showthread.php?t=2415497

For Recovery/SuperSU/TWRP

http://xdaforums.com/showthread.php?t=2382051

CWM

http://xdaforums.com/showthread.php?t=2381544

PLATFORM TOOLS:

http://www.androidfilehost.com/?fid=9390355257214632011

If you are stuck in a bootloop, make sure you have cleared dalvik cache in custom recovery.

I got bootloop when i tried with fastboot method as I was new to twrp, I explored it a bit and tried to remove system and tried overwriting data to see how it is different from CWM and check its strength. I got an error clearing cache so I rebooted into custom recovery to clear dalvik and my nexus booted fine (DON'T TRY THIS, JUST CLEAR CACHE AND WIPE DATA and restart)

REMEMBER, UNLOCKING BOOTLOADER WILL DELETE ALL YOUR DATA AND DOING WIPES WILL ALSO DELETE ALL YOUR DATA.

DALVIK WON'T DELETE YOUR DATA BUT

MAKE SURE YOU HAVE MADE A BACKUP using BACKUP PRO (non rooted) or Helium (non rooted) and Titanium Backup Pro (Daah, you are not rooted so this won't work)

GOOD LUCK