Hello everybody,
I rooted my dream phone with :
Code:
fastboot boot boot.img
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cd system
# cd bin
# cat sh > su
# chmod 4755 su
All work fine !
I tried to install busybox like this :
Code:
adb push busybox /data/local/tmp
cat /data/local/tmp/busybox > /system/bin/busybox
chmod 4755 /system/bin/busybox
No problem with this step, but now if I type :
Code:
$su
#busybox ls /data
I have a permission denied
If I type
Code:
$su
#ls /data
all work fine
(ls is an symbolic link to toolbox)
ls -l /system/bin
Code:
-rwsr-xr-x root root 1745016 2009-07-28 11:01 busybox
-rwsr-xr-x root root 86936 2009-07-28 11:11 su
-rwxr-xr-x root shell 68472 2009-03-03 22:31 toolbox
...
I think busybox is not launch with root permission.. why?
I tried : ln -s busybox ls
but same problem !
What is wrong ?
Thanks.
Any particular reason why you setuid busybox? Try chmod 0755 busybox; chown root:shell busybox
I'm making this ADB based permissions fix patch which does more then only set permissions to system/app. for example to run just before you release a rom where the permissions have to be perfect. I was wondering, is there a list of all default permissions of the system files? (since looking it up file for file would take ages) I've already made a start.
Code:
@echo off
title Permissions patch (CHMOD)
cd /d %~dp0
adb root
echo.
echo Please connect your phone to continue...
adb wait-for-device
echo.
adb remount
cls
echo.
echo Mounting...
adb -d shell mount -o remount rw /system
adb -d shell mount -o remount rw /data
echo.
echo Fixing permissions...
echo.
echo Fixing system app permissions...
adb -d shell find /system/app/ -type f -name '*.apk' -exec chmod 644 {} \;
echo.
echo Fixing framework permissions...
adb -d shell find /system/framework/ -type f -name '*.apk' -exec chmod 644 {} \;
adb -d shell find /system/framework/ -type f -name '*.jar' -exec chmod 644 {} \;
echo.
echo Fixing bootanimation permissions...
adb -d shell chmod 644 "/system/media/sanim.zip"
echo.
echo Fixing init.d scripts permissions...
adb -d shell find /system/etc/init.d/ -type f -name '*.*' -exec chmod 777 {} \;
echo.
echo Fixing library permissions...
adb -d shell find /system/lib/ -type f -name '*.so*' -exec chmod 644 {} \;
echo.
echo Fixing GPS config file permissions...
adb -d shell chmod 644 "/system/etc/gps.conf"
adb -d shell chmod 644 "/data/gps/secgps.conf"
echo.
echo Fixing APN config file permissions...
adb -d shell chmod 644 "/system/etc/apns-conf.xml"
echo.
echo Fixing boot sound permissions...
adb -d shell chmod 644 "/system/etc/PowerOn.wav"
echo.
echo Fixing hosts file permissions...
adb -d shell chmod 644 "/system/etc/hosts"
echo.
echo Done!.
pause
Anyone? I don't like bumping my topic at all but since there is no reply at all it will disappear from users sight in no time.
My main question is if there is a standard chmod for system/lib/* because most of them have different permissions. I might have to leave that part out since it's impossible to make it if all files have different permissions in there.
I can make a permission fix for 90% of the system files tho
please help !!!
broodplank1337 said:
I'm making this ADB based permissions fix patch which does more then only set permissions to system/app. for example to run just before you release a rom where the permissions have to be perfect. I was wondering, is there a list of all default permissions of the system files? (since looking it up file for file would take ages) I've already made a start.
Code:
@echo off
title Permissions patch (CHMOD)
cd /d %~dp0
adb root
echo.
echo Please connect your phone to continue...
adb wait-for-device
echo.
adb remount
cls
echo.
echo Mounting...
adb -d shell mount -o remount rw /system
adb -d shell mount -o remount rw /data
echo.
echo Fixing permissions...
echo.
echo Fixing system app permissions...
adb -d shell find /system/app/ -type f -name '*.apk' -exec chmod 644 {} \;
echo.
echo Fixing framework permissions...
adb -d shell find /system/framework/ -type f -name '*.apk' -exec chmod 644 {} \;
adb -d shell find /system/framework/ -type f -name '*.jar' -exec chmod 644 {} \;
echo.
echo Fixing bootanimation permissions...
adb -d shell chmod 644 "/system/media/sanim.zip"
echo.
echo Fixing init.d scripts permissions...
adb -d shell find /system/etc/init.d/ -type f -name '*.*' -exec chmod 777 {} \;
echo.
echo Fixing library permissions...
adb -d shell find /system/lib/ -type f -name '*.so*' -exec chmod 644 {} \;
echo.
echo Fixing GPS config file permissions...
adb -d shell chmod 644 "/system/etc/gps.conf"
adb -d shell chmod 644 "/data/gps/secgps.conf"
echo.
echo Fixing APN config file permissions...
adb -d shell chmod 644 "/system/etc/apns-conf.xml"
echo.
echo Fixing boot sound permissions...
adb -d shell chmod 644 "/system/etc/PowerOn.wav"
echo.
echo Fixing hosts file permissions...
adb -d shell chmod 644 "/system/etc/hosts"
echo.
echo Done!.
pause
Click to expand...
Click to collapse
i'm new in android mobiles and i can't use my internal and external sd coz i uninstall One Click Lag Fix from my Galaxy S2 after that when i restart my phone i go to my memorey but i can't enter it and said there is no sd card
so can i use this permissions list on my Galaxy S2 ???
and can you learn me how please
many thanks
broodplank1337 said:
Anyone? I don't like bumping my topic at all but since there is no reply at all it will disappear from users sight in no time.
My main question is if there is a standard chmod for system/lib/* because most of them have different permissions. I might have to leave that part out since it's impossible to make it if all files have different permissions in there.
I can make a permission fix for 90% of the system files tho
Click to expand...
Click to collapse
Very useful, thank you.!!!!!!!!
Broodplank1337 SOS GROSO SABELO.!!!
The default permission for /system/app is:
(0, 0, 0644)
Mine says connect device and it is connected?
this app may help to verify permissions and it category
https://play.google.com/store/apps/details?id=com.osp.pmanagerinfo
This is just a removal script that removes bloatware.
You can edit the script by your own liking in the file: remove_apps/remove_script.sh
Just flash in any recovery.
But you have to be root and unlocked.
This is not my own idea but just made it custom to JB and Xperia phones.
If you edit the script just remove / add lines in the file i prefer the Note++ app... and flash.
Goodluck to all
Code:
#!/system/bin/sh
## add here the .apk files you want to delete
## like: rm -f /system/app/Calculator.apk
rm -f /system/app/EventStream.apk
rm -f /system/app/EventStreamPluginTwitter.apk
rm -f /system/app/EventStreamPluginFacebook.apk
rm -f /system/app/facebook.apk
rm -f /system/app/fast-dormancy-incall.apk
rm -f /system/app/fast-dormancy-wakeup.apk
rm -f /system/app/FBCalendarSync.apk
rm -f /system/app/FBIAppShare.apk
rm -f /system/app/FBMediaDiscovery.apk
rm -f /system/app/FBMusicLike.apk
rm -f /system/app/FBSetupwizard.apk
rm -f /system/app/GenieWidget.apk
rm -f /system/app/helpapp.apk
rm -f /system/app/JapaneseIME.apk
rm -f /system/app/PlusOne.apk
rm -f /system/app/POBoxSknMono.apk
rm -f /system/app/POBoxSknPink.apk
rm -f /system/app/POBoxSknSelector.apk
rm -f /system/app/POBoxSknWood.apk
rm -f /system/app/LiveWallpapers.apk
rm -f /system/app/PostViewer.apk
rm -f /system/app/retaildemo.apk
rm -f /system/app/SemcEmail.apk
rm -f /system/app/SEMCFacebookProxy.apk
rm -f /system/app/SemcPowerSaver.apk
rm -f /system/app/SEMCSetupWizard.apk
rm -f /system/app/SocialEngineCore.apk
rm -f /system/app/SocialEngineFacebookPlugin.apk
rm -f /system/app/SocialEnginePicassaPlugin.apk
rm -f /system/app/SocialPane-Apps.apk
rm -f /system/app/SocialPane-FeedWidget.apk
rm -f /system/app/SocialPane-FriendsWidget.apk
rm -f /system/app/SocialPane-StatusWisdget.apk
rm -f /system/app/storefront.apk
rm -f /system/app/talkback.apk
rm -f /system/app/textinput-chn.apk
rm -f /system/app/timescaperssplugin.apk
rm -f /system/app/TimescapeSpline.apk
rm -f /system/app/TwitterPostViewer.apk
rm -f /system/app/UpdateCentre.apk
rm -f /system/app/PhaseBeam.apk
rm -f /system/app/CosmicFlow.apk
rm -f /system/app/HoloSpiralWallpaper.apk
rm -f /system/app/Galaxy4.apk
rm -f /system/app/MagicSmokeWallpapers.apk
rm -f /system/app/NoiseField.apk
rm -f /system/app/PhotoSlideshow.apk
##rm -f /system/app/.apk
##rm -f /system/app/.apk
##rm -f /system/app/.apk
##rm -f /system/app/.apk
##rm -f /system/app/.apk
##rm -f /system/app/.apk
##rm -f /system/app/.apk
##rm -f /system/app/.apk
##rm -f /system/app/.apk
##rm -f /system/app/.apk
##rm -f /system/app/.apk
The above is an example of my file.
Also usable with "Gscript" from the playstore:
First of all extract your modified .sh script to your sdcard in the folder "Gscript".
In the app go to options and use "add script" and use the file, save and you're done!
Now you can load the script
Download here:
Bloatware_removal_Script_v1.0
Could this script be made to work with gscript for example ? . Will it work if i just paste the text from your post in new script ?
I'll look into it.
mastersjef said:
I'll look into it.
Click to expand...
Click to collapse
Thank you :good::good:
MafiaManV said:
Thank you :good::good:
Click to expand...
Click to collapse
Oke so use Gscript from the playstore.
First of all extract your modified .sh script to your sdcard in the folder "Gscript" in the app go to options and use "add script" and use the file save and your done!
Now you can load the script just tested.....
ok, so i downloaded the. zip you included in your first post, extracted the. sh file,........... but after running the script i get this. What am i doing wrong? I use XperiaS
I think it just need root and busybox. Root is not required.
But I can be wrong.
i have granted root access, and busybox with smart install installed
EDIT : My bad, sorry
This is a universal script for all xperia phones. Have three Versions.
http://forum.xda-developers.com/showthread.php?t=2349568
Just to point to an alternative.
Android Tuner's file manager offers to select multiple files. Hit delete and the bloat is gone in a minute. I am sure other file managers are also capable doing this.
Currently Building Bootable Android 5.1 Kernel From HTC DEV Source.
(THIS IS THE STOCK 5.0.1 / RUU Version = 1.23.1550.3 CL637541 RELEASE-KEYS)
Linux version 3.10.49-perf-g26c2269 ([email protected]) (gcc version 4.7 (GCC) ) #2 SMP PREEMPT Sat Oct 31 02:35:36 CST 2015
This has been compiled and will boot on the device.
NOTE: WI-FI IS NOW WORKING
NOTE: DT Blobs broken:Fixed by using Blobs pulled from the device.}
WORK IN PROGRESS !!
Currently HTC has not released the Kernel Source for Marshmallow 6.0.1.
Solution: Port the 5.0.1 HTC Source by merging with AOSP device/lge/bullhead-kernel
Current Status:
WORKING KERNEL NO CHANGES FROM STOCK
Will Build for other Devices upon request.
Anyone who wishes to contribute to this project would be appreciated.
I'm in the process of setting up the GIT and the project on XDA.
DOWNLOADS
FOR METRO - PCS VERSION OF DESIRE 626S
Linux version 3.10.49-perf-g26c2269 ([email protected]) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Sat Oct 1 11:53:51 EDT 2016
https://drive.google.com/open?id=0B8jitdIyh2NtdW1uNWdvaWdTdG8
The modules are in the link below.
https://drive.google.com/open?id=0B8jitdIyh2NtODl4ellvd0Y5MW8
XDA:DevDB Information
HTC MSM8909 Qualcom Kernel Port, Kernel for the HTC Desire 626
Contributors
BigCountry907, hp79
Kernel Special Features: Pssible: Change Keys used for flashing firmware: Add Fastboot Commands To Custom Bootloader: Either will allow us to S-OFF
Version Information
Status: Testing
Current Stable Version: Linux version 3.10.4
Stable Release Date: 2015-10-31
Created 2016-09-28
Last Updated 2016-10-01
Setting Up To Test 3.10.49-perf-g26c2269 Kernel Build
First I would like to mention that a full LINUX Development Environment is required to perform most of these tasks. If you don't have the development environment set up then please do the necessary research.
To test YOUR development environment and the HTC-DEV Kernel Source it is necessary to perform the following steps.
1 ) If you are currently running Marshmallow 6.0.1 you will need to downgrade the device to Lollipop 5.0.1 using the RUU. Please note that the Lollipop RUU is no longer available on the HTC-DEV site. Don't worry we will be going back to Marshmallow but need to test in lollipop first.
Please see the following thread for instructions on downgrading the HTC Desire 626s.
http://forum.xda-developers.com/desire-626/development/metropcs-htc-626s-to-lollipop-t3460391
:good:
2) Download the Kernel Source Code from the HTC-DEV Site.
http://www.htcdev.com/devcenter/downloads
If you use the filter for device and select desire 626s you will see only the 626s kernel sources.
The device I have = HTC Desire 626s (a32eul) " Carrier Metro-PCS"
The Kernel Source I am using.
Device= Desire626s Carrier=HTC Region= Gen Unlock Type=CRC
Kernel Version=3.10.49 Android Version=v5.1 Size=548 MB Description=1.06.617.6
Backup the device boot.img & Unpack / Split the kernel + ramdisk + dt.img.
Now we are all on the same page. " Same Setup Fresh Install "
Lets get down to business.
I'm going to go through the steps that I use. If you plan to work along with this project I recommend that you keep the same directory structure that I have. This way all the commands I give you will work. You may wish to change the directory structure but if you do.... remember you will need to adjust the commands accordingly.
So from a brand new fresh install.
#1 install twrp recovery
#2 install supersu
#3 Open supersu on phone
#4 Make sure usb debugging is turned on ect. ect. ect.
#5 Lets get the boot.img from the device.
Connect the device to the computer
From this point forward all commands are executed in the Linux terminal shell.
Code:
adb shell
Code:
su
Copy boot partition to the external sd card.
Code:
dd if=/dev/block/bootdevice/by-name/boot of=sdcard2/Boot.img
Pull the boot.img to the computer.
If still in adb shell exit out.
Code:
exit
exit
adb pull /sdcard2/Boot.img
#6 Setup some directories and move the boot.img into our project.
Code:
mkdir ~/a32e-kernel-build/
mkdir ~/a32e-kernel-build/Device-Files/
mkdir ~/a32e-kernel-build/Device-Files/Boot
mkdir ~/a32e-kernel-build/Tools
mkdir ~/a32e-kernel-build/Tools/AIK-Linux/
mv Boot.img ~/a32e-kernel-build/Device-Files/Boot
cd ~/a32e-kernel-build/Tools/AIK-Linux/
cp ~/a32e-kernel-build/Device-Files/Boot/Boot.img ~/a32e-kernel-build/Tools/AIK-Linux/
#7 We need AIK-Linux boot tools. Download them from the link below.
http://forum.xda-developers.com/showthread.php?t=2073775
Please do use these bootimg tools. You might have others but AIK-Linux unpacks and repacks the image files as "ROOT".
Using other tools or not unpacking / repacking as ROOT will cause a bootloop specifically in Marshmallow even if the boot.img is good.
Code:
mv ~/Downloads/AIK-Linux-v2.4-ALL.tar.gz ~/a32e-kernel-build/Tools/AIK-Linux
tar -xvzf ~/a32e-kernel-build/Tools/AIK-Linux/AIK-Linux-v2.4-ALL.tar.gz
rm -f ~/a32e-kernel-build/Tools/AIK-Linux/AIK-Linux-v2.4-ALL.tar.gz
mv -v ~/a32e-kernel-build/Tools/AIK-Linux/AIK-Linux/* ~/a32e-kernel-build/Tools/AIK-Linux/
rm -d ~/a32e-kernel-build/Tools/AIK-Linux/AIK-Linux
Ok I know ????????
You want to know what we need the boot image for anyway !!
The a32e_defconfig file that comes with the HTC-DEV source code is not the exact configuration that HTC used when they built the kernel.
We want to start out with the same configuration RIGHT!!
Yes we do...... and after we have a verified working Kernel.......then we can start making changes.
In a nutshell /proc/config.gz will not work to pull the existing configuration. HTC did not enable that option. Lucky for us there is another way to generate the configuration file & that's reason #1 that we need the boot.img. There is another reason but we will get to that later. ( Other than having a Backup of the boot.img LOL. )
#8 Unpack the boot.img
Code:
sudo ./unpackimg.sh Boot.img
Make sure you use "sudo" it is nessessary.
The output should be
~/a32e-kernel-build/Tools/AIK-Linux$ sudo ./unpackimg.sh Boot.img
Android Image Kitchen - UnpackImg Script
by osm0sis @ xda-developers
Supplied image: MM-Boot.img
Removing old work folders and files...
Setting up work folders...
Splitting image to "split_img/"...
BOARD_KERNEL_CMDLINE console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 user_debug=31 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlyprintk vmalloc=400m androidboot.selinux=enforcing androidboot.hardware=htc_a32e androidusb.pid=0x0668
BOARD_KERNEL_BASE 80000000
BOARD_NAME boot:0
BOARD_PAGE_SIZE 2048
BOARD_KERNEL_OFFSET 00008000
BOARD_RAMDISK_OFFSET 02000000
BOARD_TAGS_OFFSET 01e00000
BOARD_DT_SIZE 731136
Unpacking ramdisk to "ramdisk/"...
Compression used: gzip
6560 blocks
Done!
#9 Move our unpacked boot.img to our project folder.
Code:
sudo mv ramdisk ~/a32e-kernel-build/Device-Files/Boot/
sudo mv split_img ~/a32e-kernel-build/Device-Files/Boot/
sudo cp ~/a32e-kernel-build/Device-Files/Boot/split_img/Boot.img-dtb ~/a32e-kernel-build/Device-Files/Boot/Boot.img-dtb
sudo cp ~/a32e-kernel-build/Device-Files/Boot/split_img/Boot.img-zImage ~/a32e-kernel-build/Device-Files/Boot/Boot.img-zImage
sudo cp ~/a32e-kernel-build/Device-Files/Boot/Boot.img-zImage ~/a32e-kernel-build/Device-Files/Boot/kernel
Getting Running Kernel Configuration
#1 Lets get the current running Kernel Version
Code:
cd ~/a32e-kernel-build/Device-Files/Boot/
Code:
dd if=kernel bs=1 skip=$(LC_ALL=C grep -a -b -o $'\x1f\x8b\x08\x00\x00\x00\x00\x00' kernel | cut -d ':' -f 1) | zgrep -a 'Linux version'
My output is as follows.
Linux version 3.10.49-perf-g26c2269 ([email protected]) (gcc version 4.7 (GCC) ) #2 SMP PREEMPT Sat Oct 31 02:35:36 CST 2015
7202481+0 records in
7202481+0 records out
7202481 bytes (7.2 MB, 6.9 MiB) copied, 5.4281 s, 1.3 MB/s
Hopefully you see or know why this is important to us.
In order for our new kernel to load and not reject existing modules the version of the new kernel must match.
Linux version 3.10.49-perf-g26c2269
And also the 26c2269 is the number we need,
to match the exact commit of the source code that this specific kernel was built upon.
In theory when we checkout a branch and that would be used as part of the tag.
Right now the most important thing to us is the "-perf"
And the ".-g26c2269"
We will need those soon.
Now lets get that .config / a32e_defconfig file.
Wayy back in step number 2 of the 1st post you were supposed to get the HTC-DEV Kernel source.
If you didn't it's time we need it now.
http://www.htcdev.com/devcenter/downloads
When you get to the HTC-DEV download page just filter by device and select desire 626s.
#1 Set Up Basic HTC-DEV Source Directory Structure
Code:
cd
mkdir ~/android
mkdir ~/android/device
mkdir ~/android/device/a32e
mkdir ~/android/device/a32e/platform
#2 Setup the Kernel Source
Code:
mv ~/Downloads/a32eul-3.10.49-perf-ga4d7327.zip ~/android/device/a32e/a32eul-3.10.49-perf-ga4d7327.zip
unzip ~/android/device/a32e/a32eul-3.10.49-perf-ga4d7327.zip -d ~/android/device/a32e/
rm -f ~/android/device/a32e/a32eul-3.10.49-perf-ga4d7327.zip
cd ~/android/device/a32e/
tar -xvzf ~/android/device/a32e/248_kernel_a32eul-3.10.49-perf-ga4d7327.tar.gz
rm ~/android/device/a32e/248_kernel_a32eul-3.10.49-perf-ga4d7327.tar.gz
mv -v ~/android/device/a32e/248_kernel_a32eul-3.10.49-perf-ga4d7327/* ~/android/device/a32e/
rm -rf ~/android/device/a32e/248_kernel_a32eul-3.10.49-perf-ga4d7327
mv ~/android/device/a32e/platform.tar.gz ~/android/device/a32e/platform/
#3 Pull the config from the kernel
Code:
cd ~/android/device/a32e/scripts/
./extract-ikconfig ~/a32e-kernel-build/Device-Files/Boot/Boot.img-zImage > Big-Country_defconfig
mv -f Big-Country_defconfig ~/android/device/a32e/arch/arm/configs
mkdir ~/a32e-kernel-build/Device-Files/Configs/ORIGINAL/
cp -f ~/android/device/a32e/arch/arm/configs/Big-Country_defconfig ~/a32e-kernel-build/Device-Files/Configs/ORIGINAL/
Open up the Big-Country_defconfig
It is in the folder ~/android/device/a32e/arch/arm/configs
Open it with G-Edit or whatever text editor you use.
Search for CONFIG_LOCALVERSION=
and change it to CONFIG_LOCALVERSION="-g26c2269"
Open up the main makefile. in the folder ~/android/device/a32e/Makefile
VERSION = 3
PATCHLEVEL = 10
SUBLEVEL = 49
EXTRAVERSION =
NAME = TOSSUG Baby Fish
At the top of the file change EXTRAVERSION =
EXTRAVERSION = -perf
Now lets backup the edited Big-Country_defconfig.
Code:
cp -f ~/android/device/a32e/arch/arm/configs/Big-Country_defconfig ~/a32e-kernel-build/Device-Files/
Now were cooking.
Preparing and Building the Kernel
#1 Get the GCC Toolchain
First if you have a dev environment set up you should have a repo set up.
If not go to aosp site to see how yo set up a repo.
https://source.android.com/source/downloading.html
Then get the toolchain
Code:
cd
mkdir ~/android/Toolchains
mkdir ~/android/Toolchains/prebuilts
cd ~/android/Toolchains/prebuilts
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8
Were gonna use the 4.8 toolchain.
[email protected]:~/android/Toolchains/prebuilts$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8
Cloning into 'arm-eabi-4.8'...
remote: Sending approximately 28.69 MiB ...
remote: Counting objects: 158, done
remote: Finding sources: 100% (158/158)
remote: Total 354 (delta 71), reused 354 (delta 71)
Receiving objects: 100% (354/354), 28.74 MiB | 2.09 MiB/s, done.
Resolving deltas: 100% (71/71), done.
Checking connectivity... done.
#2 Initialize the Kernel Build
Go to the home path of the kernel
Code:
cd
cd ~/android/device/a32e/
Export the required variables.
Code:
export TOP=~/android/Toolchains/
export PATH=$TOP/prebuilts/arm-eabi-4.8/bin:$PATH
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=~/android/Toolchains/prebuilts/arm-eabi-4.8/bin/arm-eabi-
Clean out any old left over stuff from previous builds.
Code:
make clean
make mrproper
Dont worry about this warning it's not a problem.
/home/bigcountry/android/device/a32e/arch/arm/boot/dts/Makefile:228: warning: overriding recipe for target `dtbs'
/home/bigcountry/android/device/a32e/arch/arm/boot/dts/Makefile:228: warning: ignoring old recipe for target `dtbs'
Initialize the configuration for our device.
Code:
make Big-Country_defconfig
This warning is also ok.
In file included from scripts/kconfig/zconf.tab.c:2503:0:
scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:567:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]
jump->offset = r->len - 1;
^
scripts/kconfig/menu.c:528:19: note: ‘jump’ was declared here
struct jump_key *jump;
^
If your curious and want to see how many settings there are.
Just don't change anything for the first run.
Code:
make menuconfig
Were ready to compile
set -j to the number of cores your computer has.
Code:
make prepare
make all -j8
In about 5 min or less you will have a compiled kernel.
after you see the zimage output message
The last 2 lines output from the build.
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
Code:
make modules -j8
Then you should see:
[email protected]:~/android/device/a32e$ make modules -j8
CHK include/generated/uapi/linux/version.h
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
Building modules, stage 2.
MODPOST 24 modules
During the build:
You will see 1 warning message for an uninitialized jump.
And 4 warning messages about relying on default adress.
Thats the broken dtb issue.
No worry for now. We will repack the boot.img with the new kernel zImage and use the original dt.img.
Good enough for this test.
Also as i mentioned we have to build the wifi module out of the tree.
We will get to that. So in this state the kernel will boot and the device functions with exception to wifi.
Remember this run is just to test the baseline system and source code.
Packing The Kernel Into Boot.img
First lets backup our kernel config files.
Code:
mkdir ~/a32e-kernel-build/Device-Files/Configs
cp -f ~/android/device/a32e/.config ~/a32e-kernel-build/Device-Files/Configs
cp -f ~/android/device/a32e/.config.old ~/a32e-kernel-build/Device-Files/Configs
cp -f ~/android/device/a32e/arch/arm/configs/Big-Country_defconfig ~/a32e-kernel-build/Device-Files/Configs
Now lets copy all the modules and kernel z-image we built.
Code:
mkdir ~/a32e-kernel-build/Device-Files/zimage
mkdir ~/a32e-kernel-build/Device-Files/modules
cp -f ~/android/device/a32e/arch/arm/boot/zImage ~/a32e-kernel-build/Device-Files/zimage/kernel
cp -f ~/android/device/a32e/arch/arm/boot/zImage-dtb ~/a32e-kernel-build/Device-Files/
shopt -s globstar
cp **/*.ko ~/a32e-kernel-build/Device-Files/modules/
Compare the new kernel version to the original version.
Code:
cd ~/a32e-kernel-build/Device-Files/zimage
dd if=kernel bs=1 skip=$(LC_ALL=C grep -a -b -o $'\x1f\x8b\x08\x00\x00\x00\x00\x00' kernel | cut -d ':' -f 1) | zgrep -a 'Linux version'
Code:
cd ~/a32e-kernel-build/Device-Files/Boot/
dd if=kernel bs=1 skip=$(LC_ALL=C grep -a -b -o $'\x1f\x8b\x08\x00\x00\x00\x00\x00' kernel | cut -d ':' -f 1) | zgrep -a 'Linux version'
Output Comparison On My System
[email protected]:~/a32e-kernel-build/Device-Files$ cd ~/a32e-kernel-build/Device-Files/zimage
[email protected]:~/a32e-kernel-build/Device-Files/zimage$ dd if=kernel bs=1 skip=$(LC_ALL=C grep -a -b -o $'\x1f\x8b\x08\x00\x00\x00\x00\x00' kernel | cut -d ':' -f 1) | zgrep -a 'Linux version'
Linux version 3.10.49-perf-g26c2269 ([email protected]) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Sat Oct 1 11:53:51 EDT 2016
7162737+0 records in
7162737+0 records out
7162737 bytes (7.2 MB, 6.8 MiB) copied, 5.16669 s, 1.4 MB/s
[email protected]:~/a32e-kernel-build/Device-Files/zimage$ cd ~/a32e-kernel-build/Device-Files/Boot/
[email protected]:~/a32e-kernel-build/Device-Files/Boot$ dd if=kernel bs=1 skip=$(LC_ALL=C grep -a -b -o $'\x1f\x8b\x08\x00\x00\x00\x00\x00' kernel | cut -d ':' -f 1) | zgrep -a 'Linux version'
Linux version 3.10.49-perf-g26c2269 ([email protected]) (gcc version 4.7 (GCC) ) #2 SMP PREEMPT Sat Oct 31 02:40:46 CST 2015
7202505+0 records in
7202505+0 records out
7202505 bytes (7.2 MB, 6.9 MiB) copied, 4.70855 s, 1.5 MB/s
[email protected]:~/a32e-kernel-build/Device-Files/Boot$
Linux version 3.10.49-perf-g26c2269 ([email protected]) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Sat Oct 1 11:53:51 EDT 2016
Linux version 3.10.49-perf-g26c2269 ([email protected]) (gcc version 4.7 (GCC) ) #2 SMP PREEMPT Sat Oct 31 02:40:46 CST 2015
Linux version 3.10.49-perf-g26c2269 MATCHES.
Repack the Boot Image.
For now we are just using the original ramdisk and original dt.img.
Later on we will make some changes and then repack.
Were just making sure things boot first.
We have to do this as root.
Code:
sudo
Copy all files needed to AIK Linux for Repacking.
Code:
sudo cp -r ~/a32e-kernel-build/Device-Files/Boot/ramdisk ~/a32e-kernel-build/Tools/AIK-Linux/ramdisk
sudo cp -r ~/a32e-kernel-build/Device-Files/Boot/split_img ~/a32e-kernel-build/Tools/AIK-Linux/split_img
sudo cp -f ~/android/device/a32e/arch/arm/boot/zImage ~/a32e-kernel-build/Tools/AIK-Linux/split_img/Boot.img-zImage
Repack the Boot.img.
Code:
cd ~/a32e-kernel-build/Tools/AIK-Linux
sudo ./repackimg.sh
Yaaayyyy Now we have a boot.img we can flash. (For Testing / Developing Only)
Copy the boot image to our project.
Code:
mkdir ~/a32e-kernel-build/Device-Files/New-Boot
sudo cp -f ~/a32e-kernel-build/Tools/AIK-Linux/image-new.img ~/a32e-kernel-build/Device-Files/New-Boot/image-new.img
Flashing the New Boot Image
Flash and test Boot the new Kernel
#1 Boot the phone into download mode
Connect the device to the computer
Boot into download mode using the power and volume down key after turning off the device.
Or boot to download mode using adb.
Code:
adb reboot download
#2 Flash the boot image
Code:
cd ~/a32e-kernel-build/Device-Files/New-Boot/
fastboot flash boot image-new.img
Output is
[email protected]:~/a32e-kernel-build/Device-Files/New-Boot$ fastboot flash boot image-new.img
target reported max download size of 725000000 bytes
sending 'boot' (10476 KB)...
OKAY [ 1.877s]
writing 'boot'...
(bootloader) HOSD CL#637541
(bootloader) [email protected]
(bootloader) [email protected]%
(bootloader) Update partition OK
(bootloader) [email protected]
OKAY [ 2.759s]
finished. total time: 4.636s
Reboot the phone and test it out
I am happy to say that WIFI is working WE are Building the Prima Module
.
Building Proprietary Modules / Not Included in the Source
Adding the New Modules
All 24 of the modules currently being compiled are Tested and Work.
Please carefully install the modules as I demonstrate here.
Do not execute commands against the /system/lib/modules/ using wildcards.
#1 Get rid of any old modules created by previous compiles.
Code:
rm -f ~/a32e-kernel-build/Device-Files/modules/*.ko
#2 Copy our new modules from the source compile
Code:
cp ~/android/device/a32e/crypto/ansi_cprng.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/input/evbug.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/spi/spidev.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/fs/ecryptfs/ecryptfs.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/gud/mcDrvModule.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/gud/mcKernelApi.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/arch/arm/mach-msm/dma_test.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/input/misc/gpio_axis.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/usb/host/ice40-hcd.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/input/misc/gpio_event.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/input/misc/gpio_input.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/input/misc/gpio_matrix.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/input/misc/gpio_output.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_oobtest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_pagetest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_readtest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_speedtest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_stresstest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_nandbiterrs.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_nandecctest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_subpagetest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_torturetest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/media/radio/radio-iris-transport.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/platform/msm/msm_bus/msm-buspm-dev.ko ~/a32e-kernel-build/Device-Files/modules/
#3 Create a modules directory on the external sd card
Code:
adb shell "su -c 'mkdir /sdcard2/modules/'"
#4 Erase old modules from sd card if there are any
Code:
adb shell "su -c 'rm -f /sdcard2/modules/*.ko'"
#5 Copy the new modules to the sd card
Code:
adb push ~/a32e-kernel-build/Device-Files/modules/ansi_cprng.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/dma_test.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/ecryptfs.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/evbug.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/gpio_axis.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/gpio_event.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/gpio_input.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/gpio_matrix.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/gpio_output.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/ice40-hcd.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mcDrvModule.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mcKernelApi.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/msm-buspm-dev.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_nandbiterrs.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_nandecctest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_oobtest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_pagetest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_readtest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_speedtest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_stresstest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_subpagetest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_torturetest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/radio-iris-transport.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/spidev.ko /sdcard2/modules/
#6 Connect the phone and start shell
Code:
adb shell
su
#7 Delete the existing modules from the device
Code:
mount -o rw,remount,rw /system
Code:
rm -rf /system/lib/modules/ansi_cprng.ko
rm -rf /system/lib/modules/dma_test.ko
rm -rf /system/lib/modules/ecryptfs.ko
rm -rf /system/lib/modules/evbug.ko
rm -rf /system/lib/modules/gpio_axis.ko
rm -rf /system/lib/modules/gpio_event.ko
rm -rf /system/lib/modules/gpio_input.ko
rm -rf /system/lib/modules/gpio_matrix.ko
rm -rf /system/lib/modules/gpio_output.ko
rm -rf /system/lib/modules/ice40-hcd.ko
rm -rf /system/lib/modules/mcDrvModule.ko
rm -rf /system/lib/modules/mcKernelApi.ko
rm -rf /system/lib/modules/msm-buspm-dev.ko
rm -rf /system/lib/modules/mtd_nandbiterrs.ko
rm -rf /system/lib/modules/mtd_nandecctest.ko
rm -rf /system/lib/modules/mtd_oobtest.ko
rm -rf /system/lib/modules/mtd_pagetest.ko
rm -rf /system/lib/modules/mtd_readtest.ko
rm -rf /system/lib/modules/mtd_speedtest.ko
rm -rf /system/lib/modules/mtd_stresstest.ko
rm -rf /system/lib/modules/mtd_subpagetest.ko
rm -rf /system/lib/modules/mtd_torturetest.ko
rm -rf /system/lib/modules/radio-iris-transport.ko
rm -rf /system/lib/modules/spidev.ko
#7 Copy the new modules to the device
Code:
cp -rf /sdcard2/modules/ansi_cprng.ko /system/lib/modules
cp -rf /sdcard2/modules/dma_test.ko /system/lib/modules
cp -rf /sdcard2/modules/ecryptfs.ko /system/lib/modules
cp -rf /sdcard2/modules/evbug.ko /system/lib/modules
cp -rf /sdcard2/modules/gpio_axis.ko /system/lib/modules
cp -rf /sdcard2/modules/gpio_event.ko /system/lib/modules
cp -rf /sdcard2/modules/gpio_input.ko /system/lib/modules
cp -rf /sdcard2/modules/gpio_matrix.ko /system/lib/modules
cp -rf /sdcard2/modules/gpio_output.ko /system/lib/modules
cp -rf /sdcard2/modules/ice40-hcd.ko /system/lib/modules
cp -rf /sdcard2/modules/mcDrvModule.ko /system/lib/modules
cp -rf /sdcard2/modules/mcKernelApi.ko /system/lib/modules
cp -rf /sdcard2/modules/msm-buspm-dev.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_nandbiterrs.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_nandecctest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_oobtest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_pagetest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_readtest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_speedtest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_stresstest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_subpagetest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_torturetest.ko /system/lib/modules
cp -rf /sdcard2/modules/radio-iris-transport.ko /system/lib/modules
cp -rf /sdcard2/modules/spidev.ko /system/lib/modules
#8 Set the correct permissions
Code:
chmod 0644 /system/lib/modules/ansi_cprng.ko
chmod 0644 /system/lib/modules/dma_test.ko
chmod 0644 /system/lib/modules/ecryptfs.ko
chmod 0644 /system/lib/modules/evbug.ko
chmod 0644 /system/lib/modules/gpio_axis.ko
chmod 0644 /system/lib/modules/gpio_event.ko
chmod 0644 /system/lib/modules/gpio_input.ko
chmod 0644 /system/lib/modules/gpio_matrix.ko
chmod 0644 /system/lib/modules/gpio_output.ko
chmod 0644 /system/lib/modules/ice40-hcd.ko
chmod 0644 /system/lib/modules/mcDrvModule.ko
chmod 0644 /system/lib/modules/mcKernelApi.ko
chmod 0644 /system/lib/modules/msm-buspm-dev.ko
chmod 0644 /system/lib/modules/mtd_nandbiterrs.ko
chmod 0644 /system/lib/modules/mtd_nandecctest.ko
chmod 0644 /system/lib/modules/mtd_oobtest.ko
chmod 0644 /system/lib/modules/mtd_pagetest.ko
chmod 0644 /system/lib/modules/mtd_readtest.ko
chmod 0644 /system/lib/modules/mtd_speedtest.ko
chmod 0644 /system/lib/modules/mtd_stresstest.ko
chmod 0644 /system/lib/modules/mtd_subpagetest.ko
chmod 0644 /system/lib/modules/mtd_torturetest.ko
chmod 0644 /system/lib/modules/radio-iris-transport.ko
chmod 0644 /system/lib/modules/spidev.ko
Reboot the device and you will be running the newly compiled modules.
Proprietary Modules
Building Proprietary Modules / Not Included in the Source
Lets take a look at the modules that did not build.
-rw-r--r-- root root 137370 2015-10-30 14:45 core_ctl.ko
lrw-r--r-- root root 2015-10-30 14:43 crypto_test_mod.ko -> crypto_test_mod.ko.3.10
-rw-r--r-- root root 287076 2015-10-30 14:43 crypto_test_mod.ko.3.10
lrw-r--r-- root root 2015-10-30 14:43 moc_crypto.ko -> moc_crypto.ko.3.10
-rw-r--r-- root root 510307 2015-10-30 14:43 moc_crypto.ko.3.10
-rw-r--r-- root root 40 2015-10-30 14:43 moc_crypto.ko.sig.3.10
lrw-r--r-- root root 2015-10-30 14:43 moc_crypto_api_tmpl.ko -> moc_crypto_api_tmpl.ko.3.10
-rw-r--r-- root root 176510 2015-10-30 14:43 moc_crypto_api_tmpl.ko.3.10
lrw-r--r-- root root 2015-10-30 14:43 moc_platform_mod.ko -> moc_platform_mod.ko.3.10
-rw-r--r-- root root 8541 2015-10-30 14:42 moc_platform_mod.ko.3.10
-rw-r--r-- root root 258697 2015-10-30 14:41 texfat.ko
lrw-r--r-- root root 2015-10-30 14:34 wlan.ko -> /system/lib/modules/pronto/pronto_wlan.ko
These are the modules we need to fix / get source for.
#1 core_ctl.ko
#2 crypto_test_mod.ko.3.10
#3 moc_crypto.ko.3.10
#4 moc_crypto.ko.sig.3.10
#5 moc_crypto_api_tmpl.ko.3.10
#6 moc_platform_mod.ko.3.10
#7 texfat.ko
#8 /system/lib/modules/pronto/pronto_wlan.ko
These modules require the following symlinks.
#1 crypto_test_mod.ko -> crypto_test_mod.ko.3.10
#2 moc_crypto.ko -> moc_crypto.ko.3.10
#3 moc_crypto_api_tmpl.ko -> moc_crypto_api_tmpl.ko.3.10
#4 moc_platform_mod.ko -> moc_platform_mod.ko.3.10
#5 wlan.ko -> /system/lib/modules/pronto/pronto_wlan.ko
Who is Who and What is What
This is the prima/pronto wireless net driver.
/system/lib/modules/pronto/pronto_wlan.ko
We will need to get source code for this module to build it.
The Mocana Cryptographic Loadable Kernel Module
crypto_test_mod.ko.3.10
moc_crypto.ko.3.10
moc_crypto.ko.sig.3.10
moc_crypto_api_tmpl.ko.3.10
moc_platform_mod.ko.3.10
http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1903.pdf
We will need to get source code from somewhere.
This I believe is a Qualcomm Module for the MSM8909 Board
core_ctl.ko
We will need to figure this one out.
This Is for large sd card support
texfat.ko
We will need to figure this one out.
So far with our extraversion and localversion settings during compile the original modules still work.
Long term we really want to be able to build theese
Building the Prima WIFI Module.
SEE INSTRUCTIONS ON THE NEXT PAGE
Building the msm_core_ctl module .
Export sched_setscheduler_nocheck() so that external kernel modules can use it.
A) Open ~/android/device/a32e/kernel/sched/core.c in a text editor
Search for do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
It is about line number 4239
add
Code:
EXPORT_SYMBOL(sched_setscheduler_nocheck);
The file should look like this
Code:
return __sched_setscheduler(p, &attr, false);
}
[COLOR="Green"][SIZE="4"]EXPORT_SYMBOL(sched_setscheduler_nocheck);[/SIZE][/COLOR]
static int
do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
Save and close the file.
ADD THE MODULE TO BUILD FILES
B) Open ~/android/device/a32e/drivers/soc/qcom/Kconfig in a text editor
config MSM_CORE_CTL_HELPER
It is about line number 558
add
Code:
config MSM_CORE_CTL
tristate "Core control module"
help
Add support for the Qualcomm core control module
The file should look like this
Code:
config MSM_PACMAN
bool "Enable the Peripheral Access Control Manager (PACMan)"
help
Add support for the Peripheral Access Control Manager (PACMan)
This driver allows reconfiguration of the Bus Access Manager
Low Speed Peripheral (BLSP) ownership.
[COLOR="Green"][SIZE="4"]config MSM_CORE_CTL
tristate "Core control module"
help
Add support for the Qualcomm core control module[/SIZE][/COLOR]
config MSM_CORE_CTL_HELPER
tristate "Core control helper functions for dynamically hotplug CPUs"
help
Provide helper functions for core control driver. Core control
driver dynamicatlly hotplugs CPUs from kernel based on current
system load and state. It also supports limiting min and
max online CPUs from userspace.
Save and close the file.
C) Open ~/android/device/a32e/drivers/soc/qcom/Makefile in a text editor
Search for obj-$(CONFIG_MSM_CORE_CTL_HELPER) += core_ctl_helper.o
It is about line number 62
add
Code:
obj-$(CONFIG_MSM_CORE_CTL) += msm_core_ctl.o
msm_core_ctl-objs := core_ctl_$(ARCH).o
The file should look like this
Code:
obj-$(CONFIG_MSM_PERFORMANCE) += msm_performance.o
[COLOR="Green"]obj-$(CONFIG_MSM_CORE_CTL) += msm_core_ctl.o
msm_core_ctl-objs := core_ctl_$(ARCH).o[/COLOR]
obj-$(CONFIG_MSM_CORE_CTL_HELPER) += core_ctl_helper.o
Save and close the file.
D) Open ~/android/device/a32e/arch/arm/configs/Prima_Big-Country_defconfig in a text editor
Search for CONFIG_MSM_CORE_CTL_HELPER
It is about line number 3471
add
Code:
CONFIG_MSM_CORE_CTL=m
CONFIG_MSM_CORE_CTL_HELPER=y
The file should look like this
Code:
# CONFIG_MSM_SHARED_HEAP_ACCESS is not set
# CONFIG_MSM_SYSTEM_HEALTH_MONITOR is not set
# CONFIG_QCOM_EARLY_RANDOM is not set
# CONFIG_MSM_PACMAN is not set
[COLOR="DarkGreen"]CONFIG_MSM_CORE_CTL=m
CONFIG_MSM_CORE_CTL_HELPER=y[/COLOR]
# CONFIG_MSM_PERFORMANCE is not set
CONFIG_HTC_DEBUG_RIL_PCN0002_DUMP_STACK=y
CONFIG_HTC_DEBUG_RIL_PCN0005_HTC_DUMP_SMSM_LOG=y
CONFIG_HTC_DEBUG_RIL_PCN0006_HTC_DUMP_BAM_DMUX_LOG=y
CONFIG_MEM_SHARE_QMI_SERVICE=y
Save and close the file.
E) DOWNLOAD THE SOURCE FILE.
https://drive.google.com/open?id=0B8jitdIyh2NtNjU3NFBIcU1NY0k
Copy the source to the TREE.
Code:
cp -rf ~/Downloads/core_ctl_arm.o_shipped /android/device/a32e/drivers/soc/qcom/core_ctl_arm.o_shipped
Now Go to the Build Prima Module Section on the next page and follow all instructions.
DE-Compile The Factory DT.img To DTB & DTS
How to Compile The Prima / (" PRONTO ") Wlan Module -->>> IN KERNEL TREE
# 1 ) Get the required Source Code ( DOWNLOAD HERE ) or attached to the DEVDB.
https://drive.google.com/open?id=0B8jitdIyh2NtMzB2a2pNeU1iWDg
#2 ) Add it to our Project & Kernel Source Tree
Code:
mkdir ~/a32e-kernel-build/Qualcom-Vendor-Opensource/
mv ~/Downloads/qualcom-vendor-opensource.zip ~/a32e-kernel-build/Qualcom-Vendor-Opensource/
unzip ~/a32e-kernel-build/Qualcom-Vendor-Opensource/qualcom-vendor-opensource.zip -d ~/a32e-kernel-build/Qualcom-Vendor-Opensource/
rm -rf ~/a32e-kernel-build/Qualcom-Vendor-Opensource/qualcom-vendor-opensource.zip
cp -rf ~/a32e-kernel-build/Qualcom-Vendor-Opensource/vendor/qcom/opensource/wlan/prima ~/android/device/a32e/drivers/staging/prima
#2 ) Configure The Module to build in the Kernel Source Tree
A) Open in a text Editor ~/android/device/a32e/drivers/staging/prima/Kconfig
Add to the bottom of the file:
Code:
[COLOR="SeaGreen"][SIZE="4"]config WLAN_OFFLOAD_PACKETS
bool "Enable offload packets feature"
default n[/SIZE][/COLOR]
[COLOR="SeaGreen"][SIZE="4"]config QCOM_TDLS
bool "Enable TDLS (Tunnel Direct Link Setup) feature"
default n[/SIZE][/COLOR]
Or download my Kconfig file
https://drive.google.com/open?id=0B8jitdIyh2Ntc0p6UFNlTGxJNkU
Copy the file to the tree. ( ONLY IF YOU DOWNLOADED IT )
Code:
mv ~/Downloads/Kconfig ~/android/device/a32e/drivers/staging/prima/Kconfig
B) Open in a text Editor ~/android/device/a32e/drivers/staging/Kconfig
Add to the bottom of the file:
Code:
[COLOR="SeaGreen"][SIZE="4"]source "drivers/staging/prima/Kconfig"[/SIZE][/COLOR]
C ) Open in a text Editor ~/android/device/a32e/drivers/staging/Makefile
Add to the bottom of the file:
Code:
[COLOR="SeaGreen"][SIZE="4"]
obj-$(CONFIG_PRIMA_WLAN) += prima/
obj-$(CONFIG_PRONTO_WLAN) += prima/
[/SIZE][/COLOR]
#4 ) Edit the Big-Country_defconfig File
I have made several Changes - USE THIS DOWNLOAD for now.
https://drive.google.com/open?id=0B8jitdIyh2NtZ3VtTTV6Z3dhb0E
Copy the new config to the tree
Code:
cp ~/Downloads/Prima_Big-Country_defconfig ~/android/device/a32e/arch/arm/configs/Prima_Big-Country_defconfig
#4 ) Compile the Kernel and it will build the wlan.ko
Code:
[SIZE="4"][COLOR="DarkGreen"]cd
cd ~/android/device/a32e/
export TOP=~/android/Toolchains/
export PATH=$TOP/prebuilts/arm-eabi-4.8/bin:$PATH
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=~/android/Toolchains/prebuilts/arm-eabi-4.8/bin/arm-eabi-
make clean
make mrproper
make Prima_Big-Country_defconfig
make prepare
make all -j8
make modules[/COLOR][/SIZE]
You Should see this output.
[email protected]:~/android/device/a32e$ make modules
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
Building modules, stage 2.
MODPOST 26 modules
Now we have 26 modules instead of 24.
A new wlan.ko which will get renamed to pronto_wlan.ko.
We also have the WCNSS file for the wlan.
Code:
[SIZE="4"][COLOR="Blue"]
~/android/device/a32e/drivers/staging/prima/wlan.ko
~/android/device/a32e/drivers/staging/prima/firmware_bin/WCNSS_cfg.dat
~/bigcountry/android/device/a32e/drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini
~/bigcountry/android/device/a32e/drivers/staging/prima/firmware_bin/WCNSS_qcom_wlan_nv.bin
~/android/device/a32e/drivers/bluetooth/bluetooth-power.ko
[/COLOR][/SIZE]
Now we are ready to load the new Kernel and Modules
load the new Kernel
Code:
sudo cp -r ~/a32e-kernel-build/Device-Files/Boot/ramdisk ~/a32e-kernel-build/Tools/AIK-Linux/ramdisk
Code:
sudo cp -r ~/a32e-kernel-build/Device-Files/Boot/split_img ~/a32e-kernel-build/Tools/AIK-Linux/split_img
Code:
sudo cp -f ~/android/device/a32e/arch/arm/boot/zImage ~/a32e-kernel-build/Tools/AIK-Linux/split_img/Boot.img-zImage
Code:
cd ~/a32e-kernel-build/Tools/AIK-Linux
sudo ./repackimg.sh
sudo cp -f ~/a32e-kernel-build/Tools/AIK-Linux/image-new.img ~/a32e-kernel-build/Device-Files/New-Boot/image-new.img
adb reboot download
sleep 10s
cd ~/a32e-kernel-build/Device-Files/New-Boot/
fastboot flash boot image-new.img
echo ""
echo ""
echo "Finished Flashing Kernel"
read -p "Press [Enter] to Reboot..."
fastboot reboot
Clean out our project directory.
Code:
rm -f ~/a32e-kernel-build/Device-Files/modules/*.ko
Copy compiled modules to our project directory.
Code:
cp ~/android/device/a32e/drivers/staging/prima/wlan.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/staging/prima/firmware_bin/WCNSS_cfg.dat ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/staging/prima/firmware_bin/WCNSS_qcom_wlan_nv.bin ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/bluetooth/bluetooth-power.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/crypto/ansi_cprng.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/input/evbug.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/spi/spidev.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/fs/ecryptfs/ecryptfs.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/gud/mcDrvModule.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/gud/mcKernelApi.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/arch/arm/mach-msm/dma_test.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/input/misc/gpio_axis.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/usb/host/ice40-hcd.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/input/misc/gpio_event.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/input/misc/gpio_input.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/input/misc/gpio_matrix.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/input/misc/gpio_output.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_oobtest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_pagetest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_readtest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_speedtest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_stresstest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_nandbiterrs.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_nandecctest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_subpagetest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/mtd/tests/mtd_torturetest.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/media/radio/radio-iris-transport.ko ~/a32e-kernel-build/Device-Files/modules/
cp ~/android/device/a32e/drivers/platform/msm/msm_bus/msm-buspm-dev.ko ~/a32e-kernel-build/Device-Files/modules/
Clean the sdcard temporary directory.
Code:
adb shell "su -c 'rm -f /sdcard2/modules/*.ko'"
Copy the new modules to the sd card temp directory.
Code:
adb push ~/a32e-kernel-build/Device-Files/modules/wlan.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/WCNSS_cfg.dat /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/WCNSS_qcom_cfg.ini /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/WCNSS_qcom_wlan_nv.bin /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/bluetooth-power.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/ansi_cprng.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/dma_test.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/ecryptfs.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/evbug.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/gpio_axis.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/gpio_event.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/gpio_input.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/gpio_matrix.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/gpio_output.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/ice40-hcd.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mcDrvModule.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mcKernelApi.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/msm-buspm-dev.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_nandbiterrs.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_nandecctest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_oobtest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_pagetest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_readtest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_speedtest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_stresstest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_subpagetest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/mtd_torturetest.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/radio-iris-transport.ko /sdcard2/modules/
adb push ~/a32e-kernel-build/Device-Files/modules/spidev.ko /sdcard2/modules/
NOW connect the device and start a shell
Code:
adb shell
su
Re-Mount System as Read Write.
Code:
mount -o rw,remount,rw /system
Remove the existing modules from the device .
Code:
rm -rf /system/lib/modules/wlan.ko
rm -rf /system/lib/modules/pronto/pronto_wlan.ko
rm -rf /system/etc/firmware/wlan/prima/WCNSS_cfg.dat
rm -rf /system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini
rm -rf /system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
rm -rf /system/lib/modules/bluetooth-power.ko
rm -rf /system/lib/modules/ansi_cprng.ko
rm -rf /system/lib/modules/dma_test.ko
rm -rf /system/lib/modules/ecryptfs.ko
rm -rf /system/lib/modules/evbug.ko
rm -rf /system/lib/modules/gpio_axis.ko
rm -rf /system/lib/modules/gpio_event.ko
rm -rf /system/lib/modules/gpio_input.ko
rm -rf /system/lib/modules/gpio_matrix.ko
rm -rf /system/lib/modules/gpio_output.ko
rm -rf /system/lib/modules/ice40-hcd.ko
rm -rf /system/lib/modules/mcDrvModule.ko
rm -rf /system/lib/modules/mcKernelApi.ko
rm -rf /system/lib/modules/msm-buspm-dev.ko
rm -rf /system/lib/modules/mtd_nandbiterrs.ko
rm -rf /system/lib/modules/mtd_nandecctest.ko
rm -rf /system/lib/modules/mtd_oobtest.ko
rm -rf /system/lib/modules/mtd_pagetest.ko
rm -rf /system/lib/modules/mtd_readtest.ko
rm -rf /system/lib/modules/mtd_speedtest.ko
rm -rf /system/lib/modules/mtd_stresstest.ko
rm -rf /system/lib/modules/mtd_subpagetest.ko
rm -rf /system/lib/modules/mtd_torturetest.ko
rm -rf /system/lib/modules/radio-iris-transport.ko
rm -rf /system/lib/modules/spidev.ko
Copy the New Compiled Modules to the device .
Code:
cp -rf /sdcard2/modules/wlan.ko /system/lib/modules/pronto/pronto_wlan.ko
cp -rf /sdcard2/modules/WCNSS_cfg.dat /system/etc/firmware/wlan/prima/
cp -rf /sdcard2/modules/WCNSS_qcom_cfg.ini /system/etc/firmware/wlan/prima/
cp -rf /sdcard2/modules/WCNSS_qcom_wlan_nv.bin /system/etc/firmware/wlan/prima/
cp -rf /sdcard2/modules/bluetooth-power.ko /system/lib/modules/
cp -rf /sdcard2/modules/ansi_cprng.ko /system/lib/modules
cp -rf /sdcard2/modules/dma_test.ko /system/lib/modules
cp -rf /sdcard2/modules/ecryptfs.ko /system/lib/modules
cp -rf /sdcard2/modules/evbug.ko /system/lib/modules
cp -rf /sdcard2/modules/gpio_axis.ko /system/lib/modules
cp -rf /sdcard2/modules/gpio_event.ko /system/lib/modules
cp -rf /sdcard2/modules/gpio_input.ko /system/lib/modules
cp -rf /sdcard2/modules/gpio_matrix.ko /system/lib/modules
cp -rf /sdcard2/modules/gpio_output.ko /system/lib/modules
cp -rf /sdcard2/modules/ice40-hcd.ko /system/lib/modules
cp -rf /sdcard2/modules/mcDrvModule.ko /system/lib/modules
cp -rf /sdcard2/modules/mcKernelApi.ko /system/lib/modules
cp -rf /sdcard2/modules/msm-buspm-dev.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_nandbiterrs.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_nandecctest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_oobtest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_pagetest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_readtest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_speedtest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_stresstest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_subpagetest.ko /system/lib/modules
cp -rf /sdcard2/modules/mtd_torturetest.ko /system/lib/modules
cp -rf /sdcard2/modules/radio-iris-transport.ko /system/lib/modules
cp -rf /sdcard2/modules/spidev.ko /system/lib/modules
Create the pronto_wlan.ko / wlan.ko symlink .
Code:
ln -s /system/lib/modules/pronto/pronto_wlan.ko /system/lib/modules/wlan.ko
set the permissions for all the new modules.
Code:
chmod 0644 /system/lib/modules/wlan.ko
chmod 0644 /system/lib/modules/pronto/pronto_wlan.ko
chmod 0644 /system/etc/firmware/wlan/prima/WCNSS_cfg.dat
chmod 0644 /system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini
chmod 0644 /system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
chmod 0644 /system/lib/modules/bluetooth-power.ko
chmod 0644 /system/lib/modules/ansi_cprng.ko
chmod 0644 /system/lib/modules/dma_test.ko
chmod 0644 /system/lib/modules/ecryptfs.ko
chmod 0644 /system/lib/modules/evbug.ko
chmod 0644 /system/lib/modules/gpio_axis.ko
chmod 0644 /system/lib/modules/gpio_event.ko
chmod 0644 /system/lib/modules/gpio_input.ko
chmod 0644 /system/lib/modules/gpio_matrix.ko
chmod 0644 /system/lib/modules/gpio_output.ko
chmod 0644 /system/lib/modules/ice40-hcd.ko
chmod 0644 /system/lib/modules/mcDrvModule.ko
chmod 0644 /system/lib/modules/mcKernelApi.ko
chmod 0644 /system/lib/modules/msm-buspm-dev.ko
chmod 0644 /system/lib/modules/mtd_nandbiterrs.ko
chmod 0644 /system/lib/modules/mtd_nandecctest.ko
chmod 0644 /system/lib/modules/mtd_oobtest.ko
chmod 0644 /system/lib/modules/mtd_pagetest.ko
chmod 0644 /system/lib/modules/mtd_readtest.ko
chmod 0644 /system/lib/modules/mtd_speedtest.ko
chmod 0644 /system/lib/modules/mtd_stresstest.ko
chmod 0644 /system/lib/modules/mtd_subpagetest.ko
chmod 0644 /system/lib/modules/mtd_torturetest.ko
chmod 0644 /system/lib/modules/radio-iris-transport.ko
chmod 0644 /system/lib/modules/spidev.ko
RE-Boot and run your new kernel and modules with a smile.
Customizing the Kernel
Changing and Customizing The Kernel
SUCCESS !! ( Build the Prima / Pronto Wlan Module)
Fix ADD the DTB Blob to the Source
reserved space
I'm so glad somone is doing this I've been wanting a new kernel for a while and I think this might help make a path to new roms
This looks great. Can't wait to see where this goes. What can I do to help?
@zixxorb
You can run through with all of this and get the kernel running on your device.
Right now im working on getting the missing modules to build.
So you can work on that to.
The modules that are generated during the compile function properly.
Ok, so I'm more of a noob to doing anything with kernels, idk what I need to do exactly. Plus I'm already on 6.0 (this is my main phone)
The Most Valuable Document Ever
This is exactly what we need to answer some questions.
Authored by Qualcomm and one of the hardest things to find.
Make sure to copy this wile you can.
It's practically Top Secret.
https://github.com/dante198406/Qual...0-NR964-4_C_MSM8909_LA_SW_User_Manual_SPD.pdf
Get it wile you can !!
Just a general update.
I have updated the modules install section.
It now includes the instructions for installing the new modules.
The modules have been tested and seem to operate without issues.
Will this work for the sprint variant?
I'm a noob so pls permit me if this question sounds foolish. All through the tutorial, it seems this kernel is for the Metro PCs. Will it work for the sprint variant of 626s?
This tutorial is based off of the Metro-Pcs version.
The HTC-DEV site has separate source code for each device carrier.
You would follow everything exactly except.
1 ) From the HTC-DEV site download the source code for your specific carrier.
For sprint download sprint.
For t-mobile download t-mobile.
Set the device filter on the website to be desire626s
and you will get this.
2 ) in the section #2 Setup the Kernel Source
There are commands for unzipping the source file.
You will need to change the filename in the command to match the filename you downloaded.
After the first untar / unpack you will need to get the kernel filename.
Change that filename in the commands as well.
3) When you edit the version info.
Open up the Big-Country_defconfig
It is in the folder ~/android/device/a32e/arch/arm/configs
Open it with G-Edit or whatever text editor you use.
Search for CONFIG_LOCALVERSION=
and change it to CONFIG_LOCALVERSION="-g26c2269"
CHANGE
CONFIG_LOCALVERSION="-g26c2269"
CONFIG_LOCALVERSION="-your device version"
You can get the version as i showed you in previous post.
4) The rest is all the same.
AS far as the kernel and modules that have been uploaded here, they are for the Metro Pcs Version. ( And Lollipop NOT Marshmallow)
I will build the others later when i finish more of this project.
ALSO YOU CAN USE THIS TUTORIAL TO BUILD THE KERNEL FOR ANY DEVICE.
Things will change here and there but generally speaking all of the steps you need to follow are the same.
Hi
I am trying to install root on Android 7.1.1 (from geektillithertz.com, rom: and7_1-tablet-23012017.img) on Raspberry Pi 3 B.
When I manually execute the following commands via ADB, the system does not start after reboot.
Code:
adb shell "mount -o rw,remount /system"
adb push common/Superuser.apk /system/app/SuperSU/SuperSU.apk
adb shell chmod 0644 /system/app/SuperSU/SuperSU.apk
adb shell chcon u:object_r:system_file:s0 /system/app/SuperSU/SuperSU.apk
adb push common/install-recovery.sh /system/etc/install-recovery.sh
adb shell chmod 0755 /system/etc/install-recovery.sh
adb shell chcon u:object_r:toolbox_exec:s0 /system/etc/install-recovery.sh
adb push armv7/su /system/xbin/daemonsu
adb shell chmod 0755 /system/xbin/daemonsu
adb shell chcon u:object_r:system_file:s0 /system/xbin/daemonsu
adb push armv7/su /system/xbin/sugote
adb shell chmod 0755 /system/xbin/sugote
adb shell chcon u:object_r:zygote_exec:s0 /system/xbin/sugote
adb push armv7/supolicy /system/xbin/supolicy
adb shell chmod 0755 /system/xbin/supolicy
adb shell chcon u:object_r:system_file:s0 /system/xbin/supolicy
adb push armv7/libsupol.so /system/lib/libsupol.so
adb shell chmod 0755 /system/lib/libsupol.so
adb shell chcon u:object_r:system_file:s0 /system/lib/libsupol.so
adb shell touch /system/etc/.installed_su_daemon
adb shell chmod 0644 /system/etc/.installed_su_daemon
adb shell chcon u:object_r:system_file:s0 /system/etc/.installed_su_daemon
adb shell cp /system/bin/sh /system/xbin/sugote-mksh
adb shell chmod 0755 /system/xbin/sugote-mksh
adb shell chcon u:object_r:system_file:s0 /system/xbin/sugote-mksh
adb shell cp /system/bin/app_process32 /system/bin/app_process32_original
adb shell chmod 0755 /system/bin/app_process32_original
adb shell chcon u:object_r:zygote_exec:s0 /system/bin/app_process32_original
adb shell mv /system/bin/app_process /system/bin/app_process_original
adb shell chmod 0755 /system/bin/app_process_original
adb shell chcon u:object_r:zygote_exec:s0 /system/bin/app_process_original
adb shell mv /system/bin/app_process32 /system/bin/app_process_init
adb shell chmod 0755 /system/bin/app_process_init
adb shell chcon u:object_r:system_file:s0 /system/bin/app_process_init
adb shell ln -s /system/xbin/daemonsu /system/bin/app_process
adb shell ln -s /system/xbin/daemonsu /system/bin/app_process32
adb shell ln -s /system/etc/install-recovery.sh /system/bin/install-recovery.sh
Stuck on the screen with animation "android."
When I restore the /system/app_process file to the original version, the system starts (but with no root).
I tried SuperSU 2.76, 2.78, 2.79 and 2.82.
Unfortunately, I have always had the same effect.
I also tried Android Marshmallow (andrpi3-20160626.img) but it also ended with a bootloop.
When I manually run su daemon through ADB, root is working fine, but it is not permanent (after reboot there is no root).
What to do to make the system start with root?