[REF] "Android for the Nexus 4" 101 & FAQs

Search This thread

efrant

Retired Senior Moderator & Developers Relations
Feb 12, 2009
11,469
10,985
Montreal
Samsung Galaxy S20
Just the same one from your tutorial: fastboot boot customrecovery.img
That is not a "flash" command. That command just temporarily boots your custom recovery from your PC. It does not write anything to your device.

If you want to flash a custom recovery, the command is: fastboot flash recovery customrecovery.img
 
  • Like
Reactions: chrone and ianleet

pitjago74

Senior Member
Aug 26, 2011
328
104
Well i have a problem... Muy nexus 16gb ist "Nominal"and no matters wich kernel i use....i dont get more than 4 hours screen.......... Thats isla beacuse I'm "Nominal"chip???
 
Last edited by a moderator:

chrone

Senior Member
May 5, 2012
1,050
369
Surabaya
For those who experiencing lost imei and baseband, fastboot flashing the factory image reset might save your day. :)

I lost my imei and baseband this mid night after uninstalling busybox 1.20.3-stericson from busybox free app, trickster mod free, and flash faux reset kernel, coming from faux beta 006b6 kernel.

Didn't have time to make a proper bugs report since the phone needed to fixed at the morning, primary phone here. Wiping cache from stock or cwm recovery, fix permissions, fastboot flashing bootloader-radio-boot-recovery images and wipe cache from stock recovery didn't help, event factory soft and hard reset didn't work out either. But not until i fastbooted flashing all the factory images reset restored my imei and baseband. Yay! :)

Learned the hard way. Hehe

Sent from my Nexus 4
 

GS150R

Senior Member
Feb 13, 2013
79
3
Nagpur
please help me do i need to rooting and bootloader to transfer data between n4 and pc.how to enable auto accept feature for Bluetooth paired device is it possible to do so.
 
Last edited:

chrone

Senior Member
May 5, 2012
1,050
369
Surabaya
please help me do i need to rooting and bootloader to transfer data between n4 and pc.how to enable auto accept feature for Bluetooth paired device is it possible to do so.

no, you don't need root to transfer data to pc and vice versa. plug it in and windows will automatically detect your n4 if you're on windows xp sp3 or above with windows media player 11 or above installed.

as for the auto accept, i would like to know to. :)
 
  • Like
Reactions: GS150R

GS150R

Senior Member
Feb 13, 2013
79
3
Nagpur
no, you don't need root to transfer data to pc and vice versa. plug it in and windows will automatically detect your n4 if you're on windows xp sp3 or above with windows media player 11 or above installed.

as for the auto accept, i would like to know to. :)

Thanks :laugh: at least I find that but I have tried to connect it through USB but not done so l have install drivers but still not working now I am formating my PC which previously running xp sp3 and now w7 so i am try on that.:fingers-crossed:
On my N4 home screen there are unexpected shortcut are appears and I am on WiFi and network
data connection is off though charges me for using internet what should I do to stop this.:confused:
 

adbshell

Member
Feb 18, 2013
14
0
Hey guys a small doubt... if I flash my Nexus4, will I lose my sd card contents? Had this issue for Galaxy Nexus, just wanted to confirm...:confused:
 

chrone

Senior Member
May 5, 2012
1,050
369
Surabaya
Thanks :laugh: at least I find that but I have tried to connect it through USB but not done so l have install drivers but still not working now I am formating my PC which previously running xp sp3 and now w7 so i am try on that.:fingers-crossed:
On my N4 home screen there are unexpected shortcut are appears and I am on WiFi and network
data connection is off though charges me for using internet what should I do to stop this.:confused:

You'll be just fine using the guide on how to install Universal Naked Driver as in first post. :)

What kind of unexpected shortcuts?

Have you purchased and registered a data plan? You should consult this with your provider, the data charges have nothing to do with android. Hehe




Hey guys a small doubt... if I flash my Nexus4, will I lose my sd card contents? Had this issue for Galaxy Nexus, just wanted to confirm...:confused:

Yes you will. Unlocking and relocking the bootloader, and flashing userdata.img will wipe all of your data on sdcard, make a backup first.

Efrant has warned this issue several time in his amazing guide on how return to stock, please read the whole first page first just to get the big picture ahead. :)

Sent from my Nexus 4
 

GS150R

