[Kernel] [MAINLINE] [Linux-5.XX BASED] [GCC9] Mainline Linux For Xiaomi Mi6 [New Update 5.11.14] - Xiaomi Mi 6 ROMs, Kernels, Recoveries, & Other Dev

Code:
* Your warranty is now void.
* I'm not responsible for anything that may happen to your phone by installing any custom kernels.
* You do it at your own risk and take the responsibility upon yourself and you are not to blame us or XDA and its respected developers.
Code:
This is a mainline linux port with some out of tree patch for DRM/PANEL and GPU
not tested on Android yet . Only ARM Linux distributions are been tested
How to test :
Make a new folder on /data/.stowaways
Grab any Linux OS you want to test place the rootfs on /data/. stowaways/postmarketOS.img
mount your rootfs and copy kernel modules on /lib/modules/ and also copy firmware file to /lib/firmware/
Than flash the kernel bellow and reboot
Note:
Wifi currently dos not works out of the box but if anyone want to try it just flow below guide
Update 25/04/2021:
+ update linux to 5.11.14
+ battery status are working now (charging may or may not work)
+ wifi working with some additional step along with firmware attached below
+ Bluetooth working fine
+ DRM/PANEL working via JDI-FHD-R63452
+ GPU working with mesa gallium driver
+ Haptics
+ Touchscreen using mainline RMI4
+ Vol Up key
+ Power button
NB: for wifi you will need
Install the following packages: pd-mapper, tqftpserv, qrtr & rmtfs
using your package manager if they are available if not clone than from this repo <https://github.com/jhugo/linux/tree/5.5rc2_wifi> and build and install
than clone & build & install diag-router from <https://github.com/andersson/diag>
run:
/bin/diag-router &
systemctl start rmtfs tqftpserv pd-mapper
After that you will be able to connect to the wifi successful
See screenshot bellow of a running Manjaro plasma-mobile OS
{
"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"
}
Ubuntu 21.04
and this thered edited on Debian 11 with phosh gui
Source :
https://github.com/degdag/W.I.P_sagit_mainline

does it support anbox?

When starting, display "or press Control-D to Continue" and wait.Cannot continue BOOT.
IMG is the result of Manjaro-ARM-plasma-mobile-dev-pinephone-210126.img decompression.
https://kdebuild.manjaro.org/images/dev/Manjaro-ARM-plasma-mobile-dev-pinephone-210126.img.xz

artful said:
When starting, display "or press Control-D to Continue" and wait.Cannot continue BOOT.
IMG is the result of Manjaro-ARM-plasma-mobile-dev-pinephone-210126.img decompression.
https://kdebuild.manjaro.org/images/dev/Manjaro-ARM-plasma-mobile-dev-pinephone-210126.img.xz
View attachment 5287775
Click to expand...
Click to collapse
mount your rootfs image and edit /etc/fstab and remove everything there than it should boot fine to gui

hajking said:
does it support anbox?
Click to expand...
Click to collapse
Yes the kernel has been compiled with anbox support as well

Fstab is empty。
I think it is possible that the SDCard is not decrypted, so I will try it when I have spare time.

artful said:
Fstab is empty。
I think it is possible that the SDCard is not decrypted, so I will try it when I have spare time.
Click to expand...
Click to collapse
Ofc storage need to be decrypted to get it working

degdag new dev said:
Yes the kernel has been compiled with anbox support as well
Click to expand...
Click to collapse
so where is the complete installation guide? i mean step by step. i downloaded manjaro lomiri from here but no chance amd i tried kde beta4. it gives kernel panic. am i doing right?
1. copy postmarketOS.img
2. flash kernel.img
3. reboot
should i change file system to f2fs?

hajking said:
so where is the complete installation guide? i mean step by step. i downloaded manjaro lomiri from here but no chance amd i tried kde beta4. it gives kernel panic. am i doing right?
1. copy postmarketOS.img
2. flash kernel.img
3. reboot
should i change file system to f2fs?
Click to expand...
Click to collapse
For manjaro lomiri you will need to empty /etc/fstab from any partition mount point
Also can you provide pic or dmesg to see the error

degdag new dev said:
For manjaro lomiri you will need to empty /etc/fstab from any partition mount point
Also can you provide pic or dmesg to see the error
Click to expand...
Click to collapse
is there any created log file?
how can i empty fstab?
is the kernel verison of img file important?

hajking said:
is there any created log file?
how can i empty fstab?
is the kernel verison of img file important?
Click to expand...
Click to collapse
it's depending on what os your using . But most of than log file will be under /var/log.
just open it with a text editor and remove all line there.
I recommend you to use the last kernel version I uploaded Wich you will have to Copy the kernel modules to rootfs .

