hidden folders, files... - Bada Software and Hacking General

Since we can extract whole *.FFS and ShpApp.app and ...
I realized that folders complete missing or empty.
For instance folder Security is not visible...
Folder where internal Apps are stored... folder data is empty.
SystemFS\Osp\data
Is full of *.sig and *.htb files.
Thank you very much for TriX.
b.kubica
Best Regards

good.good job

i see some paths in wincomm that i cannot understand what exactly are they
maybe hidden folders??????????
../SHP3/AppSvc/Drm/service/DrmSvcAPI.cpp
/h/bada/Applications/[email protected]@[email protected]@__000/Info/application.xml
any ideas?

../SHP3/AppSvc/Drm/service/DrmSvcAPI.cpp
Click to expand...
Click to collapse
Means apps_compressed.bin
/h/bada/Applications/[email protected]@[email protected]@__000/Info/application.xml
Click to expand...
Click to collapse
Hmmm.
Tempfolder... but I have never seen this action...
Best Regards

I cannot understand what "/h/bada" is
maybe /hidden/bada
it's while installing application via kies
a new one
/etc/powervr.ini
(i know powervr is for GPU)
EDIT
Code:
6576 472.192 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_aco_0029_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(30)
6577 472.227 P00.T09.D001.G77.E125:173C EXCEPTION > OsStartSoftTimer: Started @ different task(Mocha:9) with owner task(IndiServerTask_Ipc:41) for Timer(hTimerBlink_3:0x80290002)
6578 472.227 P00.T09.D001.G77.E125:173C EXCEPTION > OsStartSoftTimer : call back will be expired @ owner task(IndiServerTask_Ipc:41) not current task
6579 472.254 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_aco_0029_01_alt.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(30)
6580 472.299 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_aco_0034_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(34)
6581 472.364 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_agl_0001_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(36)
6582 472.717 P00.T09.D001.G34.E062:1743 EXCEPTION > OsStartSoftTimer: Started @ different task(Mocha:9) with owner task(IndiServerTask_Ipc:41) for Timer(Main_BatteryDrawTimer_32:0x80290001)
6583 472.717 P00.T09.D001.G34.E062:1743 EXCEPTION > OsStartSoftTimer : call back will be expired @ owner task(IndiServerTask_Ipc:41) not current task
6584 472.727 P00.T09.D001.G77.E125:1745 EXCEPTION > OsStartSoftTimer: Started @ different task(Mocha:9) with owner task(IndiServerTask_Ipc:41) for Timer(hTimerBlink_3:0x80290002)
6585 472.727 P00.T09.D001.G77.E125:1745 EXCEPTION > OsStartSoftTimer : call back will be expired @ owner task(IndiServerTask_Ipc:41) not current task
6586 473.227 P00.T09.D001.G77.E125:174D EXCEPTION > OsStartSoftTimer: Started @ different task(Mocha:9) with owner task(IndiServerTask_Ipc:41) for Timer(hTimerBlink_3:0x80290002)
6587 473.227 P00.T09.D001.G77.E125:174D EXCEPTION > OsStartSoftTimer : call back will be expired @ owner task(IndiServerTask_Ipc:41) not current task
6588 473.275 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_agl_0010_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(42)
6589 473.315 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_agl_0012_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(38)
6590 473.341 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_agl_0014_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(22)
6591 473.397 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_agl_0015_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(20)
6592 473.440 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_brief.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(24)
6593 473.488 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_hw1_0001_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(20)
6594 473.521 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_hw1_0002_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(28)
6595 473.554 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_hw1_0004_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(32)
6596 473.599 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_hw1_0005_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(14)
6597 473.628 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_hw1_0013_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):( 8)
6598 473.673 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_hw1_0014_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(10)
6599 473.699 P00.T67.D001.G-1.E-01:0000 ALL > OemFmTfs4SetFileTime : last modified time of "/h/bada/Applications/sg750rl26n/Data/sound/e_hx_m06_hw1_0017_01.msadpcm"is updated. (2010)-(10)-(19) (17):(50):(38)
---------- Post added at 07:41 PM ---------- Previous post was at 07:33 PM ----------
seems while installing an app, all the extracted files goes there

Not new, but...
Command
Code:
FmSecureMode off
With QuB for instance unlock folders like:
Code:
NV
nvm
pdb_profiles
Security
System
Interesting... for me.
If you have activated:
Code:
SHP_CSC_FEATURE_MTP_SHOW_HIDDEN_STORAGE=1
In XPKG5 you can see these folders also in:
Code:
User\HidVol\ExtSys
User\HidVol\IntSys
Not sure if SHP_CSC_FEATURE_MTP_SHOW_HIDDEN_STORAGE=1 is mandatory to set... will check.
But in XXLA1 for instance you can't see folders in User\HidVol\... also after FmSecureMode off...
Also few other folders like temp never seen something in there...
Best Regards

No difference.
With or without SHP_CSC_FEATURE_MTP_SHOW_HIDDEN_STORAGE=1
XPKG5 shows these folders + content in...
Code:
User\HidVol\
Now I will move back to XXLA1 for new tests with path change...
Maybe I can "mount" other folders to Explorer...
First try is to replace
Code:
/AppEx/User/Widget/WRT/
Visible in
Code:
[B]\IntSys[/B]\WidgetApp
First idea to modify Widget.so ...
Result later...
No idea yet what I have to use to fit same length...
Best Regards

Code:
Fm[B]Remove[/B]SymLink
This seems reason why folders are hidden or empty...
Found in WsSyncml.so
Will do some test...
Best Regards

Related

Tools for Logging processes, like WinComm, Portmon, QXDM...

