April 30, 2022

Android development and hacking tools

As I read about rooting phones, I see mention of adb and fastboot.

I don't know what fastboot is. I remember adb (android debugger) from my android development days, and recall it offers a remote shell over USB as well as other things.

I used to run ADT, which was a version of Eclipse customized for Android development. When I now try to run it, it fails to start with an error.

OpenJDK 64-Bit Server VM warning:
Illegal reflective access by org.eclipse.osgi.internal.baseadaptor.BaseStorage
to method java.net.URLClassLoader.addURL
Java has always been a buggy pain in the ass. Eclipse was always unbelievably slow, especially to start up, which is the nature of any non-trivial bit of Java code.

My adt invokes: /u1/adt-bundle/eclipse/eclipse, circa 2012 and 2016 on my system.

Fastboot

This seems to be part of the Android SDK these days. Apparently fastboot is a protocol that lets you talk to your phone (when running some kind of fastboot agent, probably a boot loader). You of course need some fastboot tool to run on your desktop, and you get that as part of the current SDK. You get fastboot as a standard thing with Pixel phones from Google, but all bets are off with phones from other manufacturers (like Samsung).

SDK

Since my SDK won't run, my best bet may be to get the latest copy of the SDK from Google. The download is 905M, which is OK with me. The download is fast. I'll be needing it anyway to update my android apps to run on the Pixel 6. A search on "download Android SDK" led me to the following The lingo "Android Studio" is new. And apparently around 2015 (when I was still happily using ADT/Eclipse), Google replaced the Eclipse based IDE with Android Studio. So, 7 years later, I am getting with the program. I had hoped that they would have ditched Java, but apparently not.

The download is a tar.gz files which unpacks to /u1/android-studio. Inside there is a file "Install-Linux-tar.txt" which explains what to do.

As instructed, as user tom, I do this:

cd /u1/android-studio/bin
./studio.sh
This brings up an "install wizard" and after a bunch of questions begins downloading all kinds of stuff. It all goes fast. Google must have fast well connected servers.

It does install stuff in /home/tom/Android/Sdk and perhaps /home/tom/.config/Google and /home/tom/.local/share/Google. The install readme explains how to change these locations.

The "Install" readme recommends adding /u1/android_studio/bin to my path. What I do as an experiment is to put the script "studio" in my /home/tom/bin directory and have it invoke studio.sh

Java has a famous slogan "WORA" (write once, run anywhere). The sad and ugly truth is more like "write once, run nowhere". Too bad that Google bought into it heavily with Android.

Rooting the phone

I would still like to try this and see if I can find and extract the original sqlite3 database with contacts.
Have any comments? Questions? Drop me a line!

Tom's Cell Phones / tom@mmto.org