Giter VIP home page Giter VIP logo

cfc's Introduction

CameraFileCopy

This is an android app for receiving data over the camera as a one-way data channel. It does not use any antennas (wifi, bluetooth, nfc, ...) or other tricks. Notably, this means it works just as well in airplane mode.

The app reads animated cimbar codes. Nearly all the interesting logic is from libcimbar -- included via a git subtree.

The sender component of cfc is a cimbar encoder -- such as https://cimbar.org. Navigate to that website (or use libcimbar's cimbar_send to generate barcodes natively), open a file to initialize the cimbar stream, and point the app+camera at the animated barcode.

Release apks

Get it on F-Droid Get it on Google Play

Release apks are also available here: https://github.com/sz3/cfc/releases/

Only arm64-v8a is officially supported at the moment, because that is all I can test for.

Building

  1. Install android studio
  2. Install the android ndk
  3. Download OpenCV for android
  4. Create a project with this repo at the root
  5. update gradle.properties such that opencvsdk point to wherever you extracted the OpenCV Android SDK.

I found this project incredibly useful for getting started:

https://github.com/VlSomers/native-opencv-android-template

licensing, dependencies, etc

The code in cfc, such as it is, is MIT licensed. It is mostly a blend of various tutorial apps + wrapper code around libcimbar.

The libcimbar code is MPL 2.0. libcimbar's dependencies are a variety of MIT, BSD, zlib, boost, apache, ...

cfc's People

Contributors

izzysoft avatar poussinou avatar sz3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cfc's Issues

App crashing in Android 13 (failing to load libcfc shared library)

ROM: CrDroid 9.0

Logs:

time: 1703228651524
msg: java.lang.UnsatisfiedLinkError: No implementation found for void org.cimbar.camerafilecopy.MainActivity.shutdownJNI() (tried Java_org_cimbar_camerafilecopy_MainActivity_shutdownJNI and Java_org_cimbar_camerafilecopy_MainActivity_shutdownJNI__)
stacktrace: java.lang.UnsatisfiedLinkError: No implementation found for void org.cimbar.camerafilecopy.MainActivity.shutdownJNI() (tried Java_org_cimbar_camerafilecopy_MainActivity_shutdownJNI and Java_org_cimbar_camerafilecopy_MainActivity_shutdownJNI__)
	at org.cimbar.camerafilecopy.MainActivity.shutdownJNI(Native Method)
	at org.cimbar.camerafilecopy.MainActivity.onPause(MainActivity.java:118)
	at android.app.Activity.performPause(Activity.java:8466)
	at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1591)
	at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:5078)
	at android.app.ActivityThread.performPauseActivity(ActivityThread.java:5039)
	at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4991)
	at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:47)
	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7898)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:946)

won't install due to unknown error

Every time I try to install I get a message download failed due to unknown error.

I tried several times through f-droid as well as through here (the latest version in both cases), both with an error. The last time it said something to the effect of it being unable to parse something (sideloaded through FX).

Install space isn't an issue, because I just installed a different app through the play store.

I use FX file explorer, & unknown sources is checked. I've sideloaded apps many times with no issues.

I also just installed another app (pincredible) through f-droid in the last few days with no problem.

I don't know how to disable play protect, but I'm not sure why it would be causing it. Like I said, I had no problem with "pincredible".

I don't remember what the specs are on my phone, but it's a moto gplay 2021

F-Droid build failed

https://monitor.f-droid.org/builds/log/org.cimbar.camerafilecopy/9#site-footer

> Task :app:stripReleaseDebugSymbols FAILED

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':app:stripReleaseDebugSymbols'.

> 1 exception was raised by workers:

org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/opt/android-sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip''

Could you please take a look? Thanks!

F-Droid inclusion

Hi,

Since this app is MIT licensed, are you considering the fact to add it to F-Droid? There is a strong community behind.

You can find some documentation here.

Otherwise, if you don't want to work on the inclusion of this app by yourself, would it be ok for you if someone else do it for you?

Crash caused by memory corruption bug (with GrapheneOS Exploit protection enabled / hardened_malloc)

By default, the exploit protection is enabled on GrapheneOS (hardened_malloc). This leads to a crash of the app, probably caused by some memory corruption bug. To reproduce, open the App in GrapheneOS and scan a cimbar code. After it begins to decode, the app will crash (at ~20% with my testing).

Version: 0.5.14 (f-droid)
Android: 14 (GrapheneOS)
Log:

         1707323170.661  6826  7006 I CameraFileCopyCPP: processImage computation time = 0.004063 seconds
--------- beginning of crash
         1707323170.714  6826  7017 F libc    : Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb400c75cad23eff8 in tid 7017 (Thread-1), pid 6826 (.camerafilecopy)
