|Version 8 (modified by 7 years ago) ( diff ),|
Table of Contents
Remote Debugging on Android Device
If you have an Android phone available for development, you can remote-debug the app.
- With the device connected to your computer via USB, open Google Chrome on your computer.
- Start the developer console (Ctrl-Shift-I), open the "More"-menu (three dots on the right), and select "Inspect Devices" (under "More tools").
- In the left column of the dialog that opens, you will see all USB devices which are currently connected (so you should find your phone there too). If the entry for the phone shows "pending authorization", then you must enable USB debugging on the phone.
- Click on the entry for your phone, then choose "Inspect" for the EdenMobile app.
Now you will see the live screen of the app on your phone in the Chrome window, and you have the full Chrome developer console including HTML inspect, JS debugging with break points, single-stepping etc, to debug the app live on your phone. You can also interact with the app screen in the Chrome window.
See also: https://developers.google.com/web/tools/chrome-devtools/remote-debugging
Database on Android Device
To be able to view the EdenMobile database on an Android device, make sure that:
- the App is built with debug-option
- you have the Android Debug Bridge adb installed on your computer (part of the Android SDK)
- the device allows USB debugging (Settings=>Developer Options)
- Connect your device via USB
- Copy the database file to the SD card (you have an SD card in the phone, don't you?)
- Pull the database file to your development machine
Linux users can use the following script:
#!/bin/bash PACKAGE=org.sahanafoundation.eden_mobile FILENAME=emdb.db adb shell run-as $PACKAGE chmod 777 /data/data/$PACKAGE/databases/ adb shell run-as $PACKAGE chmod 777 /data/data/$PACKAGE/databases/$FILENAME adb shell cp /data/data/$PACKAGE/databases/$FILENAME /sdcard/ adb pull /sdcard/$FILENAME
(Windows users analogously, just not /bin/bash then ;))
Then use e.g. SQLiteBrowser to browse the database schema and data.
- remote-debugging-with-chrome.png (97.7 KB ) - added by 7 years ago.
- browse-em-database.png (130.7 KB ) - added by 7 years ago.
Download all attachments as: .zip