Difference between revisions of "Android"
m (→Rooting) |
m (→Android 2.3) |
||
Line 134: | Line 134: | ||
* adb shell |
* adb shell |
||
* adb logcat |
* adb logcat |
||
+ | ===adb as root=== |
||
− | |||
+ | Once the phone is rooted, you can, from a shell with e.g. adb shell invoke "su" & get root. |
||
+ | <br>But to get immediately into root, the file /default.prop needs to contain ro.secure=0 |
||
+ | <br>But that file is restored from boot.img at each boot so you need to modify that one |
||
+ | <br>See http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images#Alternative_Method |
||
+ | <br>cf also abootimg in debian which should ease the process |
||
+ | <br>not tried yet |
||
===Screenshots=== |
===Screenshots=== |
||
Run ddms (from SDK) -> Tools / Device / Screen capture |
Run ddms (from SDK) -> Tools / Device / Screen capture |
||
Line 141: | Line 147: | ||
<br>Activate USB tethering (Settings / Wireless & networks / Tethering / USB Tethering) |
<br>Activate USB tethering (Settings / Wireless & networks / Tethering / USB Tethering) |
||
<br>It works OOB on Debian, nothing to do |
<br>It works OOB on Debian, nothing to do |
||
+ | ===Getting busybox=== |
||
+ | Need rooted phone, see above |
||
+ | <br>Google's stripped busybox, called toolbox, is far from enough once you get a shell on the phone |
||
+ | * Get [https://market.android.com/details?id=com.jrummy.busybox.installer Busybox Installer] from Market |
||
+ | Examples to use busybox versions instead of toolbox versions when the command exists twice: |
||
+ | <pre> |
||
+ | # busybox mount -o remount,rw /system |
||
+ | # /system/xbin/mount -o remount,rw /system |
||
+ | </pre> |
||
+ | |||
===Wi-Fi & client certs=== |
===Wi-Fi & client certs=== |
||
To be able to authenticate to a Wi-Fi network using client certificates via TLS: |
To be able to authenticate to a Wi-Fi network using client certificates via TLS: |
Revision as of 01:15, 30 April 2011
Links
App stores
Alternate views on the official market:
Alternate markets:
- AppsLib
- AndSpot (beta)
- GetJar
- Handmark
- Mobango
- Handango
- explorePDA
- MiKandi
- MobiHand
- Mobspot
- Smartphone.net
- AndroidGear
- SlideME
User manuals
Nexus S
Versions
physical sticker behind battery:
- Model: GT-I9023
- FCC ID: A3LGTI9023
- SSN: -I9023GSMH
- IMEI: xxxxxxx
- S/N: xxxxxxx
under 'About phone' from the settings:
- Android 2.3.3
- Baseband I9023XXKB3
- Kernel 2.6.35.7-g1d030a7
- Build GRI54
under fastboot:
- Product name - HERRING
- HW Version - rev 52
- Bootloader version - I9020XXKA3
- Baseband version - I9020XXKB3
- Carrier info - EUR
- Serial number - xxxxxxx
USB permissions on the host
On the host, example how to solve permissions:
Create /etc/udev/rules.d/99-android.rules for Nexus phones:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0fff", MODE="0666", OWNER="<your_account>" # Nexus One Fastboot SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e11", MODE="0666", OWNER="<your_account>" # Nexus One Normal SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e12", MODE="0666", OWNER="<your_account>" # Nexus One Debug/Recovery SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e20", MODE="0666", OWNER="<your_account>" # Nexus S Fastboot SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e21", MODE="0666", OWNER="<your_account>" # Nexus S Normal SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e22", MODE="0666", OWNER="<your_account>" # Nexus S Debug/Recovery SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e23", MODE="0666", OWNER="<your_account>" # ??? SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e24", MODE="0666", OWNER="<your_account>" # Nexus S USB tethering
Then execute /etc/init.d/udev reload
Restoring factory ROM
- Get firmware here for a European Nexus S i9023, mine needs the I9023XXKB3 one.
- Rename tar.md5 as tar
- Get Odin sw from here, choose i9023
- e.g. I9003_Odin3_v1.82.rar & SAMSUNG_USB.rar
- Run Odin (works in a virtualbox if needed), load the 4 files:
- bootloader: I9023_EUR_GRI54_XXKB3/I9023_EUR_GRI54_XXKB3/Bootloader_I9023XXKA3.tar
- PDA: I9023_EUR_GRI54_XXKB3/I9023_EUR_GRI54_XXKB3/PDA_SOJU_GRI54_TMO_EUR_MR1_SIGNED.tar
- Phone: I9023_EUR_GRI54_XXKB3/I9023_EUR_GRI54_XXKB3/MODEM_I9023XXKB3_REV_00_CL912571_SIGNED.tar
- CSC: I9023_EUR_GRI54_XXKB3/I9023_EUR_GRI54_XXKB3/DGS_I9023_EUR.tar
- Turn phone off
- Plug USB
- Just before battery icon showing, enter download mode by pressing middle of volume up / volume down button for long, you'll get a big yellow warning triangle
- If using virtualbox, bring USB device (Samsung serial) to virtualbox
- Now Odin should show a yellow rectangle with COM0
- Press "start" in Odin
Sources:
- http://forum.frandroid.com/topic/52144-tuto-flash-via-odin/ (fr)
- http://forum.frandroid.com/topic/51710-astuce-probleme-de-reconnaissance-par-odin-sous-mode-download/ (fr)
- http://www.samfirmware.com/I9023%20Flasghuide%20English.pdf
Entering fastboot mode
- Power off phone
- Press Volume up and power button together for long
- You've entered fastboot
- Alternatively, fastboot can be triggererd from adb: adb reboot-bootloader
For getting fastboot on the host, see further below
Rooting
- copy su-2.3.6.1-ef-signed.zip (from http://forum.xda-developers.com/showthread.php?t=682828) on USB storage
- enter fastboot mode (see above)
- host: fastboot oem unlock
- fastboot flash recovery 3025-i9023.img
!! Don't touch boot image or try CW 3.0.0.0, one of them caused the phone to not start android anymore, I had to perform the full factory restore with Odin !!
- enter recovery mode from fastboot
- You can make a backup now
- install zip from sdcard -> choose -> su-2.3.6.1-ef-signed.zip
- reboot
Sources:
- http://forum.xda-developers.com/showthread.php?t=988686
- http://nexusshacks.com/nexus-s-hacks/how-to-root-nexus-s/
Android 2.3
Getting fastboot & Android sources
There are several binaries around but I wanted to build my own.
Maybe not the shortest way... I downloaded all android sources...
cf http://source.android.com/source/downloading.html
Some missing deps on my 64-but debian when I tried to compile everything: gperf, libc6-dev-i386, lib32ncurses5-dev ia32-libs g++-multilib lib32z1-dev lib32readline6-dev
. build/envsetup.sh lunch crespo-eng make -j2
Maybe we can just compile adb & fastboot:
make adb make fastboot
cf http://www.cduce.org/~abate/build-android-adb-debian-sid-amd64
Getting adb & Android SDK
Get it from http://developer.android.com/sdk/index.html
Run tools/android -> get Android SDK Platform-tools, revision 3
It brings also adb but not fastboot
If you want to update SDK: tools/android update sdk
adb
You need to activate USB debugging:
- Settings > Applications > Development > USB debugging
Some examples:
- adb devices
- adb shell
- adb logcat
adb as root
Once the phone is rooted, you can, from a shell with e.g. adb shell invoke "su" & get root.
But to get immediately into root, the file /default.prop needs to contain ro.secure=0
But that file is restored from boot.img at each boot so you need to modify that one
See http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images#Alternative_Method
cf also abootimg in debian which should ease the process
not tried yet
Screenshots
Run ddms (from SDK) -> Tools / Device / Screen capture
USB tethering
Plug phone & PC via USB
Activate USB tethering (Settings / Wireless & networks / Tethering / USB Tethering)
It works OOB on Debian, nothing to do
Getting busybox
Need rooted phone, see above
Google's stripped busybox, called toolbox, is far from enough once you get a shell on the phone
- Get Busybox Installer from Market
Examples to use busybox versions instead of toolbox versions when the command exists twice:
# busybox mount -o remount,rw /system # /system/xbin/mount -o remount,rw /system
Wi-Fi & client certs
To be able to authenticate to a Wi-Fi network using client certificates via TLS:
If needed, export certificate from IE in Pkcs#12 PFX, *with* private key, *with* all certs, *without* strong enc, *without* deletion of private key.
Rename .pfx file as .p12
(source: http://www.google.com/support/mobile/bin/answer.py?answer=168466&topic=27214#1086573)
Copy pkcs#12 certificate to root of USB storage.
File must end with .p12, not .pfx!
One single file with key+cert+cacerts is ok
Wi-Fi params: 802.1x EAP / TLS / phase2: None / CA cert: cf previous import / user cert: idem / Identity: DOMAIN\user... / Anonymous id: empty / password:...
Importing CA certs
I could only manage it via a webserver & crafted headers:
<?php header("Content-Type: application/x-x509-ca-cert"); ?> -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----
You may try this free service: http://www.realmb.com/droidCert/ which seems to do the same.
But even if imported they seem not to be used e.g. for IMAP TLS.
There is a heavier procedure to include CA certs in the phone root list, see CACert wiki, not tried yet.
Applications
Here is a list of potentially useful applications
Network
- 2G-3G OnOff : widget to add a shortcut to the settings to enable/disable data
- Quickteth : for an easy shortcut to USB tethering (add widget to desktop)
To be sorted
- Apps Organizer : To group apps
- Android Agenda Widget : See your agenda on your home screen
- Bluetooth Switch : Activates BT when the phone is docked in the car
- Bubble : Water level using the phone sensors
- Buienalarm : (NL) rain alarm, tells you if precipitations are expected at your current location
- Chrome to Phone : easy to send URL's or text from Google Chrome to the phone
- Touch Calendar : calendar with easy scroll & zoom in/out
- Notes (developer: Yuli) : simple application for notes
- ColorNote Notepad (Notes)
- Droid48 (shagrath; HP48 emulator)
- My Tracks (My Tracks Team at Google; GPS tracking system)
- Skype (Skype)
- SMS Backup & Restore (Ritesh Sahu)
- RealCalc Scientific Calculator (Brain Overspill)
- Android Terminal Emulator (Jack Palevitch; Linux access through a terminal)
- Hears (bytesequencing.com)
- Text-To-Speech Extension (Eyes-Free Project)
- SilentMode OnOff (CurveFish)
- DailyStrip (FuseTree LLC)
- Test de vitesse Speedtest (Ookla)
- ASTRO Gestionnaire de fichiers (Metago)
- Wifi Connecter Library (farproc)
- Advanced Task Killer (ReChild)
- APN Backup & Restore (Ritesh Sahu)
- Google Goggles (Google)
- Google Earth (Google)
- Google Maps (Google)
- Google Search (Google)
- Google Sky Map (Google)
- Google Traduction (Google)
- Gmail (Google)
Alternatives to default apps
- Dialer One : Alternative dialer
Dictionaries
- Dictionnaire Littré (Alexis Robert)
- Van Dale French-Dutch (Paragon Software)
- Van Dale English-Dutch (Paragon Software)
- Van Dale Dutch Pocket (Paragon Software)
- Van Dale German-Dutch (Paragon Software)
- QuickDic German Dictionary (Thad Hughes)
Games
- Reversi (Bluesky Studio)
- Angry Birds : game, now full version for free
- Move it! Free (AI Factory Limited; logical game of moving blocks)
- National Flags Quiz (FractalGate; game)
Sensing
- Boussole (Catch.com ; compass)
- Shazam : Can identify music by listening to it for about 10s
- Barcode Scanner (ZXing Team)
- Wifi Analyzer (farproc)
- GPS Status (EclipSim)
Open Source applications
GPS with offline maps
Commercial
- Copilot Live (59€ for Europe)
- Tomtom planned for next HTC phones, with free map of the country of purchase
Free
From this post:
Create your own maps with Mobile Atlas Creator (Java-based) & use them e.g. with RMaps, AndNav, Maverick, TrekBuddy,... (bitmaps so ok only for small areas such as cities)
- Get e.g. RMaps from Android Market
- Get latest release of Mobile Atlas Creator & unzip it
- Get latest SqliteJDBC library and copy it inside th eMobile Atlas Creator directory
- Run it (start.sh)
- Choose your source, e.g. OpenStreetMaps, Google Maps,...
- Select area: Right click to Drag, Scroll to zoom In/Out, Left click to select downloadable area
- Select one or more zoom levels, e.g. from 12 to 18 for all levels of details of a city
- Do “add selection” with a name of your choice
- Select “BigPlanet SQLite” from “Atlas Settings” (for RMaps, otherwise Maverick Atlas Format for Maverick etc)
- "Create Atlas"
- Download the .sqlitedb map into the phone SDcard/rmaps/maps
- Disconnect the phone
- Open RMaps and Menu > More > Settings > User defined maps > BigPlanet_maps.sqlitedb > Enabled Maps
- Return to main maps screen and then Menu > Maps > BigPlanet_maps.sqlitedb.