Quick jump:  What's new

 
Go to:
 
Weblog: Android   
in Dobrica Pavlinušić's random unstructured stuff
Toshiba AC100


kernel

cpuinfo

$ cat /proc/cpuinfo
Processor       : ARMv7 Processor rev 0 (v7l)
processor       : 0
BogoMIPS        : 1998.84

Features        : swp half thumb fastmult vfp edsp vfpv3 vfpv3d16 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x1
CPU part        : 0xc09
CPU revision    : 0

Hardware        : NVIDIA Harmony Development System
Revision        : 0000
Serial          : 0000000000000000

$ cat /proc/meminfo
MemTotal:         383348 kB
MemFree:          106528 kB
Buffers:           30116 kB
Cached:           123316 kB
SwapCached:            0 kB
Active:           164792 kB
Inactive:          85020 kB
Active(anon):      96692 kB
Inactive(anon):        0 kB
Active(file):      68100 kB
Inactive(file):    85020 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         96412 kB
Mapped:            44536 kB
Shmem:               312 kB
Slab:               8940 kB
SReclaimable:       4848 kB
SUnreclaim:         4092 kB
KernelStack:        2528 kB
PageTables:         8324 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      191672 kB
Committed_AS:    6569284 kB
VmallocTotal:     614400 kB
VmallocUsed:       30656 kB
VmallocChunk:     520068 kB

Rooting

nvflash

In theory. In practice driver package from

is everything you need. It's from http://developer.nvidia.com/content/linux-tegra-release-12-alpha-1-released

fastboot.stock.bin

t61p:/home/dpavlin/Downloads/ldk/bootloader/alt# wget https://github.com/muromec/putusb/raw/master/bin/fastboot.stock.bin
--2011-09-12 20:40:17--  https://github.com/muromec/putusb/raw/master/bin/fastboot.stock.bin
Resolving github.com (github.com)... 207.97.227.239
Connecting to github.com (github.com)|207.97.227.239|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.github.com/muromec/putusb/master/bin/fastboot.stock.bin [following]
--2011-09-12 20:40:19--  https://raw.github.com/muromec/putusb/master/bin/fastboot.stock.bin
Resolving raw.github.com (raw.github.com)... 207.97.227.243
Connecting to raw.github.com (raw.github.com)|207.97.227.243|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 936016 (914K) [application/octet-stream]
Saving to: `fastboot.stock.bin'

100%[=====================================================>] 936,016      645K/s   in 1.4s    

2011-09-12 20:40:22 (645 KB/s) - `fastboot.stock.bin' saved [936016/936016]

t61p:/home/dpavlin/Downloads/ldk/bootloader/alt# md5sum fastboot.stock.bin 
9197365fb42c5801b4124e75ea00512c  fastboot.stock.bin

backup

Following instructions at http://gitorious.org/ac100/pages/Installation

t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash --bl fastboot.stock.bin --go
Nvflash started
rcm version 0X20001
System Information:
   chip name: t20
   chip id: 0x20 major: 1 minor: 2
   chip sku: 0x8
   chip uid: 0x1700618943a00317
   macrovision: disabled
   hdcp: enabled
   sbk burned: false
   dk burned: false
   boot device: emmc
   operating mode: 3
   device config strap: 0
   device config fuse: 0
   sdram config strap: 0

downloading bootloader -- load address: 0x108000 entry point: 0x108000
sending file: fastboot.stock.bin
| 936016/936016 bytes sent
fastboot.stock.bin sent successfully
waiting for bootloader to initialize
bootloader downloaded successfully


t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --getpartitiontable partitiontable.txt
Nvflash started
[resume mode]
Succesfully updated partition table information to partitiontable.txt