Senior Member
Feb 13, 2013
79
3
Nagpur
You'll be just fine using the guide on how to install Universal Naked Driver as in first post. :)

What kind of unexpected shortcuts?

Have you purchased and registered a data plan? You should consult this with your provider, the data charges have nothing to do with android. Hehe





Yes you will. Unlocking and relocking the bootloader, and flashing userdata.img will wipe all of your data on sdcard, make a backup first.

Efrant has warned this issue several time in his amazing guide on how return to stock, please read the whole first page first just to get the big picture ahead. :)

Sent from my Nexus 4

Yes i am done with connection buy just installing wmp11 on win-xp sp-3 as you mentioned in post thanks again.
Shortcuts like star app and offer but they are only on my home screen not in app list or menu.
Yes i am subscribe to data plane,i am on wifi and data connection is off and notification appears on screen data usages.
 
Last edited:
  • Like
Reactions: chrone

UK-Sense

Senior Member
Oct 30, 2011
176
17
Washington
OK, read this thread,

is there a way to get root with a Mac ???? I don't have access to a windows machine, even if I did I wouldn't know how to go on. I currently have the HTC Sensation which is rooted via revolutionary & clockwork. But my N4 is coming tomorrow and I don't think I can do without root.
 

efrant

Retired Senior Moderator & Developers Relations
Feb 12, 2009
11,469
10,985
Montreal
Samsung Galaxy S20
OK, read this thread,

is there a way to get root with a Mac ???? I don't have access to a windows machine, even if I did I wouldn't know how to go on. I currently have the HTC Sensation which is rooted via revolutionary & clockwork. But my N4 is coming tomorrow and I don't think I can do without root.
http://goo.gl/6IHps

You can skip the flashing of the images. Unlock the bootloader and proceed to part E.
 
  • Like
Reactions: chrone

apratomo

Senior Member
Mar 22, 2007
299
9
Jakarta
Great FAQ for android beginners.

Anyway, since this device doesn't have removable battery, what should we do in case of bad flash and bootloop?

Do N4 also have SoD (sleep of death) cases? How do we turn off the device?

I do have xoom which also have non removable battery, but I can simply long press the power button to reboot the device, will that work on N4.

Lots of questions there, I'm getting my N4 this week :D

Sent from my Galaxy Nexus using xda premium
 

chrone

Senior Member
May 5, 2012
1,050
369
Surabaya
Great FAQ for android beginners.

Anyway, since this device doesn't have removable battery, what should we do in case of bad flash and bootloop?

Do N4 also have SoD (sleep of death) cases? How do we turn off the device?

I do have xoom which also have non removable battery, but I can simply long press the power button to reboot the device, will that work on N4.

Lots of questions there, I'm getting my N4 this week :D

Sent from my Galaxy Nexus using xda premium

Pressing the power button for 10-15 seconds will power cycle the battery for bootloop case. Press a wee bit more will also power cycle the date timer back to 1970. Long pressing power and volume down will power cycle the battery and reboot into bootloader mode.


As for sleep of dead or red led of dead, perhaps this method will help you:
https://support.google.com/nexus/7/answer/2668668?hl=en

Sent from my Nexus 4
 
  • Like
Reactions: apratomo

doctolan

Member
Oct 4, 2009
13
0
Hi, guys.
A week ago, a device was freeze on the "Google" screen after a night charging. It was Stock 4.2.2, Root and open bootloader from donated Nexus 4 Toolkit and was work nice one month.
The fastboot was work, but is only "Power Off" and "Restart bootloader" was work correctly. "Start" and "Recovery mode" does not work - freeze on the "Google".
l was flash stock 4.2.2 many times through Nexus 4 Toolkit and Nexus Root Toolkit and manually through fastboot.exe - all writed, but the result is the same - "Google" and I can't entry to recovery or Android.
Device from the USA, I can't send back
What to do, help.
Thank you
 

