Gapps for android 6 marshmallow (and for other android versions too) - Android General

opengapps.org
OPEN PROJECT FOR ALL ANDROID GAPPS
GO TO : http://opengapps.org/
Pre-selection
If you are a e.g. a ROM developer and want to hotlink to certain pre-select choices, you can pass some extra parameters to the opengapps.org website. These passed parameters will then be selected by the radio buttons. Fields that are not specified will be set to their default (currently those are: arm, 5.1 and stock).
Platform
Setting the platform architecture is via the arch variable, valid values are:
arm
arm64
x86
x86_64
Android
Setting the android version is via the api variable, valid values are:
4.4
5.0
5.1
6.0
Variant
Setting the package variant is via the variant variable, valid values are:
aroma
stock
full
mini
micro
nano
pico
Example
An example URL with some pre-selections could be: http://opengapps.org/?arch=arm64&api=5.0&variant=aroma
Download Hotlink
If you are passing parameters for pre-selection, you can also add an extra parameter to automatically trigger the download of given selection. After loading the website and querying GitHub for the latest available release, the browser will automatically be redirected to the download URL. This can be achieved by passing the download parameter with the value true.
Example
An example URL with automatic download of the chosen pre-selection could be: http://opengapps.org/?download=true&arch=arm64&api=5.0&variant=aroma
Mirroring
Please don't publicly mirror the prebuilt packages without explicit consent of @Mfonville, to ensure that users will always be directed to the very latest version and the source code of the project. With our support for hotlinking, there is no need for outdated mirrors!

Related

Linux in Android! DesirAPT is at Beta Test! [9 Feb]

