Android Terminal Emulator - libtermexec and Exec PTY bridge
============================================================

Source repository: https://github.com/jackpal/Android-Terminal-Emulator
Upstream commit:   35188f8a8b57989a4a4ec9485e11187b46be26d9
Upstream modules:  libtermexec (process.cpp, TermExec.java) and
                   term (termExec.cpp, Exec.java)
License:           Apache License, Version 2.0
                   (see emulatorview/LICENSE)

Original copyrights:
- Copyright (C) 2007-2008 The Android Open Source Project
- Copyright (C) 2012 Steven Luo

Local modifications for SuManager (SlopRoot project):
1. Consolidated libtermexec/src/main/jni/process.cpp and
   term/src/main/jni/termExec.cpp into a single pure-C JNI library
   (sumanager/jni/termexec.c -> libjackpal-termexec2.so) with no C++ runtime
   dependency and no liblog dependency.
2. Replaced unlockpt()/ptsname_r() with direct TIOCSPTLCK/TIOCGPTN ioctls to
   avoid legacy Bionic ptsname_r quirks, reset signal masks and dispositions
   in the forked child, closed non-standard file descriptors without heap
   allocation after fork(), used _exit(127) on exec failure, and handled EINTR
   and WIFSIGNALED in waitFor().
3. Consolidated TermExec.java and Exec.java into TermExec.java with API-8
   compatible descriptor reflection (API 8-11) / ParcelFileDescriptor.getFd()
   (API 12+) and an APK self-extraction fallback for /system/app installation
   on Android 2.2-4.4 (API 8-19) where PackageManager does not extract
   lib/<abi>/*.so automatically.
