Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemSEPolicy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemSEPolicy
Commits
7c89b6b0
Commit
7c89b6b0
authored
12 years ago
by
Geremy Condra
Committed by
Android (Google) Code Review
12 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Add a key directory argument to insertkeys.py"
parents
b41fedcf
51dd0339
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Android.mk
+1
-1
1 addition, 1 deletion
Android.mk
keys.conf
+6
-6
6 additions, 6 deletions
keys.conf
tools/insertkeys.py
+6
-3
6 additions, 3 deletions
tools/insertkeys.py
with
13 additions
and
10 deletions
Android.mk
+
1
−
1
View file @
7c89b6b0
...
...
@@ -179,7 +179,7 @@ ALL_MAC_PERMS_FILES := $(call build_policy, $(LOCAL_MODULE))
$(LOCAL_BUILT_MODULE)
:
$(mac_perms_keys.tmp) $(HOST_OUT_EXECUTABLES)/insertkeys.py $(ALL_MAC_PERMS_FILES)
@
mkdir
-p
$(
dir
$@
)
$(
hide
)
$(
HOST_OUT_EXECUTABLES
)
/insertkeys.py
-t
$(
TARGET_BUILD_VARIANT
)
-c
$(
TOP
)
$<
-o
$@
$(
ALL_MAC_PERMS_FILES
)
$(
hide
)
$(
HOST_OUT_EXECUTABLES
)
/insertkeys.py
-t
$(
TARGET_BUILD_VARIANT
)
-d
$(
dir
$(
DEFAULT_SYSTEM_DEV_CERTIFICATE
))
-c
$(
TOP
)
$<
-o
$@
$(
ALL_MAC_PERMS_FILES
)
mac_perms_keys.tmp
:=
##################################
...
...
This diff is collapsed.
Click to expand it.
keys.conf
+
6
−
6
View file @
7c89b6b0
...
...
@@ -9,17 +9,17 @@
#
[@
PLATFORM
]
ALL
:
build
/
target
/
product
/
security
/
platform
.
x509
.
pem
ALL
:
platform
.
x509
.
pem
[@
MEDIA
]
ALL
:
build
/
target
/
product
/
security
/
media
.
x509
.
pem
ALL
:
media
.
x509
.
pem
[@
SHARED
]
ALL
:
build
/
target
/
product
/
security
/
shared
.
x509
.
pem
ALL
:
shared
.
x509
.
pem
# Example of ALL TARGET_BUILD_VARIANTS
[@
RELEASE
]
ENG
:
build
/
target
/
product
/
security
/
testkey
.
x509
.
pem
USER
:
build
/
target
/
product
/
security
/
testkey
.
x509
.
pem
USERDEBUG
:
build
/
target
/
product
/
security
/
testkey
.
x509
.
pem
ENG
:
testkey
.
x509
.
pem
USER
:
testkey
.
x509
.
pem
USERDEBUG
:
testkey
.
x509
.
pem
This diff is collapsed.
Click to expand it.
tools/insertkeys.py
+
6
−
3
View file @
7c89b6b0
...
...
@@ -65,7 +65,7 @@ class ParseConfig(ConfigParser.ConfigParser):
# This must be lowercase
OPTION_WILDCARD_TAG
=
"
all
"
def
generateKeyMap
(
self
,
target_build_variant
):
def
generateKeyMap
(
self
,
target_build_variant
,
key_directory
):
keyMap
=
dict
()
...
...
@@ -87,7 +87,7 @@ class ParseConfig(ConfigParser.ConfigParser):
if
tag
in
keyMap
:
sys
.
exit
(
"
Duplicate tag detected
"
+
tag
)
path
=
self
.
get
(
tag
,
option
)
path
=
os
.
path
.
join
(
key_directory
,
self
.
get
(
tag
,
option
)
)
keyMap
[
tag
]
=
GenerateKeys
(
path
)
...
...
@@ -188,6 +188,9 @@ if __name__ == "__main__":
parser
.
add_option
(
"
-t
"
,
"
--target-build-variant
"
,
default
=
"
eng
"
,
dest
=
"
target_build_variant
"
,
help
=
"
Specify the TARGET_BUILD_VARIANT, defaults to eng
"
)
parser
.
add_option
(
"
-d
"
,
"
--key-directory
"
,
default
=
""
,
dest
=
"
key_directory
"
,
help
=
"
Specify a parent directory for keys
"
)
(
options
,
args
)
=
parser
.
parse_args
()
if
len
(
args
)
<
2
:
...
...
@@ -205,7 +208,7 @@ if __name__ == "__main__":
logging
.
info
(
"
Setting output file to:
"
+
options
.
output_file
)
# Generate the key list
key_map
=
config
.
generateKeyMap
(
options
.
target_build_variant
.
lower
())
key_map
=
config
.
generateKeyMap
(
options
.
target_build_variant
.
lower
()
,
options
.
key_directory
)
logging
.
info
(
"
Generate key map:
"
)
for
k
in
key_map
:
logging
.
info
(
k
+
"
:
"
+
str
(
key_map
[
k
]))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment