[HELP] Kali Nethunter porting problems... - Sony Xperia M2

Well... during this months I have been trying to port Kali to the new builds of AOPS-based ROMs of this device (Omni, cm13, cm14...). A few months ago I was able to compile a Kali build working on cm13 and cm12.1, as you can see here: https://forum.xda-developers.com/xperia-m2/development/port-kali-nethunter-kalinet-t3463830/
Nevertheless, the build becomes outdated because of the new builds and the incomparable stability between old and new builds. So it was necesary to create a new build...
And the problems started... I had to format my drive so I reinstall Ubuntu. I build my environment to compile Android Kernel following official instructions:
Code:
$ sudo apt-get update
$ sudo apt-get install openjdk-8-jdk
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip
So now, required packages are installed. So now the Cross Compiler:
Code:
$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/
export CROSS_COMPILE=/home/iflashed/kalinet/arm-eabi-4.8/bin/arm-eabi-
Getting kernel sources from galaxyfreak's sources on GitHub
Code:
$ git clone -b 7.0-3.4 https://github.com/galaxyfreak/android_kernel_sony_msm-1.git
Now I have the source, now it's time to make necessary changes...
Code:
$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE menuconfig
Then save, and compile
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j3
And fail...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I'm using a Dual core CPU with 3gb of RAM. If somebody could help me...
Thanks!

Related

[DEV][REF]Get all Android Toolchains at one place!

Hello guys!
Here is something useful for all Kernel devs!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I have seen many newbies not getting the right Toolchain , or seen them downloading wrong toolchain, here is my git repo which contains 6 Prebuilt Android Toolchains!
Simple Sync it to your machine and use..
Get all Prebuilt Android Toolchains from my Github Repository!
You can fork the repository if you wish!
Toolchains in the repository-
[1] arm-2011.09
Sourcery CodeBench Lite 2011.09-69 for ARM EABI
Release Date: 19 December 2011.
[2] arm-2011.03
Sourcery G++ Lite 2011.03-42 for ARM EABI
Release Date: 2 May 2011.
[3] arm-2010.09
Sourcery G++ Lite 2010.09-51 for ARM EABI
Release Date: 10 November 2010.
[4] arm-2009q3
Sourcery G++ Lite 2009q3-68 for ARM EABI
Release Date: 20 October 2009
[5] arm-eabi-4.4.3
Toolchain from Cyanogen Mod Repo
[6] arm-eabi-linaro-4.6.2
Linaro Toolchain​
Instructions-
Execute the following commands from your terminal, if you use github then I think you will be familiar with it.
Code:
mkdir Android_Toolchains
git init
git remote add origin [email protected]:AdiPat/Android_Toolchains.git
git clone [email protected]:AdiPat/Android_Toolchains.git
This will Sync the entire repository into the directory!
******************* ENJOY BUILDING KERNELS ********************
Hit the Thanks button if it helped you !

[DEV][LINUX] CM9 Build Script

Hey all,
First I would like to say this is not my work this is based off Nicandris's CM from scratch script (forum here).
This bash/sh script builds CM9 from source and is only to be used once the build environment and sources have been downloaded correctly. So far I have only tested this with my Galaxy Nexus on Mint 12 but it should work with other devices and on other distros.
Instructions:
1. Download the provided zip and extract it, then place "build.sh" in the "~/bin" directory (/home/user/bin).
2. Then open up "build.sh" using a text editor like gedit and edit the variables to suit your environment, EXAMPLE :
Code:
#Variables Start
#Enter Device Vendor Here eg "moto" or "samsung"
vendor="samsung"
#Enter Device Name Here eg "maguro" or "toro"
device="maguro"
#Enter Build Source Here (Usually "/home/user/android)"
source="/home/kstarz/android"
#Enter Folder Where You Want Builds To Be Stored eg "/home/user/Desktop/Builds"
build_location="/home/kstarz/Desktop/Builds"
#Enter Source For AndroidSDK eg "/home/user/androidsdk"
sdk_source="/home/kstarz/Programs/androidsdk"
#Enter Location Where The Build Will Be Sent To On Your Device
push_to_phone="/sdcard/Download"
#Enter Your Name/Nickname (For Modversion)
nick="kstars"
#Variables End
3. Then open up a terminal and give the file permission to be executed as a program:
Code:
chmod a+x ~/bin/build.sh
4. Close that terminal and open up a new one then enter the code below to start the script.
Code:
build.sh
The rest is up to you
Screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I have tried to make this as simple as possible for users out there but if you have any issues I will try and respond.[/SIZE]
Full credits go to:
*Cyanogenmod* & *teamdouche* - For creating CM
*Nicandris* For creating the base for this script.
Remember if I helped you in anyway please press the thanks button!
Changelog
14.05.2012 - v1.0
- Initial Release
17.05.2012 - v1.1
- Minor Bugfix

