General Treble Build Guidance Based SODP
Support devices:Xperia X, Xperia X Performance, Xperia X Compact
Xperia XZ, Xperia XZs. Xpeira XZ Premium
PrincipleSODP team has done everything to Go treble on AOSP Pie. So if you want to go treble, you need only to do a little work.The key is to enable VNDK and provide a Vendor partition.
As is known to us, there are many partitions exist in our devices. But not all of them are necessary for AOSP. 300KB disk space is enough for our AOSP cache partiton, but sony give us more than 300MB. It's a waste of disk space. Besides, all of these devices I mentioned support Qnovo charging technology, there is a partition in our phone named Qnovo for this stock function. It about 10~30MB. But we don't need it on AOSP. So we can use these two partition to Go Treble.
How to go trebleWe need to use cache partition as vendor partition and Qnovo partition as cache partition.
I'll take Maple as an example. How to modify devices tree to support treble.Enable VNDKMaple's Devices tree: Link We need to add vndk modules config in device.mk. See picture.
{
"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"
}
Add new partition table configYoshino's Devices tree: LinkFirst Step:
For maple, we need to add partition table config in BoardConfig.mk..
Notice: Because Yoshino platform has 3 devices. XZ1 and XZ1C has a vendor partition. The partition table config is in devices's BoardConfig.mk. For tone and loire platform, all of their devices has the same partition table. Their partition table config is in platform devices tree's PlatformConfig.mk.
The cache and vendor partitions' size shoud depend on phone's actual size. You can use my config. I had set it smaller than actual size.
See picture:
Second Step:
For maple, we need to modified fstab in Yoshino platform device tree, the path is: rootdir/vendor/etc/fstab_legacy.yoshino.
See picture:
Third Step:
We need to modified selinux policy in Yoshino platform device tree, the path is: sepolicy_platform/file_contexts.
See picture:
Fifth Step:
To avoid SELinux policy errors and fail to boot, we'd better set selinux=permissive in BoardConfig.mk or PlatformConfig.mk.
Modify kernel fstab configFor maple the path is arch/arm64/boot/dts/qcom/msm8998-yoshino-maple_common.dtsi
Notice: For tone and loire platform, you need to find the platform common config in the same floder, like msm8996-tone-common.dtsi, msm8952-loire-common.dtsi
You need to set right vendor path and status, just like configs of system and oem partition
After doing this, you can build a treble ROM
By Sjll
2019.2.16
Sjll said:
there is a partition in our phone named Qnovo for this stock function. It about 10~30MB. But we don't need it on AOSP. So we can use these two partition to Go Treble.
Click to expand...
Click to collapse
Sjll said:
We need to use cache partition as vendor partition and Qnovo partition as cache partition.
Click to expand...
Click to collapse
Two wrongs things here.
First, it's not true that Qnovo cannot work with AOSP.
Secondly, you aren't really forced to nuke a partition. You can just do like ix5, with oem repurposed to hold both odm and vendor.
Related
Hi ,
i want to compile kernel with compat-wireless 3.6 compatibility (drivers for monitoring mode / packet injection) , so for start
i compiled kernel from asus source
changed kernel config
then i have make kernel image then blob
and this is where i need to help
after flashing blob to TAB i have bricked it , 2 times already, i have it now from service.
first time i tried to flash blob from .zip
second time i tried dd to /dev/block/mmcblk0p4
i need help with this.
thank you
...........................................................
slider SL101 with revolver 4.2.1
external USB adapter Edimax-EW-7811Un (rlt8188cus chipset)
{
"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"
}
with working monitoring mode / packet injection
Fluffinko said:
Hi ,
i want to compile kernel with compat-wireless 3.6 compatibility (drivers for monitoring mode / packet injection) , so for start
i compiled kernel from asus source
changed kernel config
then i have make kernel image then blob
and this is where i need to help
after flashing blob to TAB i have bricked it , 2 times already, i have it now from service.
first time i tried to flash blob from .zip
second time i tried dd to /dev/block/mmcblk0p4
i need help with this.
thank you
...........................................................
slider SL101 with revolver 4.2.1
external USB adapter Edimax-EW-7811Un (rlt8188cus chipset)
with working monitoring mode / packet injection
Click to expand...
Click to collapse
Did you include an appropriate init ramdisk? A flashable kernel package usually includes the blob, a META-INF folder and a system folder. The blob, when unpacked, includes at least a blob.LNX (which is the same as a boot.img) which when unpacked further contains the init ramdisk file system and the kernel zImage. The META-INF folder has the updater-script and maybe a few other files and the system folder may have an lib/modules folder for the modules built with the kernel and possibly an init.d folder for startup scripts and such. The init ramdisk has the system initialization files for the underlying Linux system that Android runs on top of.
{
"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"
}
Overview
This is a more than full-featured APKTool GUI, It has a few options for porting which I'll explain in great detail but for now I'd like to say despite the minimalistic look which will stay lite forever, it does do a lot for efficiency and can be used for things other than MIUI, but is made especially for MIUI.
Notepad++
This deals with edits that need to be made with Notepad++ in general; It will open the selected file from WIP as well as the one from the Rom being ported for easy comparison.
Kernel Options
Pretty Simple, Executing the 'Unpack Boot.Img' Command will automatically split your Ramdisk; which can be found in root\boot, Repack puts everything back together and inserts Boot.img back into your WIP Rom folder.
Backup Options
Use this to make a backup of the current WIP Rom files; any backup files stay present until manually overwritten; saving time since the boot.img and updater-script can be used for any MIUI build generally.
Target
When a Workspace is generated, all APK and JARs will be placed into respective folders for easy access, tick 'Base' to work with your base rom APK and JARs and tick Port to work with your Port rom components
Download: MIUI APKTool 0.10
Handbook and source / Original post
Misc. Notes
This can be compiled If you have AHK installed easily by just pasting the code into a new AHK file.
Are you a fans of MIUI?
ImaxAndroid said:
Are you a fans of MIUI?
Click to expand...
Click to collapse
Huge fan, I'm also a member of the porting team at en.miui.com ;x
Bump, I have recoded this and it is less complex in general, using only variables to keep track of its own settings.
Aapt should be kept in the same directory and folder settings are no longer persistent for the sake of simplicity; however rotating folders are still possible and it works the same as before
I added porting options lol
Bump, I've added more to this and removed the need to have to set folders before each use; Ramdisk stuff has been streamlined to be more 'in the background' and the option to backup Build.prop, Updater-Script and boot.img have been added as well.
The Backup options apply to things inside 'WIP' and when using the Load option, it inserts backup content into WIP. This takes a lot of pain away from multiple ports or multiple attempts when trying to find the right base as far as Updater-Script and Boot.img go.
Lastly the Workspace Generator has been updated to mirror the new dependancies that have appear in MIUI 3.9, this should now support all MIUI JB versions 3.9 and under
Lastly the GUI is less clunky and less obnoxious to use, and faster in general
any tutorial on how to use this?
Will try
Hey guys i've just done full wipe and succesfuly flashed ROM but I can't flash gapps. Everytime it says : "Insufficient storage space available in System partition (blabla)" . I have about 12gb left so the free space isn't an issue I think.
System partition is not the main storage area.
I think you can check either through TWrp or through Drives application what consumes the space of system partition.
RASTAVIPER said:
System partition is not the main storage area.
I think you can check either through TWrp or through Drives application what consumes the space of system partition.
Click to expand...
Click to collapse
I am having same issue.
But I have flashed only the rom.
/system
/Data
/Cache
all were formatted before. I am still getting the same issue.
xeltos said:
I am having same issue.
But I have flashed only the rom.
/system
/Data
/Cache
all were formatted before. I am still getting the same issue.
Click to expand...
Click to collapse
If you are trying to flash Stock package of PA Gapps the size is 437MB.
Your system partition is too small. It will not fit.
Try flashing the smaller Full Modular(366MB), Mini Modular(~232MB) or Micro Modular(~182MB) Gaaps
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
You can then install any missing Google apps you desire from Google Play . They will be installed as user apps instead of system apps.
I did this:
1. Install newest TWRP app
2. Download CM-12.1-20151101-UNOFFICIAL-maguro.zip (or newer) to your device
3. Download open_gapps-arm-5.1-pico-20151104.zip (or newer) to your device
4. Run TWRP
5. Wipe and factory reset
6. Install CM-12.1-20151101-UNOFFICIAL-maguro.zip
7. Install open_gapps-arm-5.1-pico-20151104.zip
8. Reboot
Voila
the reason for that you trying to install all Gaps package which is not possible for your device according to space calculation
To fix this problem do these steps
1-create text file and name it ( gaps-config)
2-add these lines
Exclude Books
Exclude Chrome
Exclude CloudPrint
Exclude Docs
Exclude Earth
Exclude ExchangeGoogle
Exclude Slides
Exclude Sheets
Exclude NewsWidget
Exclude PlayGames
Exclude Keep
Exclude Hangouts
Exclude Fitness
then save the text file in the same gaps.zip file directory
3-now flash the gaps and done..
note you can exclude more aps or include other as you want as long as you had the space requirements .
i just downloaded only one Gaps package which is the full package , and then i customize which app to include or exclude and here is my review related to this error ( skip to 13 minute )
Hi Guys, I have problems with my \system partition, it's almost filled for 90% and I moved almost everything out of that partition by converting it to user apps...
My current Note 3 (32gb) config is:
/System : 2,21
/Data : 26,36
I want to use 1 gb from my /data partition to be part of my System partition so that I have 3,21gb and my data partition 25,36
I found these two articles for other samsung phones:
http://android.stackexchange.com/questions/79112/resize-system-partition-of-galaxy-s-2
http://forum.xda-developers.com/showthread.php?t=2765846
But I was wondering if there is some other way for the Note 3 ?
Help?
No ideas?
sebastienbo said:
No ideas?
Click to expand...
Click to collapse
Wrong forum. Q&A - here: http://forum.xda-developers.com/galaxy-note-3/help
On a side note...
DON'T GODDAMN PLAY WITH PARTITIONS ON A DEVICE YOU PAID 600$ FOR.
Do like normal people - a factory reset, a new ROM, easy squeazy peazy smooth fast stable phone.
Partitionning is not magic or sorcery
I do it all the time with devices of 2000+ euro
It's just that with android it's a bit new to me, but everybody that has used a pit file to flash their custom rom also has partitioned, so it's not really a biggie and it is done frequently.
In my case I have 650 apps and nothing is on the system partition but for some reason I still get up to 2gb of the system partition...
I therefore suspect that each app has maybe some cache or configuration that is anyway stored on the \system partition, or maybe it's the photo app , i know that the thumbnail cache can also grow enormously
Partitionning is not magic or sorcery
Maybe not but flashing PIT files is probably the easiest way to end up with a brick ,
Have a look at Philz Recover .
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
You could start by removing all the languages and csc's you don't need, also all tts files, etc.. i could easily have 900mb+ free in my system partition if i removed some more stuff i didn't need. For example i added the Samsung UK high quality tts voice files into my system partition, it was around 120mb.
Messing with your device's partition table is entirely unnecessary, and just asking for a brick. But hey, if you want to go for it, more power to you. Just don't come crying back here when you're left with a paperweight.
{
"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"
}
Hi and welcome to DualBootPatcher app thread for Mediatek 64 bit devices.
It's available for any MT67xx device under two conditions:
- You compile your own version with support for your handset
- You upload your build.prop and your scatter file. I will compile it for you when I get time. SORRY, BUT I HAVE STOPPED THAT
Disclaimer:
Code:
I take no responsibility for any damage to your device or yourself because you use this app.
Keep in mind that using this app, your device may:
- Gain ability to fly
- Give birth to a dragon
- Trigger a thermonuclear explosion!
- Get you fired from your job because alarm app didn't work
- Simply die!
Downloads:
Grab the latest apk here https://snapshots.noobdev.io
How to get your device supported ?
Method 1: Port it yourself
Before you start porting it, check these info first:
Open your scatter file and make sure that the info match the ones below:
Click to expand...
Click to collapse
(For MT6735 & MT6753)
system.img is for SYS21
cache.img is for SYS22
userdata.img is for SYS23
boot.img is for SYS8
recovery.img is for SYS9
(For MT6752 and maybe MT6732)
system.img is for SYS18
cache.img is for SYS19
userdata.img is for SYS20
boot.img is for SYS8
recovery.img is for SYS9
IF ANY OF THESE INFORMATION DO NOT MATCH THE ONES IN YOUR SCATTER FILE, THEN MOVE TO METHOD 2! ELSE, FOLLOW THE STEPS BELOW.
1) Download the App and install it
2) Unpack your TWRP using Carliv Image Kitchen or any other tool
3) Edit the default.prop file in your unpacked TWRP by changing the values of the following lines to n560a (if you have MT6735 or MT6753) , for brand, set it to JIAYU. If you have MT6752 set it to h560 and the brand is the same.
ro.product.model=
ro.product.brand=
ro.product.name=
ro.product.device=
4) Now repack your TWRP and flash it.
5) Boot to your current rom, edit build.prop file and change the same values you did change on step 3. After that, reboot your device and now you are good to go.
6) If you wish to patch a zip, choose n560a - Jiayu S3 Plus for MT6735 or MT6753 (the app should detect that automatically if you did everything right). If you have MT6752, choose h560 - Jiayu S3.
Method 2: Add support for your device yourself!
If you are unlucky and your partition table didn’t match any of the above ones, then you will have to add your device manually and compile the app yourself.
1) Download the source code at https://github.com/chenxiaolong/DualBootPatcher
2) Edit jiayu.cpp file in libmp/devices and add your device’s partitions numbers. For MT6735 & MT6753, base your edit to n560a and for MT6752 base it to h560.
3) Compile it with the new changes. Your device should be supported now.
I haven’t tested for MT6795, but you may check in xiaomi.cpp file to see if you can base your port off one of the device’s configuration in it.
Click to expand...
Click to collapse
Usage:
Refer to this XDA thread to use the app http://forum.xda-developers.com/hot-2/orig-development/app-dualboot-multiboot-infinix-hot-2-t3425807
IF YOU GET BLACK SCREEN OR PHONE VIBRATES FEW TIMES AND REBOOT TO RECOVERY WHEN YOU TRY TO BOOT A SECONDARY ROM, THEN REPLACE “forceencrypt” with “encryptable” ON THE USERDATA PARTITION OF YOUR FSTAB FILE.
Old guide is below if you still need it.
Currently supported devices:
- Tecno Camon C8 (h352)
- Quantom Go 4G (Q2)
- Allview Viper X (V2_Viper_X)
- GiONEE Elife S Plus (SPlus)
- ZTE Blade V6 (Blade_V6)
Downloads:
Current realease is here => DualBootPatcher_arm64.apk mega.co.nz (16 MB)
How to use it ?
Refer to this thread of mine for Infinix HOT 2 or this one for Android One 1st gen devices.
Want to compile it ?
I encourage you to do so!
Clone either the original repo here https://github.com/chenxiaolong/DualBootPatcher and add your device in supported list by editing one of the .cpp files in libmbp/devices
Or, clone my fork of the repo here https://github.com/Nonta72/DualBootPatcher and just edit the mtk64.cpp file in libmbp/devices dir.
Bugs:
- In-app flasher doesn't work
- If you flash an Android 6.0.x rom as secondary, the ROM will show that the sdcard is corrupted even thought it really is not. So you have to install 6.0 ROMs has primary. If you only have 6.0 roms, well, I am sorry but you have to wait till I figure out what triggers the fake sd card corruption.
Credits and thanks:
All thanks go to @chenxiaolong for his awesome and incredible app!