From c6250d533d2c8e7ae9f40be2a048c9d49714e817 Mon Sep 17 00:00:00 2001 From: wrong Date: Wed, 28 Mar 2018 11:42:49 -0300 Subject: [PATCH 01/42] Add filesystem navigation (seen from the app perspective) --- build.gradle | 2 +- debug-db/build.gradle | 2 + debug-db/src/main/AndroidManifest.xml | 3 + debug-db/src/main/assets/app.js | 26 ++- .../src/main/assets/images/application.png | Bin 0 -> 464 bytes debug-db/src/main/assets/images/code.png | Bin 0 -> 603 bytes debug-db/src/main/assets/images/css.png | Bin 0 -> 618 bytes debug-db/src/main/assets/images/db.png | Bin 0 -> 579 bytes debug-db/src/main/assets/images/directory.png | Bin 0 -> 537 bytes debug-db/src/main/assets/images/doc.png | Bin 0 -> 651 bytes debug-db/src/main/assets/images/file.png | Bin 0 -> 294 bytes debug-db/src/main/assets/images/film.png | Bin 0 -> 653 bytes debug-db/src/main/assets/images/flash.png | Bin 0 -> 582 bytes .../src/main/assets/images/folder_open.png | Bin 0 -> 583 bytes debug-db/src/main/assets/images/html.png | Bin 0 -> 734 bytes debug-db/src/main/assets/images/java.png | Bin 0 -> 633 bytes debug-db/src/main/assets/images/linux.png | Bin 0 -> 668 bytes debug-db/src/main/assets/images/music.png | Bin 0 -> 385 bytes debug-db/src/main/assets/images/pdf.png | Bin 0 -> 591 bytes debug-db/src/main/assets/images/php.png | Bin 0 -> 538 bytes debug-db/src/main/assets/images/picture.png | Bin 0 -> 606 bytes debug-db/src/main/assets/images/ppt.png | Bin 0 -> 588 bytes debug-db/src/main/assets/images/psd.png | Bin 0 -> 856 bytes debug-db/src/main/assets/images/ruby.png | Bin 0 -> 626 bytes debug-db/src/main/assets/images/script.png | Bin 0 -> 859 bytes debug-db/src/main/assets/images/spinner.gif | Bin 0 -> 2530 bytes debug-db/src/main/assets/images/txt.png | Bin 0 -> 342 bytes debug-db/src/main/assets/images/xls.png | Bin 0 -> 663 bytes debug-db/src/main/assets/images/zip.png | Bin 0 -> 386 bytes debug-db/src/main/assets/index.html | 26 ++- debug-db/src/main/assets/jquery.easing.js | 146 ++++++++++++ debug-db/src/main/assets/jqueryFileTree.css | 91 ++++++++ debug-db/src/main/assets/jqueryFileTree.js | 95 ++++++++ .../com/amitshekhar/DebugDBInitProvider.java | 13 ++ .../RequestPermissionsActivity.java | 28 +++ .../amitshekhar/server/RequestHandler.java | 219 +++++++++++++++++- 36 files changed, 647 insertions(+), 4 deletions(-) create mode 100644 debug-db/src/main/assets/images/application.png create mode 100644 debug-db/src/main/assets/images/code.png create mode 100644 debug-db/src/main/assets/images/css.png create mode 100644 debug-db/src/main/assets/images/db.png create mode 100644 debug-db/src/main/assets/images/directory.png create mode 100644 debug-db/src/main/assets/images/doc.png create mode 100644 debug-db/src/main/assets/images/file.png create mode 100644 debug-db/src/main/assets/images/film.png create mode 100644 debug-db/src/main/assets/images/flash.png create mode 100644 debug-db/src/main/assets/images/folder_open.png create mode 100644 debug-db/src/main/assets/images/html.png create mode 100644 debug-db/src/main/assets/images/java.png create mode 100644 debug-db/src/main/assets/images/linux.png create mode 100644 debug-db/src/main/assets/images/music.png create mode 100644 debug-db/src/main/assets/images/pdf.png create mode 100644 debug-db/src/main/assets/images/php.png create mode 100644 debug-db/src/main/assets/images/picture.png create mode 100644 debug-db/src/main/assets/images/ppt.png create mode 100644 debug-db/src/main/assets/images/psd.png create mode 100644 debug-db/src/main/assets/images/ruby.png create mode 100644 debug-db/src/main/assets/images/script.png create mode 100644 debug-db/src/main/assets/images/spinner.gif create mode 100644 debug-db/src/main/assets/images/txt.png create mode 100644 debug-db/src/main/assets/images/xls.png create mode 100644 debug-db/src/main/assets/images/zip.png create mode 100644 debug-db/src/main/assets/jquery.easing.js create mode 100644 debug-db/src/main/assets/jqueryFileTree.css create mode 100644 debug-db/src/main/assets/jqueryFileTree.js create mode 100644 debug-db/src/main/java/com/amitshekhar/RequestPermissionsActivity.java diff --git a/build.gradle b/build.gradle index ba230a0..ac91450 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.3' + classpath 'com.android.tools.build:gradle:3.0.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' diff --git a/debug-db/build.gradle b/debug-db/build.gradle index 7e64d75..dbf8b6e 100644 --- a/debug-db/build.gradle +++ b/debug-db/build.gradle @@ -51,6 +51,8 @@ dependencies { compile 'com.google.code.gson:gson:2.8.0' compile 'net.zetetic:android-database-sqlcipher:3.5.7@aar' compile "android.arch.persistence.room:runtime:1.0.0" + compile 'com.android.support:appcompat-v7:27.0.0' + } //apply from: 'debug-db-upload.gradle' \ No newline at end of file diff --git a/debug-db/src/main/AndroidManifest.xml b/debug-db/src/main/AndroidManifest.xml index bb8d603..95c0bb2 100644 --- a/debug-db/src/main/AndroidManifest.xml +++ b/debug-db/src/main/AndroidManifest.xml @@ -22,6 +22,7 @@ + + + diff --git a/debug-db/src/main/assets/app.js b/debug-db/src/main/assets/app.js index 0c82d88..8d3b897 100644 --- a/debug-db/src/main/assets/app.js +++ b/debug-db/src/main/assets/app.js @@ -21,8 +21,32 @@ $( document ).ready(function() { $(this).addClass('selected'); }); - + $('#fileTree').fileTree({ root: '/', script: 'fileTree', folderEvent: 'click', expandSpeed: 750, collapseSpeed: 750, multiFolder: false }, function(file) { + console.log(file); + $.ajax({url: "getFileData?fileName="+file, success: function(result){ + $("#file-data").empty(); + $("#file-data").append("
" + hexdump(result) + "
"); + }}); + }); }); +function hexdump(buffer, blockSize) { + blockSize = blockSize || 16; + var lines = []; + var hex = "0123456789ABCDEF"; + for (var b = 0; b < buffer.length; b += blockSize) { + var block = buffer.slice(b, Math.min(b + blockSize, buffer.length)); + var addr = ("0000" + b.toString(16)).slice(-4); + var codes = block.split('').map(function (ch) { + var code = ch.charCodeAt(0); + return " " + hex[(0xF0 & code) >> 4] + hex[0x0F & code]; + }).join(""); + codes += "   ".repeat(blockSize - block.length); + var chars = block.replace(/[\x00-\x1F\x20]/g, '.'); + chars += " ".repeat(blockSize - block.length); + lines.push(addr + "  " + codes + "  " + chars); + } + return lines.join("
"); +} var isDatabaseSelected = true; diff --git a/debug-db/src/main/assets/images/application.png b/debug-db/src/main/assets/images/application.png new file mode 100644 index 0000000000000000000000000000000000000000..1dee9e366094e87db68c606d0522d72d4b939818 GIT binary patch literal 464 zcmV;>0WbcEP)8e6`gpm!y1M!N^ZV(=IC*t) z{^;nqJv-tM$9J1L2QJ2DN!#51=1_l@G`2=6e0lehL%sic%`_4--LFM}IF!KzJCseW zq1I3__Z40|e?qyK1__gzP(qrBf-G7SQbQ`#Lw94WVe(o`qg+f4hy;Qju)q#I(9{`% zQmAGomzhQ!b|gq>KqL@IkO~$=Koi}a$u6d07kiS}NoYVMJjAeZpaB*;wwcDdEbK@K zNP;B7RzhQ|H9AlUO<`J>m1(5R)Pb-iLBb@7Jp)}LHdAb-VVgYxVoTzGoqu{~a>6uj zeqCRFI9pC#h09bGwy9;oHcp6(RB%jeY^F=Ll!S+9JkVe4nDG7tJMQiP0000^~*-1fljz_B$LUvK}k?BNXe#Y!m=zM!!V#}8bncK5m;8VP zw86G*RI63?Cd%b9bX|ueNlZ|wR6rj|r_)VIP@r2imh3?SN+^{|kY%~8B{maJ@F*OK z&VH9LwOeGt#DRjj0~v~8`>iO7!Ybi;zE$va`A^T#yW`y44;k^#O~K5*jD=qcUhPSc zvyy~q;5H_1WT1l~cqje9yfa+l!hu6xjdOJ8s;8E^+=QQ$tw p?%p!Hy#YapB=@+^9(46X{{RQg%9y;OKjr`c002ovPDHLkV1g7l326WT literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/css.png b/debug-db/src/main/assets/images/css.png new file mode 100644 index 0000000000000000000000000000000000000000..f907e44b3330e3ed1763e42746a2943234adb94d GIT binary patch literal 618 zcmV-w0+s!VP)Z@gK0z$EtPV#+`^OH`R@cE-cuE&_!D)SZGxmQxeobP_Zwq zMEgi6ePN45N`|V1so0uE8^}1xw8s;VM%Ai@7} z2-&Cyvez_-O4?6uv{zTaj|YeYEk34i~K@`8YW2g{x* zc;7z3lItpVy_et{Z-ZZ)<@*%{l7Ao8mu@V7*gz<_1##mwW*%LEwCdzNsVLYx2*T-J z#HeQ*_a=R~KDdVNk$EVgAIRl$oQi_(`_IrdJciDpH|Xe{K-YsMtc!cRnFi$qzsr4z z5*$;ecov%3->1{YNy6-Gf(Ecy&_I$CjI#laeuE+S120^|Vjsf)W&i*H07*qoM6N<$ Ef)^>s`J(VpX#y^kqzQ;#=2x({YMw9Q&ndHT&`BD$#%Ql?{+)-OuSA`r}MWJ zVg+2Gc(GW}a=BERPNy^;kEz$|38dTYlFQ{%5S!g@|8f8D_!Nu9_Ni2glF1}xG8xi! zorc39&F6EPOeWOt_XS`W2H_Bo$MXugy}SEctJQj=(TLXTHL(jRXfzs>NF=0SHk;94 zF!&HjdZNX(3U3;LY64IMX__Xv%_wjLC!J2`0Jw?X=zPK$C$`&dYPDKaC={e16bcE@ zgun^<0k;ak*=xLE)@(Lqu~MmsFoMCLY&0Qog`NO(h@kyxaA%EbwJLy8sU*Vi`~52K zX0wrqW;_LmMq@evX4iAM9Od(Q0eHP$1%L|xAh@vrqB`HPQLon}f3aAka=9!3hr=O- z5F9`#J_7Jhah=U(4RjaRhkS4Xkk98kDz-`i!r|~~AQ1TFcDw(@<8g{aBE)l)PNxNE zI(RPyc>9e{@WGSMU%i7*v{!&P$WLz25)0oc=Dl-yy%xYZAm4b-rttL7UjR#%`#j_F R;_mx(K@^6+>g^d@v4;gkbWsEoXE%32*i1tcpTNXd5CcIl)ECgqz|2rE6EW}s7R?kl za1q`0GCkMruC6-2LANtwVlsgzsp4?{@7$`KBv!G66>Vie3h?3OmEEkjwdLG0PgLVi z`!N((f$A@n17Ldj#`};0I3@iHJ5M{#IZz|UIYRm4(!uV7eYIYIwQf&}_2J~}>pQ^n z6o8--^T(=hkBNQ_k{-_GWE;FMW7!p}f{NG3nHZ{D5<3d8&tLh%a4AqqnjMkr3m&fkMdECD3N5}Unig5wy40;>lo4j~k+e}v)` zR6)J8Mk*u=SpB`p6o)7j?S0T@9?bz#m@l>gc*zk__|*!FMcHwP!gwLJvS~9c0px8E zWhkjP zNW|QGv-YFNLN^qH@tJycPNG5ti6B7;r4mEr#lr@*T8*M85D`{ZR^BWwF23T<%MYIh zdC)S*p=|xk^!~H=+HSZ183~y8v4|mYmZxt&)5{{~>J`>E223Q5>T$=~mtA71q-jdG z+eJhOAyBW^0k9Gk1+rX8)zFx((CG^&tDY>6XaS~Fy!WJON|Gdujg5^~Vzt@o%BcYLiNiTQSD`zL^ociBz_>bDlpw3kriQ@Z`bVsGz-_6N>$&gTDiKDTKR^ z-hB*tHa^>!oD~5TK^0UK5rZ}RBm50Bv}S-yA%s=Ha5RYb{)!z2N&$&64gfhybBu8p lh~_|?8^bu;BRYt{<}Yrwd83Y=s?Goa002ovPDHLkV1l%3CP4rI literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/file.png b/debug-db/src/main/assets/images/file.png new file mode 100644 index 0000000000000000000000000000000000000000..8b8b1ca0000bc8fa8d0379926736029f8fabe364 GIT binary patch literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-&H;pyTSqH(@-Vl>|&1p(LP>kg~E zYiz5X^`c$+%8#zC{u)yfe-5 zmgid={Z3k(ERKCKrE7DF;=x4^O+ pzO8rLO8p|Ip=x)jHOtWj`bJBmKdh_V<`47(gQu&X%Q~loCIFbEay|e6 literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/film.png b/debug-db/src/main/assets/images/film.png new file mode 100644 index 0000000000000000000000000000000000000000..b0ce7bb198a3b268bd634d2b26e9b710f3797d37 GIT binary patch literal 653 zcmV;80&@L{P)WO3(`_cf+b25@DJ#zdQm}8GzWtq2-QnZ8W6mB^kfeK5f%S{ zUW%tGMCwrwic~ZrQcG=4f?5bkV+3dRk8hw6bk~y$KX#b!y*J4EJ~>;dRASqrSu;ZpM>?P}K~6AT zWv6Dmq?v&9LdXC(m%WCO6ma_di$R(v$@ad_>@R41N3N5lSJq9@6CGhX84-$%Xrd_6 z;){?{E|Ytt5$S-&Au>t4wDlIxdkfe-a22LMj``McG};r8@{GsRPm*+8fFey6C)@ifDBXVyTw(N@Xd41b45OFg6x_QA zpwLiigyy~cVoPxW^r~C7ZQpr%>1$*HKmv~AY-qJw4;gUecS--wnqslISSS=^KA&Ic n@BK|Onfz#3R%n{$a)0j^sqv5F(1NTL00000NkvXXu0mjf3S}fX literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/flash.png b/debug-db/src/main/assets/images/flash.png new file mode 100644 index 0000000000000000000000000000000000000000..5769120b1b6d38019b505c9167498ea199212cc1 GIT binary patch literal 582 zcmV-M0=fN(P)OL3{+!MJa`3kv~Q#QfQ%c z)1s}QE<_XaYBG;IuRF=td#+}fi4h(6HgoUyJLi0t(*dA^B)%@8kkG&bdM5P5^Z5WF z%d%>m^SbN0XeV)wbUOXn5Ag#A$gJx+7-OCkMM1S%MWIlTkbFLmOeW(&n&wUd&;`>p zVcRy$Z{K0=?SpNnP^;BYEEXleFbq(UY&LrXX$6qkJ~)8+b{=jj3HEXds;Z(?D%}}L zX3`39&dy=Zyar!ehA}e>w)(*vrCct{PI9^2Jpj&OZS8<3-@{0(gNv%1{)zAiLY+_^ zl}e>Ofd4&#Irj#7>=o=Uhv5IJ@?sN0^J|(WL2Uun$4}si6}TG-s3T#p&6GE<<2W)O zf{^Y2HlO#*QDvTp3v&d@;8*}aUC4lisG9(w7@d5Y8y)}U#FwCkqp*Mcgme4{&gGRf zlBfd`nF9cQBKB2_L{F8G2)7pAf$i)Ds`|}-c>pc^LRW{w4SQ)3N^BbZx)6BlCZts! zKph%`(m#xg-q3I7=(us;9<)*2%iuQ1J`oV3gU6V~T}^JU5714JN33&GwEEru0d}Uo U{MPL+lmGw#07*qoM6N<$f^vibe*gdg literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/folder_open.png b/debug-db/src/main/assets/images/folder_open.png new file mode 100644 index 0000000000000000000000000000000000000000..4e3548352fc4a82e91ebc7e79907565e40aae457 GIT binary patch literal 583 zcmV-N0=WH&P)tH$n+Bzw$Yklv;`N=nc;V( z;&KN-35T@gWRBGYeR_y$`8BZn{9n>tC)YRdy9cbn)8Q%P55|`*)XQ7AP<#e&a6A$G zs{)EE$ezXf)f=5ALOICxp0jR!e;wEEZgZGsRUZ-h>_^9-(AanOoA53^Oy2?&k5kk} z?afPEzOxMFZ*s5?tr|9&QDTtD0JKnEUBuwz(q0E3;No;>T`j*QjDE}-H4^67sukD9 z^-tZq)fps7^kHQIm*y8axDHaac(>L_z>J-M4kBj1UrI?JsT;`QylT2EJnsJT{hN;C#tgf#9krG=I>5!<*aE1_(spcgF}<`n4i zJi-}^6UUeU4jUFwdCiVPDm%`Zx^UBa8J(mnR6wEgz^}o8;)M*Y(@l_!Kfv)}4+NuM zaPXE50z)r)9=D=SR|RIqfQ^j}Hu!fzMeQBo+@PZk1G8hOw|vBTvkx`HM)Xe9q3xao z@`p0`NO!2904FHSLA6E@Y-O6zH$DQzvq@aHsz}}<(!v(Z_+EodX%R&NZW75g+nENo zV0020rxE^;7d!067AN>6*+&YLp$9uH6F-=In`XC{Cn%+o|5)b&boEPr02w@|P*oGm QmjD0&07*qoM6N<$g78X0Q~&?~ literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/java.png b/debug-db/src/main/assets/images/java.png new file mode 100644 index 0000000000000000000000000000000000000000..b7bfcd15fb2f7ce658185bd7ef4729815e2f18b9 GIT binary patch literal 633 zcmV-<0*3vGP)DAD_Iw@kR+3LLZX?3 zyhGkEvUzKYKpu0v_u>?yY~y}#nAbh$p6}dm6adQqK)FzXa=E-qP)ntfS|}9Md_I4Y z%jHh8*{qt$WYlyzt)^0`-M<7XmC7CwTlIP!6`0meW$j(o%*9*fiupyDJZx7&n@&K>z*>QCDhTzTp zTlnzwp?s_A3C!nn*-|JJ`k^?T&hB6^z;e07X0ws&YPAxuvwwlMjasdSU@%xy91e#I zzZYAh^udB=a16G~?^>-EC_Ew4q~Q1a4;7oucH0!-LK+*Y)he3JCK`a7P}Mc?vlj7AM;VkzMEhOwnj`hl1MBj6s4Nlz_+^kH@of;eX>V_G&2` Tt35or00000NkvXXu0mjf&s-qj literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/linux.png b/debug-db/src/main/assets/images/linux.png new file mode 100644 index 0000000000000000000000000000000000000000..52699bfee0ce434356c6a9576f32fb6633b01866 GIT binary patch literal 668 zcmV;N0%QG&P)Q{U6)pC|tRy7$(5JQ<@7eB8yk=XcNf-aBIe#;8c_B$^=N z{-Iq&o3%O}V4~G($=zcP(LI|+6dq{?rby~MXwJQ*=!bOvl%?k zYY;jP^@M_k03MHL+-9?_3W5MN=moFW3xmPHU=-4Bw;62MrIhg_lwHEsv)V9U4x>+9cG2kIz8fWo`WyMMfz zdg-)p!<(hFR{VYSDJHEJn09O@#)%q0l?GUg9eS2~vKPUtd+=ak5lWLd-jI=;cjEf# zt$1;~?G!t@s+VLwL=P+Ks;E z!Jkh#NeohG;&02OFD7^EYklCE>?a@fNhGaV ftv%qM$TQzJ6;XjO8erVL00000NkvXXu0mjfw}q7O literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/pdf.png b/debug-db/src/main/assets/images/pdf.png new file mode 100644 index 0000000000000000000000000000000000000000..8f8095e46fa4965700afe1f9d065d8a37b101676 GIT binary patch literal 591 zcmV-V0~O9lw>B8WRlD)Gm}Jrz31u-X&&gn2lvjs=i{7nIaL6v2==uw+8Lcs(8j27 z;|c`rmSv@Lx!heopGP^^Ieb3f=R!%Lpp$}iMS-&P3EJ)s48wrJ_Ni0~k|c47D2nj= z{jS6bt|kFpFf|p5cM`_&0Zh|`rfEp0(}=}lT#(6RpzAsUfxv^LSYX>WlAaN$>)*J5 z0#sE+JRUD8iT9*fz{)_^7@6P&!sEjTcD+I9Z4YjT1`wH@fV{cEvneYGFU%maIEU2s55&K(LixD|{p-uiS@?KNj zk-Go8G$hH6g002ovPDHLkV1hVj1#|!a literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/php.png b/debug-db/src/main/assets/images/php.png new file mode 100644 index 0000000000000000000000000000000000000000..7868a25945cd5e5cb7daaca9591927511ca65c0f GIT binary patch literal 538 zcmV+#0_FXQP)vYep8SaFV10Q$h+;hIUPX_=v5b}%>Tm<(&j1&5;I!55C)oN0s(P%ZB zP3Q#ahfpXKWF@S?jm4U#fv)QovMhrriclyNs6-G12#3R##4PSZ0VY(dRWJ;Lwuq{# zAW0Gwi$yA^R4RZ!;W+L`f&%x{=D^VK#BBWL4Ys{;*!A7Q;!=dN<&D8*GzGaF4`hV4 zDbY0{NrMX>ZqF=0((gR5-zL$kC*b)!fwu{Euru|XrG<$^n#@)7i_>rCmRxnDq>$Y%gJaCkRd|tE*a2x05Pe!I^e13o69#&RQZ36s0 zB=O|K2Yi(jsMqThn}9t?f5E-)L^naZ+db$&%M$!bCdm=jv7?t_lB?3&%Ltq(>ESw? c;MI421LCcoDG!2@;{X5v07*qoM6N<$f`UZt7XSbN literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/picture.png b/debug-db/src/main/assets/images/picture.png new file mode 100644 index 0000000000000000000000000000000000000000..4a158fef7e0da8fd19525f574f2c4966443866cf GIT binary patch literal 606 zcmV-k0-^nhP)Q2rnAt>LM%-F zK|rtwgcU)}7x~z1Hrcs5bH*ZO$!>xO8K#?==bZPQ_ecnV>#P`H`QzGaRhd62G_&rC zTLU$c7_x*nFP_dW#Q+*);mMHE?j)HexK784D4x9l_tfpz2$@1y}9rkF+ zI+J5NMWeZyObc!d+rUc=>D+uOdAOg#%+Ej6h+wn5^xPmVVH*Eu446Y0A_@ zo$rlds-+sL10DbHU2HvUSp%6 z*n}iP63IK?dpo;h@sj9~pcxo;VVTc-XLiP@DgefqE#NE=@oyUd-&HjLpsLIuSFXV-EMck)oQ(A`s%*^&wf0(rNiNHsU%=0Rw;WC z(kbc37l6fo`-0uR!pYkYv8U^3?nsh^@pw!K0TH3uYyx1_2>|JbXPmfskJ|1YAw9w! z9`N)1^Aesr;y5Nr5-ODn)oOL|CGi}f9!&iVwpK$khlIX10X$H6^A_stBJqvLhU$?V`QXqKme*s~gVDJ4A;LTs_e15jhc1;By a82kqHEPVYFAD2!500006nP)PbXFR5;6x zQ`<|^Q5@e>|3Fq06ckj13SKAzrBX7=2LmNa=VjAGbC_kBmo!b(h0(lh&dtlb&FNfD zmuquN(K1t)x?D|-M01+g{cLIqvEiq)K|Q2K51*IA`CQKDe7`gRw4E?o66yPi8&Nn? z6l%~H1nUQ%T@&i^1O5KKw~aW)k2+%HG368DWXx)cVb)1u?vucz;=oXT3q3jhU%Im| z1?(s=#*a)g@)(;l>H@5fX<;>n14d_9M|`nnP-6AN3z#%q4DzF(Nk5nWM_|14<{lEc zYPuy4KilYl*ag-mA8dVe2Tbuq#03kAEX>O@@Lksg>YW6tl(V+B2dCW}0wgkfx|Qv4 z-D>azy5k)pmaZ6BhrO`cMMsS?2x;x!C{kX=N`E6pB`Ii0bgLj_hNq!8%(hX_#U?!j zKiGk=Hh5$0c^KwfGl^?D=47dOtiAw2KNAm$$b9o7%%}<>OK>*QNXr%9w1k|LfQ{U2 zSbTi2+))I}Pzx-B&9LZXSZvF~o2CeGlzvc4uVc3ME*4%1(7-xD(S|uUCaD1_sK#7S ztY9n_un1WWgXlK28Rs!v7K;_~=D2b`P734*5Qt!^h`~~a5OuM~Hfisl25mar^a_}} zg_v*2Bt^;WEyLcAGWiUsw{`FkNI_Ti5|L(1@j^*TA*!PfgVy)tDpxOv#%F0dOfNa0 zdc|1jYs3&aBQ0Zq#{l)Z8sgGaTq&(WaY+Uil^l#q(oh+BaNO|=WH5X?GktSNWOaL* z*ZNp}GN_(f2a)O)VOE@kDJ~t8MZuVBOvi$ni}tLGC}Zpk**1wJva900hs{igrph=+ z+^OPVd@W&MNyEpqoQ;kge+VO-3U?f3JDTsf%0@_u%bjJIsY%3=wv>=dpyM%#>wcRc z+$m+(U9dwMf67h5I&QPOO-M5_z-8e1J$HL#g&=&d>pz$2H|k=JCX$xdMNxZS(e|#C2>JN4>y}l*tQ*E7zP@R2CCJnkW?xa6bgk%(hgtZ z0=~d?U3i`+Mvi4!&~+WPT1^NX#{u6&QIx+DE(oR{&T5&-ovF?@wGw)P&AtpHZa|G%V*GUUqL@@!d4V$`8=##4)ytY959JG zdc&Kho)&AL70^i z!PEmeeDWCB-UbK(*4JST44^tV2z_J(dn~+vBMJT97_7rzFio=~XczIv?PQ5$v%u~y zu(bteXb5I1h2zCV{Jc2~V{{yzZipgsP6;k264$*#5q?GzCm|CPa9CKqm4b116h3Pu z?+%Cm52plC8|5P0@igf2GV1KkCfk{Zecu=G@VNrf>s%g9c5D%@cfxVb6$nY`1IW=4 zt10QqSps_2JLp0f3I0j0u>#qA;v!+T))KEbCg|mo3q0pG{OR}p0fPds8+K~d>Hq)$ M07*qoM6N<$g1S2e3jhEB literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/script.png b/debug-db/src/main/assets/images/script.png new file mode 100644 index 0000000000000000000000000000000000000000..63fe6ceff5bfcedb9670279d4bb8d25807f6ecee GIT binary patch literal 859 zcmV-h1El5>jf6w4x#gTU%_MMNlkNp$oSbvBp&uHw9M;u0-4@=t5BI zP6Hx#-C_{5RMJ z0_P+Xkumexn8%)S+Y)#l(gR;YJP<6#1-=jjK0LONWPdJQIR8uK1HpvVIxBIQ2ztt+ zqoEx_X9S%QGMe=~(k#sebCL-an)%CR%a7YtUOQUgv+G>~?N~XSWhx=? z@$fx}0MB;$`JWcQ-Re{XV~5|{DvU(#*+NF*g)j^qk#b~G9_O!i*y&mZVZ=a3;Go(K z`DkskYn56Nhu+k@1Ke*uY|x zI&k6j$JfNe_a{GH%=n2rZOz$Z8R9V?Pe36hIk}jo+A-`;dt9vyvBu#Xm@veu&@v`| zzt%mwc_$nd0-sMVx2d)b0!MqGxmfCumx7yB#nIUWvA{!HOMfslMyW1iV&nY>zxwyj z8^JfLN|kT z4m^Q1mhO(_r4w@`V?H=YNkOf(i&bHT3Auc3bryK1_{hDSetLoLN{VLB^78ULiNFy^ zkUqqG$fjVkJj5tfWkOn|P5`HVEp5@-mGnc0wvJGHC=+39MC2TWT#i?t*~fNch*he_ zgtS^8dH$(KlW)EF1b4Fzv~?&0IQaNdg;W5&{t&Bmg9&N1-rBBr_;Rg8ekw^mn;@T# zlS{|Rq+-Nlg18i%UY;i|q1NnSwf>I@85#4U4002ovPDHLkV1mEDi4_0< literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/spinner.gif b/debug-db/src/main/assets/images/spinner.gif new file mode 100644 index 0000000000000000000000000000000000000000..85b99d46b9911ba53a792d716d9f688f3bb3c784 GIT binary patch literal 2530 zcmb8xdrVVT90%}oAH9#>bK6p?cF>G=h0@JhTLdf!(gIdN1QeV+L;)2XD9^zNN@xod zwcvQjRvj8}y3J)yFv=3A2@i*l5Fc|hs2f3R;^QAN{$aL%*eO}IEP(~izxV$0$@lmB zp0hT=YKq8{00}@xHO(cjNl%Njq^=3k8whNA8mRstISPn@&imc_Tf_3@%d4xaj~qF2 z`t<3uXU|@|c=5`WE2E>Mw{G3KfB*i(#Kf~_&tAQH_4e)C>6t?woVxLBCtLOMhuB(t zGPLP@xf$T%5Zyz3iOuKI^?SO*zNFJ?wrL@=YKNznIpw!L(PPjKYQ7%}eBCama_c91pIJ1~(b1Kal`fZSz8V+OJY|r^QHxE6+WMoDB(^~{XdW=!#+uo_ zaF>U{k0Hho~yN%NrSyV`soxiBvd>cj#}5&$KDA)3{S^?ffCPkeDi5Vo>T8sy}Wj_Hf}N$J0Hz& zv|)_<-f+~-Hi-jgzIkG5vY*T|>7-8J0U*@$d8~ScFqA)f4R7yaDBs3j(<2>@V?*ZD zy6{Vy+~KLc_m5He=9(fsy~0c&4a-*{&i)i(02j`@8?In8dBM!Y(Znu4jtn@VMj|y5 zrTNa5ki}vtEiGN(#07>Rk#HaVI5ZB4@@yk%765mBN(yieTXgm{oK}vXn!h0oZG3gj;>>W?MbZnG6Q_cX~h&<^+R)8g9 zSd!4lZEm4K#ma0{aTpMHv%wr`1VF@rrKl5H7Hyn$;=;nh3JVMEcKbqhXnqO(3z}-# zu=v1OV7q%OY`*dVI>Y}97i4s2yl$S zmSto?fO|=u8h;vSPKY2zqaEs;LlhJgv~%aqwzjtUie_4FUNiT>r-& zOO#{4cBb6f^ zov;AUp?UAne>@_GHz5+(221Xlve$OHK)tvvi!~l<%)zr4PhU@ z(CY^us$O5!${6Pje5gy?*WtA2j>{<;$_PvVQNKa&69IX)a|Fw5>C&=WQ6s37gabVh SjHs`-`=fdj^ILtus=om5Wbpz3 literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/txt.png b/debug-db/src/main/assets/images/txt.png new file mode 100644 index 0000000000000000000000000000000000000000..813f712f726c935f9adf8d2f2dd0d7683791ef11 GIT binary patch literal 342 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-%6;pyTSA|c6o&@eC9QG)Hj&ExYL zO&oVL^)+cM^qd@ApywS>pwx0H@RDN}hq;7mU-SKczYQ-hnrr=;iDAQMZQ+*g=YOM= z!QlMQEn7FbaD->uKAYgo_j9)W&$$zS*W9}m(ey0q$&7l-XEWO0Y(9M=SnhLbwy;d>@~SY$Ku*0xPvIOQeV1x7u_z-2-X>_74(yfh7C znXL|3GZ+d2`3re2hs?MK^@R5;6x zlTS!gQ5431_q{u#M2 zg&W%y6a}>qj1Z|7Vu&-DW6d~k-n;jnHsjb-q#u0C^W!_5^C=MlKq<8oNCQ6qS00!X z5eI;XP=g!^f}j{hku}E1zZ?XCjE;`p19k(Rh%^AQQ54xysU+ocx$c#f61Z4HnT#3u~FR(3>BnZniMIF4DouI8Hi4u>cAK%EN)5PO(ip3(% zIgBx+QYirR){Z8QwV$9Z(Mpt=L-Or3#bf-G@66}txq0yc*T(zNTBDT0T8rO^JeNbSI-Tzf5!pBioy4NwAN^?iN#{;fH1Jke4Xa`^fR8m z%h6dq%xX)S?7`zae))(Xst^Scp6B8FejQW?RLTM8@0=vnnntuRGBM2dpo>gbCnTD= z^<;=JuqdSf@O>Z8^XdR?s+KEfhDdB_#ahFj^giCtzT(s8kA$AViyTqaAR;KGaLzUU z<=GqA4bRwpX|IG~*x>pZ!@zLr`XQ`od>m(`;jz|M_*1GDO#$7;n74ppb8=eiqh760 x0yt}J1#p`gw$`o!R{d7zU9~!Un@nJV{4bstt4Au+Up@c;002ovPDHLkV1kWhGjjj{ literal 0 HcmV?d00001 diff --git a/debug-db/src/main/assets/images/zip.png b/debug-db/src/main/assets/images/zip.png new file mode 100644 index 0000000000000000000000000000000000000000..fd4bbccdf1643f4ff5022fbc59b82546e259317e GIT binary patch literal 386 zcmV-|0e$|7P)_QM!1S$Bhw4w+iRuFWf;tfR6D%SMJrb+tx zC9R6{2>Ou6#juIy6u(I?|;&Owi$sRB4^20apB5xE2 z#B9XekY66S6lzfCL!eEQRgo0LokTA55@Y#%_wN!T Android Debug Database + @@ -32,6 +33,8 @@ + + @@ -39,7 +42,7 @@ - + @@ -156,6 +159,27 @@
Data Updated Successfully
+ +
+ +
+
+
Filesystem
+
+
+
+
+
+ +
+
+
Data
+
+
+
+
+
+ diff --git a/debug-db/src/main/assets/jquery.easing.js b/debug-db/src/main/assets/jquery.easing.js new file mode 100644 index 0000000..9e4c736 --- /dev/null +++ b/debug-db/src/main/assets/jquery.easing.js @@ -0,0 +1,146 @@ +/* + * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ + * + * Uses the built In easIng capabilities added In jQuery 1.1 + * to offer multiple easIng options + * + * Copyright (c) 2007 George Smith + * Licensed under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + */ + +// t: current time, b: begInnIng value, c: change In value, d: duration +jQuery.easing['jswing'] = jQuery.easing['swing']; + +jQuery.extend( jQuery.easing, +{ + def: 'easeOutQuad', + swing: function (x, t, b, c, d) { + //alert(jQuery.easing.default); + return jQuery.easing[jQuery.easing.def](x, t, b, c, d); + }, + easeInQuad: function (x, t, b, c, d) { + return c*(t/=d)*t + b; + }, + easeOutQuad: function (x, t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + easeInOutQuad: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t + b; + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + easeInCubic: function (x, t, b, c, d) { + return c*(t/=d)*t*t + b; + }, + easeOutCubic: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; + }, + easeInOutCubic: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t + b; + return c/2*((t-=2)*t*t + 2) + b; + }, + easeInQuart: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + easeOutQuart: function (x, t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + easeInOutQuart: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t + b; + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + easeInQuint: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t*t + b; + }, + easeOutQuint: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t*t*t + 1) + b; + }, + easeInOutQuint: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; + return c/2*((t-=2)*t*t*t*t + 2) + b; + }, + easeInSine: function (x, t, b, c, d) { + return -c * Math.cos(t/d * (Math.PI/2)) + c + b; + }, + easeOutSine: function (x, t, b, c, d) { + return c * Math.sin(t/d * (Math.PI/2)) + b; + }, + easeInOutSine: function (x, t, b, c, d) { + return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; + }, + easeInExpo: function (x, t, b, c, d) { + return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; + }, + easeOutExpo: function (x, t, b, c, d) { + return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; + }, + easeInOutExpo: function (x, t, b, c, d) { + if (t==0) return b; + if (t==d) return b+c; + if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; + return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; + }, + easeInCirc: function (x, t, b, c, d) { + return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; + }, + easeOutCirc: function (x, t, b, c, d) { + return c * Math.sqrt(1 - (t=t/d-1)*t) + b; + }, + easeInOutCirc: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; + return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; + }, + easeInElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + easeOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + easeInOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + easeInBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + easeOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + easeInOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + easeInBounce: function (x, t, b, c, d) { + return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; + }, + easeOutBounce: function (x, t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } + }, + easeInOutBounce: function (x, t, b, c, d) { + if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; + return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; + } +}); \ No newline at end of file diff --git a/debug-db/src/main/assets/jqueryFileTree.css b/debug-db/src/main/assets/jqueryFileTree.css new file mode 100644 index 0000000..b1d887a --- /dev/null +++ b/debug-db/src/main/assets/jqueryFileTree.css @@ -0,0 +1,91 @@ +UL.jqueryFileTree { + font-family: Verdana, sans-serif; + font-size: 11px; + line-height: 18px; + padding: 0px; + margin: 0px; +} + +UL.jqueryFileTree LI { + list-style: none; + padding: 0px; + padding-left: 20px; + margin: 0px; + white-space: nowrap; +} + +UL.jqueryFileTree A { + color: #333; + text-decoration: none; + display: block; + padding: 0px 2px; +} + +UL.jqueryFileTree A:hover { + background: #BDF; +} + +/* Core Styles */ +.jqueryFileTree LI.directory { background: url(images/directory.png) left top no-repeat; } +.jqueryFileTree LI.expanded { background: url(images/folder_open.png) left top no-repeat; } +.jqueryFileTree LI.file { background: url(images/file.png) left top no-repeat; } +.jqueryFileTree LI.wait { background: url(images/spinner.gif) left top no-repeat; } +/* File Extensions*/ +.jqueryFileTree LI.ext_3gp { background: url(images/film.png) left top no-repeat; } +.jqueryFileTree LI.ext_afp { background: url(images/code.png) left top no-repeat; } +.jqueryFileTree LI.ext_afpa { background: url(images/code.png) left top no-repeat; } +.jqueryFileTree LI.ext_asp { background: url(images/code.png) left top no-repeat; } +.jqueryFileTree LI.ext_aspx { background: url(images/code.png) left top no-repeat; } +.jqueryFileTree LI.ext_avi { background: url(images/film.png) left top no-repeat; } +.jqueryFileTree LI.ext_bat { background: url(images/application.png) left top no-repeat; } +.jqueryFileTree LI.ext_bmp { background: url(images/picture.png) left top no-repeat; } +.jqueryFileTree LI.ext_c { background: url(images/code.png) left top no-repeat; } +.jqueryFileTree LI.ext_cfm { background: url(images/code.png) left top no-repeat; } +.jqueryFileTree LI.ext_cgi { background: url(images/code.png) left top no-repeat; } +.jqueryFileTree LI.ext_com { background: url(images/application.png) left top no-repeat; } +.jqueryFileTree LI.ext_cpp { background: url(images/code.png) left top no-repeat; } +.jqueryFileTree LI.ext_css { background: url(images/css.png) left top no-repeat; } +.jqueryFileTree LI.ext_doc { background: url(images/doc.png) left top no-repeat; } +.jqueryFileTree LI.ext_exe { background: url(images/application.png) left top no-repeat; } +.jqueryFileTree LI.ext_gif { background: url(images/picture.png) left top no-repeat; } +.jqueryFileTree LI.ext_fla { background: url(images/flash.png) left top no-repeat; } +.jqueryFileTree LI.ext_h { background: url(images/code.png) left top no-repeat; } +.jqueryFileTree LI.ext_htm { background: url(images/html.png) left top no-repeat; } +.jqueryFileTree LI.ext_html { background: url(images/html.png) left top no-repeat; } +.jqueryFileTree LI.ext_jar { background: url(images/java.png) left top no-repeat; } +.jqueryFileTree LI.ext_jpg { background: url(images/picture.png) left top no-repeat; } +.jqueryFileTree LI.ext_jpeg { background: url(images/picture.png) left top no-repeat; } +.jqueryFileTree LI.ext_js { background: url(images/script.png) left top no-repeat; } +.jqueryFileTree LI.ext_lasso { background: url(images/code.png) left top no-repeat; } +.jqueryFileTree LI.ext_log { background: url(images/txt.png) left top no-repeat; } +.jqueryFileTree LI.ext_m4p { background: url(images/music.png) left top no-repeat; } +.jqueryFileTree LI.ext_mov { background: url(images/film.png) left top no-repeat; } +.jqueryFileTree LI.ext_mp3 { background: url(images/music.png) left top no-repeat; } +.jqueryFileTree LI.ext_mp4 { background: url(images/film.png) left top no-repeat; } +.jqueryFileTree LI.ext_mpg { background: url(images/film.png) left top no-repeat; } +.jqueryFileTree LI.ext_mpeg { background: url(images/film.png) left top no-repeat; } +.jqueryFileTree LI.ext_ogg { background: url(images/music.png) left top no-repeat; } +.jqueryFileTree LI.ext_pcx { background: url(images/picture.png) left top no-repeat; } +.jqueryFileTree LI.ext_pdf { background: url(images/pdf.png) left top no-repeat; } +.jqueryFileTree LI.ext_php { background: url(images/php.png) left top no-repeat; } +.jqueryFileTree LI.ext_png { background: url(images/picture.png) left top no-repeat; } +.jqueryFileTree LI.ext_ppt { background: url(images/ppt.png) left top no-repeat; } +.jqueryFileTree LI.ext_psd { background: url(images/psd.png) left top no-repeat; } +.jqueryFileTree LI.ext_pl { background: url(images/script.png) left top no-repeat; } +.jqueryFileTree LI.ext_py { background: url(images/script.png) left top no-repeat; } +.jqueryFileTree LI.ext_rb { background: url(images/ruby.png) left top no-repeat; } +.jqueryFileTree LI.ext_rbx { background: url(images/ruby.png) left top no-repeat; } +.jqueryFileTree LI.ext_rhtml { background: url(images/ruby.png) left top no-repeat; } +.jqueryFileTree LI.ext_rpm { background: url(images/linux.png) left top no-repeat; } +.jqueryFileTree LI.ext_ruby { background: url(images/ruby.png) left top no-repeat; } +.jqueryFileTree LI.ext_sql { background: url(images/db.png) left top no-repeat; } +.jqueryFileTree LI.ext_swf { background: url(images/flash.png) left top no-repeat; } +.jqueryFileTree LI.ext_tif { background: url(images/picture.png) left top no-repeat; } +.jqueryFileTree LI.ext_tiff { background: url(images/picture.png) left top no-repeat; } +.jqueryFileTree LI.ext_txt { background: url(images/txt.png) left top no-repeat; } +.jqueryFileTree LI.ext_vb { background: url(images/code.png) left top no-repeat; } +.jqueryFileTree LI.ext_wav { background: url(images/music.png) left top no-repeat; } +.jqueryFileTree LI.ext_wmv { background: url(images/film.png) left top no-repeat; } +.jqueryFileTree LI.ext_xls { background: url(images/xls.png) left top no-repeat; } +.jqueryFileTree LI.ext_xml { background: url(images/code.png) left top no-repeat; } +.jqueryFileTree LI.ext_zip { background: url(images/zip.png) left top no-repeat; } \ No newline at end of file diff --git a/debug-db/src/main/assets/jqueryFileTree.js b/debug-db/src/main/assets/jqueryFileTree.js new file mode 100644 index 0000000..4870467 --- /dev/null +++ b/debug-db/src/main/assets/jqueryFileTree.js @@ -0,0 +1,95 @@ +// jQuery File Tree Plugin +// +// Version 1.01 +// +// Cory S.N. LaViska +// A Beautiful Site (http://abeautifulsite.net/) +// 24 March 2008 +// +// Visit http://abeautifulsite.net/notebook.php?article=58 for more information +// +// Usage: $('.fileTreeDemo').fileTree( options, callback ) +// +// Options: root - root folder to display; default = / +// script - location of the serverside AJAX file to use; default = jqueryFileTree.php +// folderEvent - event to trigger expand/collapse; default = click +// expandSpeed - default = 500 (ms); use -1 for no animation +// collapseSpeed - default = 500 (ms); use -1 for no animation +// expandEasing - easing function to use on expand (optional) +// collapseEasing - easing function to use on collapse (optional) +// multiFolder - whether or not to limit the browser to one subfolder at a time +// loadMessage - Message to display while initial tree loads (can be HTML) +// +// History: +// +// 1.01 - updated to work with foreign characters in directory/file names (12 April 2008) +// 1.00 - released (24 March 2008) +// +// TERMS OF USE +// +// This plugin is dual-licensed under the GNU General Public License and the MIT License and +// is copyright 2008 A Beautiful Site, LLC. +// +if(jQuery) (function($){ + + $.extend($.fn, { + fileTree: function(o, h) { + // Defaults + if( !o ) var o = {}; + if( o.root == undefined ) o.root = '/'; + if( o.script == undefined ) o.script = 'jqueryFileTree.php'; + if( o.folderEvent == undefined ) o.folderEvent = 'click'; + if( o.expandSpeed == undefined ) o.expandSpeed= 500; + if( o.collapseSpeed == undefined ) o.collapseSpeed= 500; + if( o.expandEasing == undefined ) o.expandEasing = null; + if( o.collapseEasing == undefined ) o.collapseEasing = null; + if( o.multiFolder == undefined ) o.multiFolder = true; + if( o.loadMessage == undefined ) o.loadMessage = 'Loading...'; + + $(this).each( function() { + + function showTree(c, t) { + $(c).addClass('wait'); + $(".jqueryFileTree.start").remove(); + $.post(o.script, { dir: t }, function(data) { + $(c).find('.start').html(''); + $(c).removeClass('wait').append(data); + if( o.root == t ) $(c).find('UL:hidden').show(); else $(c).find('UL:hidden').slideDown({ duration: o.expandSpeed, easing: o.expandEasing }); + bindTree(c); + }); + } + + function bindTree(t) { + $(t).find('LI A').bind(o.folderEvent, function() { + if( $(this).parent().hasClass('directory') ) { + if( $(this).parent().hasClass('collapsed') ) { + // Expand + if( !o.multiFolder ) { + $(this).parent().parent().find('UL').slideUp({ duration: o.collapseSpeed, easing: o.collapseEasing }); + $(this).parent().parent().find('LI.directory').removeClass('expanded').addClass('collapsed'); + } + $(this).parent().find('UL').remove(); // cleanup + showTree( $(this).parent(), escape($(this).attr('rel').match( /.*\// )) ); + $(this).parent().removeClass('collapsed').addClass('expanded'); + } else { + // Collapse + $(this).parent().find('UL').slideUp({ duration: o.collapseSpeed, easing: o.collapseEasing }); + $(this).parent().removeClass('expanded').addClass('collapsed'); + } + } else { + h($(this).attr('rel')); + } + return false; + }); + // Prevent A from triggering the # on non-click events + if( o.folderEvent.toLowerCase != 'click' ) $(t).find('LI A').bind('click', function() { return false; }); + } + // Loading message + $(this).html('
  • ' + o.loadMessage + '
