mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-22 17:55:57 +01:00
android: add working run script
This commit is contained in:
32
run-android
Executable file
32
run-android
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import shutil
|
||||
|
||||
import common
|
||||
|
||||
class Main(common.LkmcCliFunction):
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
description='''\
|
||||
Run android AOSP on the AOSP pre-build emulator.
|
||||
|
||||
https://github.com/cirosantilli/linux-kernel-module-cheat#android
|
||||
''',
|
||||
)
|
||||
self.add_argument('extra-emulator-args', default='', nargs='?')
|
||||
|
||||
def timed_main(self):
|
||||
self.sh.run_cmd('''\
|
||||
{}
|
||||
emulator -show-kernel -verbose {}
|
||||
'''.format(
|
||||
self.env['android_shell_setup'],
|
||||
self.env['extra_emulator_args']
|
||||
),
|
||||
cwd=self.env['android_dir'],
|
||||
executable=shutil.which('bash'),
|
||||
shell=True,
|
||||
)
|
||||
|
||||
if __name__ == '__main__':
|
||||
Main().cli()
|
||||
Reference in New Issue
Block a user