Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[Q] How to change the default sensors of Android Emulator in the source code?

$
0
0
I am trying to change the behavior of the default sensors used in Android Emulator.
I am interesting of changing the Accelerometer sensor. I have downloaded and build
the source succesfully through these instructions:

Code:

repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r6
repo sync
. build/envsetup.sh
lunch 1
make -j4

And I am able to run the emulator through this command in the same directory:
Code:

emulator
So far, I have found the files that I believe that contain the accelerometer functionality:
/external/qemu/android/hw-sensors.c

I tried to change some values there that seems to be related with the accelerometer
and then rebuilt the source. When I run the emulator I get the same results.

Do anyone have a clue on how to do this?

Moreover, do you know how to debug the whole process? Is there a print function
I can use and where are the results printed to?

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>