Top Liked Posts

  • There are no posts matching your filters.
  • 149
    The popularity of Nexus devices has increased significantly since the launch of the Nexus One in January 2010. Along with this popularity, forums such as xda-developers have also had an influx of new users, most of which are not developers, and are not well versed in the intricacies of Android.

    After much thought (and some discussion on this thread), I’ve decided to create this thread as a compilation of FAQs, 101s, and “How-To’s” in the hopes that those coming to Android who want to learn will have another resource to help them learn. With that in mind, this thread is NOT meant to explain the quickest way to do things (you will NOT see toolkits or shortcuts discussed in this thread), nor is it meant to be a “fix-my-device” thread. It is created with for a purpose of learning, in order to expand users’ knowledge of Nexus devices and Android in general. See this post by kyphur for the general philosophy of this site, which I share.

    I do not take myself to be an Android guru or developer. However, I do have a bit of knowledge to share. If you think things are missing or not accurate, I will be more than happy to add or revise anything. I will try to cover most of the basic topics related to Android, including drivers, ADB, fastboot, partitions, recoveries, bootloaders, root and reverting to stock. Again, I will not discuss toolkits, nor will I cover custom ROMs. Those have their own threads.

    This will be an ongoing work-in-progress, as it takes considerable time to try and capture everything properly, and my time is limited. The order of the information will also change, as I haven't quite figured out the best way to present everything. (Currently there are some FAQs, including fastboot and ADB commands, followed by a list of reference and how-to threads.)

    So, without further delay:

    Frequently Asked Questions

    What is Android?
    Android is an open-source operating system for mobile devices. It is basically a java virtual machine running on a Linux-based kernel.

    What is the Android SDK and do I need it?
    SDK stands for "software development kit. Do you need it? If you are developing, then yes (but then you probably would be reading this thread now would you... :) ). If you are not developing, then no, you do NOT need to install it. It is just a waste of space. The only files you need (to interface with your PC) that comes from the SDK are the fastboot and adb files, and they can be found here for Windows, Linux, and MacOS.

    Why do I need a driver for my Windows PC to recognize my device?
    As with all hardware, Windows requires device drivers for it to be able to interface with the OS. Drivers are not required if you are using Linux or MacOS.

    Where do I get the driver for my PC?
    For the Nexus 4, the driver available in the SDK works. (You can get just the driver without the SDK from here.) However, I recommend using this package by 1wayjonny. It works perfectly and, unlike most other packages, 1wayjonny’s repack does not install any crapware along with it. That said, it doesn’t include an .exe file, so it needs to be installed manually from the .inf file. If you do not now how to do that, see here for instructions. Note: If you are using Windows 8, you will need to do this before you can install the driver.

    Why do I need to install the driver twice?
    Nexus devices use two main interfaces (there are actually a few more, but I will cover them later) to communicate with a PC. These are ADB (Android debug bridge) and fastboot, both of which will be covered later. The fastboot interface requires the N4 to be booted in fastboot (i.e., bootloader) mode. Thus, in order to install the fastboot driver, you need to boot your N4 into the bootloader. The ADB interface requires an Android kernel to be booted, i.e., your device needs to be booted normally, or in a custom recovery (covered later). Additionally, if your device is booted normally, you need to have USB Debugging set to enabled in settings (i.e., Settings->Developer options->USB debugging).

    How do I boot my device into the bootloader (i.e., fastboot mode)?
    Turn off your device, hold volume down, and press and hold the power button.

    What is a command prompt?
    A command prompt in Windows (or terminal in Linux/MacOS) is a command line window in which you can enter commands. To open a command prompt in Windows, you can hold the shift key and right click in the directory in which you want your command prompt open. Or, in a Windows Explorer window you can go to File-><name-of-window>->Open command window here.

    What is a bootloader?
    Without getting into too many technicalities, the bootloader is essentially the program that gets loaded first when starting your device, and it is responsible for booting the Android kernel. Think of the bootloader as the BIOS of a computer.

    What does it mean if my bootloader is locked/unlocked?
    Most (if not all) devices are shipped from the manufacturer with locked bootloaders. This is for security reasons. A locked bootloader does not allow easy flashing of images, which means that it is difficult to change or modify the operating system. Unlocking a bootloader (using fastboot) on most Nexus devices results in a complete loss of all personal data from the device. Having a locked or unlocked bootloader has no bearing on the functioning of the device. Unlocking it gives you more options to play around with the OS. Additionally, an unlocked bootloader means that you can easily root your device no matter what -- unlike most non-Nexus devices, if you lose root, it is trivial to get it back.

    What is “root”?
    Root essentially means that you have root (or superuser) access to the file system on Android. It is similar to being “administrator” on a Windows PC. It has nothing to do with your device or the bootloader, it has to do with the Android OS (i.e., you cannot “root” your device – you root the Andoid build that you are running). To have root, you need to be booted into the Android OS that you have rooted. If you are in fastboot mode, root is irrelevant.

    How do I get “root”?
    If you are booted into a custom recovery (recoveries will be covered later), root is enabled by default. If you want root while booted into Android, you will need to place two files on your system partition: an “su” binary which grants root access, and a superuser app that manages that access. The two that are available are ChainsDD’s Superuser and Chainfire’s SuperSU. Usually these files are packaged up in a zip file that is flashable using a custom recovery, but they can be flashed manually using ADB. Both of these methods will be described below.

    If I unlock my bootloader, is that the same as root?
    No, as was mentioned above, unlocking the bootloader allows you to (among a few other things) flash images easily to the device when not booted into the Android OS. Root allows you access to manipulate the files WITHIN the Android OS.

    If I unlock my bootloader, does that mean that I have to root?
    No.

    If I unlock my bootloader, do I have to flash a custom ROM?
    No.

    Do I need to root to flash a ROM?
    No.

    What is a ROM?
    A ROM is slang for an mobile OS build.

    What are the different versions of Android, and is there a difference between say 4.2 and JOP40C?
    Have a look at this link for an explanation of what (for example) JOP40C means, and what version of Android that is.

    What is the difference between a stock ROM and a custom ROM?
    A stock ROM is a ROM that is built by Google and is signed by Google’s platform keys. Everything else is a custom ROM.

    What is this AOSP I keep hearing about?
    AOSP stands for Android Open Source Project, and is a repository for the source code for Android. You can build your own ROM from AOSP. Details can be found on http://source.android.com/.

    What is fastboot?
    Fastboot can refer to three things: the actual interface between your PC and phone; the fastboot.exe file; or the “mode” of your device. For you to be able to use fastboot commands: your device has to be booted in fastboot mode, the fastboot driver for your PC needs to be installed, and the fastboot.exe file needs to be on your PC.

    What are the fastboot commands?
    The list of fastboot commands can be seen by typing “fastboot” (without the quotes) in a command prompt opened in the directory where you fastboot.exe file is located. See below.

    Code:
    fastboot
    usage: fastboot [ <option> ] <command>
     
    commands:
      update <filename>                        reflash device from update.zip
      flashall                                 flash boot + recovery + system
      flash <partition> [ <filename> ]         write a file to a flash partition
      erase <partition>                        erase a flash partition
      format <partition>                       format a flash partition
      getvar <variable>                        display a bootloader variable
      boot <kernel> [ <ramdisk> ]              download and boot kernel
      flash:raw boot <kernel> [ <ramdisk> ]    create bootimage and flash it
      devices                                  list all connected devices
      continue                                 continue with autoboot
      reboot                                   reboot device normally
      reboot-bootloader                        reboot device into bootloader
      help                                     show this help message
     
    options:
      -w                                       erase userdata and cache
      -s <serial number>                       specify device serial number
      -p <product>                             specify product name
      -c <cmdline>                             override kernel commandline
      -i <vendor id>                           specify a custom USB vendor id
      -b <base_addr>                           specify a custom kernel base address
      -n <page size>                           specify the nand page size. default: 2048
    Along with these commands, there is an additional one: oem. For now, I will only cover the following commands: devices, flash, boot, erase, reboot, reboot-bootloader and oem.

    These commands will work in fastboot mode, whether your bootloader is lock or unlocked:

    oem: with a shipping bootloader (like what most of us have on our devices) there are two “oem” commands: “oem unlock” and “oem lock”. These commands are used to unlock and lock your bootloader, e.g., “fastboot oem unlock” will unlock your bootloader.
    devices: this command checks to see if your device is properly connected to your PC in fastboot mode, e.g., “fastboot devices”
    reboot: this command will reboot your device, e.g., “fastboot reboot”
    reboot-bootloader: this command will reboot your device into fastboot mode, e.g., “fastboot reboot-bootloader”

    These commands will only work in fastboot mode IFF your bootloader is unlocked:

    flash: this command is used to flash images to partitions (partitions will be covered later) on your device. It cannot be used to “flash” individual files or .zips. For example, to flash the system partition, the command would be “fastboot flash system system.img”
    boot: this command boots a kernel without flashing it to your device. For example, to boot an insecure kernel called “test.img”, the command would be “fastboot boot test.img”
    erase: this command erases a specified partition. For example, to erase the cache partition, the command would be “fastboot erase cache”

    The above mentioned commands are the basics for flashing your device. You should get familiar with them.

    What is ADB?
    ADB can refer to two things: the actual interface between your PC and phone, or the adb files (the .exe and two .dll files for Windows). For you to be able to use adb commands: the adb driver needs to be installed on your PC, the adb files need to be on your PC, and your device has to be booted either in recovery mode or booted normally into Android. Additionally, USB debugging needs to be enabled if booted into Android.

    What are the ADB commands?
    The list of ADB commands can be seen by typing “adb” (without the quotes) in a command prompt opened in the directory where your adb.exe file is located. See below.

    Code:
    Android Debug Bridge version 1.0.29
     
     -d                            - directs command to the only connected USB device
                                     returns an error if more than one USB device is present.
     -e                            - directs command to the only running emulator.
                                     returns an error if more than one emulator is running.
     -s <serial number>            - directs command to the USB device or emulator with
                                     the given serial number. Overrides ANDROID_SERIAL
                                     environment variable.
     -p <product name or path>     - simple product name like 'sooner', or
                                     a relative/absolute path to a product
                                     out directory like 'out/target/product/sooner'.
                                     If -p is not specified, the ANDROID_PRODUCT_OUT
                                     environment variable is used, which must
                                     be an absolute path.
     devices                       - list all connected devices
     connect <host>[:<port>]       - connect to a device via TCP/IP
                                     Port 5555 is used by default if no port number is specified.
     disconnect [<host>[:<port>]]  - disconnect from a TCP/IP device.
                                     Port 5555 is used by default if no port number is specified.
                                     Using this command with no additional arguments
                                     will disconnect from all connected TCP/IP devices.
     
    device commands:
      adb push <local> <remote>    - copy file/dir to device
      adb pull <remote> [<local>]  - copy file/dir from device
      adb sync [ <directory> ]     - copy host->device only if changed
                                     (-l means list but don't copy)
                                     (see 'adb help all')
      adb shell                    - run remote shell interactively
      adb shell <command>          - run remote shell command
      adb emu <command>            - run emulator console command
      adb logcat [ <filter-spec> ] - View device log
      adb forward <local> <remote> - forward socket connections
                                     forward specs are one of:
                                       tcp:<port>
                                       localabstract:<unix domain socket name>
                                       localreserved:<unix domain socket name>
                                       localfilesystem:<unix domain socket name>
                                       dev:<character device name>
                                       jdwp:<process pid> (remote only)
      adb jdwp                     - list PIDs of processes hosting a JDWP transport
      adb install [-l] [-r] [-s] <file> - push this package file to the device and install it
                                     ('-l' means forward-lock the app)
                                     ('-r' means reinstall the app, keeping its data)
                                     ('-s' means install on SD card instead of internal storage)
      adb uninstall [-k] <package> - remove this app package from the device
                                     ('-k' means keep the data and cache directories)
      adb bugreport                - return all information from the device
                                     that should be included in a bug report.
     
      adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
                                   - write an archive of the device's data to <file>.
                                     If no -f option is supplied then the data is written
                                     to "backup.ab" in the current directory.
                                     (-apk|-noapk enable/disable backup of the .apks themselves
                                        in the archive; the default is noapk.)
                                     (-shared|-noshared enable/disable backup of the device's
                                        shared storage / SD card contents; the default is noshared.)
                                     (-all means to back up all installed applications)
                                     (-system|-nosystem toggles whether -all automatically includes
                                        system applications; the default is to include system apps)
                                     (<packages...> is the list of applications to be backed up.  If
                                        the -all or -shared flags are passed, then the package
                                        list is optional.  Applications explicitly given on the
                                        command line will be included even if -nosystem would
                                        ordinarily cause them to be omitted.)
     
      adb restore <file>           - restore device contents from the <file> backup archive
     
      adb help                     - show this help message
      adb version                  - show version num
     
    scripting:
      adb wait-for-device          - block until device is online
      adb start-server             - ensure that there is a server running
      adb kill-server              - kill the server if it is running
      adb get-state                - prints: offline | bootloader | device
      adb get-serialno             - prints: <serial-number>
      adb status-window            - continuously print device status for a specified device
      adb remount                  - remounts the /system partition on the device read-write
      adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
      adb reboot-bootloader        - reboots the device into the bootloader
      adb root                     - restarts the adbd daemon with root permissions
      adb usb                      - restarts the adbd daemon listening on USB
      adb tcpip <port>             - restarts the adbd daemon listening on TCP on the specified port
    networking:
      adb ppp <tty> [parameters]   - Run PPP over USB.
     Note: you should not automatically start a PPP connection.
     <tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
     [parameters] - Eg. defaultroute debug dump local notty usepeerdns
     
    adb sync notes: adb sync [ <directory> ]
      <localdir> can be interpreted in several ways:
     
      - If <directory> is not specified, both /system and /data partitions will be updated.
     
      - If it is "system" or "data", only the corresponding partition
        is updated.
    copkay has written up a great guide on the use of the “backup” and “restore” commands in this thread, so I will not cover those commands here.


    For now, I will only cover the following commands: devices, reboot, reboot bootloader, push, pull and shell.

    devices: this command checks to see if your device is properly connected to your PC in ADB mode, e.g., “adb devices”
    reboot: this command will reboot your device, e.g., “adb reboot”
    reboot-bootloader: this command will reboot your device into fastboot mode, e.g., “adb reboot bootloader”
    push: this command copies a file (or directory) to your device from your PC. For example, say you wanted to copy to your /sdcard folder on your device a file called junk.jpg, which is stored on your PC in c:\. The command would be “adb push c:\junk.jpg /sdcard/” (assuming the folder is mounted – to be covered later). Petrovski80 has added more details on copying files to your device in his thread here.
    pull: this command copies a file (or directory) to your PC from your device. For example, say you wanted to copy to your c:\ directory on your PC a file called junk.jpg, which is stored in the /sdcard folder on your device. The command would be “adb pull /sdcard/junk.jpg c:\” (assuming the folder is mounted – to be covered later).
    shell: this command opens a “shell” to your device so you can issue commands directly to the Android OS. The command is “adb shell”. Your prompt will change to “$” which means that you are now issuing commands to Android, not to your PC. (At some point, I will try to put together a list of commonly used commands, but for anyone that has used Linux, they are essentially the same.)


    What are the partitions on a the N4?
    A Nexus 4 has the following partitions:

    modem -> /dev/block/mmcblk0p1
    sbl1 -> /dev/block/mmcblk0p2
    sbl2 -> /dev/block/mmcblk0p3
    sbl3 -> /dev/block/mmcblk0p4
    tz -> /dev/block/mmcblk0p5
    boot -> /dev/block/mmcblk0p6
    recovery -> /dev/block/mmcblk0p7
    m9kefs1 -> /dev/block/mmcblk0p8
    m9kefs2 -> /dev/block/mmcblk0p9
    m9kefs3 -> /dev/block/mmcblk0p10
    rpm -> /dev/block/mmcblk0p11
    aboot -> /dev/block/mmcblk0p12
    sbl2b -> /dev/block/mmcblk0p13
    sbl3b -> /dev/block/mmcblk0p14
    abootb -> /dev/block/mmcblk0p15
    rpmb -> /dev/block/mmcblk0p16
    tzb -> /dev/block/mmcblk0p17
    metadata -> /dev/block/mmcblk0p18
    misc -> /dev/block/mmcblk0p19
    persist -> /dev/block/mmcblk0p20
    system -> /dev/block/mmcblk0p21
    cache -> /dev/block/mmcblk0p22
    userdata -> /dev/block/mmcblk0p23
    DDR -> /dev/block/mmcblk0p24
    grow -> /dev/block/mmcblk0p25

    Source here.

    What does mounting mean?
    In order for a device to have access to files, the partition on which those files reside needs to be “mounted”. If you are in recovery, you can easily do this by going to the mounts menu and mounting the appropriate partition. If you are booted in Android, you will need to mount the partition yourself. The /sdcard folder is already mounted by default, however.

    How do I mount the system partition?
    In recovery: go to the mount menu and mount /system
    In Android, on your device: you need root, and a file explorer with root access
    In Android, connected via ADB (root required): you need to type the following command in a command prompt:

    adb shell
    su
    mount -o remount,rw -t ext4 /dev/block/mmcblk0p21 /system

    To explain this a bit:

    -o remount,rw <== this remounts a partition that is already mounted (as read-only), as read-write

    -t ext4 <== this specifies to mount it as ext4

    /dev/block/mmcblk0p21 <== this is the system partition

    /system <== this is what you are mounting it as

    What is recovery?
    Recovery is like a mini OS, which allows you to perform various functions, usually related to flashing files to your device, or updating files, or backing things up, etc. The stock image has a recovery included, but its functionality is very limited. There are a number of custom recoveries available, but the two most popular for the Nexus 4 are CWM and TWRP. There are various versions of each. More details to come in this section.

    I see an Android lying on its back when I boot into recovery. Why?
    What you see is the main screen of the Nexus stock recovery. To access the menu, you need to push and hold power and press volume up.

    I just flashed CWM, but every time I try to boot into CWM, I keep seeing the stock recovery. Why?
    If you updated your Android build using an OTA update file (either manually or over-the-air), the update placed two files on your device that re-flash the stock recovery every time you reboot your device. These two files are:

    /system/etc/install-recovery.sh <== this is the script that installs the patch file
    /system/recovery-from-boot.p <== this is the patch

    You have to rename (or delete) one or both of them, then re-flash your custom recovery. Now it will stick.

    What is an insecure boot image?
    An insecure boot image is one that has root enabled for the shell user (i.e, ADB) by default on boot. This means that if you have booted or flashed an insecure image, when you connect your device to a computer, and open a shell via ADB, you will be userid 0 (or root) without having to "request" root access via the su binary. This makes somethings easier -- for example, you can now use the "remount" command in ADB to mount /system without having to type the full mount command in a shell. (More to add later.)

    How do I root?
    As was mentioned earlier, you need to place the su binary and the superuser app into the right spots on your device. In order to do this, you need to already have root access. There are two ways: flash a root package in recovery (instructions here), or manually place the files in the appropriate spots (I will add instructions on how to do this at a later time).
    65
    Useful Nexus 4 Guides and Reference Threads

    Nexus 4 technical specifications: http://xdaforums.com/showthread.php?t=1964850

    Nexus 4 drivers: http://xdaforums.com/showthread.php?t=1996051

    How to back up your device using ADB – no root needed: http://xdaforums.com/showthread.php?t=1420351

    How to copy files to/from your device using ADB: http://xdaforums.com/showthread.php?t=1869380

    How to return your device to Google’s stock images: http://xdaforums.com/showthread.php?t=2010312

    How to root: http://xdaforums.com/showthread.php?t=2010312

    How to unlock your bootloader WITHOUT wiping (once you have root): http://xdaforums.com/showthread.php?t=2063388

    List of all OTA update files and links http://xdaforums.com/showthread.php?t=1971169

    Instructions on how to flash OTA updates: http://xdaforums.com/showthread.php?t=2145848

    List of all radios: http://xdaforums.com/showthread.php?t=2087227

    List of RILs: Coming soon.

    List of bootloaders: Coming soon.

    CWM recovery: http://www.clockworkmod.com/rommanager/

    TWRP recovery: http://xdaforums.com/showthread.php?t=2002326

    Edify scripting: How to create recovery-flashable zips: http://xdaforums.com/showthread.php?p=29735133

    Information on bootloader security: http://xdaforums.com/showthread.php?t=1898664

    How to recovery deleted files: http://xdaforums.com/showthread.php?p=34185439

    How to nandroid directly to your computer: http://xdaforums.com/showthread.php?t=1818321
    4
    To try and keep it simple:

    Android is a VM which runs on a Linux kernel. In order to run applications (i.e., .apk's), the VM uses a cache. The cache is built using .odex files (i.e., optimized Dalvik Executable files), which are uncompressed and separate from the .apk. When you de-odex your apk's, you are essentially taking that .odex file and placing it inside the .apk.

    The advantage of this is that you can theme .apk's if they are deodexed (since everything is contained within one file), and you can theme your ROM if your framework is deodexed. The disadvantage is your device will boot slower the first time, and each application launch will be slower the first time, as the Dalvik cache needs to be built from the .dex files within the .apk's. As you run each application, the Dalvik cache gets built, so eventually, there should be no difference in speed.
    3
    If anyone moves on from the basics and wants to learn to BUILD for android.. Check out this shameless self promotion: ★Ω [GUIDE] The Comprehensive AOKP Building Guide Ω★ :)