14 Commits

Author SHA1 Message Date
LIAUD Corentin
17bb77a472 chore: v2.1.6 2025-02-11 14:12:28 +01:00
cocool97
f211023b24 feat: do not include rust files in python package (#91) 2025-02-11 14:03:24 +01:00
cli
728d9603dc fix(python): improve modules path (#88) 2025-02-06 16:53:29 +01:00
cocool97
00c387d85c feat: pyo3 stub generation (#87) 2025-02-06 11:25:07 +01:00
Andreas Tzionis
79d96d4c76 Implemented uninstall command (#86)
* implemented uninstall command
2025-01-29 20:17:28 +01:00
LIAUD Corentin
dc909ceda6 chore: v2.1.5 2025-01-24 15:06:24 +01:00
cocool97
cbba912483 fix: improve python package build (#85) 2025-01-24 15:00:36 +01:00
LIAUD Corentin
38d8384b98 fix: maturin non-interactive 2025-01-24 10:18:55 +01:00
cocool97
39591b6a0a ci: build python wheels (#84) 2025-01-24 10:11:51 +01:00
LIAUD Corentin
775b2421ec chore(ci): improve python build 2025-01-22 15:57:02 +01:00
LIAUD Corentin
62d16b70fb chore: version 2.1.0 2025-01-22 15:25:03 +01:00
cli
466d00e68a feat: Python package (#80)
* feat: create pyadb_client python package

* feat: add push / pull methods

* feat: add shell_command for USB

* feat(ci): add python package build
2025-01-22 15:22:36 +01:00
KFBI1706
144072ba1b fix: track_devices support multiple devices (#83) 2025-01-21 07:31:39 +01:00
LIAUD Corentin
331ef95530 chore: fix deps for adb_cli 2024-12-18 11:24:52 +01:00
35 changed files with 490 additions and 22 deletions

51
.github/workflows/python-build.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: Python - Build packages & Release
on:
push: {}
pull_request: {}
release:
types: [created]
jobs:
gen-stubs:
name: "build-release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build project
run: cargo run --bin stub_gen
build-python-packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python build dependencies
run: pip install maturin==1.8.2
- name: Build Python packages
run: maturin build --release -m pyadb_client/Cargo.toml --compatibility manylinux_2_25 --auditwheel=skip
publish-python-packages:
runs-on: ubuntu-latest
needs: [build-python-packages]
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- uses: actions/checkout@v4
- name: Install Python build dependencies
run: pip install maturin==1.8.2
- name: Publish Python packages
run: maturin publish -m pyadb_client/Cargo.toml --non-interactive --compatibility manylinux_2_25 --auditwheel=skip
env:
MATURIN_PYPI_TOKEN: ${{ secrets.MATURIN_PYPI_TOKEN }}
- name: "Publish GitHub artefacts"
uses: softprops/action-gh-release@v2
with:
files: |
target/wheels/pyadb_client*.whl
target/wheels/pyadb_client*.tar.gz

View File

@@ -9,8 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: "Set up Rust"
uses: actions-rs/toolchain@v1

7
.gitignore vendored
View File

@@ -1,3 +1,6 @@
target
Cargo.lock
.vscode
/Cargo.lock
/.vscode
venv
/.mypy_cache
pyadb_client/pyadb_client.pyi

View File

@@ -1,5 +1,5 @@
[workspace]
members = ["adb_cli", "adb_client"]
members = ["adb_cli", "adb_client", "pyadb_client"]
resolver = "2"
[workspace.package]
@@ -9,7 +9,7 @@ homepage = "https://github.com/cocool97/adb_client"
keywords = ["adb", "android", "tcp", "usb"]
license = "MIT"
repository = "https://github.com/cocool97/adb_client"
version = "2.1.0"
version = "2.1.6"
# To build locally when working on a new release
[patch.crates-io]

View File

@@ -30,6 +30,7 @@ Main features of this library:
- Over **TCP/IP**
- Implements hidden `adb` features, like `framebuffer`
- Highly configurable
- Provides wrappers to use directly from Python code
- Easy to use !
## adb_client
@@ -41,10 +42,16 @@ Improved documentation available [here](./adb_client/README.md).
## adb_cli
Rust binary providing an improved version of Google's official `adb` CLI, by using `adb_client` library.
Provides an usage example of the library.
Provides a "real-world" usage example of this library.
Improved documentation available [here](./adb_cli/README.md).
## pyadb_client
Python wrapper using `adb_client` library to export classes usable directly from a Python environment.
Improved documentation available [here](./pyadb_client/README.md)
## Related publications
- [Diving into ADB protocol internals (1/2)](https://www.synacktiv.com/publications/diving-into-adb-protocol-internals-12)

View File

@@ -10,7 +10,7 @@ repository.workspace = true
version.workspace = true
[dependencies]
adb_client = { version = "*" }
adb_client = { version = "^2.0.0" }
anyhow = { version = "1.0.94" }
clap = { version = "4.5.23", features = ["derive"] }
env_logger = { version = "0.11.5" }

View File

@@ -36,7 +36,7 @@ impl Drop for ADBTermios {
fn drop(&mut self) {
// Custom drop implementation, restores previous termios structure.
if let Err(e) = tcsetattr(self.fd, TCSANOW, &self.old_termios) {
log::error!("Error while droping ADBTermios: {e}")
log::error!("Error while dropping ADBTermios: {e}")
}
}
}

View File

@@ -133,6 +133,10 @@ fn main() -> Result<()> {
log::info!("Starting installation of APK {}...", path.display());
device.install(&path)?;
}
DeviceCommands::Uninstall { package } => {
log::info!("Uninstalling the package {}...", package);
device.uninstall(&package)?;
}
DeviceCommands::Framebuffer { path } => {
device.framebuffer(&path)?;
log::info!("Successfully dumped framebuffer at path {path}");

View File

@@ -33,6 +33,11 @@ pub enum DeviceCommands {
/// Path to APK file. Extension must be ".apk"
path: PathBuf,
},
/// Uninstall a package from the device
Uninstall {
/// Name of the package to uninstall
package: String,
},
/// Dump framebuffer of device
Framebuffer {
/// Framebuffer image destination path

View File

@@ -18,17 +18,17 @@ homedir = { version = "0.3.4" }
image = { version = "0.25.5" }
lazy_static = { version = "1.5.0" }
log = { version = "0.4.22" }
mdns-sd = { version = "0.13.1" }
mdns-sd = { version = "0.13.2" }
num-bigint = { version = "0.8.4", package = "num-bigint-dig" }
num-traits = { version = "0.2.19" }
quick-protobuf = { version = "0.8.1" }
rand = { version = "0.8.5" }
rand = { version = "0.9.0" }
rcgen = { version = "0.13.1" }
regex = { version = "1.11.1", features = ["perf", "std", "unicode"] }
rsa = { version = "0.9.7" }
rusb = { version = "0.9.4", features = ["vendored"] }
rustls = { version = "0.23.18" }
rustls-pki-types = "1.10.0"
rustls = { version = "0.23.22" }
rustls-pki-types = "1.11.0"
serde = { version = "1.0.216", features = ["derive"] }
serde_repr = { version = "0.1.19" }
sha1 = { version = "0.10.6", features = ["oid"] }

View File

@@ -41,6 +41,9 @@ pub trait ADBDeviceExt {
/// Install an APK pointed to by `apk_path` on device.
fn install(&mut self, apk_path: &dyn AsRef<Path>) -> Result<()>;
/// Uninstall the package `package` from device.
fn uninstall(&mut self, package: &str) -> Result<()>;
/// Inner method requesting framebuffer from an Android device
fn framebuffer_inner(&mut self) -> Result<ImageBuffer<Rgba<u8>, Vec<u8>>>;

View File

@@ -213,11 +213,11 @@ impl<T: ADBMessageTransport> ADBMessageDevice<T> {
}
pub(crate) fn open_session(&mut self, data: &[u8]) -> Result<ADBTransportMessage> {
let mut rng = rand::thread_rng();
let mut rng = rand::rng();
let message = ADBTransportMessage::new(
MessageCommand::Open,
rng.gen(), // Our 'local-id'
rng.random(), // Our 'local-id'
0,
data,
);

View File

@@ -35,6 +35,10 @@ impl<T: ADBMessageTransport> ADBDeviceExt for ADBMessageDevice<T> {
self.install(apk_path)
}
fn uninstall(&mut self, package: &str) -> Result<()> {
self.uninstall(package)
}
fn framebuffer_inner(&mut self) -> Result<image::ImageBuffer<image::Rgba<u8>, Vec<u8>>> {
self.framebuffer_inner()
}

View File

@@ -96,6 +96,11 @@ impl ADBDeviceExt for ADBTcpDevice {
self.inner.install(apk_path)
}
#[inline]
fn uninstall(&mut self, package: &str) -> Result<()> {
self.inner.uninstall(package)
}
#[inline]
fn framebuffer_inner(&mut self) -> Result<image::ImageBuffer<image::Rgba<u8>, Vec<u8>>> {
self.inner.framebuffer_inner()

View File

@@ -273,6 +273,11 @@ impl ADBDeviceExt for ADBUSBDevice {
self.inner.install(apk_path)
}
#[inline]
fn uninstall(&mut self, package: &str) -> Result<()> {
self.inner.uninstall(package)
}
#[inline]
fn framebuffer_inner(&mut self) -> Result<image::ImageBuffer<image::Rgba<u8>, Vec<u8>>> {
self.inner.framebuffer_inner()

View File

@@ -16,9 +16,9 @@ impl<T: ADBMessageTransport> ADBMessageDevice<T> {
let file_size = apk_file.metadata()?.len();
let mut rng = rand::thread_rng();
let mut rng = rand::rng();
let local_id = rng.gen();
let local_id = rng.random();
self.open_session(format!("exec:cmd package 'install' -S {}\0", file_size).as_bytes())?;

View File

@@ -5,3 +5,4 @@ mod push;
mod reboot;
mod shell;
mod stat;
mod uninstall;

View File

@@ -0,0 +1,19 @@
use crate::{device::adb_message_device::ADBMessageDevice, ADBMessageTransport, Result};
impl<T: ADBMessageTransport> ADBMessageDevice<T> {
pub(crate) fn uninstall(&mut self, package_name: &str) -> Result<()> {
self.open_session(format!("exec:cmd package 'uninstall' {}\0", package_name).as_bytes())?;
let final_status = self.get_transport_mut().read_message()?;
match final_status.into_payload().as_slice() {
b"Success\n" => {
log::info!("Package {} successfully uninstalled", package_name);
Ok(())
}
d => Err(crate::RustADBError::ADBRequestFailed(String::from_utf8(
d.to_vec(),
)?)),
}
}
}

View File

@@ -3,7 +3,6 @@ use base64::{engine::general_purpose::STANDARD, Engine};
use num_bigint::{BigUint, ModInverse};
use num_traits::cast::ToPrimitive;
use num_traits::FromPrimitive;
use rand::rngs::OsRng;
use rsa::pkcs8::DecodePrivateKey;
use rsa::traits::PublicKeyParts;
use rsa::{Pkcs1v15Sign, RsaPrivateKey};
@@ -52,7 +51,7 @@ pub struct ADBRsaKey {
impl ADBRsaKey {
pub fn new_random() -> Result<Self> {
Ok(Self {
private_key: RsaPrivateKey::new(&mut OsRng, ADB_PRIVATE_KEY_SIZE)?,
private_key: RsaPrivateKey::new(&mut rsa::rand_core::OsRng, ADB_PRIVATE_KEY_SIZE)?,
})
}

View File

@@ -20,6 +20,7 @@ pub(crate) enum AdbServerCommand {
MDNSServices,
ServerStatus,
ReconnectOffline,
Uninstall(String),
Install(u64),
// Local commands
ShellCommand(String),
@@ -83,6 +84,9 @@ impl Display for AdbServerCommand {
}
AdbServerCommand::Usb => write!(f, "usb:"),
AdbServerCommand::Install(size) => write!(f, "exec:cmd package 'install' -S {size}"),
AdbServerCommand::Uninstall(package) => {
write!(f, "exec:cmd package 'uninstall' {package}")
}
}
}
}

View File

@@ -97,7 +97,12 @@ impl ADBServer {
.get_raw_connection()?
.read_exact(&mut body)?;
callback(DeviceShort::try_from(body)?)?;
for device in body.split(|x| x.eq(&b'\n')) {
if device.is_empty() {
break;
}
callback(DeviceShort::try_from(device.to_vec())?)?;
}
}
}
}

View File

@@ -115,6 +115,10 @@ impl ADBDeviceExt for ADBServerDevice {
self.install(apk_path)
}
fn uninstall(&mut self, package: &str) -> Result<()> {
self.uninstall(package)
}
fn framebuffer_inner(&mut self) -> Result<image::ImageBuffer<image::Rgba<u8>, Vec<u8>>> {
self.framebuffer_inner()
}

View File

@@ -12,4 +12,5 @@ mod send;
mod stat;
mod tcpip;
mod transport;
mod uninstall;
mod usb;

View File

@@ -0,0 +1,28 @@
use std::io::Read;
use crate::{models::AdbServerCommand, server_device::ADBServerDevice, Result};
impl ADBServerDevice {
/// Uninstall a package from device
pub fn uninstall(&mut self, package_name: &str) -> Result<()> {
let serial: String = self.identifier.clone();
self.connect()?
.send_adb_request(AdbServerCommand::TransportSerial(serial))?;
self.transport
.send_adb_request(AdbServerCommand::Uninstall(package_name.to_string()))?;
let mut data = [0; 1024];
let read_amount = self.transport.get_raw_connection()?.read(&mut data)?;
match &data[0..read_amount] {
b"Success\n" => {
log::info!("Package {} successfully uninstalled", package_name);
Ok(())
}
d => Err(crate::RustADBError::ADBRequestFailed(String::from_utf8(
d.to_vec(),
)?)),
}
}
}

View File

@@ -1,7 +1,7 @@
use adb_client::ADBServer;
use anyhow::Result;
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use rand::{thread_rng, Rng};
use rand::{rng, Rng};
use std::fs::File;
use std::io::Write;
use std::process::Command;
@@ -14,7 +14,7 @@ const REMOTE_TEST_FILE_PATH: &str = "/data/local/tmp/test_file.bin";
fn generate_test_file(size_in_bytes: usize) -> Result<()> {
let mut test_file = File::create(LOCAL_TEST_FILE_PATH)?;
let mut rng = thread_rng();
let mut rng = rng();
const BUFFER_SIZE: usize = 64 * 1024;
let mut buffer = [0u8; BUFFER_SIZE];

26
pyadb_client/Cargo.toml Normal file
View File

@@ -0,0 +1,26 @@
[package]
name = "pyadb_client"
description = "Python wrapper for adb_client library"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true
version.workspace = true
readme = "README.md"
[lib]
name = "pyadb_client"
crate-type = ["cdylib", "rlib"]
[[bin]]
name = "stub_gen"
doc = false
[dependencies]
anyhow = { version = "1.0.95" }
adb_client = { version = "2.1.5" }
pyo3 = { version = "0.23.4", features = ["extension-module", "anyhow", "abi3-py37"] }
pyo3-stub-gen = "0.7.0"
pyo3-stub-gen-derive = "0.7.0"

55
pyadb_client/README.md Normal file
View File

@@ -0,0 +1,55 @@
# pyadb_client
Python library to communicate with ADB devices. Built on top of Rust `adb_client` library.
## Installation
```bash
pip install pyadb_client
```
## Examples
### Use ADB server
```python
from pyadb_client import PyADBServer
server = PyADBServer("127.0.0.1:5037")
for i, device in enumerate(server.devices()):
print(i, device.identifier, device.state)
# Get only connected device
device = server.get_device()
print(device, device.identifier)
```
### Push a file on device
```python
from pyadb_client import PyADBUSBDevice
usb_device = PyADBUSBDevice.autodetect()
usb_device.push("file.txt", "/data/local/tmp/file.txt")
```
## Local development
```bash
# Create Python virtual environment
cd pyadb_client
python3 -m venv .venv
source .venv/bin/activate
# Install needed build dependencies
pip install maturin
# Build development package
maturin develop
# Build stub file (.pyi)
cargo run --bin stub_gen
# Build release Python package
maturin build --release -m pyadb_client/Cargo.toml
```

View File

@@ -0,0 +1,12 @@
[build-system]
build-backend = "maturin"
requires = ["maturin>=1,<2"]
[project]
classifiers = ["Programming Language :: Python", "Programming Language :: Rust"]
dynamic = ["authors", "keywords", "version"]
name = "pyadb_client"
requires-python = ">= 3.7"
[tool.maturin]
features = ["pyo3/extension-module"]

View File

@@ -0,0 +1,45 @@
use std::net::SocketAddrV4;
use adb_client::ADBServer;
use anyhow::Result;
use pyo3::{pyclass, pymethods, PyResult};
use pyo3_stub_gen_derive::{gen_stub_pyclass, gen_stub_pymethods};
use crate::{PyADBServerDevice, PyDeviceShort};
#[gen_stub_pyclass]
#[pyclass]
/// Represent an instance of an ADB Server
pub struct PyADBServer(ADBServer);
#[gen_stub_pymethods]
#[pymethods]
impl PyADBServer {
#[new]
/// Instantiate a new PyADBServer instance
pub fn new(address: String) -> PyResult<Self> {
let address = address.parse::<SocketAddrV4>()?;
Ok(ADBServer::new(address).into())
}
/// List available devices
pub fn devices(&mut self) -> Result<Vec<PyDeviceShort>> {
Ok(self.0.devices()?.into_iter().map(|v| v.into()).collect())
}
/// Get a device, assuming that only one is currently connected
pub fn get_device(&mut self) -> Result<PyADBServerDevice> {
Ok(self.0.get_device()?.into())
}
/// Get a device by its name, as shown in `.devices()` output
pub fn get_device_by_name(&mut self, name: String) -> Result<PyADBServerDevice> {
Ok(self.0.get_device_by_name(&name)?.into())
}
}
impl From<ADBServer> for PyADBServer {
fn from(value: ADBServer) -> Self {
Self(value)
}
}

View File

@@ -0,0 +1,56 @@
use adb_client::{ADBDeviceExt, ADBServerDevice};
use anyhow::Result;
use pyo3::{pyclass, pymethods};
use pyo3_stub_gen_derive::{gen_stub_pyclass, gen_stub_pymethods};
use std::{fs::File, path::PathBuf};
#[gen_stub_pyclass]
#[pyclass]
/// Represent a device connected to the ADB server
pub struct PyADBServerDevice(pub ADBServerDevice);
#[gen_stub_pymethods]
#[pymethods]
impl PyADBServerDevice {
#[getter]
/// Device identifier
pub fn identifier(&self) -> String {
self.0.identifier.clone()
}
/// Run shell commands on device and return the output (stdout + stderr merged)
pub fn shell_command(&mut self, commands: Vec<String>) -> Result<Vec<u8>> {
let mut output = Vec::new();
let commands: Vec<&str> = commands.iter().map(|x| &**x).collect();
self.0.shell_command(&commands, &mut output)?;
Ok(output)
}
/// Push a local file from input to dest
pub fn push(&mut self, input: PathBuf, dest: PathBuf) -> Result<()> {
let mut reader = File::open(input)?;
Ok(self.0.push(&mut reader, dest.to_string_lossy())?)
}
/// Pull a file from device located at input, and drop it to dest
pub fn pull(&mut self, input: PathBuf, dest: PathBuf) -> Result<()> {
let mut writer = File::create(dest)?;
Ok(self.0.pull(&input.to_string_lossy(), &mut writer)?)
}
/// Install a package installed on the device
pub fn install(&mut self, apk_path: PathBuf) -> Result<()> {
Ok(self.0.install(&apk_path)?)
}
/// Uninstall a package installed on the device
pub fn uninstall(&mut self, package: &str) -> Result<()> {
Ok(self.0.uninstall(package)?)
}
}
impl From<ADBServerDevice> for PyADBServerDevice {
fn from(value: ADBServerDevice) -> Self {
Self(value)
}
}

View File

@@ -0,0 +1,58 @@
use std::{fs::File, path::PathBuf};
use adb_client::{ADBDeviceExt, ADBUSBDevice};
use anyhow::Result;
use pyo3::{pyclass, pymethods};
use pyo3_stub_gen_derive::{gen_stub_pyclass, gen_stub_pymethods};
#[gen_stub_pyclass]
#[pyclass]
/// Represent a device directly reachable over USB.
pub struct PyADBUSBDevice(ADBUSBDevice);
#[gen_stub_pymethods]
#[pymethods]
impl PyADBUSBDevice {
#[staticmethod]
/// Autodetect a device reachable over USB.
/// This method raises an error if multiple devices or none are connected.
pub fn autodetect() -> Result<Self> {
Ok(ADBUSBDevice::autodetect()?.into())
}
/// Run shell commands on device and return the output (stdout + stderr merged)
pub fn shell_command(&mut self, commands: Vec<String>) -> Result<Vec<u8>> {
let mut output = Vec::new();
let commands: Vec<&str> = commands.iter().map(|x| &**x).collect();
self.0.shell_command(&commands, &mut output)?;
Ok(output)
}
/// Push a local file from input to dest
pub fn push(&mut self, input: PathBuf, dest: PathBuf) -> Result<()> {
let mut reader = File::open(input)?;
Ok(self.0.push(&mut reader, &dest.to_string_lossy())?)
}
/// Pull a file from device located at input, and drop it to dest
pub fn pull(&mut self, input: PathBuf, dest: PathBuf) -> Result<()> {
let mut writer = File::create(dest)?;
Ok(self.0.pull(&input.to_string_lossy(), &mut writer)?)
}
/// Install a package installed on the device
pub fn install(&mut self, apk_path: PathBuf) -> Result<()> {
Ok(self.0.install(&apk_path)?)
}
/// Uninstall a package installed on the device
pub fn uninstall(&mut self, package: &str) -> Result<()> {
Ok(self.0.uninstall(package)?)
}
}
impl From<ADBUSBDevice> for PyADBUSBDevice {
fn from(value: ADBUSBDevice) -> Self {
Self(value)
}
}

View File

@@ -0,0 +1,5 @@
use pyo3_stub_gen::Result;
fn main() -> Result<()> {
pyadb_client::stub_info()?.generate()
}

30
pyadb_client/src/lib.rs Normal file
View File

@@ -0,0 +1,30 @@
#![forbid(missing_docs)]
#![doc = include_str!("../README.md")]
mod adb_server;
mod adb_server_device;
mod adb_usb_device;
mod models;
pub use adb_server::*;
pub use adb_server_device::*;
pub use adb_usb_device::*;
pub use models::*;
use pyo3::prelude::*;
use pyo3_stub_gen::StubInfo;
#[pymodule]
fn pyadb_client(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_class::<PyADBServer>()?;
m.add_class::<PyDeviceShort>()?;
m.add_class::<PyADBServerDevice>()?;
m.add_class::<PyADBUSBDevice>()?;
Ok(())
}
/// Get stub informations for this package.
pub fn stub_info() -> anyhow::Result<StubInfo> {
// Need to be run from workspace root directory
StubInfo::from_pyproject_toml(format!("{}/pyproject.toml", env!("CARGO_MANIFEST_DIR")))
}

View File

@@ -0,0 +1,32 @@
use adb_client::DeviceShort;
use pyo3::{pyclass, pymethods};
use pyo3_stub_gen_derive::{gen_stub_pyclass, gen_stub_pymethods};
// Check https://docs.rs/rigetti-pyo3/latest/rigetti_pyo3 to automatically build this code
#[gen_stub_pyclass]
#[pyclass]
/// Represent a device output as shown when running `adb devices`
pub struct PyDeviceShort(DeviceShort);
#[gen_stub_pymethods]
#[pymethods]
impl PyDeviceShort {
#[getter]
/// Device identifier
pub fn identifier(&self) -> String {
self.0.identifier.clone()
}
#[getter]
/// Device state
pub fn state(&self) -> String {
self.0.state.to_string()
}
}
impl From<DeviceShort> for PyDeviceShort {
fn from(value: DeviceShort) -> Self {
Self(value)
}
}

View File

@@ -0,0 +1,2 @@
mod devices;
pub use devices::PyDeviceShort;