USB Debugging ON by default? - Nexus 7 Developer Discussion [Developers Only]

Can anyone tell me how to have USB Debugging OFF by default in my ROM?
http://forum.xda-developers.com/showthread.php?t=2533035
It is built off of stock google using dsixda's kitchen and system.ext4.tar and boot.img only...

bshiznit said:
Can anyone tell me how to have USB Debugging OFF by default in my ROM?
http://forum.xda-developers.com/showthread.php?t=2533035
It is built off of stock google using dsixda's kitchen and system.ext4.tar and boot.img only...
Click to expand...
Click to collapse
Got this from dsixda and it helped! It is a kernel thing:
I think it's in the default.prop in the boot.img? It is the parameter ro.debuggable or something like that. Just google that parameter to see more info.

Related

Froyo (2.2) for HUAWEI U8120 [based on AOSP] (under development)

Froyo 2.2.2 port for Huawei U8120.
Maybe it will work on Huawei U8100/U8110 series, but for now it is focused on U8120.
So I dont know what behavior has on U8100 etc.
I must say a big thanks to Tom_G for his awesome work, especially for his froyo port on pulse.Without his work and his posts
on modaco forum, I will not be able to accomplish this.
kalt kaffe's 2.6.29 kernel.
Android 2.2.2 from aosp with some codeaurora changes.
JIT enabled.
Working:
RIL
Audio
GPS
Bluetooth
Wifi
SD card
Sensors
TSCalibration from codeaurora(still the app needs some improvements.For now use a stick or pen when you calibrate the screen)
Not working/bugs:
camera
broken layout on dialer
sdcard cannot be mounted in pc
Its still under development.This is not a finished rom and its not fully tested.
Probably it has problems that I have not yet encountered.So I would not suggest you to try it,
except if you have some experience and you want to help.
I have tried to make it as plain and simple as it gets.No google apps, no bootanimation etc.When all bugs are fixed then I will include them or I will post
my rom.But there are guys that are more expert in rom cooking than me.
Here is a zip with already compiled image files if someone wants to try it and post any bugs/fixes that have found.I have also uploaded here gapps if someone wants them(gmail,market etc)
Code: https://github.com/tas0s
Device tree: https://github.com/tas0s/android_device_huawei_u8120
Try it at your own risk.
Im not responsible for any damage that this may cause.
v.1 initial build
How to build it:
- Install git and gpg (gnupg).
- Download repo - http://source.android.com/source/git-repo.html
$ mkdir android
$ cd android
$ repo init -u https://github.com/tas0s/platform_manifest.git
$ repo sync
- Extract necessary binaries
Some compiled code from the official eclair roms is re-used in froyo. Because some of this code is not opensources I cannot included in the git repository.
The files can be extracted from any u8120 eclair rom.
Place the rom zip in the android directory an rename it to u8120_update.zip
navigate to /device/huawei/u8120:
cd device/huawei/u8120
Then execute from the android directory
$sh device/huawei/u8120/unzip_files.sh
else you can extract them from a working u8120 phone with an eclair rom (check that adb is enabled)
$device/huawei/u8120/extract_files.sh
- Building the system
Once thats done you can start compiling.
Follow the aosp instructions on setting up the build environment. - http://source.android.com/source/download.html
After the environment is setup.
$ cd android
$ source build/envsetup.sh
$ lunch
Select the device u8120.
$ make
I recommend using multiple threads for make if you have a multi core/processor system. By default make will use
1 thread (-j1), set it to use 2*NumberOfCPUsAvailable (so on my dual core -j4). Reducing the number of threads used will reduce the impact on
system performance while the build is running.
The output will be image files in {buildroot}/out/target/product/u8120/. Flash with fastboot.
$ fastboot flash boot out/target/product/u8120/boot.img
$ fastboot flash system out/target/product/u8120/system.img
$ fastboot flash userdata out/target/product/u8120/userdata.img
$ fastboot reboot
For some reason the generated boot.img fails to boot.Maybe I have something wrong about kernel base etc in the BoardConfig.mk.
For now just use the ramdisk.img and the provided kernel and pack it with dsixda's kitchen or with the huawei-u8100 tools that have been posted on the forum.
Then just use fastboot as stated above.
for the future
thnx for the gifts up to it tomorrow
A question about camera problem, only video or all features?
bitye said:
A question about camera problem, only video or all features?
Click to expand...
Click to collapse
The camera fails after a few secs.When an image appears in the preview window.
I have read that the the way that android handles camera has changed in froyo.In cyanogen they are using a libcamera2 (just libcamera with a few changes I think so it can work with the new framework).
As you can see in the BoardConfig.mk I have already include the libcamera2 statements but not the lib
When I manage to get some free time I would try the libcamera2.Maybe until the end of the week or sooner.
Ρε πατριδα αξιζει η rom ή οχι;
tas0s said:
For some reason the generated boot.img fails to boot.Maybe I have something wrong about kernel base etc in the BoardConfig.mk.
For now just use the ramdisk.img and the provided kernel and pack it with dsixda's kitchen or with the huawei-u8100 tools that have been posted on the forum.
Then just use fastboot as stated above.
Click to expand...
Click to collapse
There's a little fix using bootbuilder for U8120, see this post:
http://android.modaco.com/content/t...l-r1-bootbuilder-for-pulsemini-alpha-release/
In the 6th reply you can find the info you could need it
Good luck!
Hi can you tell me on wich kernel it runs?
the 2.6.32 or2.6.29?
and if wiifi is completly fixed no crashes sleep works mac adress?
thanks
calibration fixed at this repo?
larissamafia said:
Ρε πατριδα αξιζει η rom ή οχι;
Click to expand...
Click to collapse
Πατριωτάκι δεν είναι για καθημερινή χρήση ακόμα.Γιαυτό δεν έχω βγάλει και έτοιμη rom.
@Shiftok:
The calibration is integrated in the framework etc but it has some small issues.
As I say in the first post, it needs improvement.
@Cedric123:
Im using 2.6.29 kernel.The wifi works normally.If I remember right and MAC address.
tas0s said:
@Shiftok:
The calibration is integrated in the framework etc but it has some small issues.
As I say in the first post, it needs improvement.
@Cedric123:
Im using 2.6.29 kernel.The wifi works normally.If I remember right and MAC address.
Click to expand...
Click to collapse
ah okey
does this work?
i extract boot.img
put my own zImage in it
repack boot.img
start Phone?
i rly want my own kernel in the ROM with my overclock funtion adn all my +kalt+kaffes optimizations
cedric123 said:
ah okey
does this work?
i extract boot.img
put my own zImage in it
repack boot.img
start Phone?
i rly want my own kernel in the ROM with my overclock funtion adn all my +kalt+kaffes optimizations
Click to expand...
Click to collapse
The kernel Im using is kalt kaffe's kernel.So I think that if you just replace the kernel and the kernel modules in /system/lib/modules you will be fine.
Im uploading now a zip with the compiled images.
It has the problems I mention in the first post etc.
Just an observation.If the calibration isnt correct the screen is always on landscape mode Propably because it gets wrong screen dimensions.So if you see something like that, calibrate your screen with the TSCalibration app.
When im done with the camera, I will fix the calibration bugs.
Hi. Im testing your rom.
I cannot mount the sdcard on computer. when i press to activate usb storage it does nothing in computer.
EDIT - i cant install anything because i dont have a file explorer to see the sdcard files. can you please add one or make an .img with the stock apps
joilaroi said:
Hi. Im testing your rom.
I cannot mount the sdcard on computer. when i press to activate usb storage it does nothing in computer.
EDIT - i cant install anything because i dont have a file explorer to see the sdcard files. can you please add one or make an .img with the stock apps
Click to expand...
Click to collapse
Thank you very much for the feedback joilaroi.I have updated the first post with the sdcard bug.I tried myself and you are right.I will try to fix it.
As I know the stock android froyo hasnt any file manager/explorer.Maybe we can get it from cyanogens.
For now, you can do this.Flash the gapps update that I have in the first post,setup market etc and download a file manager from the market(ex.astro file explorer).
tas0s said:
Thank you very much for the feedback joilaroi.I have updated the first post with the sdcard bug.I tried myself and you are right.I will try to fix it.
As I know the stock android froyo hasnt any file manager/explorer.Maybe we can get it from cyanogens.
For now, you can do this.Flash the gapps update that I have in the first post,setup market etc and download a file manager from the market(ex.astro file explorer).
Click to expand...
Click to collapse
thanks. its what i am doing. if i find anything i will give feedback
EDIT - Cant install superuser and have permissions. it downloads su-2.3.1-bin-signed.zip to sdcard but its corrupted. maybe its better if its already on .img
Im getting more MFLOPS with 633Mhz in this rom than with 691Mhz with the other kernel. its now with 4.45 MFLOPS vs 4.1MFLOPS. Nice
Do you know where i can find su-2.3.1-bin-signed.zip?
Ubuntu 10.10 x64 under W7 VMWare will be enought for compile?
PC: C2D [email protected],2GHZ 8GB RAM
Laptop: Lenovo T410 i5 vPro 2,4GHz Quad Core 4GB RAM
I think yes

