- Android Terminal Emulator (ATE) app crashes on launch.
- People app couldn't find vcard during import even though it exists on the root directory of the sdcard.
The ATE is a very important tool (at least for me). I always use this during development and hacking. I prefer to work and debug things wirelessly. So this article is about tweaking android and stuffs that I wanted them to behave.
The Cause. Before I flashed cm-10.1, I remembered updating the ATE from Google Play. During testing cm-10.1, the app crashes. Finding the cause was easy. First, I checked the stack trace. Here's what the stack trace said.
Serioulsy? This wasn't clear to me at all. Second, I went to Google Play and found out that ATE is an open source project hosted at github. From there, I browsed the issues before doing stupid things (i.e. asking solutions from developers or posting it in the issue tracker) and found this interesting issue (same as mine).
issue #133 Force close on start (UnsatisfiedLinkError)
I think if you install the apk into /system/app, the library loader needs the native library in /system/lib. (If you install to /data via the normal route, the package manager unpacks any native libraries in the package to /data/data/package.name/lib, and the library loader will look there also.)Basically, either extract libjackpal-androidterm4.so from the apk and install it to /system/lib, or install the package normally and let the package manager deal with this for you. This isn't a bug in ATE.By reading this comment, everything is now clear.
So What Happened? By reading the first line of the stack trace,
java.lang.UnsatisfiedLinkError: Couldn't load jackpal-androidterm4 from loader dalvik.system.PathClassLoader[dexPath=/system/app/Term.apk,libraryPath=/data/data/jackpal-androidterm/lib]: findLibrary returned null
the system couldn't load a shared library in
in the library path,
this makes sense because after I update ATE, its path changed to /data/data/jackal.androidterm. Since cm-10, ATE is preconfigured in the rom so path should be
as mentioned in the comment, extract jackpal-androidterm4.so from the apk and push it into /system/lib. I haven't try this yet so I'll post it on the next series.