codepath / android_guides

Extensive Open-Source Guides for Android Developers
guides.codepath.com
MIT License
28.31k stars 6.35k forks source link

Guide on ADB commands #217

Open nesquena opened 8 years ago

nesquena commented 8 years ago
rogerhu commented 8 years ago

https://docs.google.com/presentation/d/1VJ988Hdq-EAwsXBdLti-FtkxFPA0ZgXKvIAU90n9kUI/edit

aemxn commented 8 years ago

If anyone could provide a one-line command for pulling data from a device, that would be the best :D

Normally, I would do as follows to pull a database file from app data:

$ adb shell
$ shell@user:/ $ run-as myapp.com.android
$ shell@user:/ $ cat databases/mydb.db > /mnt/sdcard/db.db
$ shell@user:/ $ exit
$ adb pull /mnt/sdcard/db.db .
Hanif-abuvani commented 8 years ago

If you are pulling your own app db then better to create the db on sdcard only while creating the db in code, just give the path of sdcard, simple.

On 19-Oct-2016 13:02, "Aiman B" notifications@github.com wrote:

If anyone could provide a one-line command for pulling data from a device, that would be the best :D

Normally, I would do as follows to pull a database file from app data:

$ adb shell $ shell@user:/ $ run-as myapp.com.android $ shell@user:/ $ cat databases/mydb.db > /mnt/sdcard/db.db $ shell@user:/ $ exit $ adb pull /mnt/sdcard/db.db .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/codepath/android_guides/issues/217#issuecomment-254734859, or mute the thread https://github.com/notifications/unsubscribe-auth/AGDWx2CUFZWCCxAuhsywn5eejqNvFAaLks5q1ceegaJpZM4KB9Tw .

aemxn commented 8 years ago

@Hanif-abuvani don't you think there will be a security issue with that approach? But it could be done by creating the db on debug mode only.

Hanif-abuvani commented 8 years ago

Yes, I am saying to go for this only at development time, while publishing you can again change to conventional and more secure way. This is just a way to skip a drudgery of pulling the db everytime via command.

On 26-Oct-2016 08:56, "Aiman B" notifications@github.com wrote:

@Hanif-abuvani https://github.com/Hanif-abuvani don't you think there will be a security issue with that approach? But it could be done by creating the db on debug mode only.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/codepath/android_guides/issues/217#issuecomment-256240191, or mute the thread https://github.com/notifications/unsubscribe-auth/AGDWx1umEW8Lnso9W-xVkC7WfH_RrQ9fks5q3shSgaJpZM4KB9Tw .