Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Logs and databases #
######################
*.log

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Android DB Editor
Helps you editing android databases on your phone.
This project is open source under appache license
http://www.apache.org/licenses/LICENSE-2.0
Also see NOTICE file
Also see NOTICE file

Contact and infos at www.troido.de
10 changes: 5 additions & 5 deletions src/com/troido/dbeditor/ADBConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Licensed to the Apache Software Foundation (ASF) under one
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
under the License.
*/

package com.troido.dbeditor;
Expand Down Expand Up @@ -114,15 +114,15 @@ public static File getDatabase(Database db) {
throw new RuntimeException(exc);
}
}

public static void uploadDB(Database db,File dbFile) {
try {

runADBCommand(db.getDeviceName(), "push "+dbFile.getPath()+" " + db.getDBPath());

} catch (Exception exc) {
throw new RuntimeException(exc);
}
}

}
12 changes: 6 additions & 6 deletions src/com/troido/dbeditor/AndroidDBEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Licensed to the Apache Software Foundation (ASF) under one
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
under the License.
*/

package com.troido.dbeditor;
Expand All @@ -32,7 +32,7 @@ Licensed to the Apache Software Foundation (ASF) under one

public class AndroidDBEditor extends JFrame {
List<Device> devices = new ArrayList<Device>();

private JTree tree;

private DefaultMutableTreeNode createNodes(Device device) {
Expand All @@ -41,13 +41,13 @@ private DefaultMutableTreeNode createNodes(Device device) {
for (Package pack:device.getPackages()){
DefaultMutableTreeNode packageNode= new DefaultMutableTreeNode(pack.getName());
packageNode.setUserObject(pack);

deviceNode.add(packageNode);
for (Database database:pack.getDatabases()){
DefaultMutableTreeNode dbNode=new DefaultMutableTreeNode(database.getName());
dbNode.setUserObject(database);
packageNode.add(dbNode);

}
}
return deviceNode;
Expand Down Expand Up @@ -76,11 +76,11 @@ public AndroidDBEditor() {
devices.add(d);
}
tree=createDeviceTree(devices);

JScrollPane scrollPane = new JScrollPane(tree);
this.getContentPane().add(scrollPane);
this.setSize(300,600);

}

public static void main(String[] args) {
Expand Down
2 changes: 1 addition & 1 deletion src/com/troido/dbeditor/BookInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Licensed to the Apache Software Foundation (ASF) under one
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
under the License.
*/

package com.troido.dbeditor;
Expand Down
2 changes: 1 addition & 1 deletion src/com/troido/dbeditor/CellRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Licensed to the Apache Software Foundation (ASF) under one
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
under the License.
*/

package com.troido.dbeditor;
Expand Down
6 changes: 3 additions & 3 deletions src/com/troido/dbeditor/DBChangeListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Licensed to the Apache Software Foundation (ASF) under one
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
under the License.
*/

package com.troido.dbeditor;
Expand All @@ -36,13 +36,13 @@ public void run(){
}
try{
sleep(100);

}catch(Exception exc){
exc.printStackTrace();
}
}
}

public DBChangeListener(Database database,File dbFile) {
this.database=database;
this.dbFile=dbFile;
Expand Down
2 changes: 1 addition & 1 deletion src/com/troido/dbeditor/Database.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Licensed to the Apache Software Foundation (ASF) under one
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
under the License.
*/

package com.troido.dbeditor;
Expand Down
4 changes: 2 additions & 2 deletions src/com/troido/dbeditor/Device.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Licensed to the Apache Software Foundation (ASF) under one
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
under the License.
*/

package com.troido.dbeditor;
Expand Down Expand Up @@ -77,5 +77,5 @@ public String toString(){
public String getIconPath() {
return "img/device.png";
}

}
8 changes: 4 additions & 4 deletions src/com/troido/dbeditor/Package.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Licensed to the Apache Software Foundation (ASF) under one
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
under the License.
*/
package com.troido.dbeditor;

Expand All @@ -33,8 +33,8 @@ public Package(String name) {
public void addDatabase(Database db){
this.databases.add(db);
}


public String getName() {
return name;
}
Expand All @@ -58,5 +58,5 @@ public int compareTo(Package pack) {
public String getIconPath() {
return "img/package.png";
}

}
6 changes: 3 additions & 3 deletions src/com/troido/dbeditor/TreeMouseListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Licensed to the Apache Software Foundation (ASF) under one
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
under the License.
*/

package com.troido.dbeditor;
Expand All @@ -32,7 +32,7 @@ Licensed to the Apache Software Foundation (ASF) under one
public class TreeMouseListener implements MouseListener {

public static String sqlitepath;

public TreeMouseListener() {
if (sqlitepath==null){
try{
Expand All @@ -45,7 +45,7 @@ public TreeMouseListener() {
}
}
}

@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
Expand Down
2 changes: 1 addition & 1 deletion src/com/troido/dbeditor/TreeObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Licensed to the Apache Software Foundation (ASF) under one
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
under the License.
*/

package com.troido.dbeditor;
Expand Down