t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 2 part-2.img
Nvflash started
[resume mode]
receiving file: part-2.img, expected size: 3145728 bytes
/ 3145728/3145728 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 3 part-3.img
Nvflash started
[resume mode]
receiving file: part-3.img, expected size: 524288 bytes
/ 524288/524288 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# /nvflash -r --read 4 part-4.img
bash: /nvflash: No such file or directory
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 4 part-4.img
Nvflash started
[resume mode]
receiving file: part-4.img, expected size: 2097152 bytes
/ 2097152/2097152 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 5 part-5.img
Nvflash started
[resume mode]
receiving file: part-5.img, expected size: 5242880 bytes
/ 5242880/5242880 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 6 part-6.img
Nvflash started
[resume mode]
receiving file: part-6.img, expected size: 8388608 bytes
/ 8388608/8388608 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 7 part-7.img
Nvflash started
[resume mode]
receiving file: part-7.img, expected size: 1048576 bytes
/ 1048576/1048576 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 8 part-8.img
Nvflash started
[resume mode]
receiving file: part-8.img, expected size: 314572800 bytes
/ 314572800/314572800 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 9 part-9.img
Nvflash started
[resume mode]
receiving file: part-9.img, expected size: 419430400 bytes
/ 419430400/419430400 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 10 part-10.img
Nvflash started
[resume mode]
receiving file: part-10.img, expected size: 2097152 bytes
/ 2097152/2097152 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 11 part-11.img
Nvflash started
[resume mode]
receiving file: part-11.img, expected size: 524288 bytes
/ 524288/524288 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 12 part-12.img
Nvflash started
[resume mode]
receiving file: part-12.img, expected size: 1294991360 bytes
/ 1294991360/1294991360 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 13 part-13.img
Nvflash started
[resume mode]
receiving file: part-13.img, expected size: 524288 bytes
/ 524288/524288 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 14 part-14.img
Nvflash started
[resume mode]
receiving file: part-14.img, expected size: 5891424256 bytes
/ 5891424256/5891424256 bytes received
file received successfully



Linux

fetchrss: http://feeds.delicious.com/v2/rss/dpavlin/ac100?count=15
  • There was an error: 500 Can't connect to feeds.delicious.com:80 (Bad hostname 'feeds.delicious.com')


phh 2.6.32 kernel with working suspend and audio

t61p:/home/dpavlin/ac100/linux4tegra_10.9.3# LD_LIBRARY_PATH=./nvflash/ ./nvflash/nvflash --bl ./prebuilt/fastboot.stock.bin --read 6 tegra_partition_6.bin --go
Nvflash started
rcm version 0X20001
System Information:
   chip name: t20
   chip id: 0x20 major: 1 minor: 2
   chip sku: 0x8
   chip uid: 0x1700618943a00317
   macrovision: disabled
   hdcp: enabled
   sbk burned: false
   dk burned: false
   boot device: emmc
   operating mode: 3
   device config strap: 0
   device config fuse: 0
   sdram config strap: 0

downloading bootloader -- load address: 0x108000 entry point: 0x108000
sending file: ./prebuilt/fastboot.stock.bin
| 936016/936016 bytes sent
./prebuilt/fastboot.stock.bin sent successfully
waiting for bootloader to initialize
bootloader downloaded successfully
receiving file: tegra_partition_6.bin, expected size: 8388608 bytes
/ 8388608/8388608 bytes received
file received successfully



t61p:/home/dpavlin/ac100/linux4tegra_10.9.3# LD_LIBRARY_PATH=./nvflash/ ./nvflash/nvflash --wait --bl ./prebuilt/fastboot.stock.bin --download 6 ../32.boot.menu.v1.img --go
Nvflash started
rcm version 0X20001
System Information:
   chip name: t20
   chip id: 0x20 major: 1 minor: 2
   chip sku: 0x8
   chip uid: 0x1700618943a00317
   macrovision: disabled
   hdcp: enabled
   sbk burned: false
   dk burned: false
   boot device: emmc
   operating mode: 3
   device config strap: 0
   device config fuse: 0
   sdram config strap: 0

downloading bootloader -- load address: 0x108000 entry point: 0x108000
sending file: ./prebuilt/fastboot.stock.bin
| 936016/936016 bytes sent
./prebuilt/fastboot.stock.bin sent successfully
waiting for bootloader to initialize
bootloader downloaded successfully
sending file: ../32.boot.menu.v1.img
/ 8388608/8388608 bytes sent
../32.boot.menu.v1.img sent successfully

permalink
A33



meanIT tablet Q70

7" IPS Quad Core

recovery: extdroid4.4.2_r2-a33-v2.0

adb shell

dpavlin@siobhan:~$ adb shell
root@astar-ococci:/ #

root@astar-ococci:/ # cat /proc/cmdline                                        
console=ttyS0,115200 root=/dev/nandd init=/init loglevel=4 specialstr= partitions=bootloader@nanda:env@nandb:boot@nandc:system@nandd:data@nande:misc@nandf:recovery@nandg:cache@nandh:metadata@nandi:private@nandj:UDISK@nandk boot_type=0 config_size=39716

root@astar-ococci:/ # cat /proc/cpuinfo                                        
Processor       : ARMv7 Processor rev 5 (v7l)
processor       : 0
BogoMIPS        : 5714.28

