
Reverse engineering Android from binary to source - dmitrygr
http://dmitry.gr/index.php?r=06.%20Thoughts&proj=06.%20Android%20M%20on%20zWatch
======
danjayh
This article is fascinating, and having done board bringup work, I understand
the challenges that the author faced. He did absolutely top-notch work.
Getting a board that does _nothing_ , has no debugger, no output of any kind
going is really hard. However, to me the most important quote in the story is
this:

> As per the GPL (under which the Linux kernel is licensed), the manufacturer
> had to have provided a written offer of sources. Needless to say that a
> random chinese company (SmartQ, currently owned by Huami) does not care even
> a little about this sort of thing. I checked theit site every which way I
> could, and found no sources. Emaling them produced no reply, of course. Of
> course, why would it? I tried to find some people on LinkedIn who might
> help, but I was told in no uncertain terms to go away.

With increasing amounts of SW development moving to low-cost countries, this
sort of attitude may well eventually destroy the availability of the 'free'
software that these manufacturers rely on (besides hurting the GPL + homebrew
firmware communities).

~~~
userbinator
On the other hand, how the Chinese system of "openness" works means that
detailed hardware documentation is often freely available if you know where to
look, even that which would be NDA'd and basically impossible to get from a
Western company:

[http://www.bunniestudios.com/blog/?p=4297](http://www.bunniestudios.com/blog/?p=4297)

Consider if the SoC was from Broadcom or Qualcomm or some other Western
company. You'd probably be able to get source code, but having that doesn't
show as much about what else the hardware can do as they're not going to share
datasheets with you (and there's unlikely to be anyone willing to leak them
either.)

Edit: have you looked at Ingenic's site? They have what appears to be Linux
source code available:

[http://www.ingenic.cn/en/?product/id/6/lm/1.html](http://www.ingenic.cn/en/?product/id/6/lm/1.html)

~~~
dmitrygr
Ingenic does. Which is of no help as it has no drivers for this watch. See
last paragraph of my article

------
mrlambchop
dimity - nice hack :)

I'd argue that the most critical piece of work is power management for the
watch. Did this magically port over or does the system just run at full whack?

Cheers,

Nick

~~~
dmitrygr
Android does power management relatively well. In the kernel I am working on
(the one I mentioned in the end - the almost-working one) I have a few cool
hacks I am trying, like using the JZ4775's DMA engine as a sensor hub (it is a
small MIPS cpu that cna run arbitrary code)

------
mfincham
What I'm interested in is running Debian and X on the watch... any pointers?

~~~
dmitrygr
It already has a linux kernel with WiFi support. Android build tools will
happily package your ramdisk together with the kernel into an android boot
image. The "system" image you provide to the unbricking tool will be written
unmodified unto the system partition.

That is to say that the work is all done for you. Enjoy :)

~~~
mfincham
Cheers. Sounds promising :)

