adb-sqlite-viewer 1.0.8 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html CHANGED
@@ -1,10 +1,10 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>ADB SQLite Query Viewer</title>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>ADB SQLite Query Viewer</title>
8
8
  <style>
9
9
  * {
10
10
  margin: 0;
@@ -686,136 +686,235 @@
686
686
  .spinning {
687
687
  animation: spin 1s linear infinite;
688
688
  }
689
- </style>
690
- <script type="module" crossorigin src="./assets/index-CIcR1CkF.js"></script>
691
- </head>
692
-
693
- <body>
694
- <!-- Sidebar -->
695
- <div class="sidebar">
696
- <div class="sidebar-header">
697
- <h1>ADB SQLite Viewer</h1>
698
- <div class="connection-status disconnected" id="connectionStatus">
699
- Not connected
700
- </div>
701
- </div>
702
- <div class="sidebar-search">
703
- <input type="text" id="tableSearch" placeholder="Search tables...">
704
- </div>
705
- <div class="tables-list" id="tablesList">
706
- <div class="info" style="margin: 10px; font-size: 12px;">Connect a USB device to get started.</div>
707
- </div>
708
- </div>
709
-
710
- <!-- Main Content -->
711
- <div class="main-content">
712
- <!-- Collapsible Configuration Panel -->
713
- <div class="config-section expanded" id="configSection">
714
- <div class="config-toggle" id="configToggleBtn">
715
- <span class="toggle-arrow">&#9660;</span>
716
- <span>Device &amp; Database Configuration</span>
717
- </div>
718
- <div class="config-panel">
719
- <div class="config-row">
720
- <div class="config-group">
721
- <label>USB Device</label>
722
- <div style="display: flex; gap: 8px; align-items: center;">
723
- <button class="usb-connect-btn" id="usbConnectBtn">Connect Device</button>
724
- </div>
725
- <div class="device-status" id="deviceStatus">No device connected</div>
726
- </div>
727
- <div class="config-group" style="position: relative;">
728
- <label>Package (debuggable only)</label>
729
- <div class="combo-wrapper" id="packageComboWrapper">
730
- <input type="text" id="packageSearchInput"
731
- placeholder="Connect device first..."
732
- disabled>
733
- <button class="combo-clear" id="packageClearBtn" title="Clear selection">&times;</button>
734
- </div>
735
- <div class="combo-dropdown" id="packageDropdown"></div>
736
- </div>
737
- <div class="config-group">
738
- <label>Database File</label>
739
- <select id="databaseSelect" disabled>
740
- <option value="">Select a package first</option>
741
- </select>
742
- </div>
743
- <div class="config-group" style="position: relative;">
744
- <label>Search SQLite Files</label>
745
- <div class="input-with-btn">
746
- <input type="text" id="dbSearchInput" placeholder="Search for .db files...">
747
- <button id="dbSearchBtn">Search</button>
748
- </div>
749
- <div class="search-results-dropdown" id="searchResultsDropdown"></div>
750
- </div>
751
- </div>
752
- </div>
753
- </div>
754
-
755
- <div class="toolbar">
756
- <button class="primary" id="executeBtn">Execute (F5)</button>
757
- <button id="executeAllBtn" title="Run the entire query ignoring selection">Execute All</button>
758
- <button id="refreshTablesBtn">Refresh Tables</button>
759
- <button id="clearQueryBtn">Clear Query</button>
760
- <button id="formatQueryBtn">Format</button>
761
- </div>
762
-
763
- <div class="tabs">
764
- <div class="tab active" data-tab="query">Query</div>
765
- <div class="tab" data-tab="structure">Structure</div>
766
- </div>
767
-
768
- <div class="query-editor">
769
- <textarea id="queryInput" placeholder="Enter your SQL query here..."></textarea>
770
- </div>
771
-
772
- <div class="tab-content active" id="queryTab">
773
- <div class="content-area">
774
- <div class="info" id="welcomeMessage">
775
- <strong>Welcome to ADB SQLite Query Viewer!</strong><br>
776
- <b>ADB Bridge (recommended for RN devs):</b>
777
- <a href="https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/adb-bridge.exe" style="color: #8e44ad; font-weight: 600;">Download adb-bridge.exe</a>,
778
- run it, and this page auto-connects.<br>
779
- <b>WebUSB:</b> Click "Connect Device" (requires <code>adb kill-server</code> first).<br>
780
- Select a package and database, then browse tables or write SQL queries.<br>
781
- <small>WebUSB requires Chrome or Edge. Device must have USB debugging enabled.</small>
782
- </div>
783
- <div class="table-wrapper" id="resultsContainer"></div>
784
- </div>
785
- <div class="pagination" id="pagination" style="display: none;">
786
- <div style="display: flex; gap: 10px; align-items: center;">
787
- <button id="firstBtn">First</button>
788
- <button id="prevBtn">Previous</button>
789
- <span id="pageInfo"></span>
790
- <button id="nextBtn">Next</button>
791
- <button id="lastBtn">Last</button>
792
- <span style="margin-left: 20px;">|</span>
793
- <label style="margin-left: 10px;">Go to page:</label>
794
- <input type="number" id="gotoPageInput" min="1" style="width: 80px; padding: 4px;">
795
- <button id="gotoPageBtn">Go</button>
796
- <span style="margin-left: 20px;">|</span>
797
- <label style="margin-left: 10px;">Rows per page:</label>
798
- <select id="limitSelect" style="padding: 4px;">
799
- <option value="50">50</option>
800
- <option value="100" selected>100</option>
801
- <option value="200">200</option>
802
- <option value="500">500</option>
803
- <option value="1000">1000</option>
804
- <option value="all">All</option>
805
- </select>
806
- </div>
807
- </div>
808
- <div class="status-bar" id="statusBar">Ready</div>
809
- </div>
810
-
811
- <div class="tab-content" id="structureTab">
812
- <div class="content-area">
813
- <div class="info">Select a table to view its structure</div>
814
- <div class="table-wrapper" id="structureContainer"></div>
815
- </div>
816
- </div>
817
- </div>
818
-
819
- </body>
820
-
821
- </html>
689
+
690
+ /* Upload / Local file */
691
+ .upload-btn {
692
+ padding: 6px 14px;
693
+ border: 1px solid #e67e22;
694
+ border-radius: 4px;
695
+ background: #e67e22;
696
+ color: white;
697
+ font-size: 12px;
698
+ font-weight: 600;
699
+ cursor: pointer;
700
+ white-space: nowrap;
701
+ transition: background 0.2s;
702
+ }
703
+
704
+ .upload-btn:hover {
705
+ background: #d35400;
706
+ }
707
+
708
+ .local-file-badge {
709
+ display: none;
710
+ padding: 4px 10px;
711
+ background: #e67e22;
712
+ color: white;
713
+ border-radius: 4px;
714
+ font-size: 11px;
715
+ font-weight: 600;
716
+ align-items: center;
717
+ gap: 6px;
718
+ }
719
+
720
+ .local-file-badge.visible {
721
+ display: inline-flex;
722
+ }
723
+
724
+ .local-file-badge .close-local {
725
+ background: none;
726
+ border: none;
727
+ color: white;
728
+ font-size: 14px;
729
+ cursor: pointer;
730
+ padding: 0 2px;
731
+ line-height: 1;
732
+ }
733
+
734
+ .local-file-badge .close-local:hover {
735
+ color: #fce4c0;
736
+ }
737
+
738
+ /* Update notification bar */
739
+ .update-bar {
740
+ display: none;
741
+ padding: 8px 20px;
742
+ background: #2ecc71;
743
+ color: white;
744
+ font-size: 13px;
745
+ align-items: center;
746
+ gap: 12px;
747
+ }
748
+
749
+ .update-bar.visible {
750
+ display: flex;
751
+ }
752
+
753
+ .update-bar a,
754
+ .update-bar button {
755
+ color: white;
756
+ font-weight: 600;
757
+ text-decoration: underline;
758
+ background: none;
759
+ border: none;
760
+ cursor: pointer;
761
+ font-size: 13px;
762
+ padding: 0;
763
+ }
764
+
765
+ .update-bar .dismiss-update {
766
+ margin-left: auto;
767
+ text-decoration: none;
768
+ font-size: 16px;
769
+ opacity: 0.8;
770
+ }
771
+
772
+ .update-bar .dismiss-update:hover {
773
+ opacity: 1;
774
+ }
775
+ </style>
776
+ <script type="module" crossorigin src="./assets/index-B63KZ0IL.js"></script>
777
+ </head>
778
+
779
+ <body>
780
+ <!-- Sidebar -->
781
+ <div class="sidebar">
782
+ <div class="sidebar-header">
783
+ <h1>ADB SQLite Viewer</h1>
784
+ <div class="connection-status disconnected" id="connectionStatus">
785
+ Not connected
786
+ </div>
787
+ </div>
788
+ <div class="sidebar-search">
789
+ <input type="text" id="tableSearch" placeholder="Search tables...">
790
+ </div>
791
+ <div class="tables-list" id="tablesList">
792
+ <div class="info" style="margin: 10px; font-size: 12px;">Connect a USB device to get started.</div>
793
+ </div>
794
+ </div>
795
+
796
+ <!-- Main Content -->
797
+ <div class="main-content">
798
+ <!-- Update notification -->
799
+ <div class="update-bar" id="updateBar">
800
+ <span id="updateMessage">A new version is available!</span>
801
+ <a href="#" id="updateAction">Download</a>
802
+ <button class="dismiss-update" id="dismissUpdate">&times;</button>
803
+ </div>
804
+ <!-- Collapsible Configuration Panel -->
805
+ <div class="config-section expanded" id="configSection">
806
+ <div class="config-toggle" id="configToggleBtn">
807
+ <span class="toggle-arrow">&#9660;</span>
808
+ <span>Device &amp; Database Configuration</span>
809
+ </div>
810
+ <div class="config-panel">
811
+ <div class="config-row">
812
+ <div class="config-group">
813
+ <label>USB Device</label>
814
+ <div style="display: flex; gap: 8px; align-items: center;">
815
+ <button class="usb-connect-btn" id="usbConnectBtn">Connect Device</button>
816
+ <button class="upload-btn" id="openLocalBtn" title="Open a .db/.sqlite file from your computer">Open Local DB</button>
817
+ <input type="file" id="localFileInput" accept=".db,.sqlite,.sqlite3" style="display:none">
818
+ </div>
819
+ <div class="device-status" id="deviceStatus">No device connected</div>
820
+ <div class="local-file-badge" id="localFileBadge">
821
+ <span id="localFileName"></span>
822
+ <button class="close-local" id="closeLocalBtn" title="Close local file">&times;</button>
823
+ </div>
824
+ </div>
825
+ <div class="config-group" style="position: relative;">
826
+ <label>Package (debuggable only)</label>
827
+ <div class="combo-wrapper" id="packageComboWrapper">
828
+ <input type="text" id="packageSearchInput"
829
+ placeholder="Connect device first..."
830
+ disabled>
831
+ <button class="combo-clear" id="packageClearBtn" title="Clear selection">&times;</button>
832
+ </div>
833
+ <div class="combo-dropdown" id="packageDropdown"></div>
834
+ </div>
835
+ <div class="config-group">
836
+ <label>Database File</label>
837
+ <select id="databaseSelect" disabled>
838
+ <option value="">Select a package first</option>
839
+ </select>
840
+ </div>
841
+ <div class="config-group" style="position: relative;">
842
+ <label>Search SQLite Files</label>
843
+ <div class="input-with-btn">
844
+ <input type="text" id="dbSearchInput" placeholder="Search for .db files...">
845
+ <button id="dbSearchBtn">Search</button>
846
+ </div>
847
+ <div class="search-results-dropdown" id="searchResultsDropdown"></div>
848
+ </div>
849
+ </div>
850
+ </div>
851
+ </div>
852
+
853
+ <div class="toolbar">
854
+ <button class="primary" id="executeBtn">Execute (F5)</button>
855
+ <button id="executeAllBtn" title="Run the entire query ignoring selection">Execute All</button>
856
+ <button id="refreshTablesBtn">Refresh Tables</button>
857
+ <button id="clearQueryBtn">Clear Query</button>
858
+ <button id="formatQueryBtn">Format</button>
859
+ <button id="downloadDbBtn" title="Download current database to your computer" style="margin-left: auto;">Download DB</button>
860
+ </div>
861
+
862
+ <div class="tabs">
863
+ <div class="tab active" data-tab="query">Query</div>
864
+ <div class="tab" data-tab="structure">Structure</div>
865
+ </div>
866
+
867
+ <div class="query-editor">
868
+ <textarea id="queryInput" placeholder="Enter your SQL query here..."></textarea>
869
+ </div>
870
+
871
+ <div class="tab-content active" id="queryTab">
872
+ <div class="content-area">
873
+ <div class="info" id="welcomeMessage">
874
+ <strong>Welcome to ADB SQLite Query Viewer!</strong><br>
875
+ <b>ADB Bridge (recommended for RN devs):</b>
876
+ <a href="https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/adb-bridge.exe" style="color: #8e44ad; font-weight: 600;">Download adb-bridge.exe</a>,
877
+ run it, and this page auto-connects.<br>
878
+ <b>WebUSB:</b> Click "Connect Device" (requires <code>adb kill-server</code> first).<br>
879
+ Select a package and database, then browse tables or write SQL queries.<br>
880
+ <small>WebUSB requires Chrome or Edge. Device must have USB debugging enabled.</small>
881
+ </div>
882
+ <div class="table-wrapper" id="resultsContainer"></div>
883
+ </div>
884
+ <div class="pagination" id="pagination" style="display: none;">
885
+ <div style="display: flex; gap: 10px; align-items: center;">
886
+ <button id="firstBtn">First</button>
887
+ <button id="prevBtn">Previous</button>
888
+ <span id="pageInfo"></span>
889
+ <button id="nextBtn">Next</button>
890
+ <button id="lastBtn">Last</button>
891
+ <span style="margin-left: 20px;">|</span>
892
+ <label style="margin-left: 10px;">Go to page:</label>
893
+ <input type="number" id="gotoPageInput" min="1" style="width: 80px; padding: 4px;">
894
+ <button id="gotoPageBtn">Go</button>
895
+ <span style="margin-left: 20px;">|</span>
896
+ <label style="margin-left: 10px;">Rows per page:</label>
897
+ <select id="limitSelect" style="padding: 4px;">
898
+ <option value="50">50</option>
899
+ <option value="100" selected>100</option>
900
+ <option value="200">200</option>
901
+ <option value="500">500</option>
902
+ <option value="1000">1000</option>
903
+ <option value="all">All</option>
904
+ </select>
905
+ </div>
906
+ </div>
907
+ <div class="status-bar" id="statusBar">Ready</div>
908
+ </div>
909
+
910
+ <div class="tab-content" id="structureTab">
911
+ <div class="content-area">
912
+ <div class="info">Select a table to view its structure</div>
913
+ <div class="table-wrapper" id="structureContainer"></div>
914
+ </div>
915
+ </div>
916
+ </div>
917
+
918
+ </body>
919
+
920
+ </html>