[REF][DEV]How to unpack / repack normalboot.img

Hi all, like you know our phone is different from other cause - to flash the kernel - you need to pack it with the ramdisk files and flash it to the phone as normalboot.img.
Some people want try to build a custom kernel but after they obtain the zImage file they are not able to flash it to the phone.
So here is the "HOWTO" to explain what you have to do for unpack/repack normalboot.img.
You need Linux to do this (also a visrtualized distro).
1- download and unzip the attached file;
2- place the normalboot.img file into the tools folder;
3- go in the root folder and do:
Code:
./unpack-all.sh
4- now you have succesfull unpacked your file. You can find the zImage file in the "kernel" folder and the ramdisk files in the "ramdisk" folder.
Basically now you can do all that you want. If you have a custom kernel overwrite the zImage file with your. If you want edit the ramdisk go in the folder called "ramdisk" and mod what you want.
When you finished do:
Code:
./create_boot.img.sh
Now you will find the .tar file ready to be flashed on your phone with odin.
If you are asking yourself "where can i find normalboot.img file?" the answers are:
1- into the PDA.tar of your Firmware;
2- dump it from the phone with:
Code:
dd if=/dev/block/bml7 of=/sdcard/normalboot.img
Bye
Thanks Buddy..
BTW your posts are always very crisp and enlightening. I appreciate.
regards
I tried the script, and it seems to work. Seems, because it unpacked and repacked fine, and I replaced the kernel with a self compiled one. But, to make it short, the phone didn't boot. It was stuck on the "Galaxy S"-screen.
Any ideas, why a kernel which compiled without errors does not boot? Skin, did you change specific settings for compiling your OC-kernel, besides the overclocking adjustments?
XDA_Bam said:
I tried the script, and it seems to work. Seems, because it unpacked and repacked fine, and I replaced the kernel with a self compiled one. But, to make it short, the phone didn't boot. It was stuck on the "Galaxy S"-screen.
Any ideas, why a kernel which compiled without errors does not boot? Skin, did you change specific settings for compiling your OC-kernel, besides the overclocking adjustments?
Click to expand...
Click to collapse
I think that your kernel version doesn't match with the modules... so in your Makefile change the version name to match it with the stock.... so you have to change the version from 2.6.35.7 to 2.6.35.7-CL..... (don't remember if the number are correct)
Thanks, Skin! That did the trick. Now running self compiled vanilla kernel. Interestingly, it is about 200kb bigger than the stock kernel.
EDIT: Obviously, the repack-script is running fine.
other way to do dis is by using kitchen ..
js rename ur normalboot.img to boot.img den replace the boot.img in ur working directory ..
in the kitchen advanced options , unpack/repack boot.img ...
u ll get the same output
this one is easier as we dont need to remember the commands
XDA_Bam said:
Thanks, Skin! That did the trick. Now running self compiled vanilla kernel. Interestingly, it is about 200kb bigger than the stock kernel.
EDIT: Obviously, the repack-script is running fine.
Click to expand...
Click to collapse
To make it smaller you can use the Buildscript used in the froyo version of kernel source... Amit told me it this morning... and it worked greatly
bajju123 said:
other way to do dis is by using kitchen ..
js rename ur normalboot.img to boot.img den replace the boot.img in ur working directory ..
in the kitchen advanced options , unpack/repack boot.img ...
u ll get the same output
this one is easier as we dont need to remember the commands
Click to expand...
Click to collapse
Commands? You can do it with two mouse click!
Skin1980 said:
To make it smaller you can use the Buildscript used in the froyo version of kernel source... Amit told me it this morning... and it worked greatly
Click to expand...
Click to collapse
Yes, works. But my kernel stays at 3.3MB... still 0.2 larger than the stock one.
By the way: Had a SOD with the self-compiled kernel. Screen didn't wake up from standby, but soft buttons were lid. Guess the info from Samsung that closed source software is missing from the package is correct
i still have sod also with the new compilation mod.... by me sammy is missing something or simply the source are not updated like i supposed....
thanks....this rescued me
---------- Post added at 07:50 AM ---------- Previous post was at 07:20 AM ----------
i have a silly doubt
cud i download the linux kernel v3 from korg and compile it for i9003?or do i have to stick with 2.6.35?
Maybe it would be possible. The main problem are the drivers - they would most likely require major changes. But even CyanogenMod is running 2.6.37 and nothing more recent.
If you want to use a newer kernel, you could try that one, or - to minimize problems - use the 2.6.35.14 bugfix release. This seems most reasonable to me.
XDA_Bam said:
Maybe it would be possible. The main problem are the drivers - they would most likely require major changes. But even CyanogenMod is running 2.6.37 and nothing more recent.
If you want to use a newer kernel, you could try that one, or - to minimize problems - use the 2.6.35.14 bugfix release. This seems most reasonable to me.
Click to expand...
Click to collapse
shoot........404 not found
Those hackers...................
you are our phone's God!
Sent from my GT-I9003 using xda premium
i need help, i try to make stock normalboot.img tar with ur files.
but there is a big bug
phono booting but stay at "samsung" screen.
someone have this bug like me and u says that "chance ur kernel version in make boot file" but i cant find how chance kernel version in make boot file. how can i?
ROM: 2.3.6 JVKPB TUR ROM (galaxy sl i9003)
please help...
Skin1980 said:
Hi all, like you know our phone is different from other cause - to flash the kernel - you need to pack it with the ramdisk files and flash it to the phone as normalboot.img.
Some people want try to build a custom kernel but after they obtain the zImage file they are not able to flash it to the phone.
So here is the "HOWTO" to explain what you have to do for unpack/repack normalboot.img.
You need Linux to do this (also a visrtualized distro).
1- download and unzip the attached file;
2- place the normalboot.img file into the tools folder;
3- go in the root folder and do:
Code:
./unpack-all.sh
4- now you have succesfull unpacked your file. You can find the zImage file in the "kernel" folder and the ramdisk files in the "ramdisk" folder.
Basically now you can do all that you want. If you have a custom kernel overwrite the zImage file with your. If you want edit the ramdisk go in the folder called "ramdisk" and mod what you want.
When you finished do:
Code:
./create_boot.img.sh
Now you will find the .tar file ready to be flashed on your phone with odin.
If you are asking yourself "where can i find normalboot.img file?" the answers are:
1- into the PDA.tar of your Firmware;
2- dump it from the phone with:
Code:
dd if=/dev/block/bml7 of=/sdcard/normalboot.img
Bye
Click to expand...
Click to collapse
Wow you are great !!! Loved it .. so easy .... made my dead phone alive .. you are the best \m/