--------- switch to main
         1707323170.767  6826  7006 I CameraFileCopyCPP: processImage computation time = 0.005902 seconds
         1707323170.814  7036  7036 E cutils-trace: Error opening trace file: No such file or directory (2)
         1707323170.818  6826  7006 I CameraFileCopyCPP: processImage computation time = 0.003171 seconds
         1707323170.826  7037  7037 E DEBUG   : failed to readlink /proc/7017/fd/118: No such file or directory
         1707323170.886  7037  7037 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstoneProto
         1707323170.888  7037  7037 I crash_dump64: performing dump of process 6826 (target tid = 7017)
         1707323170.901  6826  7006 I CameraFileCopyCPP: processImage computation time = 0.003644 seconds
         1707323170.944  6826  7006 I CameraFileCopyCPP: processImage computation time = 0.006658 seconds
         1707323170.974  6826  7006 I CameraFileCopyCPP: processImage computation time = 0.008066 seconds
         1707323170.995  7037  7037 E cutils-trace: Error opening trace file: No such file or directory (2)
         1707323171.024  6826  7006 I CameraFileCopyCPP: processImage computation time = 0.005572 seconds
         1707323171.056  6826  7006 I CameraFileCopyCPP: processImage computation time = 0.004223 seconds
         1707323171.090  6826  7006 I CameraFileCopyCPP: processImage computation time = 0.004280 seconds
         1707323171.114  6826  7006 I CameraFileCopyCPP: processImage computation time = 0.003491 seconds
         1707323171.166  6826  7006 I CameraFileCopyCPP: processImage computation time = 0.006155 seconds
--------- switch to crash
         1707323171.173  7037  7037 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
         1707323171.173  7037  7037 F DEBUG   : Build fingerprint: 'google/raven/raven:14/UQ1A.240205.002/2024020500:user/release-keys'
         1707323171.173  7037  7037 F DEBUG   : Revision: 'MP1.0'
         1707323171.173  7037  7037 F DEBUG   : ABI: 'arm64'
         1707323171.173  7037  7037 F DEBUG   : Timestamp: 2024-02-07 17:26:10.927027772+0100
         1707323171.173  7037  7037 F DEBUG   : Process uptime: 14s
         1707323171.173  7037  7037 F DEBUG   : Cmdline: org.cimbar.camerafilecopy
         1707323171.173  7037  7037 F DEBUG   : pid: 6826, tid: 7017, name: Thread-1  >>> org.cimbar.camerafilecopy <<<
         1707323171.173  7037  7037 F DEBUG   : uid: 10333
         1707323171.173  7037  7037 F DEBUG   : tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
         1707323171.173  7037  7037 F DEBUG   : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb400c75cad23eff8
         1707323171.173  7037  7037 F DEBUG   :     x0  0000c42ff1036dc8  x1  00000000ffffffff  x2  0000c42ff103693c  x3  0000000000000001
         1707323171.173  7037  7037 F DEBUG   :     x4  0000000000000004  x5  0000000000000010  x6  0000000000000024  x7  0000000000000000
         1707323171.173  7037  7037 F DEBUG   :     x8  0000000000000063  x9  b400c75cad23f000  x10 00000000000003b9  x11 fffffffffffffff8
         1707323171.173  7037  7037 F DEBUG   :     x12 b400c584e3740376  x13 0000000000000001  x14 0000000000000001  x15 000000000000000c
         1707323171.173  7037  7037 F DEBUG   :     x16 0000c4300b1d82e0  x17 0000c4300b134844  x18 0000c42fee5ea000  x19 0000c42ff1036dc8
         1707323171.173  7037  7037 F DEBUG   :     x20 0000000000000001  x21 0000000000000004  x22 0000c42ff1036d58  x23 b400c75cacef1ca8
         1707323171.173  7037  7037 F DEBUG   :     x24 000000000000301c  x25 b400c75cacef1ca9  x26 0000c42ff1036d60  x27 0000c42ff11dd040
         1707323171.173  7037  7037 F DEBUG   :     x28 0000000000002fb5  x29 0000c42ff10368a0
         1707323171.173  7037  7037 F DEBUG   :     lr  0000c4300b13300c  sp  0000c42ff1036830  pc  0000c4300b1348ac  pst 0000000080001000
         1707323171.173  7037  7037 F DEBUG   : 9 total frames
         1707323171.173  7037  7037 F DEBUG   : backtrace:
         1707323171.173  7037  7037 F DEBUG   :       #00 pc 00000000000f38ac  /data/app/~~42bEUkZXkXYiG0O2XNiSPQ==/org.cimbar.camerafilecopy-hWUKdVY8rp5Gjokq6qNAIQ==/lib/arm64/libcfc-cpp.so (AdjacentCellFinder::bottom(int) const+104) (BuildId: 75aa0c835b5b43e906f4567e4a95e83e4fba37b1)
         1707323171.173  7037  7037 F DEBUG   :       #01 pc 00000000000f2008  /data/app/~~42bEUkZXkXYiG0O2XNiSPQ==/org.cimbar.camerafilecopy-hWUKdVY8rp5Gjokq6qNAIQ==/lib/arm64/libcfc-cpp.so (FloodDecodePositions::update(unsigned int, CellDrift const&, unsigned int, unsigned char)+1360) (BuildId: 75aa0c835b5b43e906f4567e4a95e83e4fba37b1)
         1707323171.173  7037  7037 F DEBUG   :       #02 pc 00000000000b0444  /data/app/~~42bEUkZXkXYiG0O2XNiSPQ==/org.cimbar.camerafilecopy-hWUKdVY8rp5Gjokq6qNAIQ==/lib/arm64/libcfc-cpp.so (CimbReader::read(PositionData&)+276) (BuildId: 75aa0c835b5b43e906f4567e4a95e83e4fba37b1)
         1707323171.173  7037  7037 F DEBUG   :       #03 pc 0000000000083dac  /data/app/~~42bEUkZXkXYiG0O2XNiSPQ==/org.cimbar.camerafilecopy-hWUKdVY8rp5Gjokq6qNAIQ==/lib/arm64/libcfc-cpp.so (unsigned int Decoder::do_decode<aligned_stream<concurrent_fountain_decoder_sink<cimbar::zstd_decompressor<std::__ndk1::basic_ofstream<char, std::__ndk1::char_traits<char> > > > > >(CimbReader&, aligned_stream<concurrent_fountain_decoder_sink<cimbar::zstd_decompressor<std::__ndk1::basic_ofstream<char, std::__ndk1::char_traits<char> > > > >&)+1064) (BuildId: 75aa0c835b5b43e906f4567e4a95e83e4fba37b1)
         1707323171.173  7037  7037 F DEBUG   :       #04 pc 0000000000083338  /data/app/~~42bEUkZXkXYiG0O2XNiSPQ==/org.cimbar.camerafilecopy-hWUKdVY8rp5Gjokq6qNAIQ==/lib/arm64/libcfc-cpp.so (std::__ndk1::__function::__func<MultiThreadedDecoder::add(cv::Mat)::'lambda'(), std::__ndk1::allocator<MultiThreadedDecoder::add(cv::Mat)::'lambda'()>, void ()>::operator()()+736) (BuildId: 75aa0c835b5b43e906f4567e4a95e83e4fba37b1)
         1707323171.173  7037  7037 F DEBUG   :       #05 pc 00000000000ac240  /data/app/~~42bEUkZXkXYiG0O2XNiSPQ==/org.cimbar.camerafilecopy-hWUKdVY8rp5Gjokq6qNAIQ==/lib/arm64/libcfc-cpp.so (turbo::thread_pool::run()+1616) (BuildId: 75aa0c835b5b43e906f4567e4a95e83e4fba37b1)
         1707323171.173  7037  7037 F DEBUG   :       #06 pc 00000000000ac5c8  /data/app/~~42bEUkZXkXYiG0O2XNiSPQ==/org.cimbar.camerafilecopy-hWUKdVY8rp5Gjokq6qNAIQ==/lib/arm64/libcfc-cpp.so (BuildId: 75aa0c835b5b43e906f4567e4a95e83e4fba37b1)
         1707323171.173  7037  7037 F DEBUG   :       #07 pc 00000000000cfa2c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204) (BuildId: 8bc16426785f69835644a00e95964c1d)
         1707323171.173  7037  7037 F DEBUG   :       #08 pc 0000000000064770  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8bc16426785f69835644a00e95964c1d)