Hello , I got error saids "
Error: ../arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dtsi:516.1-17 syntax error
FATAL ERROR: Unable to parse input tree " while compling with pmboostrap or "envkernel.sh".
Would u please help check this?

pugna said:
Hello , I got error saids "
Error: ../arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dtsi:516.1-17 syntax error
FATAL ERROR: Unable to parse input tree " while compling with pmboostrap or "envkernel.sh".
Would u please help check this?
Click to expand...
Click to collapse
Look at line 516 on sagit dtsi file under /arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dtsi it has some error
You can link me the source if you want more help

能不能给个详细的教程,我不知道怎么做 能不能给个详细的教程,我不知道怎么做

Can you give a detailed tutorial, I don't know how to do it

Download a compatible image or create one using pmbootstrap (see 1, 2)(advanced).
Pmbootstrap: basically the same standard process, but using split:
Code:
pmbootstrap init -> Xiaomi -> Sagit
pmbootstrap install --split
pmbootstrap export
adb shell mkdir /data/.stowaways
adb push /tmp/postmarketOS-export/xiaomi-sagit-root.img /data/.stowaways/postmarketOS.img
Note: image should contain only the rootfs partition.
This should boot, but there will be errors because lack of this exact kernel moduels, to fix this, edit the .img.
You should be able to do this with other arm64 .img, containg only rootfs, also.
Inside the image:
You can do this on your Linux PC or directly on phone using TWRP.
Copy kernel modules from 5.11.14-xiaomi-msm8998.zip to /lib/modules/
Copy firmware files from firmware.zip to /lib/firmware/.
E.g. using TWRP:
Code:
adb push 5-11-14-xiaomi-msm8998.zip /sdcard
adb push firmware.zip /sdcard
adb shell
cd /sdcard
unzip 5-11-14-xiaomi-msm8998.zip
unzip firmware.zip
mkdir /mnt/rootfs
mount -o loop -t ext4 /data/.stowaways/postmarketOS.img /mnt/rootfs
cp -r 5.11.14-xiaomi-msm8998/ /mnt/rootfs/lib/modules
cp -r firmware/* /mnt/rootfs/lib/firmware/
umount /mnt/rootfs/
reboot

Seems all firmware files was included in postmarketos edge channel now, but wifi isn't working
Update: v6.1_rc3 fixs it.

Related

[Obsolete] [ROM] Stock 3.2.78 firmware rooted on squashfs/ext4 for SDE enabled Gen9

Hi All,
Here is rooted 3.2.78 firmware for SDE enabled devices.
I did two versions:
- squashfs (like my previous build), in this one, system is read-only, you can't add/remove stock apps and edit system files. Files are compressed so it takes less storage space than ext4, it should be also slower than ext4.
- ext4, system is read/write and should be quicker. Be careful if you modify system files though.
Both have kernel/modules from 3.2.78.
To install it:
0) You must have SDE installed. If you didn't do it already, check there instructions on how to do it.
1) Extract zip file content
2) Copy android_3.2.78.squashfs (or android_3.2.78.ext4) to internal storage root. You can do it the usual way or with adb with this:
Code:
adb push android_3.2.78.squashfs /data/media
or
Code:
adb push android_3.2.78.ext4 /data/media
3) Reboot
4) On boot menu, select "Recovery system"
{
"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"
}
5) Select "developer edition menu"
6) Select "flash kernel and initramfs"
6) A drive should appear on your PC, copy zImage and initramfs.cpio.gz to it.
7) Select OK, the kernel should flash.
8) Select OK to reboot and maintain vol+ pressed. Boot menu should appear after reboot.
9) Select SDE in boot menu, you should be rooted and SuperUser functional.
The only change from stock: I enabled vibrator control panel option, it has been reported to work on some, it doesn't on mine.
I checked 3.2.78 stock firmware, it has an updated bootloader, it may be worth flashing stock firmware too to have everything synched.
Download rooted 3.2.78 on squashfs here.
Download rooted 3.2.78 on ext4 here.
Cheers,
LeTama
great thank you
gonna flash it as soon as its downloaded
btw do i have to do any special things to flash the ext4 ?
Ok...good job....!!!
I understand now why I did not have options rw in root-explorer....because I managed the Rom with squashfs and not with ext4.....
Now everything is ok....thanks again @letama...
No, nothing special for ext4, same thing as squashfs...
letama said:
No, nothing special for ext4, same thing as squashfs...
Click to expand...
Click to collapse
Are you saying that installing with ext4 partition I'll can't be mount RW in root_explorer ?
-because with squashfs I can't ....
surdu_petru said:
Are you saying that installing with ext4 partition I'll can't be mount RW in root_explorer ?
-because with squashfs I can't ....
Click to expand...
Click to collapse
no i think he answered my question from above
surdu_petru said:
Are you saying that installing with ext4 partition I'll can't be mount RW in root_explorer ?
-because with squashfs I can't ....
Click to expand...
Click to collapse
No, sorry, our posts crossed, I was effectively replying to djnilse. I'm trying to refrain my "quote mania", it was not a good idea this time
Ext4 is R/W, and permanently, no need to remount it in root explorer.
I would have preferred ext4 mounted first as r/o and allow the option to remount as r/w when needed, but this is not possible with the way Archos designed their rootfs.
Hi Letama,
Thanks for your build but I cant use your kernel with 3.2.78 kernel modules and when I extract kernel from 3.2.78, init kernel does not boot :/.
Thanks in advance
Thaolia
ok i flashed it everything worked fine
i have now a dualboot recovery menu with Android(non-root) and developer(root)
on developer the root is ok, also the system is r/w
thx letama for the rooted newest update
As a question to get out of the way early in the thread, I'm on your earlier rooted one, do I need to wipe?
Sent from my HTC Desire HD using xda premium
Tha0lia said:
Hi Letama,
Thanks for your build but I cant use your kernel with 3.2.78 kernel modules and when I extract kernel from 3.2.78, init kernel does not boot :/.
Thanks in advance
Thaolia
Click to expand...
Click to collapse
Archos kernel is using a new compression scheme for initrd, check my howto, the "find . | cpio ..." command. You need to rebuild your initrd.
Quinny899 said:
As a question to get out of the way early in the thread, I'm on your earlier rooted one, do I need to wipe?
Click to expand...
Click to collapse
I don't think so, Archos firmware update doesn't, so it shouldn't be necessary.
I had to wipe mine for another reason so I can't be sure though.
letama said:
Archos kernel is using a new compression scheme for initrd, check my howto, the "find . | cpio ..." command. You need to rebuild your initrd.
Click to expand...
Click to collapse
My extract kernel is of 5Mb (I use your howto for extract the 3.2.78 kernel). Init and recovery extract kernel doesn't boot with a lzop initramfs.cpio. Wheras with your kernel and modules, all works fine.
Sry but I certainly forget somethings.
Thanks in advance
Thaolia
Tha0lia,
5 MB is wrong:
- aos-unpack gives you 9_MMCF (5145304)
- dd strips header and gives you init_kernel which contains zImage+initrd (5145040)
- aos-kernel-unpack of init_kernel gives you kernel and initrd separated (unpacked-kernel, unpacked-cpio.gz), that I renamed to init-zImage afterwards.
This is the one you want, size should be 3993572.
Cheers,
LeTama
Noticed an issue in the first post:
adb cp should read
adb push
Sent from my ARCHOS 80G9 using xda premium
Quinny899 said:
Noticed an issue in the first post:
adb cp should read
adb push
Click to expand...
Click to collapse
Thanks! I shouldn't post when I'm in a hurry . First post fixed.
letama said:
Tha0lia,
5 MB is wrong:
- aos-unpack gives you 9_MMCF (5145304)
- dd strips header and gives you init_kernel which contains zImage+initrd (5145040)
- aos-kernel-unpack of init_kernel gives you kernel and initrd separated (unpacked-kernel, unpacked-cpio.gz), that I renamed to init-zImage afterwards.
This is the one you want, size should be 3993572.
Cheers,
LeTama
Click to expand...
Click to collapse
Sorry, your kernel and my extract kernel have same md5sum.
It's my fault but thanks for your help.
Have a nice day !
Thaolia
For the Buzz in FRANCE
http://www.jbmm.fr/?p=25015
(ps : je recherche des rédacteurs "techniques" pour jbmm - envoyez un MP)
Is it possible to get swap working in the build modifications?
When I use swapper for root from the market, reboot and type free, I get this:
It shows it as empty and unused. Any idea why? There's a swapfile on /sdcard, in fat, which is being activated by the app on boot. Could this be fixed? I'm using the latest rooted ext4 version btw
Sent from my ARCHOS 80G9 using xda premium
I got swap working!
You use swapper 2 and direct it to /mnt/sdcard, and rather than /sdcard. Turns out internal is ext and it needs fat
Sent from my ARCHOS 80G9 using xda premium

Partitions not mounting @boot

Hey Guys,
first off i had this issue once before, but in that case i could restore a cwm backup from sd card and after sometime the problem fixed itself,
this time, i switched to bacon and i wanted to prepare the p880 for my sister to use, i downloaded zaiben, formatted my external sd card and put the rom on it, i rebooted to recovery wiped( i used the clean to install new rom in philz recovery if i remember correctly) everything and flashed the rom and exactly as last time, the flash seems to go way too fast and ofc i cant boot into android. now as i formatted my sd i have no backup to restore to. kdz flashing seems hopeless as well, as none of the tools recognize the phone when i put it in s/w upgrade mode,
for proof: i checked /system with aromafm and found it being empty after flashing a rom, i even tried extracting the rom zip on sd and moving the content from the zip to /system manually but after a recovery reboot, /system was empty again( only empty "bin" folder)
is somebody able to explain me why i have this issue and maybe how to fix it, or upload a clean cwm backup of whatever rom for me to use?
thx
Thanks for the help until now, really.......
In Further investigation i could find out that Roms ARE actually flashing properly, but /system and probably other partitions are not being mounted
At Boot or in recovery(manually mounting works Here) which is why aromafm reports an empty /system, after a manual Mount in either recovery itself of Aroma console i can See /system being filled with Rom files, now i will change the thread title accordingly, and now ASK: can i force /system to be mounted at Boot somehow? Someone pls answer this time
Okay this is ridicoulous.... why am i getting no help AT ALL?, thank you srsly.....
i investigated even further and suspected that something with fstab might be wrong, but fstab file looks fine to me:
Code:
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 rw
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 rw
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 rw
if someone bothers to answer: what do you think?
pls help........
bump
please help
What recovery are you using? Are you sure your partitions aren't formatted to F2FS? (which would explain why the (F2FS-) recovery can mount the partitions but the system cannot as it expects an ext4 formatted partition rather than a F2FS formatted one)
i'm using an older version of philz touch (i dont think it has f2fs functionality), as i had weird flickering issues with latest philz,
using cat /proc/mounts shows ext4 for /system and other partitions
~MaX~ said:
i'm using an older version of philz touch (i dont think it has f2fs functionality), as i had weird flickering issues with latest philz,
using cat /proc/mounts shows ext4 for /system and other partitions
Click to expand...
Click to collapse
Did you try to boot another ROM (Slim, nameless, whatever) or using another kernel?
laufersteppenwolf said:
Did you try to boot another ROM (Slim, nameless, whatever) or using another kernel?
Click to expand...
Click to collapse
i tried latest aospa,zaiben, pa 3.99 and iodak kernel (stock or cm according to the kind of rom i tried to boot)
thank you for helping btw, i appreciate it
EDIT: I attached an image of output of cat /proc/mounts (sorry for the size)
{
"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"
}
~MaX~ said:
i tried latest aospa,zaiben, pa 3.99 and iodak kernel (stock or cm according to the kind of rom i tried to boot)
thank you for helping btw, i appreciate it
EDIT: I attached an image of output of cat /proc/mounts (sorry for the size)
Click to expand...
Click to collapse
hmm, can you please grab me a kmsg? (from when it is stuck)
laufersteppenwolf said:
hmm, can you please grab me a kmsg? (from when it is stuck)
Click to expand...
Click to collapse
could you give me a quick how to on using adb in recovery from pc? i put the phone in sideload mode and tried "adb shell dmesg" but the output just was "error close" and using the command in aromafm terminal gave me an endless stream of log
(Also currently need to charge the phone a bit)
EDIT: NVM kmesg incoming....
okay next question, how can i dump the output into a file and how do i know where it hangs? time in recovery is not correct anymore(i set it once but after reboot it was wrong again, also in kmesg the time again seems to be different)
does that part help? i think it has to do with boot
~MaX~ said:
does that part help? i think it has to do with boot
Click to expand...
Click to collapse
nah, I need the entire log
here's how you get it:
boot the system until it is stuck
hard reboot into recovery (don't enter sideload)
then run the following commands:
Code:
adb shell cat /proc/last_kmsg > /sdcard/last_kmsg
adb pull /sdcard/last_kmsg C:\whatever\path\you\like\last_kmsg
then post the file via pastie.com or any other online paste site
laufersteppenwolf said:
nah, I need the entire log
here's how you get it:
boot the system until it is stuck
hard reboot into recovery (don't enter sideload)
then run the following commands:
Code:
adb shell cat /proc/last_kmsg > /sdcard/last_kmsg
adb pull /sdcard/last_kmsg C:\whatever\path\you\like\last_kmsg
then post the file via pastie.com or any other online paste site
Click to expand...
Click to collapse
no such file or directory
by hard reboot you mean vol - and hold power without pulling battery after hang?
~MaX~ said:
no such file or directory
by hard reboot you mean vol - and hold power without pulling battery after hang?
Click to expand...
Click to collapse
Yes, I meant that. But no kernel log seems like your boot partition/kernel is messed up... I guess you'll have to find a way to restore your entire phone via LG tools, I can't see any other way around that..
laufersteppenwolf said:
Yes, I meant that. But no kernel log seems like your boot partition/kernel is messed up... I guess you'll have to find a way to restore your entire phone via LG tools, I can't see any other way around that..
Click to expand...
Click to collapse
two last things then: when i hold vol - and then hold power until i reboot, recovery does not start, it tries to boot android again (has always been like that)
and also: all roms except cm official show no bootanimation before hang, cm does
~MaX~ said:
two last things then: when i hold vol - and then hold power until i reboot, recovery does not start, it tries to boot android again (has always been like that)
and also: all roms except cm official show no bootanimation before hang, cm does
Click to expand...
Click to collapse
1) yeah, I know, easiest way to fix that is to simply pull the battery and then boot into recovery
2) if the bootanimation shows up, it means the kernel as well as the ramdisk have booted properly. So in this case, you should be able to grab a last_kmsg as well as a logcat
hi
today I installed that application " LG-Optimus-4XHD-Recovery-v1.0.apk "
I have selected ClockworkMod Custom Recovery.
It showed that Operation is successful.
than i clicked on "Boot Recovery" to restart my Phone in CloclworkMod Custom Recovery.
since then I am getting only Starting animation. (LG LOGO).
nothing happens.
My battery was full when i performed this procedure
any help please

Getting ext4 file-system instead of squashfs on LG G Watch R running Android 6.0.1

Code:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, thermonuclear war,
* or you getting fired because the alarm app failed.
* YOU are choosing to make these modifications, and if you point
* the finger at me for messing up your device, I will laugh at you.
*/
To do this you'll need a Linux machine with fastboot and adb set up, I'll be using Ubuntu 15.04.
Setup stuff
1. Download and extract GWatchR_lenok_601_MEC23G.zip
2. Download and extract this tool, unless you have something else for boot.img editing.
3. Download and extract this tool
Modify boot.img
1. Open terminal and cd to folder with unpackimg.sh
2. Copy boot.img to the same folder
3. Run ./unpackimg.sh boot.img
4. Open ramdisk/fstab.lenok and edit line with /system info so it'll look like this:
Code:
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1,discard wait
5. Run ./repackimg.sh and copy new boot image somewhere safe.
Setup partitions on watch
NOTICE: Following steps are very dangerous and might brick your watch forever!
1. Make sure you have MEC23G installed on your watch.
2. Flash GWatchR_lenok_601_MEC23G/twrp-3.0.0.img using fastboot:
Code:
fastboot flash recovery path/to/twrp-3.0.0.img
3. Flash your new boot image:
Code:
fastboot flash boot path/to/newboot.img
4. Reboot your watch into recovery mode
5. Open terminal and type:
Code:
adb shell
cd /sys/devices/virtual/android_usb/android0
(sleep 5 && echo 0 > enable && echo "adb,mass_storage" > functions && echo "/dev/block/mmcblk0" > f_mass_storage/lun/file && echo 1 > enable)&
6. Now open gparted on your PC
7. Go to ~4GB disk's partitions
8. Delete 19th and 20th partitions
9. Create two new ext4 partitions, 19th should be ~384MB now and 20th ~127MB
10. Right click on each of partitions and then choose 'Manage flags' and check 'msftdata'
11. Apply all changes
12. Open Disks
13. Select 19th partition click button with two gears then click 'Edit Partition' and in name filed type system and click 'Change'
14. Select 20th partition click button with two gears then click 'Edit Partition' and in name filed type cache and click 'Change'
15. Now close gparted and disks and eject watch partitions
16. Reconnect watch
17. Open terminal and type:
Code:
mkdir system
mount -o rw -t ext4 /dev/sdb19 ./system
NOTE: /dev/sdb19 might be something else on your device, you can find this path in gparted or disks
18. Now type:
Code:
sudo path/to/unsquashfs -f -d /full/path/to/system /full/path/to/system.squashfs.img
19. Type sync and wait for it to finish
20. Eject watch's partitions and wait till you can unplug it
21. Reboot your watch (adb reboot)
Should boot now
Nice post but not really a good idea playing with partitions
Skin1980 said:
Nice post but not really a good idea playing with partitions
Click to expand...
Click to collapse
Yeap, but I need 6.0.1 with writable system. Just sharing my experience
Will this also work with newer Firmwares like MWD84B or M1D63G?
Darthsternie said:
Will this also work with newer Firmwares like MWD84B or M1D63G?
Click to expand...
Click to collapse
Probably, haven't tried that. You'll need to use differn zip with rom stuff.
suleymanovemil8 said:
Probably, haven't tried that. You'll need to use differn zip with rom stuff.
Click to expand...
Click to collapse
Worked perfectly.I updated my Watch to the latest OTA and then dumped my system and boot with these two commands
dd if=/dev/block/mmcblk0p15 of=/sdcard/boot.img
dd if=/dev/block/mmcblk0p19 of=/sdcard/system.img
and then copied them to my laptop via adb pull and changed the stuff
Curious how OTAs will work now. Probably not or I have to change some stuff.
Darthsternie said:
Worked perfectly.I updated my Watch to the latest OTA and then dumped my system and boot with these two commands
dd if=/dev/block/mmcblk0p15 of=/sdcard/boot.img
dd if=/dev/block/mmcblk0p19 of=/sdcard/system.img
and then copied them to my laptop via adb pull and changed the stuff
Curious how OTAs will work now. Probably not or I have to change some stuff.
Click to expand...
Click to collapse
OTA will probably not work. It needs squashfs but we have ext4. You might try editing update zips.
Can you provide a zip file for having a rom with this filesystem?
Thank you!
If is possible...
I can't delete dev/sdc19 /system filesystem is unknow..
Any help?
Thank you!!
Edit:
I've done M1D63X with linux mint and i've installed also sqashfs-tools
sudo apt-get update && sudo apt-get install squashfs-tools
I messed something up... Yeah...
When I try to flash system in ADB I get "FAILED (remote: partition table doesn't exist)"
Help?
sounds promising. i have an urbane 2. is there anyway, i get this running on it in the same way? its aw2 by now. will have a look at the partitions when i come home and send it here.
do i have to delete cache and system?
why did you delete 19th and 20th????
{
"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"
}
https://ibb.co/mGLPrqK
my watch partitions in gparted h--ps://pasteboard.co/Jxg7Cje.png
Beats me, it's been like 4 years, mate
suleymanovemil8 said:
Beats me, it's been like 4 years, mate
Click to expand...
Click to collapse
ok. thanks anyway. a lot of nice work in this thread