Flash Kernel

i have the problem that my sound is to low. i flashed feacore kernel but is not better. i read that a vitaly kernel is better for more higher sound but i dont understand how i install it. There a wrote :
To activate it you need to edit the build.prop file with this :
Code:
debug.gr.swapinterval=0 to build.prop
What the guys mean? Can anyone write a step by step list how i can flash kernel on my KQE stockrom? it seemd that is not the same way like a feacore kernel flash
HHHHEEEEELLLLLPPPPP!!!!!!
asc1977 said:
i have the problem that my sound is to low. i flashed feacore kernel but is not better. i read that a vitaly kernel is better for more higher sound but i dont understand how i install it. There a wrote :
To activate it you need to edit the build.prop file with this :
Code:
debug.gr.swapinterval=0 to build.prop
What the guys mean? Can anyone write a step by step list how i can flash kernel on my KQE stockrom? it seemd that is not the same way like a feacore kernel flash
HHHHEEEEELLLLLPPPPP!!!!!!
Click to expand...
Click to collapse
Ask in your device forum. Anyway for build prop, it is at the system folder and a text file. Find the line that you need to edit and edit it. It its not there, add it.
Sent from my SGH-T959 using xda app-developers app
or has anyone a tip for a kernel which change volume higher which i can flash with odin or cwm or something else. a kernel without change thing in any txt files, only flashing
Goto /system/build.prop and add the line with a text editor. Reboot. That's it.
m_atze said:
Goto /system/build.prop and add the line with a text editor. Reboot. That's it.
Click to expand...
Click to collapse
must i change the kernel before or after this or can i do this anyway
asc1977 said:
i have the problem that my sound is to low. i flashed feacore kernel but is not better. i read that a vitaly kernel is better for more higher sound but i dont understand how i install it. There a wrote :
To activate it you need to edit the build.prop file with this :
Code:
debug.gr.swapinterval=0 to build.prop
What the guys mean? Can anyone write a step by step list how i can flash kernel on my KQE stockrom? it seemd that is not the same way like a feacore kernel flash
HHHHEEEEELLLLLPPPPP!!!!!!
Click to expand...
Click to collapse
to edit build.prop use Notepad++ or a tool from Market to edit it on your phone directly i.e. build.prop Editor then restart phone
usually to flash a kernel you have to enter download/ fastboot mode by a key combination at phone startup and flash it by
Code:
fastboot flash boot boot.img
better is to test the kernel before by this
Code:
fastboot boot boot.img
by this way in case of some problems just restart/remove battery and you revert to previous status (it means the new kernel will boot but never flashes on phone memory)
to work this you need Android SDK and USB drivers
remember : never flash a kernel not made for your phone because of a possible hardware failure
better is to get informed before to do that
ruscan.calin said:
to edit build.prop use Notepad++ or a tool from Market to edit it on your phone directly i.e. build.prop Editor then restart phone
usually to flash a kernel you have to enter download/ fastboot mode by a key combination at phone startup and flash it by
Code:
fastboot flash boot boot.img
better is to test the kernel before by this
Code:
fastboot boot boot.img
by this way in case of some problems just restart/remove battery and you revert to previous status (it means the new kernel will boot but never flashes on phone memory)
to work this you need Android SDK and USB drivers
remember : never flash a kernel not made for your phone because of a possible hardware failure
better is to get informed before to do that
Click to expand...
Click to collapse
what is please the fastboot. i know recovery modus and download modus and what i have to do with this codes????
asc1977 said:
what is please the fastboot. i know recovery modus and download modus and what i have to do with this codes????
Click to expand...
Click to collapse
well take a look here for a tutorial but do not flash anything at this time spend some days searching/ reading about these problems the secret word is search this site has good tutorials for almost everything !
ruscan.calin said:
well take a look here for a tutorial but do not flash anything at this time spend some days searching/ reading about these problems the secret word is search this site has good tutorials for almost everything !
Click to expand...
Click to collapse
ok i taste it and hope i can
So after a lot readings i flashed skyhigh Kernel 1.4d. My Volume is perfekt loud and the System runs :thumbup:
Sent from my GT-I9001 using xda app-developers app
thx for the tip
Has someone a tip for a louder kernel like skyhigh? Its loud but i want louder the sound is good but in navi it can be louder
Sent from my GT-I9001 using xda app-developers app