Nice and easy Tool:
http://www.softsea.com/review/Portmon.html
Maybe someone saw/know the yellow Message "UPLOAD data to pc"...
How to catch Data if "Bluescreen" comes and "UPLOAD data to pc" message appears?
It seems this nuke my Portmon...
Any suggestions please?
Maybe I'm blind or these are not stored in Debug folder...
Best Regards
Edit 1.
Changed title.
If you have a Windows XP machine left, try this to watch the serial port:
ups, i can't post links here. Google for serialmon dot com .....
It's output is a little easier to use than portmons. In general, using a serial port monitor to watch the communication between wave and pc, seems to be very unstable business.
Now I'm closer...
Taken info from Samsung GT-S8500L Wave Training Manual SW.ppt...
If someone needs the Settings to attach handset correct, ask me... in this Thread.
Best Regards
Could you post the settings, found this earlier, but couldn't do anything with it.
Thanks
I'll try to describe "short" steps.
1.
You have to be sure that Debug Level Middle is on. Please read here:
http://forum.xda-developers.com/showpost.php?p=10616930&postcount=3
Level Mode High shows more events...
2.
If you have access to Internal menu:
*#7092463*#
Maybe set to High or go to Debug Settings... described in ...Manual SW.ppt...
site 15
3.
Start WinComm and now check site 16 on *.ppt manual. All settings are on Picture.
4.
On handset I have choose Debug Mode instead Kies... this thingie if you plug cable into Wave... maybe go to Settings and set to ask by connection instead Kies
5.
Be sure you choose the "second" Port. Now Wave have 2 COM Ports activated.
Second one is for incoming Data.
Hope this helps an little bit.
If problems ask again.
Then I'll try to make some Screenshots or maybe some other hints...
Best Regards
Ehm have you found that Wincomm2010.exe
Click to expand...
Click to collapse
2010 no, but 2009 like in this Picture is attached.
WinComm2009.zip
Best Regards
Handset
Under Settings->Connectivity->USB->Ask on connection
To have chance to set USB Debugging
Wincomm
I will try later maybe Open or Close for connect to the port.
Important is to choose second COM Port...
Also important to activate UE Awake in settings like on Picture.
As it seems initial AT command is mandatory AT+WINCOMM...
Best Regards
P.S.:
I'm using XP 32 Bit... no other OS tested by me.
so now you can upload fw files from the phone or what???
so now you can upload fw files from the phone or what???
Click to expand...
Click to collapse
Now you could see internal process like Key press, which files involved... etc...
Many high technical stuff. But this could help to understand more.
For me it is very usefull.
I will soon attach few Log examples... maybe then more clear.
Best Regards
i don't suppose that anything can be done if *#7092463*#
doesn't get me a menu?
http://forum.xda-developers.com/showpost.php?p=12798896&postcount=5
Please read deeper this post and follow Links.
As Internal menu is disabled if you flashed ever Rsrc2_S8500_xxx(Low).rc2
Or if you not use Multiloader, then Kies did for you.
This is internal stuff, you have to "unlock" few things before... so read my instruction prior posted.
Please. This is more for advanced users. This is NO must have for all users.
At your own risk.
Best Regards
It seems also good idea to set Trace Level to High... in Internal Menu.
Best Regards
Edit 1:
Seems difference between Firmwareversions...
On JE7 I can see logging if handset is "off" if battery charge Animation is on.
Then if you press ON you can see parts of Booting sequence...
On JL2 I see first something, if Wave is fully on...
Maybe in higher Build some things disabled/removed...
Code:
3539 2255.054 [B]KEY_EVENT_SIG[/B]: [B]Keycode[/B] = 0x8f, STATUS = 0x0.
3540 2255.054 [LCD C]: INFO - FIMD_Drv_Resume()
3541 2255.054 S6E63M0 : LDI_Pentile_Set_Change Pentile_Value =6c
3542 2255.054 S6E63M0 : LDI_PortInit +
6217 2255.055 P00.T11.D001.G-1.E-01:0000 EXCEPTION > [CPLog]: Sub 0014 2263.372 -1: BOOTMGR > _BmPacketReceiveCallback: Boot command is [0x6]
6218 2255.055 P00.T11.D001.G-1.E-01:0000 EXCEPTION > [CPLog]: Sub 0015 2263.372 -1: EXCEPTION > OemTapiNetworkRadioInfoInd: RSSI refresh as AP's awaken
6219 2255.056 P00.T11.D001.G-1.E-01:0000 EXCEPTION > [CPLog]: Sub 0016 2263.372 -1: EXCEPTION > OemTapiNetworkCellInfoInd: Refresh cell Info as AP's awaken
6220 2255.063 P00.T10.D103.G22.E054:B25B EXCEPTION > SmsSvcRegGetSellOutToBeSent: bToBeSent = [0].
6221 2255.069 P00.T10.D103.G22.E054:B269 EXCEPTION > SmsTapiEventHandler: unknown tapi event type.
[B]3543 2255.085 S6E63M0 : LDI_PortInit -
3544 2255.085 S6E63M0 : LDI_S6E63M0_Power_On +
3545 2255.095 S6E63M0 : LDI_S6E63M0_Power_On [hwrev > [COLOR="Red"]S8200[/COLOR]_UNIV_B7]
3546 2255.095 S6E63M0 : LDI_Pentile_Set_Change Pentile_Value =6c
3547 2255.219 S6E63M0 : LDI_S6E63M0_Power_On -
3548 2255.219 Display_LSI : disp_Main_Wakeup [/B]
3549 2255.219 [TSP] reset acq atchcalst=0, atchcalsthr=0
3550 2255.220 [TSP] clear garbage data : Success!! [read 0 times]
3551 2255.220 [TSP] TSP Wakeup...........!
I was wondering why S8200... but now its more clear.
http://forum.xda-developers.com/showpost.php?p=12797112&postcount=249
What we can do...
Collect Key Events...
Monitoring processes like start JAVA Midlets...
Then we can see infos about Heap size...
Code:
9301 433.174 P00.T10.D094.G52.E103:2D83 EXCEPTION > KJxMemoryAvailable: [B]available memory heap[/B] size is 131268608
9302 433.178 P00.T10.D300.G52.E103:2D83 EXCEPTION > KJxSvcIsFileSystemValid: return TRUE!
9303 433.178 P00.T10.D300.G52.E103:2D83 EXCEPTION > KJavaGetMidletAttributeBySuiteID suiteID = 5 is not found
9304 433.179 P00.T10.D094.G52.E103:2D83 EXCEPTION > KJxSvcIsMemoryFull fmQuotaStat.availableSize(943128576), APP_MEMORY_STATUS_MX_MEMORY_FULL_LIMIT(0)
9305 433.180 P00.T10.D094.G52.E103:2D83 EXCEPTION > KJxSvcIsMemoryFull KJx execute limit size = 16384
9306 433.180 P00.T10.D300.G52.E103:2D83 EXCEPTION > KJxSvcIsFileSystemValid: return TRUE!
Many more things...
Best Regards
adfree said:
Code:
3539 2255.054 [B]KEY_EVENT_SIG[/B]: [B]Keycode[/B] = 0x8f, STATUS = 0x0.
3540 2255.054 [LCD C]: INFO - FIMD_Drv_Resume()
3541 2255.054 S6E63M0 : LDI_Pentile_Set_Change Pentile_Value =6c
3542 2255.054 S6E63M0 : LDI_PortInit +
6217 2255.055 P00.T11.D001.G-1.E-01:0000 EXCEPTION > [CPLog]: Sub 0014 2263.372 -1: BOOTMGR > _BmPacketReceiveCallback: Boot command is [0x6]
6218 2255.055 P00.T11.D001.G-1.E-01:0000 EXCEPTION > [CPLog]: Sub 0015 2263.372 -1: EXCEPTION > OemTapiNetworkRadioInfoInd: RSSI refresh as AP's awaken
6219 2255.056 P00.T11.D001.G-1.E-01:0000 EXCEPTION > [CPLog]: Sub 0016 2263.372 -1: EXCEPTION > OemTapiNetworkCellInfoInd: Refresh cell Info as AP's awaken
6220 2255.063 P00.T10.D103.G22.E054:B25B EXCEPTION > SmsSvcRegGetSellOutToBeSent: bToBeSent = [0].
6221 2255.069 P00.T10.D103.G22.E054:B269 EXCEPTION > SmsTapiEventHandler: unknown tapi event type.
[B]3543 2255.085 S6E63M0 : LDI_PortInit -
3544 2255.085 S6E63M0 : LDI_S6E63M0_Power_On +
3545 2255.095 S6E63M0 : LDI_S6E63M0_Power_On [hwrev > [COLOR="Red"]S8200[/COLOR]_UNIV_B7]
3546 2255.095 S6E63M0 : LDI_Pentile_Set_Change Pentile_Value =6c
3547 2255.219 S6E63M0 : LDI_S6E63M0_Power_On -
3548 2255.219 Display_LSI : disp_Main_Wakeup [/B]
3549 2255.219 [TSP] reset acq atchcalst=0, atchcalsthr=0
3550 2255.220 [TSP] clear garbage data : Success!! [read 0 times]
3551 2255.220 [TSP] TSP Wakeup...........!
I was wondering why S8200... but now its more clear.
http://forum.xda-developers.com/showpost.php?p=12797112&postcount=249
What we can do...
Collect Key Events...
Monitoring processes like start JAVA Midlets...
Then we can see infos about Heap size...
Code:
9301 433.174 P00.T10.D094.G52.E103:2D83 EXCEPTION > KJxMemoryAvailable: [B]available memory heap[/B] size is 131268608
9302 433.178 P00.T10.D300.G52.E103:2D83 EXCEPTION > KJxSvcIsFileSystemValid: return TRUE!
9303 433.178 P00.T10.D300.G52.E103:2D83 EXCEPTION > KJavaGetMidletAttributeBySuiteID suiteID = 5 is not found
9304 433.179 P00.T10.D094.G52.E103:2D83 EXCEPTION > KJxSvcIsMemoryFull fmQuotaStat.availableSize(943128576), APP_MEMORY_STATUS_MX_MEMORY_FULL_LIMIT(0)
9305 433.180 P00.T10.D094.G52.E103:2D83 EXCEPTION > KJxSvcIsMemoryFull KJx execute limit size = 16384
9306 433.180 P00.T10.D300.G52.E103:2D83 EXCEPTION > KJxSvcIsFileSystemValid: return TRUE!
Many more things...
Best Regards
Click to expand...
Click to collapse
Heap size can already be changed by accesing the jwc_properties.ini in the AppEx and the User>Exe folder.
astrotom said:
Heap size can already be changed by accesing the jwc_properties.ini in the AppEx and the User>Exe folder.
Click to expand...
Click to collapse
can you recommend a value for it??
give an example for the change??
thanks in advance
mylove90 said:
can you recommend a value for it??
give an example for the change??
thanks in advance
Click to expand...
Click to collapse
There are three jwc_properties.ini files. 1st one in Appex>SysDefault>Java>jwc_properties.ini, 2nd one in Exe>Java>jwc_properties.ini and 3rd one in SystemFS>User>Exe>Java>jwc_properties.ini. Use trix, TkFile explorer or Stune. Personally, I think the first ini file is fore the default java apps on the phone. I think the 2nd one is useless since I didnt see any java apps in that folder using stune. I think the 3rd file is for user installed java apps. I dont know since I am still in the process of modifying the whole bada firmware as far as possible and then I will later flash my phone with my custom firmware. Maybe you could help me tell which files are used for what? Ok, enough talk. Now here are settings for heap sizes that I used: (You can find heap settings at the end of each file)
## Limited MVM configuration
MAIN_MEMORY_CHUNK_SIZE = 82313216 # (78 * 1024 * 1024) + (500 * 1024), 78.5MB
JAVA_MAX_HEAP_SIZE = 65011712 # (62 * 1024 * 1024) + (0 * 1024), 62MB
JAVA_MIN_HEAP_SIZE = 10485760 # (10 * 1024 * 1024) + (0 * 1024), 10MB
MAX_ISOLATES = 4 # AMS Isolate + One application
The last setting, MAX_ISOLATES is the max number of java apps you can run simultaneously while paused. My setting allows 5 apps to run simultaneously. (Remember, Max_ISOLATES value should be one less than the desired value.) Earlier it wave could run only 3 apps.
I am surprised the Samsung provided low java heap sizes for such a good phone! Anyways enjoy!
Thanx astrotom
I'll try next days.
About WinComm... now I understand what this setting means...
I'll try to find combination to work with both, Qualcomm and WinComm.
To log also via QXDM...
Maybe BT is helpfull...
Best Regards
Uuupsi.
Not realized before. But now I have Modem Port connected with:
Upload data to pc
Hmm. But no idea how to catch Data now...
I've changed Port in WinComm...
Hmmmmmm, mabye 1 day in future.
Best Regards
I've played little bit with old SGH-U700...
It has also few similar things like Upload data to pc...
Via known code *#197328blabla... I can find Upload Funct.:
Enable Upload Funct
Disable Upload Funct
Enable Debug Mode in Low
If I try to enable... Can't enable as Dbg Lvl Low...
This U700 is damaged... (damn Touch keys)... maybe I can repair... maybe I can find out what Upload ... can do.
Best Regards
Edit.
I've set Debug Level to high, then also Enable Upload Funct is available...
But still no idea how to start Upload...
how to send AT commands to the phone? i have the first port of my phone as COM9 and the second one as COM10

[dev][kernel][kexec]

