I’m delving into Android development, here are some tips if you’re just getting started building an app or learning about how your Mac would interface with an Android device if you wanted to.
1. Download Android Studio from Google here and install it. They used to hack Eclipse, but now you don’t have to do that, Android Studio is just a hack of Eclipse, but it’s pre-hacked for you.
2. You sort of have to figure out a bit about Java, because that’s really how Android apps are made. There are some variations just for Android, and lots of example code you can cut/paste like here and a bunch of others.
3. Java tends to have a ton of tiny files that are all linked together to do stuff, so that the one file that actually lets you press a button in your new app will be fairly tiny, but it will link to metric ton of other files that seem unrelated. But really, a lot of the other files are going to be similar for whatever app you make, so you can sort of ignore them for now.
4. You will get nauseated figuring out how all the libraries, classes and random stuff link together, so just go get some example code and start modifying it to do what you want…you can learn later as you go…it’s super-frustrating to be programming and reading stuff for days before you get your first app to do anything.
5. You have to get your Mac to be able to hook up to your Android device via a USB connection (you could also do WiFi, but let’s stick with USB for now).
6. On your Android, you have to enable USB debugging for the Android Studio to see it and use it. Every device has different ways to enable that, for example my Samsung Tablet 4 makes you do: Settings > General > scroll to bottom and touch About Device > tap Build number 4 times, then it will tell you you’re going into Developer mode. Then you click on the new Developer Options tab > USB Debugging (enable that). Then it will ask you if you want to connect to your Mac (and will present you with a MAC address for your Mac), accept and also check the box to remember this device so you don’t have to do that each time you connect. All this is super un-intuitive, but you can find specific steps on how to do yours, but you want to Google how to enable USB debugging basically. If it worked, when you run Android Studio, your Android will show up in the lower left box that says devices. If not, it will say you have no devices connected, so then you gotta fix that.
Rooting a Nexus 7
You have to get the thing to reboot into bootloader mode, and then connect your Windows laptop via USB cable and run a .bat file on your laptop. Here’s how you do all that:
- Turn your Nexus all the way off
- Power it back on by pushing both the power AND volume down buttons at the same time for like 10 seconds or so, just hold them down
- Now you should get a screen that looks like
- Download and unzip the .zip file from here
- Now you have to open a command prompt (run cmd.exe on Windows) and run the appropriate script, so on Windows it would be root-windows.bat, on Mac we do:
- When you do this, you should get a screen on your Android like:
- You use the volume up to select ‘yes’ and then you have to hit the power button to move to the next step. Once you do, you should wait a few seconds and see something like this:
- Now you can boot your unit up, which will take like 5 minutes or so, since it’s really doing kind of a hard reboot. It will ask you to enter your gmail account again as well (or skip that part).
- Now you can go to the Google Play store and start installing stuff. I started with:
- SuperSU (free). It allows you to give things root access.
- MultiROM manager (free). This allows you to experiment with different ROMs, like Cyanogenmod or whatever
- QuickBoot (free). This allows you easily boot into various situations other than a normal boot, like recovery.
- BusyBox (free).