'); + // Get the initial file list + showTree( $(this), escape(o.root) ); + }); + } + }); + +})(jQuery); \ No newline at end of file diff --git a/debug-db/src/main/java/com/amitshekhar/DebugDBInitProvider.java b/debug-db/src/main/java/com/amitshekhar/DebugDBInitProvider.java index c99f634..cc94ccf 100644 --- a/debug-db/src/main/java/com/amitshekhar/DebugDBInitProvider.java +++ b/debug-db/src/main/java/com/amitshekhar/DebugDBInitProvider.java @@ -19,12 +19,17 @@ package com.amitshekhar; +import android.Manifest; import android.content.ContentProvider; import android.content.ContentValues; import android.content.Context; +import android.content.Intent; +import android.content.pm.PackageManager; import android.content.pm.ProviderInfo; import android.database.Cursor; import android.net.Uri; +import android.os.Build; +import android.support.v4.content.ContextCompat; /** * Created by amitshekhar on 16/11/16. @@ -38,6 +43,14 @@ public DebugDBInitProvider() { @Override public boolean onCreate() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + if (ContextCompat.checkSelfPermission(this.getContext(), + Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_DENIED) { + //ask for permission + Intent intent = new Intent(getContext(), RequestPermissionsActivity.class); + getContext().startActivity(intent); + } + } DebugDB.initialize(getContext()); return true; } diff --git a/debug-db/src/main/java/com/amitshekhar/RequestPermissionsActivity.java b/debug-db/src/main/java/com/amitshekhar/RequestPermissionsActivity.java new file mode 100644 index 0000000..dfa92b3 --- /dev/null +++ b/debug-db/src/main/java/com/amitshekhar/RequestPermissionsActivity.java @@ -0,0 +1,28 @@ +package com.amitshekhar; + +import android.Manifest; +import android.content.pm.PackageManager; +import android.os.Build; +import android.os.Bundle; +import android.support.annotation.Nullable; +import android.support.v4.content.ContextCompat; +import android.support.v7.app.AppCompatActivity; + +/** + * Created by adji on 3/28/18. + */ + +public class RequestPermissionsActivity extends AppCompatActivity { + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (ContextCompat.checkSelfPermission(this, + Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_DENIED) { + //ask for permission + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 1); + } + } + finish(); + } +} diff --git a/debug-db/src/main/java/com/amitshekhar/server/RequestHandler.java b/debug-db/src/main/java/com/amitshekhar/server/RequestHandler.java index aa0d9b5..c7c1219 100644 --- a/debug-db/src/main/java/com/amitshekhar/server/RequestHandler.java +++ b/debug-db/src/main/java/com/amitshekhar/server/RequestHandler.java @@ -23,8 +23,11 @@ import android.content.Context; import android.content.res.AssetManager; import android.net.Uri; +import android.os.Build; +import android.os.Environment; import android.text.TextUtils; import android.util.Pair; +import android.webkit.MimeTypeMap; import com.amitshekhar.model.Response; import com.amitshekhar.model.RowDataRequest; @@ -45,12 +48,20 @@ import net.sqlcipher.database.SQLiteDatabase; import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; +import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintStream; +import java.io.UnsupportedEncodingException; import java.net.Socket; import java.net.URLDecoder; +import java.nio.file.Files; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -60,6 +71,7 @@ public class RequestHandler { + private static final long MAX_FILE_BYTES = 1024; private final Context mContext; private final Gson mGson; private final AssetManager mAssets; @@ -70,10 +82,52 @@ public class RequestHandler { private String mSelectedDatabase = null; private HashMap mRoomInMemoryDatabases = new HashMap<>(); + private final String emulatedRootDir; + public RequestHandler(Context context) { mContext = context; mAssets = context.getResources().getAssets(); mGson = new GsonBuilder().serializeNulls().create(); + + String[] types = {Environment.DIRECTORY_MUSIC, + Environment.DIRECTORY_PODCASTS, + Environment.DIRECTORY_RINGTONES, + Environment.DIRECTORY_ALARMS, + Environment.DIRECTORY_NOTIFICATIONS, + Environment.DIRECTORY_PICTURES, + Environment.DIRECTORY_MOVIES, + Environment.DIRECTORY_DOWNLOADS, + Environment.DIRECTORY_DOCUMENTS, + Environment.DIRECTORY_DCIM}; + StringBuffer ss = new StringBuffer(); + ss.append("
    "); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + for (String type : types) { + appendToFileTree(ss, context.getExternalFilesDirs(type), "getExternalFilesDirs(" + type + ")"); + } + appendToFileTree(ss, context.getExternalCacheDirs(), "getExternalCacheDirs"); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + appendToFileTree(ss, context.getExternalMediaDirs(), "getExternalMediaDirs"); + appendToFileTree(ss, context.getCodeCacheDir(), "getCodeCacheDir"); + appendToFileTree(ss, context.getNoBackupFilesDir(), "getNoBackupFilesDir"); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { + appendToFileTree(ss, context.getDataDir(), "getDataDir"); + } + for (String type : types) { + appendToFileTree(ss, Environment.getExternalStoragePublicDirectory(type), "Environment.getExternalStoragePublicDirectory( " + type + " )"); + } + appendToFileTree(ss, Environment.getDataDirectory(), "Environment.getDataDirectory"); + appendToFileTree(ss, Environment.getExternalStorageDirectory(), "Environment.getExternalStorageDirectory"); + appendToFileTree(ss, Environment.getRootDirectory(), "Environment.getRootDirectory"); + appendToFileTree(ss, Environment.getDownloadCacheDirectory(), "Environment.getDownloadCacheDirectory"); + appendToFileTree(ss, context.getFilesDir(), "getFilesDir"); + appendToFileTree(ss, context.getCacheDir(), "getCacheDir"); + appendToFileTree(ss, context.getExternalCacheDir(), "getExternalCacheDir"); + appendToFileTree(ss, context.getObbDir(), "getObbDir"); + ss.append("