processor       : 1
BogoMIPS        : 4800.00

processor       : 3
BogoMIPS        : 4800.00

Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5

Hardware        : sun8i
Revision        : 0000
Serial          : 1a884915


board

AL-AX3-751B-V1.0
2015.03.26

http://linux-sunxi.org/Aoson_M751s

https://github.com/Icenowy/linux-kernel-lichee-a33/tree/aoson-m751s

permalink
Android G1


If you are not into hardware Android development is better page for you.

Service manual

HTC Dream SM (A04).pdf

How to brick your phone

  • downgrade do RC29 to get root
  • this will install 1.22 radio
  • install AmonRA
  • be inpatient and flash DangerSPL
  • correct way would be to first flash Radio 2.22 (?)

How to unbrick your phone

Serial cable

ExtUSB connector

09167-01.jpg

09167-02.jpg

Nokia DKU-5

http://pinouts.ru/forum/index.php?PHPSESSID=f3d7d4eae7be553fc6847f227bda1330&topic=358.msg5390#msg5390

I got an ark3116-based DKU-5 cable, and its pin layout is as following.

1: blue (ground-shield)
3: yellow
4: orange (3.3v)
6: green (rx)
7: white (tx)
8: red (ground)

I haven't tested them yet, so before connecting them, check the voltage btw orange and red.

use only non-nokia CA-42 calble http://www.dealextreme.com/details.dx/sku.45715

home-made alternative

sim+cable strip

http://forum.xda-developers.com/showpost.php?p=7236424&postcount=724

output

x200:/virtual/openmoko# ./neocon/neocon /dev/ttyUSB0
[Open /dev/ttyUSB0]

boot reason: PM_KPD_PWR_KEY_ON_RT_ST

(PowerOn Status,Boot Reason)=(1,1)
NAND_FLASH_READ_ID : SAMSUNG_256MB_FLASH_128MB_SDRAM

ARM9_BOOT_MODE1

Boot loader

JTAG

G1_JTAG_signals.jpg

http://forum.xda-developers.com/showpost.php?p=6169249&postcount=481

arm-jtag-layout.gif

JTAG board with connector

product_1283419791_423993952_HTC_G1_RIFF_big.png

Low-power WIGGLER

Info

Reflash whole device: http://www.omnia-repair.com/forum/topic/htc-dream-g1-jtag/page/2

OpenMoko Debug Board

800px-Neo1973_debugboard_v3_top.jpg

ROM

http://code.google.com/p/htc-flasher/

Radio

recovery.img

http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images

Stats

camera+power

DREAM PVT 320 ENG S-OFF
HBOOT-1.33.2005 (DREA10000)
CPLD-4
RADIO-2.22.19.261
Apr 20 2009, 15:30:43

Board testpoints

Pictures are too large to be opened in browser!

permalink
HTC Dream G1 JTAG


related pages: Android G1 for JTAG info and Android development

JTAG

openocd

compilation

dpavlin@x200:/rest/cvs/openocd$ git remote -v
origin  git://openocd.git.sourceforge.net/gitroot/openocd/openocd (fetch)
origin  git://openocd.git.sourceforge.net/gitroot/openocd/openocd (push)
dpavlin@x200:/rest/cvs/openocd$ ./configure --enable-verbose --enable-verbose-usb-io --enable-ft2232_libftdi
dpavlin@x200:/rest/cvs/openocd$ make

info

flash

http://forum.xda-developers.com/showpost.php?p=6240836&postcount=503

If you have raw access to flash load a SPL+Recovery compatible with your radio

SPL starts at: 0x02400000 (block 288) hboot.img
Recovery starts at: 0x26c0000 (block 310) recovery.img

2005 SPL:

Tidus:spl ezterry$ ../fastboot-mac oem listpartition
... INFO[radio] start block=0, size=287 (36736 KB)
INFO[hboot] start block=288, size=6 (768 KB)
INFO[misc] start block=294, size=2 (256 KB)
INFO[mfg] start block=296, size=2 (256 KB)
INFO[sp1] start block=298, size=6 (768 KB)
INFO[misc2] start block=304, size=3 (384 KB)
INFO[mfg2] start block=307, size=3 (384 KB)
INFO[recovery] start block=310, size=40 (5120 KB)
INFO[boot] start block=350, size=20 (2560 KB)
INFO[system] start block=370, size=720 (92160 KB)
INFO[cache] start block=1090, size=240 (30720 KB)
INFO[userdata] start block=1330, size=718 (91904 KB)
INFO[cpld] start block=0, size=0 (0 KB)
INFO[microp] start block=0, size=0 (0 KB)
OKAY

