upload android base code part9

This commit is contained in:
August 2018-08-08 20:16:11 +08:00
parent 5425409085
commit 071cdf34cd
2679 changed files with 329442 additions and 0 deletions

190
android/sdk/emulator/NOTICE Normal file
View file

@ -0,0 +1,190 @@
Copyright (c) 2005-2014, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

View file

@ -0,0 +1,11 @@
# Copyright 2006 The Android Open Source Project
LOCAL_PATH:= $(call my-dir)
# host executable
#
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= src/source/mksdcard.c
LOCAL_MODULE = mksdcard
include $(BUILD_HOST_EXECUTABLE)

View file

@ -0,0 +1,190 @@
Copyright (c) 2005-2014, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

View file

@ -0,0 +1,51 @@
apply plugin: 'c'
apply plugin: 'sdk-files'
apply plugin: 'native-setup'
executables {
mksdcard {}
}
sources {
mksdcard {
c {
source {
srcDir "src/source"
include "**/*.c"
}
}
}
}
binaries.all {
cCompiler.args "-D_FILE_OFFSET_BITS=64"
}
sdk {
mac {
item( { getExeName("darwin") } ) {
executable true
builtBy 'darwinMksdcardExecutable'
}
}
linux {
item( { getExeName("linux") } ) {
executable true
builtBy 'linuxMksdcardExecutable'
}
}
windows {
item( { getExeName("windows32") } ) {
name 'mksdcard.exe'
builtBy 'windows32MksdcardExecutable'
}
}
}
def getExeName(String platform) {
// binaries will return a set of binaries
def binaries = executables.mksdcard.binaries.matching { it.name == "${platform}MksdcardExecutable" }
// calling .exeFile on the set returns an array with the result from each item in the set...
return binaries.executableFile.get(0)
}

View file

