|Version 7 (modified by 6 years ago) ( diff ),|
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 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".
- 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 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).
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.