yashsingh1/xdaforums huggingface dataset:
[HD Mini Android Development] -r0bin-:
i figured out a little bit more:

this is based from smd.c

smem_alloc => smem_find => smem_item

shared memory = MSM_SHARED_RAM_BASE

you can search through the struct "smem_shared" to get the full size etc

see function smem_item() in arch/arm/mach-msm/smd.c
[HD Mini Android Development] -r0bin-:
I asked the author, here is the answer:

how do we know if winmo uses RPC or Dex (?dex?)

what is a9 ? 1 wire batt?
[HD Mini Android Development] pwel:
just checked the MAXIM site:

1-wire and 2-wire are interfaces used by their battery monitor chip (e.g. DS2438 is using Unique 1-Wire interface: requires only one port pin for communication whereas the DS2746 uses a 2-wire interface).

A9? No idea yet.
[HD Mini Android Development] -r0bin-:
just use haret console for that

but we don't have the exact offsets, i guess this can be deducted from the winmo dlls?
[HD Mini Android Development] -r0bin-:
use haret console:

#pdump 0x0FF00000 1000
[HD Mini Android Development] -r0bin-:
check this: http://www.theknotter.net/system-memory-dumps-on-linux/

try something like:

dd if=/dev/mem skip=0x0FF00000 count= 1024
[HD Mini Android Development] -r0bin-:
try /bin/dd instead of dd
[HD Mini Android Development] -r0bin-:
so it works ?
[HD Mini Android Development] schlund:
Hey,

while reading on the kernel source, i've rewritten the softbutton alignment.

would be nice if you add this to your source, and maybe you are so nice to compile it for me, my Linux machine is, ehm, in gf's use :)

thank you!

static ssize_t liberty_virtual_keys_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
if (system_rev > 1) {
/* center: x: call: 32, home: 96, menu: 160, back: 224, endcall: 288, y: 580 */
return sprintf(buf,
__stringify(EV_KEY) ":" __stringify(KEY_CALL)	":32:580:50:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_HOME)	":96:580:50:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_MENU) ":160:580:50:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_BACK) ":224:580:50:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_ENDCALL) ":288:580:50:55"
"\n");
} else {

/* center: x: call: 32, home: 96, menu: 160, back: 224, endcall: 288, y: 580 */
return sprintf(buf,
__stringify(EV_KEY) ":" __stringify(KEY_CALL) ":32:580:64:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_HOME) ":96:580:64:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_MENU) ":160:580:64:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_BACK) ":224:580:64:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_ENDCALL) ":288:580:64:55"
"\n");
}
}

this is at about line 1050 in board-photon.c
[HD Mini Android Development] -r0bin-:
done! (not tested yet)
[HD Mini Android Development] schlund:
well,

its not working :D

gonna fix that,

depending on the latest changes: battery show to be charged, without wired :) also LED is red without flashing.

it realises usb contact but not disconnecting..
[HD Mini Android Development] -r0bin-:
yes, this is known behavior, we are working on battery :)

damn somehow the SMEM for battery is not initialized by the ARM9, I don't understand why???

edit: do you guys know anything about DEX calls?

seems to be a specific RPC for WinCE, used in Leo and Raphael...
[HD Mini Android Development] schlund:
think i got the mistake, heres new code, dont know if the send and end buttons work .. :D

static ssize_t liberty_virtual_keys_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
if (system_rev > 1) {
/* center: x: call: 32, home: 96, menu: 160, back: 224, endcall: 288, y: 580 */
return sprintf(buf,
__stringify(EV_KEY) ":" __stringify(KEY_SEND)	":32:580:50:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_HOME)	":96:580:50:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_MENU) ":160:580:50:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_BACK) ":224:580:50:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_END) ":288:580:50:55"
"\n");
} else {

/* center: x: call: 32, home: 96, menu: 160, back: 224, endcall: 288, y: 580 */
return sprintf(buf,
__stringify(EV_KEY) ":" __stringify(KEY_SEND) ":32:580:64:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_HOME) ":96:580:64:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_MENU) ":160:580:64:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_BACK) ":224:580:64:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_END) ":288:580:64:55"
"\n");
}
}
[HD Mini Android Development] -r0bin-:
here you goooo :)

