Skip to content

2.2.1

Choose a tag to compare

@everettjf everettjf released this 04 Dec 05:00
· 31 commits to main since this release

Android 17 inside an iPhone or iPad app, with no jailbreak. Version 2.2.1 is a small one after 2.2: Android no longer stands still each time an app saves its data.

Nestvane is still for developers only. The only way to run it is to sign the IPA with a paid Apple Developer Program membership (US$99 a year) and sideload it.

New in 2.2.1

Saving

When an app calls fsync, Nestvane commits Android's data volume to its store on the device, at most once every two seconds. Until now every commit handed the store the bytes of every file to compare (187 MB with ten apps installed), and Android stood still until it was done: about 180 ms each time, more than a second the first time after a start.

  • A commit takes only the files that changed. Writes, changes of size and writable shared mappings mark a file; the others are only noted as still there.
  • The store is written on a thread of its own. The main loop takes a snapshot (3 to 14 ms) and goes on; this is the first work of Nestvane's Linux layer that does not run on the main loop.
On an iPad Air (M3), the 75 s in which WeChat Read is opened 2.2 2.2.1
commits of the data volume 30 or 31 31
time the main loop spent on them 5.5 to 6.3 s 0.2 s
the longest 1.0 to 1.5 s 14 ms
  • What an app notices of this was not measured; no opening time was compared.
  • An fsync now returns when its commit has begun, not when it is on disk, and is not told if the write fails. (A second fsync within two seconds already returned at once.) Stopped at a bad moment, Android loses about the last two seconds of writing, as before; the store always holds one whole earlier state. sync, the end of an app's installation and the commit when Android is stopped from the app still wait until the store is written.

Binder

An object that a process sends again after its last reference went is announced to the sending thread before the call is reported as sent, as Linux does. It was announced to whichever of the process's threads read next. No failure is known to have come from this.

Left as it is

  • System calls other than this still run on one thread. In those 75 s the main loop spends about 9 s in them.
  • Waking only the threads that wait for what changed is still off. The stop of a system service that it showed in 3 of 10 test runs before 2.2 did not come back in 10 runs of 2.2; why it happened was not found.
  • Zhihu still stops, in its own native code, about 15 s after its start.
  • Everything else is as in 2.2, the optional JIT included.

Start time

The boot check passed on the iPad Air, the one device this version was tested on: the median of five starts to the Android home screen was 5.8 s (5791 ms; the five: 5908, 5698, 5791, 5770, 5951) against the 5559 ms baseline, 4.2% slower, which counts as level (within 10%); the baseline stays. Android on it has ten apps installed.

Known problems

  • Not tested on an iPhone in this version, nor was 2.2. Everything above was measured on an iPad Air; the iPhone 14 this project also tests on was in other use. Telling Android of two processors changes how many threads every app makes, and that was not tried on an iPhone's two fast cores.
  • Once in six runs of the app test, a background process of Feeder stopped (SIGABRT) with two processors; not seen again, cause unknown.
  • What Termux runs is still slow, though about four times faster than in 2.1 by the benchmark above; Termux itself was not timed again. Ctrl-Z (stopping a program) does nothing.
  • Signing in to a Google account through the bundled microG was not tried in this version.
  • With many large apps open, those in the background are still ended sooner than on a phone.
  • Alook opens and draws its home page, then stops when it loads a page on an iPhone 14. WeChat Read's reading page takes about a minute to be ready unless its libraries were translated on a Mac.
  • An Android app that has a file open while it is replaced from outside keeps reading the old one, until it opens the file again.
  • VP9 and AV1 video and all encoding are software. The camera gives 640×480 only.
  • Apps that do not open yet: NetEase Cloud Music, 12306, Zhihu, LocalSend (too slow). Baidu Netdisk ships only 32-bit code, which Nestvane does not run. The list.
  • When an Android app reaches for a device on your local network, iOS asks whether Nestvane may; "Don't Allow" keeps the internet working.
  • Bluetooth cannot be turned on, and Android's Wi-Fi switch stays off. KernelSU modules do not work.
  • Google's own apps and Play services are not included (this is AOSP); no real phone calls or SMS.

Install

Nestvane-2.2.ipa carries no signature and no provisioning profile. Sign it with your own Apple developer identity, with the Extended Virtual Addressing and Increased Memory Limit capabilities, then install it: docs/installing.md. Installing over an earlier version with the same identity keeps Android's apps and data.

  • iOS or iPadOS 17 or later, and at least 6 GB of memory. This version was tested on an iPad Air (M3, iPadOS 27.0.1) only.
  • A paid Apple Developer Program membership (US$99 a year) is needed.
  • 1.42 GB to download, about 4.2 GB installed.
  • SHA-256: bf80912d8a7f42a93336492d36743bcc25360dfee5fa24217f405c99e39614cc

Inside

The app contains an Android 17 system built from the Android Open Source Project with this repository's patch, Android System WebView (AOSP's prebuilt build of Chromium 128.0.6613.88), and gfxstream and ANGLE. It also contains four apps as their publishers built them: F-Droid 2.0.3 (GPL-3.0-or-later), microG Services and Companion 0.3.18 (Apache-2.0) and Aurora Store 4.8.4 (GPL-3.0); their sources are named in THIRD-PARTY-NOTICES.txt. The notices are inside the app, in Licenses/, and attached here as NOTICE-AOSP.txt, NOTICE-WEBVIEW.html and THIRD-PARTY-NOTICES.txt. Nestvane's own code is under the Apache License 2.0.

A few parts of that Android system, iptables and libexif among them, are under the GPL or the LGPL. Their source is AOSP at android-17.0.0_r1 with this repository's patch (experiments/aosp/patch.py); for three years from this release AtomSprout will also send a copy of it, or of the source of F-Droid or Aurora Store, to anyone who asks at atomsprout@gmail.com, for no more than the cost of the transfer. WebView's source is Chromium at 128.0.6613.88.

With thanks to Twoyi and Kernarium: how the three compare.