Debugging

http://forum.xda-developers.com/showpost.php?p=6498820&postcount=621

That said before doing anything else take out your multi meter (and if you don't have one you are missing a tool for this type of work) and check the following:

blue-light mode

1) Put phone into blue light mode if serial is attached and power isn't: you will see bootmode 1

dpavlin@x200:/virtual/android$ ./neocon /dev/ttyUSB0 
[Closed]
[Open /dev/ttyUSB0]

boot reason: PM_KPD_PWR_KEY_ON_RT_ST

(PowerOn Status,Boot Reason)=(1,1)
NAND_FLASH_READ_ID : SAMSUNG_256MB_FLASH_128MB_SDRAM

ARM9_BOOT_MODE1
Invalid command : ?

v-ref = 2.6v

2) verify your v-ref is actually 2.6v (usually within 0.05v) when compared to the ground (any of the shielding) of the main board. You have one of the right points so there is an issue with the connection if its not.

oprnocd, trst-n = 2.6v

dpavlin@x200:/virtual/android/HTC-Dream-G1-JTAG$ sudo openocd 
Open On-Chip Debugger 0.4.0 (2010-02-23-17:04)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
dcc downloads are enabled
fast memory access is enabled
Info : clock speed 6000 kHz
Info : JTAG tap: arm9.cpu tap/device found: 0xa01700e1 (mfg: 0x070, part: 0x0170, ver: 0xa)
Info : Embedded ICE version 6
Info : arm9: hardware has 2 breakpoint/watchpoint units

3) now start open ocd: and check that trst-n is now also 2.6v when compared to ground. (if not your adapter is not working with the 2.6v.. very possible)

nTRST must be at high level (~2.6V) after openocd is launched.
With nTRST sticking low the MSM7201A debug unit is in reset state.

Maybe you'll have to tweak the cfg file. There are several options for the behaviour of nTRST.
If you don't manage to find a working cfg, you may cut the nTRST connection to your adaptor and pull the Dream's nTRST signal to Vref=2.6V permanently.
Normally this should also work... the debug unit will then leave reset state immediately after power up.

Maybe you'll have to tweak the cfg file. There are several options for the behaviour of nTRST.
If you don't manage to find a working cfg, you may cut the nTRST connection to your adaptor and pull the Dream's nTRST signal to Vref=2.6V permanently.
Normally this should also work... the debug unit will then leave reset state immediately after power up.

soldering

4) with that done and you are still having problems as we said before check the soldering work.. Here there are two possibilities:

    A) bridges - the wire is in contact with something in addition to the testpoint
    B) bad joints - while the wire may act attached it is not. (Others must be able to explain this better than myself..)

    The tiniest bit of flux goes a long way here..

    One quick thing you can test is that none of the 5 test points are connected to ground (disconnect rtck for now its one less variable) and that none are shorted to eachother.

other