How To install a kernel you built yourself

How do you install a kernel that you built yourself?
---------------------------------
The answer, as I understand it:
Build a kernel, with some variation of "make zImage" as the last step
Make a gzipped ramdisk image by one of the two following methods:
Use cpio and gzip (like a standard linux initial-ramdisk)
Use mkbootfs (from Android Kitchen)
Create a boot image from the gzipped ramdisk and the kernel zImage by one of the two following methods:
Use abootimg
abootimg is available for ubuntu, and is included in the ubuntu images that rabits was distributing
Use mkbootimg (from Android Kitchen)
Convert the boot image to a blob with "blobpack" (part of blobtools)
More details as I experiment with this process.
bsammon said:
Is there a guide to how to install a kernel that you built yourself?
I've seen bits and pieces of this in various threads, but no complete (or semi-complete) document on how it's done.
Click to expand...
Click to collapse
I have been searching on this topic as well. You would have a better luck searching if you use a key word like "Unpack and Repack Kernel or Ramdisk".. Good luck..
You don't know my kernel repacking guide? -> http://forum.xda-developers.com/showpost.php?p=36925180&postcount=4
_that said:
You don't know my kernel repacking guide? -> http://forum.xda-developers.com/showpost.php?p=36925180&postcount=4
Click to expand...
Click to collapse
Thanks for the head up. I will look into it... :good:
Ahh... the development forum -- that's why I didn't see it. I'll take a look at that.
_that said:
You don't know my kernel repacking guide? -> http://forum.xda-developers.com/showpost.php?p=36925180&postcount=4
Click to expand...
Click to collapse
Where do I get the "mkbootfs" and "mkbootimg" tools mentioned in that guide?
bsammon said:
Where do I get the "mkbootfs" and "mkbootimg" tools mentioned in that guide?
Click to expand...
Click to collapse
I think they are part of the Android source. Standalone sources are available in dsixda's Android Kitchen, which is what I use.
_that said:
I think they are part of the Android source. Standalone sources are available in dsixda's Android Kitchen, which is what I use.
Click to expand...
Click to collapse
I think you mean this Android Kitchen. It appears that Asus devices aren't supported by Android Kitchen, but it's your experience that it works anyway?
bsammon said:
I think you mean this Android Kitchen. It appears that Asus devices aren't supported by Android Kitchen, but it's your experience that it works anyway?
Click to expand...
Click to collapse
Nah the tools mkbootfs and mkbootimg from dsixda's android kitchen work fine.
bsammon said:
I think you mean this Android Kitchen. It appears that Asus devices aren't supported by Android Kitchen, but it's your experience that it works anyway?
Click to expand...
Click to collapse
Yes, that one. I've never used the menu-driven stuff, but you can learn a lot from reading its scripts - and many of the tools included in the kitchen work fine for all Android devices.

