I'm only a day or two ahead of you in knowledge here, so take what I say with a grain of salt. smile

But this is interesting: here is the "unlock+root" shell script from the n7tools I linked to earlier. The first thing it does is "push" the SuperSU app (which gives the per-app pop-up prompts later on) to the device, without unlocking the bootloader.

It then unlocks the bootloader, and finally installs a custom ROM. I am not year clear on whether that last step is necessary -- maybe the SuperSU app never gets installed unless the custom ROM is loaded to "see it" and install it?
Code:
#!/bin/sh
echo "---------------------------------------------"
echo "  Nexus 7 Simple Root Bash Script            "
echo "  Made by @Complex360 (cyr0s on xda)         "
echo "---------------------------------------------"
echo "Checking adb presence..."
./files/adb version
echo "Go Settings > Developer Options and enable USB Debugging."
echo "Once you've done this, press [ENTER]"
read go
echo "Pushing SuperSU onto device..."
./files/adb push ./files/SuperSU.zip /sdcard/
echo "Pushed SuperSU onto device!"
echo "Rebooting Nexus 7..."
./files/adb reboot bootloader
echo "Once you see a  android and \"Start\" on your device"
echo "You will see a prompt offering to unlock the bootloader, select Yes."
./files/fastboot oem unlock
echo "Once you get confirmation that the bootloader is unlocked, press [ENTER]..."
read go2
echo "Flashing ClockWorkMod..."
./files/fastboot flash recovery ./files/recovery.img
echo "ClockWorkMod flashed with fastboot!"
echo "Everything is done! to install SuperSU, load into CWM and choose it from the \"install zip from sdcard\" menu"
xdg-open https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3ZA7P55X62ZDQ


The final line of the script attempts to open a PayPal "beg screen" for the developer.


Edited by mlord (06/08/2012 11:54)