[DEV][ROOT] NextCloudPi for Android // Deploy NextCloud to ANY Android 4.4+ device - Android Software/Hacking General [Developers Only]

NextCloudPi is a Nextcloud instance that is preinstalled and preconfigured, and includes a management interface with all the tools you need to self host your private data in a single package.
Import the 100MB image linked below into Linux Deploy and wait a few minutes for NextCloudPi to build from install.sh.
ncd12.tgz​
Lightly-forked edition of NextCloudPi to account for network detection and SysV Init scripts
When the Linux container is created NextCloudPi automatically provisions via install.sh
Speedrun of the deployment: YouTube Link
I sent a PR to investigate if it's viable to accomodate this deployment method out-of-the-box. Not many changes needed, mostly just code for network detecton. If accepted, a fork won't be necessary and NCP could install (and update) on Android just like it does currently in Docker or on bare-metal.
Enjoy!

Related

[APP] stunnel for Windows RT

I've ported stunnel version 5.00b1 to Windows RT. It is an SSL encryption wrapper for TCP connections. I've compiled it with the help of bfosterjr's compiled version of the OpenSSL library. I didn't test the installation of a windows service, I just start the stunnel.exe manually. Works fine to tunnel an RDP connection. This tutorial from the documentation page of stunnel came in handy to configure it.
Although I didn't have to change the source, I've included the source code to this post (including the visual studio project + openssl library).

[TOOL][ALL] Assimilation 1.0

Description
Assimilation is a multi-call shell script, designed to manage Arch Linux chroots.
Open Source
Assimilation is open source and licensed under the Apache License 2.0. You can check out the source code at GitHub.
A More Descriptive Description
Assimilation is a shell script I wrote back in the summer of 2013. Since then I've turned it from an overnight project into an open source project on GitHub.
I've always hated using chroots on my Android device, until I wrote Assimilation that is.
Assimilation will automatically detect your CPU architecture (currently it supports ARMv5 - ARMv8, i686, and x86_64), download the corresponding Arch Linux image and extract it. From there it can automatically mount necessary resources and enter a chroot for you. Once you exit the chroot, it can automatically clean up all mounts for you.
Assimilation runs nicely on my Android smartphone and tablet, as well as my HP Chromebook 11.
What Can I Use Assimilation For?
Glad you asked!
Firstly, Assimilation is not for the faint of heart! You must have access to a Terminal and have root access.
I use Assimilation for a number of things...
- I've turned an old Galaxy S into a personal file server that runs surprisingly fast (will write a guide for this soon).
- I also use Assimilation to use programs like Git on my Chromebook.
If you encounter any problems using Assimilation, please use GitHub's Issue tool to bring it to my attention.
If you like Assimilation (or my other app, Epoch Launcher), please follow me on twitter @mirasmithy
Reserved!

Android - Web Automation Bot Creator

I create ScrapperMin a Bot Creator for Windows and Android (Can compile your script into APK)
Download in Play Store : ScrapperMin in Play Store
Documentation : ScrapperMin
Whats for?
1. Auto Login/Auto Posting/Auto Scraping/Auto Download File/Auto Upload File (All you need is to write a script for your task)
2. Automate your daily task or your clients task, just write a script compile to APK and give it to them, or even uploaded to play store
Pro
1. Easy to learn C like language with lots of ready made method for doing communication with website using HTTP Protocol, String Operations such as search between two words (TagMatch), File Operations.
2. Can Compile your script into APK and distribute it in Play Store complete with keystore generated for your keep safe
3. Can Run the script inside the App for testing and later deploy it as APK
4. Have documentation of what Libraries it has offer (see the website)
5. Have Windows and Android version where your script can be run in both platform (most features are compatible, some has not been implemented in Android version like OAuth libraries)
6. Any website accept HTTP protocol can be automated not only just the one offering API.
7. ITS FREE!!
Cons
1. You need to have basic programming skill
2. You need to know what parameter the website you want to automate accept, use Fiddler or browser (F12 developer console) or similar software to capture the package and analyze the input/output
Learn scrappermin syntax is easy, read the docs here : PDF Guide