test: the offset alignment is good, but soft buttons not working :(
[HD Mini Android Development] _Madmatt:
Have you got wifi working? :) Or fixed battery? Or maybe GPRS? :D
[HD Mini Android Development] dakkato:
....or SD Card works? :D
[HD Mini Android Development] rasoooli:
...or microphone? or 3.5mm output jack ? :D
[HD Mini Android Development] mooncmn:
thank you but i want to know how your changes work and there representitation.just tell me what's new. thank you~
[HD Mini Android Development] schlund:
good job, thank you!

on first view, i think there is no major difference to 2.6.29.

i dont know atm what changes you did to cotullas port (or if you did changes?!)
[HD Mini Android Development] fatslim:
So, i tryed the new one, battery is the same, only thing that bothers me is that my battery get to warm, and it drains it fast. Wifi is not working, shows inly error under it, cant even check it. basicly its the same, but it was a lil bit slower than the previous version.
[HD Mini Android Development] _Madmatt:
This will enable WiFi, right? As our WiFi chip is now supported? :)
[HD Mini Android Development] _Madmatt:
So if I understand you good, you just need the correct config and it will work? :)
[HD Mini Android Development] -r0bin-:
did you enabled this option in kernel? in android?
[HD Mini Android Development] _Madmatt:
@Cardsharing: I tested your zImage and when I start WiFi it gives me the error immediately and not after a while...
[HD Mini Android Development] schlund:
i would like to put it on the image as soon as it is running :)

my connection is not that fast so it would take me to much time to upload..

i would make an exception if some developer needs it ;)
[HD Mini Android Development] codiak:
Howto open the .ext2 image under windows7? Tried several programs and none worked.

I would like to add the files by myself and upload the modified image it.
[HD Mini Android Development] wismar:
may be it must be

static ssize_t liberty_virtual_keys_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
if (system_rev > 1) {
/* center: x: send: 32, home: 96, menu: 160, back: 224, end: 288, y: 580 */
return sprintf(buf,
__stringify(EV_KEY) ":" __stringify(KEY_SEND)	":32:580:50:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_HOME)	":96:580:50:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_MENU) ":160:580:50:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_BACK) ":224:580:50:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_END) ":288:580:50:55"
"\n");
} else {

/* center: x: send: 32, home: 96, menu: 160, back: 224, end: 288, y: 580 */
return sprintf(buf,
__stringify(EV_KEY) ":" __stringify(KEY_SEND) ":32:580:64:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_HOME) ":96:580:64:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_MENU) ":160:580:64:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_BACK) ":224:580:64:55"
":" __stringify(EV_KEY) ":" __stringify(KEY_END) ":288:580:64:55"
"\n");
}
}
[HD Mini Android Development] 15131331231:
why not add this to source?compile it,I want to test whether it works or not.
[HD Mini Android Development] -r0bin-:
yes we'll do it, but please wait, devs are not working 24h 7/7

:)
[HD Mini Android Development] schlund:
well,

not working atm, i will have to compile this by my self to read the errors and debug this...

will be added as soon as it is working :)

and @wismar:

changing the comment-line would not have any effect :P
[HD Mini Android Development] Tluenn:
if some one tell me,

where i can download the copmiler.

i did compile it.

and then ip post the file...
[HD Mini Android Development] derefas:
sources compiled under linux os, for example ubuntu
[HD Mini Android Development] -r0bin-:
good job schlund!
[HD Mini Android Development] schlund:
i've not tested yet. how is it working ?
[HD Mini Android Development] mqd:
seem to work perfectly good job

i have test sms and game aligment is perfect

home button, menu button, and return work

"unhook" and "hang up" button dont work

map search and "unhook" would be great
[HD Mini Android Development] -r0bin-:
Have a look at the HTC Leo implementation (phone is closer to ours)

http://git.linuxtogo.org/?p=groups/...7aae64fcba8c37e0;hb=refs/heads/htc-msm-2.6.32

#if defined(CONFIG_HTCLEO_KEYMAP_DPAD)
[KEYMAP_INDEX(0, 0)] = KEY_LEFT, // Volume Up
[KEYMAP_INDEX(0, 1)] = KEY_RIGHT, // Volume Down
[KEYMAP_INDEX(1, 0)] = KEY_DOWN, // Windows Button
[KEYMAP_INDEX(1, 1)] = KEY_ENTER, // Dial Button
[KEYMAP_INDEX(1, 2)] = KEY_END, // Hangup Button
[KEYMAP_INDEX(2, 0)] = KEY_UP, // Back Button
[KEYMAP_INDEX(2, 1)] = KEY_LEFTALT, // Home Button
#endif