"); + emulatedRootDir = ss.toString(); } public void handle(Socket socket) throws IOException { @@ -81,6 +135,7 @@ public void handle(Socket socket) throws IOException { PrintStream output = null; try { String route = null; + String body = null; // Read HTTP headers and parse out the route. reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); @@ -91,6 +146,32 @@ public void handle(Socket socket) throws IOException { int end = line.indexOf(' ', start); route = line.substring(start, end); break; + } else if (line.startsWith("POST /")) { + int start = line.indexOf('/') + 1; + int end = line.indexOf(' ', start); + route = line.substring(start, end); + + Integer contentLength = null; + while (!TextUtils.isEmpty(line = reader.readLine())) { + if (line.toUpperCase().startsWith("CONTENT-LENGTH")) { + int clStart = line.indexOf(":") + 1; + String cl = line.substring(clStart); + contentLength = Integer.parseInt(cl.trim()); + } + if (line.equals("\r\n")) { + break; + } + } + if (contentLength != null) { + char[] content = new char[contentLength]; + if (reader.read(content) == contentLength) { + body = String.valueOf(content); + } + } else { + // TODO: read till the end if necesary. + body = reader.readLine(); + } + break; } } @@ -103,7 +184,12 @@ public void handle(Socket socket) throws IOException { byte[] bytes; - if (route.startsWith("getDbList")) { + if (route.startsWith("fileTree")) { + final String response = getFileListResponse(route, body); + bytes = response.getBytes(); + } else if (route.startsWith("getFileData")) { + bytes = getFileContent(route); + } else if (route.startsWith("getDbList")) { final String response = getDBListResponse(); bytes = response.getBytes(); } else if (route.startsWith("getAllDataFromTheTable")) { @@ -147,6 +233,8 @@ public void handle(Socket socket) throws IOException { output.println(); output.write(bytes); output.flush(); + } catch (Exception e) { + e.printStackTrace(); } finally { try { if (null != output) { @@ -195,6 +283,135 @@ private void closeDatabase() { isDbOpened = false; } + private byte[] getFileContent(String route) { + String query = null; + if (route.contains("?fileName=")) { + query = route.substring(route.indexOf("=") + 1, route.length()); + } + try { + query = URLDecoder.decode(query, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + if (query == null) { + return new byte[0]; + } + File f = new File(query); + ByteArrayOutputStream ous = null; + InputStream ios = null; + long readed = 0; + try { + int bufSize = (MAX_FILE_BYTES < 4096) ? (int) MAX_FILE_BYTES : 4096; + byte[] buffer = new byte[bufSize]; + ous = new ByteArrayOutputStream(); + ios = new FileInputStream(f); + int read = 0; + while ((read = ios.read(buffer)) != -1) { + readed += read; + if (readed > MAX_FILE_BYTES) { + break; + } + ous.write(buffer, 0, read); + } + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + if (ous != null) + ous.close(); + } catch (IOException e) { + } + try { + if (ios != null) + ios.close(); + } catch (IOException e) { + } + } + if (ous != null) { + return ous.toByteArray(); + } + return new byte[0]; + } + + private String getFileListResponse(String route, String body) { + String query = null; + if (route.contains("?dir=")) { + query = route.substring(route.indexOf("=") + 1, route.length()); + } else if (body != null && body.contains("dir=")) { + query = body.substring(body.indexOf("=") + 1, body.length()); + } + if (query != null) { + try { + query = URLDecoder.decode(query, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } + if (query.equals("/")) { + return emulatedRootDir; + } + + StringBuffer ss = new StringBuffer(); + ss.append("
    "); + try { + File dir = new File(query); + if (dir.exists()) { + File[] fileList = dir.listFiles(); + if (fileList != null) { + for (File entry : fileList) { + appendToFileTree(ss, entry); + } + } + + } else { + ss.append("Directory not found : " + query); + } + } catch (Exception e) { + e.printStackTrace(); + ss.append("Could not load directory: " + query); + } finally { + ss.append("
