Now with in-process redirection, the adb shell setprop thing is not needed
Change-Id: Ibfda0e6e65d0834cffdd95d4c6d87d07644088f6
This commit is contained in:
@@ -9,9 +9,6 @@ and AVD that doesn't work. Instead start it from the console:
|
|||||||
emulator-arm -avd <Name> -partition-size 500
|
emulator-arm -avd <Name> -partition-size 500
|
||||||
|
|
||||||
Where <Name> is the literal name of the AVD that you entered.
|
Where <Name> is the literal name of the AVD that you entered.
|
||||||
Then it is necessary to get stdout/err to go to somewhere we can find it:
|
|
||||||
|
|
||||||
adb shell stop; adb shell setprop log.redirect-stdio true; adb shell start
|
|
||||||
|
|
||||||
Then:
|
Then:
|
||||||
|
|
||||||
@@ -20,12 +17,15 @@ Then it is necessary to get stdout/err to go to somewhere we can find it:
|
|||||||
make clean all install
|
make clean all install
|
||||||
make run ; adb shell logcat
|
make run ; adb shell logcat
|
||||||
|
|
||||||
And if all goes well - you should have some nice unit
|
And if all goes well - you should have some nice unit test output to
|
||||||
test output to enjoy. After a while of this loop you'll probably
|
enjoy. After a while of this loop you might find that you have lost a lot of
|
||||||
find that android has lost a lot of space on your device at
|
space on your emulator's or device's /data volume. If using the emulator, you
|
||||||
this point:
|
can do:
|
||||||
|
|
||||||
adb shell stop; adb shell setprop log.redirect-stdio true; adb shell start
|
adb shell stop; adb shell start
|
||||||
|
|
||||||
|
but on a (non-rooted) device you probably just need to reboot it. On the other
|
||||||
|
hand, this phenomenon might not happen on actual devices.
|
||||||
|
|
||||||
and continue onwards & upwards.
|
and continue onwards & upwards.
|
||||||
|
|
||||||
|
12
README.cross
12
README.cross
@@ -395,14 +395,12 @@ mechanism.
|
|||||||
|
|
||||||
Then to run the unit test, do "make install" followed by "make
|
Then to run the unit test, do "make install" followed by "make
|
||||||
run". You most likely want to have an "adb logcat" running in another
|
run". You most likely want to have an "adb logcat" running in another
|
||||||
window, and you probably also want to have set the stdout and stderr
|
window.
|
||||||
of app processes to be redirected to logcat ("adb shell stop; adb
|
|
||||||
shell setprop log.redirect-stdio true; adb shell start").
|
|
||||||
|
|
||||||
To debug, do manually what "make run" would do, adding args "-e
|
To debug, do manually what "make run" would do, adding args "-e lo-main-delay
|
||||||
lo-main-delay 20" to the command line, and when the app has started,
|
20" to the command line, and when the app has started, run
|
||||||
run ndk-gdb. Unfortunately the gdb in NDK r7 is broken, use the one in
|
ndk-gdb. Unfortunately the gdb in NDK r7 and r8 is a bit broken, you can use
|
||||||
the NDK build with newer versions of gcc and gdb from
|
the one in a NDK build with newer versions of gcc and gdb from
|
||||||
http://code.google.com/p/mingw-and-ndk/ instead.
|
http://code.google.com/p/mingw-and-ndk/ instead.
|
||||||
|
|
||||||
Running strace on the unit test in progress is often useful to find
|
Running strace on the unit test in progress is often useful to find
|
||||||
|
@@ -191,10 +191,6 @@ run: run_ucalc run_filters_test
|
|||||||
stop-start-cycle:
|
stop-start-cycle:
|
||||||
$(ANDROID_SDK_HOME)/platform-tools/adb shell stop && $(ANDROID_SDK_HOME)/platform-tools/adb shell start && sleep 10
|
$(ANDROID_SDK_HOME)/platform-tools/adb shell stop && $(ANDROID_SDK_HOME)/platform-tools/adb shell start && sleep 10
|
||||||
|
|
||||||
# Too hard to remember this stuff;)
|
|
||||||
redirect-stdio:
|
|
||||||
$(ANDROID_SDK_HOME)/platform-tools/adb shell stop && $(ANDROID_SDK_HOME)/platform-tools/adb shell setprop log.redirect-stdio true && $(ANDROID_SDK_HOME)/platform-tools/adb shell start
|
|
||||||
|
|
||||||
clean: properties
|
clean: properties
|
||||||
$(ANT) clean
|
$(ANT) clean
|
||||||
rm -rf assets $(SODEST) $(OBJLOCAL)
|
rm -rf assets $(SODEST) $(OBJLOCAL)
|
||||||
|
Reference in New Issue
Block a user