you can see they use "KEY_END" to hangup, and "KEY_ENTER" to dial

i don't know if we can implement as easy as this, but if it does not works, we could take their "board-htcleo-keypad.c" and adapt it for our photon.
[HD Mini Android Development] ToughGuy:
HI cardsharing

I used this and replaced zImage,button is working but the battery does not working. this normal?
[HD Mini Android Development] ToughGuy:
in this:http://xdaforums.com/showpost.php?p=12503970&postcount=380

i use this,Battery working(Not perfect) but Button does not work.My battery did not explode,heh:D
[HD Mini Android Development] 15131331231:
I replaced zimage and replaced keypad.kl in android.then type the adb command,it says finish,but the buttonsstill out of work,why?
[HD Mini Android Development] schlund:
it is anoying to read this support-questions from NOT-developers in a DEVelopers thread. please stop spamming this thread. if you dont stop this, the developers wont read it anymore.
[HD Mini Android Development] -r0bin-:
new zimage for developers:

i activated the debug frame buffer when android is booting, with linux debug messages (=dmesg in real time), looks like matrix now ^^

it is sometimes corrupting a little bit the display, that's probably why cotula deactivated it. probably the ram addr used for console is wrong, but who cares, it is sooo useful to debug linux drivers when they crash at startup and you dont know why!

edit: i forgot, you must put this line (uncomment) in your startup.txt:

set cmdline "rw console=ram1"
[HD Mini Android Development] schlund:
well, either my eyes are to slow or texts running to fast :)
[HD Mini Android Development] -r0bin-:
sure, this is only to impress your gf (worked for me) :D

but there is a way to put a delay between each output message

and when you test new code for photon, at least you see where the code stops.

if it interests you i can upload the source code, but it's not really clean

(actually i didnt code anything, just reused what was already available)
[HD Mini Android Development] -r0bin-:
ok i will upload later.

i use the latest version on git (included the keypad modifications of schlund), but i dont use the battery driver because it doesnt work well with adb.
[HD Mini Android Development] derefas:
so blackstone have same pm chip

and in board file have block of code like this

static smem_batt_t msm_battery_pdata = {
.gpio_battery_detect = BLAC100_BAT_IRQ,
.gpio_charger_enable = BLAC100_CHARGE_EN_N,
.gpio_charger_current_select = BLAC100_USB_AC_PWR,
.smem_offset = 0xfc110,
.smem_field_size = 2,
};

ps:https://gitorious.org/linux-on-qual....6.27/arch/arm/mach-msm/board-htcblackstone.c

pss: in this kernel system batteries built very differently

i think the first what we will do

1) remake power drivers like blackstone

2)remake htc_battery

3)remake board file

and test this kernel

update

i found , in blackstone kernel usb info in htc_usb

i our kenrel in board_photon
[HD Mini Android Development] marco1530:
mmm problem fotocamera :confused: help
[HD Mini Android Development] malymarcin:
OMG and anothher noob... stop with stupid questions...

I am watching this thread from the beginning, and others associated with the android on the hd mini. Unfortunately I can not bring anything from my side so I just read the entries and wait. Proposes to do the same. This is not the final release, and the problems are slowly being eliminated.
[HD Mini Android Development] -r0bin-:
that's right.

photon offset is supposed to be in battdrvr.dll, if you manage to understand assembly then we fix the battery driver!

alternativaly, if someone has the software HexRays decompiler for ARM:

http://www.hex-rays.com/decompiler.shtml

then please let me know, we could decompile the DLL and understand it more easily
[HD Mini Android Development] -r0bin-:
thanks guys for your help!

desquirr is awesome!

well, i was able to compare battdrvr.dll from Leo and from Mini: they are almost identical in terms of structure, it's surprising.

need to investigate a little more to understand the algorithm, but at least this is more human readable :-)

and just a little detail: the previous photon battdrvr.dll we had did not include all the debug information!

attached htc leo dll + photon dlls i extracted with more debug information, this is much more clear

hope this helps
[HD Mini Android Development] -r0bin-:
ok, maybe i was a little bit too optimistic:

