I would like to write/use an open source script that can access iOS filesystem (non-jailbroken). On a Jailbroken device, i use ssh/scp to access, transfer data from the device. Intent is to copy some part of the iOS filesystem (say /var/mobile/Applications/xxx-xxxx/Documents) to a Mac, from a non-Jailbroken device, using some script. I see that tools like iFunBox is able to do it. Would like to know it manages to do so.
I came across mobiledevice.h but could not really understand how to use it.
Also, would prefer getting this done over USB.. for a jailbroken device, i use tcprelay.py for doing the usb tunneling. Is there something i can use for a non jailbroken device?
You can install the ifuse tool, which is hosted here: https://github.com/libimobiledevice/ifuse
In order to compile this tool, you will need the a working set of Gnu-tools (make, libtool, etc).
#Don't worry - clang is still default
sudo port install gcc48
NB: Update your .bash_profile (or similar) to include the following:
#Important - this is where your compiled libs will get installed to, so we need this
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/**
The rest of this process should take a few minutes
Install fuse4x
sudo port install fuse4x
Build the dependencies:
Check out: https://github.com/libimobiledevice/libplist, cd into the checkout, and run:
./autogen.sh
./configure
make
sudo make install
Check out: https://github.com/libimobiledevice/libusbmuxd, cd into the checkout, and run:
./autogen.sh
./configure
make
sudo make install
Check out: https://github.com/libimobiledevice/libimobiledevice, cd into the checkout, and run:
./autogen.sh
./configure
make
sudo make install
(If you're on Linux you'll also need to install usbmuxd, after building libusbmuxd and libimobiledevice. . otherwise, for Windows and OSX . . . )
Now build iFuse:
Check out: https://github.com/libimobiledevice/ifuse
./autogen.sh
./configure
make
sudo make install
To use ifuse to access your app's documents directory:
Make a mount directory:
sudo mkdir -p /Volumes/myapp.app
Now mount the app's dir:
ifuse --container <appid> /Volumes/abced.app
Where app id is the name what's displayed in the bundle identifier . . example:
ifuse --container mycompany.ABCED.com /Volumes/abced.app/
(Refer to the attached pic)
The MobileDeviceManager library brings us simple filesystem operations (it's an easy-to-use Objective-C wrapper around the MobileDevice framework you have come across).
The thing is that it doesn't support copying files from the device to the computer, only the other way around. So, in order to work around this issue, I've created a patch (GitHub gist) that you can merge into the included sample program to have it understand the copyFrom command.
Related
I'm trying to install yq#3 on my Mac running brew install yq#3 and I get the error:
Error: yq#3 has been disabled because it is not maintained upstream!
I see that it's there on their website at https://formulae.brew.sh/formula/yq#3#default but it doesn't seem to be supported anymore.
I still need to install it since our projects at work are using this specific version.
The only way that I'm thinking about is downloading the source code, building it myself, and adding it to the path but I'm thinking that there might be a simpler solution.
Any suggestion?
Thanks!
From yq github, you can install a binary by running:
wget https://github.com/mikefarah/yq/releases/download/3.4.1/yq_darwin_amd64 -O /usr/local/bin/yq &&\
chmod +x /usr/local/bin/yq
3.4.1 is the latest 3 version, darwin_amd64 is the Mac package (don't worry about having an Intel machine and installing the package that says AMD, the name comes from something about AMD invented the 64-bit instruction set).
I'm working on a IOS Game that I built using Unity and I'm trying to get it to build on Xcode. However I keep getting this Shell Script Invocation Error "/Users/masterolu/Downloads/ShoeJackCityBuilds/iOS/MapFileParser.sh: Permission denied".
I've tried to use chmod +x /Users/masterolu/Downloads/ShoeJackCityBuilds/iOS/MapFileParser.sh but for some reason my machine doesn't recognize the chomd command anymore. I tried to reinstall it by using sudo apt install --reinstall coreutils but in order to use apt I need a JDK(Java Developer Kit). So I install the latest JDK and when I try to reinstall chomd my terminal says "Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home/bin/apt" (-1)". At this point I decided it's best to come and ask for help.
Any ideas on how to fix this error in Xcode or how to install chomd so my app can run?
So, apparently Apple likes to disable the execution permission of all the shell scripts that have not been created on your machine (i.e. downloaded from web, cloned from repo) so what you have to do is to open a terminal inside the project folder and run chmod -x MapFileParser.sh, that should fix it.
I have also done it on the process_symbols.sh just to be sure it runs.
## EDIT ##
My solution for my gihub action was this as the -x version did not work correctly for my scenario.
- name: Update scripts permissions
run: |
pwd
sudo chmod 755 MapFileParser.sh
sudo chmod 755 process_symbols.sh
This works for me:
chmod 777 MapFileParser.sh
I'm new to cydia dev and I downloaded a couple of examples fro iphonedevwiki.
I've got my iPad jailbroken and how do I install the demo Theos tweak to my device? Thanks.
And by the way is iOSOpenDev working for iOS 8?
Once you have compiled your tweak (using make), you need to create a deb package file (using make package). This will create a .deb file. Then you transfer the .deb file to your iPad. Once it is transfered, open an ssh session to it and install it from the command line using:
dpkg -i 'filename.deb'
Of course, the method Cl3ment mentioned works too but this is a step-by-step way of doing it in case you wanted to do some parts manually.
If your device and your computer use the same Wi-Fi network, you need to edit the project's Makefile to add this to its first line :
THEOS_DEVICE_IP = 192.168.1.4
(Of course, replace the IP address with your iDevice's IP)
To install the tweak, you need to use the make package install command within Terminal. It will compile the tweak, then create a .deb package for it, then attempt to install it to your device (you will be prompted for root password two times, and your iDevice will then respring)
I write a jailbroken app using iOSOpenDev which can play audio in background when a timer fires.
When I use iOSOpenDev to build a .deb package, scp it to my iphone and install it using iFile, it works fine. But when I extract the .app to fold ~/temp, control file to ~/temp/DEBIAN/ , build a .deb package using command dpkg-deb -b ~/temp ~/myapp.deb, install and run it. It won't play music in background untill I bring it back to foreground.
Did I miss something when building the package?
There is no need to use scp and iFile.
With iOSOpenDev's command-line tool iosod there are commands to perform what you're trying to do:
iosod build: Builds a Debian package (does not require dpkg).
iosod install: Installs a Debian package on an iDevice.
There are even commands to remove and purge packages from an iDevice (iosod remove, iosod purge). To see all commands provided, in Terminal type iosod.
I should not only use terminal when building package but also to extracting file, then we can avoid the Finder adding some files, such as .DS_Store, we don't need.
Trying to build a completely self-contained OTP that can be moved around independently of libs installed on a system.
Build OpenSSL 1.0.0d from source as follows:
./config --prefix=<open-ssl-dir>
make
make install
Then OTP R14B03:
./configure --prefix=<erlang-dir> --with-ssl=<open-ssl-dir> --without-termcap
Make of Erlang then fails as follows:
relocation R_X86_64_32 against `OPENSSL_ia32cap_P' can not be used when making a shared object; recompile with -fPIC
We're talking Ubuntu 10.04. Any help greatly appreciated - thanks!
The "can not be used when making a shared object; recompile with -fPIC" would mean SSL is not build with the Position Independent Code flag. This is needed for building it as a Dynamic Shared Object (DSO). This is probably needed by Erlang build process. Example build:
$ tar zxvf openssl-0.x.tar.gz
$ cd openssl-x
$ sh config shared -fPIC
$ make
$ sudo make install
For ppc64le:
./configure --prefix=/home/huaxin/huaxin/toolsInstalled/ --build=ppc64le CFLAGS="-D_GNU_SOURCE -DOPENSSL_NO_EC=1"
I suggest that you build on a VM where you have sudo permissions. Then build libraries like OpenSSL using --prefix=/usr so that make install puts them in the usual system library.
Then build your tool, in this case Erlang, using -rpath. Then use ldd to find all library dependencies for Erlang and any ports (C extensions) and copy those into Erlangs lib directory. Check all binaries and libraries with readelf -d to make sure that RPATH is set to $ORIGIN or $ORIGIN/../lib as needed. Use patchelf to fix these things if the linking process is not quite right (or you copied in secondary dependencies of system libraries).
Then use patchelf to set the interpreter for your binaries (not libraries) to point to ld-linux.so.2 in Erlang's lib directory. And then run a test suite using
strace -e open erl ... to make sure that your build is not opening anything in /lib or /usr/lib.
At this point tar it up and it will run on any Linux.
See this question Compiling Python 2.6.6 and need for external packages wxPython, setuptools, etc... in Ubuntu for far more detail on how I built Python in this fashion.