@ -0,0 +1,329 @@
/* mksdcard.c
**
** Copyright 2007, The Android Open Source Project
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in the
** documentation and/or other materials provided with the distribution.
** * Neither the name of Google Inc. nor the names of its contributors may
** be used to endorse or promote products derived from this software
** without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY Google Inc. ``AS IS'' AND ANY EXPRESS OR
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
** EVENT SHALL Google Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* a simple and portable program used to generate a blank FAT32 image file
*
* usage: mksdcard [-l label] <size> <filename>
*/
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
/* believe me, you *don't* want to change these constants !! */
#define BYTES_PER_SECTOR 512
#define RESERVED_SECTORS 32
#define BACKUP_BOOT_SECTOR 6
#define NUM_FATS 2
/* sectors_per_disk is encoded as a signed int */
#define MAX_SECTORS_PER_DISK 0x7FFFFFFF
#define MAX_DISK_SIZE ((Wide)MAX_SECTORS_PER_DISK * BYTES_PER_SECTOR)
typedef long long Wide; /* might be something else if you don't use GCC */
typedef unsigned char Byte;
typedef Byte* Bytes;
#define BYTE_(p,i) (((Bytes)(p))[(i)])
#define POKEB(p,v) BYTE_(p,0) = (Byte)(v)
#define POKES(p,v) ( BYTE_(p,0) = (Byte)(v), BYTE_(p,1) = (Byte)((v) >> 8) )
#define POKEW(p,v) ( BYTE_(p,0) = (Byte)(v), BYTE_(p,1) = (Byte)((v) >> 8), BYTE_(p,2) = (Byte)((v) >> 16), BYTE_(p,3) = (Byte)((v) >> 24) )
static Byte s_boot_sector [ BYTES_PER_SECTOR ]; /* boot sector */
static Byte s_fsinfo_sector [ BYTES_PER_SECTOR ]; /* FS Info sector */
static Byte s_fat_head [ BYTES_PER_SECTOR ]; /* first FAT sector */
static Byte s_zero_sector [ BYTES_PER_SECTOR ]; /* empty sector */
/* this is the date and time when creating the disk */
static int
get_serial_id( void )
{
unsigned short lo, hi, mid;
time_t now = time(NULL);
struct tm tm = gmtime( &now )[0];
lo = (unsigned short)(tm.tm_mday + ((tm.tm_mon+1) << 8) + (tm.tm_sec << 8));
hi = (unsigned short)(tm.tm_min + (tm.tm_hour << 8) + (tm.tm_year + 1900));
return lo + (hi << 16);
}
static int
get_sectors_per_cluster( Wide disk_size )
{
Wide disk_MB = disk_size/(1024*1024);
if (disk_MB < 260)
return 1;
if (disk_MB < 8192)
return 4;
if (disk_MB < 16384)
return 8;
if (disk_MB < 32768)
return 16;
return 32;
}
static int
get_sectors_per_fat( Wide disk_size, int sectors_per_cluster )
{
Wide divider;
/* weird computation from MS - see fatgen103.doc for details */
disk_size -= RESERVED_SECTORS * BYTES_PER_SECTOR; /* don't count 32 reserved sectors */
disk_size /= BYTES_PER_SECTOR; /* disk size in sectors */
divider = ((256 * sectors_per_cluster) + NUM_FATS) / 2;
return (int)( (disk_size + (divider-1)) / divider );
}
static void
boot_sector_init( Bytes boot, Bytes info, Wide disk_size, const char* label )
{
int sectors_per_cluster = get_sectors_per_cluster(disk_size);
int sectors_per_fat = get_sectors_per_fat(disk_size, sectors_per_cluster);
int sectors_per_disk = (int)(disk_size / BYTES_PER_SECTOR);
int serial_id = get_serial_id();
int free_count;
if (label == NULL)
label = "SDCARD";
POKEB(boot, 0xeb);
POKEB(boot+1, 0x5a);
POKEB(boot+2, 0x90);
strcpy( (char*)boot + 3, "MSWIN4.1" );
POKES( boot + 0x0b, BYTES_PER_SECTOR ); /* sector size */
POKEB( boot + 0xd, sectors_per_cluster ); /* sectors per cluster */
POKES( boot + 0xe, RESERVED_SECTORS ); /* reserved sectors before first FAT */
POKEB( boot + 0x10, NUM_FATS ); /* number of FATs */
POKES( boot + 0x11, 0 ); /* max root directory entries for FAT12/FAT16, 0 for FAT32 */
POKES( boot + 0x13, 0 ); /* total sectors, 0 to use 32-bit value at offset 0x20 */
POKEB( boot + 0x15, 0xF8 ); /* media descriptor, 0xF8 == hard disk */
POKES( boot + 0x16, 0 ); /* Sectors per FAT for FAT12/16, 0 for FAT32 */
POKES( boot + 0x18, 9 ); /* Sectors per track (whatever) */
POKES( boot + 0x1a, 2 ); /* Number of heads (whatever) */
POKEW( boot + 0x1c, 0 ); /* Hidden sectors */
POKEW( boot + 0x20, sectors_per_disk ); /* Total sectors */
/* extension */
POKEW( boot + 0x24, sectors_per_fat ); /* Sectors per FAT */
POKES( boot + 0x28, 0 ); /* FAT flags */
POKES( boot + 0x2a, 0 ); /* version */
POKEW( boot + 0x2c, 2 ); /* cluster number of root directory start */
POKES( boot + 0x30, 1 ); /* sector number of FS information sector */
POKES( boot + 0x32, BACKUP_BOOT_SECTOR ); /* sector number of a copy of this boot sector */
POKEB( boot + 0x40, 0x80 ); /* physical drive number */
POKEB( boot + 0x42, 0x29 ); /* extended boot signature ?? */
POKEW( boot + 0x43, serial_id ); /* serial ID */
strncpy( (char*)boot + 0x47, label, 11 ); /* Volume Label */
memcpy( boot + 0x52, "FAT32 ", 8 ); /* FAT system type, padded with 0x20 */
POKEB( boot + BYTES_PER_SECTOR-2, 0x55 ); /* boot sector signature */
POKEB( boot + BYTES_PER_SECTOR-1, 0xAA );
/* FSInfo sector */
free_count = sectors_per_disk - 32 - 2*sectors_per_fat;
POKEW( info + 0, 0x41615252 );
POKEW( info + 484, 0x61417272 );
POKEW( info + 488, free_count ); /* number of free clusters */
POKEW( info + 492, 3 ); /* next free clusters, 0-1 reserved, 2 is used for the root dir */
POKEW( info + 508, 0xAA550000 );
}
static void
fat_init( Bytes fat )
{
POKEW( fat, 0x0ffffff8 ); /* reserve cluster 1, media id in low byte */
POKEW( fat + 4, 0x0fffffff ); /* reserve cluster 2 */
POKEW( fat + 8, 0x0fffffff ); /* end of clust chain for root dir */
}
static int
write_sector( FILE* file, Bytes sector )
{
int result = fwrite( sector, 1, BYTES_PER_SECTOR, file ) != BYTES_PER_SECTOR;
if (result) {
fprintf(stderr, "Failed to write sector of %d bytes: %s\n", BYTES_PER_SECTOR, strerror(errno));
}
return result;
}
static int
write_empty( FILE* file, Wide count )
{
static Byte empty[256*1024];
memset(empty, 0, sizeof(empty));
count *= BYTES_PER_SECTOR;
while (count > 0) {
int len = sizeof(empty);
if (len > count)
len = count;
if ( fwrite( empty, 1, len, file ) != (size_t)len ) {
fprintf(stderr, "Failed to write %d bytes: %s\n", len, strerror(errno));
return 1;
}
count -= len;
}
return 0;
}
static void usage (void)
{
fprintf(stderr, "mksdcard: create a blank FAT32 image to be used with the Android emulator\n" );
fprintf(stderr, "usage: mksdcard [-l label] <size> <file>\n\n");
fprintf(stderr, " if <size> is a simple integer, it specifies a size in bytes\n" );
fprintf(stderr, " if <size> is an integer followed by 'K', it specifies a size in KiB\n" );
fprintf(stderr, " if <size> is an integer followed by 'M', it specifies a size in MiB\n" );
fprintf(stderr, " if <size> is an integer followed by 'G', it specifies a size in GiB\n" );
fprintf(stderr, "\nMinimum size is 9M. The Android emulator cannot use smaller images.\n" );
fprintf(stderr, "Maximum size is %lld bytes, %lldK, %lldM or %lldG\n",
MAX_DISK_SIZE, MAX_DISK_SIZE >> 10, MAX_DISK_SIZE >> 20, MAX_DISK_SIZE >> 30);
exit(1);
}
int main( int argc, char** argv )
{
Wide disk_size;
int sectors_per_fat;
int sectors_per_disk;
char* end;
const char* label = NULL;
FILE* f = NULL;
for ( ; argc > 1 && argv[1][0] == '-'; argc--, argv++ )
{
char* arg = argv[1] + 1;
switch (arg[0]) {
case 'l':
if (arg[1] != 0)
arg += 2;
else {
argc--;
argv++;
if (argc <= 1)
usage();
arg = argv[1];
}
label = arg;
break;
default:
usage();
}
}
if (argc != 3)
usage();
disk_size = strtoll( argv[1], &end, 10 );
if (disk_size <= 0 || errno == EINVAL || errno == ERANGE) {
fprintf(stderr, "Invalid argument size '%s'\n\n", argv[1]);
usage();
}
if (*end == 'K')
disk_size *= 1024;
else if (*end == 'M')
disk_size *= 1024*1024;
else if (*end == 'G')
disk_size *= 1024*1024*1024;
if (disk_size < 9*1024*1024) {
fprintf(stderr, "Invalid argument: size '%s' is too small.\n\n", argv[1]);
usage();
} else if (disk_size > MAX_DISK_SIZE) {
fprintf(stderr, "Invalid argument: size '%s' is too large.\n\n", argv[1]);
usage();
}
sectors_per_disk = disk_size / BYTES_PER_SECTOR;
sectors_per_fat = get_sectors_per_fat( disk_size, get_sectors_per_cluster( disk_size ) );
boot_sector_init( s_boot_sector, s_fsinfo_sector, disk_size, NULL );
fat_init( s_fat_head );
f = fopen( argv[2], "wb" );
if ( !f ) {
fprintf(stderr, "Could not create file '%s': %s\n", argv[2], strerror(errno));
goto FailWrite;
}
/* here's the layout:
*
* boot_sector
* fsinfo_sector
* empty
* backup boot sector
* backup fsinfo sector
* RESERVED_SECTORS - 4 empty sectors (if backup sectors), or RESERVED_SECTORS - 2 (if no backup)
* first fat
* second fat
* zero sectors
*/
if ( write_sector( f, s_boot_sector ) ) goto FailWrite;
if ( write_sector( f, s_fsinfo_sector ) ) goto FailWrite;
if ( BACKUP_BOOT_SECTOR > 0 ) {
if ( write_empty( f, BACKUP_BOOT_SECTOR - 2 ) ) goto FailWrite;
if ( write_sector( f, s_boot_sector ) ) goto FailWrite;
if ( write_sector( f, s_fsinfo_sector ) ) goto FailWrite;
if ( write_empty( f, RESERVED_SECTORS - 2 - BACKUP_BOOT_SECTOR ) ) goto FailWrite;
}
else if ( write_empty( f, RESERVED_SECTORS - 2 ) ) goto FailWrite;
if ( write_sector( f, s_fat_head ) ) goto FailWrite;
if ( write_empty( f, sectors_per_fat-1 ) ) goto FailWrite;
if ( write_sector( f, s_fat_head ) ) goto FailWrite;
if ( write_empty( f, sectors_per_fat-1 ) ) goto FailWrite;
if ( write_empty( f, sectors_per_disk - RESERVED_SECTORS - 2*sectors_per_fat ) ) goto FailWrite;
fclose(f);
return 0;
FailWrite:
if (f != NULL) {
fclose(f);
unlink( argv[2] );
fprintf(stderr, "File '%s' was not created.\n", argv[2]);
}
return 1;
}