[TOOL] [LINUX/MAC] Nexus Tools 2.8 (Featured by XDA)

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Nexus Tools is an installer for the Android debug/development command-line tools ADB (Android Device Bridge) and Fastboot for Mac OS X and Linux. The script does not need to be downloaded, simply copy and paste this command into the terminal and run it to install ADB/Fastboot:
Code:
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)
and this command to un-install Nexus Tools:
Code:
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/uninstall.sh)
Nexus Tools requires sudo privileges to install/uninstall the adb and fastboot tools to /usr/local/bin, so they can be run without typing the full directory. Nexus Tools is licensed under the GPLv3 license, and the source code is at the GitHub project below.
If you have a problem with Nexus Tools, leave a reply below or as an issue on the GitHub project!
GitHub Project
XDA News Article
Umm can we get a link so we can look at it first. Not just gonna blindly run your script.
edit: nevermind, found it. https://github.com/corbindavenport/nexus-tools/blob/master/install.sh
New in Nexus Tools 2.7 [9-11-15]:
Updated ADB binary for Mac and x86 Linux to 1.0.32 platform-tools 23rc_2 (should work with Android M preview)
New in Nexus Tools 2.8:
(Hopefully) fixed all problems on Mac OS X 10.11 El Capitan
Changed installation directory to /usr/local/bin/
Removed Mac OS X 10.11 warnings
Now downloads binaries over HTTPS

[HOW-TO][5.0+] Make "Thomas was Alone" from Amazon APPStore work on 5.0+

So if you bought, or got the app Thomas was Alone from the amazon appstore and tried to install it on your 5.0+ device you would get a rather nice(/s) screen saying "App not Installed", after wanting it to play on my dd (a 5.1.1 nexus 5)i decided to take a look on it, and found how to fix.
What you will need:
- PC
- Apktool: https://ibotpeaches.github.io/Apktool/
- Signapk: https://code.google.com/p/signapk/
- Thomas was alone apk http://www.amazon.com/Bossa-Studios-Ltd-Thomas-Alone/dp/B00LXFHI60
(you can dump it using root, downloading it via appstore, using a root file explorer, then going to /data/data/com.amazon.venezia/files/apks)
How to:
- Decompile the app using a cmd line on a folder where both apktool and signapk are, the command is "java -jar apktool.jar d <apk name>.apk" without quotes (since the apk is named as hash by the appstore, it will differ per device, also its without quotes and <>).
- Navigate to the folder with the same name as the apk, open AndroidManifest.xml and delete
android:installLocation="preferExternal" from the manifest tag(line 2)
before:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.bossastudios.twadroid">
after:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.bossastudios.twadroid">
- recompile it using "java -jar apktool.jar b <name of folder of decompiled apk>"
- sign it using "java -jar signapk.jar <key>.x509 or .pem key.pk8 <Name of the decompiled apk folder>\dist\<Name Of Decompiled Apk>.apk ThomasFixed.apk
- done, now you can install it via phone or via adb install ThomasFixed.apk
Screenshots:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

How can I enable cpu, memory, and io in cgroupv2 (attempt to run Docker on Android)

I am trying to run Docker on Android, using a Pixel 3a XL rooted, running stock rom but flashed a custom kernel. I need to enable cpu, cpuset, memory, io, and pid controllers in cgroupv2. After enabling them in menuconfig and flashing the kernel, the script used to check shows only pid available under cgroupv2 controllers.
What do I need to do besides enabling these options in the kernel’s menuconfig? Did I maybe not enable all the necessary options? Any help would be greatly appreciated!
With the current state, when I run docker I get a warning for each item, ex “WARN: Unable to find cpu controller”. and error setting cgroup config for procHooks process: bpf_prog_query(BPF_CGROUP_DEVICE)
As I understand it, these options may be mounted with cgroupv1 and this is why they do not show up?
I am using this guide: https://gist.github.com/FreddieOliveira/efe850df7ff3951cb62d74bd770dce27
and these are the options I enabled in my kernel using menuconfig: https://wiki.gentoo.org/wiki/Docker
From the config I flashed in my kernel:
CONFIG_CGROUPS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
CONFIG_CGROUP_CPUACCT=y
I flash the kernel by flashing the Image.lz4-dtb file that is created after building the kernel.
Here is a photo after running the script to check if kernel options are all enabled. Am trying to change these from missing to available/enabled.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
You are all set, all you need to do is run these commands every time you boot your device before running
Bash:
dockerd
Bash:
sudo mount -t tmpfs -o mode=755 tmpfs /sys/fs/cgroup
sudo mkdir -p /sys/fs/cgroup/devices
sudo mount -t cgroup -o devices cgroup /sys/fs/cgroup/devices
Or you can use Termux:Boot to do this automatically
EDIT:
You will find all you need by going to the original post here

Categories

Resources