1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #include <stdlib.h> 18 19 #include "android-base/logging.h" 20 #include "android-base/macros.h" 21 #include "android/binder_interface_utils.h" 22 #include "android/binder_process.h" 23 #include "dexopt_chroot_setup.h" 24 main(int argc,char * argv[])25int main([[maybe_unused]] int argc, char* argv[]) { 26 android::base::InitLogging(argv); 27 28 auto dexopt_chroot_setup = 29 ndk::SharedRefBase::make<art::dexopt_chroot_setup::DexoptChrootSetup>(); 30 31 LOG(INFO) << "Starting dexopt_chroot_setup"; 32 33 if (android::base::Result<void> ret = dexopt_chroot_setup->Start(); !ret.ok()) { 34 LOG(ERROR) << "Unable to start dexopt_chroot_setup: " << ret.error(); 35 exit(1); 36 } 37 38 ABinderProcess_joinThreadPool(); 39 40 LOG(INFO) << "dexopt_chroot_setup shutting down"; 41 42 return 0; 43 } 44