Last Update : August, 19, 2014
Hi,
I'm still try to bypass the MMU protection.
I have fixe a lot of bug, like memory misalignment, bad adresses allocation, dtb correction, etc...
Last sources and binaries here :
kexec-tools V11.zip : http://forum.xda-developers.com/attachment.php?attachmentid=2902912&stc=1&d=1408401794
kexec-tools binaries V11.zip : http://forum.xda-developers.com/attachment.php?attachmentid=2902913&stc=1&d=1408401794
Sorry, i have always 13 sec reboot after new kernel boot.
"cpu_proc_fin" use a "mcr p15" to init cache and proc that cause freeze.
I try to find solution for that.
Last Update : June, 22, 2014
Hi,
My sources are horrible... but i give something new.
This kexec is for stock kernel only (tested on .757). I thinks theses sources work on other kernel too.
In "kexec-tools V10.zip", you have all my sources. It's highly recommended to mod them to have something OK.
In "kexec binaries.zip", you have binaries to install
=> "kexec_load.ko" and "procfs_rw.ko" must be placed in "/system/lib/modules" folder with "chmod 777"
=> "kexec" must be placed in /system/bin" folder with "chmod 777"
=> cd /system/lib/modules
=> insmod kexec_load.ko
For sources :
Mod and adapt all you want, it's free.
You have 2 scripts in Zip : "./compil-kexec" in "kexec-tools" folder to rebuild and send in device directly (install Adbtcp on device and send by tcp with : adb connect xxx.xxx.xxx.xxx) = work perfectly with me.
"scriptZ1" is for compil stock kernel or another kernel (doomlord kernel for eg)
You must rename "custom_final_files" folder after compil to "final_file" manually ; You can have guest kernel in "custom_final_files" and stock kernel in "final_files" for "kexec-tools" path ... Don't mix a guest and host kernel please ^^
I am tired... i let you test and say if it's ok for you...
Thank a lot to munjeni for his help.
kexec-tools V10.zip : http://forum.xda-developers.com/attachment.php?attachmentid=2811994&stc=1&d=1403456181
kexec binaries.zip : http://forum.xda-developers.com/attachment.php?attachmentid=2811995&stc=1&d=1403456181
Last Update : November, 23, 2013
Hi,
For few days now, i haven't no more kernel panic with my kexec.
I have fixed few stuffs into sources, and add a lot.
These adds are, to include a "dt.img" image file into kexec load process.
This image file is a "device_tree" image to match hardware to software.
So, i assume to don't include atags into boot process, but pass bootloader informations by this DT.
I have programmed a little scan memory to found dynamicly all magic tags, because i found 3 device_tree into memory (magic is "0xd00dfeed").
These 2 device_tree are echo from first and nice structure.
The boot process need to have informations from this DT, and need all informations to initialize hardware (no HDW initialisation by the kernel)
I must first fix issues ; Regroup zImage and dt.img into memory to load a solid bloc to kexec_load module to boot into, and second, fix an offset i can't explain, 0x800 in memory causing misalignment memory
Keep tuned..
Last Update : November, 17, 2013
Hi everybody,
My kexec-tools work for Sony Xperia Z1 stock kernel "3.4.0-perf"
This tools can work on all locked bootloader for all locked device, not only Sony or Z1 models.
This kexec-tools add a kexec_load kernel module (LKM) and use a driver to grant a communication between "kexec" user program and kexec_load.ko module
what is for ?
"kexec" user program load in memory a custom kernel in zImage format, but can load ".tar" image too
This user tool load ramdisk in memory if necessary
This tool is for this purpose only, and don't keep in memory the custom kernel at device reboot.
It is a "user" program, not a "kernel" extension... So, to really do the magic, we need the host kernel (stock sony locked kernel) have a kexec_load capability to reboot in a new gest kernel (custom kernel).
Infortuntly, stock kernel don't have kexec_load capability.
Sony have compiled his stock kernel without this option, and "standard" kexec-tools "need" this option to work.
To see all system call capability of kernel, you can run theses command :
Code:
echo 0 > /proc/sys/kernel/dmesg_restrict
echo 0 > /proc/sys/kernel/kptr_restrict
cat /proc/kallsyms
Do all grep you want here.
The "echo 0" "restrict" is here to unmask logical adresses to "system calls"
Like you can see, "__NR_kexec_load" capability isn't here.
To add kexec_load capability in stock locked kernel, we need to add manualy a kernel module wich add this function into the kernel.
Why ? Because the way to keep in memory a custom kernel need to know a lot of parameters, and keep a specific memory range alive at reboot.
Only kernel can do this.
All user program will be terminated at reboot.
"Standard" kexec_load.ko module use a method to implement the "__NR_kexec_load" function in system call table.
Since 2.6.0 kernel, linux for security reason, have locked in memory the "system_call_table" ; No more add or modification is authorized.
If kexec tool try to add a value, "kexec_load" for us, we causes a kernel panic, and reboot device.
For this reason, i have modify kexec user program and kexec_load module to implement a driver to talk to each other.
this driver replace syscall method, and we no more need to use a system call table.
For this reason, this tool is now compatible with modern kernel like our "3.4.0"
For this reason, this tool must work for other device (Xperia X, P, S, etc...) and another brand
For this reason, if kernel is locked, we can bootstrap to run a new kernel.
Installation
First, you can compil your own kexec tool
Here, sources : http://forum.xda-developers.com/attachment.php?attachmentid=2397299&stc=1&d=1384689174
And here, the binaries : http://forum.xda-developers.com/attachment.php?attachmentid=2397305&stc=1&d=1384689406
(it's not a cwm zip, i have no time to create an installer for now ; use "./compil-kexec" if you want an automatic install)
Install *.ko in /system/lib/modules
Install kexec and kdump in /system/bin
Grant with "chmod 777"
Unzip in kexec-tools folder
Install a toolchain (sudo apt-get install gcc-arm-linux-gnueabi)
launch => ./compil-kexec
what's all
This script can do everythinks for you
- Compilation of tools
- Compilation of modules
- installation in device
This script can compil for every brand you have.
Except you must remove or adapt the patch (see below why)
Patch ??
This patch is because a module must be compiled in the same time the kernel himself.
For this reason a "vermagic", an identifier, is used by system to block every module not compil with kernel
Some custom kernel bypass this to authorize every modules.
But for stock kernel, it is not allowed.
You can easely strapp this by busybox.
"busybox modprobe" for help
"-f" to force load without vermagic
To see this vermagic :
Code:
# uname -r
This "uname -r" must be the same that
Code:
# strings kexec_load.ko | grep vermagic
vermagic=3.4.0-perf-g66807d4-02450-g9a218f1 SMP preempt mod_unload modversions ARMv7
If you want use automaticaly this vermagic, you can modify into the custom kernel this file :
Code:
"include/config/kernel.release" and add :
"3.4.0-perf-g66807d4-02450-g9a218f1"
This file will be use at module compil to match the vermagic.
Infortunatly, it is not enought. :silly:
The infamous "no symbol version for module_layout"
When a module compil is created, it use symbols link to system call function, translate by adresses
Theses symbols are not at same physical adresses in stock kernel and modules (compiled from DooMLoRD kernel).
So, theses adresses must be convert into modules itself to match with stock symbols adress.
A patch is needed.
If you use my script, modules are automatically patched.
Here patches :
Code:
sed -i 's/\x32\x76\x86\x29/\x72\xFF\x5E\x20/' procfs_rw.ko
sed -i 's/\x32\x76\x86\x29/\x72\xFF\x5E\x20/' kexec_load.ko
sed -i 's/\xBB\xD0\xF8\x4D/\x0E\x1C\x63\x77/' kexec_load.ko
sed -i 's/\xA6\x26\x81\x1A/\xD4\x56\x02\x7E/' kexec_load.ko
sed -i 's/\xA3\xD1\xEC\x96/\xEC\x43\x28\x1A/' kexec_load.ko
sed -i 's/\x8C\xE6\x6A\x5F/\x3D\xDF\x02\xF2/' kexec_load.ko
sed -i 's/\x3E\xF3\xEF\xE9/\x18\x7F\xA6\x8A/' kexec_load.ko
sed -i 's/\x8B\xD2\x92\x10/\xC8\x19\x08\x9C/' kexec_load.ko
sed -i 's/\x1C\xE8\x18\xE1/\x7C\x71\x9E\xEF/' kexec_load.ko
sed -i 's/\xAB\x2C\x2F\x8B/\x8E\xD7\x63\xC0/' kexec_load.ko
sed -i 's/\xF5\x62\xAA\x4B/\x34\x80\x1B\x74/' kexec_load.ko
sed -i 's/\x00\x52\xD6\xD7/\x6F\x80\x91\x20/' kexec_load.ko
sed -i 's/\x4F\x77\x57\x6A/\x0C\x57\xC7\x63/' kexec_load.ko
sed -i 's/\xCA\x2F\x65\x71/\x92\xB8\x7F\x53/' kexec_load.ko
sed -i 's/\x0F\xD0\xA0\x91/\xFA\x80\x15\xB4/' kexec_load.ko
sed -i 's/\x29\xA0\x6D\x48/\x6C\x6B\x96\x54/' kexec_load.ko
sed -i 's/\x6D\x1F\x1F\x37/\xCC\x5E\x79\x8B/' kexec_load.ko
sed -i 's/\xFD\x23\xD0\xFB/\xE3\xE3\x68\x52/' kexec_load.ko
You can use hexedit or hexdump to see these adresses :
Code:
hexdump kexec_load.ko | grep ff72
0003d50 b0b0 80ac ff72 205e 6f6d 7564 656c 6c5f
how does it work ?
# kexec --help
For kexec help... nothing more to say.
# lsmod
List loaded modules... You must see
kexec_load 31369 0 - Live 0x00000000 (O)
# rmmod kexec_load.ko
Remove kexec_load module from memory.
# grep kexec /proc/device
To see installed driver.
You must see :
100 kexec_driver
First number is "major" number to identify your driver in system.
# mknod /dev/kexec_driver c 100 0
Install driver.
Major number (here 100), is important for module.
This Major must be the same between module and driver.
By default, 100 is used.
# insmod kexec_load.ko
To install "LKM", kexec_load kernel module.
If another Major is needed, you can use "insmod kexec_load.ko 101" for Major 101
You can use "modprob" if you want, but you must configure the module folder.
How kexec and module exchange informations ?
By the driver.
Normal output for a kernel module is to write in "dmsg" file.
To see kernel output, launch this command :
Code:
# dmesg
To see last kernel log, see in :
Code:
# cat /proc/last_kmsg
For kexec module, this normal way still exist, and give a lot of informations, but to speak with, you must use the driver.
/dev/kexec_driver
You can yourself test communication:
Code:
# cat /dev/kexec_driver
You can send kernel by this communication channel.
Type following commands for help
=> echo help >/dev/kexec_driver
=> dmesg | grep Kexec
Code:
# echo help >/dev/kexec_driver
# cat /dev/kexec_driver
Last command : 'help'
Please type following command :
=> dmesg|grep Kexec
Every command send into driver is receive by kexec_load.ko module and running into the kernel.
The answer can by read thru the driver
Here, you can see that normal way to see messages is allway dmesg.
Code:
# dmesg|grep Kexec
<4>[15050.521628] Kexec: Starting kexec_module...
<6>[15050.521656] Kexec: kexec_driver_contener allocation
<6>[15050.521673] Kexec: kexec_memory_buffer allocation
<4>[15050.521691] Kexec:----------------------------------------------------
<4>[15050.521710] Kexec: kexec_driver created with major : '100'
<4>[15050.521728] Kexec: Please, prepare by typing the following commands :
<4>[15050.521746] Kexec: => mknod /dev/kexec_driver c 100 0
<4>[15050.521761] Kexec: => cat /dev/kexec_driver
<4>[15050.521775] Kexec:-----------------------------------------------------
<4>[15050.521791] Kexec: For help
<4>[15050.521803] Kexec: => echo help >/dev/kexec_driver
(...)
I have add a lot of informations to help to configure kexec.
rdtags, atags ??
Not sure for this part of kernel.
"atags" is the most used method to bootloader to parse commands and informations to kernel at boot.
"atags" is a form of structure in memory to organise informations.
At boot, a address chain is created and can be compulse in /proc/atags file.
This file is read only system.
"rdtags" is another way to bootloader to parse information to kernel.
"rdtags" is not stocked in "/proc"
But, as i see, stock kernel can use "atags" from bootloader.
kexec can substitute bootloader function to create fromscratch a atags chain, and parse to new kernel.
I have change this part to stock atags in "/data/atags", and reuse or change if need.
If this don't work, i must create a rdtags chain to replace atags ; It's not a hard work.
Status
For the moment, kexec tools works.
=> Phase one OK.
I can start Phase Two : new kernel patch.
If you want to help me...
Actually, load a custom kernel and boot into with kexec tools work.
But at boot into, a kernel panic occurs.
It seems, a part of kexec patch is missing in custom kernel.
Hi new thread created for kernel kexec development.
Status: not working: wrong values for mem defines under the kernel is giving segmentation fault as its attempting to write to memory areas that are currently being used byyyyy the system
Instructions:
Make kernel compatible?:
1. Download kernel diff patch from below
2. Terminal - diff patch > diff.txt
How to use:
1. Download kexec-tools (kexec binary) from below
2. Copy into system/bin directory and give it executable permission
3. Download compatible kernel
4. Terminal - kexec --load-hardboot zImage --initrd=initrd.img --mem-min=0x20000000 --command-line="$(cat /proc/cmdline)"
kexec -e
Download links:
Kexec tool- https://db.tt/8DZXQ9eV
Ramdisk firmware 1.548 : https://db.tt/8DZXQ9eV
zImage (kernel):
Source code:
Kernel diff patch: https://db.tt/Xi2htT7Q (currently contains wrong values for mem defines)
Kexec-tools: https://db.tt/I22ofr3b
Special thanks: @delewer @krabappel2548
Reserved
Please move this thread to Xda Devdb, then I can also edit first post etc if I find new stuff
Sent from my C6903 using xda app-developers app
krabappel2548 said:
Please move this thread to Xda Devdb, then I can also edit first post etc if I find new stuff
Sent from my C6903 using xda app-developers app
Click to expand...
Click to collapse
Devdb?
Pm me i dont know what Devdb is lol
Recieved segmentation fault with delewers calculated mem values too
We need to write to memory where we have write access to, maybe lockedbootloader is not allowing us to write? Orrr we are just writing to wrong area of memory
If kexec works on the Z1, can it be ported over to Xperia Z/ZL/T/Ultra? I believe they don't all share the same processor.
Shaky156 said:
Devdb?
Pm me i dont know what Devdb is lol
Click to expand...
Click to collapse
Shaky156 said:
Recieved segmentation fault with delewers calculated mem values too
We need to write to memory where we have write access to, maybe lockedbootloader is not allowing us to write? Orrr we are just writing to wrong area of memory
Click to expand...
Click to collapse
I'll discuss with Kali- today if he's available.
Knucklessg1 said:
If kexec works on the Z1, can it be ported over to Xperia Z/ZL/T/Ultra? I believe they don't all share the same processor.
Click to expand...
Click to collapse
Doesn't need to be same processor, can be ported
Sent from my C6903 using xda app-developers app
Knucklessg1 said:
If kexec works on the Z1, can it be ported over to Xperia Z/ZL/T/Ultra? I believe they don't all share the same processor.
Click to expand...
Click to collapse
Yes it wont matter much, since its not s800 it should be easier for you guys , take the kexec-tool use that, implement the patch write to the correct mem addresses which is free, it should boot if you guys have issues let me know,
I need to calculate the correct addresses.
Ive noticed s800 uses a dt.img, might need to modify kexec-tool to support dt.img, not sure what dt.img does yet, only know it holds values
Shaky156 said:
I need to calculate the correct addresses.
Ive noticed s800 uses a dt.img, might need to modify kexec-tool to support dt.img, not sure what dt.img does yet, only know it holds values
Click to expand...
Click to collapse
the dt.img is needed by the kernel to boot, so I guess we need to load that too in kexec.
EDIT: people that wanna try add kexec patch to their kernel, check github: android_kernel_sony_msm8974/commits/kexec
krabappel2548, i have compil your kernel by my script (fromscratch)
My script (instruction in "DoomLord Build kernel thread" : scriptZ1 http://forum.xda-developers.com/attachment.php?attachmentid=2346163&d=1382568778
(for thoses who want to help us...)
You have a little mod to do here (bad compil) :
In "sound/soc/msm/qdsp6v2/rtac.c"
you must change
#include <q6voice.h>
by
#include "q6voice.h"
btw : no more ideas to load kexec for the moment ...
delewer said:
krabappel2548, i have compil your kernel by my script (fromscratch)
My script (instruction in "DoomLord Build kernel thread" : scriptZ1 http://forum.xda-developers.com/attachment.php?attachmentid=2346163&d=1382568778
(for thoses who want to help us...)
You have a little mod to do here (bad compil) :
In "sound/soc/msm/qdsp6v2/rtac.c"
you must change
#include <q6voice.h>
by
#include "q6voice.h"
btw : no more ideas to load kexec for the moment ...
Click to expand...
Click to collapse
Sorry, I'm trying to get caught up on the forum, but what seems to be the current standing issue to get kexec working?
Knucklessg1 said:
Sorry, I'm trying to get caught up on the forum, but what seems to be the current standing issue to get kexec working?
Click to expand...
Click to collapse
Read the OP
Status paragraph
Memory regions
00000000-07afffff : System RAM
00008000-00b79383 : Kernel code
00d04000-00f0cddb : Kernel data
0ff00000-779fffff : System RAM
7ff00000-7ff3ffff : rdtags_mem
7ff80000-7ffa0fff : last_kmsg
7ffa1000-7ffa5fff : last_amsslog
System RAM MEM = 00000000
So --min-mem=0x20000000
Now need to find a free memory area thatll allow us to write and hopefully the mmu/pmu on locked bootloader wont cancel it
@delewer? @DooMLoRD @kali @Bin4ry
I know I shouldn't disturb, but i must ask: if You achieve Your goal, would it be possible to port it to devices like Xperia P, S, T, U and other NXT? It would be great, many ppl are ready to give a prize for it. Thanks in advance, good luck and sorry again.
Sent from my LT22i using xda app-developers app
king960 said:
I know I shouldn't disturb, but i must ask: if You achieve Your goal, would it be possible to port it to devices like Xperia P, S, T, U and other NXT? It would be great, many ppl are ready to give a prize for it. Thanks in advance, good luck and sorry again.
Sent from my LT22i using xda app-developers app
Click to expand...
Click to collapse
These devices are not 2013 devices, they arent s800 socs, so they are much easier to do, simply take the kexec-tools from op, implement the patch in your kernel, write the correct memory values for your specific device and execute in terminal via the command in op, minmem depends on your device too, good luck
I think some1 tried it already, but it works only for unlocked devices... Anyway, thanks for help.
Sent from my LT22i using xda app-developers app
king960 said:
I know I shouldn't disturb, but i must ask: if You achieve Your goal, would it be possible to port it to devices like Xperia P, S, T, U and other NXT? It would be great, many ppl are ready to give a prize for it. Thanks in advance, good luck and sorry again.
Sent from my LT22i using xda app-developers app
Click to expand...
Click to collapse
Does doing this require having an Unlocked Boot loader prior to implementation?
Sent from my C6603 using xda app-developers app
A few informations about kexec-tools debug
in kexec.c
Fonction :
if (file_type.load(argc, argv, kernel_buf,
kernel_size, &info) < 0) {
fprintf(stderr, "Cannot load %s\n", kernel);
return -1;
}
With a forced execution of kexec (bypass error to see...)
--mem-min=0x90000000
kernel: 0xb6b9d008 kernel_size: 3e9340
debug: 1 - after get memory range
debug: 2 - after type test
debug: 3 - after type test
debug: 4 - after info.kexec
debug: Focus 1 - argc '5' ; argv 'be856774' ; kernel_buf 'b6b9d008' ; kernel_size '3e9340' ; info 'be856548' ; i '1' ; file_type.name 'zImage'
Could not find a free area of memory of 3f1340 bytes...
Cannot load zImage
debug: 10 - before trampoline
debug: 11 - after trampoline
debug: 12 - before segment load
debug: 13 - after segment load
debug: 8 - before sort_segment
debug: 9 - after sort_segment
debug: 6 - before purgatory
debug: 7 - after purgatory
kexec_load: entry = (nil) flags = 280004
nr_segments = 0
kexec_load failed: Function not implemented
entry = (nil) flags = 280004
nr_segments = 0
debug: 5 - return result : ffffffff
With a forced bypass on file_type.load , we have this :
--mem-min=0x20000000
debug: Focus 1 - argc '5' ; argv 'bef18774' ; kernel_buf 'b6bc7008' ; kernel_size '3e9340' ; info 'bef18548' ; i '1' ; file_type.name 'zImage'
Segmentation fault
delewer said:
A few informations about kexec-tools debug
in kexec.c
Fonction :
if (file_type.load(argc, argv, kernel_buf,
kernel_size, &info) < 0) {
fprintf(stderr, "Cannot load %s\n", kernel);
return -1;
}
With a forced execution of kexec (bypass error to see...)
--mem-min=0x90000000
kernel: 0xb6b9d008 kernel_size: 3e9340
debug: 1 - after get memory range
debug: 2 - after type test
debug: 3 - after type test
debug: 4 - after info.kexec
debug: Focus 1 - argc '5' ; argv 'be856774' ; kernel_buf 'b6b9d008' ; kernel_size '3e9340' ; info 'be856548' ; i '1' ; file_type.name 'zImage'
Could not find a free area of memory of 3f1340 bytes...
Cannot load zImage
debug: 10 - before trampoline
debug: 11 - after trampoline
debug: 12 - before segment load
debug: 13 - after segment load
debug: 8 - before sort_segment
debug: 9 - after sort_segment
debug: 6 - before purgatory
debug: 7 - after purgatory
kexec_load: entry = (nil) flags = 280004
nr_segments = 0
kexec_load failed: Function not implemented
entry = (nil) flags = 280004
nr_segments = 0
debug: 5 - return result : ffffffff
With a forced bypass on file_type.load , we have this :
--mem-min=0x20000000
debug: Focus 1 - argc '5' ; argv 'bef18774' ; kernel_buf 'b6bc7008' ; kernel_size '3e9340' ; info 'bef18548' ; i '1' ; file_type.name 'zImage'
Segmentation fault
Click to expand...
Click to collapse
Did you compile this kexec yourself? Or did you get this from krapabbel? I issued krapabbel to compile a new debug version have gave him the code but never heard back from him :/
Anywayz so cannot find free memory is the issue

Fixing stock kernel sources for H30-U10

Github repo: https://github.com/kernel-killer/android_kernel_huawei_h30u10
All changes I made since last commit are in my private repo.
Install packages (Not sure if it's right):
Code:
sudo apt-get install build-essential
Note: Please run ./mk ckeck-env to verify your build enviroment (Newer GNU MAKE will fail but the code compiles the same with new or older version)
Build:
Code:
./mk bm_new k
Testing your new kernel:
Download both attachments (KernelSwapper and BootimgRestore).
Append headers from stock kernel to zImage (which can be found at ./out/target/product/huawei82_cwet_kk/obj/KERNEL_OBJ/arch/arm/boot/zImage)
In KernelSwapper update 'kernel' with your own generated zImage rename it to 'kernel' and replace it inside zip.
In BootimgRestore replace 'boot.img' with your current ROM's boot.img in case that something goes wrong (e.g.: Phone not booting).
Copy the two new zips into phone's memory (or SD card) and flash KernelSwapper.
===== Reserved #1 =====
Thanks for the awesome work KK. I am on CM 13 3.4.67 kernel. Can i use this or do i have to be in stock rom for testing the kernal?
Sent from my Honor 3C using Tapatalk
---------- Post added at 06:12 AM ---------- Previous post was at 06:02 AM ----------
Update : Flashed the kernel, phone booted but felt laggish while using. I am still testing, will let you know what happens
Sent from my Honor 3C using Tapatalk
karkeankit said:
Thanks for the awesome work KK. I am on CM 13 3.4.67 kernel. Can i use this or do i have to be in stock rom for testing the kernal?
Sent from my Honor 3C using Tapatalk
---------- Post added at 06:12 AM ---------- Previous post was at 06:02 AM ----------
Update : Flashed the kernel, phone booted but felt laggish while using. I am still testing, will let you know what happens
Sent from my Honor 3C using Tapatalk
Click to expand...
Click to collapse
Yes, I'm sure that the kernel has multiple bugs. The phone may feel laggish because there is enabled low-level kernel debugging over UART.
Thank you for testing...
kernel.killer said:
Yes, I'm sure that the kernel has multiple bugs. The phone may feel laggish because there is enabled low-level kernel debugging over UART.
Thank you for testing...
Click to expand...
Click to collapse
You are welcome, wishint you good luck for further development
Sent from my Honor 3C using Tapatalk
Hi, tnx for The kernel
if i Update my kernel VPN bug in CM12.1 will fix?
hamadk said:
Hi, tnx for The kernel
if i Update my kernel VPN bug in CM12.1 will fix?
Click to expand...
Click to collapse
Nope, it's ROM bug not a kernel bug plus I have released only development preview version which has enabled many debugging options and it may be quite buggy.
Thanks, but can this process led to a suitable kernel for CM13?
Does this kernel fixes the video playback problem and the recording problem?(Can't play or capture 720p videos, screen recorder works fine, just the camera.)
Sent from my Huawei Honor 3C using XDA Labs
Lumpbloom7 said:
Does this kernel fixes the video playback problem and the recording problem?(Can't play or capture 720p videos, screen recorder works fine, just the camera.)
Sent from my Huawei Honor 3C using XDA Labs
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=67848925&postcount=8
mhxygh said:
Thanks, but can it this process led to a suitable kernel for CM13?
Click to expand...
Click to collapse
Aim of this project is to make stock kernel sources stable for KitKat ROMs (It is originally for KK) but somebody else may patch them for CM 13. I am not working on this nor I'll do.
Will you be adding extra CPU governors and IO schedulers along with kernel level wakeups for double tap waking?
I was wondering who else is developing kernel 3.10.XX for this device ?
Ms_Julia said:
I was wondering who else is developing kernel 3.10.XX for this device ?
Click to expand...
Click to collapse
Actually, nobody is working on 3.10.X kernel. And I'm rather focusing on LineageOS for now.
What is the defconf for our device in kernel source
imranpopz said:
What is the defconf for our device in kernel source
Click to expand...
Click to collapse
This should include most configs
Code:
/* Mediatek common */
./mediatek/config/common/autoconfig/kconfig/AEE
./mediatek/config/common/autoconfig/kconfig/USER
./mediatek/config/common/ProjectConfig.mk
/* MT6582 common */
./mediatek/config/mt6582/autoconfig/kconfig/platform
./mediatek/config/mt6582/ProjectConfig.mk
/* h30u10 device specific */
./mediatek/config/huawei82_cwet_kk/autoconfig/kconfig/project
./mediatek/config/huawei82_cwet_kk/ProjectConfig.mk
kernel.killer said:
This should include most configs
Code:
/* Mediatek common */
./mediatek/config/common/autoconfig/kconfig/AEE
./mediatek/config/common/autoconfig/kconfig/USER
./mediatek/config/common/ProjectConfig.mk
/* MT6582 common */
./mediatek/config/mt6582/autoconfig/kconfig/platform
./mediatek/config/mt6582/ProjectConfig.mk
/* h30u10 device specific */
./mediatek/config/huawei82_cwet_kk/autoconfig/kconfig/project
./mediatek/config/huawei82_cwet_kk/ProjectConfig.mk
Click to expand...
Click to collapse
Replace Device Name with the configuration file found at:
Source/arch/arm/configs
It's written in this way something_DeviceCodename_user_defconfig
I need for the above step.. ☝☝☝
imranpopz said:
Replace Device Name with the configuration file found at:
Source/arch/arm/configs
It's written in this way something_DeviceCodename_user_defconfig
I need for the above step.. ☝☝☝
Click to expand...
Click to collapse
Well... This is Mediatek, DO NOT expect the sources to look nice. The configs are scattered through ./mediatek subdirectories, *.mk files are parsed and configs are assembled during build. Unfortunatelly, even if you manually assemble .config you will NOT be able to build the kernel. It is full of dirty hacks (Mediatek) and just typing "make" won't work, build will break.
Build:
Code:
$ git clone https://github.com/kernel-killer/android_kernel_huawei_h30u10.git
$ cd android_kernel_huawei_h30u10
$ export ARCH=arm && export ARCH_MTK_PLATFORM=mt6582 && export TARGET_PRODUCT=huawei82_cwet_kk
$ export CROSS_COMPILE=/path-to-your-toolchain/.../bin/arm-linux-androideabi-
$ ./mk n k
Code:
$ ./mk -h
Usage: (makeMtk|mk) [options] project actions [modules]
Options:
-t, -tee : Print log information on the standard-out.
-o, -opt=bypass_argument_to_make
: Pass extra arguments to make.
-h, -help : Print this message and exit.
Projects:
one of available projects.
Actions:
listp, listproject
: List all available projects.
check-env : Check if build environment is ready.
check-dep : Check feature dependency.
n, new : Clean and perform a full build.
c, clean : Clean the immediate files(such as, objects, libraries etc.).
r, remake : Rebuild(target will be updated if any dependency updats).
mrproper : Remove all generated files + config + various backup files in Kbuild process.
bm_new : "new" + GNU make's "-k"(keep going when encounter error) feature.
bm_remake : "remake" + GNU make's "-k"(keep going when encounter error) feature.
mm : Build module through Android native command "mm"
mma : Build module through Android native command "mma"
emigen : Generate EMI setting source code.
nandgen : Generate supported NAND flash device list.
codegen : Generate trace DB(for META/Cather etc. tools used).
drvgen : Generate driver customization source.
custgen : Generate customization source.
javaoptgen : Generate the global java options.
ptgen : Generate partition setting header & scatter file.
bindergen : Generate binder related information
sign-image : Sign all the image generated.
encrypt-image : Encrypt all the image generated.
update-api : Android default build action
(be executed if system setting or anything removed from API).
check-modem : Check modem image consistency.
upadte-modem : Update modem image located in system.img.
modem-info : Show modem version
gen-relkey : Generate releasekey for application signing.
check-appres : Check unused application resource.
sdk : Build sdk package.
win_sdk : Build sdk package with a few Windows tools.
banyan_addon : Build MTK sdk addon.
banyan_addon_x86 :Build MTK sdk x86 addon.
cts : Build cts package.
bootimage : Build boot image(boot.img).
cacheimage : Build cache image(cache.img).
systemimage : Build system image(system.img).
snod : Build system image without dependency.
(that is, ONLY pack the system image, NOT checking its dependencies.)
recoveryimage : Build recovery image(recovery.img).
secroimage : Build secro image(secro.img).
factoryimage : Build factory image(factory.img).
userdataimage : Build userdata image(userdata.img).
userdataimage-nodeps
: Build userdata image without dependency.
(that is, ONLY pack the userdata image, NOT checking its dependencies.)
dump-products : Dump products related configuration(PRODUCT_PACKAGE,PRODUCT_NAME ect.)
target-files-package
: Build the target files package.
(A zip of the directories that map to the target filesystem.
This zip can be used to create an OTA package or filesystem image
as a post-build step.)
updatepackage : Build the update package.
dist : Build distribution package.
Modules:
pl, preloader : Specify to build preloader.
lk : Specify to build little kernel.
md32 : Specify to build DSP md32.
tz, trustzone : Specify to build trusted execution environment.
k, kernel : Specify to build kernel.
dr, android : Specify to build android.
NULL : Specify to build all components/modules in default.
k <module path>
: Specify to build kernel component/module with the source path.
dr <module name>
: Specify to build android component/module with module name.
Other tools:
prebuilts/misc/linux-x86/ccache/ccache -M 10G
: Set CCACHE pool size to 10GB
Example:
./mk -t e1k emigen
: Generate EMI setting source code.
./mk -o=TARGET_BUILD_VARIANT=user e1k n
: Start a user mode full build.
./mk listp : List all available projects.
./mk e1k bootimage
: Build bootimage for e1k project.
./mk e1k bm_new k
: Build kernel for e1k project.
./makeMtk e1k c,bm_remake pl k
: Clean & Build preloader and kernel for e1k project.
./makeMtk e1k n k kernel/xxx/xxx
: Build(full build) kernel component/module
under the path "kernel/xxx/xxx" for e1k project.
./makeMtk e1k r dr Gallery
: Rebuild android module named Gallery for e1k project.
./makeMtk e1k mm packages/apps/Settings
: Change Directory to packages/apps/Settings and execute "mm"
./makeMtk e1k mma packages/apps/Settings
: Change Directory to packages/apps/Settings and execute "mma"
Edit:
I fixed the sources, so menuconfig can be used.
Apply patch:
Code:
$ git am 0001-Fix-build-using-make-command.patch
Build:
Code:
$ cd kernel && export ARCH=arm && export ARCH_MTK_PLATFORM=mt6582 && export TARGET_PRODUCT=huawei82_cwet_kk
$ export CROSS_COMPILE=/path-to-your-toolchain/.../bin/arm-linux-androideabi-
$ make -C $(pwd) O=output h30u10_defconfig menuconfig
$ make -C $(pwd) O=output
Append MTK headers:
Code:
$ ../mediatek/build/tools/mkimage output/arch/arm/boot/zImage KERNEL > output/zImage
*Note: I recommend using AOSP arm-linux-androideabi-4.9 toolchain.
Getting cp: cannot stat 'out/target/product/huawei82_cwet_kk_kernel.log
Make [1]: [kernel ] error 1
Make: *** [remake] error 2

MIUI Debloat + Optmizations

Hey Guys, i've made a script to debloat MIUI and to install some Kernel optimizations at the INIT.D folder plus anti Google Play Services Wakelock Script (at INIT.D as well).
Usually i use it on mi-globe and MIUI-MIX but it should work for Xiaomi.eu, Global and Chinese ROMs too (both beta and stable).
Thanks to @kevp75 for the line:
Code:
ifelse(
(is_mounted("/system")), (
assert(run_program("/sbin/mount", "-o", "remount,rw", "/system"));
), (
assert(run_program("/sbin/mount", "-o", "rw", "/dev/block/bootdevice/by-name/system", "/system_root"));
)
);
ATTENTION!! I ONLY RECOMMEND USING THE OFFICIAL TWRP, ORANGEFOX AND MAURONO UNOFFICIAL DOES NOT WORK!!
https://twrp.me/xiaomi/xiaomimi9t.html
Instalation:
1 - Reboot in to TWRP after first boot and setup.
2 - Make a nanodroid full system Backup for safety.
3 - Go to Mount and make sure SYSTEM is mounted!
4 - Run the script.
5 - Reboot in to system.
6 - Profit.
If you wipe the system partition, you will need to reboot in to the OS and back to TWRP before flash the debloat script.
Download:
https://androidfilehost.com/?fid=4349826312261796697
What will it debloat:
Code:
delete_recursive("/system/app/AiAsstVision");
delete_recursive("/system/app/AnalyticsCore");
delete_recursive("/system/app/BTProductionLineTool");
delete_recursive("/system/app/BasicDreams");
delete_recursive("/system/app/BookmarkProvider");
delete_recursive("/system/app/BuiltInPrintService");
delete_recursive("/system/app/CatchLog");
delete_recursive("/system/app/Cit");
delete_recursive("/system/app/CloudPrint2");
delete_recursive("/system/app/Email");
delete_recursive("/system/app/FM");
delete_recursive("/system/app/GooglePrintRecommendationService");
delete_recursive("/system/app/GoogleTTS");
delete_recursive("/system/app/GuardProvider");
delete_recursive("/system/app/Health");
delete_recursive("/system/app/Joyose");
delete_recursive("/system/app/KSICibaEngine");
delete_recursive("/system/app/Lens");
delete_recursive("/system/app/MarkupGoogle");
delete_recursive("/system/app/MiLinkService");
delete_recursive("/system/app/MiPlayClient");
delete_recursive("/system/app/MiRadio");
delete_recursive("/system/app/MiuiBugReport");
delete_recursive("/system/app/MiuiCompass");
delete_recursive("/system/app/MiuiContentCatcher");
delete_recursive("/system/app/MiuiDaemon");
delete_recursive("/system/app/MiuiAccessibility");
delete_recursive("/system/app/MiuiSuperMarket");
delete_recursive("/system/app/MiuiVideoGlobal");
delete_recursive("/system/app/NextPay");
delete_recursive("/system/app/PartnerBookmarksProvider");
delete_recursive("/system/app/PaymentService");
delete_recursive("/system/app/PrintRecommendationService");
delete_recursive("/system/app/PrintSpooler");
delete_recursive("/system/app/SoundPickerPrebuilt");
delete_recursive("/system/app/Stk");
delete_recursive("/system/app/WPS_lite");
delete_recursive("/system/app/XMCloudEngine");
delete_recursive("/system/app/YellowPage");
delete_recursive("/system/app/YouDaoEngine");
delete_recursive("/system/app/greenguard");
delete_recursive("/system/app/lens");
delete_recursive("/system/app/mi_connect_service");
delete_recursive("/system/app/wps_lite");
delete_recursive("/system/app/Zman");
delete_recursive("/system/data-app/");
delete_recursive("/system/data-app/BaiduIME");
delete_recursive("/system/data-app/Email");
delete_recursive("/system/data-app/MiFinance");
delete_recursive("/system/data-app/MiMobileNoti");
delete_recursive("/system/data-app/MiShop");
delete_recursive("/system/data-app/XiaomiSpeechEngine");
delete_recursive("/system/data-app/cn.wps.moffice_eng");
delete_recursive("/system/data-app/com.eg.android.AlipayGphone");
delete_recursive("/system/data-app/com.taobao.taobao");
delete_recursive("/system/data-app/com.xunmeng.pinduoduo");
delete_recursive("/system/priv-app/BATestApp");
delete_recursive("/system/priv-app/CleanMaster");
delete_recursive("/system/priv-app/DynamicSystemInstallationService");
delete_recursive("/system/priv-app/GoogleFeedback");
delete_recursive("/system/priv-app/GooglePartnerSetup");
delete_recursive("/system/priv-app/HotwordEnrollmentOKGoogleWCD9340");
delete_recursive("/system/priv-app/HotwordEnrollmentXGoogleWCD9340");
delete_recursive("/system/priv-app/MiMoverGlobal");
delete_recursive("/system/priv-app/MiRecycle");
delete_recursive("/system/priv-app/MiService");
delete_recursive("/system/priv-app/MiShare");
delete_recursive("/system/priv-app/PersonalAssistant");
delete_recursive("/system/priv-app/QuickSearchBox");
delete_recursive("/system/priv-app/Updater");
delete_recursive("/system/priv-app/Velvet");
delete_recursive("/system/priv-app/VpnDialogs");
delete_recursive("/system/priv-app/WellbeingPrebuilt");
delete_recursive("/system/priv-app/YellowPage");
delete_recursive("/system/product/app/GoogleLocationHistory");
delete_recursive("/system/product/app/GoogleTTS");
delete_recursive("/system/product/app/SoundPickerPrebuilt");
delete_recursive("/system/product/app/uceShimService");
delete_recursive("/system/product/app/xdivert");
delete_recursive("/system/product/priv-app/CarrierServices");
delete_recursive("/system/product/priv-app/GoogleAssistant");
delete_recursive("/system/product/priv-app/GoogleFeedback");
delete_recursive("/system/product/priv-app/HotwordEnrollmentOKGoogleHEXAGON");
delete_recursive("/system/product/priv-app/HotwordEnrollmentXGoogleHEXAGON");
delete_recursive("/system/product/priv-app/Launcher3QuickStep");
delete_recursive("/system/product/priv-app/Velvet");
delete_recursive("/system/vendor/app/CneApp");
delete_recursive("/system/vendor/app/aiasst_service");
delete_recursive("/system/vendor/data-app/");
delete_recursive("/system/vendor/data-app/SmartHome");
delete_recursive("/system/vendor/data-app/aiasst_service");
delete_recursive("/system/vendor/data-app/wps-lite");
Kernel Optimization Script:
Code:
#!/system/bin/sh
setenforce 0
set enforce 0
echo 'Y' > /sys/module/sync/parameters/fsync_enabled
sysctl -w net.ipv4.tcp_congestion_control=cubic
#echo '254 255 256' > /sys/devices/platform/kcal_ctrl.0/kcal
#echo '1' > /sys/devices/platform/kcal_ctrl.0/kcal_enable
#echo '290' > /sys/devices/platform/kcal_ctrl.0/kcal_sat
#echo '261' > /sys/devices/platform/kcal_ctrl.0/kcal_val
#echo '264' > /sys/devices/platform/kcal_ctrl.0/kcal_cont
#echo '35' > /sys/devices/platform/kcal_ctrl.0/kcal_min
#echo '0' > /sys/devices/platform/kcal_ctrl.0/kcal_hue
echo 'Y' > /sys/module/wakeup/parameters/enable_timerfd_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_qcom_rx_wakelock_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_netlink_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_ipa_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_wlan_wake_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_wlan_ctrl_wake_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_wlan_rx_wake_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_msm_hsic_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_si_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_smb135x_wake_ws
#echo '0' > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
#chmod 666 /sys/module/lowmemorykiller/parameters/minfree
#chown root /sys/module/lowmemorykiller/parameters/minfree
echo '16384,20736,24576,32256,85296,120640' > /sys/module/lowmemorykiller/parameters/minfree
echo '75' > /proc/sys/vm/swappiness
echo '17' > /proc/sys/vm/dirty_ratio
#echo '0' > /sys/kernel/sched/gentle_fair_sleepers
#echo '2830' > /sys/class/timed_output/vibrator/vtg_level
echo '3' > /sys/kernel/power_suspend/power_suspend_mode
echo '1' > /sys/kernel/fast_charge/force_fast_charge
Google Play Services Anti-Wakelock Script:
Code:
#!/system/bin/sh
setenforce 0
powerService.goToSleep(SystemClock.uptimeMillis() + 1);
echo disable_pm_suspend > /sys/power/wake_unlock
android.permission.WAKE_UNLOCK
/sys/power/wake_unlock
killall -9 android.process.media
killall -9 mediaserver
for apk in $(pm list packages -3 | sed 's/package://g' | sort); do
# Analytics
pm disable $apk/com.google.android.gms.analytics.AnalyticsService
pm disable $apk/com.google.android.gms.analytics.AnalyticsJobService
pm disable $apk/com.google.android.gms.analytics.CampaignTrackingService
pm disable $apk/com.google.android.gms.measurement.AppMeasurementService
pm disable $apk/com.google.android.gms.measurement.AppMeasurementJobService
pm disable $apk/com.google.android.gms.analytics.AnalyticsReceiver
pm disable $apk/com.google.android.gms.analytics.CampaignTrackingReceiver
pm disable $apk/com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver
pm disable $apk/com.google.android.gms.measurement.AppMeasurementReceiver
pm disable $apk/com.google.android.gms.measurement.AppMeasurementContentProvider
pm disable $apk/com.crashlytics.android.CrashlyticsInitProvider
# Ads
pm disable $apk/com.google.android.gms.ads.AdActivity
# Firebase
pm disable $apk/com.google.firebase.iid.FirebaseInstanceIdService
done
exit 0
"I don't want to debloat an app that it does"
To fix that, you will need to update the script your self, but it's quite easy.
1 - Download the script on a Windows based PC that has 7zip and notepad++ installed.
2 - Open the script with zip and navigate to: "META-INF\com\google\android"
3 - Extract the file "updater-script"
4 - Edit it with notepad++ and look at the app you wish it would not debloat (for example, Clean Master)
5 - The delete the line that says "delete_recursive" and the app path (ex: delete_recursive("/system/priv-app/CleanMaster"); )
6 - Save the script and push it back to the zip file
Some apps such as maps, Google Assistant and Android Auto may be debloated on the script, but if you install it via the playstore after, the script will not debloat it, as it wont be a system app anymore.
Current version: v10 (05/03/2020)
Seems to work but phone gets a bit laggy sometimes...
mejgs said:
Seems to work but phone gets a bit laggy sometimes...
Click to expand...
Click to collapse
It may be the VM and OOM, i'll take off those "optimizations" on the next release tomorrow.
What TWRP did you use, if you don't mind me asking.
New Build Up!
Lag should stop now that i disable the VM and OOM custom parameters, plus i added CatchLog to uninstall.
Pupet_Master said:
It may be the VM and OOM, i'll take off those "optimizations" on the next release tomorrow.
What TWRP did you use, if you don't mind me asking.
Click to expand...
Click to collapse
I used 4pda's
Pupet_Master said:
Hey Guys, i've made a script to debloat MIUI and to install some Kernel optimizations at the INIT.D folder plus anti Google Play Services Wakelock Script (at INIT.D as well) and full hosts for adblock without any external app.
Now, i may add more things to debloat since this script was optimized for Redmi Note 5 Pro Whyred and even though it work on that device, on the Redmi 4X Santoni and even on a Moto G LTE Peregrine.. on 4PA TWRP it didn't work. I'm still troubleshooting why. Once i figure out another TWRP that allow me to flash it or what i'm doing wrong (since it isn't a script issue, it's a recovery problem) i'll test other system apps to debloat specific from our Mi9t DaVinci.
That being said, i would like you guys to test it, see if it work for you guys and give me a feedback to what TWRP do you guys use/ what version of MIUI you guys debloated.
Usually i use it on mi-globe but it should work for Xiaomi.eu, Global and Chinese ROMs too (both beta and stable).
Instalation:
1 - Reboot in to TWRP after first boot and setup.
2 - Make a nanodroid full system Backup for safety.
3 - Run the script.
4 - Reboot in to system.
5 - Profit.
Download:
https://androidfilehost.com/?fid=1899786940962594365
What will it debloat:
Code:
"/system/app/AnalyticsCore"
"/system/app/BasicDreams"
"/system/app/BuiltInPrintService"
"/system/app/CatchLog"
"/system/app/CloudPrint2"
"/system/app/Email"
"/system/app/GooglePrintRecommendationService"
"/system/app/greenguard"
"/system/app/KSICibaEngine"
"/system/app/Lens"
"/system/app/MarkupGoogle"
"/system/app/MiDrive"
"/system/app/MiuiBugReport"
"/system/app/MiuiDaemon"
"/system/app/MiuiSuperMarket"
"/system/app/PrintRecommendationService"
"/system/app/PrintSpooler"
"/system/app/SoundPickerPrebuilt"
"/system/app/Stk"
"/system/app/YellowPage"
"/system/app/YouDaoEngine"
"/system/data-app/"
"/system/data-app/BaiduIME"
"/system/data-app/cn.wps.moffice_eng"
"/system/data-app/com.eg.android.AlipayGphone"
"/system/data-app/com.taobao.taobao"
"/system/data-app/com.xunmeng.pinduoduo"
"/system/data-app/Email"
"/system/data-app/MiFinance"
"/system/data-app/MiMobileNoti"
"/system/data-app/MiShop"
"/system/data-app/XiaomiSpeechEngine"
"/system/priv-app/BATestApp"
"/system/priv-app/Browser"
"/system/priv-app/GoogleBackupTransport"
"/system/priv-app/GoogleFeedback"
"/system/priv-app/MiRecycle"
"/system/priv-app/MusicFX"
"/system/priv-app/HotwordEnrollmentOKGoogleWCD9340"
"/system/priv-app/HotwordEnrollmentXGoogleWCD9340"
"/system/priv-app/Velvet"
"/system/priv-app/WellbeingPrebuilt"
"/system/priv-app/YellowPage"
"/system/vendor/data-app/"
"/system/vendor/data-app/SmartHome"
"/system/vendor/data-app/wps-lite"
"/system/vendor/data-app/aiasst_service"
"/system/vendor/app/aiasst_service"
"/system/app/lens"
"/vendor/data-app/SmartHome"
"/vendor/data-app/wps-lite"
"/data/app/SmartHome"
"/data/app/wps-lite"
"/data/app/aiasst_service"
Full Hosts by Masik ROM (thank Masik Devs)
Kernel Optimization Script:
Code:
#!/system/bin/sh
setenforce 0
set enforce 0
echo 'Y' > /sys/module/sync/parameters/fsync_enabled
sysctl -w net.ipv4.tcp_congestion_control=westwood
#echo '254 255 256' > /sys/devices/platform/kcal_ctrl.0/kcal
#echo '1' > /sys/devices/platform/kcal_ctrl.0/kcal_enable
#echo '290' > /sys/devices/platform/kcal_ctrl.0/kcal_sat
#echo '261' > /sys/devices/platform/kcal_ctrl.0/kcal_val
#echo '264' > /sys/devices/platform/kcal_ctrl.0/kcal_cont
#echo '35' > /sys/devices/platform/kcal_ctrl.0/kcal_min
#echo '0' > /sys/devices/platform/kcal_ctrl.0/kcal_hue
echo 'Y' > /sys/module/wakeup/parameters/enable_timerfd_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_qcom_rx_wakelock_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_netlink_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_ipa_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_wlan_wake_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_wlan_ctrl_wake_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_wlan_rx_wake_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_msm_hsic_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_si_ws
echo 'Y' > /sys/module/wakeup/parameters/enable_smb135x_wake_ws
#echo '0' > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
#chmod 666 /sys/module/lowmemorykiller/parameters/minfree
#chown root /sys/module/lowmemorykiller/parameters/minfree
#echo '19712,22272,36864,58368,65792,108494' > /sys/module/lowmemorykiller/parameters/minfree
#echo '0' > /sys/kernel/sched/gentle_fair_sleepers
#echo '2830' > /sys/class/timed_output/vibrator/vtg_level
echo '3' > /sys/kernel/power_suspend/power_suspend_mode
echo '1' > /sys/kernel/fast_charge/force_fast_charge
Google Play Services Anti-Wakelock Script:
Code:
#!/system/bin/sh
setenforce 0
powerService.goToSleep(SystemClock.uptimeMillis() + 1);
echo disable_pm_suspend > /sys/power/wake_unlock
android.permission.WAKE_UNLOCK
/sys/power/wake_unlock
killall -9 android.process.media
killall -9 mediaserver
for apk in $(pm list packages -3 | sed 's/package://g' | sort); do
# Analytics
pm disable $apk/com.google.android.gms.analytics.AnalyticsService
pm disable $apk/com.google.android.gms.analytics.AnalyticsJobService
pm disable $apk/com.google.android.gms.analytics.CampaignTrackingService
pm disable $apk/com.google.android.gms.measurement.AppMeasurementService
pm disable $apk/com.google.android.gms.measurement.AppMeasurementJobService
pm disable $apk/com.google.android.gms.analytics.AnalyticsReceiver
pm disable $apk/com.google.android.gms.analytics.CampaignTrackingReceiver
pm disable $apk/com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver
pm disable $apk/com.google.android.gms.measurement.AppMeasurementReceiver
pm disable $apk/com.google.android.gms.measurement.AppMeasurementContentProvider
pm disable $apk/com.crashlytics.android.CrashlyticsInitProvider
# Ads
pm disable $apk/com.google.android.gms.ads.AdActivity
# Firebase
pm disable $apk/com.google.firebase.iid.FirebaseInstanceIdService
done
exit 0
Click to expand...
Click to collapse
Seems very nice I will test it. I think it's like L-Speed, NFS, FDE.AI or LKT kernel improvements but for MIUI while You are debloating stuff.
Is it working on MIUI 11?
Ky0sHiR0 said:
Seems very nice I will test it. I think it's like L-Speed, NFS, FDE.AI or LKT kernel improvements but for MIUI while You are debloating stuff.
Is it working on MIUI 11?
Click to expand...
Click to collapse
First, thanks for the feedback guys
Yes, you got it right but it go beyond lkt once se get kcal on our device as i tune the colors too (currently disabled though).
And yes it work on miui11
New Build Up!!
Added these apps on the list to be debloated:
/system/app/XMCloudEngine
/system/app/MiLinkService
Re Enabled the OOM setting for memory Management (report if phone get sluggish or not please, as it should not).
echo '19712,22272,36864,58368,65792,108494' > /sys/module/lowmemorykiller/parameters/minfree
The transitions is getting slower. (EU ROM 10.3.15)
someone tested the script with the latest weekly miui 11, EU 9.9.26 ?
stefano alegnini said:
someone tested the script with the latest weekly miui 11, EU 9.9.26 ?
Click to expand...
Click to collapse
Should work fine as it don't mod the rom, just debloat and add scripts
I'm testing new parameters for ram management and virtual memory. Next new build should be smoother
New Build Up!
Changes on Kernel tuneup:
sysctl -w net.ipv4.tcp_congestion_control=cubic
echo '16384,20736,24576,32256,85296,120640' > /sys/module/lowmemorykiller/parameters/minfree
echo '75' > /proc/sys/vm/swappiness
echo '17' > /proc/sys/vm/dirty_ratio
Successfully installed on EU 9.9.26 everything is ok, let's show the battery statistics in a couple of days, thanks for your work
Pupet_Master said:
Hey Guys, i've made a script to debloat MIUI and to install some Kernel optimizations at the INIT.D folder plus anti Google Play Services Wakelock Script (at INIT.D as well) and full hosts for adblock without any external app.
Now, i may add more things to debloat since this script was optimized for Redmi Note 5 Pro Whyred and even though it work on that device, on the Redmi 4X Santoni and even on a Moto G LTE Peregrine.. on 4PA TWRP it didn't work. I'm still troubleshooting why. Once i figure out another TWRP that allow me to flash it or what i'm doing wrong (since it isn't a script issue, it's a recovery problem) i'll test other system apps to debloat specific from our Mi9t DaVinci.
That being said, i would like you guys to test it, see if it work for you guys and give me a feedback to what TWRP do you guys use/ what version of MIUI you guys debloated.
Usually i use it on mi-globe but it should work for Xiaomi.eu, Global and Chinese ROMs too (both beta and stable).
Instalation:
1 - Reboot in to TWRP after first boot and setup.
2 - Make a nanodroid full system Backup for safety.
3 - Run the script.
4 - Reboot in to system.
5 - Profit.
Download:
https://androidfilehost.com/?fid=1899786940962596493
Click to expand...
Click to collapse
Could you kindly drop a version without the hosts file?
ah.kh.ali1 said:
Could you kindly drop a version without the hosts file?
Click to expand...
Click to collapse
Sure I'll so it.in a couple of hours and I'll quote.you
ah.kh.ali1 said:
Could you kindly drop a version without the hosts file?
Click to expand...
Click to collapse
No hosts build up
https://androidfilehost.com/?fid=1899786940962597127
Pupet_Master said:
No hosts build up
https://androidfilehost.com/?fid=1899786940962597127
Click to expand...
Click to collapse
Thanks Alot.
Just flashed V4. I don't know what you did, but it's much smoother now
What does the no host means? Edit... No need I got it now

Question Play systemupdate keeps coming back [debug / technical]

I have something weird with the Google Play systemupdate.
I an currently on 'September 1, 2022'
When I click on it then once every 5 days or so I get a message saying that there is an update of 712K available (looks small to me).
Then 'something' is installed and the phone asks to restart. I obviouysly reboot.
However, I have a script (using adb) that checks ALL packages and versions and when I run this BEFORE and AFTER the upgrade -> NOTHING has changed.
Attached is an adb log where I grepped for 'Finsky'.
In the log you can see that it downloads a package called: com.android.mainline.libs
And from what I can judge from the log: the package is successfully decompressed and the resulting APK is copied to some location.
Then - judging from the log - I am assuming that the phone tries to install that package.
Then at the end of the log it says:
Code:
10-14 16:44:18.504 6712 7515 I Finsky : [65] mgc.a(91): IQ: no installs to evaluate. Skipping.
To be clear: this package does NOT exist on my phone.
As mentioned, after rebooting, NOTHING has changed (same packages, same versions).
Then for a few days I don't get any updated when I press the Play systemupdate.
Then suddenly, the same 712K reappears and the whole thing repeats again.
(play systemupdate remains on September 1, 2020)
Anybody have any clue what's going on here???
Could someone please check if you have the package com.android.mainline.libs on your phone?
Just do:
Code:
> adb shell
$ pm list packages | grep libs
and let me know if you see any output there.
:- confused
@foobar66
I think this is an issue on Google's end:
I have a similar issue on an entirely different phone (Nokia X100, T-Mobile US variant).
The phone shipped with an out-of-date Google Play system update (Phone release date 10/21,the update was dated 05/21).
It showed an update was available (very small size, in kb's). I'd install, reboot. The update would install, then, the phone would reboot on its own a minute later & the update would disappear. This went on for 5-6 months until I finally got an actual update to install that brought me up to July 2022.
The issue is still ongoing, as I'm showing another update is available, that gets me to August 2022.It installs, reboots, uninstalls back to the older July 2022 Google Play system update.
I tried factory resets, they're of no help.
The only suggestion that I have is to reach out to Google directly.
Thanks for the story. I guess I will have to wait some time to see if there is a future update which actually installs. I would prefer not to do a full reset as you indicate that it did not help.
I have this issue, but with just YouTube. Every time I install the update then reboot, it reverts to 17.17.37. A real pain.
Well I just got this 49mb system update
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
@foobar66
Forgot to ask:
Which system update are you on?
FWIW, I'm on the latest Android 13 Beta & both the (system) Security update & Google Play System update are on October 2022.
I am on October 5 system update (latest) so standard A13.
After installing the 49mb update I got that 712kb update, A13 stable SEP
So after I installed the 712kb that was it, it didn't ask me to install again, they must have forgot to add it into the 49mb system update lol
kevinireland11 said:
So after I installed the 712kb that was it, it didn't ask me to install again, they must have forgot to add it into the 49mb system update lolView attachment 5734907
Click to expand...
Click to collapse
That sounds exactly like what the OP described.
But, even after that small update, he did a deep look at things & there is no evidence of any actual addition of info/update installed from the previous September 2022 Google Play System update.
KOLIOSIS said:
That sounds exactly like what the OP described.
But, even after that small update, he did a deep look at things & there is no evidence of any actual addition of info/update installed from the previous September 2022 Google Play System update.
Click to expand...
Click to collapse
Exactly, looks same like I have ... wait a couple of days and check that this 712Kb comes back. It keeps coming back for me, installs, then reboot (and I guess update is rolled back), then re-appears a few days later.
Will be interesting to see if I get a bigger October update ... usually I lag behind 1 month with Google play systemupdates.
Hmm ... interesting ... looks like com.android.mainline.libs does exist on the phone, it's that one which - I believe - the 712K update is trying to upgrade (and which fails for some reason - or may be 'not needed').
Code:
[email protected][/]# pm list packages --apex-only --show-versioncode
package:com.google.android.neuralnetworks versionCode:330443000
package:com.google.android.conscrypt versionCode:330443020
package:com.google.android.adbd versionCode:330444002
package:com.google.android.media versionCode:330443030
package:com.google.android.compos versionCode:1
package:com.google.android.os.statsd versionCode:330443000
package:com.google.android.adservices versionCode:330442000
package:com.google.android.permission versionCode:330912010
package:com.android.btservices versionCode:339990000
package:com.google.pixel.camera.hal versionCode:409012097
package:com.google.android.appsearch versionCode:330443000
package:com.google.android.mediaprovider versionCode:330911040
package:com.google.android.vndk.v33 versionCode:1
package:com.google.android.resolv versionCode:330910000
package:com.google.android.art versionCode:330443060
package:com.google.android.scheduling versionCode:330443010
package:com.google.android.cellbroadcast versionCode:330911010
package:com.android.apex.cts.shim versionCode:1
package:com.google.android.sdkext versionCode:330810010
package:com.google.android.ondevicepersonalization versionCode:330442000
package:com.google.android.media.swcodec versionCode:330443040
package:com.google.android.ipsec versionCode:330443010
package:com.google.android.virt versionCode:1
package:com.google.android.tzdata4 versionCode:331012000
package:com.google.android.runtime versionCode:1
package:com.google.android.wifi versionCode:330910030
package:com.google.android.uwb versionCode:330810010
package:com.android.i18n versionCode:1
package:com.google.android.extservices versionCode:330443000
package:com.google.mainline.primary.libs versionCode:330932000
package:com.google.android.tethering versionCode:330911010
Good article explaining the Google Play systemupdates can be found here:
Project Mainline explained: How Google Play System Updates work
Project Mainline is one of Google's biggest initiatives to reduce fragmentation and improve security in Android. Here's how it works.
blog.esper.io
And, also interesting command:
Code:
[email protected][/]# cmd transparency get apex_info -v
APEX Info:
com.google.android.appsearch;330443000:a2c600c6e1d52812003d2fcb929b26779147b677f758114386231da515cf7f30
Install location: /data/apex/decompressed/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: AppSearch
Module visibility: hidden
com.google.android.adservices;330442000:c760e1d1743ac0cff8673f74271f4d3e42c7ff6265381458a8c3032d9174071a
Install location: /data/apex/decompressed/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Ad Services
Module visibility: hidden
com.android.apex.cts.shim;1:d360e89d7cc2e3f304229ef8254d626ce221a9eb8dc613987983bda6880bffd4
Install location: /system/apex/com.android.apex.cts.shim.apex
Last Update Time (ms): 0
Is A Module: False
com.google.android.adbd;330444002:dd57d98de3a4fe5405afa75ec0da618632abe2acce7b3d58a6c2134ba813cedc
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: ADBd
Module visibility: hidden
com.android.btservices;339990000:2461540e89b9babdb5430d1fd203fbcb455561d77f4532bc4c1c5162b27790e0
Install location: /system/apex/com.google.android.bluetooth.apex
Last Update Time (ms): 0
Is A Module: False
com.google.android.compos;1:8558e1c42f70f9bac6158dd7d131802eab0e02ae7d4baf9216f08a4f84b01e9d
Install location: /system_ext/apex/com.google.android.compos.apex
Last Update Time (ms): 0
Is A Module: False
com.google.android.art;330443060:e1561888efd71e8c4908f77d5b2988172fc059c339195d8fc764b4826102c3d9
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Android Runtime
Module visibility: hidden
com.google.android.extservices;330443000:7591f33aa4568b3c1223a3a1c3baffceabb4f36576cb5b2a254b51663116631a
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Android Services (APEX)
Module visibility: hidden
com.android.i18n;1:034e5468adeaab036c3132f2d34305a68f9b82b46d48c021f2d1cb8940173787
Install location: /system/apex/com.android.i18n.apex
Last Update Time (ms): 0
Is A Module: False
com.google.android.conscrypt;330443020:16d41be92395907fcc20156cd250fb58dd3151a13e8fd8fc4ded54889608d4a8
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Conscrypt
Module visibility: hidden
com.google.android.media;330443030:697bc3212912b01c1dea72f4dd43f85d11c0fe0b8d348d69d90c9a1ebb0546df
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Media
Module visibility: hidden
com.google.android.mediaprovider;330911040:2480386cc0b5fac883a9c3fdb95faaa743a5af6a487f8cf3c3788a78fd609b1d
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Media Provider
Module visibility: hidden
com.google.android.media.swcodec;330443040:718e4783f33b92b6ae9c5d28b580e72c88c76c0a145d5680d3e4156c468a2afd
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Media Software Codec
Module visibility: hidden
com.google.android.neuralnetworks;330443000:9f2415c4d36b4c6b51e41fa59766b9330dbe0e07b3cd88f68ec26de303957b5e
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Neural Networks API
Module visibility: hidden
com.google.android.ondevicepersonalization;330442000:9ce80291035e94f048c41cb2481d018bbe9cab53182b4698bfc1e9a7f9c8206e
Install location: /data/apex/decompressed/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: On Device Personalization
Module visibility: hidden
com.google.android.os.statsd;330443000:2aa8b0dee8541a48f4f9835e12e3e257692de89e084d8cdadd1722762e892e83
Install location: /data/apex/decompressed/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Statsd
Module visibility: hidden
com.google.android.ipsec;330443010:a770e199f7aad099b480df81d669d4d1b33cefa67c3876fb7f122f9486be1429
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: IPSec
Module visibility: hidden
com.google.android.permission;330912010:81b2f2160773d45911751faec4bce24fd76a992e4ab34febac83c101abe73c64
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Permission
Module visibility: hidden
com.google.android.resolv;330910000:ff28067c9a0f70c2ff211dd470abafd69a56ce9308253591325309c81756459e
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: DNS Resolver
Module visibility: hidden
com.google.android.cellbroadcast;330911010:6a568ca448521ff58aa3189f8011215b6dca78500bfa67d0b25736c7456280a9
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Cell Broadcast
Module visibility: hidden
com.google.android.sdkext;330810010:9b963f10159bba65ba72ae8ea2f39c38e7394347842fe1774b592cf1d757fc46
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: SDK Extensions
Module visibility: hidden
com.google.android.runtime;1:76b7294510054103b6bf0f9a2dcf65dcdb1d7570bec8b3642826a56c2af4c5ad
Install location: /system/apex/com.android.runtime.apex
Last Update Time (ms): 0
Is A Module: False
com.google.android.tzdata4;331012000:13494225bf87f216ed717a9d29da4b7a25de793eaa315b15d94bbaa305087a70
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Time zone data
Module visibility: hidden
com.google.android.virt;1:996bbe7cc6aad7dd7c1abccc6cf78c433455920fbcf4c50db6cc64a211ea6361
Install location: /system_ext/apex/com.google.android.virt.apex
Last Update Time (ms): 0
Is A Module: False
com.google.android.tethering;330911010:3357e8b165d0a77cf30d3327b9242e44e51e4c365c292b396976f0044100731d
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Tethering
Module visibility: hidden
com.google.android.uwb;330810010:8f100f2227cde2421d71173a4c9095d6cf029762968798a3353ad3a659dc7e96
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: UWB
Module visibility: hidden
com.google.android.vndk.v33;1:fcabdb46d2ab408c0e577be689c5b9cb2d92306f99e309fd343cdfe526276b23
Install location: /system/apex/com.android.vndk.current.apex
Last Update Time (ms): 0
Is A Module: False
com.google.android.wifi;330910030:8f8cea16d5c101c1bf32a447f82bc12e195e1cda606cd8c5e770b2cc57a0aa7d
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: WiFi
Module visibility: hidden
com.google.android.scheduling;330443010:9411f4313b026c5c8f6586cdda20e19a1cd8c098a09b812497e155514e23a407
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Device Scheduling
Module visibility: hidden
com.google.pixel.camera.hal;409012097:ccb500fa068056597a175b0d500688c0aa11c4cc2ba0a2b9e6e5d9f4a8ed854c
Install location: /vendor/apex/com.google.pixel.camera.hal.apex
Last Update Time (ms): 0
Is A Module: False
com.google.mainline.primary.libs;330932000:2d86ffbd72435c3c3d01236a1a5bf9b6a2b14da89b1953ebdd8fb80aca80a192
Install location: /data/apex/active/[email protected]
Last Update Time (ms): 0
Is A Module: True
--- Module Details ---
Module name: Dynamic Common Libraries
Module visibility: hidden
OK, so today I got an update of 614K, diff:
Code:
< package:com.google.android.os.statsd versionCode:330443000
---
> package:com.google.android.os.statsd versionCode:330443030
Still on September 2022.
I was on August and thank to this thread checked for a new update.
After reboot: August Version

Categories

Resources