问题
the camera of my mobile (running Eclair-update1) keeps being non-responsive in 90% of the time, so I assumed a hardware defect at first. After whiping the cache and the phone user data sereval times it worked again. At least for a while. Now it stopped working again.
Browsing the net I found quite some users who experience the same problem and had a hard time after whiping their user data off the device.
So my question would be: how close can I get to the hardware with the SDK? I'd like to write an app to influence hardware states (e.g. re-initializing the camera, remounting the SDcard aso.), but I'd prefer doing it - if possible - with the SDK instead of NDK.
Thanks in advance!
S.
回答1:
It's not a question of sdk vs. ndk, but of underlying operating system level permissions preventing ordinary (aftermarket vs. manufacturer/carrier installed) android applications in general from doing raw hardware access.
回答2:
- Download Android SDK to your computer
- Boot device to recovery
- Connect USB cable to PC
- Run
adb shell
then umount /data
umount /system
e2fsck -fv /dev/block/stl9
e2fsck -fv /dev/block/stl10
Taken from forum.xda-developers.com/showthread.php?t=1396366
来源:https://stackoverflow.com/questions/4133874/how-close-can-we-programmatically-get-to-the-hardware-of-an-android-device