Rename chroot to "kalifs" & revert to bootkali_login
Signed-off-by: Re4son <3520622-re4son@users.noreply.gitlab.com>
This commit is contained in:
parent
b55baf2db1
commit
a4fb49dda6
@ -24,7 +24,7 @@ ext {
|
|||||||
minSdkVersion=14
|
minSdkVersion=14
|
||||||
targetSdkVersion=28
|
targetSdkVersion=28
|
||||||
//version=YYYYMMVVRR (Either "VV" for stable version OR "RR" for pre-release candidate (e.g. 0001 for rc1)
|
//version=YYYYMMVVRR (Either "VV" for stable version OR "RR" for pre-release candidate (e.g. 0001 for rc1)
|
||||||
versionCode=2019030100
|
versionCode=2020010100
|
||||||
versionName="2019.3"
|
versionName="2020.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -896,15 +896,15 @@ public class Term extends Activity implements UpdateCallback, SharedPreferences.
|
|||||||
if(CheckRoot.isDeviceRooted()){
|
if(CheckRoot.isDeviceRooted()){
|
||||||
Log.d("isDeviceRooted","Device is rooted!");
|
Log.d("isDeviceRooted","Device is rooted!");
|
||||||
|
|
||||||
String chroot_dir = "/data/local/nhsystem/kali-armhf"; // Not sure if I can wildcard this
|
String chroot_dir = "/data/local/nhsystem/kalifs/bin"; // symlink to architeture specific rootfs
|
||||||
|
String chroot_olddir = "/data/local/nhsystem/kali-armhf/bin"; // Legacy rootfs directory used prior to 2020.1
|
||||||
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
if (!dir_exists(chroot_dir)){
|
if (dir_exists(chroot_dir) || dir_exists(chroot_olddir)){
|
||||||
NotFound(chroot_dir);
|
|
||||||
} else {
|
|
||||||
TermSession session = null;
|
TermSession session = null;
|
||||||
try {
|
try {
|
||||||
session = createTermSession(getBaseContext(), settings, "", ShellType.KALI_SHELL);
|
session = createTermSession(getBaseContext(), settings, "", ShellType.KALI_LOGIN_SHELL);
|
||||||
session.setFinishCallback(mTermService);
|
session.setFinishCallback(mTermService);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -916,6 +916,8 @@ public class Term extends Activity implements UpdateCallback, SharedPreferences.
|
|||||||
if (from.equals("populateViewFlipper")) {
|
if (from.equals("populateViewFlipper")) {
|
||||||
end_populateViewFlipper();
|
end_populateViewFlipper();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
NotFound(chroot_dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -995,7 +997,7 @@ public class Term extends Activity implements UpdateCallback, SharedPreferences.
|
|||||||
|
|
||||||
if (Objects.equals(text, "/data/data/com.offsec.nethunter/files/scripts/bootkali")){
|
if (Objects.equals(text, "/data/data/com.offsec.nethunter/files/scripts/bootkali")){
|
||||||
msg = "Please run Nethunter Application to generate!";
|
msg = "Please run Nethunter Application to generate!";
|
||||||
} else if (Objects.equals(text, "/data/local/nhsystem/kali-armhf")){
|
} else if (Objects.equals(text, "/data/local/nhsystem/kali-armhf/bin")){
|
||||||
msg = "Missing chroot. You need to install from Chroot Manager";
|
msg = "Missing chroot. You need to install from Chroot Manager";
|
||||||
}
|
}
|
||||||
/// Do something for not found text (alertDialog)
|
/// Do something for not found text (alertDialog)
|
||||||
|
Loading…
Reference in New Issue
Block a user