Difference between revisions of "Android"

From Pandora Wiki
Jump to: navigation, search
(Category, fluidity.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
[[File:Lead_Photo_For_Android0-31797052380859137.png|thumbnail|Android logo]]
 
[[File:Lead_Photo_For_Android0-31797052380859137.png|thumbnail|Android logo]]
 
+
Android is Google's Linux-based operating system for ARM mobile devices. <br>
<translate>
+
This page covers the [http://boards.openpandora.org/topic/8626-android-gingerbread-in-a-pnd/ Android in a PND for Gingerbread].
<!--T:1-->
 
Android gingerbread 2.3
 
  
 
= Installing Android = <!--T:2-->
 
= Installing Android = <!--T:2-->
 
==A quick step-by-step guide that will help you to get Android running on your Pandora.== <!--T:3-->
 
 
<!--T:4-->
 
This is a quick guide how to setup Android on your Pandora.
 
 
 
<!--T:5-->
 
<!--T:5-->
# You HAVE to have at least [[Ångström]] SuperZaxxon Beta 5a (was tested to work with this release at the time of writing this guide).
+
# You need at least [[Ångström]] Beta 5a.
# Check the [[http://boards.openpandora.org/index.php/topic/8626-android-gingerbread-in-a-pnd/|Beta Testing thread]] and download the most recent PND from there. Be sure to put the Android PND onto the card that is in your LEFT slot.
+
# Download the Android PND from [http://notaz.gp2x.de/releases/pandora/gingerbread_r6.pnd here].  
# For safety reasons, if you want to use a second SD Card with Android, use an empty one. It MIGHT corrupt it. Based on my experience, Android deletes only files in the root directory of the second card. Anything in subdirectories will not be affected.
+
# Move the Android PND onto the card that is in your left SD card slot.
 +
# For safety reasons, if you want to use a second SD Card with Android, use an empty one. Android may corrupt it. Android seems to only delete files in the root directory of the second card. Anything in subdirectories shouldn't be affected.
 
# If your date is not set properly: Do so before starting Android. If the date is in the past, there will be issues with the Google certification.
 
# If your date is not set properly: Do so before starting Android. If the date is in the past, there will be issues with the Google certification.
 
# Start Android from System/Android Gingerbread. It takes a while to boot. Once it has booted up, setup your WiFi connection.
 
# Start Android from System/Android Gingerbread. It takes a while to boot. Once it has booted up, setup your WiFi connection.
# To install APKs, put them onto a second SD Card and run them using the built-in FileManager.
+
# To install APKs, put them onto a second SD Card and execute them using the built-in FileManager.
 
# To stop Android, select "Kill Android" from the menu.
 
# To stop Android, select "Kill Android" from the menu.
  
<!--T:6-->
+
==Key Mapping==
Caveat: Installing PND/appdata on ext-2,3, or 4 formatted partitions (or any filesystem with permissions),causes problems (mainly with gapps, when the zip is extracted it does not retain correct permissions) use FAT32 instead.
 
 
 
==Key mapping== <!--T:7-->
 
  
<!--T:8-->
 
 
Home : Pandora Button or F1[/background] <br>
 
Home : Pandora Button or F1[/background] <br>
 
Back : Esc, Right nub to the right.  <br>
 
Back : Esc, Right nub to the right.  <br>
Line 33: Line 22:
 
Volume Up / Down : F12 / F11 <br>
 
Volume Up / Down : F12 / F11 <br>
  
=Android apk file repositories= <!--T:9-->
+
=Android APK Repositories=
 
+
[https://f-droid.org/ F-Droid] is a high quality repository with only free and open-source software.
==fdroid== <!--T:10-->
+
To use F-Droid, install the APK from it's [https://f-droid.org/ website]. To install the APK, just execute it from the file manager.
 
 
<!--T:11-->
 
[https://f-droid.org/|F-Droid]
 
 
 
<!--T:12-->
 
High quality repo with only FOSS software. Recommended.
 
 
 
==Google play store== <!--T:13-->
 
 
 
<!--T:14-->
 
1. Grab the needed data files from here: http://www.androidfilehost.com/?fid=22979706399755027
 
2. Simply extract the ZIP into the /pandora/appdata/android_gingerbread - Folder on your SD Card. Remove the meta-inf-Folder (otherwise, it might hang later).
 
3. On your next Android boot, the store setup should appear automatically (be sure you set up your WiFi connection before!)
 
4. The store should now work. In case you got connection issues (but internet itself works fine), be sure to doublecheck that the date is correctly set (you can only set that from Linux)!
 
 
 
=Map Touchscreen Controls to physical controls= <!--T:15-->
 
 
 
<!--T:16-->
 
Not all games support physical controls - some only use the touchscreen.
 
However, there's an app called "GameKeyboard 2.0" that will help you out :)
 
  
<!--T:17-->
+
[https://play.google.com/store Google Play] is Google's official repository with software, music, movies, and other media.
The usage is quite confusing, but here's a guide to help you with that.
+
To use Google Play:
 +
# Set up WiFi on your Android installation, and the system time from [[Ångström]].
 +
# Download this [http://www.androidfilehost.com/?fid=22979706399755027/ ZIP file].
 +
# Extract the ZIP into the /pandora/appdata/android_gingerbread folder on your SD Card. Remove the meta-inf-Folder.
 +
# On your next Android boot, the Play Store setup should appear automatically.<br>
  
<!--T:18-->
+
=Map Touchscreen Controls to Physical Controls=
# Go to CyanogenMod Settings and enable "Soft Keyboard" on long menu button press. This way you can bring up the keyboard in most games holding the Menu Button (doesn't work in all games, but will still work there).
+
Not all games support physical controls-- some only use the touchscreen.<br>
# Run GameKeyboard and set it up (only needed the first time)
+
However, there's an app called "GameKeyboard 2.0" that maps touchscreen controls to physical controls.<br>
 +
[http://boards.openpandora.org/index.php?/topic/8871-how-to-install-android-on-your-pandora/page__pid__159757#entry159757 This guide] is intended to help you use GameKeyboard.
 +
# Go to CyanogenMod Settings and enable "Soft Keyboard" on long menu button press. This way you can bring up the keyboard in most games by holding the Menu Button.
 +
# Run GameKeyboard and set it up.
 
# Follow the on-screen instructions to enable it as SoftKeyboard and choose it as current SoftKeyboard.
 
# Follow the on-screen instructions to enable it as SoftKeyboard and choose it as current SoftKeyboard.
 
# Then in the settings, do the following:
 
# Then in the settings, do the following:
Line 72: Line 48:
 
     Go into "Layout Edit" and allow "Layout Edit Mode"
 
     Go into "Layout Edit" and allow "Layout Edit Mode"
  
<!--T:19-->
+
This is the first-time setup, GameKeyboard is now ready to be used. Grant it root access when it asks for it.
This is the first-time setup, GameKeyboard is now ready to be used. Grant it root access when it asks for :)
 
 
 
<!--T:20-->
 
 
# Run your game. If the touchscreen buttons and DPad are located in the default GameKeyboard locations, the Pandora controls should now just work.
 
# Run your game. If the touchscreen buttons and DPad are located in the default GameKeyboard locations, the Pandora controls should now just work.
 
# If buttons / DPad are somewhere else on the screen, hold the menu button which should show the GameKeyboard controls (doesn't work with all games).
 
# If buttons / DPad are somewhere else on the screen, hold the menu button which should show the GameKeyboard controls (doesn't work with all games).
 
# Move the controls around using the touchscreen to match the touchscreen controls. Some games hide them though when you press the menu button, some don't even show the GameKeyboard as they disable the softkeyboard. In this case, remember where DPad / buttons need to be, go to the GameKeyboard app and slide the controls at the desired location and then go back to the game.
 
# Move the controls around using the touchscreen to match the touchscreen controls. Some games hide them though when you press the menu button, some don't even show the GameKeyboard as they disable the softkeyboard. In this case, remember where DPad / buttons need to be, go to the GameKeyboard app and slide the controls at the desired location and then go back to the game.
  
<!--T:21-->
 
 
Once that's done, the game will work with your physical gaming controls.
 
Once that's done, the game will work with your physical gaming controls.
 
As you can save different profiles in GameKeyboard, you only need to match the locations per game once and then safe the config.
 
As you can save different profiles in GameKeyboard, you only need to match the locations per game once and then safe the config.
  
<!--T:22-->
+
= How to Remap Android Hardware Keys =
* Taken from this post on the pandora boards:
+
# Install a text editor from F-Droid or Google Play, such as 920 Editor and Jota+.
http://boards.openpandora.org/index.php?/topic/8871-how-to-install-android-on-your-pandora/page__pid__159757#entry159757
+
# Install a file manager from F-Droid or Google Play, such as Root Browser.
 
+
# Open up the file manager and navigate to /system/usr/keylayout
= How to remap Android hardware keys = <!--T:23-->
+
# Copy all the contents of that folder to /mnt/sdcard2/Backups
 
+
# Now, open the text editor.
<!--T:24-->
+
# Open gpio-keys.kl in the Backups folder.
download Jota+(Text Editor) from the Play Store (the Android Market)
+
# Edit the file as you wish.
 
+
## I reccomend you change key 29 from "BUTTON_SELECT" to "BACK"
<!--T:25-->
+
## It is also reccomended to change key 56 from "BUTTON_START" to "MENU"
Now, download Root Browser (free or Pro will both work)
+
## You should reference [http://code.google.com/p/androhid/wiki/Keycodes this page] on Android keycodes for easy editing.
 
+
# After editing the file, save and exit the text editor.
<!--T:26-->
+
# Open your file manager and delete /system/usr/keylayout/gpio-keys.kl
Now, open up the Root Browser and go to /system/usr/keylayout
+
# Copy /mnt/sdcard2/Backups/gpio-keys.kl to /system/usr/keylayout
 
+
# Finally, relaunch Android with the "Kill Android" app.
<!--T:27-->
+
# Finally, confirm the key remapping.
Copy all the contents of that folder to /mnt/sdcard2/[WHATEVER YOU WANT TO CALL THIS FOLDER]
 
 
 
<!--T:28-->
 
Now, copy the folder you just created above (containing the four files) and paste it back into the its self. Then rename this new sub folder "Backups" or "Originals"
 
 
 
<!--T:29-->
 
Now, open Jota+, go to "menu" and click "file"
 
 
 
<!--T:30-->
 
Click "Open..."
 
 
 
<!--T:31-->
 
Navigate to the folder with the four .kl files and the Backups folder
 
 
 
<!--T:32-->
 
Open gpio-keys.kl
 
 
 
<!--T:33-->
 
change key 29 from "BUTTON_SELECT" to "BACK"
 
 
 
<!--T:34-->
 
change key 56 from "BUTTON_START" to "MENU"
 
 
 
<!--T:35-->
 
(you can make it whatever you want, really)
 
 
 
<!--T:36-->
 
Here is a list of default key codes in Android http://code.google.com/p/androhid/wiki/Keycodes
 
 
 
<!--T:37-->
 
save and exit.
 
 
 
<!--T:38-->
 
Open Root Browser and copy gpio-keys.kl to /system/usr/keylayout and delete the old one
 
 
 
<!--T:39-->
 
(delete the original before hitting "Paste)
 
 
 
<!--T:40-->
 
Now, launch the "Kill Android" app, then relaunch android and confirm that the "Select" button now acts as the menu button and the "Start" button now acts as the back button.
 
  
<!--T:41-->
+
Unfortunately, the coding for the nubs is incomplete. Right_Nub_Down is mapped to Keycode 82 and Right_Nub_Left is mapped to keycode 4 but other than that, the nubs have no key functionality and so as far as I can tell, you can't change what they do. If anyone wants to look around and see if they can find a way, please post in [http://boards.openpandora.org/index.php/topic/11355-tutorial-how-to-remap-android-hardware-keys/ the thread].
Unfortunately, the coding for the nubs is incomplete and so I'm at a dead end here. Right_Nub_Down is mapped to Keycode 82 and Right_Nub_Left is mapped to keycode 4 but other than that, the nubs have no key functionality and so as far as I can tell, you can't change what they do. If anyone wants to look around and see if they can find a way, please post in [http://boards.openpandora.org/index.php/topic/11355-tutorial-how-to-remap-android-hardware-keys/|the thread].
 
  
<!--T:42-->
+
[https://github.com/chrisboyle/keytest/KeyTest.apk/qr_code KeyTest] is a useful program that tells you the keycode for the key you're currently pressing.
[https://github.com/chrisboyle/keytest/KeyTest.apk/qr_code|KeyTest]
 
(It tells you the keycode for the key you're currently pressing. The only thing it lacks is the ability to show the code for anything mapped to "HOME" simply because doing so quits the app before it gets the chance to record the data)
 
</translate>
 
  
[[en:target]]
+
[[Category:Operating system]]

Latest revision as of 20:13, 20 July 2015

Android logo

Android is Google's Linux-based operating system for ARM mobile devices.
This page covers the Android in a PND for Gingerbread.

Installing Android

  1. You need at least Ångström Beta 5a.
  2. Download the Android PND from here.
  3. Move the Android PND onto the card that is in your left SD card slot.
  4. For safety reasons, if you want to use a second SD Card with Android, use an empty one. Android may corrupt it. Android seems to only delete files in the root directory of the second card. Anything in subdirectories shouldn't be affected.
  5. If your date is not set properly: Do so before starting Android. If the date is in the past, there will be issues with the Google certification.
  6. Start Android from System/Android Gingerbread. It takes a while to boot. Once it has booted up, setup your WiFi connection.
  7. To install APKs, put them onto a second SD Card and execute them using the built-in FileManager.
  8. To stop Android, select "Kill Android" from the menu.

Key Mapping

Home : Pandora Button or F1[/background]
Back : Esc, Right nub to the right.
Menu : F2
Search : Unknown
Volume Up / Down : F12 / F11

Android APK Repositories

F-Droid is a high quality repository with only free and open-source software. To use F-Droid, install the APK from it's website. To install the APK, just execute it from the file manager.

Google Play is Google's official repository with software, music, movies, and other media. To use Google Play:

  1. Set up WiFi on your Android installation, and the system time from Ångström.
  2. Download this ZIP file.
  3. Extract the ZIP into the /pandora/appdata/android_gingerbread folder on your SD Card. Remove the meta-inf-Folder.
  4. On your next Android boot, the Play Store setup should appear automatically.

Map Touchscreen Controls to Physical Controls

Not all games support physical controls-- some only use the touchscreen.
However, there's an app called "GameKeyboard 2.0" that maps touchscreen controls to physical controls.
This guide is intended to help you use GameKeyboard.

  1. Go to CyanogenMod Settings and enable "Soft Keyboard" on long menu button press. This way you can bring up the keyboard in most games by holding the Menu Button.
  2. Run GameKeyboard and set it up.
  3. Follow the on-screen instructions to enable it as SoftKeyboard and choose it as current SoftKeyboard.
  4. Then in the settings, do the following:
 Enable "Touchscreen Mode"
   Enable "Remap Hard-Key"
   Map your buttons with "Hardkey Mappings": Select a free slot, 
   press the desired D-Pad direction or button and select in the list 
   what it should be (i.e. D-Pad up to D-Pad up, etc.)
   Go into "Layout Edit" and allow "Layout Edit Mode"

This is the first-time setup, GameKeyboard is now ready to be used. Grant it root access when it asks for it.

  1. Run your game. If the touchscreen buttons and DPad are located in the default GameKeyboard locations, the Pandora controls should now just work.
  2. If buttons / DPad are somewhere else on the screen, hold the menu button which should show the GameKeyboard controls (doesn't work with all games).
  3. Move the controls around using the touchscreen to match the touchscreen controls. Some games hide them though when you press the menu button, some don't even show the GameKeyboard as they disable the softkeyboard. In this case, remember where DPad / buttons need to be, go to the GameKeyboard app and slide the controls at the desired location and then go back to the game.

Once that's done, the game will work with your physical gaming controls. As you can save different profiles in GameKeyboard, you only need to match the locations per game once and then safe the config.

How to Remap Android Hardware Keys

  1. Install a text editor from F-Droid or Google Play, such as 920 Editor and Jota+.
  2. Install a file manager from F-Droid or Google Play, such as Root Browser.
  3. Open up the file manager and navigate to /system/usr/keylayout
  4. Copy all the contents of that folder to /mnt/sdcard2/Backups
  5. Now, open the text editor.
  6. Open gpio-keys.kl in the Backups folder.
  7. Edit the file as you wish.
    1. I reccomend you change key 29 from "BUTTON_SELECT" to "BACK"
    2. It is also reccomended to change key 56 from "BUTTON_START" to "MENU"
    3. You should reference this page on Android keycodes for easy editing.
  8. After editing the file, save and exit the text editor.
  9. Open your file manager and delete /system/usr/keylayout/gpio-keys.kl
  10. Copy /mnt/sdcard2/Backups/gpio-keys.kl to /system/usr/keylayout
  11. Finally, relaunch Android with the "Kill Android" app.
  12. Finally, confirm the key remapping.

Unfortunately, the coding for the nubs is incomplete. Right_Nub_Down is mapped to Keycode 82 and Right_Nub_Left is mapped to keycode 4 but other than that, the nubs have no key functionality and so as far as I can tell, you can't change what they do. If anyone wants to look around and see if they can find a way, please post in the thread.

KeyTest is a useful program that tells you the keycode for the key you're currently pressing.