Development boot.img for SM-A127F and SM-A125F with the touch and MTP fixed

Here is a few boot.img files (tarred for Odin and zipped) intended to be used together with GSI systems (e.g. LineageOS) which suffer from the non-functional touchscreen after the wake-up and the non-functional MTP (USB file transfer). The boot.img files contain the recompiled stock kernel taken from Samsung Open Source with only a couple of the most necessary fixes. 99.9% unaltered, 100% open-source
All credits for the touchscreen fix go to manteiga25, he's done an amazing job on figuring this all out, still from his solution which includes additional performance tweaks I've taken the absolute bare minimum so that the problem is no longer present. Also huge thanks to Osvaldo Costa for the wonderful bootimgtool.
NOTE: If you did not yet flash any non-stock boot.img or recovery.img you may get the bootloop after flashing of any of these files (except for the orig's). That bootloop is caused by bootloader refusing to boot the VB-unsigned kernel together with the rest of the VB-signed components. The only solution (unfortunately) is the full factory reset, so you'll have to lose your user data; everything else, including the GSI will remain intact, but you'll have to set it up from scratch.
UPDATE 01/09/23: added the version based on A127FXXU7CVL2 (Android 13) version of the kernel.
UPDATE 01/11/23: added the fixed kernels for SM-A125F.
UPDATE 03/16/23: added the version based on A127FXXU5BVF3 (Android 12) version of the kernel.
Files for SM-A127F:
boot_sm-a127f-u4_fixed.zip: A127FXXU4AUK1-based kernel, Ilitek ili9881x fix, MTP fix
boot_sm-a127f-u5_fixed.zip: A127FXXU5BVF3-based (Android 12) kernel, Ilitek ili9881x fix, MTP fix
boot_sm-a127f-u7_fixed.zip: A127FXXU7CVL2-based (Android 13) kernel, Ilitek ili9881x fix, MTP fix
orig_boot_sm-a127-u4.zip: the original unaltered A127FXXU4AUK1 boot.img for undo
orig_boot_sm-a127-u5.zip: the original unaltered A127FXXU5BVF3 boot.img for undo
orig_boot_sm-a127-u7.zip: the original unaltered A127FXXU7CVL2 boot.img for undo
src_sm-a127f_fix.zip: all the altered source files
Files for SM-A125F:
boot_sm-a125f-u2_fixed_v1.zip: A125FXXU2BVB4-based kernel, Ilitek ili9881x fix, MTP fix
boot_sm-a125f-u2_fixed_v2.zip: A125FXXU2BVB4-based kernel, Ilitek ili9881x fix, Novatek nt36525 fix, MTP fix
orig_boot_sm-a125-u2.zip: the original unaltered A125FXXU2BVB3 boot.img for undo
src_sm-a127f-fix_v2.zip: all the altered source files
v1 should be easy on battery, but v2 will probably eat more because it basically disables the power saving features of the touchscreen chip (unfortunately that's the only solution at the kernel side).
If you don't trust me or if you're in desperate need of a more recent kernel, here are the steps how to rebuild it all yourself (for SM-A127F on Debian 11):
Download the kernel source from Samsung Open Source (A127FXXU3AUJ5)
Unpack SM-A127F_RR_Opensource.zip and Kernel.tar.gz inside
Unpack SM-A127F_RR_Opensource_A127FXXU4AUK1.zip into the same dir (overwriting the files)
Unpack the attached source.tar.gz, it contains only the changed files and build.sh facilitating compilation
From root: apt install clang-9 gcc-9-aarch64-linux-gnu
Remove any other versions of clang. Then cd /usr/bin; ln -s clang clang-9; ln -s clang++ clang++-9; ln -s clang-cpp clang-cpp-9
Back in the Kernel dir, run build.sh and wait for the kernel to compile
Download bootimgtool and compile it (just "make")
Download the stock firmware
Extract boot.img from AP_A127FXX[...].tar.md5 (unpack using tar, ignore the .md5) to the root dir of your Kernel
bootimgtool disassemble boot.img
cp Kernel/arch/arm64/boot/Image kernel
bootimgtool create -o boot.img
Flash boot.img as is using Heimdall or pack into .tar and flash using Odin
For SM-A125F you'll need to use the Google's patched Clang and GCC instead, and there is no way around that except for lots and lots of additional include paths for the Mediatek drivers (and even that does not guarentee that it will be compiled successfully).
uluruman said:
Here is the boot.img (tarred for Odin) intended to be used together with GSI systems (e.g. LineageOS). It contains the recompiled stock U4 kernel taken from Samsung Open Source with only a couple of the most necessary fixes, namely the freezing touchscreen and the non-functional MTP. 99.9% unaltered, 100% open-source.
All credits for the touchscreen fix go to manteiga25, he's done an amazing job on figuring this all out, still from his solution which includes additional performance tweaks I've taken the absolute bare minimum so that the problem is no longer present. Also huge thanks to Osvaldo Costa for the wonderful bootimgtool.
If you don't trust me here are the steps how to rebuild it all yourself (on Debian 11):
Download the kernel source from Samsung Open Source (A127FXXU3AUJ5)
Unpack SM-A127F_RR_Opensource.zip and Kernel.tar.gz inside
Unpack SM-A127F_RR_Opensource_A127FXXU4AUK1.zip into the same dir (overwriting the files)
Unpack the attached source.tar.gz, it contains only the changed files and build.sh facilitating compilation
From root: apt install clang-9 gcc-9-aarch64-linux-gnu
Remove any other versions of clang. Then cd /usr/bin; ln -s clang clang-9; ln -s clang++ clang++-9; ln -s clang-cpp clang-cpp-9
Back in the Kernel dir, run build.sh and wait for the kernel to compile
Download bootimgtool and compile it (just "make")
Download the stock firmware
Extract boot.img from AP_A127FXX[...].tar.md5 (unpack using tar, ignore the .md5) to the root dir of your Kernel
bootimgtool disassemble boot.img
cp Kernel/arch/arm64/boot/Image kernel
bootimgtool create -o boot.img
Flash boot.img as is using Heimdall or pack into .tar and flash using Odin
Click to expand...
Click to collapse
Amazing work. Love to see developers still working on this device. Does it work with SM-A125F?
Allehandro said:
Amazing work. Love to see developers still working on this device. Does it work with SM-A125F?
Click to expand...
Click to collapse
You can try, it may work, but most likely will bootloop. SM-A125F is based on a Mediatek SoC, SM-A127F is based on Exynos, which has a different kernel config.
uluruman said:
You can try, it may work, but most likely will bootloop. SM-A125F is based on a Mediatek SoC, SM-A127F is based on Exynos, which has a different kernel config.
Click to expand...
Click to collapse
I don't want to risk it as it is my main device and don't want to have to restore the device later on. Thanks though.
I've finally managed to compile the SM-A125F kernel (A125FXXU2BVB4 - SM-A125F_EUR_RR): somehow it turned out to be MUCH harder than that for SM-A127F, as nearly everything there is designed for only one specific toolchain, plus the non-Samsung s_mtp driver did not compile, so I had to take it from A127F's source. Anyway, I've ported the same fixes and here is the experimental boot.img. As I don't have SM-A125F I cannot test it, so I need someone to test it. Also attached is the original U2 boot.img: in case it does not work you just flash the original.
Amazing bro! Mad respect!!!!
I will soon put this baby to the test and see what's made of!!!
I can flash this using ODIN (PDA) directly over the current LOS GSI right?
Also, do you plan to include this kernel in your gsi building script so that the boot img of the gsi will be this one?
One other issue that I seemed to also have in my phone was the proximity sensor was not working e.g. when I was in call the screen would remain on....
axy_david said:
Amazing bro! Mad respect!!!!
I will soon put this baby to the test and see what's made of!!!
I can flash this using ODIN (PDA) directly over the current LOS GSI right?
Also, do you plan to include this kernel in your gsi building script so that the boot img of the gsi will be this one?
One other issue that I seemed to also have in my phone was the proximity sensor was not working e.g. when I was in call the screen would remain on....
Click to expand...
Click to collapse
Yes, flash using Odin. GSI should not be affected in any way. If anything does wrong I've also attached the original A127FXXU4AUK1 boot.img, so that you could revert the changes.
Currently I'm struggling to make the same fixed boot.img for my second phone, which is SM-A325F, and I cannot: even if I just unpack and repack back the same boot.img using any tool, including the Google's official mkbootimg, it causes the bootloop. So all of this is currently experimental.
uluruman said:
Currently I'm struggling to make the same fixed boot.img for my second phone, which is SM-A325F, and I cannot: even if I just unpack and repack back the same boot.img using any tool, including the Google's official mkbootimg, it causes the bootloop. So all of this is currently experimental.
Click to expand...
Click to collapse
This issue is sorted out: one cannot flash a custom boot.img over the signed stock one and don't do the full factory reset afterwards. Only after the factory reset the system boots with the unsigned boot partition. Interestingly enough, Download allows flashing such an image without any warnings (in contrast to flashing up_param.bin) but the system just refuses to boot.
uluruman said:
This issue is sorted out: one cannot flash a custom boot.img over the signed stock one and don't do the full factory reset afterwards. Only after the factory reset the system boots with the unsigned boot partition. Interestingly enough, Download allows flashing such an image without any warnings (in contrast to flashing up_param.bin) but the system just refuses to boot.
Click to expand...
Click to collapse
is it possible to fix the proximity sensor?
axy_david said:
is it possible to fix the proximity sensor?
Click to expand...
Click to collapse
There is no physical proximity sensor in this phone, but with the latest firmware you can normally use the Phone app. Now it normally reacts on touching the top part of the screen with your ear and blanks the screen. The screen does not blank on approaching the screen but only on touching it.
uluruman said:
Here is the boot.img (tarred for Odin) intended to be used together with GSI systems (e.g. LineageOS). It contains the recompiled stock U4 kernel taken from Samsung Open Source with only a couple of the most necessary fixes, namely the freezing touchscreen and the non-functional MTP. 99.9% unaltered, 100% open-source.
If the fixed boot.img does not work for you for some reason, I've also attached the original U4 boot (taken from the SM-A127F_NPB_A127FXXU4AUK1 firmware) so you could revert the changes.
All credits for the touchscreen fix go to manteiga25, he's done an amazing job on figuring this all out, still from his solution which includes additional performance tweaks I've taken the absolute bare minimum so that the problem is no longer present. Also huge thanks to Osvaldo Costa for the wonderful bootimgtool.
If you don't trust me or if you're in desperate need of a more recent kernel, here are the steps how to rebuild it all yourself (on Debian 11):
Download the kernel source from Samsung Open Source (A127FXXU3AUJ5)
Unpack SM-A127F_RR_Opensource.zip and Kernel.tar.gz inside
Unpack SM-A127F_RR_Opensource_A127FXXU4AUK1.zip into the same dir (overwriting the files)
Unpack the attached source.tar.gz, it contains only the changed files and build.sh facilitating compilation
From root: apt install clang-9 gcc-9-aarch64-linux-gnu
Remove any other versions of clang. Then cd /usr/bin; ln -s clang clang-9; ln -s clang++ clang++-9; ln -s clang-cpp clang-cpp-9
Back in the Kernel dir, run build.sh and wait for the kernel to compile
Download bootimgtool and compile it (just "make")
Download the stock firmware
Extract boot.img from AP_A127FXX[...].tar.md5 (unpack using tar, ignore the .md5) to the root dir of your Kernel
bootimgtool disassemble boot.img
cp Kernel/arch/arm64/boot/Image kernel
bootimgtool create -o boot.img
Flash boot.img as is using Heimdall or pack into .tar and flash using Odin
P.S.: the U5 kernel sources are suspicously segregated between RR (rest of the world), EUR, CIS and CIS-SER (Russia). It's quite interesting what are the differences?
Click to expand...
Click to collapse
Can you make one for A127F/DSN U7? (I don't have linux)
just tested on my phone latest U7 or s7???? nevertheless it bootloops
axy_david said:
just tested on my phone latest U7 or s7???? nevertheless it bootloops
Click to expand...
Click to collapse
it only works for u4 currently.
TheWorldYT said:
Can you make one for A127F/DSN U7? (I don't have linux)
Click to expand...
Click to collapse
I will, hold on.
just tested on my phone latest U7 or s7???? nevertheless it bootloops
TheWorldYT said:
it only works for u4 currently.
Click to expand...
Click to collapse
damn, and I can't downgrade, im using A127FXXS7BVK1 the latest update for europe really
axy_david said:
just tested on my phone latest U7 or s7???? nevertheless it bootloops
damn, and I can't downgrade, im using A127FXXS7BVK1
Click to expand...
Click to collapse
same thing.
also:
uluruman said:
I will, hold on.
Click to expand...
Click to collapse
axy_david said:
just tested on my phone latest U7 or s7???? nevertheless it bootloops
damn, and I can't downgrade, im using A127FXXS7BVK1 the latest update for europe really
Click to expand...
Click to collapse
uluruman said he will create one.
axy_david said:
just tested on my phone latest U7 or s7???? nevertheless it bootloops
damn, and I can't downgrade, im using A127FXXS7BVK1 the latest update for europe really
Click to expand...
Click to collapse
Done! ) See the update in the first post.
I've used the A127FXXU7CVL2 version source but it should work anyway because it's also U7-based (anyway there is no alternative - Samsung provides only that U7-based kernel). The only thing that theoretically can be needed is the factory reset: at least with my SM-A325F that was the case of the weird boot loop - the Verified Boot protection being voided (the warranty void bit being set) caused the bootloader to refuse loading the kernel.
uluruman said:
Done! ) See the update in the first post.
I've used the A127FXXU7CVL2 version source but it should work anyway because it's also U7-based (anyway there is no alternative - Samsung provides only that U7-based kernel). The only thing that theoretically can be needed is the factory reset: at least with my SM-A325F that was the case of the weird boot loop - the Verified Boot protection being voided (the warranty void bit being set) caused the bootloader to refuse loading the kernel.
Click to expand...
Click to collapse
Thank you!
uluruman said:
I've finally managed to compile the SM-A125F kernel (A125FXXU2BVB4 - SM-A125F_EUR_RR): somehow it turned out to be MUCH harder than that for SM-A127F, as nearly everything there is designed for only one specific toolchain, plus the non-Samsung s_mtp driver did not compile, so I had to take it from A127F's source. Anyway, I've ported the same fixes and here is the experimental boot.img. As I don't have SM-A125F I cannot test it, so I need someone to test it. Also attached is the original U2 boot.img: in case it does not work you just flash the original.
Click to expand...
Click to collapse
Can u make flashable zip for fix touch and mtp for a125f cause i think it dndt work after flashing only boot.img in twrp,still i found out that the baseband version is still bv5 instead of bv4 i hope you fix that bro because i want to install gsi
uluruman said:
Here is the boot.img (tarred for Odin) intended to be used together with GSI systems (e.g. LineageOS). It contains the recompiled stock U4 kernel taken from Samsung Open Source with only a couple of the most necessary fixes, namely the freezing touchscreen and the non-functional MTP. 99.9% unaltered, 100% open-source.
If the fixed boot.img does not work for you for some reason, I've also attached the original U4 boot (taken from the SM-A127F_NPB_A127FXXU4AUK1 firmware) so you could revert the changes.
All credits for the touchscreen fix go to manteiga25, he's done an amazing job on figuring this all out, still from his solution which includes additional performance tweaks I've taken the absolute bare minimum so that the problem is no longer present. Also huge thanks to Osvaldo Costa for the wonderful bootimgtool.
UPDATE 01/09/23: added the version based on A127FXXU7CVL2 (Android 13) version of the kernel.
If you don't trust me or if you're in desperate need of a more recent kernel, here are the steps how to rebuild it all yourself (on Debian 11):
Download the kernel source from Samsung Open Source (A127FXXU3AUJ5)
Unpack SM-A127F_RR_Opensource.zip and Kernel.tar.gz inside
Unpack SM-A127F_RR_Opensource_A127FXXU4AUK1.zip into the same dir (overwriting the files)
Unpack the attached source.tar.gz, it contains only the changed files and build.sh facilitating compilation
From root: apt install clang-9 gcc-9-aarch64-linux-gnu
Remove any other versions of clang. Then cd /usr/bin; ln -s clang clang-9; ln -s clang++ clang++-9; ln -s clang-cpp clang-cpp-9
Back in the Kernel dir, run build.sh and wait for the kernel to compile
Download bootimgtool and compile it (just "make")
Download the stock firmware
Extract boot.img from AP_A127FXX[...].tar.md5 (unpack using tar, ignore the .md5) to the root dir of your Kernel
bootimgtool disassemble boot.img
cp Kernel/arch/arm64/boot/Image kernel
bootimgtool create -o boot.img
Flash boot.img as is using Heimdall or pack into .tar and flash using Odin
P.S.: the U5 kernel sources are suspicously segregated between RR (rest of the world), EUR, CIS and CIS-SER (Russia). It's quite interesting what are the differences?
Click to expand...
Click to collapse
Please create working flashable zip file for twrp for a125f cause i dont have pc i cant use odin,thank you

Categories

Resources