changeset 521:5d55f83b4e87

add more debug code
author Carl Byington <carl@five-ten-sg.com>
date Fri, 31 May 2024 18:18:41 -0600
parents e6fa2c27140f
children 645d22a0e8cb
files Makefile app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java
diffstat 2 files changed, 21 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Fri May 31 14:37:18 2024 -0600
+++ b/Makefile	Fri May 31 18:18:41 2024 -0600
@@ -10,8 +10,13 @@
 	<string name=\"msg_version\" translatable=\"false\">510Connectbot $(ver) ($(id) $(da))</string>\n\
 </resources>\n
 apk:=$(dest)/510Connectbot-$(ver).$(style).apk
+debugapk:=$(dest)/510Connectbot-$(ver).debug.apk
 signapk:=$(shell cat ~/.signapk)
 
+# path to google binaries on AndroidBuild
+adb=/home/carl/Android/Sdk/platform-tools/adb
+aapt=/home/carl/Android/Sdk/build-tools/33.0.0/aapt
+
 ifeq ($(style),release)
     task:=assembleArmRelease
 	debug:=0
@@ -127,6 +132,14 @@
 	sed -i -re 's/(Copyright . ....-).... /\1$(year) /g'   app/src/main/res/values/notrans.xml
 	sed -i -re 's/(Copyright .C. ....-).... /\1$(year) /g' xml/510connectbot.in
 
+install.android:
+	$(adb) devices
+	echo installing $(debugapk)
+	$(adb) install -r -d $(debugapk)
+
+logcat.device:
+	$(adb) logcat
+
 push:
 	# from from android build machine
 	hg push ssh://ns.five-ten-sg.com/usr/hg/510Connectbot || /bin/true
@@ -147,3 +160,4 @@
 # hg commit -m 'commit message'
 # make build.asm.packages
 # make push
+# make install.android
--- a/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java	Fri May 31 14:37:18 2024 -0600
+++ b/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java	Fri May 31 18:18:41 2024 -0600
@@ -483,7 +483,7 @@
                     reader = new BufferedReader(new FileReader(fn));
                 }
                 catch (Exception ee) {
-                    Log.d(TAG, "cannot read either file");
+                    Log.d(TAG, ee.getMessage() + "cannot read either file");
                     return launch;
                 }
             }
@@ -497,6 +497,10 @@
                 if (!line.contains("://")) continue;            // invalid uri
 
                 Uri uri = Uri.parse(line);
+                String uriline = line;
+                Log.d(TAG, "uriline: " + uriline);
+                Log.d(TAG, "uri 2 str: " + uri.toString());
+
                 ContentValues values = null;
 
                 while ((line = reader.readLine()) != null) {
@@ -594,11 +598,13 @@
                         host.setColor(HostDatabase.COLOR_GRAY);
                         host.setPubkeyId(HostDatabase.PUBKEYID_ANY);
                         hostdb.saveHost(host);
+                        Log.d(TAG, "created new host: " + host.getId());
                     }
 
                     host = TransportFactory.findHost(hostdb, uri);
 
                     if (host == null) continue;
+                    Log.d(TAG, "found host: " + host.getId());
 
                     if (values == null) continue;