Binary file not shown.

View file

@ -0,0 +1,3 @@
The sources in this directory have been moved to:
external/qemu/distrib/android-emugl

View file

@ -0,0 +1,3 @@
The svg files in these folder were used to generate the corresponding
png images in the 'dynamic' skin folder. Edit these in Inkscape or some
other SVG editor and just export as png to update the assets.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="159"
height="54.617188"
id="svg2"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="basic_controls.svg"
inkscape:export-filename="basic.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
<inkscape:perspective
id="perspective2904"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective2886"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective2898"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective2887"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4.4724839"
inkscape:cx="138.91446"
inkscape:cy="13.828558"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1438"
inkscape:window-height="774"
inkscape:window-x="84"
inkscape:window-y="123"
inkscape:window-maximized="0">
<inkscape:grid
type="xygrid"
id="grid2816"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-25.654297,-779.745)">
<text
xml:space="preserve"
style="font-size:14px;font-style:normal;font-weight:normal;line-height:125%;fill:#bbbbbb;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="25"
y="787.36218"
id="text2910"
sodipodi:linespacing="125%"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan2912"
x="25"
y="787.36218"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#bbbbbb;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium">Basic Controls </tspan></text>
<image
y="792.36218"
x="30.654297"
id="image2889"
height="42"
width="154"
xlink:href="basic_controls.png" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View file

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="111.48926"
height="90.617188"
id="svg2"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="dpad_off.svg"
inkscape:export-filename="dpad_off.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
<inkscape:perspective
id="perspective2904"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4.4724839"
inkscape:cx="138.91446"
inkscape:cy="38.761468"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1570"
inkscape:window-height="1089"
inkscape:window-x="436"
inkscape:window-y="347"
inkscape:window-maximized="0">
<inkscape:grid
type="xygrid"
id="grid2816"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-25.654297,-779.745)">
<image
sodipodi:absref="dpad.png"
xlink:href="dpad.png"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
width="109"
height="77"
id="image2906"
x="27"
y="793.36218" />
<text
xml:space="preserve"
style="font-size:14px;font-style:normal;font-weight:normal;line-height:112.99999952%;fill:#bbbbbb;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="25"
y="787.36218"
id="text2910"
sodipodi:linespacing="113%"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan2912"
x="25"
y="787.36218"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:112.99999952%;writing-mode:lr-tb;text-anchor:start;fill:#bbbbbb;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium">DPAD <tspan
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:112.99999952%;writing-mode:lr-tb;text-anchor:start;fill:#999999;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium"
id="tspan3589">not enabled in AVD</tspan></tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="110"
height="88.109375"
id="svg2"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="dpad_on.svg"
inkscape:export-filename="dpad_on.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
<inkscape:perspective
id="perspective2904"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="6.3250474"
inkscape:cx="96.012951"
inkscape:cy="42.761466"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1570"
inkscape:window-height="1089"
inkscape:window-x="436"
inkscape:window-y="347"
inkscape:window-maximized="0">
<inkscape:grid
type="xygrid"
id="grid2816"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-25.654297,-786.25281)">
<image
sodipodi:absref="dpad.png"
xlink:href="dpad.png"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
width="109"
height="77"
id="image2906"
x="26.654297"
y="797.36218" />
<text
xml:space="preserve"
style="font-size:14px;font-style:normal;font-weight:normal;line-height:125%;fill:#bbbbbb;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="25"
y="793.36218"
id="text2910"
sodipodi:linespacing="125%"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan2912"
x="25"
y="793.36218"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#bbbbbb;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium">DPAD</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View file

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="211.91211"
height="57.617188"
id="svg2"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="hwkeys_off.svg"
inkscape:export-filename="hwkeys_off.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
<inkscape:perspective
id="perspective2904"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective2886"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4.4724839"
inkscape:cx="138.91446"
inkscape:cy="16.828573"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1570"
inkscape:window-height="1089"
inkscape:window-x="468"
inkscape:window-y="267"
inkscape:window-maximized="0">
<inkscape:grid
type="xygrid"
id="grid2816"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-25.654297,-779.745)">
<text
xml:space="preserve"
style="font-size:14px;font-style:normal;font-weight:normal;line-height:112.99999952%;fill:#bbbbbb;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="25"
y="787.36218"
id="text2910"
sodipodi:linespacing="113%"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan2912"
x="25"
y="787.36218"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:112.99999952%;writing-mode:lr-tb;text-anchor:start;fill:#bbbbbb;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium">Hardware Buttons <tspan
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:112.99999952%;writing-mode:lr-tb;text-anchor:start;fill:#999999;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium"
id="tspan3589">not enabled in AVD</tspan></tspan></text>
<image
sodipodi:absref="hwkeys.png"
xlink:href="hwkeys.png"
width="210"
height="42"
id="image2888"
x="27.566406"
y="795.36218" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="213.91211"
height="57.617188"
id="svg2"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="hwkeys_on.svg"
inkscape:export-filename="hwkeys_on.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
<inkscape:perspective
id="perspective2904"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective2886"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4.4724839"
inkscape:cx="138.91446"
inkscape:cy="16.828571"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1570"
inkscape:window-height="1089"
inkscape:window-x="436"
inkscape:window-y="347"
inkscape:window-maximized="0">
<inkscape:grid
type="xygrid"
id="grid2816"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-25.654297,-779.745)">
<text
xml:space="preserve"
style="font-size:14px;font-style:normal;font-weight:normal;line-height:125%;fill:#bbbbbb;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="25"
y="787.36218"
id="text2910"
sodipodi:linespacing="125%"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan2912"
x="25"
y="787.36218"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#bbbbbb;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium">Hardware Buttons</tspan></text>
<image
sodipodi:absref="hwkeys.png"
xlink:href="hwkeys.png"
y="795.36218"
x="29.566406"
id="image2888"
height="42"
width="210" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="174.07715"
height="21.050976"
id="svg2"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="keyboard_off.svg"
inkscape:export-filename="keyboard_off.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
<inkscape:perspective
id="perspective2904"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4.4724839"
inkscape:cx="138.98282"
inkscape:cy="-30.804743"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1570"
inkscape:window-height="1089"
inkscape:window-x="436"
inkscape:window-y="347"
inkscape:window-maximized="0">
<inkscape:grid
type="xygrid"
id="grid2816"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-25.585937,-779.745)">
<text
xml:space="preserve"
style="font-size:14px;font-style:normal;font-weight:normal;line-height:112.99999952%;fill:#bbbbbb;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="25"
y="787.36218"
id="text2910"
sodipodi:linespacing="113%"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan2912"
x="25"
y="787.36218"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:112.99999952%;writing-mode:lr-tb;text-anchor:start;fill:#bbbbbb;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium">Hardware Keyboard <tspan
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:112.99999952%;writing-mode:lr-tb;text-anchor:start;fill:#999999;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium"
id="tspan3589">not enabled in AVD</tspan></tspan><tspan
sodipodi:role="line"
x="25"
y="798.66217"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:112.99999952%;writing-mode:lr-tb;text-anchor:start;fill:#bbbbbb;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium"
id="tspan2818">Use on screen keyboard</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="195.49316"
height="21.050976"
id="svg2"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="keyboard_on.svg"
inkscape:export-filename="keyboard_on.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
<inkscape:perspective
id="perspective2904"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4.4724839"
inkscape:cx="138.98282"
inkscape:cy="-30.804747"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1570"
inkscape:window-height="1089"
inkscape:window-x="436"
inkscape:window-y="347"
inkscape:window-maximized="0">
<inkscape:grid
type="xygrid"
id="grid2816"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-25.585937,-779.745)">
<text
xml:space="preserve"
style="font-size:14px;font-style:normal;font-weight:normal;line-height:112.99999952%;fill:#bbbbbb;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="25"
y="787.36218"
id="text2910"
sodipodi:linespacing="113%"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan2912"
x="25"
y="787.36218"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:112.99999952%;writing-mode:lr-tb;text-anchor:start;fill:#bbbbbb;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium">Hardware Keyboard<tspan
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:112.99999952%;writing-mode:lr-tb;text-anchor:start;fill:#999999;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium"
id="tspan3589" /></tspan><tspan
sodipodi:role="line"
x="25"
y="798.66217"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:112.99999952%;writing-mode:lr-tb;text-anchor:start;fill:#bbbbbb;fill-opacity:1;font-family:Roboto;-inkscape-font-specification:Roboto Medium"
id="tspan2818">Use your physical keyboard to provide input</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -0,0 +1,138 @@
# This layout file only defines all the parts. The layouts section
# that is missing is filled in at runtime by the skin parser.
# Many of the parts in this layout have both _on and _off versions
# which correspond to the part to be used if that control is actually
# available in the AVD.
parts {
device {
display {
width 320
height 480
x 0
y 0
}
}
dpad_on {
background {
image dpad_on.png
width 110
height 88
}
buttons {
dpad-up {
image arrow_up.png
x 24
y 8
}
dpad-down {
image arrow_down.png
x 24
y 60
}
dpad-left {
image arrow_left.png
x 0
y 8
}
dpad-right {
image arrow_right.png
x 70
y 8
}
dpad-center {
image select.png
x 24
y 36
}
}
}
dpad_off {
background {
image dpad_off.png
width 111
height 91
}
}
hwkeys_on {
background {
image hwkeys_on.png
width 212
height 58
}
buttons {
home {
image button.png
x 0
y 12
}
soft-left {
image button.png
x 56
y 12
}
back {
image button.png
x 112
y 12
}
search {
image button.png
x 166
y 12
}
}
}
hwkeys_off {
background {
image hwkeys_off.png
width 212
height 58
}
}
keyboard_on {
background {
image keyboard_on.png
width 195
height 21
}
}
keyboard_off {
background {
image keyboard_off.png
width 174
height 21
}
}
basic_controls {
background {
image basic.png
width 159
height 55
}
buttons {
volume-down {
image button.png
x 1
y 9
}
volume-up {
image button.png
x 57
y 9
}
power {
image button.png
x 113
y 9
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.