Well, as an introduction to topic, you could read the following entry:
http://forum.xda-developers.com/showthread.php?t=1296186
So far, when using "-static" directive for compiler, the applications could be compiled without doing of these steps, so why do I try this? Well, a statically linked executable is embedding all the required libraries to itself, so it's generally too huge. Also, if you compile all the applications statically, you probably link the same library (like C library, for instance) twice or more for every application you compile. This is definitely unnecessary.
It's why, for a few days now, I'm trying to compile the whole GlibC suite for Android (ARM devices, to be precise). The motive behind it is simple: since all Linux applications rely on full-fledged C library (rather than trimmed version like Bionic), if I compile it for this device, I can run every application; given that its compiled for the device.
Since it's Linux kernel underneath, we don't have to worry about changing whole system from Android to native Linux (hopefully )
So far what I did was following (I'm going to write the steps more systematically once I've time, so don't worry if those steps are too vague for you ):
1- Make a toolchain for ARMv7 architecture (which Desire CPU rely on). You can use crosstool-ng etc. or (if you're masochistic enough ) try to make your own.
2- Compile GlibC with this new toolchain of yours, store the compiled libraries in a folder where you can easily access (I keep mine at Desktop/glibc-arm for instance)
3- Edit Ramdisk of the Kernel. To do this, first you must extract the boot.img; then extract the ramdisk, edit init.rc to accordingly, so the libraries can be searched in a folder other than /system/lib (say, /data/lib). You can tweak PATH env-variable while you're at it as well . This is necessary because /system partition isn't big enough to carry all GlibC lib in it, so we can copy the library to some other folder (like /data/lib) and then make the system search for libraries there as well. The point is, since I'm using Data2ext; my data is large enough for this. I'd recommend the same to you if you're willing to go on this road.
After the editing of init.rc, reconstruct ramdisk; make a boot.img with it and flash it to the device.
4- Copy the libraries to the folder of you picked.
5- Compile some test apps (like Hello world etc ) with your cross compiler and place them to your device as well.
6- Test if they're running.
What I've found so far, the cross compiled executable (like simple Hello world), when dynamically linked, gives "no such file or directory" error when tried to be run at the device (WTF, right ). However, when when I do run it with the cross-compiled ld-linux.so (the linker of C library) it runs perfectly. So what I should do to overcome this is, somehow inform the system that this ld-linux.so binary should be used.
I'll keep you updated as I try new things
Till next time, happy Android'ing
ADDENDUM 1:
EUREKA! Found the solution! It's as simple as symbolically linking the library folder of your GlibC as /lib to root file system. You can edit ramdisk accordingly to do this process automatically.
Another thing I'm going to try is finding a way to change the path of the dynamic-linker option of my cross compiler accordingly. Apparently, the cause of the problem was the compiler, telling the application to look for the dynamical linker at /lib/ld-linux.so.3; while it was at /data/lib (in my case). I can put ld-linux.so.3 to /system/lib and change compiler accordingly; but I don't know which way would be the best for flexibility: symbolic linking of /lib to library dir; or putting dynamic linker to /system/lib (the dynamic linker can look for libraries at the "custom" libdir already, since $LD_LIBRARY_PATH is already showing it).
Will try some tweaks now. If I can make it all work, I'll see if I can make a flashable zip or something (also will write whole process step by step
-------------------------------------
ADDENDUM 2!!
Well, I kept you waiting a lot, but wow, was this process head spinning. This was the first time I actually wrote a recovery script; first time I had to use AWK, SED or regex; and first time I wrote such a long scripts Well, whatever, we're done for now..
There are two zip files attached to the end of this thread: One is an installer and other is uninstaller. Just flash the recovery zip and reboot the phone. Your native C or C++ applications should run flawlessly (only added support for this two language for now) if all other dependencies are also met
Happy Android'ing guys; and well, I'd appreciate if you'd buy me a beer for that (or just click thanks, or just say thanks.. If you did all of those, you're my hero )
Here is the hero of the post :
Glibc for Android v0.9.5
Uninstaller for GlibC
NOTE: Uninstallers erase only files, not directories. Ergo, you might need to erase them yourself (had to do it for not to erase your own binaries and such).
HERE'S HOW YOU'RE GOING TO MAKE TOOLCHAIN YOURSELF (making a toolchain):
http://forum.xda-developers.com/showpost.php?p=18356849&postcount=5
CHANGELOG
Code:
Version 0.9.5:
* Ramdisk-boot image editing tools are included in the package, for some systems might not have it.
-------------------
Version 0.9.4:
* A bugfix for a script syntax error which causes GlibC to pass the installation checks but make binaries give "not found" error.
* A bugfix for Bash, not working well, so causing system to freeze at boot.
-------------------
Version 0.9.3:
* A major bugfix for the bug that was causing bootloops.
* A bugfix for scripting errors inside the recovery zip, causing half-installation
-------------------
Version 0.9.2:
* A small patch added that will allow GlibC to be installed with Apt-get without problems.
* Made compatible with the Sibere's new Data2SD solutions
-------------------
Version 0.9:
* Moved configuration files from /data/etc to /system/etc
-------------------
Version 0.8.1:
* Removed a symlink which may cause some Android apps use wrong version of library.
-------------------
Version 0.8:
* Complete recompilation.
-------------------
Version 0.7:
* Fixed a bug which causes Sibere's Data2sd unrecognized if Droidzone's flasher is not used
* Fixed a bug with the installation of locales.
* Included a basic busybox binary and flash_image to make library installation successfull in all recovery systems - was causing problems in some systems
-------------------
Version 0.6:
* Standart C++, MPRF, GMG and MPC libraries are added to the package
* Library profiling support is added
* All libraries are recompiled with PIC (position independent code) for better portability.
-------------------
Version 0.5:
* LibGD included in package - it's a picture manipulation library
* GlibC Version 2.14 - I'm sure even your Ubuntu-Debian machines have older versions now :)
* Locale support added. Your C/C++ programs can use it freely.
-------------------
Version 0.4:
* /tmp support added, necessary configurations are done
* Package manager support is implemented, allows users to install to both MTD and SD-ext in coexistent way (no more had to choose!).
* Developed a flexible structure, thus allowing libraries to be installed with a helper application (it's going to be shipped later)
-------------------
Version 0.3:
* Stripped libraries and binaries for make them smaller
-------------------
Version 0.2:
* Installs to the MTD Partition instead of sd-ext. Needed for inital-time programs to run correctly.
-------------------
Version 0.1:
* Initial version
-----------------------------------------------------
Thank you very much for donations of:
Mr. Brochard and Mr. Huemer
I really appreciate it.
Eureka! Found an overcome!
Well, forgot to say this: if you want the compiled applications to be installed to some place if possible, create a "defaultinstall" file under sd-card root and write "EXT" (for sd-card) or "MTD" (for internal MTD storage) to the file (note that all uppercase).
Install manager first checks this file and if not found, uses default setting found in package (which I wrote /sd-ext generally for not-so-essential stuff ). You can use this functionality to override this setting.
Note that, some libraries and stuff cannot be installed to a different location - package manager handles this and acts accordingly; so don't worry about it
PS: The stuff I keep calling Package Manager is actually just bunch of scripts, so it's not like I wrote a whole suit
Sounds Interesting
Some compiled applications!
Well, if we're not going to use it, then why did we compiled it, right?
NOTE: The following packages don't have any specific order of installation: you can install them at any order you wish. The only exception is APT - it should be installed after DPKG, or otherwise your system will think you didn't install it
For those who hates command-line interfaces: DesirAPT (the APT front-end for Android) is here DesirAPT v1.0.0
For those who would like to run Enlightenment WM in Desire - this is the mediator application for Android: LinuxInAndroid APK
Note that it requires APT and it's dependencies, along with super user privilages.
---------------------
PACKAGE: NCurses Library
DEPENDENCIES: GlibC Library
WHAT DOES IT DO: It's a shell extension library which is used to format shell (or terminal output) like colorful texts, and such. Default shell might not use it (but it's definitely something necessary for new applications like nano, like "new" bash etc.)
HOW BIG IS IT: Approx. 3.4 Mb.
WHERE TO DOWNLOAD: NCurses Lib. 5.5.9
UNINSTALL?: Available at NCurses Uninstaller
CHANGELOG:
Code:
v 0.4.1 :
* Made Compatible with Sibere's new Data2SD solutions.
------------------------
v 0.4 :
* Complete recompilation with UTF-8 and wide-char support
------------------------
v 0.3 :
* Fixed the Sibere data2sd un-recognization bug
* Added flasher files into the binary for support of all recovery systems.
------------------------
v 0.2 :
* Adding package manager support
------------------------
v 0.1 :
* Initial Release
---------------------
PACKAGE: Bash
DEPENDENCIES: GlibC Library, NCurses Library, Readline Library
WHAT DOES IT DO: It's the main command interpreter for a linux system (also Android). Normally, Android is also shipped with it, but it's a very lightweight and trimmed version (also annoying - it doesn't support tab completion!). This is 4.2 version (latest now).
HOW BIG IS IT: Approx. 3.8 Mb.
WHERE TO DOWNLOAD: Bash 4.2
UNINSTALL?: Available at Bash Uninstaller/reverter
EXAMPLE OF A COOLNESS: You can change your shell label (the one shows before $ or # sign) by assigning PS1 environment variable. For instance, this : PS1="[\w]\$ " (with quotes) will show your current working directory at every prompt
(More at: http://www.lifeaftercoffee.com/2006/10/31/customize-your-bash-prompt/ )
NOTES: The bash will run the commands that you write initially on /etc/profile automatically. You can define your PS1 values, environment variables (be careful to add "export" before them) there for whole system )
Code:
v 0.7.2 :
* Made Compatible with Sibere's new Data2SD solutions.
------------------------
v 0.7.1 :
* Included automatic bash_completion file (stolen from Ubuntu :D) into package - now even apt-get packages are auto completed!
-------------------------
v 0.7 :
* Recompiled with LibReadline for history and auto-completion abilities.
------------------------
v 0.6 :
* Added Locale support
------------------------
v 0.5 :
* Complete recompilation with new schematics
* HOME directory set to /data/home by default
------------------------
v 0.4 :
* Fixed the Sibere data2sd unregnization bug
* Added flasher files into the binary for support of all recovery systems.
------------------------
v 0.3 :
* Added package management support
---------------------
v 0.2.2:
* Added ENV variable, thus support for /etc/profile shell starter file. You can define new environment variables there which is valid for all system (you don't need to change ramdisk each time now!)
--------------------
v 0.2 :
* "Jobs" support fixed
---------------------
v 0.1 :
* Initial Release
---------------------
PACKAGE: Busybox Binary
NOTE: Busybox with GlibC dependency is no longer supported, because package update mechanisms require some command interpreter independent of the updated package. In order to support GlibC Update, Busybox binary will no longer be updated with GlibC support. I recommend you to revert back to static, or Bionic-linked Busybox with the link below.
UNINSTALL: Available at Busybox old version reverter
---------------------
PACKAGE: Zlib Library
DEPENDENCIES: GlibC Library
WHAT DOES IT DO: It's compression library that is used with various applications like Git, Apt, DPKG etc.. It's recommended to keep it there
HOW BIG IS IT: Approx. 350 Kb.
WHERE TO DOWNLOAD: ZLib 1.2.5
UNINSTALL?: Available at ZLib Uninstaller
CHANGELOG:
Code:
v 0.2.1 :
* Made Compatible with Sibere's new Data2SD solutions.
--------------------
v 0.2 :
* Fixed a bug causing system library to clash with the installed one
* Fixed a bug causing Segmentation Faults in some cases
--------------------
v 0.1 :
* Initial Release
---------------------
PACKAGE: ReadLine Library
DEPENDENCIES: GlibC Library, NCurses Lib.
WHAT DOES IT DO: Readline is a command line and history manager library that's used in some command line tools like socat. I personally don't know what else uses it
HOW BIG IS IT: Approx. 1.4 Mb.
WHERE TO DOWNLOAD: Readline 6.2 - v0.1
UNINSTALL?: Available at Readline Uninstaller
CHANGELOG:
Code:
v 0.1.2 :
* Made Compatible with Sibere's new Data2SD solutions.
--------------------
v 0.1 :
* Initial Release
---------------------
PACKAGE: OpenSSL Library
DEPENDENCIES: GlibC Library
WHAT DOES IT DO: OpenSSL Library is Secure Socket Library that is used in various secure applications and web browsers.
HOW BIG IS IT: Approx. 5.9 Mb.
WHERE TO DOWNLOAD: OpenSSL 1.0.0e
UNINSTALL?: Available at OpenSSL Uninstaller
CHANGELOG:
Code:
v 0.2.1 :
* Made Compatible with Sibere's new Data2SD solutions.
--------------------
v 0.2 :
* Fixed a bug causing system library to clash with the installed one
* Fixed a bug causing OpenSSL to do Segmentation Fault and crash
--------------------
v 0.1 :
* Initial Release
---------------------
PACKAGE: APT - Advanced Package Tool
DEPENDENCIES: GlibC Library, Curl Library, Zlib library
WHAT DOES IT DO: APT is a front-end for DPKG which installs, removes, updates etc. packages easily. APT also supports dependency tracking, and automatically removal of unneeded packages.
HOW BIG IS IT: Approx. 1.8 Mb.
WHERE TO DOWNLOAD: apt 0.8.10.3
UNINSTALL?: Available at apt Uninstaller
CHANGELOG:
Code:
v 0.2.1 :
* Made Compatible with Sibere's new Data2SD solutions.
--------------------
v 0.2 :
* Apt now assumes required packages are pre-installed; thus doesn't re-download them unnecessarily ..
* Changed repo host - configuration in sources.list is changed.
--------------------
v 0.1.1 :
* Configuration files are added. Apt-is ready to use out-of-the-box now..
--------------------
v 0.1 :
* Initial Release
---------------------
PACKAGE: Cryptography Package
DEPENDENCIES: GlibC Library , Zlib Library, PTH Library, Readline library
WHAT DOES IT DO: This package contains some cyrptographic libraries necessary for various applications. If you're to use APT, it's recommended to install this package, for since it also carries GPG package inside. Package includes
GnuPG (2.0.18), LibGPG-error (1.9), LibGcrypt 1.5.0, LibKSBA (1.2.0), LibAssuan (2.0.2)
HOW BIG IS IT: Approx. 8.2 Mb.
WHERE TO DOWNLOAD: crpyto package
UNINSTALL?: Available at crpyto Uninstaller
CHANGELOG:
Code:
v 0.1.2 :
* Made Compatible with Sibere's new Data2SD solutions.
--------------------
v 0.1 :
* Initial Release
---------------------
PACKAGE: cUrl
DEPENDENCIES: GlibC Library, OpenSSL Library, Zlib library
WHAT DOES IT DO: cUrl is a secure web client that supports HTTPS protocol. Package includes also libcurl which provides secure web connection API
HOW BIG IS IT: Approx. 916 Kb.
WHERE TO DOWNLOAD: cUrl 7.23.1
UNINSTALL?: Available at cUrl Uninstaller
CHANGELOG:
Code:
v 0.1.2 :
* Made Compatible with Sibere's new Data2SD solutions.
--------------------
v 0.1 :
* Re-Initial Release
---------------------
PACKAGE: Dpkg - Debian Package Manager
DEPENDENCIES: GlibC Library, Zlib library, Tar binary, Linux Utils
WHAT DOES IT DO: Dpkg is the main package for Debian package managing structure. DPKG is the responsible application for installing, removing and updating packages. Using with Apt (or other front-end) DPKG allows users to install new packages easily.
HOW BIG IS IT: Approx. 7.5 Mb.
WHERE TO DOWNLOAD: dpkg 1.16.1.2
UNINSTALL?: Available at dpkg Uninstaller
CHANGELOG:
Code:
v 0.4 :
* Fixed a bug which was causing GlibC not to upgrade from APT.
--------------------
v 0.3 :
* Links renewed
--------------------
v 0.2.1 :
* Made Compatible with Sibere's new Data2SD solutions.
--------------------
v 0.2 :
* Fixed a bug that causes some big archives not to install
* DPKG now informs system that GlibC, OpenSSL, Ncurses libraries are already installed (necessary for DPKG anyway)
---------------------
v 0.1 :
* Initial Release
---------------------
PACKAGE: PTH - Portable Threads Library
DEPENDENCIES: GlibC Library
WHAT DOES IT DO: PTH is a POSIX compliant thread library that is used in some linux applications.
HOW BIG IS IT: Approx. 251 Kb.
WHERE TO DOWNLOAD: pth 2.70
UNINSTALL?: Available at pth Uninstaller
CHANGELOG:
Code:
v 0.1.2 :
* Made Compatible with Sibere's new Data2SD solutions.
--------------------
v 0.1 :
* Initial Release
---------------------
PACKAGE: Tar Archiver
DEPENDENCIES: GlibC Library
WHAT DOES IT DO: TAR is and old and multi-purpose compression format used in various places. This tar suite is designed to be 100% compatible with the PC one (busybox one is not so good at this).
HOW BIG IS IT: Approx. 3.7 Mb (1 MB in System partition).
WHERE TO DOWNLOAD: Tar 1.23
UNINSTALL?: Available at Tar Reverter
CHANGELOG:
Code:
v 0.1.2 :
* Made Compatible with Sibere's new Data2SD solutions.
--------------------
v 0.1 :
* Initial Release
---------------------
PACKAGE: Linux Utilities
DEPENDENCIES: GlibC Library, Ncurses Library
WHAT DOES IT DO: This package includes low-level linux tools that is necessary for a system to run in well manner. Busybox do provide many of those, but they are quite crippled versions - so high level applications may crash using busybox ones (like DPKG).
HOW BIG IS IT: Approx. 5.6 Mb
WHERE TO DOWNLOAD: Linux Utils 2.20
UNINSTALL?: Available at Uninstaller
CHANGELOG:
Code:
v 0.1.2 :
* Made Compatible with Sibere's new Data2SD solutions.
--------------------
v 0.1 :
* Initial Release
Where the hell is the other packages?
Since we know have an APT repository for our distributions, in order to follow all the packages from one source, they won't be published in zip form anymore. In order to obtain them, or update them if you have older versions, you can use apt :
Code:
apt-get install <packagename>
The packages distributed can be list with the following command:
Code:
apt-cache dumpavail | grep Package:
OR, you can use DesirAPT to do these works.
See you around!
NOTE
Before you start anything, don't forget to install build-essentials package. Under ubuntu, the command necessary for it is: sudo apt-get install build-essential - I don't know about other distros..
-------------------------
Well, as promised, now we should write the steps; right?... Now, before we begin, I should really warn that the process is really head spinning if you're to do all by yourself; so take heed to the warnings I give you (I learned the hard way)
Well, first thing is first, we need a Cross Compiler Toolchain, properly built that allows us to build applications, libraries etc. There is one toolchain that's already given to you with Android Native Development Kit (called NDK) but that one is quite restricted because it's built with support for Bionic (trimmed C library that is presented in Android), not Glibc or uGlibC. If you want to develop more native-like applications (especially linux programs) you need GlibC or uGlibC. You can try to build these libraries with that toolchain too, but don't do that, because it's going to fail as well. The reason is that some sort of Chicken-Egg problem is eminent in GlibC-GCC compilation
Let's put the steps to be followed first to build a nice toolchain. I assume you're using Linux - because the tools are developed for this platform only. If you're going to use them in Windows, you need Cygwin or such tools but I can't supply help about that, for since I didn't use them before at all. Google is your friend about this
(Note, the packages I wrote at this list are available at GNU's website www.gnu.org freely, open source)
1- We're going to build "binutils" first. This package includes some important stuff like assembler, linker, archiver (for libraries) etc..
2- We're going to build GCC's prerequisites. These are GMP, MPRF and MPC packages.
3- We're going to build a "bootstap" gcc (God, I hate that name. I like to call it "naked gcc" more ). This GCC just converts source codes to pure assemblies: thus cannot generate linkages or such. We're going to use it to build "actual" tools we're going to use.
4- We're going to extract Kernel source/headers - use Desire Kernel's here. There is some copying, and such to be done tho.
5- We're going to make GlibC headers installed, which will allow us to build more "complex" gcc, which can link applications with those libraries when the library binaries are given (so such thing is there yet, but we fool it )
6- We're going to build a very limited GlibC which will give us support for building more "complex" gcc.
7- We're going to build GCC again. This is called "Pass 1 GCC" or "GCC Stage 1". This GCC can link applications to libraries, with the information in Kernel headers and library headers (it's why we give it the headers, so it can create applications suitable with the Kernel architecture).
8- We're to build actual GlibC now. This glibC will be used for our compiled applications, statically or dynamically. You can, at the end of this step, copy the files to your devices and they would work, but picking files here is harder, so I'd recommend you to leave this alone for now
9- We're going to build "Pass 2 GCC" or "GCC Step 2" This is a full fledged GCC that can do anything we want
Complex isn't it? This is precisely why I recommend you to use Crostool-NG. The other tools (like Buildtools or Crosstool) (sadly) don't create GlibC based toolchains, or use old versions of them, so using this one is recommended. This package automatically will download, setup and link your all toolchain without you worrying about something (believe me, this is what you need. I gave 8 days without this to create a working GCC and Crosstool-NG made another one to me in 50 minutes. )
Well, however, Crosstool-NG won't create "nice" applications (they'll run allright, but they won't be optimized) without some settings done, so, let's go there. First, we need to install Crosstool-NG itself. To do that; go to http://crosstool-ng.org/ website, download and extract it to some place. Even though the steps are written in Crosstool website, you don't need all commands there (like setting PATH is unnecessary). The commands you should use is, after CD'ing to the Crosstool dir;
./configure --prefix="</some/place>"
make
make install
cd "</some/place/bin>"
./ct-ng menuconfig
I used prefix as /home/ahmet/crosstool for instance. Note that this is not going to be where your toolchain is, this is where your "toolchain creator" is .
---- NECESSARY KERNEL HEADER CHANGES ----
OK now, before we start compiling; we need to make some folder moving, copying etc. in Kernel directory. This is needed, because tree structure changed a tad in 2.6 kernels and unless you compiled this kernel before, some directories won't be in their correct place for our cross compiler. Switch to the directory which you extracted the kernel image. Now, from now on, I'm going to assume you're an Qualcomm/MSM board (like Desire, Nexus One etc.) user; but if you're not, change my descriptions accordingly:
1- Go to <kernel dir>/arch/arm/include folder. Copy "asm" directory and paste it into <kernel dir>/include directory.
2- Go to <kernel dir>/arch/arm/mach-msm/include folder. Copy "mach" directory and paste it to <kernel dir>/include/asm directory. It's going to complain that there is another mach folder there and will ask if you want to merge/overwrite. Say yes to all questions.
Now our kernel headers folder is showing a Desire device. Note that if you're not a Desire user, you should use your cpu folder instead of ARM and your board manufacturer in mach-xxxxx instead of mach-msm.
Note this kernel directory, we're going to use it to configure crosstool..
--- CONFIGURING CROSSTOOL ---
After issuing the commands, the crosstool-ng will give you a configuration menu. Most of the setting here are unchanged, but the ones you should change are given below.
1- Paths and misc options
a) Try features marked as EXPERIMENTAL (this is needed to build a toolchain with the latest GlibC support) -> Enabled
b) Local Tarballs directory -> The folder address that you want downloaded stuff to be kept. You might use them again (like for compiling GlibC again for device, you will use them
c) Save New Tarballs -> Enabled ( so that new downloaded files aren't erased )
d) Working Directory and Prefix directory -> Normally you don't have to change them, but you can if you want to install your toolchain to some other location. CT_TARGET signifies your target name (like arm-msm-linux-gnueabi - arm is cpu model, msm is vendor (can be anything), linux is showing the binaries are for linux system (you can use android, but then you'll get not GlibC but Bionic) and gnueabi shows you're going to use open-source EABI structure for your executables. The other option is ELF but EABI is more flexible (because also supports ELF).
e) Strip all toolchain executables -> do it if you don't want to debug GCC itself. this makes toolchain smaller of size, and a tad faster.
The other options can stay the way they are, or you can change them accordingly here. You can get help with ? key, and if you don't understand anything, just leave them default - there are very complex things there that you don't need to know if you're not planning to be a expert on subject
2- Target options
a) Target Architecture -> arm should be selected, cos Desire uses ARM. If you plan to make toolchain for, say, powerpc, pick that.
b) Endianness -> Should be little. ARM processors in Desire uses little endian system.
c) Architecture level -> "armv7-a" this is should be written. Desire uses ARMv7 based instructions and if you leave here empty, the applications will be built with armv5 support - they're still going to run but not use advanced v7 features.
d) Use Specific FPU -> "neon" . Desire uses NEON structure for floating point arithmetic, and if you leave here empty, the applications will not use Desire's FPU abilities (everything will be software based, which is slower)
e) Default instruction set mode -> arm . You can use thumb here for allegedly faster code but not every build system supports it. Leave it ARM.
f) Use EABI -> enabled. EABI is necessary for most flexible desing of binaries.
The other settings be as they were.
3- Toolchain options
a) Tuple's vendor string -> You can leave here empty if you don't want to; it's not necessary to use a string here. I used "msm" but you can write anything. This string here is used in toolchain name as arm-xxxxx-linux-gnueabi, so make it short, I recommend
b) Tuple's alias -> make it something short like "arm-linux" This alias string is used to make calls to your toolchain easier. Instead of writing arm-msm-linux-gnueabi-gcc everytime, you can use arm-linux-gcc to compile your applications. Can write anything here (like toolchain if you want to use toolchain-gcc to compile your applications)
The other settings can stay as they are, for since default values are the best in our case. You can tweak them only if you know Desire cpu like the back of your hand
4- Operating system
a) Target OS -> Use "linux" if you want the applications to run in Android and Linux; use "bare metal" if you're to compile low level applications which won't use linux headers. Default is linux.
b) Get Kernel headers from -> say "pre installed" because otherwise it's going to download standard Linux headers from internet. We needed some changes, so this option is compulsory to be "pre installed"
c) Path to custom headers directory/tarball -> Path to your kernel source folder - which you made changes above. WARNING: I say specifically extracted, because standart tarball won't work for us. We're going to make some changes in kernel directories, which is non-standart (Instructions were above).
d) This is a tarball -> No . We're going to use extracted folder.
e) Build shared libraries -> say "yes"; because we want dynamic linkage, not static one
f) Check kernel headers -> say "no" otherwise some unnecessary check causes compilation to stop.
5- Binary utilities
a) Binutils version - pick the latest one, 2.20.1a. If you use older versions with newer GCC/GlibC, it's not going to succeed.
Leave others as they are, they are not big deal..
6- C Compiler
a) GCC Version -> pick 4.6.1 for since it's the latest and most bug free. Just stay away from 4.5
b) Pick the languages you want support for. I've read online that Java is a tad troublesome in Android platform, for since Java in Android uses Dalvik, not Sun systems. You can try it at your second toolchain if you want Definitely pick C++ tho
c) Link libstdc++ statically -> say yes; it really saves you from big configure scripts later - apparently needed to avoid PPL problems as well
d) Compile lidmudflap/libgomp/libssp -> say no. These libraries are not the most suitable libraries for ARM platform (at least at cross-compiler level. You can compile them later, if you want, with your cross-toolchain.)
You can leave others as default
7- C library
a) C library -> gLibC (recommended). You can use other libraries which are eGlibC (embedded Glibc, like Bionic) and uGlibC (micro-glibc) too, but GlibC is the most spanning solution above those. The libraries are bigger, but they support more.
b) glibC version -> Use 2.13 (experimental) it compiles just fine, and you get a new version of GlibC. Not the newest, but that's ok
c) Threading implementation -> nptl (recommended) . You can use linuxthreads too, but nptl is more advanced ( like giving support to Thread-Local-Storage and such)
d) Force Unwind Support -> Enabled . If you don't use this option, for since we're making this toolchain from scratch, it's going to give you error during compiling that it couldn't find necessary headers (we're building them now, dumbass!)
Leave others default if you don't know what they're about
8- Companion Libraries
Well, go and pick the latest versions, even though when it says "Experimental", otherwise your GCC compilation will give you error about these libraries being old.
After setting these settings, press ESC key twice till it goes way back and ask if you want to save configuration; say yes.
--- STARTING COMPILATION ---
Now to start compilation write
./ct-ng build.
This is going to take approx. 45 minutes, so go watch some episodes of Big Bang Theory or something. Normally, there should be no errors but if there is; most probably either you made a wrong configuration, or didn't set your kernel folders well. Try again with other settings, google your problem etc..
After this process, you're going to have a cross-compiler at your use at /home/<username>/x-tool/arm-<vendor>-linux-gnueabi/bin folder. Note that Crosstool-NG automatically makes this folder read only to make you prevent screwing your toolchain You must edit your path variable to show "/home/<username>/x-tool/arm-<vendor>-linux-gnueabi/bin" folder as well for less headaches during compiling later
Whilst compiling other application, most used configure options you're going to use is "--host=arm-<vendor>-linux-gnueabi" and "--prefix=/some/folder/you/want/this/application/copied". After compilation, you can send binaries to your phone from prefix folder.
More options about GCC and Configure is available at GCC and Autoconf man pages; check them as well
Happy cross-compiling people
Woah, amazing work, congrats!
Sent from my HTC Desire using XDA App
Interesting..It answers some of my unanswered queries regarding cross compiling.. Thanks...Please keep documenting your progress.
THIS POST IS ONLY FOR THE BRAVE MAN
These are packages which are compiled; but not installed and/or tested by myself. Please test them and inform me if they work (PM me if they work or not; it's better that way ).
--------------
NO PACKAGES HERE! Frankly, I did test virtually all of them. They might not work as expected maybe, but at least they don't impede functions of device
Developer Log
Now while preparing a suitable (and as flexible as it can) recovery zip; I realized that instead of editing ramdisk, I can also use init.d script to link /lib to /data/lib. This also allows some flexibility to user (i.e. move library folder around -if needed- and edit init.d script accordingly and still have a running system).
What baffles me most is PATH env-variable. Apparently, if I set it at init.d level, it's not exported quite well - apparently, there is a user mode switch between init.d script run and ramdisk loading process (because PATH variables at Ramdisk are exported to all applications, whilst init.d ones are not) and the only way to set PATH variable for all processes is editing Ramdisk (AFAIK)...
And another point: what if kernel doesn't support init.d? (Go to hell if you're reading this post with a kernel which doesn't ) Ramdisk solution is quite general (i.e. works for everyone) but it's a little harder to edit with scripts and not as flexible as init.d method. I think it's safe to assume that there is init.d support at this level
Maybe I can create two versions (init.d one and ramdisk one) of recovery zip's.. Keep in touch guys..
theGanymedes said:
Now while preparing a suitable (and as flexible as it can) recovery zip; I realized that instead of editing ramdisk, I can also use init.d script to link /lib to /data/lib. This also allows some flexibility to user (i.e. move library folder around -if needed- and edit init.d script accordingly and still have a running system).
What baffles me most is PATH env-variable. Apparently, if I set it at init.d level, it's not exported quite well - apparently, there is a user mode switch between init.d script run and ramdisk loading process (because PATH variables at Ramdisk are exported to all applications, whilst init.d ones are not) and the only way to set PATH variable for all processes is editing Ramdisk (AFAIK)...
And another point: what if kernel doesn't support init.d? (Go to hell if you're reading this post with a kernel which doesn't ) Ramdisk solution is quite general (i.e. works for everyone) but it's a little harder to edit with scripts and not as flexible as init.d method. I think it's safe to assume that there is init.d support at this level
Maybe I can create two versions (init.d one and ramdisk one) of recovery zip's.. Keep in touch guys..
Click to expand...
Click to collapse
Well, what's the difference between init.d and ramdisk, when init.d support means running busybox runparts from ramdisk?
Droidzone said:
Well, what's the difference between init.d and ramdisk, when init.d support means running busybox runparts from ramdisk?
Click to expand...
Click to collapse
Well the difference is caused by Unix variable propagation.
Normally, when ramdisk is loaded and init.d scripts are starting to run (with run-parts binary) the exported variables are valid only for the scripts that run-parts do run. Since Linux only allows child processes to inherit variables from host, when runparts finishes job; defined variables within the scripts vanish.
When you add variables to Ramdisk (init.rc) directly, since variables become declared from init directly (and since init runs all the processes on boot) the variables automatically become available for all processes.
That's the difference I meant
Got it..So the variables from init.rc persist till shutdown..
Droidzone said:
Got it..So the variables from init.rc persist till shutdown..
Click to expand...
Click to collapse
Precisely. It's why the variables (even those which defined by export keyword) are vanished when the system booted up (unless defined in ramdisk)
Well, I've gotta learn RegEx one day anyways
Recovery zip is done! Now, I should test it on my device first
I'm also going to make a uninstaller script I think. It's really messy to clean this up otherwise
Android binaries and dependencies
I've examined the dependencies of all the binaries in /system/bin and /system/xbin in Android system. Too sad that the list contains some non-standart libraries (that's not that bad, sure you can find their sources).
Also, another problem is that you need to compile the binaries themselves from the source code as well (with the GlibC libraries) - which is near to the compiling the whole ROM itself - I'm not even sure if we can find source code (will check the Android source code itself when I've time)
The dependencies in my system, for instance, are as follows:
So that's a no-go for people with closed source system...
@theGanymedes, do you know if the system can mount ext4 at init.rc level (on early init) without using busybox?
Well, it can, but the kernel needs ext4 modules (or direct support). I checked the native mount source, it actually does nothing much more than simply calling kernel's ioctl or mount system call..
I think a simple tweak at ramdisk is all you need for that (and a supporting kernel, of course )
Weird thing about previous issue is, I have the source codes of most utilities, I can compile them too, but I don't have proper makefiles and I'm too lazy to write them myself - that's a lot of trial and error.
Well, apparently, we're not going to be able to switch from Bionic to Glibc completely. I think I can make them coexist tho.
theGanymedes said:
Well, it can, but the kernel needs ext4 modules (or direct support). I checked the native mount source, it actually does nothing much more than simply calling kernel's ioctl or mount system call..
I think a simple tweak at ramdisk is all you need for that (and a supporting kernel, of course )
Click to expand...
Click to collapse
Yup, my compiled kernel has direct support.
This is how mtd is mounted..
mount yaffs2 [email protected] /data nosuid nodev
And this is how I mount ext4 from init.d:
/system/xbin/busybox mount -t ext4 -o barrier=0,noatime,nodiratime,nosuid,nodev,nobh,nouser_xattr,noauto_da_alloc,commit=50 /dev/block/mmcblk0p2 /data
I need to change it to init.rc (init) language...
theGanymedes said:
Weird thing about previous issue is, I have the source codes of most utilities, I can compile them too, but I don't have proper makefiles and I'm too lazy to write them myself - that's a lot of trial and error.
Well, apparently, we're not going to be able to switch from Bionic to Glibc completely. I think I can make them coexist tho.
Click to expand...
Click to collapse
Earlier this month, I was trying to compile dosfstools for Android. But got stuck at static cross compile with ndk gcc
Droidzone said:
Earlier this month, I was trying to compile dosfstools for Android. But got stuck at static cross compile with ndk gcc
Click to expand...
Click to collapse
So, I'm not barking for the hollow tree here.. That's a relief. Seeing that this post is not that active, I was starting to think I'm working in vain..
Well, now, apparently init version of mount is quite restricted about options. The ones it supports are given in mount.c as:
Code:
"async", "atime", "bind", "dev", "diratime", "dirsync", "exec", "move", "recurse", "remount", "ro", "rw", "suid", "sync", "verbose"
I'm checking the mount.c source as we speak. I'm going to inform you if I can find something.
EDIT: BTW, also "no"+options are recognized (like noatime)
ADDENDUM:
The internal mount is exactly the same as the mount we use at busybox. So, most probably, it's the same was in init script.
Try this line
Code:
mount ext4 /dev/block/mmcblk0p2 /data noatime,nodiratime,nosuid,nodev,nobh
Notice that I erased some flags. You might also try to add them, but check if this line works first.