[Solved, not possible] Help me test eBPF support on modern Android devices

UPD: It turns out bpf() syscall is blocked by seccomp.
From what I understand, Android seccomp whitelists all syscalls listed in bionic SYSCALLS.TXT, and then blacklists some of them, or whitelists missing in SYSCALLS.TXT.
Since bpf() is missing from SYSCALLS.TXT and not whitelisted for applications, we can't use bpf() on stock Android settings.
That sucks.
I want to implement IP-level packet filtering utility for Android which won't require root privileges.
Since RAW sockets or iptables require CAP_SYS_ADMIN/CAP_NET_ADMIN capability which is not available without root, I want to understand if it's possible to attach eBPF program to TCP/UDP socket on modern Android devices.
BPF is a filtering framework with virtual machine which executes bytecode inside Linux kernel. BPF could be used for many subsystems, but I'm interested only in sockets. Non-root BPF should be supported since vanilla Linux 4.4, and I want to check if BPF support is enabled on modern Androids, is available for non-root user, has it been backported to older Android kernels by SoC vendors and how many devices are shipped with BPF support enabled.
I'm asking the owners of Android 7+ devices to perform eBPF support test:
Download Termux terminal emulator (F-Droid, APK). Please use only Termux, it has minimal Linux environment and proper busybox, other terminal emulators likely won't work.
Run the following command inside terminal session (copy&paste):
Code:
wget -O - http://valdikss.org.ru/bpftest/bpf.sh | bash
Copy the output or take a screenshot and upload it here or send it to me using PM.
Source code for those who interested: https://valdikss.org.ru/bpftest/bpftest.c
Note the script is downloaded using unencrypted http. This is because Termux wget does not support https. I assume that developer section of the forum understands all concerns and will take precautions before executing it.
Thanks.
Click to expand...
Click to collapse
Dec 2, 2021
Allow bpf() syscall
…
Allowing the bpf() syscall is safe as its usage is still gated by selinux and regular apps are not allowed to use it.
Allow bpf() syscall · aosp-mirror/[email protected]
The implementation of FUSE BPF requires the FUSE daemon to access BPF functionalities, i.e., to get the fd of a pinned BPF prog and to update maps. In Android the FUSE daemon is part of MediaProvid...
github.com

Force area of memory to remain at compile time on Android

I tried to post this in the development forum, but I am not allowed.
I am tinkering with ARM architecture and Android device development and low level OS stuff. I am currently using QT C++ for Android for app development. This works great for all of my standard Android app development, but now I am digging deeper. I am doing an experiment where I have a small binary blob (64k) of ARM code that I want to load into memory at run time using mmap(). In order for this code to work, it needs to be loaded at address 0x22000000. In my C++ code i call mmap(0x22000000, ...) which would map the binary file to that address only if it were not in use already, which it is on a couple different android devices that I have tried, so it maps to another address, as it should by design. I tried using MAP_FIXED as a flag to mmap() and the application crashes, as expected, since mmap() overwrites memory that is already in use.
In order for mmap() to map the binary file to the address I want, I believe that I can do some sort of advanced Android / Kotlin / gradle level compile time linking modifications in order to make sure that the area of memory (the whole page at least I imagine) that I want to mmap() to is unused when execution reaches my C++ code that calls mmap(). I don't know the android build system very well though, so I hope some Android experts can help me. I am not trying to access real physical RAM though, only address 0x22000000 in the processes virtual address space. Because of this, I believe that with some custom hackery can be done during linking to modify the areas of RAM that are assigned for program/stack/etc use. I believe I am looking for the equivalent of LD script customization for standard GCC C/C++ compiled software, and possibly some direction on how to manipulate.
I have successfully done this on a raspberry pi running raspbian via a command line C++ application, as well as an x86_64 Fedora system using an x86_64 binary blob. In both cases I got lucky that the area of memory was not in use, so mmap() succeeded and I was able to execute the code as desired.

Categories

Resources