Install app into jailbroken ios Root’s Applications folder - ios5

when i put myapp.app in ios5 root's Applications folder, but it can't work.
why? but i find that cydia can work normally.

In the main.m add setuid(0); and setgid(0);
Build the app normally.
Then copy and paste the executable inside the .app and rename it to
anything you want, don't rename the original file.
Open the original executable file and delete its contents (the
contents are now stored in the previously copied and renamed
binary).
Add this bash script to the empty binary file from 4. :
#!/bin/bash
dir=$(dirname "$0")
exec "${dir}"/<COPIED FILE NAME> "$#"
Springboard will run this file first because its the CFBundleExecutable, then this will launch the actual app's
executable. This is done because SpringBoard would fail to directly launch the executable with root permissions
Open terminal and change the directory to the .app (ex. cd
/User/Me/Desktop/MyApp.app)
chmod the original executable file to 0755 (ex. chmod 0755
MyCFBundleExecutable) and the copied file to 6755 (ex. chmod 6755
CFBundleExecutableRoot)
SSH the .app into /Applications on your device, respring and launch
it (if its not launching then repeat set 7. but by SSHing into your device via terminal)

Related

Set Permanent Flutter Path

The steps for modifying this variable permanently for all terminal sessions are machine-specific. Typically you add a line to a file that is executed whenever you open a new window. For example:
Determine the directory where you placed the Flutter SDK. You will need this in Step 3.
Open (or create) $HOME/.bash_profile. The file path and filename might be different on your machine.
Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s git repo:
$ export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"
Run source $HOME/.bash_profile to refresh the current window.
Verify that the flutter/bin directory is now in your PATH by running:
echo $PATH
In mac, you should add it as follows in ".zshrc":
export PATH="$PATH:/Users/matteo/Documents/flutter/bin"
After you have updated the ".zshrc" file, run this command to ensure changes have been notified to OS
source ~/.zshrc
Reference: https://flutter.dev/docs/get-started/install/macos
A similar concept is for Linux system using bash files
I tried a lot of methods but this one permanent solution worked for me like a charm:
open Terminal in your Mac: type:
sudo nano /echo/paths
Add the code to the file:
/users/yourUserName/flutter/bin
Save the file using Control+X and Press Y and Enter
Hope this helps! :)

Actions on Google - Mac gactions won't run

I am trying to set up the Actions sdk as described here:
https://developers.google.com/actions/sdk
I downloaded gactions for a Mac 64-bit machine. If I try to open the file, it opens as text. When I am in the folder containing gactions, I try to run gactions init and get the response:
-bash: gactions: command not found
Any thoughts?
Try this:
Download Google gactions cli from gaction CLI
On Mac and Linux, to make the binary executable run from terminal:
$ cd folder_with_gactions
$ chmod +x gactions
Execute gactions
$ cd folder_with_gactions
$ ./gactions init
Also, you may find this tutorial interesting if you are trying to create an action in Google Home : How to create a custom private Google Home Action with API.AI and Google App Engine. In STEP 8 you can find an example of gactions.
If you have already setup google-cloud-sdk correctly, then you can drop the gactions file into the google-cloud-sdk/bin folder. Alternatively, you can add a path to bash directly to the folder you have gactions.
To add the gactions command CLI location to the System Paths:
Use “Go to the Folder” option of Finder, to search “~/.bash_profile”
Open the File “~/.bash_profile”
 in edit mode and add the following command, at the top the file, Save and Close.
export PATH="$PATH:$HOME/gactionsCLI"
Note: Above path refers to the folder which contains the executable
file “Unix Executable”
Restart the Terminal and try the commands
Download gactions
copy downloaded gactions and put into a local Project folder
and then go to your project directory cd "project directory"
run following commands :
$ chmod +x gactions
$ ./gactions init
it will create action.json into your folder
Ensure you run chmod +x gactions to make the binary executable
Copy the binary executable into the project directory
Run ./gactions init from the terminal/command line

unable to launch swift from another directory in Ubuntu

I am unable to launch swift terminal or unable to do swift build from any other directory (apart from ../swift/usr/bin ) in Ubuntu . When i am in swift folder (../swift/usr/bin) where i installed it, i am able to launch swift REPL but not from any other directory
I even exported the bin path to environment variable
export PATH=/home/vinit/swift-2.2-SNAPSHOT-2016-02-24-a-ubuntu14.04/usr/bin:$PATH
I executed this command from bin directory. And checked it with
echo $PATH
I was getting
/home/vinit/swift-2.2-SNAPSHOT-2016-02-24-a-ubuntu14.04/usr/bin:/home/vinit/.linuxbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/vinit/bin:/usr/local/java/jdk1.8.0_65/bin
but when i executed the same (echo $PATH) from other directory , i am not getting swift in environment variable.
Thanks in advance.
For the swift entry in PATH to disappear, I am guessing that you restarted the terminal after you exported PATH or had more than one terminal open at a time, and tried to work simultaneously. Try putting the export command in the .bashrc file in your home folder and open a new terminal.

QT5: how to create .app bundle for macx

I need to create a .app from my qt project for macx.
I've create a simple sample project console, with
CONFIG += app_bundle
in .pro file
then I used macdeployqt.
When double click on .app, the application start to blinking in the mac bottom bar for at least 1 minute, then stop it. No windows or message shown. When right click, only force quit command available.
Any ideas?
Thanks
If your application uses libraries other than Qt, you need to copy the frameworks in yourApplication.app/Contents/Frameworks/
Edit: If your program is a console application, just create a shell script like this, put it in the same directory as your executable in app bundle, and modify your Info.plist so that this is the bundle's executable:
#!/bin/bash
EXECDIR=`dirname $0`
open /Applications/utilities/Terminal.app $EXECDIR/yourApp
Make the script executable by chmod +x /path/to/the/script. But I wouldn't make an app bundle for a terminal application. Deploy your application with an installer that installs necessary libraries to /usr/local/lib and your binary to /usr/bin or /usr/local/bin
Edit continued: You can do it with a bash script run as root.
Hope this helps.

Where is .gdbinit is located and how can I edit it?

I am having a exception crash issue and I am trying to edit this file to get more info about the crash.
Where is .gdbinit is located and how can I edit it?
You can also put .gdbinit in your debugging folder, this makes more applicable for debugging different apps. GDB will automatically load ./.gdbinit for current debugging.
You need to create a new file called .gdbinit - put it in your home directory. Now every time gdb starts it will execute the commands in this file. ".gdbinit" is a file you can drop in your home directory that gdb will parse when gdb launches, either from the command line or from within Xcode.
You can do
nano ~/.gdbinit
modify your file and save it. Verify the changes with cat ~/.gdbinit
You may want to add the line echo "set disassembly intel" > ~/.gdbinit. For example:
gdb#Name:~$ echo "set disassembly intel" > ~/.gdbinit
gdb#Name:~$ cat ~/.gdbinit
set disassembly intel
gdb#Name:
go to the root directory using cd ~/ or cd root, then create .gdbinit