the structure itself is similar, but there is very specific code to both phones.

and bad news, there are no references to ds2746 in photon dll (in leo you have) thus we still need to investigate that.

edit: i confirm photon use DEX and not ds2746
[HD Mini Android Development] -r0bin-:
great! does it means we can install apps from android market?

edit: sorry i didnt read the full post ^^ good job dude
[HD Mini Android Development] lucaogame:
I'd want to make you notice that when i lock the screen, the lights of the screen buttons on bottom of our photon still turned on. Sorry for the intrusion. ^^
[HD Mini Android Development] schlund:
@lucaogame:

i have already taken a look on it, could be possible that this only needs a small fix. but i am focused on battery atm

@cardsharing:

great job man! I am interested in how you solved this
[HD Mini Android Development] schlund:
it is working from kernel side.. problem is android sets it to SLEEP mode all the time ..
[HD Mini Android Development] ncla2000:
hi developers,i have some tests.

1. voice in the carpanel >> voice search .If i plug in the headset and then remove it,the micro works in about three secands, and weaker in one minute ,,,hardly blow to it it works,maybe....

2.settings call hearing aids reboot
[HD Mini Android Development] _Madmatt:
Hey CardSharing,

I have downloaded your 06.04.2011.rar yesterday and after some trouble getting HaRET to work, I could start the thing ;D

So far, I have experienced one problem. When I try to connect to a hidden WiFi network that is protected by WPA2 Personal, Android keeps saying that the network isn't available. However, I was next to the antenna...

And one more thing, I had the impression that Schlunds 2.2 image was faster, don't know how this comes...

Anyway, good work guys!
[HD Mini Android Development] codiak:
Hi Madmatt

I´m also using a hidden WPA2 protected Wifinetwork. I dont have problems.

Are you sure you have no typo in ssid or password?

My impression also is that schlunds images was a bit fastert.

But after disabling some services, the new images is quit fast!

Hope this helps.
[HD Mini Android Development] _Madmatt:
Hi Codiak,

And do you have AES instead of TKIP encryption? That is an option I couldn't choose in my options in Android...
[HD Mini Android Development] codiak:
It does not make a difference for me if I choose that or not.

If I dont choose the encryptiontype, android choose it automaticly.
[HD Mini Android Development] _Madmatt:
Well, isn't that an issue? ;) I think I found the problem. Android says my MAC address is 00:11:22:33:44:55. How can I put my real one in there?
[HD Mini Android Development] codiak:
You are right cardsharing...

_Madmatt: Lets discuss your wifi problem here
[HD Mini Android Development] derefas:
So making some global changes to G-sensor driver, compiling - testing , if all works i'll put here new files for kernel
[HD Mini Android Development] derefas:
So calibration work, but in games g-sensor in sleep mode, i think problwm with power managment...

calibration

Found.. my teory about problem with power managment is true

We have problem with backlight

And in log in sector with bma we see

I think we must make worked battery driver and backlight , and g-sensor will be work
[HD Mini Android Development] -r0bin-:
dont worry were working on it. im on battery, i only need the smem offset + dex, trying to analyse battdrvr.dll.

for microphone, this is the wrong file.

htc_acoustic is only for usage of bluetooth headphones.

mic code is in qdsp5_comp, file is audio_in.c + other files in qdsp.
[HD Mini Android Development] utsavkoju:
Just don't give up your job cardsharing.

we count on you and robin. i just like to join you people but can't. i have learnt about programing languages but i just don't know from where do i start helping you guys. If only i know how to start i would be happy helping you people.

please don't stop your job guys.
[HD Mini Android Development] 15131331231:
It seems so difficult to dev.maybe we should ask for help from other devs.why do not pm Cotulla?maybe he can give we some good suggestions.
[HD Mini Android Development] ncla2000:
CPU0

0: 2339 msm smd_dev

1: 0 msm debug

5: 1 msm smsm_dev

7: 0 msm gp_timer

8: 847699 msm dg_timer

16: 58319 msm mddi

19: 23741 msm msm_mdp

20: 24280 msm kgsl

21: 58591 msm msmdatamover

23: 13364 msm adsp

24: 21223 msm msm-sdcc (cmd)

25: 7119 msm msm-sdcc (pio)

26: 95359 msm msm-sdcc (cmd)

