KorhalNexus7: Difference between revisions
Jump to navigation
Jump to search
./adb reboot bootloader
sudo ./fastboot flash boot/korhal/out/target/product/grouper/boot.img
sudo ./fastboot flash system /korhal/out/target/product/grouper/system.img # might take a minute or more
sudo ./fastboot erase userdata
mount -o remount,rw /system
adb push
cd /korhal/qt/qtbase/src/plugins/generic/evdevtouch
/korhal/qt/qtbase/bin/qmake && make
adb push /korhal/qt/qtbase/plugins/generic/libqevdevtouchplugin.so /system/plugins/generic/libqevdevtouchplugin.so
cd
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
h1. Building | |||
<code><br />mkdir <sub>/korhal # or wherever you want your checkout<br />cd</sub>/korhal<br />repo init -u git</code>gitorious.org:korhal/manifest.git<br />repo sync<br />source build/envsetup.sh<br /><code> | |||
https://developers.google.com/android/nexus/drivers#grouperjzo54k | For each of the tgz's here, extract and execute the binary inside the source tree (<sub>/korhal if using the above instructions): | ||
<br />https://developers.google.com/android/nexus/drivers#grouperjzo54k | |||
<br />The hardware name for the Nexus 7 is "grouper&quot;, thus we initialize lunch with that. | |||
<br /></code><br />lunch full_grouper-eng<br />make <s>j8<br /><code> | |||
<br />h1. Preparing device | |||
<br />This will wipe your Nexus 7 device, make sure you have backed up anything you wish to keep. You only need to follow the instructions in this section once for any given device. | |||
<br />The bootloader needs to be unlocked: | |||
<br />http://www.droid-life.com/2012/07/17/how-to-unlock-the-nexus-7-bootloader/ | |||
<br />Short story, enable USB debugging in "Settings</s>> Developer options&quot;. If you don't see it you probably have Android 4.2 and need to go to "Settings <s>> About tablet&quot; and tap the "Build number&quot; entry seven times, and it will tell you "You are now a developer!". | |||
<br />Then follow these steps: | |||
<br /></code><br />./adb reboot bootloader<br />sudo ./fastboot oem unlock<br /><code> | |||
<br />The adb and fastboot tools come with the Android SDK (adb.exe and fastboot.exe on Windows). You can run "adb devices&quot; to make sure that the computer recognizes the Nexus 7. | |||
<br />At this point you might need to re-enable USB debugging in the settings before continuing with the flashing. | |||
<br />h1. Flashing device | |||
<br />Now we can flash the device with the images that we built earlier (replace <sub>/korhal with your build directory). | |||
<br /></code><br />./adb reboot bootloader<br />sudo ./fastboot flash boot</sub>/korhal/out/target/product/grouper/boot.img<br />sudo ./fastboot flash system <sub>/korhal/out/target/product/grouper/system.img # might take a minute or more<br />sudo ./fastboot erase userdata<br /><code> | |||
<br />h1. Playing | |||
<br />h2. Fonts | |||
<br />To fix "QFontDatabase: Cannot find font directory /system//lib/fonts - is Qt installed correctly?" I needed to do the following in adb shell (run "./adb shell&quot; on the host to start a shell running on the device): | |||
<br /></code><br />mount -o remount,rw /system<br /><code> | |||
<br />Then, from the host: | |||
<br /></code><br />adb push</sub>/korhal/qt/qtbase/lib/fonts/ /system/lib/fonts/<br /><code> | |||
<br />h2. Touch input | |||
<br />At the moment, you need to manually build qtbase/src/plugins/generic/evdevtouch and push it to the device. | |||
<br />First, on the device, run "mkdir /system/plugins/generic&quot;. Then, from the host: | |||
<br /></code><br />cd <sub>/korhal/qt/qtbase/src/plugins/generic/evdevtouch<br /></sub>/korhal/qt/qtbase/bin/qmake && make<br />adb push <sub>/korhal/qt/qtbase/plugins/generic/libqevdevtouchplugin.so /system/plugins/generic/libqevdevtouchplugin.so<br /><code> | |||
<br />h2. Visual splendor | |||
<br />To get qmlscene to show something on top of the system UI, you'll need edit</sub>/korhal/qt/qtbase/mkspecs/unsupported/android-g++/qeglfshooks_surfaceflinger.cpp and change mControl</s>>setLayer(0x00000001); to mControl->setLayer(0x40000000); | |||
<br />Then, re-build the eglfs plugin and push it. | |||
<br /></code><br />cd</sub>/korhal/qt/qtbase/src/plugins/platforms/eglfs<br /><sub>/korhal/qt/qtbase/bin/qmake && make<br />adb push</sub>/korhal/qt/qtbase/plugins/platforms/libqeglfs.so /system/plugins/platforms<br /><code> | |||
== Running qmlscene == | |||
First we copy over a simple qml example, then we run qmlscene remotely. It's also possible to run it from the shell after doing "adb shell&quot;. | |||
</code><br />adb push ~/korhal/qt/qtdeclarative/examples/quick/mousearea/mousearea.qml /data/mousearea.qml<br />adb shell qmlscene /data/mousearea.qml -plugin evdevtouch:/dev/input/event0<br /><code> | |||
Revision as of 10:50, 24 February 2015
h1. Building
<br />mkdir <sub>/korhal # or wherever you want your checkout<br />cd</sub>/korhal<br />repo init -u git
gitorious.org:korhal/manifest.git
repo sync
source build/envsetup.sh
For each of the tgz's here, extract and execute the binary inside the source tree (<sub>/korhal if using the above instructions):
<br />https://developers.google.com/android/nexus/drivers#grouperjzo54k
<br />The hardware name for the Nexus 7 is "grouper&quot;, thus we initialize lunch with that.
<br />
lunch full_grouper-eng
make j8
<br />h1. Preparing device
<br />This will wipe your Nexus 7 device, make sure you have backed up anything you wish to keep. You only need to follow the instructions in this section once for any given device.
<br />The bootloader needs to be unlocked:
<br />http://www.droid-life.com/2012/07/17/how-to-unlock-the-nexus-7-bootloader/
<br />Short story, enable USB debugging in "Settings</s>> Developer options&quot;. If you don't see it you probably have Android 4.2 and need to go to "Settings <s>> About tablet&quot; and tap the "Build number&quot; entry seven times, and it will tell you "You are now a developer!".
<br />Then follow these steps:
<br />
./adb reboot bootloader
sudo ./fastboot oem unlock
<br />The adb and fastboot tools come with the Android SDK (adb.exe and fastboot.exe on Windows). You can run "adb devices&quot; to make sure that the computer recognizes the Nexus 7.
<br />At this point you might need to re-enable USB debugging in the settings before continuing with the flashing.
<br />h1. Flashing device
<br />Now we can flash the device with the images that we built earlier (replace <sub>/korhal with your build directory).
<br />
./adb reboot bootloader
sudo ./fastboot flash boot/korhal/out/target/product/grouper/boot.img
sudo ./fastboot flash system /korhal/out/target/product/grouper/system.img # might take a minute or more
sudo ./fastboot erase userdata
<br />h1. Playing
<br />h2. Fonts
<br />To fix "QFontDatabase: Cannot find font directory /system//lib/fonts - is Qt installed correctly?" I needed to do the following in adb shell (run "./adb shell&quot; on the host to start a shell running on the device):
<br />
mount -o remount,rw /system
<br />Then, from the host:
<br />
adb push
/korhal/qt/qtbase/lib/fonts/ /system/lib/fonts/
<br />h2. Touch input
<br />At the moment, you need to manually build qtbase/src/plugins/generic/evdevtouch and push it to the device.
<br />First, on the device, run "mkdir /system/plugins/generic&quot;. Then, from the host:
<br />
cd /korhal/qt/qtbase/src/plugins/generic/evdevtouch
/korhal/qt/qtbase/bin/qmake && make
adb push /korhal/qt/qtbase/plugins/generic/libqevdevtouchplugin.so /system/plugins/generic/libqevdevtouchplugin.so
<br />h2. Visual splendor
<br />To get qmlscene to show something on top of the system UI, you'll need edit</sub>/korhal/qt/qtbase/mkspecs/unsupported/android-g++/qeglfshooks_surfaceflinger.cpp and change mControl</s>>setLayer(0x00000001); to mControl->setLayer(0x40000000);
<br />Then, re-build the eglfs plugin and push it.
<br />
cd
/korhal/qt/qtbase/src/plugins/platforms/eglfs
/korhal/qt/qtbase/bin/qmake && make
adb push/korhal/qt/qtbase/plugins/platforms/libqeglfs.so /system/plugins/platforms
== Running qmlscene ==
First we copy over a simple qml example, then we run qmlscene remotely. It's also possible to run it from the shell after doing "adb shell&quot;.
adb push ~/korhal/qt/qtdeclarative/examples/quick/mousearea/mousearea.qml /data/mousearea.qml
adb shell qmlscene /data/mousearea.qml -plugin evdevtouch:/dev/input/event0