[GUIDE] Proxyme - Android System Access Tool

The purpose of this thread is to provide a guide for users who have Proxyme preloaded in their device's firmware and want to find out how to use it effectively. Ideally, this will be a place to share experiences and ideas to further improve the tool and provide solutions to problems that people may have.
Introduction
Proxyme ( proc-zahym ) represents a system access solution comprised of the following components:
System service - provides access to privileged system environment
SSH daemon - provides secure shell (ssh) and file (scp) access (based on dropbear)
proxyme.apk - user interface module
This solution is offered as a preloaded option in firmware images and consequently cannot (should not) be installed as a regular app, either from the Play Store or being side loaded. The reason for pre-loading stems from the requirements of the system service component to be able to integrate at system level and not be bound by operating restrictions within the Android application and framework platform environment (Zygote and Dalvik sandbox). The Play Store has been enlisted as the primary and preferred source in providing updates to the user interface component; the actual app you will be interacting with.
Proxyme offers the following functionality through its user interface:
Installation/de-installation of the su binary to provide/remove root access
(useful only for other applications which require root level access)
The persistent behaviour of the su binary can be controlled by a one-shot switch
Register/de-register tag-along scripts for su enable and disable actions
(more details on this below)
Control availability and location of busybox toolbox
Start/Stop SSH daemon
Configure listening port for the SSH daemon
Configure user accounts for the SSH daemon
Submit and execute a shell script
SU Binary
The option to enable or disable the su binary switch (on/off) in the user interface is the equivalent of rooting and unrooting the device. When enabled, you are providing root access to apps which require it to perform correctly. Currently, Proxyme does not have built-in support for monitoring and 'policing' the actual access to root.
Auto Root @ Boot
This switch in the Proxyme app allows you to indicate whether the su binary should be installed or removed during a reboot or startup of the device. Setting it to the 'on' position will make the su binary persistent throughout reboot cycles and leave your phone permanently 'rooted'.
Registering Tag-along Scripts
Whenever you enable or disable the su binary with the on/off switch in the user interface, there exists an option to execute a user script just prior to and one unique to each action. This is possible by pre-registering a script for one of or both enable/disable actions. A script can virtually perform anything and is always executed within root context. Note that you must be very cautious about the scripts you are registering and be certain about their intentions, because a rogue script could cause irreparable damage to you device.
Each script has the option to override, and thus block, the intended action (enable or disable) by setting a system property named proxyme.override to anything but blank.
One purpose of having tag-along scripts would be to 'freeze' and 'unfreeze' specific root-shy apps, which do not 'like' rooted systems. This is one area where we can share the experience of pre-coded scripts for certain target apps and I do hope it will be put to good use.
To submit a script file, tap on one of the SU Enable Script or SU Disable Script text elements to start browsing for a file.
Busybox
Busybox is just that, busybox. Options are available to determine one of two hard-configured locations where it can be installed and to enable or disable it.
More to follow later...
SSH Daemon
The SSH daemon is based on dropbear. It has been modified to support logon accounts in Android, which are configured with the following parameters:
username
password
home directory
which shell to use
user ID
group ID
For whatever reasons, you can restrict access by specifying non-root user and group (0:0) IDs. The IDs you can choose from are derived from a system list which was used and known within Android at the moment of booting the device. If you have installed new apps in the meantime and would like to use their newly assigned IDs, then please reboot the phone to update this list.
Executing Shell Scripts
The ability to submit and execute a shell script from the user interface can be considered a convenient and quick way to get some tasks done. Take note however that your scripts are run in a privileged environment under the root account and that there are risks involved. A rogue or insufficiently tested script can cause major problems if/when it makes changes to key system partitions, which are normally mounted read only for obvious reasons.
Most rom images will include a sample de-bloating script,which removes ROM specific branding apps. The script. /sdcard/Proxyme/debloat.sh, shows how this is done and could serve as a base for more extensive clean-up of firmware components, if you so desire.
Operational Notes
Whenever a device boots from a factory reset condition (i.e. after wiping data), there will be no UID/GID list available in the user management screen. The reason for this is that the SuMeD setup process will complete before the app data store, the location where aforementioned list is stored. has been initialised. Restart the device in order to make this list available.
Behind The Scenes
For details regarding how Proxyme's system service components are integrated in a firmware image, please follow this trail...
Device Support
Before taking the next step to flash your phone/device, please be aware of the risks involved with performing such an operation. Prepare the device properly, i.e. sufficient battery charge, and be well informed of the correct flashing procedure(s) for your device's make and model. On Samsung devices, rooting will probably trigger 'custom' flag(s) and consequently render the warranty void. No matter how adventurous you may feel, it is always a bad idea to try to flash a firmware image which is not intended for your device. Having said all that, note that you will be flashing your phone at your own risk. You are solely responsible for anything you do to your phone/device, so make sure you are well informed and well prepared before deciding to flash or install anything on it.
The following list will be updated as soon as new firmware images are prepared for new and old devices.
Samsung Galaxy Note 10.1 2014
SM-P600 - (reference post)
Samsung Galaxy J
SC-02F (Docomo) - (reference thread)
SGH-N075T (Taiwan) - (reference thread)
Samsung Note 3
SM-N9005 - (reference post)
SM-N900A - (reference post - unconfirmed)
Samsung Galaxy S4
SHV-E330K - (reference thread)
SHV-E330L - (reference thread)
SHV-E330S - (reference thread)
SGH-I337 - (reference post - unconfirmed)
SC-04E - (reference post)
Samsung Galaxy Grand 2
SM-G710L - (reference post)
Samsung Galaxy S3
GT-I9300 - (reference post)
SC-03E - (reference thread)
SHV-E210K - (reference thread)
SHV-E210L - (reference thread)
SHV-E210S - (reference post)
SHW-M440S - (reference post)
Samsung Galaxy S2 LTE
SHV-E110S - (reference thread)
Samsung Galaxy S2
SHW-M250K - (reference post)
Planned Changes
built-in control of su access (much like what Superuser currently does)
choice of built-in simple file browser or use intents to initiate external app(s) for browsing and selecting files
...
Proxyme - Behind The Scenes
This section details how Proxyme's system service components are integrated in a firmware image.
If you are not up to speed with how a typical Android system is constructed, then I would like to suggest you at least make yourself familiar with this topic in order to fully understand what to do with the following text.
The system service components are integrated in the /system partition (mount point) in Android. In the case of changing a live system this will require mounting the appropriate partition read/write before applying the updates. If a static firmware image is to be updated, then extract the component which represents the /system partition from the package and apply the updates before re-packing the firmware image.
The following list describes the major system service components:
hijacker - this is a module you need to write, which has the role of initiating the system service in a privileged environment.
hjprepper - this module is started by the hijacker to prepare the environment prior to starting SuMeD
SuMeD - this one is what it's all about. The Proxyme app relies on this daemon to be up and running in order to perform any of its privileged functions
SSHD - the SSH daemon is represented by an updated implementation of dropbear on Android
Hijacker
The hijacker is a program you would normally have to write to replace an existing program in your rom, which is started during the boot process by for example initd. This part of the integration process requires your (creative) input, since you need to analyse the rom you are working on and figure out how and where to position the hijacker module. If you do find an existing module to hijack, make sure to always call that original module from your hijacker once it has managed to execute the hjprepper program. In some roms it suffices to start hjprepper from a shell script, which is run with root access... they exist, you just have to look for them.
This is what your hijacker could look like in C
Code:
#define PROP_HIJACK "proxyme.hijack.system"
#define HIJACKEE "/system/bin/original-program"
#define PREPPER "/system/xbin/hjprepper"
int main( int argc, char *argv[] )
{
char *lArgv[5];
char **lArgList;
int lArgCnt;
pid_t pid;
lArgList = (char **)malloc( sizeof(void *) * (argc + 1) );
for ( lArgCnt = 0; lArgCnt < argc; lArgCnt++ )
{
lArgList[ lArgCnt ] = argv[ lArgCnt ];
}
lArgList[ lArgCnt ] = NULL;
/* Fork parent process */
pid = fork();
if ( pid < 0 )
{
property_set( PROP_HIJACK, (char *)"Hijacker Startup... spawning failed, prep first before xfer" );
system( "/system/xbin/hjprepper" );
execv( HIJACKEE, lArgv );
exit( EXIT_SUCCESS );
}
else if ( pid > 0 )
{
property_set( PROP_HIJACK, (char *)"Hijacker startup... spawned, parent ascends phase 2" );
execv( HIJACKEE, lArgv );
exit( EXIT_SUCCESS );
}
if ( execl(PREPPER, PREPPER, (char *)NULL) < 0 )
{
property_set( PROP_HIJACK, (char *)"Hijacker startup... failed to call prepper" );
}
exit( EXIT_SUCCESS );
}
hjprepper
This program is responsible for setting up an operating environment for the SuMeD daemon. If you have full control over a rom's boot image, then include a call in your init process to start this module once during boot. If not, then use a hijacker program or look for existing and suitable scripts to initiate hjprepper.
hjprepper starts the SuMeD daemon once it completes the setup and configuration procedure.
SuMeD
This bad boy is responsible for the user requested actions through interaction with the Proxyme app.
Prebuilt Packages
To get you started, there are pre-built modules available,which you can download here. Currently, availability is limited to Android 4.3 and 4.4.2 only. The following zip archives are organized in a folder tree structure,which serves as a guide for where to place the modules within the /system path.
4.3 Prebuilts
4.4.2 Prebuilts
Filler 2
Filler 2
Filler 3
Filler 3
Please add support in latest SHV-E110S 4.1.2 rom(s)
Title says/asks it all...
Can You guide build pre-rooted rom by proxyme? Thank you very much.
linhbs said:
Can You guide build pre-rooted rom by proxyme? Thank you very much.
Click to expand...
Click to collapse
Behind The Scenes section has been added to the OP.
Can this method be used to prebuilts S3, S4, Note3 not Korea? Thanks so much.
linhbs said:
Can this method be used to prebuilts S3, S4, Note3 not Korea? Thanks so much.
Click to expand...
Click to collapse
Yes. You need to figure out how to get the SuMeD daemon started and that depends on the rom you want to integrate it in. The Behind The Scenes post highlights what areas to focus on when doing this.
Note that the first post includes 2 firmware images (both Android 4.3 and 4.4.2) for the international Note3 (SM-N9005). It's a no-brainer to copy the files from the appropriate directories to an equivalent and same level version firmware for another region of the same device.
Please add support N900A 4.4.2. Thank you very much.
linhbs said:
Please add support N900A 4.4.2. Thank you very much.
Click to expand...
Click to collapse
Has 4.4.2 been released on that device? If yes, a download link for the official stock firmware will help speed up the process. If not, then we wait or you could send a PM to davidcsv with the 10 or 11 digit s/n and he will monitor and download the latest release as soon as it becomes available...after that your new firmware image will be uploaded within a day.
Link: http://www.androidfilehost.com/?fid=23321874045862490. Thank you for your interest!
linhbs said:
Link: http://www.androidfilehost.com/?fid=23321874045862490. Thank you for your interest!
Click to expand...
Click to collapse
N900AUCECMLG (preloaded with Proxyme) (2014-01-04)
This rom implicitly performs a factory reset, so backup your data before flashing it. Unpack the zip archive and specify the resulting .tar.md5 filename in the PDA/AP section of the latest version of Odin.
Use Proxyme to execute the /sdcard/Proxyme/debloat.sh script to get rid of the k n o x messages.
mega.co.nz
torrent, mirror
Apparently, this firmware image is a pre-release/leaked image and not the final deal. It includes an updated bootloader and related components, meaning that it will not be straightforward to revert back to an older version of the firmware. If you encounter problems with this Proxyme preloaded image, then I'd suggest flashing the image from the original download link.
All feedback is welcome and will be appreciated. Enjoy!
Thank you very much. I ask you to add proxyme in I337 4.4.2 rom. Thank you very much.
Link: http://www.androidfilehost.com/?fid=23329332407566813
linhbs said:
Thank you very much. I ask you to add proxyme in I337 4.4.2 rom. Thank you very much.
Link: http://www.androidfilehost.com/?fid=23329332407566813
Click to expand...
Click to collapse
I337UCUFMLD (preloaded with Proxyme) (2014-01-02)
This rom implicitly performs a factory reset, so backup your data before flashing it. Unpack the zip archive and specify the resulting .tar.md5 filename in the PDA/AP section of the latest version of Odin.
Use Proxyme to execute the /sdcard/Proxyme/debloat.sh script to get rid of the k n o x messages.
mega.co.nz
torrent, mirror
Apparently, this firmware image is also a pre-release/leaked image and not the final deal. It too includes an updated bootloader and related components, meaning that it will not be straightforward to revert back to an older version of the firmware. If you encounter problems with this Proxyme preloaded image, then I'd suggest flashing the image from the original download link. A Google search shows that this image does have a few minor issues, so beware.
All feedback is welcome and will be appreciated. Enjoy!
Thank so much. I find the phone test. Will respond to you.
SC-04E Stock Firmware Proxyme Rooter images
Root Ready Stock Images
(Unfortunately, flashing these ROMs will trigger KNOX)
Kitkat 4.4
SC04EOMUFNI3 (Proxyme) (Build Date 2014-09-19)
This zip archive contains an Odin flashable file. It is not the complete stock image, so you MUST have OMUFNI3 already running on your phone or you will need to download it from the above reference sites, which carry complete stock firmware images, and flash it before continuing with this file. Instructions are included in the zip archive.
uploaded.net
mediafire
torrent, mirror2
I337:
- Before flash rom: I337UCUEMK2 version 4.3
- After flash rom I337UCUFMLD (preloaded with Proxyme) fail.
Good.
linhbs said:
I337:
- Before flash rom: I337UCUEMK2 version 4.3
- After flash rom I337UCUFMLD (preloaded with Proxyme) fail.
Click to expand...
Click to collapse
Please post the complete log from the message box in Odin. One more question, is your phone 16GB or 32GB model?
update: and also try again with newer version of Odin v3.09 instead of v3.07