27: 1 msm msm-sdcc (pio)

34: 532506 msm msm_i2c

47: 0 msm msm_hsusb

84: 4 msmgpio gpio_keys

85: 1 msmgpio capella_cm3602

93: 3387 msmgpio bcmsdh_sdmmc

102: 0 msmgpio msm-sdcc (slot)

103: 183 msmgpio microp_intrrupt

104: 0 msmgpio gpio_kp

105: 0 msmgpio gpio_kp

106: 0 msmgpio gpio_kp

147: 1 msmgpio 35mm_headset

150: 1 msmgpio debug-wakeup

158: 33640 msmgpio synaptics-t1021

161: 21623 msmgpio vsync

270: 183 microp lightsensor_microp

Err: 0
[HD Mini Android Development] ncla2000:
00200000-0c1fffff : System RAM

00327000-006b9fff : Kernel text

006ba000-0080d583 : Kernel data

0cb00000-0cbfffff : ram_console

20000000-201fffff : msm_panel.1

20200000-204fffff : kgsl_phys_memory

20200000-204fffff : kgsl

a0000000-a001ffff : kgsl_reg_memory

a0000000-a001ffff : kgsl

a0200000-a0200fff : msm_serial_hs_bcm.0

a0400000-a0400fff : msm_sdcc.1

a0500000-a0500fff : msm_sdcc.2

a0800000-a0801000 : msm_hsusb

a9900000-a9900fff : msm_i2c.0

a9900000-a9900fff : msm_i2c

a9c00000-a9c00fff : msm_serial.2

a9c00000-a9c00fff : msm_serial

aa200000-aa2fffff : mdp

aa600000-aa600fff : msm_mddi.0