Unpacking, Editing, Packing ROMS [.IMG, .DAT] in Windows.

Unpacking, Editing, Packing ROMS GUIDE - Host Zero
First download the tools from the link below.
{
"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"
}
1. system.img
2. system.new.dat
1.Unpacking Repacking system.img
1. Paste your system.img in tools folder
2. Open cmd.exe
3. Type:
Code:
mkdir <your_folder_name>
ImgExtactor <raw_sparse.img> system -i
ex: ImgExtactor system.img system -i
4. Now open your folder you have created, you can find your <raw_image> has been extracted.
5. Now edit the files in system folder as your convenience.
6. Now open properties of folder you have created see the size of folder.
7. Now lets pack the image back, open the minimized command window.
Code:
make_ext4fs -s -l <size_of_your_folder+100>M -a system <name_of_packing_image>.img <your_folder_name>/
ex: make_ext4fs -s -l 512M -a system my_new_system.img system/
8. Done, enjoy!
2.Unpacking Repacking system.new.dat
1. Paste your system.new.dat, system.transfer.list and file_contexts in tools folder.
2. Open cmd.exe
3. Type:
Code:
sprs2ext system.transfer.list <name_of_system>.new.dat
ex: sprs2ext system.transfer.list system.new.dat
4. Now again type:
Code:
mkdir <your_folder_name>
ImgExtactor <raw_sparse.new.img> system -i
ex: ImgExtactor system.img system -i
5. Now open folder you have created and you will find the system.new.dat has been extracted.
6. Edit the extracted files.
7. Open properties of the extracted folder and check the size of folder
7. Now open minimized command window.
Code:
make_ext4fs -T 0 -S file_contexts -l <size_of_folder+100>M -a system <name_of_packing_image>.img <your_folder_name>/
ex: make_ext4fs -T 0 -S file_contexts -I 512M -a system my_new_system.img system/
8. Now again type:
Code:
rimg2sdat <your_raw_image>.img
ex: rimg2img my_new_system.img
9. Done! enjoy.
CLICK HERE TO DOWNLOAD TOOLS
Thank you very much.
You refresh the xda University.
I hope the University becomes more active.
We really need more guides to master android OS.
Sent from my SM-N910P using Tapatalk
I tried as rules mention on this thread. unpack was succeed. when I repack, here is the problem:
1. repack was succeed, but when I flash into my phone by spf tools, my phone was stuck at mi.com logo.
2. when I mount new system.img was created into DiskInternals Linux Reader, the file knowing as uknown file.
repack was succeed, but unable to use.
how to fix it?
A useful guide! Thanks!
Sent from my Sony Xperia Z3 Compact using XDA Labs
kevin mitnick said:
I tried as rules mention on this thread. unpack was succeed. when I repack, here is the problem:
1. repack was succeed, but when I flash into my phone by spf tools, my phone was stuck at mi.com logo.
2. when I mount new system.img was created into DiskInternals Linux Reader, the file knowing as uknown file.
repack was succeed, but unable to use.
how to fix it?
Click to expand...
Click to collapse
hey a bit late but i may help you.
Causes for this:
1. May be your rom is odex.
2. May be you are using OTA Update or Patch instead of full rom.
3. Applying more size while building .img
4. make_ext4fs dosent support all kind of roms. it only supports roms based on ICS, JB, KK... but i dont know how google builds factory images then.
Anyways a alternative.
Flash a full stock or custom rom into your device (with root access and adb support)
connect your device
type in cmd:
adb shell
su
(grant permissions on your device)
ls -al /dev/block/platform/*/by-name
now you will get your PMT table (Partition Management Table.)
ex: system ---> /dev/block/mmcblk07
and other partition information also.
now make system.img using adb.
dd if=/partitionnumber of=/sdcard/system.img
ex: dd if=/dev/block/mmcblk07
now you can find fastboot flashable system.img in your sdcard.
do rest with other partitions also. (boot partition manadatory).
enjoy.
Ticklefish said:
A useful guide! Thanks!
Sent from my Sony Xperia Z3 Compact using XDA Labs
Click to expand...
Click to collapse
Thankyou sir for encouraging.
Ticklefish said:
A useful guide! Thanks!
Sent from my Sony Xperia Z3 Compact using XDA Labs
Click to expand...
Click to collapse
Your Welcome sir.
HostZero said:
hey a bit late but i may help you.
Causes for this:
1. May be your rom is odex.
2. May be you are using OTA Update or Patch instead of full rom.
3. Applying more size while building .img
4. make_ext4fs dosent support all kind of roms. it only supports roms based on ICS, JB, KK... but i dont know how google builds factory images then.
Anyways a alternative.
Flash a full stock or custom rom into your device (with root access and adb support)
connect your device
type in cmd:
adb shell
su
(grant permissions on your device)
ls -al /dev/block/platform/*/by-name
now you will get your PMT table (Partition Management Table.)
ex: system ---> /dev/block/mmcblk07
and other partition information also.
now make system.img using adb.
dd if=/partitionnumber of=/sdcard/system.img
ex: dd if=/dev/block/mmcblk07
now you can find fastboot flashable system.img in your sdcard.
do rest with other partitions also. (boot partition manadatory).
enjoy.
Click to expand...
Click to collapse
thanks for respon @HostZero so much lessons and knowledge about this.
I'll try..report asap
kevin mitnick said:
thanks for respon @HostZero so much lessons and knowledge about this.
I'll try..report asap
Click to expand...
Click to collapse
This method is know as dumping method thanks to dd and su in android devices.
Cmd.exe not work on windows 7 32bit
?
sent from Xperia™ SP | Android 6.0.1
It seems to me that the permissions would be lost when they are dumped from system.img via this method. Are you seeing the selinux contexts preserved?
hamed24 said:
Cmd.exe not work on windows 7 32bit
sent from Xperia™ SP | Android 6.0.1
Click to expand...
Click to collapse
No problem. Open your tools folder in full screen. now below empty white space click (Shift + RightClick) then select Open Command Window Here.
Done!
HostZero said:
No problem. Open your tools folder in full screen. now below empty white space click (Shift + RightClick) then select Open Command Window Here.
Done!
Click to expand...
Click to collapse
Thanks for your help,that's work
Can you take screenshot from your cmd and typed codes, I'm beginner and confused some codes ?
sent from Xperia™ SP | Android 6.0.1
hamed24 said:
Thanks for your help,that's work
Can you take screenshot from your cmd and typed codes, I'm beginner and confused some codes
sent from Xperia™ SP | Android 6.0.1
Click to expand...
Click to collapse
Sorry bro I have recently shifted to Ubuntu14.04 for learning building. Read guide properly you will understand more. I have even provided examples as well as commands. and commands depends in each system folder.
hamed24 said:
Cmd.exe not work on windows 7 32bit
?
sent from Xperia™ SP | Android 6.0.1
Click to expand...
Click to collapse
Hi hamed24
Start-->run--> cmd.exe didn´t work? but using the right Mousebutton is okay?
Seems that Windows has lost the C:\Windows\system32 entry in the PATH Variable... easy to fix...
1. Press "Windows-Sign" Key and Break at the same time (it´s the same as rightclick on the Computer-Icon on the Desktop), click on Advanced System Settings.
2. Inside the new Window, click on Environment Variables, a new window opens. Now the lower part is the important one... look for PATH and doubleclick it.
3. At the end of the line, check if there is a ";" (without quotes). That seperates the different entries.... if there´s one there ... ok, place cursor at the end and enter C:\WINDOWS\SYSTEM32;
4. Hit ENTER, close all Windows, log off and on again.... and try again, should work now. If not, go to Start-->Run--> and type C:\WINDOWS\SYSTEM32\CMD.EXE and there you are
regards...
daywalker386
Thanks :3 Many thanks!!!!!! Very helpful thread!!!!!!
On <size_of_your_folder+100>M
For ex,
The folder size is 924MB, + 100MB=1024MB.
Is it right?
Unexpected argument: system
Hi, is that thread still active?
the tool download link is not working.
Fail could not create Tustarfilesystem