--------- switch to main
         1707323171.204  6826  7006 I CameraFileCopyCPP: processImage computation time = 0.004162 seconds
--------- switch to events
         1707323171.229  6826  6826 I wm_on_top_resumed_lost_called: [Token=245731568,Component Name=org.cimbar.camerafilecopy.MainActivity,Reason=topStateChangedWhenResumed]
--------- switch to main
         1707323171.238  6826  6826 I CameraFileCopyCPP: Shutdown cfc-cpp

Does this app work at all?

I followed the instructions 1:1 any yet, the app does neither recognise the code I uploaded nor does it show ANY signs of progression at all. There is no "Make foto"-button or similar feature to at least trigger the processing manually.
I find it hard to like silent apps that don't work.

"App not installed" error

CameraFileCopy is failed to install, but system requirements seem to match.
My phone with Snapdragon 439 processor has 4+4 Cortex-A53 cores operating under Android 9.

camera is mirrored

On a Nexus 5X, the camera image is mirrored in both directions. This makes it hard to line up.

cmake version

Google sdkmanager has 3.18.1

Debian stable has 3.18.4 https://packages.debian.org/bullseye/cmake

Google sdkmanager has 3.22.1

Debian stable backports has 3.25.1 https://packages.debian.org/bullseye-backports/cmake

But you want 3.16.3 https://github.com/sz3/cfc/blob/v0.5.12/app/build.gradle#L32

Can this be changed to those that are easily available?

I can force it before the F-Droid build https://gitlab.com/fdroid/fdroiddata/-/blob/f9bd350d3e85c60a5e0a3402acc51344bb17dabc/metadata/org.cimbar.camerafilecopy.yml#L56

But maybe this is easier to setup here upstream.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.