+
     Gii!  c                   s    ^ RI t  ^ RIt^ RIt R tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR#   ] d    Rt L?i ; i)i    NFc                 sF   V P                  R RR7      pVP                  RRRR7       VP                  RRRR	R
7       VP                  RRRR7       VP                  RRRR7       VP                  RRRR7       VP                  RRRR7       VP                  RRRR7       V# )Zinitz3set up waydroid specific configs and install imageshelpz-iz--images_pathzDcustom path to waydroid images (default in /var/lib/waydroid/images)z-fz--force
store_truez re-initialize configs and imagesactionr   -cz--system_channelz;custom system channel (options: OTA channel URL; mandatory)-vz--vendor_channelz;custom vendor channel (options: OTA channel URL; mandatory)z-rz
--rom_typezOrom type (options: "lineage", "bliss" or OTA channel URL; default is LineageOS)-sz--system_typezAsystem type (options: VANILLA, FOSS or GAPPS; default is VANILLA)z--clientz>run as user mode, connecting to the remote initializer service)r   r   
add_parseradd_argument	subparserret   & ,/usr/lib/waydroid/tools/helpers/arguments.pyarguments_initr      s    


v -=
 >CT?:  ; T9\<  >T-W  YT-W  YT<o  qT?]  _Z&fo{|J    c                 ,    V P                  R RR7      pV# )Zstatuszquick check for the waydroidr    r	   r   r   r   arguments_statusr   '   s"    


x$B  DCJr   c                 sV    V P                  R RR7      pVP                  RRRRR7       V# )Zupgradezupgrade imagesr    z-oz	--offliner   zjust for updating configsr   r   r   r   r   arguments_upgrader   ,   s9    


y/?

@CT;|5  7Jr   c                 s    V P                  R RR7      pVP                  RRRRR7       VP                  RR	R
RRR7       V# )logzfollow the waydroid logfiler    z-nz--linesZ60zcount of initial output lines)defaultr   r   z--clearzclear the logr   Z	clear_log)r   r   destr   r   r   r   arguments_logr   2   sW    


u+H

ICT9d9  ;T9?({  <Jr   c                     V P                  R RR7      pVP                  RRR7      pVP                  RRR7       VP                  RRR7       V# )	Zsessionzsession controllerr    	subactionZtitler   startzstart sessionstopzstop sessionr	   add_subparsersr   r   sub   &  r   arguments_sessionr$   :   sR    


y/C

DC


;[

ACNN7N1NN6N/Jr   c                 s   V P                  R RR7      pVP                  RRR7      pVP                  RRR7       VP                  RRR7       VP                  R	R
R7       VP                  RRR7       VP                  RRR7       V# )Z	containerzcontainer controllerr    r   r   r   zstart containerr   zstop containerZrestartzrestart containerZfreezezfreeze containerZunfreezezunfreeze containerr   r!   r#   r   arguments_containerr%   A   s    


{1G

HC


;[

ACNN7!2N3NN6 0N1NN9#6N7NN8"4N5NN:$8N9Jr   c                 s   V P                  R RR7      pVP                  RRR7      pVP                  RRR7      pVP                  RRR7       VP                  R	R
R7      pVP                  RRR7       VP                  RRR7      pVP                  RRR7       VP                  RRR7      pVP                  RRR7       VP                  RRR7       VP                  RRR7       V# )Zappzapplications controllerr    r   r   installz5push a single package to the container and install itZPACKAGEzpath to apk fileremovez,remove single app package from the containerzpackage name of app to removelaunchzstart single applicationzpackage name of app to launchintentZACTIONzaction nameZURIzdata uriZlistzlist installed applicationsr	   r    r
   )r   r   r"   r&   r'   r(   r)   s   &      r   arguments_appr+   K   s    


u+D

EC


;[

ACnnO  QG);<^^E  GF
	(GH^^H+E^FF
	(GH^^H+E^FF
}5
J/NN6 =N>Jr   c                 s   V P                  R RR7      pVP                  RRR7      pVP                  RRR7      pVP                  RRR7       VP                  R	R
R7      pVP                  RRR7       VP                  RRR7       V# )Zpropzandroid properties controllerr    r   r   getz$get value of property from containerZkeyzkey of the property to getsetz"set value to property on containerzkey of the property to setZvaluezvalue of the property to setr*   )r   r   r"   r,   r-   s   &    r   arguments_propr.   \   s    


v,K

LC


;[

AC
..:  <CU!=>
..8  :CU!=>W#ABJr   c                 r   )zshow-full-uiz"show android full screen in windowr    r   r   r   r   arguments_fullUIr/   h   s    


~4X

YCJr   c                 r   )zfirst-launchzMstart waydroid, prompting to initialize waydroid first if necessary (default)r    r   r   r   r   arguments_firstLaunchr0   l   s#    


~  5D
  ECJr   c                 sJ   V P                  R RR7      pVP                  RRRR7       VP                  RRRR7       VP                  R	R
RR7       VP                  RRRRR7       VP                  RRRRR7       VP                  RRRRR7       VP                  RRRR7       V# )Zshellzrun remote shell commandr    z-uz--uidzDthe UID to run as (also sets GID to the same value if -g is not set)z-gz--gidzthe GID to run asr   z	--contextzZtransition to the specified SELinux or AppArmor security context. No-op if -L is supplied.z-Lz--nolsmr   a*  tell LXC not to perform security domain transition related to mandatory access control (e.g. SELinux, AppArmor). If this option is supplied, LXC won't apply a container-wide seccomp filter to the executed program. This is a dangerous option that can result in leaking privileges to the container!!!r   z-Cz	--allcapszwtell LXC not to drop capabilities. This is a dangerous option that can result in leaking privileges to the container!!!z-Gz
--nocgroupztell LXC not to switch to the container cgroup. This is a dangerous option that can result in leaking privileges to the container!!!ZCOMMAND*zcommand to runZnargsr   r   r   r   r   arguments_shellr3   p   s    


w-G

HCT7)opT7)<=T;  .J  KT9\  Am  nT;|  C|  }T<  DJ  KYc0@AJr   c                 sT    V P                  R RR7      pVP                  RRRR7       V# )Zlogcatzshow android logcatr    ZARGSr1   zarguments to pass to logcatr2   r   r   r   r   arguments_logcatr4   {   s3    


x.C

DCV3-JKJr   c                 r   )	Zadbzmanage adb connectionr    r   r   Zconnectz$connect adb to the Android containerZ
disconnectz)disconnect adb from the Android containerr   r!   r#   r   arguments_adbr5      sT    


u+B

CC


;[

ACNN9#INJNN<&QNRJr   c                 s,    V P                  R RR7      pR# )Z	bugreportz(create a bugreport archive interactivelyr    Nr   r   r   r   arguments_bugreportr6      s    


{1[

\Cr   c                  s   \         P                  ! R R7      p V P                  RRR\        P                  P
                  R7       V P                  RRRR	R
R7       V P                  RRRRR7       V P                  RRRRRR7       V P                  RRRRRR7       V P                  RRR7      p\        V4       \        V4       \        V4       \        V4       \        V4       \        V4       \        V4       \        V4       \        V4       \!        V4       \#        V4       \%        V4       \'        V4       \)        V4       \*        '       d   \*        P,                  ! V RR7       V P/                  4       pV# )Zwaydroid)Zprogz-Vz	--versionversion)r   r7   z-lz--logr   Nzpath to log file)r   r   r   z--details-to-stdoutZdetails_to_stdoutzJprint details (e.g. build output) to stdout, instead of writing to the logr   )r   r   r   r   z	--verboseZverbosez=write even more to the logfiles (this may reduce performance))r   r   r   z-qz--quietZquietzdo not output any log messagesr   r   Zlong)Zalways_complete_options)argparseZArgumentParserr
   toolsZconfigr7   r    r   r   r   r   r$   r%   r+   r.   r/   r0   r3   r4   r5   r6   argcompleteZautocompleteZ
parse_args)Zparserr"   Zargss      r   	argumentsr;      sq   $$*5F k) % 4 4  6 gE4/  1
-4G>+  - k	+ 3B  C igl=  ? 

hX

>CS#3cc#3S#CS#{  H DKr   )r8   r:   ZImportErrorZtools.configr9   r   r   r   r   r$   r%   r+   r.   r/   r0   r3   r4   r5   r6   r;   ) r   r   <module>r<      s     P&
"
	
]+G  Ks   > 	A
	A