Kali NetHunter for moto g4 plus/any android [nougat] [marshmallow]

INTRODUCTION:
The Kali NetHunter is an Android ROM overlay that includes a robust Mobile Penetration Testing Platform. The overlay includes a custom kernel, a Kali Linux chroot, and an accompanying Android application, which allows for easier interaction with various security tools and attacks. Beyond the penetration testing tools arsenal within Kali Linux, NetHunter also supports several additional classes, such as HID Keyboard Attacks, BadUSB attacks, Evil AP MANA attacks, and much more. For more information about the moving parts that make up NetHunter, check out our NetHunter Components page. NetHunter is an open-source project developed by Offensive Security and the community.
IMPORTANT NOTE:
1. Your warranty is void now as you have unlocked your bootloader.
2. Although Kali Nethunter should be safe to use, I am not responsible for whatever happens to your device, router, or whatever networking infrastructure because of You misusing the available facilities of Kali.
3. Remember that while Kali can be absolutely safe, if you handle root access improperly, no one will help you.
4. Make sure you read all of the info here and have some basic knowledge about networking, kernels and Linux/Unix.
5. Even if you're able to find a vulnerability on a different host , don't misuse the advantage you have.
6. Report the issue to the device's owner..
Kali NetHunter Application
Home Screen - General information panel, network interfaces and HID device status
Kali Chroot Manager - For managing chroot metapackage installations.
Check App Update - For checking Kali NetHunter Android App updates.
Kali Services - Start / stop various chrooted services. Enable or disable them at boot time.
Custom Commands - Add your own custom commands and functions to the launcher.
MAC Changer - Change your Wi-Fi MAC address (only on certain devices)
VNC Manager - Set up an instant VNC session with your Kali chroot.
HID Attacks - Various HID attacks, Teensy style.
DuckHunter HID - Rubber Ducky style HID attacks
BadUSB MITM Attack - Nuff said.
MANA Wireless Toolkit - Setup a malicious Access Point at the click of a button.
MITM Framework - Inject binary backdoors into downloaded executables on the fly.
NMap Scan - Quick Nmap scanner interface.
Metasploit Payload Generator - Generating Metasploit payloads on the fly.
Searchsploit - Easy searching for exploits in the Exploit-DB.
3rd Party Android Applications
NH-App-Terminal
DriveDroid
USB Keyboard
Shodan
Router Keygen
cSploithttps://github.com/offensive-security/kali-nethunter/wiki/NH-App-Csploit
DOWNLOADS
1. For Nougat Based Custom ROMs/Stock ROMs :
Android Filehost
2. For Marshmallow Custom ROMs/Stock ROMs:
Android Filehost
3. Kernel(only for moto g4 plus)
coming soon (got zImage last step is remaining
INSTALLATION
IMPORTANT NOTE: Kali NetHunter is NOT an Android ROM, but it is an overlay ( you have to flash it above android).
The builds currently provided are to be used on Nougat based custom ROM)s (which use the LineageOS kernel) as well as for Stock ROMs also.(examples include all of our N/MM custom ROMs like Lineage, AEX, AICP, AOKP, DU and Stock ROMs) :
1. Make sure you are running the latest available build of the ROM you have installed.
2. Root is required. i.e SuperSu.
3. Reboot to TWRP.
4. Make sure you backup Boot, System and Data partitions, just in case you want to remove Kali, you can restore it.
5. Wipe Cache and Dalvik Cache. Do NOT wipe your data partition.
6. Install the zip file.
7. Reboot to System.
POST INSTALLATION:
1. You have to download the real packages knows as Kali Chroot Packages which might be around 700-800 MB in size.
Kali Nethunter Full Chroot Download
2. After downloading put it into your internal storage(don't place it in any folder).
3. Open the NetHunter App and start the Kali Chroot Manager(it will take 10 to 15 mins to extract and install full packages).
3. Set up Hacker Keyboard.
4. Configure Kali Services, such as SSH.
5. Set up custom commands.
6. Initialize the Exploit Database.
Supporting external wireless adapter(only for moto g4 plus)
1.TP-Link TL-WN722N V.2 with realtek drivers(RTL8187CU/RTL8188CU) currently atheros chipset is not supported for g4 plus
NOTE
You can flash it in any android devices everything will work but external wifi adapter and HID attack will not work. so if you are happy with it then go for it and enjoy:good:
For VNC Installation
1. apt-get install tightvncserver
2. Run VNC Server
vncserver :1 -geometry 1280x720 -depth 16
Arguments:
:1 (Display 1,2,3,4 etc..)
-geometry (Resolution width x height)
-depth (16, 24, Color Depth, use 16)
3. Connect to VNC
4. Open AndroidVNC
Alias: Kali Linux
Password: The password you set before
Address: 127.0.0.1 or your IP
Port: 5901 (Depend on display ex. Display 2, Port 5902)*
Username: root
For Metasploit
Initialize the database
1. msfdb init (you must initialize it every time if you do not set "Start at boot" in the Kali Services Tab on Nethunter App)
2. Run Metasploit
msfconsole or use setoolkit
FUTURE WORK
1. Support for external wireless adapter for more devices
2. HID support for more devices
Please comment for the kernel for supporting external wireless adapter and HID support
If you like my work please consider thanks.
Just copy paste from https://forum.xda-developers.com/moto-g4-plus/development/kalilinux-nethunter-t3639411?
Appears to be a duplicate of KaliLinux NetHunter v1.0 [Kali v2.0/Backtrack 5][athene]
Closed.

[Binary][4.1+] Latest SQLite3 Binary For Android With PIE Support

Long time ago, when I am just start having an Android device with root, I am trying to use an app that need me to have sqlite3 binary, but my device doesnt come with it pre-installed, so I have to download the installer from Play Store.
However after some day I factory reset my device, I found that app have disappeared from Play Store, also the new SQLite installer in the play store only support armv6 and armv7 device, and I can't find any other binary other than armv6 and armv7 on the web, but I need x86 binary for my android emulator.
So I have compiled some binary with multiple device support using Android NDK, these binary are all with PIE (Position Independent Executables), since PIE support are added in Android JellyBean (4.1), these binary will only work for Android 4.1+ , these binary are amalgamation (combined into a single file).
I've created a github, for those whose want to compile themself:
https://github.com/EXALAB/sqlite3-android
The binary are at the attachment below, you can also find it on github
Binary version: 3.21.0
Binary
Supported Device:
armeabi (armv5 and armv6)
armeabi-v7a (armv7)
arm64-v8a (aarch64)
x86
x86_64
Since manually copying the binary to device may need extra work for some people, I've created an installer too on Play Store, it will automatically installed the binary based on your device's architecture, root access is required.
SQLite Installer
Thanks for reading, have a nice day.
EXA Lab said:
Long time ago, when I am just start having an Android device with root, I am trying to use an app that need me to have sqlite3 binary, but my device doesnt come with it pre-installed, so I have to download the installer from Play Store.
However after some day I factory reset my device, I found that app have disappeared from Play Store, also the new SQLite installer in the play store only support armv6 and armv7 device, and I can't find any other binary other than armv6 and armv7 on the web, but I need x86 binary for my android emulator.
So I have compiled some binary with multiple device support using Android NDK, these binary are all with PIE (Position Independent Executables), since PIE support are added in Android JellyBean (4.1), these binary will only work for Android 4.1+ , these binary are amalgamation (combined into a single file).
I've created a github, for those whose want to compile themself:
https://github.com/EXALAB/sqlite3-android
The binary are at the attachment below, you can also find it on github
Binary version: 3.21.0
Binary
Supported Device:
armeabi (armv5 and armv6)
armeabi-v7a (armv7)
arm64-v8a (aarch64)
x86
x86_64
Since manually copying the binary to device may need extra work for some people, I've created an installer too on Play Store, it will automatically installed the binary based on your device's architecture, root access is required.
SQLite Installer
Thanks for reading, have a nice day.
Click to expand...
Click to collapse
Which version should I use for a Pixel 2 XL?
Thanks
-jbw
Could you enable readline support, required for using Tab and arrow keys?
It works like a charm.
Thank you very much

[TOOL][Windows] Zip Builder v4.5.2 - Build and Sign ANY script based installer

Zip Builder is a stand-alone Windows exe (ZipBuild.exe) that can be used to build and sign Android zip-based installers from Windows folders. All required components to build and sign a zip installer are included - no additional files or software are required. The only requirement is that you have a current version of Java installed on your system. Zip Builder can be used on both shell-script and edify-script based installers and performs the proper build and signing methods, accordingly.
Although it's highly recommended to install the software using the Windows Installer (see below), the stand-alone exe is all that's required to use the program. The program command line options are as follows:
ZipBuild.exe <option1> <option2...> <*Folder Name>
Valid options are as follows:
'm' or '-manual': Manually select folder to be processed
's' or '-signed': Append '-signed' to the output file name
'5' or '-md5': Generate corresponding MD5 checksum file
'c' or '-confirm': Confirm options before building
'g' or '-gitinclude': include .git folders and related files
* Ignored when using manual selection mode
OPTIONS EXPLAINED
'm' or '-manual': In Manual mode you will be presented with a dialog box where you can manually select the folder containing the files to be processed. *When using Manual mode, the folder name will be ignored if it was provided in the command line
's' or '-signed': This option will append '-signed' to the output file name. For example: Folder name 'UPDATE-adb.Installer.v1.0.36' would produce a signed zip file named 'UPDATE-adb.Installer.v1.0.36-signed.zip'.
'5' or '-md5': This option will create a separate, corresponding MD5 checksum file that can be used to verify file integrity in TWRP or with other Windows checksum utilities.
'c' or '-confirm': When this option is used, you will be presented with a dialog box where you can confirm (or change) the 2 options above. If either (or both) options above have been specified on the command line, the checkboxes will be pre-selected accordingly. Once you're satisfied with your selections, click the 'Build Zip File' button to begin the zip building and signing process.
'g' or '-gitinclude': This option will include any .git folders and related files (.git, .gitignore, and .gitattributes) that are excluded from the zip file by default. [Should rarely be needed, if ever]​
ZIP BUILDER SETTINGS MANAGER
Zip Builder Settings Manager (ZipBuildSettings.exe) is an optional companion app that can be used to manage the settings and options (shown below) for Zip Builder:
You can choose to create Windows Context (Right-Click) menus that will allow you to build a signed zip installer simply by right-clicking on a folder name. Folder names that end in '20YYMMDD' or '20YYxxxx' as well as folder names that begin with 'UPDATE' are supported in Windows 7 and above. You can also enable the option to build from any folder by holding the SHIFT key while selecting the folder.
You can choose when to display the confirmation dialog
You can choose when to append '-signed' to output file names
You can choose when to create md5 checksum files
You can choose to include all .git folders and related files (see above)
DATE CODE FEATURE
If you're building from a Windows folder name that ends in '20YYMMDD' or '20YYxxxx', Zip Builder will give you the option to change or update the date code portion of the file name before building the zip (it will also suggest the current date's date code - YYYYMMDD). And, if you're building a zip installer that includes a g.prop file (found in many GApps packages), the installer will read the date code from the 'ro.addon.*_version=' property and automatically use it in place of the date code from the Windows folder name.​
WINDOWS INSTALLER
As mentioned above, you'll have the best user experience if you install Zip Builder using the Windows installer. It runs in standard user mode (no Admin access required or requested) and installs the Zip Builder and Zip Builder Settings exe's in: 'C:Users<user>AppDataRoamingZip Builder'. The installer will create a program group and shortcuts in the Windows start menu (and optionally on the desktop) that can be used to launch Zip Builder in 'manual selection mode', where the user can manually select the folder they wish to build. The installer will automatically run Zip Builder Settings Manager at the conclusion of the install where you can configure the settings and options to your personal preference.
Uninstalling Zip Builder from the Windows Uninstall menu will remove all traces of the software from your system. And, since Zip Builder, Zip Builder Settings Manager, or its installer will NEVER prompt for UAC access, you can be confident that it's not touching the Windows operating system. Of course, all source code is available if you want to check for yourself - you can even build it for yourself, if you want!​
TECHNICAL NOTES
Version 4.3+ of Zip Builder includes the new ZipSigner 2.1 Java executable that was rewritten from the ground up by @topjohnwu for use in his Magisk root management software. This change will allow you to build the largest zip installer on even the smallest 32-bit machine. I was able to build a 1.0+GB shell-script based installed on a 32-bit Windows XP machine with only 1GB of RAM.
If you have had java heap size issues building zip installers in the past, version 4.3+ of Zip Builder should completely eliminate these problems.​
XDA:DevDB Information
Zip Builder, Tool/Utility for all devices (see above for details)
Contributors
TKruzze
Version Information
Status: Stable
Current Stable Version: 4.5.2
Stable Release Date: 2020-09-06
Created 2018-01-23
Last Updated 2020-09-06
Anti-Virus False-Positives
ANTI-VIRUS FALSE-POSITIVES
There have been reports of false-positive flaggings of Zip Builder and/or the Windows installer. While I can, personally, assure you that there's no malware included in Zip Builder or its installer, I also understand that there may be some concern with using software that's been flagged on your machine.
To allay your concerns as best as possible, I have included 100% of the original source code for you to inspect and/or build the software yourself. Again, there is no possibility of malware as I do all of my compiling on a clean machine that is not connected to the internet. I have also submitted all 4 Windows executables to the major AV inspection service on the net. Below are the results of these inspections:
VirusTotal.com
ZipBuild.exe (32 bit) 7/68
ZipBuild.exe (64 bit) 2/68
ZipBuildSettings.exe 4/67
Zip Builder_4.5.2_Setup.exe 1/69
Sources & Acknowledgements / Recent Changes
SOURCES AND ACKNOWLEDGEMENTS
Zip Builder has existed for me since way back in 2013 when I started developing GApps packages. I've added features here and there and finally decided to share it. After privately sharing with @osm0sis, I received a lot of very constructive feedback and based on this, I polished the interface and added some new features. A big thank you to @osm0sis for this feedback. Without his input, it would look a lot clunkier than it does today.
All source code is provided, however, it's only appropriate for me to publicly acknowledge that this work includes code and binaries from several third party sources. Below is a complete list of these sources. You will also find this list as well as the actual code and binaries in the Source Code Zip file available for download.
Zip Builder
------------
Zip Builder is Copyright (c) 2013-2020 by @TKruzze
Original source code and compiled executables can be found on
XDA Developers. Zip Builder also includes code and compiled
executables from the sources listed below:
ZipSigner
---------------
ZipSigner is Copyright (c) 2016-2020, John Wu @topjohnwu)
Original source code and license can be found at:
https://github.com/topjohnwu/Magisk
The version of ZipSigner used in Zip Builder was built by @topjohnwu using the source code above and optimized using ProGuard optimizations
Info-ZIP
----------
Info-ZIP is Copyright (c) 1990-2007 Info-ZIP
Original License can be found at:
http://www.info-zip.org/license.html
Downloads can be found at:
ftp://ftp.info-zip.org/pub/infozip/win32/
Original source code can be found at:
https://sourceforge.net/projects/infozip/
Hashutils
----------
The MD5 Checksum code and executable are from code.kliu.org
Original source code and compiled executables can be found at:
http://code.kliu.org/misc/hashutils/
SUMMARY OF RECENT CHANGES
SEPTEMBER 6, 2020 - v4.5.2
Fixed RegEx bug (oversight) that only supported automatic folder renaming through the year 2019. Now we're good through the year 2029.
As always, the best and easiest way to update is to simply install the new version using the Windows installer without uninstalling the previous version. All of your settings and options will be retained
NOVEMBER 1, 2018 - v4.5.1
Updated the cleanup function to also include removal of the SignAPK*.tmp files that are created in the %TEMP% folder during the signing process.
- Thanks to @osm0sis for reporting
MARCH 26, 2018 - v4.4.0
Updated the ZipSigner java executable to v2.1-min. This version is significantly smaller than v2.1 (458K vs 4.0MB) and was built by @topjohnwu, himself, using using ProGuard optimizations
Recompiled Zip Builder Settings Manager (ZipBuildSettings.exe) without UPX compression to try and further minimize AV false-positives
Windows installer now built using lzma2/max compression and no longer uses solid compression. This was done to optimize installation speed and further minimize AV false-positives
MARCH 25, 2018 - v4.3.0
Updated signing code with the new ZipSigner 2.1 Java executable that was rewritten from the ground up by @topjohnwu for use in his Magisk root management software. This change will allow you to build the largest zip installer on even the smallest 32-bit machine. I was able to build a 1.0+GB shell-script based installer on a 32-bit Windows XP machine with only 1GB of RAM.
- Thanks, of course, to @topjohnwu, but also to @osm0sis for the heads up on its existence
- Thanks to @jenslody for building it for inclusion here.
Since memory and java heap size issues are now resolved with the above change, I have removed all memory and java heap size checks from Zip Builder. The above change also allowed me to remove the separate test key files (testkey.pk8 and testkey.x509.pem), signapk.jar, zipadjust, and minsignapk.jar executables as their functions are all now contained in the new ZipSigner 2.1 Java executable mentioned above.
Installer will now clean up its 'temp folder' files before displaying the 'COMPLETED' message. On slower systems this should reduce the delay when selecting the 'Close' button after Zip Builder completes the signing process.
- Thanks to @osm0sis for reporting and helping track down the issue
Zip Builder is now built without UPX compression on the Windows exe's. This was done to try and reduce false-positives that may be reported by your AV software. If you're still having AV hits, please read the ANTI-VIRUS FALSE-POSITIVES section on the OP.
Fixed bug in installer that would corrupt the context (right-click) menu settings on an update (not initial) installation.
- Thanks to @osm0sis for reporting and helping track down the issue
Excellent! Glad to see a public release! I was using Zip Builder all day to prepare my latest round of updates for my Odds and Ends thread, and it couldn't be easier!
It's been great working with you again @TKruzze, I knew you couldn't stay away from contributing awesome things to the community for too long.
Looks very cool! You're inspiring me to clean up and release a tool that I built which has no current equivalent.
Seeing as this uses Java, what would it take to make it work under linux? As a staunch Linux/osx user who only runs a windows VM for flashing his Samsung with odin, I would love to integrate this into my workflow, but without linux or Mac support for me personally that will be difficult ?
This is an incredible contribution. Thank you for making this public and for your hard work!
partcyborg said:
Seeing as this uses Java, what would it take to make it work under linux?
Click to expand...
Click to collapse
The only thing I'm actually using Java for is the signing portion of the process. There's no real way I can think of to easily port the rest of it to Linux. Thanks for the feedback!
wow thanks @TKruzze :good:
this will be really helpful for my future firmware updates ✌
Ok im very very new to all this but does this make zips that are flashable in twrp? Im wanting to learn how to do that if you guys could point me in the right direction id be thankful.
papasmurf879 said:
Ok im very very new to all this but does this make zips that are flashable in twrp? Im wanting to learn how to do that if you guys could point me in the right direction id be thankful.
Click to expand...
Click to collapse
yes
you need update-script and update-binary along other files
TKruzze said:
The only thing I'm actually using Java for is the signing portion of the process. There's no real way I can think of to easily port the rest of it to Linux. Thanks for the feedback!
Click to expand...
Click to collapse
My mistake. Thanks for the explanation! I'm sure then that this will run in wine however, I may give it a shot at some point. If I do I will let you know.
kamilmirza said:
yes
you need update-script and update-binary along other files
Click to expand...
Click to collapse
Thank you for replying im doing searches right now trying to figure it out.
papasmurf879 said:
Thank you for replying im doing searches right now trying to figure it out.
Click to expand...
Click to collapse
Advanced, but check out my thread here and the linked resources: [DEV][TEMPLATE] Complete Shell Script Flashable Zip Replacement + Signing [SCRIPT]
The EDIFY references/resources are the place to start. :good:
Can i create flashable zips of my apks. I Flash custom roms very often and some apps are needed as my daily driver so can i make a flashable zip of those apk file and flash via this tool
Ash225 said:
Can i create flashable zips of my apks. I Flash custom roms very often and some apps are needed as my daily driver so can i make a flashable zip of those apk file and flash via this tool
Click to expand...
Click to collapse
Have you tried this?
This tool in this thread is for making a zip if you already have the components (updater script and binary).
madbat99 said:
Have you tried this?
This tool in this thread is for making a zip if you already have the components (updater script and binary).
Click to expand...
Click to collapse
Thanks but i knew about this app i want to creat zips from my computer and not from my phone thats why i asked the question thanks for your prompt reply
This looks like this tool that will, hopefully, be helpful for one of my other little projects that I had to put aside till I finish catching up with some other projects/developments that's already on my plate.
I already have a working set of script commands for safely disabling the Google Play Protect but, i will need a medium/delivery system before I can release it and this looks promising to help with this.
~~~~~~~~~~~~~~~
I DO NOT provide support via PM unless asked/requested by myself. PLEASE keep it in the threads where everyone can share.
Did you just give me a Trojan? Because Defender says so and even VirusTotal was positive about this. Beware about using this software!
Djentist said:
Did you just give me a Trojan? Because Defender says so and even VirusTotal was positive about this. Beware about using this software!
Click to expand...
Click to collapse
Yeah, I'm sure one of the most respected developers on XDA would do that. I'd be more worried about those antivirus softwares you're using than anything.
Djentist said:
Did you just give me a Trojan? Because Defender says so and even VirusTotal was positive about this. Beware about using this software!
Click to expand...
Click to collapse
Definitely not a very responsible post to make. There's nothing wrong about reporting your findings, but to make an accusation like this is a bit irresponsible. I also seriously doubt that Microsoft Defender identified this as a virus (as you claim).
Anyways, here are the facts: There is no virus or malicious behavior. Below are the actual results of scans by VirusTotal and VirScan
Zip Builder_4.2.1_Setup.exe
VirusTotal.com (0/65)
VirScan.org (1/39)
ZipBuildSettings.exe
VirusTotal.com (2/66)
VirScan.org (2/39)
ZipBuild.exe (32 bit)
VirusTotal.com (2/66)
VirScan.org (2/39)
ZipBuild.exe (64 bit)
VirusTotal.com (1/65)
VirScan.org (1/39)
Based on personal experience, ANY file that is not signed with a Microsoft Root Certificate and/or uses UPX compression is going to produce false positives with the heuristics deployed by some of these 'so called' anti-virus software products in the marketplace. I'm actually surprised the numbers are as low as they are.
All that said, if you are not comfortable using the software, fine. But please exercise responsible reporting if you have questions or concerns. A big part of the reason for me releasing all the source code is to avoid having to defend myself from people making exactly this type of assertion.

Categories

Resources