adb-sqlite-viewer 1.1.3 → 1.1.5
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/README.md +13 -3
- package/dist/assets/{index-DdzJrQpr.js → index-CJzWGZhE.js} +1 -1
- package/dist/index.html +11 -5
- package/electron/main.cjs +32 -6
- package/package.json +18 -3
package/README.md
CHANGED
|
@@ -42,14 +42,24 @@ Then `npm run sqlite-viewer` opens the viewer. Works great alongside React Nativ
|
|
|
42
42
|
|
|
43
43
|
### Desktop App
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
ADB is bundled — no Android SDK required. Double-click to launch.
|
|
46
|
+
|
|
47
|
+
| Platform | Download |
|
|
48
|
+
|----------|----------|
|
|
49
|
+
| Windows | [ADB-SQLite-DevTools-win.exe](https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/ADB-SQLite-DevTools-win.exe) |
|
|
50
|
+
| macOS (Apple Silicon) | [ADB-SQLite-DevTools-mac-arm64.dmg](https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/ADB-SQLite-DevTools-mac-arm64.dmg) |
|
|
51
|
+
| macOS (Intel) | [ADB-SQLite-DevTools-mac-x64.dmg](https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/ADB-SQLite-DevTools-mac-x64.dmg) |
|
|
52
|
+
| Linux | [ADB-SQLite-DevTools-linux.AppImage](https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/ADB-SQLite-DevTools-linux.AppImage) |
|
|
46
53
|
|
|
47
54
|
### Hosted Version + ADB Bridge
|
|
48
55
|
|
|
49
56
|
Use the deployed version at **[amitwinit.github.io/SQLite-DevTools-Mobile-ReactNative](https://amitwinit.github.io/SQLite-DevTools-Mobile-ReactNative/)** together with the standalone ADB Bridge.
|
|
50
57
|
|
|
51
|
-
1. Download
|
|
52
|
-
|
|
58
|
+
1. Download the bridge for your platform from [Releases](https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases):
|
|
59
|
+
- Windows: `adb-bridge.exe`
|
|
60
|
+
- macOS: `adb-bridge-macos`
|
|
61
|
+
- Linux: `adb-bridge-linux`
|
|
62
|
+
2. Run the bridge binary
|
|
53
63
|
3. Open the hosted website — it auto-detects the bridge
|
|
54
64
|
|
|
55
65
|
```
|
|
@@ -60,4 +60,4 @@ var Lc=Object.defineProperty;var ka=n=>{throw TypeError(n)};var _c=(n,e,t)=>e in
|
|
|
60
60
|
</tbody>
|
|
61
61
|
</table>`}function oh(){const n=w("pagination");n.style.display="flex";const e=Math.floor(ne/J)+1,t=Math.ceil(ue/J);w("firstBtn").disabled=ne===0,w("prevBtn").disabled=ne===0,w("nextBtn").disabled=ne+J>=ue,w("lastBtn").disabled=ne+J>=ue,w("gotoPageInput").max=t,w("gotoPageInput").placeholder=`1-${t}`,w("pageInfo").textContent=`Page ${e} of ${t} (${ue.toLocaleString()} total rows)`}function ch(){ne>0&&ot(me,0)}function lh(){ne>0&&ot(me,ne-J)}function uh(){ne+J<ue&&ot(me,ne+J)}function hh(){if(ne+J<ue){const n=Math.floor((ue-1)/J)*J;ot(me,n)}}function Fa(){const n=parseInt(w("gotoPageInput").value),e=Math.ceil(ue/J);n>=1&&n<=e?(ot(me,(n-1)*J),w("gotoPageInput").value=""):alert(`Please enter a page number between 1 and ${e}`)}function dh(){const n=w("limitSelect").value;n==="all"?J=ue||1e5:J=parseInt(n),ne=0,me&&ot(me,0)}function fh(n){Lo=n,document.querySelectorAll(".tab").forEach(e=>{e.classList.toggle("active",e.dataset.tab===n)}),document.querySelectorAll(".tab-content").forEach(e=>e.classList.remove("active")),n==="query"?(w("queryTab").classList.add("active"),me&&ot(me)):n==="structure"&&(w("structureTab").classList.add("active"),me&&Do(me))}async function ph(){const n=w("statusBar");n.textContent="Refreshing tables...",D.dbPath="",await Ls(),await Io(),n.textContent="Tables refreshed",setTimeout(()=>n.textContent="Ready",3e3)}function wh(){w("queryInput").value="",w("resultsContainer").innerHTML="",w("welcomeMessage").style.display="block",w("statusBar").textContent="Ready",localStorage.removeItem("sqliteViewerQuery")}function gh(){const n=w("queryInput");let e=n.value;e=e.replace(/\s+/g," ").trim(),e=e.replace(/\b(SELECT|FROM|WHERE|AND|OR|ORDER BY|GROUP BY|LIMIT|JOIN|LEFT JOIN|RIGHT JOIN|INNER JOIN)\b/gi,`
|
|
62
62
|
$1`),e=e.replace(/,/g,`,
|
|
63
|
-
`),n.value=e}async function yh(){const n=w("statusBar");if(_r==="local"&&it.isOpen()){const e=it.db.export(),t=new Blob([e],{type:"application/octet-stream"});Va(t,it.fileName||"database.db"),n.textContent=`Downloaded ${it.fileName}`;return}if(D.mode!=="bridge"||!D.bridgeUrl){n.textContent="Download requires ADB Bridge connection";return}if(!X||!D.dbPath){n.textContent="Select a package and database first";return}n.textContent="Downloading database...";try{const e=await fetch(`${D.bridgeUrl}/api/pull-db`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serial:D.bridgeSerial||void 0,packageName:X,dbPath:D.dbPath})});if(!e.ok){const a=await e.json().catch(()=>({}));throw new Error(a.error||`HTTP ${e.status}`)}const t=await e.blob(),i=D.dbName||"database.db";Va(t,i),n.textContent=`Downloaded ${i}`}catch(e){n.textContent=`Download failed: ${e.message}`}}function Va(n,e){const t=URL.createObjectURL(n),i=document.createElement("a");i.href=t,i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(t)}async function mh(n){const e=n.target.files[0];if(!e)return;const t=w("statusBar");t.textContent=`Opening ${e.name}...`;try{const i=await e.arrayBuffer();await it.open(i,e.name),_r="local";const a=w("connectionStatus");a.textContent="Local File",a.className="connection-status bridge",w("localFileName").textContent=e.name,w("localFileBadge").classList.add("visible"),w("packageSearchInput").disabled=!0,w("packageSearchInput").placeholder="Local file mode",w("databaseSelect").disabled=!0,w("databaseSelect").innerHTML=`<option value="">${e.name}</option>`,await Ls(),t.textContent=`Opened ${e.name}`}catch(i){t.textContent=`Failed to open file: ${i.message}`,w("tablesList").innerHTML=`<div class="error" style="margin: 10px; font-size: 12px;">Failed to open file: ${i.message}</div>`}n.target.value=""}function bh(){if(it.close(),_r="device",w("localFileBadge").classList.remove("visible"),w("tablesList").innerHTML='<div class="info" style="margin: 10px; font-size: 12px;">Connect a USB device to get started.</div>',w("resultsContainer").innerHTML="",w("welcomeMessage").style.display="block",w("statusBar").textContent="Ready",w("pagination").style.display="none",D.mode==="bridge"?!!D.bridgeUrl:!!D.adb){const e=w("connectionStatus");e.textContent=D.mode==="bridge"?"ADB Bridge":"Connected",e.className=D.mode==="bridge"?"connection-status bridge":"connection-status connected",w("packageSearchInput").disabled=!1,w("packageSearchInput").placeholder=`Search ${Ye.length} debuggable apps...`,w("databaseSelect").disabled=!1}else w("connectionStatus").textContent="Disconnected",w("connectionStatus").className="connection-status disconnected",w("packageSearchInput").disabled=!0,w("packageSearchInput").placeholder="Connect device first...",w("databaseSelect").disabled=!0,w("databaseSelect").innerHTML='<option value="">Select a package first</option>'}const ji="1.1.
|
|
63
|
+
`),n.value=e}async function yh(){const n=w("statusBar");if(_r==="local"&&it.isOpen()){const e=it.db.export(),t=new Blob([e],{type:"application/octet-stream"});Va(t,it.fileName||"database.db"),n.textContent=`Downloaded ${it.fileName}`;return}if(D.mode!=="bridge"||!D.bridgeUrl){n.textContent="Download requires ADB Bridge connection";return}if(!X||!D.dbPath){n.textContent="Select a package and database first";return}n.textContent="Downloading database...";try{const e=await fetch(`${D.bridgeUrl}/api/pull-db`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serial:D.bridgeSerial||void 0,packageName:X,dbPath:D.dbPath})});if(!e.ok){const a=await e.json().catch(()=>({}));throw new Error(a.error||`HTTP ${e.status}`)}const t=await e.blob(),i=D.dbName||"database.db";Va(t,i),n.textContent=`Downloaded ${i}`}catch(e){n.textContent=`Download failed: ${e.message}`}}function Va(n,e){const t=URL.createObjectURL(n),i=document.createElement("a");i.href=t,i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(t)}async function mh(n){const e=n.target.files[0];if(!e)return;const t=w("statusBar");t.textContent=`Opening ${e.name}...`;try{const i=await e.arrayBuffer();await it.open(i,e.name),_r="local";const a=w("connectionStatus");a.textContent="Local File",a.className="connection-status bridge",w("localFileName").textContent=e.name,w("localFileBadge").classList.add("visible"),w("packageSearchInput").disabled=!0,w("packageSearchInput").placeholder="Local file mode",w("databaseSelect").disabled=!0,w("databaseSelect").innerHTML=`<option value="">${e.name}</option>`,await Ls(),t.textContent=`Opened ${e.name}`}catch(i){t.textContent=`Failed to open file: ${i.message}`,w("tablesList").innerHTML=`<div class="error" style="margin: 10px; font-size: 12px;">Failed to open file: ${i.message}</div>`}n.target.value=""}function bh(){if(it.close(),_r="device",w("localFileBadge").classList.remove("visible"),w("tablesList").innerHTML='<div class="info" style="margin: 10px; font-size: 12px;">Connect a USB device to get started.</div>',w("resultsContainer").innerHTML="",w("welcomeMessage").style.display="block",w("statusBar").textContent="Ready",w("pagination").style.display="none",D.mode==="bridge"?!!D.bridgeUrl:!!D.adb){const e=w("connectionStatus");e.textContent=D.mode==="bridge"?"ADB Bridge":"Connected",e.className=D.mode==="bridge"?"connection-status bridge":"connection-status connected",w("packageSearchInput").disabled=!1,w("packageSearchInput").placeholder=`Search ${Ye.length} debuggable apps...`,w("databaseSelect").disabled=!1}else w("connectionStatus").textContent="Disconnected",w("connectionStatus").className="connection-status disconnected",w("packageSearchInput").disabled=!0,w("packageSearchInput").placeholder="Connect device first...",w("databaseSelect").disabled=!0,w("databaseSelect").innerHTML='<option value="">Select a package first</option>'}const ji="1.1.5",vh="amitwinit/SQLite-DevTools-Mobile-ReactNative";async function Eh(){if(!navigator.userAgent.includes("Electron"))try{const n=await fetch(`https://api.github.com/repos/${vh}/releases/latest`,{signal:AbortSignal.timeout(5e3)});if(!n.ok)return;const e=await n.json(),t=(e.tag_name||"").replace(/^v/,"");if(t&&t!==ji&&Sh(t,ji)){const i=w("updateBar");w("updateMessage").textContent=`Version ${t} is available (you have ${ji})`;const a=w("updateAction");a.textContent="Download",a.href=e.html_url,a.target="_blank",i.classList.add("visible")}}catch{}}function Sh(n,e){const t=n.split(".").map(Number),i=e.split(".").map(Number);for(let a=0;a<Math.max(t.length,i.length);a++){const l=t[a]||0,d=i[a]||0;if(l>d)return!0;if(l<d)return!1}return!1}
|
package/dist/index.html
CHANGED
|
@@ -773,7 +773,7 @@
|
|
|
773
773
|
opacity: 1;
|
|
774
774
|
}
|
|
775
775
|
</style>
|
|
776
|
-
<script type="module" crossorigin src="./assets/index-
|
|
776
|
+
<script type="module" crossorigin src="./assets/index-CJzWGZhE.js"></script>
|
|
777
777
|
</head>
|
|
778
778
|
|
|
779
779
|
<body>
|
|
@@ -871,10 +871,16 @@
|
|
|
871
871
|
<div class="tab-content active" id="queryTab">
|
|
872
872
|
<div class="content-area">
|
|
873
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;">
|
|
877
|
-
|
|
874
|
+
<strong>Welcome to ADB SQLite Query Viewer!</strong><br><br>
|
|
875
|
+
<b>ADB Bridge (recommended for RN devs):</b> Download for your platform, run it, and this page auto-connects.<br>
|
|
876
|
+
<a href="https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/adb-bridge.exe" style="color: #8e44ad; font-weight: 600;">Windows</a> |
|
|
877
|
+
<a href="https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/adb-bridge-macos" style="color: #8e44ad; font-weight: 600;">macOS</a> |
|
|
878
|
+
<a href="https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/adb-bridge-linux" style="color: #8e44ad; font-weight: 600;">Linux</a><br><br>
|
|
879
|
+
<b>Desktop App (ADB bundled, no SDK needed):</b><br>
|
|
880
|
+
<a href="https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/ADB-SQLite-DevTools-win.exe" style="color: #2980b9; font-weight: 600;">Windows .exe</a> |
|
|
881
|
+
<a href="https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/ADB-SQLite-DevTools-mac-arm64.dmg" style="color: #2980b9; font-weight: 600;">macOS (Apple Silicon)</a> |
|
|
882
|
+
<a href="https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/ADB-SQLite-DevTools-mac-x64.dmg" style="color: #2980b9; font-weight: 600;">macOS (Intel)</a> |
|
|
883
|
+
<a href="https://github.com/amitwinit/SQLite-DevTools-Mobile-ReactNative/releases/latest/download/ADB-SQLite-DevTools-linux.AppImage" style="color: #2980b9; font-weight: 600;">Linux .AppImage</a><br><br>
|
|
878
884
|
<b>WebUSB:</b> Click "Connect Device" (requires <code>adb kill-server</code> first).<br>
|
|
879
885
|
Select a package and database, then browse tables or write SQL queries.<br>
|
|
880
886
|
<small>WebUSB requires Chrome or Edge. Device must have USB debugging enabled.</small>
|
package/electron/main.cjs
CHANGED
|
@@ -75,12 +75,40 @@ function setupAutoUpdater() {
|
|
|
75
75
|
// ── Application Menu ────────────────────────────────
|
|
76
76
|
|
|
77
77
|
function buildMenu() {
|
|
78
|
+
const isMac = process.platform === "darwin";
|
|
78
79
|
const template = [
|
|
80
|
+
...(isMac
|
|
81
|
+
? [
|
|
82
|
+
{
|
|
83
|
+
label: app.name,
|
|
84
|
+
submenu: [
|
|
85
|
+
{
|
|
86
|
+
label: "About ADB SQLite DevTools",
|
|
87
|
+
click: () => {
|
|
88
|
+
dialog.showMessageBox(mainWindow, {
|
|
89
|
+
type: "info",
|
|
90
|
+
title: "About ADB SQLite DevTools",
|
|
91
|
+
message: `ADB SQLite DevTools v${app.getVersion()}`,
|
|
92
|
+
detail:
|
|
93
|
+
"View and query SQLite databases on Android devices.",
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{ type: "separator" },
|
|
98
|
+
{ role: "services" },
|
|
99
|
+
{ type: "separator" },
|
|
100
|
+
{ role: "hide" },
|
|
101
|
+
{ role: "hideOthers" },
|
|
102
|
+
{ role: "unhide" },
|
|
103
|
+
{ type: "separator" },
|
|
104
|
+
{ role: "quit" },
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
]
|
|
108
|
+
: []),
|
|
79
109
|
{
|
|
80
110
|
label: "File",
|
|
81
|
-
submenu: [
|
|
82
|
-
{ role: "quit" },
|
|
83
|
-
],
|
|
111
|
+
submenu: [isMac ? { role: "close" } : { role: "quit" }],
|
|
84
112
|
},
|
|
85
113
|
{
|
|
86
114
|
label: "View",
|
|
@@ -240,9 +268,7 @@ app.whenReady().then(async () => {
|
|
|
240
268
|
|
|
241
269
|
createWindow();
|
|
242
270
|
|
|
243
|
-
|
|
244
|
-
setupAutoUpdater();
|
|
245
|
-
}
|
|
271
|
+
setupAutoUpdater();
|
|
246
272
|
|
|
247
273
|
app.on("activate", () => {
|
|
248
274
|
if (BrowserWindow.getAllWindows().length === 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adb-sqlite-viewer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "ADB SQLite database viewer for Android — inspect tables, schemas, and run queries on-device",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "electron/main.cjs",
|
|
@@ -81,12 +81,27 @@
|
|
|
81
81
|
"to": "sqlite3-arm64"
|
|
82
82
|
}
|
|
83
83
|
],
|
|
84
|
+
"mac": {
|
|
85
|
+
"target": [
|
|
86
|
+
{
|
|
87
|
+
"target": "dmg",
|
|
88
|
+
"arch": [
|
|
89
|
+
"x64",
|
|
90
|
+
"arm64"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"category": "public.app-category.developer-tools",
|
|
95
|
+
"artifactName": "ADB-SQLite-DevTools-mac-${arch}.${ext}"
|
|
96
|
+
},
|
|
84
97
|
"win": {
|
|
85
|
-
"target": "nsis"
|
|
98
|
+
"target": "nsis",
|
|
99
|
+
"artifactName": "ADB-SQLite-DevTools-win.${ext}"
|
|
86
100
|
},
|
|
87
101
|
"linux": {
|
|
88
102
|
"target": "AppImage",
|
|
89
|
-
"category": "Development"
|
|
103
|
+
"category": "Development",
|
|
104
|
+
"artifactName": "ADB-SQLite-DevTools-linux.${ext}"
|
|
90
105
|
},
|
|
91
106
|
"publish": {
|
|
92
107
|
"provider": "github",
|