Other things to check:

  • How long are the wires.. My setup runs much faster and the wires are not exactly short .. but the more wire the more chance for noise..
  • is the speed acceptable with the parport (if this is a real parport I'll hope openocd has sane defaults but it is something to keep in mind)
  • phone is in blue light mode (the phone can disable the jtag port.. this happens when amss is booted either via the GO2AMSS command or when the linux kernel is started. I also have no issue connecting to JTAG while the battery is charging.
  • Ensure the openocd application is not running when you boot the phone.

softload radio ROM

dpavlin@x200:~$ nc 127.0.0.1 4444
��������Open On-Chip Debugger
> halt
halt
cp15 read operation timed out
cp15 read operation timed out
cp15 read operation timed out
cp15 read operation timed out
cp15 read operation timed out
cp15 read operation timed out
cp15 write operation timed out
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x00907aa0
MMU: disabled, D-Cache: enabled, I-Cache: enabled

> load_image /home/dpavlin/ipad/jtag-g1/flash/radio-3.22.26.17_dream.img 0x103B5300
load_image /home/dpavlin/ipad/jtag-g1/flash/radio-3.22.26.17_dream.img 0x103B5300
No working memory available. Specify -work-area-phys to target.
no working area available, falling back to memory writes
22020096 bytes written at address 0x103b5300
downloaded 22020096 bytes in 1208.393921s (17.796 kb/s)
> resume
resume
> shutdown
shutdown
permalink
Android development

I will try to collect here useful tips for making Android development work for command-line loving person like me. See Android G1 if you are interested in hardware.



ADB

Part of http://developer.android.com/sdk/index.html

Remote adb access

dpavlin@t61p:~/Downloads/android$ adb shell
# setprop service.adb.tcp.port 5555

dpavlin@t61p:~$ ssh -R 5555:192.168.1.40:5555 klin

dpavlin@klin:~$ adb connect 127.0.0.1:5555

dpavlin@klin:~$ adb devices
List of devices attached 
127.0.0.1:5555  device

provision device

adb shell
su
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
INSERT INTO system (name, value) VALUES ('device_provisioned', 1);
.exit

CyanogenMod

Google apps

dpavlin@android:/srv/cyanogen$ wget \
--referer=http://developer.htc.com/google-io-device.html \
-O dream_sapphire_update.zip \
http://member.america.htc.com/download/RomCode/ADP/signed-google_ion-ota-14721.zip?
--2010-10-01 17:42:10--  http://member.america.htc.com/download/RomCode/ADP/signed-google_ion-ota-14721.zip?
Resolving member.america.htc.com... 216.139.227.226
Connecting to member.america.htc.com|216.139.227.226|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 53965203 (51M) [application/x-zip-compressed]
Saving to: `dream_sapphire_update.zip'

100%[=========================================================================>] 53,965,203   376K/s   in 2m 29s  

2010-10-01 17:44:39 (354 KB/s) - `dream_sapphire_update.zip' saved [53965203/53965203]

dpavlin@android:/srv/cyanogen$ cd device/htc/dream_sapphire
dpavlin@android:/srv/cyanogen/device/htc/dream_sapphire$ ./unzip-files.sh

Build

A lot of host dependencies to install and build.

dpavlin@android:/srv/cyanogen$ . build/envsetup.sh
dpavlin@android:/srv/cyanogen$ lunch
dpavlin@android:/srv/cyanogen$ make -j8

flashing

Transfer files you just built:

dpavlin@x200:/virtual/android/cyanogen$ rsync -v android:/srv/cyanogen/out/target/product/dream_sapphire/{boot.img,recovery.img,system.img,android-info.txt} 2010-09-25/

Download fastboot from http://developer.htc.com/adp.html

Start G1 by pressing camera+power button

dpavlin@x200:/virtual/android/cyanogen$ sudo ./fastboot devices
HT840GZ00000    fastboot

dpavlin@x200:/virtual/android/cyanogen$ sudo sh -c "ANDROID_PRODUCT_OUT=2010-09-25/ ./fastboot flashall"
--------------------------------------------
Bootloader Version...: 1.33.2005
Baseband Version.....: 2.22.19.26I
Serial Number........: HT840GZ33728
--------------------------------------------
checking product... OKAY
checking version-bootloader... OKAY
sending 'boot' (2234 KB)... OKAY
writing 'boot'... OKAY
sending 'recovery' (3308 KB)... OKAY
writing 'recovery'... OKAY
sending 'system' (92239 KB)... OKAY
writing 'system'... OKAY
rebooting... 

SL4A

x86

froyo 2.2

dpavlin@android:/srv/android-x86$ repo init -u git://git.android-x86.org/manifest.git -b froyo-x86
dpavlin@android:/srv/android-x86$ repo sync

# configure build
dpavlin@android:/srv/android-x86$ . build/envsetup.sh
dpavlin@android:/srv/android-x86$ lunch

# build
dpavlin@android:/srv/android-x86$ make -j8

audio doesn't work

alternativly, you can build generix_x86

We need /sbin in PATH to access e2fsprogs utilities needed to build image

dpavlin@android:/srv/android-x86$ export PATH=/sbin:$PATH
dpavlin@android:/srv/android-x86$ make -j8 iso_img TARGET_PRODUCT=generic_x86

eclair 2.1

dpavlin@android:/srv/android-x86$ repo init -u git://git.android-x86.org/manifest.git -b eclair-x86
dpavlin@android:/srv/android-x86$ repo sync
dpavlin@android:/srv/android-x86$ make -j8 iso_img TARGET_PRODUCT=generic_x86
# doesn't work

dpavlin@android:/srv/android-x86$ make -j8 iso_img TARGET_PRODUCT=eeepc

Application build process

repo

repack applications

repository with scripts


permalink
Weblog Navigation
Loading...
Weblog Archives
  • Loading...