From 69b15fb098162f19a4c20e6dccdcead04d9c77f0 Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Sat, 3 Sep 2011 12:25:21 -0700 Subject: Working dex2oat and oatexec adb shell dex2oatd --dex-file=/system/framework/core.jar --image=/system/framework/boot.oat --base=0x50000000 "'--method=Ljava/lang/System;logI(Ljava/lang/String;)V'" "'--method=Ljava/lang/System;log(CLjava/lang/String;Ljava/lang/Throwable;)V'" adb shell dex2oatd --boot-dex-file=/system/framework/core.jar --boot=/system/framework/boot.oat --dex-file=/system/framework/art-test-dex-HelloWorld.jar --image=/system/framework/art-test-dex-HelloWorld.oat adb shell oatexecd -Xbootclasspath:/system/framework/core.jar -Xbootimage:/system/framework/boot.oat -classpath /system/framework/art-test-dex-HelloWorld.jar -Ximage:/system/framework/art-test-dex-HelloWorld.oat HelloWorld 09-05 17:58:18.912 2385 2385 I System : Hello, world! Change-Id: I53e534068584f0c3a837313e4d517a0e4a7154fc --- test/HelloWorld/HelloWorld.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/HelloWorld/HelloWorld.java (limited to 'test/HelloWorld/HelloWorld.java') diff --git a/test/HelloWorld/HelloWorld.java b/test/HelloWorld/HelloWorld.java new file mode 100644 index 0000000000..c6861ced7a --- /dev/null +++ b/test/HelloWorld/HelloWorld.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2011 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + +class HelloWorld { + public static void main(String[] args) { + System.logI("Hello, world!"); + } +} -- cgit v1.2.3-59-g8ed1b