Related
Hello everybody,
Before telling you about my issue, i should mention that i am a complete newbie regarding flashing kernels. This was my first try, and it didn't work out too well.
I needed to test the USB OTG/Host Functionality for a project at work, and i read that it was possible to enable it on the Nexus S by flashing a custom kernel (kernel_usbhost_build5_icsnexuss from sztupy). It's probably worth mentioning that prior to this i updated the phone to Android 4.0.3.
So i started this morning by rooting it, unlocking the bootloader and installing CWM.
At that point i realized that the recovery mode wasn't accessible : the graphics of the droid with an open belly appears for half a second, and then it gives me the black screen treatment for about a minute before rebooting.
However since there are other ways to flash kernels, i figured i could do without recovery so i didn't look more into it.
I then flashed the kernel using fastboot with this command :
Code:
C:\Program Files\Android\android-sdk\tools>fastboot flash:raw boot H:\data\Downloads\kernel_usbhost_build5_icsnexuss\kernel\zImage
creating boot image...
creating boot image - 3446784 bytes
sending 'boot' (3366 KB)...
OKAY [ 0.422s]
writing 'boot'...
OKAY [ 0.500s]
finished. total time: 0.922s
From the trace i figured that all went well, but when i reboot it stays blocked on the splash screen with the Google logo. Since then i tried flashing several other kernels, without any success. Also tried to flash an update.zip (both ICS and GB) over fastboot but i get this error :
Code:
C:\Program Files\Android\android-sdk\tools>fastboot update H:\data\Downloads\upd
ate.zip
archive does not contain 'android-info.txt'
archive does not contain 'android-product.txt'
error: update package has no android-info.txt or android-product.txt
So to sum it up i now only have access to the bootloader, without recovery mode.
Before you all jump on me, i know what i did is bad habits (i should have tested the kernel before flashing it), i did it in a hurry without checking i had all sufficient knowledge, and to be honest i would probably have been more careful if was doing it on my personal device.
Truth is now i'm really desperate because i turned my company issued phone into a brick and don't have the slightest idea what to do about it...
Is there any guru out there who knows how i could get out of this ?
Thanks a lot !
Download clockworkmod recovery and use fastboot to flash it.
Fastboot flash recovery yourfilename.img
Enter recovery and mounts and storage and mount USB storage
Transfer the kernel you want to your SD card. The one you flashes isn't a kernel I'm almost sure.
Try a different one.
Then transfer a rom to your SD card.
Factory reset/full wipe, then go to mounts and storage and format everything except your sdcard.
DO NOT FORMAT YOUR SD CARD!!!
Once that is done go to install zip from sdcard and flash the rom and then the kernel and reboot. Should be fine then. Keep me posted.
..
Election Day said:
The image you need would be this ClockworkMod img. Save it somewhere, cd to the sdk/platform-tools/ directory and then do:
Code:
fastboot flash recovery /path/to/saved/file/recovery-clockwork-5.0.2.0-crespo.img
Just drag and drop the file in your terminal, after typing the space after "recovery".
Furthermore, what nodstuff said.
Click to expand...
Click to collapse
Ha ha oops! Forgot that part!
I usually just cd to the one where I have recovery saved!
..
Thanks a lot for answering so quickly !
I'll give it a try on Monday, let you know how it goes.
Election Day said:
Yes, you can also do that, of course. In that case you'd have to provide the full path for fastboot. Or maybe you don't have to on Windows? I don't really use that operating system to be honest.
In that case it would be something like:
Code:
C:\Program Files\Android\android-sdk\tools\fastboot flash recovery recovery-clockwork-5.0.2.0-crespo.img
Looking at OP's quotes that is probably the most logical way in this case, you're right.
Click to expand...
Click to collapse
No I just cd to downloads (where recovery file would be) in terminal, type: fastboot flash recovery xxxxxx img
And that's it.
I set the path to fast boot and adb in environmental variables in device manager.
Maybe that's why.
..
Just tried out your tips, worked like a charm !
However I had to wipe everything twice before it would let me update to 4.0.3, I would get this weird error :
file_getprop: failed to stat "/system/build.prop": No such file or directory
Anyway now I'm back on ICS and, following your advice, i found another kernel to flash : Matr1x. No problem with this one, now I can test USB OTG.
Thanks again, you guys rule !
This thread is about DL701Q tablet.
Specs uploaded here.
http://www.specdevice.com/showspec.php?id=bcad-973e-0033-c5870033c587
http://www.bestbuy.com/site/digiland-7-8gb-black/8610212.p?id=1219354106671
This is a cheap quad core tablet that includes bluetooth and GPS, Specs http://specdevice.com/showspec.php?id=a1a0-8080-0033-c5870033c587
The tablet's one short cumming is Ram (512 MB), The tablet works well despite the amount of Ram, it uses swap partition to help balance out the lack of Ram.
CWM Recovery now backs up and restores, use caution as with anything you use, you could damage your tablet.
micro sdcard required to use this recovery.
Code:
Do not use format commands at anytime.
format /data
format /cache
format /system
to install
adb reboot bootloader
fastboot flash recovery DL701Q_dual_boot_recovery.img
fastboot reboot
after tablet reboots
adb reboot recovery
unmount cache
mount system
mount data
mount cache
go back
backup/restore
backup
to restore almost same process
adb reboot recovery
unmount cache
mount system
mount data
mount cache
go back
backup/restore
restore
CWM Recovery
download
https://www.androidfilehost.com/?fid=95916177934541508
To root this tablet, use the CWM recovery, I ported to flash SuperSU
download
http://download.chainfire.eu/696/SuperSU/UPDATE-SuperSU-v2.46.zip
Firmware
download
http://www.panduoduo.net/r/9960566
http://www.mediafire.com/download/0au4z5j9leao9ft/mid713l-lp-lvds-20141226.rar
https://mega.co.nz/#!18wVWTRR!sa1ua8cWoczNT6cTdqzBgaqXRyYoyNPzVah_NaZzNcc
If you choose to flash firmware not needed if your tablet is working fine.
I would recommend flashing only system, then flash gapps. This firmware is older than what comes with DL701Q tablets, plus it doesn't include gapps or wifi update. This version can't be updated, so make sure to backup your system before flashing this system.
If DL701Q tablet gets wifi updates you need stock system to get them, so keep a copy of your stock system handy.
Gapps I used pa_gapps-modular-micro-4.4.2-20140608-signed.zip
https://www.androidfilehost.com/?fid=23501681358543824
Below are some pics of battery life and GPS, GPS test taken inside my house, too much snow to go outside. I haven't tried offline maps yet, I have navfree installed on tablet, will test when roads are clear.
Good battery life also.
to flash recovery
enable usb debugging setup adb and fastboot
adb reboot bootloader
or from power off
press power and volume up at same time, when you come to a selection screen use volume up to select fastboot volume down to boot into fastboot.
fastboot flash recovery /path/to/recovery
credits
Carliv
Chainfire
TKruzze
Tested GPS, via navfree usa works great, If you are going to try navfree usa, use older version, the latest version doesn't work very well, lot of bugs, very slow.
I am going to give MapFactor a try today, very lite navigation app.
Added new recovery to OP.
UBIFS filesystems are not as easy to use as ext4,use caution with this type of tablet, I have uploaded a cwm version that backs up and restores, You use this recovery at your own risk.
For the recovery to work correctly the process must be preformed correctly, below is the process that works.
I am sure the question why unmount cache and later remount cache, this is needed cause cache mounts wrong partition during initial start up. I could force cache to mount correct partition, but this is a dual recovery, so it would be counter productive to do that.
Anyway it only takes a few seconds to unmount cache, then mount system, data and cache in that exact order to get recovery to see partitions correctly. DO NOT USE FORMAT COMMAND PERIOD.
EG
format /data
format /cache
format /system
When restoring backup, recovery will wipe partitions, not format them, wipe is all that's needed
micro sdcard required to use this recovery.
Code:
Do not use format commands at anytime.
format /data
format /cache
format /system
to install
adb reboot bootloader
fastboot flash recovery DL701Q_dual_boot_recovery.img
fastboot reboot
after tablet reboots
adb reboot recovery
unmount cache
mount system
mount data
mount cache
go back
backup/restore
backup
to restore almost same process
adb reboot recovery
unmount cache
mount system
mount data
mount cache
go back
backup/restore
restore
On other thread you were working on flashable rom via cwm recovery, how is that going?
tomtom1265 said:
On other thread you were working on flashable rom via cwm recovery, how is that going?
Click to expand...
Click to collapse
Yes, I have two flashable roms, one is made from my tablet dl701q system, other one is made from mid713l system.
They both work well, both roms are ubifs systems, both are rooted and allow adb remount.
Sent from my Venue 8 3830 using Tapatalk
Uploaded specs see OP.
Sent from my DL701Q using Tapatalk
Will this recovery work with other mt8127 tablets? Got a nextbook 7 and I'm interested in making/flashing a custom recovery as safely as possible (I've already exchanged it twice, trying to avoid a third trip) any help would be appreciated
corruption said:
Will this recovery work with other mt8127 tablets? Got a nextbook 7 and I'm interested in making/flashing a custom recovery as safely as possible (I've already exchanged it twice, trying to avoid a third trip) any help would be appreciated
Click to expand...
Click to collapse
I have no ideal, I made this recovery for this tablet, if your tablet is ubifs and partitions and kernel are the same recovery should work, if not it won't.
sent from my kingSing T1 via taptalk
There are two versions of DL701Q tablet.
1. ro.sf.hwrotation=90
2. ro.sf.hwrotation=0
Version 1 has full software on Digiland website.
http://www.digi-land.net/Photo_Show.asp?InfoId=487&ClassId=56&Topid=53
If you have version one you should be able to use software as is, if you have version 2, like I do you will need to edit build.prop else touch screen will be wrong, plus screen will be upside down.
You can flash full software if you want, I only flash system.
this is my method to flash system, once you have downloaded the software unpack it, need to have custom recovery, boot tablet into custom recovery.
Code:
adb reboot recovery
unmount cache
mount system
mount data
mount cache
rm -rf /system/*
rm -rf /data/*
rm -rf /cache/*
adb reboot bootloader
fastboot flash system system.img
power off tablet, or press reset button in back
hold power up + volume up to get into boot selection
choose recovery then tab volume down.
when recovery fully loads.
unmount cache
mount system
mount data
mount cache
adb pull /system/build.prop
change ro.sf.hwrotation=90 to ro.sf.hwrotation=0
adb push build.prop /system/build.prop
adb shell
chmod 644 /system/build.prop
reboot
You should now be able to use the software, somethings may be a little off camera and so on but non the less software is usable.
Don't like software use recovery to restore your back up.
vampirefo said:
There are two versions of DL701Q tablet.
1. ro.sf.hwrotation=90
2. ro.sf.hwrotation=0
Version 1 has full software on Digiland website.
http://www.digi-land.net/Photo_Show.asp?InfoId=487&ClassId=56&Topid=53
If you have version one you should be able to use software as is, if you have version 2, like I do you will need to edit build.prop else touch screen will be wrong, plus screen will be upside down.
You can flash full software if you want, I only flash system.
this is my method to flash system, once you have downloaded the software unpack it, need to have custom recovery, boot tablet into custom recovery.
Code:
adb reboot recovery
unmount cache
mount system
mount data
mount cache
rm -rf /system/*
rm -rf /data/*
rm -rf /cache/*
adb reboot bootloader
fastboot flash system system.img
power off tablet, or press reset button in back
hold power up + volume up to get into boot selection
choose recovery then tab volume down.
when recovery fully loads.
unmount cache
mount system
mount data
mount cache
adb pull /system/build.prop
change ro.sf.hwrotation=90 to ro.sf.hwrotation=0
adb push build.prop /system/build.prop
adb shell
chmod 644 /system/build.prop
reboot
You should now be able to use the software, somethings may be a little off camera and so on but non the less software is usable.
Don't like software use recovery to restore your back up.
Click to expand...
Click to collapse
Digiland has made the update files,etc available on their website http://www.digi-land.net/upload/DL701Qupdate_software.rar
There are no instructions on the site. Maybe someone can help a noob reflash/update with these files? I have a rooted device, but can't do the wireless update because it says system was damaged and update is disabled. I would like to update and re-root.
SYN1ST3R said:
Digiland has made the update files,etc available on their website http://www.digi-land.net/upload/DL701Qupdate_software.rar
There are no instructions on the site. Maybe someone can help a noob reflash/update with these files? I have a rooted device, but can't do the wireless update because it says system was damaged and update is disabled. I would like to update and re-root.
Click to expand...
Click to collapse
If you can't follow the instructions included with the update, Then you need to contact Digiland.
This thread isn't about teaching newbies to install updates. You can start your own thread, How to install updates for Digiland tablets if you want.
sent from my kingSing T1 via taptalk
vampirefo said:
If you can't follow the instructions included with the update, Then you need to contact Digiland.
This thread isn't about teaching newbies to install updates. You can start your own thread, How to install updates for Digiland tablets if you want.
sent from my kingSing T1 via taptalk
Click to expand...
Click to collapse
A bit hard to follow instructions that DON'T exist
vampirefo said:
fastboot flash recovery DL701Q_dual_boot_recovery.img
Click to expand...
Click to collapse
I'm flashing this file, but I'm still ending up in the stock recovery, not CWM. Has anyone else had this issue?
Code:
> adb reboot bootloader
> fastboot flash recovery DL701Q_dual_boot_recovery.img
sending 'recovery' (6248 KB)...
OKAY [ 0.155s]
writing 'recovery'...
OKAY [ 0.888s]
finished. total time: 1.044s
freakified said:
I'm flashing this file, but I'm still ending up in the stock recovery, not CWM. Has anyone else had this issue?
Code:
> adb reboot bootloader
> fastboot flash recovery DL701Q_dual_boot_recovery.img
sending 'recovery' (6248 KB)...
OKAY [ 0.155s]
writing 'recovery'...
OKAY [ 0.888s]
finished. total time: 1.044s
Click to expand...
Click to collapse
No ideal why it doesn't work for you, you could try the splashtool.
Sent from my Venue 8 3830 using Tapatalk
freakified said:
I'm flashing this file, but I'm still ending up in the stock recovery, not CWM. Has anyone else had this issue?
Code:
> adb reboot bootloader
> fastboot flash recovery DL701Q_dual_boot_recovery.img
sending 'recovery' (6248 KB)...
OKAY [ 0.155s]
writing 'recovery'...
OKAY [ 0.888s]
finished. total time: 1.044s
Click to expand...
Click to collapse
I'm having a similar issue. Tried this way and the TWRP guide. Ever attempt says successful but ends up frozen on the normal boot splash screen when trying to manually or adb into recovery.
Could be your device is different, you made need to use your own kernel.
Unpack your boot.img, then unpack my recovery and swap out kernels then repack and flash.
Sent from my BLU STUDIO 5.0 C using Tapatalk
Hello. Just bought 2 of these tablets from Best Buy today. It would seem I have all the correct drivers installed, both adb and fastboot see my device but even though I have the custom recovery .img on both my micro sd card and the tablets internal storage when i type the command "fastboot flash recovery DL701Q_dual_boot_recovery.img" I get back the error "error: cannot load 'DL701Q_dual_boot_recovery.img'. What am I doing wrong? Where does the file have to be for fastboot to find it?
EDIT: Nevermind. Been awhile since I've tinkered with flashing a tablet. For others that might not know the file to be flashed needs to be in the same folder as the fastboot.exe.
Okay installing the custom recovery went great but I've tried numerous times to install the root zip file from recovery and haven't gotten root even after about 5 tries. I think I read somewhere that this method was somehow blocked in newer firmware. Perhaps I have that firmware. Kernel version on my "About Tablet" says "3.4.67 [email protected] #1 Fri Apr 3 15:55:00 CST 2015" and "Build number is " ALPS.KK1.MP10.V1.45" if that means anything to anyone.
Tried some iRoot crap which is probably exactly what it is and didn't end up with anything but a bunch of chinese bloatware on my tablet, which I promptly deleted, but no root.
Would flashing one of the older firmware definitely get me root?
InfernoShark said:
Okay installing the custom recovery went great but I've tried numerous times to install the root zip file from recovery and haven't gotten root even after about 5 tries. I think I read somewhere that this method was somehow blocked in newer firmware. Perhaps I have that firmware. Kernel version on my "About Tablet" says "3.4.67 [email protected] #1 Fri Apr 3 15:55:00 CST 2015" and "Build number is " ALPS.KK1.MP10.V1.45" if that means anything to anyone.
Tried some iRoot crap which is probably exactly what it is and didn't end up with anything but a bunch of chinese bloatware on my tablet, which I promptly deleted, but no root.
Would flashing one of the older firmware definitely get me root?
Click to expand...
Click to collapse
You have to follow OP exactly, what is happening is you are just trying to flash a zip without doing the mounts and umounts in OP.
Unmount cache
Mount system
Mount data
Mount cache
Now flash root zip.
Sent from my NXA8QC116 using Tapatalk
vampirefo said:
You have to follow OP exactly, what is happening is you are just trying to flash a zip without doing the mounts and umounts in OP.
Unmount cache
Mount system
Mount data
Mount cache
Now flash root zip.
Sent from my NXA8QC116 using Tapatalk
Click to expand...
Click to collapse
I love you man! LOL! Root is a go, verified by Root Checker! :good:
Hello everybody,
Trying to install Xposed for Lollipop (x64), I had bootloop when my device restart. I didn't see that a uninstaller exist when it bootloop and I've decided to restore my system previously backup yesterday thanks to DallasCZ .bat. But I couldn't flash the system 'cause of system.img was too big for fastboot. The device accept only 256mb max file. So I used SparseConvertor to sparse my system to 11 files (like Motorola devices). But when I wanted to flash the first, it erase automatically the system. So, I can't flash and we can't flash the system previously backup with .bat.
Now, my /system is wiped and I don't have a backup of system made with TWRP. Could someone upload a backup of his 6045Y system made with TWRP ? It's more than 2gb I know, but it will be save my Idol 3 and other if they have a problem.
I have my system_image.emmc.win and mmcblk0p28 file, and my system file dump from /dev/blocks/mmcblk0p28 so if someone have a issue to help me without upload his backup of the system, tell me.
Thanks for all in advance !!!
Since you have your system image dumped from the partition you can push that to your internal sdcard. Boot twrp and run the commands from adb shell or the terminal inside of TWRP.
Code:
dd if=/sdcard/system.img of=/dev/block/bootdevice/by-name/system
It will take a while , but it will work.
Sent from my LGMS395 using Tapatalk
Unjustified Dev said:
Since you have your system image dumped from the partition you can push that to your internal sdcard. Boot twrp and run the commands from adb shell or the terminal inside of TWRP.
Code:
dd if=/sdcard/system.img of=/dev/block/bootdevice/by-name/system
It will take a while , but it will work.
Sent from my LGMS395 using Tapatalk
Click to expand...
Click to collapse
OMG ! IT WORKS ! Thanks a lot !!!!!!
Is this the U.S. version of the Idol 3?So you were able to root it?
So here you come. To read and perform this tutorial, you obviously need a first hand experience on flashing a ROM and/or kernels. Otherwise this tutorial and my efforts to get you a device with two OSes running might end up giving you a bricked device. So, if you're hearing the terms "flashing" or 'kernels' for the first time and thinking it's kinda good food, then bro, just go and taste those first.
Something's to remind before we gonna dig deep into this tutorial->
1> Noone but you will be responsible for what you end up with.
2> The warranty of your device will be voided after this if it isn't already after rooting. For MI users, the good news is that you can reclaim it by just flashing the fastboot ROM for your device.
Enough lectures. Bro let's get to work.
This you'll be needing =>
1> One working Windows PC(because I doesn't know any replacement of bootimg.exe on any other OS. If you know, then let me).
2> A class 10 memory card ( I recommend 32GB for the spaces)
3> A custom ROM and kernel for your phone(the second os)
4> Any custom CWM based recovery installed.(since TWRP is most popular, I will demonstrate using it. You can use any other you want overall process will be the same)
5> ADB, fastboot and the device drivers (easily found in XDA)
PART 1: MODIFYING THE BOOT
At first, how does your device boots up? What are the partitions called /data and /system? The answer is quite simple. It's your kernel that points out the location from where the OS should be picked up. So for booting into the second OS we need some modifications to it at first.
Search and download bootimg.exe on XDA, I'll post a link later. Create two folders. Name them "Internal OS" and "External OS" respectively. Put the zip file of the OS you're currently using to the first one and the OS you're gonna use on the external storage to the second one. Rename the second OS to originalExternalOS.zip. Extract originalExternalOS.zip. Pick the boot.img file from the root of the extracted folder and move it to a new folder named "boot2". Extract the IMG using bootimg.exe. Navigate to the initrd folder and you will get a file named 'fstab".
Basically it's the file that tells the kernel which partition does the OS resides in.
Open the file in your favourite text editor.
Replace every instance of the first line with the second one:
/dev/block/bootdevice/by-name/system => /dev/block/mmcblk1p2
/dev/block/bootdevice/by-name/userdata => /dev/block/mmcblk1p3
/dev/block/bootdevice/by-name/cache => /dev/block/mmcblk1p4
Save the file without giving any extension to it. Repack it using the same tool. You'll have boot-new.img and boot-old.img. Rename boot-new.img to boot.img and replace the one in the root folder with this. Basically what we're doing here is replacing the old boot.img with the modified one.
For your knowledge, blocks are the partitions of any storage you have on your device. For example, your internal storage is partitioned to near about 30 different blocks each starting with prefix "mmcblk0p". We here just told the kernel to load the OS from the blocks mentioned. We'll be creating these blocks in the external SD card next.
PART 2: PARTITIONING THE SD CARD
Connect your device with the memory card inserted to your PC. If you haven't installed fastboot, ADB, and the drivers, do it now.
READ THE FOLLOWING CAREFULLY
Reboot the device to recovery mode. Type the commands in cmd:
Code:
adb shell
parted
unit MB
print
quit
umount external_sd
Read and store the minimum and maximum capacity of your card. Since different cards will have different capacities I will point it as variable MIN_SIZE and MAX_SIZE. You'll need to calculate and put the values in the commands. Now type the following commands on cmd:
Code:
parted /dev/block/mmcblk1
rm 1
//START_BLOCK = MAX_SIZE - 5000
mkpartfs primary fat32 MIN_SIZE START_BLOCK
//SYS_START = START_BLOCK+1
//SYS_END = SYS_START + 1200
mkpartfs primary ext2 SYS_START SYS_END
//DATA_START = SYS_END+1
//DATA_END = DATA_START + 3500
mkpartfs primary ext2 DATA_START DATA_END
//CACHE_START = DATA_END + 1
mkpartfs primary ext2 CACHE_START MAX_SIZE
//We have partitioned the memory card. Let's format them. Ignore all "Do you wish to continue" question in the next commands as we're already mentioning yes.
mkfs yes 1 fat32
mkfs yes 2 ext2
mkfs yes 3 ext2
mkfs yes 4 ext2
quit
//Now they are almost ready. Just make the newly created blocks readable by the OS.
make_ext4fs /dev/block/mmcblk1p2
make_ext4fs /dev/block/mmcblk1p3
make_ext4fs /dev/block/mmcblk1p4
//Now you get where does the blocks come in the kernel right?
exit
//You've covered up the hardest part. Let's get some coffee and cheeerssss.
PART 3: MODIFYING THE NEW OS
You've left the OS extracted in the "External OS" folder right? It's time to do some magic in it. We're gonna tell the OS to be installed in the blocks we created just like the kernel. But wait, where does the OS know before installing where it should get installed? Well, the answer hides in the updater-script in the folder META-INF > com > google > android. Navigate yourself in it. Open the updater-script file in your favourite editor ( I use notepad++ ) and modify it in the same way as the kernel.
Replace every instance of the first line with the second one:
/dev/block/bootdevice/by-name/system => /dev/block/mmcblk1p2
/dev/block/bootdevice/by-name/userdata => /dev/block/mmcblk1p3
Leave the /dev/block/bootdevice/by-name/boot as it's the fundamental block and we can't replicate it. Don't think for the /cache partition as we've already done that in the boot.img file. Now navigate to the root of the folder where you extracted the External OS. Select all files, add them to a zip file using WinRAR. Name the file to newOS.zip. Open newOs.zip and originalExternalOS.zip with WinRAR and compare them if you find any change in the folder tree. They must and they should be exactly the same. You're 80% done.
PART 4: MODIFYING THE RECOVERY
We often flash many zips including very popular Xposed and other mods to our OS right? They also look for the /system partition. So what are we gonna do? Modifying each of them? Nah. Let's modify where they get which one the /system is. The recovery. Extract the img of the recovery you're using with the same bootimg.exe. Modify exactly the same things. I.e.
Replace every instance of the first line with the second one:
/dev/block/bootdevice/by-name/system => /dev/block/mmcblk1p2
/dev/block/bootdevice/by-name/userdata => /dev/block/mmcblk1p3
/dev/block/bootdevice/by-name/cache => /dev/block/mmcblk1p4
in the following files : initrd/fstab.qcom
initrd/etc/recovery.fstab
initrd/etc/twrp.fstab(For TWRP only)
Save them. Repack. And you got your recovery-new.img and recovery-old.img. Put recovery-new.img and newOS.zip in the same folder. Now wake up, it's time for some action.
PART 5 : INSTALLING THE OS
Open cmd in the folder where newOS.zip resides. Reboot the devixe in fastboot mode. Type the following commands:
Code:
adb push newOS.zip external_sd
fastboot flash recovery recovery-new.img
fastboot boot recovery
Now your device should boot up in recovery mode. To check if everything has gone fine mount system using TWRP. Use twrp's built in file manager and navigate to system folder. It's empty? Yup. You've done a great job. Now flash the newOS.zip using TWRP and your device should boot up in the new OS. To cross check again remove the SD card and try to boot. If you're headed towards recovery or bootloop after that then it's a win. Put the SD card back again and watch the new OS to boot.
PART 6: SWITCHING BETWEEN THE TWO
Extract the boot.img from the "Internal OS" zip file and put it together with recovery-old.img. To check if your old system is untouched type the following commands in fastboot mode:
Code:
fastboot flash recovery recovery-old.img
fastboot flash boot boot.img
fastboot boot system
Your device should take you back to the old one. Surprised? Now let's make a switch between the two. There are two methods.
METHOD 1: USING FLASHIFY
Create two folders in your SD card. Put boot.img and recovery-old.img to one and boot-new.img and recovery-new.img to the other. To switch to the external OS, just flash boot-new.img as boot and recovery-new.img using flashify. Ignore reboot now dialog and reboot directly to the system. To go back, first install flashify in the new OS and flash boot.img and recovery-old.img. Easy right?
METHOD 2: USING ZIPS
I'm gonna tell you that tomorrow as I can write no more today.
More to come....
CREDITS:
justzzshadz from MIUI forum for this revolutionary concept. @iamsubhranil for adding TWRP, Flashify support and completely rewriting the tutorial.
Hi guys,
Here, for those who are interested, I'm maintaining the packages to use postmarketOS on bare-metal hardware.
I only tested the A750FN variant.
Check it out!
Feedbacks are welcome!
Many thanks:
@VDavid003 for kernel sources
Thanks alot for making this contribution
M0Rf30 said:
Hi guys,
Here, for those who are interested, I'm maintaining the packages to use postmarketOS on bare-metal hardware.
I only tested the A750FN variant.
Check it out!
Feedbacks are welcome!
Many thanks:
@VDavid003 for kernel sources
Click to expand...
Click to collapse
After a week or 2 i can get back home and test it , so keep making these and I'll test them and tell you about my experience
Hello, can you share how you did it? I can't find any files for flashing on the postmarketos wiki page, I have TWRP installed.
Arm1nas said:
Hello, can you share how you did it? I can't find any files for flashing on the postmarketos wiki page, I have TWRP installed.
Click to expand...
Click to collapse
I haven't tested it yet , but you'll have to use the pmbootstrap tool to build a zip that you can flash through the TWRP
The wiki of postmarketOS explains how to use the pmbootstrap tool. Go check it out
animegamer4422 said:
I haven't tested it yet , but you'll have to use the pmbootstrap tool to build a zip that you can flash through the TWRP
The wiki of postmarketOS explains how to use the pmbootstrap tool. Go check it out
Click to expand...
Click to collapse
I figured it out. I created an Ubuntu VM and built it. I am not sure why but now the phone doesn't boot to pmOS, it just spits out some errors or there is only a terminal. TWRP says it can't mount /system, maybe I have to reflash the recovery.
Arm1nas said:
I figured it out. I created an Ubuntu VM and built it. I am not sure why but now the phone doesn't boot to pmOS, it just spits out some errors or there is only a terminal. TWRP says it can't mount /system, maybe I have to reflash the recovery.
Click to expand...
Click to collapse
I don't think it's a issue with the recovery and also it's normal for TWRP to not be able to mount the system
Let's try to diagnose it by going through the error
Could you upload the log and also the screenshot of the error that it spits out
Also upload the built image to some cloud service and send the link here so that i don't have to go through and build the image again
Thanks for testing it out and I'll join you soon so keep trying and I'll try to do everything i can to help you , Have a good day.
animegamer4422 said:
I don't think it's a issue with the recovery and also it's normal for TWRP to not be able to mount the system
Let's try to diagnose it by going through the error
Could you upload the log and also the screenshot of the error that it spits out
Also upload the built image to some cloud service and send the link here so that i don't have to go through and build the image again
Thanks for testing it out and I'll join you soon so keep trying and I'll try to do everything i can to help you , Have a good day.
Click to expand...
Click to collapse
pmos-samsung-a7y18lte.zip
drive.google.com
I think that it's trying to install itself to /system partition which is very small, and the "data" partition is like 50GB. Maybe it's a problem with PBRP (I can't install twrp, it doesn't work for me).
Can you try installing this file and testing if it works for you, or is it the same problem?
Arm1nas said:
pmos-samsung-a7y18lte.zip
drive.google.com
I think that it's trying to install itself to /system partition which is very small, and the "data" partition is like 50GB. Maybe it's a problem with PBRP (I can't install twrp, it doesn't work for me).
Can you try installing this file and testing if it works for you, or is it the same problem?
Click to expand...
Click to collapse
I'd love to test it , but currently I'm not at my home and my A7 is at home (since It's not my daily driver) but I'll test it as soon as I can get back home
Until then
Keep figuring out things
Also I think you can use the TWRP terminal to Change the size of system partition using the resize2fs command i guess
I found this when I looked into it
First to clarify, Resize Partition is different than Resize File System, TWRP provides latter option. It resizes the ext2/3/4 filesystem to the size of partition it's created on. Filesystem size can be checked with df command when mounted, and partition size with blockdev. Just like HDDs or SSDs on PC, Android's eMMC storage is divided into partitions (can be 50+). Some of them have filesystem e.g. the larger ones userdata and system. In simple cases a filesystem occupies a complete physical partition, but it's not always the case, LVM makes it possible to have single filesystem on multiple partitions. Or the opposite what happened in your case as explained here: Sometimes the zip file of: a custom ROM does not have the correct size for the system partition and if the ROM flashes a raw system image, that image will not take up the full block device. Running resize2fs can fix the size Similarly: Sometimes flashing a factory image may flash userdata with an image with a file system that does not take up the full size of the block device So TWRP can expand the filesystem to reclaim wasted space. That's what happened in your case to the /system partition. The actual size of partition was 2.5 GB, but flashed image was of 1.5 GB. Coming to your query: I realized that the system partition is too big (~1.5GB). The current ROM uses only about 40% of the partition so I want to shrink it to make space for cache and data. You want to resize partition, not filesystem. So resize2fs (which TWRP uses at back end) isn't the right choice. As your partition table suggests, you need to delete and recreate partitions 9 to 12. IT'S DANGEROUS AND NOT RECOMMENDED, you may permanently brick your device. All data on these partitions will be lost, so do backup. Also, fdisk isn't proper tool for GPT, it's for MBR partition scheme. Use parted or gdisk instead, but with great care.
So now you can just resize the system partition in case it's size is smaller than the image (not likely in my opinion)
animegamer4422 said:
I'd love to test it , but currently I'm not at my home and my A7 is at home (since It's not my daily driver) but I'll test it as soon as I can get back home
Until then
Keep figuring out things
Also I think you can use the TWRP terminal to Change the size of system partition using the resize2fs command i guess
I found this when I looked into it
First to clarify, Resize Partition is different than Resize File System, TWRP provides latter option. It resizes the ext2/3/4 filesystem to the size of partition it's created on. Filesystem size can be checked with df command when mounted, and partition size with blockdev. Just like HDDs or SSDs on PC, Android's eMMC storage is divided into partitions (can be 50+). Some of them have filesystem e.g. the larger ones userdata and system. In simple cases a filesystem occupies a complete physical partition, but it's not always the case, LVM makes it possible to have single filesystem on multiple partitions. Or the opposite what happened in your case as explained here: Sometimes the zip file of: a custom ROM does not have the correct size for the system partition and if the ROM flashes a raw system image, that image will not take up the full block device. Running resize2fs can fix the size Similarly: Sometimes flashing a factory image may flash userdata with an image with a file system that does not take up the full size of the block device So TWRP can expand the filesystem to reclaim wasted space. That's what happened in your case to the /system partition. The actual size of partition was 2.5 GB, but flashed image was of 1.5 GB. Coming to your query: I realized that the system partition is too big (~1.5GB). The current ROM uses only about 40% of the partition so I want to shrink it to make space for cache and data. You want to resize partition, not filesystem. So resize2fs (which TWRP uses at back end) isn't the right choice. As your partition table suggests, you need to delete and recreate partitions 9 to 12. IT'S DANGEROUS AND NOT RECOMMENDED, you may permanently brick your device. All data on these partitions will be lost, so do backup. Also, fdisk isn't proper tool for GPT, it's for MBR partition scheme. Use parted or gdisk instead, but with great care.
So now you can just resize the system partition in case it's size is smaller than the image (not likely in my opinion)
Click to expand...
Click to collapse
The /system partition is 3.9G big.
This is everything:
https://imgur.com/MOKz0uR
Arm1nas said:
The /system partition is 3.9G big.
This is everything:
https://imgur.com/MOKz0uR
Click to expand...
Click to collapse
Sorry i was sick from past 2 days so couldn't reply earlier
Anyways could you like drop to a shell when you boot up postmarketOS
If yes then check the dmesg
I also think you'll have to flash a special kernel which could also be obtained from the pmbootstrap tool
Also it'd be great if you could record a video of the phone booting up into postmarketOS as that'd help us understand until how far it can reach and where it gets stuck
Thanks alot and Take care
animegamer4422 said:
Sorry i was sick from past 2 days so couldn't reply earlier
Anyways could you like drop to a shell when you boot up postmarketOS
If yes then check the dmesg
I also think you'll have to flash a special kernel which could also be obtained from the pmbootstrap tool
Also it'd be great if you could record a video of the phone booting up into postmarketOS as that'd help us understand until how far it can reach and where it gets stuck
Thanks alot and Take care
Click to expand...
Click to collapse
Hello, did you make any progress with it? I will try installing pmOS again and recording everything.
This is my installation procedure:
On a Ubuntu 20.04 VM I run:
$ pmbootstrap init
I select my device, DE, go through the setup.
Then I type:
$ pmbootstrap install --android-recovery-zip
$ pmbootstrap export
Then on the phone I unmount everything:
https://imgur.com/PlQZ1oB
Go to ADB sideload:
https://imgur.com/xf1FBzQ
https://imgur.com/H9AbkXY
I connect the phone to my computer and use this command to install pmOS:
$ adb sideload pmos.zip
I recorded the installation procedure:
As you can see it boots up the first time, the file system only has 2.6GB free, when it reboots again, it just boots into busybox terminal. When trying to boot up it gives me these errors:
https://imgur.com/qEtwRlx
I logged in and typed:
$ df -H
This is the output:
https://imgur.com/7n61Vm3
If I try to start the desktop environment with $ startx command I get these errors:
https://imgur.com/8xOA1kc
dmesg output:
https://imgur.com/eizBP3m
https://imgur.com/nP8aAaB
This is the phone's partition layout:
https://imgur.com/9xNmaAV
https://i.imgur.com/M0m3GjW.png
D
Arm1nas said:
This is my installation procedure:
On a Ubuntu 20.04 VM I run:
$ pmbootstrap init
I select my device, DE, go through the setup.
Then I type:
$ pmbootstrap install --android-recovery-zip
$ pmbootstrap export
Then on the phone I unmount everything:
https://imgur.com/PlQZ1oB
Go to ADB sideload:
https://imgur.com/xf1FBzQ
https://imgur.com/H9AbkXY
I connect the phone to my computer and use this command to install pmOS:
$ adb sideload pmos.zip
I recorded the installation procedure:
As you can see it boots up the first time, the file system only has 2.6GB free, when it reboots again, it just boots into busybox terminal. When trying to boot up it gives me these errors:
https://imgur.com/qEtwRlx
Click to expand...
Click to collapse
Sorry for the late reply
Anyways i just got home and have the smartphone I'm my hands
So i can too test it out
Also I think we should try switching to Wayland as X seems to be crashing
By using Wayland if it works we'll know that it's not a Xorg issue but if Wayland too fails we'll know that it's a big in the Kernel and the way it handles hardware
Also could you create a Telegram group for us to chat instantly I think that way we can help each other better and then we'll just create a general guide on fixing things ok XDA
(I cannot post links since I didn't started the thread)[/url]
Arm1nas said:
This is my installation procedure:
On a Ubuntu 20.04 VM I run:
$ pmbootstrap init
I select my device, DE, go through the setup.
Then I type:
$ pmbootstrap install --android-recovery-zip
$ pmbootstrap export
Then on the phone I unmount everything:
https://imgur.com/PlQZ1oB
Go to ADB sideload:
https://imgur.com/xf1FBzQ
https://imgur.com/H9AbkXY
I connect the phone to my computer and use this command to install pmOS:
$ adb sideload pmos.zip
I recorded the installation procedure:
As you can see it boots up the first time, the file system only has 2.6GB free, when it reboots again, it just boots into busybox terminal. When trying to boot up it gives me these errors:
https://imgur.com/qEtwRlx
I logged in and typed:
$ df -H
This is the output:
https://imgur.com/7n61Vm3
If I try to start the desktop environment with $ startx command I get these errors:
https://imgur.com/8xOA1kc
dmesg output:
https://imgur.com/eizBP3m
https://imgur.com/nP8aAaB
This is the phone's partition layout:
https://imgur.com/9xNmaAV
https://i.imgur.com/M0m3GjW.png
Click to expand...
Click to collapse
Sorry for the late reply
Anyways ...post links since I didn't started the thread)
Arm1nas said:
This is my installation procedure:
On a Ubuntu 20.04 VM I run:
$ pmbootstrap init
I select my device, DE, go through the setup.
Then I type:
$ pmbootstrap install --android-recovery-zip
$ pmbootstrap export
Then on the phone I unmount everything:
https://imgur.com/PlQZ1oB
Go to ADB sideload:
https://imgur.com/xf1FBzQ
https://imgur.com/H9AbkXY
I connect the phone to my computer and use this command to install pmOS:
$ adb sideload pmos.zip
I recorded the installation procedure:
As you can see it boots up the first time, the file system only has 2.6GB free, when it reboots again, it just boots into busybox terminal. When trying to boot up it gives me these errors:
https://imgur.com/qEtwRlx
I logged in and typed:
$ df -H
This is the output:
https://imgur.com/7n61Vm3
If I try to start the desktop environment with $ startx command I get these errors:
https://imgur.com/8xOA1kc
dmesg output:
https://imgur.com/eizBP3m
https://imgur.com/nP8aAaB
This is the phone's partition layout:
https://imgur.com/9xNmaAV
https://i.imgur.com/M0m3GjW.png
Click to expand...
Click to collapse
I installed plasma desktop and it seems to be working great though there's no on screen keyboard so i had to use a USB OTG to connect a external keyboard and unlock the device and use it And also the performance is not very great it lags alot probably due to the lack of GPU acceleration
animegamer4422 said:
I installed plasma desktop and it seems to be working great though there's no on screen keyboard so i had to use a USB OTG to connect a external keyboard and unlock the device and use it And also the performance is not very great it lags alot probably due to the lack of GPU acceleration
Click to expand...
Click to collapse
What method did you use to flash pmOS? And what recovery do you have? Mind sharing the built pmOS files, so I can flash it myself?
Arm1nas said:
What method did you use to flash pmOS? And what recovery do you have? Mind sharing the built pmOS files, so I can flash it myself?
Click to expand...
Click to collapse
I created a recovery zip using Pmbootstrap and also I set the free space parameter (after running pmbootstrap init) to 2000mb (2gb)
And then i copied that zip file from the temp directory to a Pendrive and connected the pendrive to the phone in recovery mode (PBRP Recovery) and then flashed it
I'll upload the files in a bit
Also I tried using Phosh but it just gets to the Login TTY and then doesn't boots up and i think that's because the device lacks GPU acceleration
Also here's a Telegram group link which I'll delete once you join the group
~REMOVED~
M0Rf30 said:
Hi guys,
Here, for those who are interested, I'm maintaining the packages to use postmarketOS on bare-metal hardware.
I only tested the A750FN variant.
Check it out!
Feedbacks are welcome!
Many thanks:
@VDavid003 for kernel sources
Click to expand...
Click to collapse
hello, are this thread still active?