I'm developing an app with Xcode for the iPhone (jailbroken). Now I want to install a .deb file programmatically. How can I do this? I could execute a command to install it, but how? Is it enough if I install my app via Xcode on my jailbroken iPhone? (.ipa) or do I need to create a .deb? If yes, how?
Thank you very much!
Have a nice day.
edit: I made a app. In this app I have a file browser (only for documents directory). In this directory there are .deb files. Now, I want to install these .deb files programmatically if the user taps on one. How do I go about this?
AFAIK dpkg -i *.deb is the command to install a .deb. But you cannot install a .deb in a .deb because the package manager is locked thus you need a script or something.
If you want your app to function as a package installer, then yes, I would use
dpkg -i filename.deb
You could execute this command programmatically with a system() call, or an exec() call, with "dpkg -i filename.deb" as the command. You might want to fully qualify the path to dpkg (e.g. /usr/bin/dpkg ... or whatever it is ... I'm not on my phone now) if you use system() especially.
It might be that you find that you need to have root privileges to do this. See this on how to give your app root privileges.
Another option, that doesn't require your app running as root or using exec() or system() calls, is to use the technique I describe in this answer, which was about how to reboot an iPhone programmatically. Just as I used a script to call the reboot command, you could write a script to execute dpkg -i filename.deb. You'd just need to come up with a mechanism to pass the filename to your script, which I assume would change dynamically (unless your program used a temporary link that always pointed to the current .deb file to be installed.)
Many options.
You can learn the source code of Cydia.( Official site provide source code)
Learn source code from Icy Github. https://github.com/ripdev/Icy
The simple way, just use system function to invoke dpkg command.
NSString *appsyncDebPath=#"/var/root/appsync.deb";
NSString *cmdString=[NSString stringWithFormat:#"/usr/bin/dpkg -i %# >/tmp/dpkg.log;",appsyncDebPath];
const char *cmdChar=[cmdString UTF8String];
system(cmdChar);
You may show result from /tmp/dpkg.log
AFAIK jailbreaking an iPhone let you install ipa without certificates... so it's enough...
Related
Currently I get this error
(file-error \"File cannot be opened\" \"Operation not permitted\" \"/Users/foo/Downloads\")")
In other answers I've seen we give ruby all the permissions as described here https://apple.stackexchange.com/questions/371888/restore-access-to-file-system-for-emacs-on-macos-catalina/371945#371945
but is this still the case? Is there an alternative? I am on Emacs 27.2
Since it's hard to control the app permissions for a specific directory on macOS (you can't add it in settings, and it only prompts on first access or something I'm not sure about), I recommend enabling Full Disk Access permissions for Emacs.
Another option to try is to reset the app Privacy and then confirm it the next time you are prompted (to access files in the Downloads folder).
# codesign --force --deep --sign - /Applications/Emacs.app
sudo tccutil reset All org.gnu.Emacs
Sounds like emacsformacos.
That is using a wrapper in ruby to decide which binary to run.
As nobody wants to give ruby full control I compiled it myself for some time.
With 28.1 I switched to
port install emacs-mac-app
I have a Linux server, and it has its own Perl whose version is not what I want. So I want to install another Perl on it.
I tried to solve it with Perlbrew, but my server can't download it. It seems like my server does not trust that website address. And I don't know whether I should download it as root. Besides, I think there is a huge difference between root and a normal user to download and install it, and I just want do it as a normal user.
Is there another way install different version Perl on my server?
I downloaded the version I want before, and I tried to install it in a usual way, but it just failed.
Here is the wrong when I tap the command
wget -O - https://install.perlbrew.pl | bash as a normal user.
Maybe I should tap it as root?
And when I try to install the Perl v5.8.8(this is version I want) in ~/bin,i run the Configure.
But I can not run make after that, it just told me that make:No rule to make target , needed by miniperlmain.o Stop.
Besides,
my Linux is Centos 7.4. I don`t how to fix it.
It seems that I find a way to let me to make.
Here is the link.
After I edit the makedepend.SH, I run make again. But I got this wrong:
The thing is really weird. Why Perl V5.8.8 is so difficult to install.
The easy answer is 'just install perl' - it'll drop by default into /usr/local/bin, and you can just use that instead.
DON'T overwrite /usr/bin/perl, as that's a recipe for pain. (Lots of stuff will have dependencies on perl versions installed via your package manager).
I am using Ubuntu 12.04. I have installed doxygen 1.8.3.1 using make install.
I would like to uninstall the doxygen built by make, but I don't find any way to do it using make (uninstall or clean...).
In the Makefile there is no reference to uninstall it the software. :(
Unfortunately I can't use the sudo apt-get remove doxygen because it wasn't an installed. :(
I don't find anything related on the internet.
Can anyone help me, please?
Thank you in advance,
Fabiola
There is no "uninstall" target. You need to do a "rm" be hand. If you used the standard prefix path "/usr/local" then
rm /usr/local/bin/doxygen
rm /usr/local/man/man.1/doxygen.1
(more if you install the docs are wizard). Depend on the user used for install, you need sudo to do it.
I know this question is old, but since it is the first result in google I would like to share another way of uninstalling Doxygen built from source. In the build directory where you've ran make there should by a file name install_manifest.txt. That file contains paths to files that were installed using make install command. All you need to do is to run the following command:
sudo xargs rm < install_manifest.txt
Of course this assumes that you've kept the build directory or at least the install_manifest.txt file. If not you need to remove the files by hand as somebody already suggested.
I am writing a software for an embedded device, the basic function is VoIP, now I want to implement the SIP using eXosip2. I have downloaded the libeXosip2-3.6.0 source code from http://savannah.nongnu.org/projects/exosip/
I checked a few example code and find that to send an INVITE message, I need to call:
eXosip_call_build_initial_invite (in eXcall_api.c)
In this function, it will call osip_to_init , osip_to_parse , osip_to_free etc functions, however I could not find these functions in the eXosip2 folder....why?
Actually I also downloaded the osip2 library, I can find these functions, but can not see them in the eXosip2. Are these functions included in some object files that I can not read the content? Or actually I need to include both the osip2 and eXosip2?
I am sorry if this is a trivial question, I am novice to programming and would be very thankful if you can help.
You need to also build libosip2. Then link libeXosip2 to the libosip2 libraries
To be complete, you need to download libosip-3.6.0 and install it with those commands line (on a linux/unix platform):
$> tar -xvzf libosip-0.X.X.tar.gz
$> mkdir linux-build
$> cd linux-build
$> ../libosip-0.X.X/configure
$> make
# make install
Then compilation of eXosip2 should work.
The same is true for newer versions.
I'm developing a Cydia app. It's been in development for awhile, and I've never had any problems until recently, when I resumed development after a few months. There are a couple of things that have changed since the last time I worked on it:
Upgraded to Lion
Moved to Xcode 4
Updated to 4.3.5 on my iPad, iPhone to 5.0
From the research I've done, I've come to the conclusion that there was something "unusual" about my old setup. I've discovered that provisioned apps get put in the "sandboxed directory" /private/var/mobile/Applications, and system apps that get read access to the entire filesystem go in /Applications. I guess from using updated tools and Lion, I broke whatever was giving me system-wide read privileges. So, I need information on how to get Xcode to deploy directly to the non-sandboxed system directory.
There are some caveats though. I don't want to have to use an installer, I want Xcode to do it automatically after Build and Run. I also want to be able to have the debugger attached so I can view the console.
Can anyone with experience in this teach me how to use Build Phase Scripts to do necessary magic to take the signed binary and deploy it automatically after each build? I'd imagine this is indeed possible, because console output is such a valuable tool, that it would be too difficult to develop apps like Cydia itself.
Thank you for your help!
The general consensus among the community is that this isn't desirable. A build system like Theos coupled with on device GDB and either a syslog package or deviceconsole is what many are using.
I added a script as custom build phase. The script signs the app, create a package, copy it to the phone and install it.
The Build Phase is "Run a Script" with /bin/sh and I added "${PROJECT_DIR}/MyApp/install.sh"
The scripts (very basic - no error handling) is below (replace with appropriate values) :
(LatestBuild is a link to the build directory)
(ldid is installed with iosopendev project)
cd $HOME/Projects/iPhone/MyProject/MyApp
cp -r ../LatestBuild/MyApp.app com.test.MyApp/Applications/
ldid -S com.test.MyApp/Applications/MyApp.app/MyApp
rm com.test.MyApp.deb 2>&1
/opt/local/bin/dpkg-deb -b com.test.MyApp
scp com.test.MyApp.deb root#192.168.0.10:/var/root
ssh root#192.168.0.10 "dpkg -r com.test.MyApp"
ssh root#192.168.0.10 "dpkg -i com.test.MyApp.deb"
ssh root#192.168.0.10 "killall -9 MyApp"
#ssh root#192.168.0.10 "killall -HUP SpringBoard"
cd -
It can be improved a lot - but it just works for my needs
I'm not particuralry well knowledgable about xcode but like most IDE's im assuming in one shape or another that you can have it run a post build script if you can figure out what that is its as simple as an scp command to upload from there you can use ldid -S nameofapp in the dir that the app is uploaded to.
You can if you want allow your app to reside in /Applications though upgrading to 4.3.5 most likely forces you on a tethered Jailbreak I'm not aware of an untethered JB for 4.3.5 so thats a hassle if you wind up having to reboot.
As far as debuggers give gdb(you can get it from cydia) a go its really useful :). What Id do is just have xcode run a post build script to use scp to upload to your device then sign it manually with ldid thats the easiest way i can think of unless you have access to a developer idevice.
Give me a few minutes Ill write a script and try to describe how it works I need one anyone since i finally got a mostly working open toolchain. :)
A simple upload script
#!/bin/bash
scp -r $1 $2#$3:$4
$1 is lets say your app folder ill use my dpatcher as an example
$2 is user name either mobile or root(if you upload as root you need to chmod permissions to 755)
$3 is your idevices local ip(ie your routers ip for it)
you can find your ip with sbsettings or by going to settings tap the blue arrow next to your ap and it will tell you.
$4 is where you want it to be most likely /Applications or /var/mobile/Applications
i named it upload.sh but you can name it anything
An example
upload.sh dpatcher.app mobile#192.168.1.65 /Applications
Then all you do is ssh in and sign it with ldid -S nameofapp
If you want to upload single files remove -r as thats for recursive uploads(ie folders)
the reason that you must use scp or sftp for uploading files is that normal ftp AFAIK is not supported with out the use of 3rd party apps.
I'm not sure how to integrate with Xcode I do every thing with either vi, emacs or nano(and I don't own a mac).