where is smem,i haven`t found it. without the root i cannot kill anything getting from bubybox ps (terminal emulator)
[HD Mini Android Development] schlund:
smem is at physical 0x0FF00000 and virtual 0xF8100000 (in android) with size 1M.

well, i remapped memory to get access to all memory.(~like in liberty)

CHANGES:

board-photon.h

...
#include <mach/board.h>

// Schlund's theory:
// bank 0:
// BASE: 0x00000000
// SIZE: 0x0CC00000 -> 204M
// bank 1:
// BASE: 0x20000000
// SIZE: 0x08000000 -> 128M
// unknown & unused? bank:
// BASE: 0x0F200000
// SIZE: 0x00D00000 -> 13M
//
#define MSM_MEM1_BASE	0x00000000
#define MSM_MEM1_SIZE	0x0CC00000

#define MSM_MEM2_BASE	0x20000000
#define MSM_MEM2_SIZE	0x08000000

#define MSM_LINUX_BASE_OFFSET	0x00200000

#define MSM_MM_HEAP_SIZE 0x02A00000

#define MSM_PHOTON_LINUX1_BASE (MSM_MEM1_BASE + MSM_LINUX_BASE_OFFSET) /* 2MB alignment */
#define MSM_PHOTON_LINUX1_SIZE (MSM_MEM1_SIZE - MSM_LINUX_BASE_OFFSET)

#define MSM_PHOTON_LINUX2_BASE MSM_MEM2_BASE /* 2MB alignment */
#define MSM_PHOTON_LINUX2_SIZE (MSM_MEM2_SIZE - MSM_MM_HEAP_SIZE)

#define MSM_FB_BASE MSM_MEM2_BASE + MSM_MEM2_SIZE - MSM_MM_HEAP_SIZE
#define MSM_FB_SIZE 0x00200000 // 2M

#define MSM_GPU_MEM_BASE MSM_FB_BASE + MSM_FB_SIZE
#define MSM_GPU_MEM_SIZE 0x00300000 // 3M

#define MSM_PMEM_MDP_BASE MSM_GPU_MEM_BASE + MSM_GPU_MEM_SIZE
#define MSM_PMEM_MDP_SIZE 0x01000000 // 16M

#define MSM_PMEM_ADSP_BASE MSM_PMEM_MDP_BASE + MSM_PMEM_MDP_SIZE
#define MSM_PMEM_ADSP_SIZE 0x00C1B000 // ~12M

#define MSM_PMEM_CAMERA_BASE MSM_PMEM_ADSP_BASE + MSM_PMEM_ADSP_SIZE
#define MSM_PMEM_CAMERA_SIZE 0x00800000 // 8M

#define MSM_RAM_CONSOLE_BASE 0x00100000
#define MSM_RAM_CONSOLE_SIZE SZ_1M

#define LIBERTY_GPIO_TO_INT(x) (x+64) /* from gpio_to_irq */
...

board-photon.c:

static void __init photon_fixup(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
mi->nr_banks=1;
mi->bank[0].start = MSM_PHOTON_LINUX1_BASE;
mi->bank[0].node = PHYS_TO_NID(mi->bank[0].start);
mi->bank[0].size = MSM_PHOTON_LINUX1_SIZE;

mi->nr_banks++;
mi->bank[1].start = MSM_PHOTON_LINUX2_BASE;
mi->bank[1].node = PHYS_TO_NID(mi->bank[1].start);
mi->bank[1].size = MSM_PHOTON_LINUX2_SIZE;

printk(KERN_INFO "fixup: nr_banks = %d\n", mi->nr_banks);
printk(KERN_INFO "fixup: bank0 start=%08lx, node=%08x, size=%08lx\n", mi->bank[0].start, mi->bank[0].node, mi->bank[0].size);
printk(KERN_INFO "fixup: bank1 start=%08lx, node=%08x, size=%08lx\n", mi->bank[1].start, mi->bank[1].node, mi->bank[1].size);
}

msm_iomap.h:

#define MSM_RAMCONSOLE_BASE IOMEM(0xF9100000)
#define MSM_RAMCONSOLE_PHYS	0x00100000 //0x26900000
#define MSM_RAMCONSOLE_SIZE	SZ_1M

feel free to test this and add to kernel source :)
[HD Mini Android Development] -r0bin-:
what schlund is not saying is, thanks to his fix, we have 128Mo RAM more in android!

= android faster!

this was not easy, great job schlund!
[HD Mini Android Development] -r0bin-:
smem attached.

use haret:

#pdump 0x0FF00000 0x100000 (it output to screen, but you can get from haret automatic logs)

or

#pwf smem.txt 0x0FF00000 0x100000 (it output to file, in SDCard)

note that you can use 0x0FF00000 as physical address, or 0x0ACC00000 for virtual address
[HD Mini Android Development] -r0bin-:
no, smem android is not 100% equal to winmo

parts of smem are not used in android:

if we do not initialize correctly the drivers, such as battery, it will not be used.

for battery, my understanding is, we must use DEX call to ask the ARM9 to populate SMEM with battery status. This is what i understand when I look at battdrvr.dll and compare them to Raphael, Topaz and Leo.

Raphael and Topaz use DEX and SMEM for battery info.

Leo uses I2C to communicate with DS2746 chip, which is not our case.

i tried to import battery management from Raphael, it shows battery 100% because bad SMEM value, and battery DEX call is always timeout.

thus, i dumped the WinMo smem to try to find the correct battery offset.

unfortunately so far i could not match battery values (voltage, current, percent) with SMEM values.

Im still searching for it:

if anybody has an idea it is welcome :-)
[HD Mini Android Development] derefas:
robin, give me raphael "patch" for battery i am working with battdrv.dll with ida

ps: tps65200.c in i2c/chips battery connection\

tps65200.h used htc_battery.h

i think for test use hd2 offset , this test failed in 99% i think, but...

so..

.text:100013B0 aGetbatteryin_0 unicode 0, <GetBatteryInfo adc_battery.dwBattID=%d, type=%d, pda=%d, >

.text:100013B0 unicode 0, <pdb=%d>
[HD Mini Android Development] schlund:
If someone knows, i am also interested in how to dump memory on android :D
[HD Mini Android Development] derefas:
http://www.digchip.com/datasheets/parts/datasheet/477/TPS65200-pdf.php
[HD Mini Android Development] -r0bin-:
i guess something like:

dd if=/dev/mem bs=4096 skip=0x0FF00000 count=0x100000

ill try to upload src later, now its not clean and many files modified.

derefas, how do you know photon uses tps65200 ?

you can look into my smem dump if offset makes sense

but im really wondering now if this information is in smem, because it was impossible for me to make it match.

im investigating memory mapping under windows mobile, i got platform builder 6.0 it's full of usefull information and source code.
[HD Mini Android Development] schlund:
can't confirm that too...