"); + } + return ss.toString(); + } + + private void appendToFileTree(StringBuffer ss, File[] fs, String extra) { + if (fs == null) { + return; + } + for (File entry : fs) { + appendToFileTree(ss, entry, extra); + } + } + + private void appendToFileTree(StringBuffer ss, File entry) { + appendToFileTree(ss, entry, null); + + } + + private void appendToFileTree(StringBuffer ss, File entry, String rootDirExtra) { + String ff = entry.getAbsolutePath(); + String f; + if (entry.isDirectory()) { + // An empty root directory. + if (rootDirExtra != null && (entry.list() == null || entry.list().length == 0)) { + return; + } + ss.append("
  • "); + f = entry.getName(); + } else { + String extension = MimeTypeMap.getFileExtensionFromUrl(ff); + ss.append("
  • "); + f = entry.getName() + " ( " + entry.length() + " ) "; + } + if (rootDirExtra != null) { + ss.append(rootDirExtra + " "); + } + ss.append(f + "
  • "); + } + private String getDBListResponse() { mDatabaseFiles = DatabaseFileProvider.getDatabaseFiles(mContext); if (mCustomDatabaseFiles != null) { From f0fdc60c46fb7de9b4635029dceb27058f445ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rube=CC=81n=20Gonza=CC=81lez=20Mun=CC=83oz?= Date: Tue, 15 May 2018 12:13:27 +0200 Subject: [PATCH 02/42] Changed compile to implementation in the .gradle files --- app/build.gradle | 14 +++++++------- debug-db/build.gradle | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 7a1b962..8460424 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -43,14 +43,14 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + implementation fileTree(dir: 'libs', include: ['*.jar']) + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:27.0.0' - testCompile 'junit:junit:4.12' - compile 'net.zetetic:android-database-sqlcipher:3.5.7@aar' - compile "android.arch.persistence.room:runtime:1.0.0" + implementation 'com.android.support:appcompat-v7:27.0.0' + testImplementation 'junit:junit:4.12' + implementation 'net.zetetic:android-database-sqlcipher:3.5.7@aar' + implementation "android.arch.persistence.room:runtime:1.0.0" annotationProcessor "android.arch.persistence.room:compiler:1.0.0" - debugCompile project(':debug-db') + debugImplementation project(':debug-db') } diff --git a/debug-db/build.gradle b/debug-db/build.gradle index dbf8b6e..3e35fc0 100644 --- a/debug-db/build.gradle +++ b/debug-db/build.gradle @@ -43,15 +43,15 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + implementation fileTree(dir: 'libs', include: ['*.jar']) + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - testCompile 'junit:junit:4.12' - compile 'com.google.code.gson:gson:2.8.0' - compile 'net.zetetic:android-database-sqlcipher:3.5.7@aar' - compile "android.arch.persistence.room:runtime:1.0.0" - compile 'com.android.support:appcompat-v7:27.0.0' + testImplementation 'junit:junit:4.12' + implementation 'com.google.code.gson:gson:2.8.0' + implementation 'net.zetetic:android-database-sqlcipher:3.5.7@aar' + implementation "android.arch.persistence.room:runtime:1.0.0" + implementation 'com.android.support:appcompat-v7:27.0.0' } From 3077e72d8be273bf7c485fbaba278ed5bfc41c83 Mon Sep 17 00:00:00 2001 From: Evgeniy Vigurskiy Date: Mon, 2 Jul 2018 16:23:06 +0300 Subject: [PATCH 03/42] Add support for database delete --- debug-db/src/main/assets/app.js | 40 +++++++++++++------ debug-db/src/main/assets/index.html | 8 +++- .../amitshekhar/server/RequestHandler.java | 29 ++++++++++++++ 3 files changed, 63 insertions(+), 14 deletions(-) diff --git a/debug-db/src/main/assets/app.js b/debug-db/src/main/assets/app.js index 8d3b897..5d5e240 100644 --- a/debug-db/src/main/assets/app.js +++ b/debug-db/src/main/assets/app.js @@ -82,6 +82,21 @@ function downloadDb() { } } +function deleteDb() { + if (isDatabaseSelected) { + $.ajax({url: "deleteDb", success: function(result){ + result = JSON.parse(result); + if(result.isSuccessful){ + console.log("Database deleted successfully"); + showSuccessInfo("Database Deleted Successfully"); + getDBList(); + } else { + console.log("Database delete failed"); + showErrorInfo("Database Delete Failed"); + } + }}); + } +} function getDBList() { @@ -115,21 +130,26 @@ function openDatabaseAndGetTableList(db, isDownloadable) { if("APP_SHARED_PREFERENCES" == db) { $('#run-query').removeClass('active'); $('#run-query').addClass('disabled'); - $('#selected-db-info').removeClass('active'); - $('#selected-db-info').addClass('disabled'); + $('#selected-db-download').removeClass('active'); + $('#selected-db-delete').removeClass('active'); + $('#selected-db-download').addClass('disabled'); + $('#selected-db-delete').addClass('disabled'); isDatabaseSelected = false; $("#selected-db-info").text("SharedPreferences"); } else { $('#run-query').removeClass('disabled'); $('#run-query').addClass('active'); + $("#selected-db-info").text("Selected Database : "+db); if("true" == isDownloadable) { - $('#selected-db-info').removeClass('disabled'); - $('#selected-db-info').addClass('active'); - $("#selected-db-info").text("Export Selected Database : "+db); + $('#selected-db-download').addClass('active'); + $('#selected-db-delete').addClass('active'); + $('#selected-db-download').removeClass('disabled'); + $('#selected-db-delete').removeClass('disabled'); } else { - $('#selected-db-info').removeClass('active'); - $('#selected-db-info').addClass('disabled'); - $("#selected-db-info").text("Selected Database : "+db); + $('#selected-db-download').removeClass('active'); + $('#selected-db-delete').removeClass('active'); + $('#selected-db-download').addClass('disabled'); + $('#selected-db-delete').addClass('disabled'); } isDatabaseSelected = true; } @@ -141,11 +161,7 @@ function openDatabaseAndGetTableList(db, isDownloadable) { var tableList = result.rows; var dbVersion = result.dbVersion; if("APP_SHARED_PREFERENCES" != db) { - if("true" == isDownloadable) { - $("#selected-db-info").text("Export Selected Database : "+db +" Version : "+dbVersion); - } else { $("#selected-db-info").text("Selected Database : "+db +" Version : "+dbVersion); - } } $('#table-list').empty() for(var count = 0; count < tableList.length; count++){ diff --git a/debug-db/src/main/assets/index.html b/debug-db/src/main/assets/index.html index 846b136..f8eeb36 100644 --- a/debug-db/src/main/assets/index.html +++ b/debug-db/src/main/assets/index.html @@ -121,9 +121,13 @@ - + +