Installing Magisk Via ADB

I have a Xperia z2 D6503 and I want to install magisk without modifying the recovery for one single reason: when I modify the recovery, the safety net will fail.
So I decided to follow this thread to create a new boot image to flash in fastboot: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
After making another post here I managed to pull the stock boot.img that I needed.
Now, the problem comes. I follow the instructions as intended and they work untill I get to " adb pull /data/local/tmp/magisk_inject/new-boot.img "
For some reason the adb didn't generate new-boot.img
Even stranger, the previous command didn't seem to complete nicely. ( " adb shell "cd /data/local/tmp/magisk_inject; mv ../common/* .; chmod 755 *; sh ../update-binary indep boot_patch.sh ../boot.img; mv ../bin/busybox busybox" ")
"
- Unpacking boot image
MagiskBoot v13.6(1360) (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/local/tmp/boot.img]
! Sony ELF32 format detected
! Please use BootBridge from @AdrianDC to flash Magisk
"
So I decided to look into BootBridge hoping that it would show me how to merge these two methods together.
I got to the BootBridge forum: https://forum.xda-developers.com/crossdevice-dev/sony/mod-boot-bridge-sony-elf-t3506883
But it only taught me how to do it via recovery.
The question comes:
Is there a way for me to combine these two methods?
What am I doing wrong?
Is there something I could do to figure this out?
I included a photo of my folder and this is the pastebin with everything I had in the console: https://pastebin.com/LUG067jc
{
"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"
}
IceGordol said:
I have a Xperia z2 D6503 and I want to install magisk without modifying the recovery for one single reason: when I modify the recovery, the safety net will fail.
So I decided to follow this thread to create a new boot image to flash in fastboot: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
After making another post here I managed to pull the stock boot.img that I needed.
Now, the problem comes. I follow the instructions as intended and they work untill I get to " adb pull /data/local/tmp/magisk_inject/new-boot.img "
For some reason the adb didn't generate new-boot.img
Even stranger, the previous command didn't seem to complete nicely. ( " adb shell "cd /data/local/tmp/magisk_inject; mv ../common/* .; chmod 755 *; sh ../update-binary indep boot_patch.sh ../boot.img; mv ../bin/busybox busybox" ")
"
- Unpacking boot image
MagiskBoot v13.6(1360) (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/local/tmp/boot.img]
! Sony ELF32 format detected
! Please use BootBridge from @AdrianDC to flash Magisk
"
So I decided to look into BootBridge hoping that it would show me how to merge these two methods together.
I got to the BootBridge forum: https://forum.xda-developers.com/crossdevice-dev/sony/mod-boot-bridge-sony-elf-t3506883
But it only taught me how to do it via recovery.
The question comes:
Is there a way for me to combine these two methods?
What am I doing wrong?
Is there something I could do to figure this out?
I included a photo of my folder and this is the pastebin with everything I had in the console: https://pastebin.com/LUG067jc
Click to expand...
Click to collapse
Take the new-boot.img and install with the BootBridge stuff from recovery.
Deic said:
Take the new-boot.img and install with the BootBridge stuff from recovery.
Click to expand...
Click to collapse
Firstly, it does not generate a new-boot.img.
C:\Users\Gordol\Desktop\Magisk>adb pull /data/local/tmp/magisk_inject/new-boot.img
adb: error: remote object '/data/local/tmp/magisk_inject/new-boot.img' does not exist
Secondly, I do not want to install a custom recovery since it will mess with the safety net.
IceGordol said:
Firstly, it does not generate a new-boot.img.
C:\Users\Gordol\Desktop\Magisk>adb pull /data/local/tmp/magisk_inject/new-boot.img
adb: error: remote object '/data/local/tmp/magisk_inject/new-boot.img' does not exist
Secondly, I do not want to install a custom recovery since it will mess with the safety net.
Click to expand...
Click to collapse
I assume you have fast boot access? If yes you can just boot the custom recovery without installing it. Use the command 'fastboot boot recovery.img' it will let you boot into the custom recovery without flashing it.

Categories

Resources