[ROM][LINUX][DANDELION] Droidian Bookworm - Redmi 9A ROMs, Kernels, Recoveries, & Other Develo

{
"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"
}
​Requirements​
Android 10 firmware for your device:
Redmi 9A/9AT dandelion: LINK.
Dandelion​
Download the latest fastbootable image: droidian-UNOFFICIAL-phosh-phone-xiaomi_dandelion-api29-armhf-nightly_XXXXXXXX.zip
Installation​
Extract the archive
run the flash_all script
Boot to fastboot and let the script flash everything.
UBports Installer
Alternatively the UBports installer can also be used to install Droidian.
Notes​
The default password is 1234.
List of working things can be found at https://github.com/droidian-mt6765/device-page
Bugs​
Encryption is not supported.
Mobile data needs an APN to be set up from Settings -> Mobile -> Access Point Names.
RIL gets broken after switching airplane mode or modem off/on.
Mobile data might stop working after making or receiving phone calls. Toggle Mobile Data from the settins off/on.
Mobile data quick toggle doesn't work.
Bluetooth can be used via the terminal using bluetoothctl command or using blueman sudo apt install blueman but does not work via the settings app.
GPS works partially via Epiphany (tested with open street map).
Signal strength is reported at 1% but Mobile data and calls work just fine.
Anything related to cameras do not work it is a global issue across all devices, it does however work in Waydroid.
Changing audio to speaker in calls does not work on dandelion but works on angelica.
When a headphone is plugged in audio output must be changed manually in the settings.
Dual SIM functionality is currently not implemented in Phosh so only one SIM works at the moment.
Mobile hotspot does not work
Final notes​
I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed.
Support​
Device specific telegram group: @ut_angelica.
Droidian telegram group: @DroidianLinux.
All the sources are available at
Droidian for Redmi 9A/9AT and Redmi 9C/9C NFC
All repositories related to Droidian on Redmi 9A/9AT and Redmi 9C/9C NFC (MT6765/MT6762) - Droidian for Redmi 9A/9AT and Redmi 9C/9C NFC
github.com
Attached images are from different devices but the interface looks and acts the same.

I cant flash this on the recovery touchscreen dont Work what can i do for fix?il dont know my type of redmi 9a the data code is m2008c3lg

laharl_22 said:
I cant flash this on the recovery touchscreen dont Work what can i do for fix?il dont know my type of redmi 9a the data code is m2008c3lg
Click to expand...
Click to collapse
recovery touchscreen? if you mean the rootfs or adaptation package you can sideload them

FakeShell said:
recovery touchscreen? if you mean the rootfs or adaptation package you can sideload them
Click to expand...
Click to collapse
I cant do nothing on orangefox recovery tested many times the touchscreen and mouse with otg nothing work only the power button

laharl_22 said:
I cant do nothing on orangefox recovery tested many times the touchscreen and mouse with otg nothing work only the power button
Click to expand...
Click to collapse
can you try some other recovery such as the pbrp?
i will edit the post and add a second installation method soon

Just added the second installation method
you can try that out now

FakeShell said:
Just added the second installation method
you can try that out
Click to expand...
Click to collapse

It fails at the last step install.sh no such file or directory but the dir of the script is mounted and chmod work .sorry for my double post

laharl_22 said:
It fails at the last step install.sh no such file or directory but the dir of the script is mounted and chmod work .sorry for my double post
Click to expand...
Click to collapse
my bad it was a typo in my documentation
redo the second installation method

cd /tmp/adaptation-garden-script && chmod +x install.sh && sh install.sh
mount: '/dev/block/loop10'->'/mnt/': Block device required
mknod: /dev/loop1: File exists
losetup: /dev/loop1=/data/rootfs.img: Device or resource busy
mkdir: '/rootfs': File exists
cp: bad './etc/systemd/system/pulseaudio.service.d/*': No such file or directory
cp: /rootfs/etc/udev/rules.d/: No such file or directory
cp: /rootfs/etc/pulse/: Is a directory
cp: /rootfs/etc/ofono/: Is a directory
cp: '/rootfs/etc/modules-load.d/' not directory
cp: /rootfs/etc/apt/sources.list.d/: No such file or directory
cp: /rootfs/usr/share/keyrings/garden.gpg: No such file or directory
chroot: exec /bin/bash: No such file or directory i have this at the final step

laharl_22 said:
cd /tmp/adaptation-garden-script && chmod +x install.sh && sh install.sh
mount: '/dev/block/loop10'->'/mnt/': Block device required
mknod: /dev/loop1: File exists
losetup: /dev/loop1=/data/rootfs.img: Device or resource busy
mkdir: '/rootfs': File exists
cp: bad './etc/systemd/system/pulseaudio.service.d/*': No such file or directory
cp: /rootfs/etc/udev/rules.d/: No such file or directory
cp: /rootfs/etc/pulse/: Is a directory
cp: /rootfs/etc/ofono/: Is a directory
cp: '/rootfs/etc/modules-load.d/' not directory
cp: /rootfs/etc/apt/sources.list.d/: No such file or directory
cp: /rootfs/usr/share/keyrings/garden.gpg: No such file or directory
chroot: exec /bin/bash: No such file or directory i have this at the final step
Click to expand...
Click to collapse
Can you drop me a message at @FakeShell at telegram?
because this seems to work and run fine on my 9A
have to troubleshoot a bit

FakeShell said:
Can you drop me a message at @FakeShell at telegram?
because this seems to work and run fine on my 9A
have to troubleshoot a bit
Click to expand...
Click to collapse
I think my device is corrupted on all zip i have error 1 and unable to mount storage i dont know why.i dont have telegram

laharl_22 said:
I think my device is corrupted on all zip i have error 1 and unable to mount storage i dont know why.i dont have telegram
Click to expand...
Click to collapse
you can try flashing back android

Where to write it: cd /tmp/adaptation-garden-script && chmod +x install.sh && ./install.sh ???

vipinc said:
Where to write it: cd /tmp/adaptation-garden-script && chmod +x install.sh && ./install.sh ???
Click to expand...
Click to collapse
in adb shell

FakeShell said:
View attachment 5665895
Requirements​
Android 10 firmware for your device:
Redmi 9A dandelion: LINK.
Redmi 9C angelica: LINK.
Dandelion​
Download the latest rootfs: droidian-OFFICIAL-phosh-phone-rootfs-api29-armhf-nightly_XXXXXXXX.zip.
Download the adaptation package: adaptation-droidian-garden.zip.
Download boot-dandelion.img, dtbo-dandelion.img, vbmeta-dandelion.img.
Download our customized version of OrangeFox recovery OrangeFox-R11-garden-droidian.img
Angelica​
Download the latest rootfs: droidian-OFFICIAL-phosh-phone-rootfs-api29-armhf-nightly_XXXXXXXX.zip.
Download the adaptation package: adaptation-droidian-garden.zip.
Download boot-dandelion.img, dtbo-dandelion.img, vbmeta-dandelion.img.
Download our customized version of OrangeFox recovery OrangeFox-R11-garden-droidian.img
Dandelion installation​
Flash boot-dandelion.img: fastboot flash boot boot-dandelion.img.
Flash dtbo-dandelion.img: fastboot flash dtbo dtbo-dandelion.img.
Flash vbmeta-dandelion.img: fastboot --disable-verity --disable-verification flash vbmeta vbmeta-dandelion.img.
Flash OrangeFox-R11-garden-droidian.img: fastboot flash recovery OrangeFox-R11-garden-droidian.img.
Format userdata as ext4 from inside the recovery or via fastboot: fastboot format:ext4 userdata.
Now boot into recovery.
Go into sideload mode and sideload droidian-OFFICIAL-phosh-phone-rootfs-api29-armhf-nightly_XXXXXXXX.zip: adb sideload droidian-OFFICIAL-phosh-phone-rootfs-api29-armhf-nightly_XXXXXXXX.zip
Go into sideload mode and sideload adaptation-droidian-garden.zip: adb sideload adaptation-droidian-garden.zip
Now boot into your device.
If for some reason sideload or recovery did not work out for you should try my second installation method:
Download the adaptation script (not the adaptation package): [adaptation-garden-script.zip] (https://garden.bardia.tech/adaptation-garden-script.zip).
Download PBRP: [PBRP-3.1.0.img] (https://garden.bardia.tech/PBRP-3.1.0.img)
Flash PBRP-3.1.0.img: fastboot flash recovery PBRP-3.1.0.img.
Now boot into recovery
Now extract adaptation-garden-script.zip on your PC/Laptop and push it to your device: adb push adaptation-garden-script /tmp
adb shell and Change directory to /tmp and run the script: cd /tmp/adaptation-garden-script && chmod +x install.sh && ./install.sh
Now boot into your device.
The first boot will take a while.
Angelica installation​
Flash boot-angelica.img: fastboot flash boot boot-angelica.img.
Flash dtbo-angelica.img: fastboot flash dtbo dtbo-angelica.img.
Flash vbmeta-dandelion.img: fastboot --disable-verity --disable-verification flash vbmeta vbmeta-angelica.img.
Flash OrangeFox-R11-garden-droidian.img: fastboot flash recovery OrangeFox-R11-garden-droidian.img.
Format userdata as ext4 from inside the recovery or via fastboot: fastboot format:ext4 userdata.
Now boot into recovery.
Go into sideload mode and sideload droidian-OFFICIAL-phosh-phone-rootfs-api29-armhf-nightly_XXXXXXXX.zipip: adb sideload droidian-OFFICIAL-phosh-phone-rootfs-api29-armhf-nightly_XXXXXXXX.zip
Go into sideload mode and sideload adaptation-droidian-garden.zip: adb sideload adaptation-droidian-garden.zip
Now boot into your device.
If for some reason sideload or recovery did not work out for you should try my second installation method:
Download the adaptation script (not the adaptation package): [adaptation-garden-script.zip] (https://garden.bardia.tech/adaptation-garden-script.zip).
Download PBRP: [PBRP-3.1.0.img] (https://garden.bardia.tech/PBRP-3.1.0.img)
Flash PBRP-3.1.0.img: fastboot flash recovery PBRP-3.1.0.img.
Now boot into recovery
Now extract adaptation-garden-script.zip on your PC/Laptop and push it to your device: adb push adaptation-garden-script /tmp
Change directory to /tmp and run the script: cd /tmp/adaptation-garden-script && chmod +x install.sh && ./install.sh
Now boot into your device.
The first boot will take a while.
Notes​
The default password is 1234.
Xiaomi has not updated their kernel source tree and as a result some models of 9A and 9C have non functional display panels with our kernel.
Droidian GSIs are experimental! Bugs and missing features are expected.
List of working things can be found at https://garden.bardia.tech
Bugs​
Mobile data needs an APN to be set up from Settings -> Mobile -> Acess Point Names.
RIL gets broken after switching airplane mode or modem off/on.
Mobile data might stop working after making or recieving phone calls. Toggle Mobile Data from the settins off/on.
Mobile data quick toggle doesn't work.
Bluetooth can be used via the terminal using bluetoothctl command or using blueman sudo apt install blueman but does not work via the settings app.
GPS works partially via Epiphany (tested with open street map).
Signal strengh is reported at 1% but Mobile data and calls work just fine.
Anything related to cameras do not work it is a global issue across all devices, it does however work in Waydroid which is currently not available on angelica and dandelion.
Changing audio to speaker in calls does not work on dandelion but works on angelica.
When a headphone is plugged in audio output must be changed manually in the settings.
Dual SIM functionality is currently not implemented in Phosh so only one SIM works at the moment.
Just like bluetooth, hotspot does not work from settings either and has to be used from a GUI application (such as the default advanced network app) or from terminal.
Flashlight can be used via the desktop icons only.
Final notes​
I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed.
Support​
Device specific telegram group: @ut_angelica.
Droidian telegram group: @DroidianLinux.
All the sources are available at
Droidian for Redmi 9A/9AT and Redmi 9C/9C NFC
All repositories related to Droidian on Redmi 9A/9AT and Redmi 9C/9C NFC (MT6765/MT6762) - Droidian for Redmi 9A/9AT and Redmi 9C/9C NFC
github.com
Click to expand...
Click to collapse
Ow Lord, atomic bomb breaked myself on knees
+1

FakeShell said:
in adb shell
Click to expand...
Click to collapse
Hello FakeShell I have a kernel sources arm64 for redmi 9a can you compile and make droidian arm64

if you want i can upload the kernel sources

Hello bro
Your work is appreciable but i have a question that your droidian rom is based on Android 10 (Q) and it is became old in this big community Android 11 (R) and Android 12 (T) will (maybe) also release soon then who wants downgrade to an old android version from the latest android and latest security patches
My main question is that this rom droidian cant be based on latest android ?

the_arxyn said:
Hello bro
Your work is appreciable but i have a question that your droidian rom is based on Android 10 (Q) and it is became old in this big community Android 11 (R) and Android 12 (T) will (maybe) also release soon then who wants downgrade to an old android version from the latest android and latest security patches
My main question is that this rom droidian cant be based on latest android ?
Click to expand...
Click to collapse
This is a Linux OS its not an Android ROM they are very different. It uses the Android 10 vendor and kernel and thats it. the rest is done on droidian itself. The kernel we have right now is patched to work with all variants of dandelion, angelica and angelican thanks to TheKit and Muhammad. as we all know xiaomi did not update their kernel source for these devices (garden). but we have all the needed drivers that Xiaomi did not include. for vendor the reason it cannot be upgraded is that we don't use the android vendor the way you might think we do. the system partition is completely wiped and the OS is completely up to date so I will argue that right now Droidian is much more secure than android itself. upgrading to Android 12 is impossible right now as we don't have a general Halium container image for Android 12 but Android 11 is doable albeit a waste of time. because of how low end these devices are and the ram usage will increase without any benefit on our end.
The main concern right now is with the vendor being armhf which forces us to also work with armhf rootfs instead of arm64 (while the kernel is arm64!).
But then again arm64 vendor will also just increase memory usage and there are variants of garden with 2GB of memory which already suffer with armhf so at least for now arm64 is completely out of the question.

Related

[Q] help w jb root

all is good until the last step whats going on?
[email protected]:/tmp/share$ tar xvf motoshare.tgz
adb
busybox
pwn
su
Superuser.apk
[email protected]:/tmp/share$ sudo chown root:root pwn
[email protected]:/tmp/share$ sudo chmod 6755 pwn
[email protected]:/tmp/share$ /tmp/share/adb shell /storage/rfs0/pwn
bash: /tmp/share/adb: No such file or directory
[email protected]:/tmp/share$
Please give me the response for the terminal command:
ls -l /tmp/share/adb
re jb root
[email protected]:/tmp/share$ ls -l /tmp/share/adb
-rwsr-sr-x 1 jody jody 204436 Feb 11 11:49 /tmp/share/adb
jodybgoode said:
[email protected]:/tmp/share$ ls -l /tmp/share/adb
-rwsr-sr-x 1 jody jody 204436 Feb 11 11:49 /tmp/share/adb
Click to expand...
Click to collapse
I will get back to you after I talk with Dan. Unless another set of eyes knows the solution.
Sent from my MB886 using xda app-developers app
Try running the last command as simply "adb shell /storage/rfs0/pwn"
(i.e. without the prefix /tmp/share/)
Help confused
djrbliss said:
As promised, this post describes how to root the Atrix HD Jelly Bean build. This should also work on other Motorola 4.1.2 builds (Razr/Razr Maxx, Razr HD, Razr M, etc.).
The exploit requires setting up a special Samba share and mounting this share on your phone using the File Manager app. I apologize that this process may seem involved for some of you, and request that members of this community help each other out if some of you are having problems completing the procedure. I'm not able to provide individual tech support to every user who wants to root this phone.
The following instructions require a working Linux installation. The following instructions are for Ubuntu. If you don't want to install Ubuntu permanently on your machine, I suggest using a LiveCD installation. Instructions on setting this up are described here:
https://help.ubuntu.com/community/LiveCD#How-To_LiveCD_Ubuntu
Once you're booted into Ubuntu, open a terminal. Create a new directory for your Samba share:
Code:
mkdir /tmp/share
Next, install the samba package:
Code:
sudo apt-get install samba
Edit the configuration file for samba:
Code:
sudo gedit /etc/samba/smb.conf
Add the following lines to the end of the configuration file and save your changes:
Code:
[share]
path = /tmp/share
available = yes
valid users = guest
read only = yes
browsable = yes
public = yes
Close the text editor once you've saved your changes.
Next, create a user for the Samba share by typing in the terminal:
Code:
sudo useradd guest -m -G users
Set a password for the new user. Remember this password:
Code:
sudo passwd guest
Provide a password here and press enter. You won't see the characters you're typing, so be careful.
Next, set a password on the share. Use the same password you just provided:
Code:
sudo smbpasswd -a guest
Type the password you created before and press enter.
Next, restart the Samba server:
Code:
sudo restart smbd
Finally, download and prepare the required files to the Samba share:
Code:
cd /tmp/share
wget [url]http://vulnfactory.org/public/motoshare.tgz[/url]
tar xvf motoshare.tgz
sudo chown root:root pwn
sudo chmod 6755 pwn
At this point, you'll need to know the IP address of your Linux host, which you can get by running "ifconfig" from your terminal (it should be of the form "192.168.x.x").
Next, move over to your Android device. Ensure you have enabled USB Debugging Mode (under Settings -> Development Settings). Ensure your device is connected via Wifi.
Open the "File Manager" app, and select "Remote storage". Click "Add storage", and fill in fields as follows:
Code:
Host IP address: [your Linux machine's IP address]
Domain name: WORKGROUP
Shared folder name: share
User: guest
Password: [the password you created above]
At this point, the phone will mount your Linux share. To complete the process, plug in your phone via USB to your Linux machine, and type the following in your Linux terminal:
Code:
sudo /tmp/share/adb kill-server
sudo /tmp/share/adb shell /storage/rfs0/pwn
If it's successful, this should print "[+] Rooting complete!".
Finally, install Supersu by typing the following in the terminal:
Code:
sudo /tmp/share/adb install /tmp/share/eu.chainfire.supersu.apk
Congratulations, enjoy your rooted device.
I can't stress this enough: I can't provide individualized tech support for everyone on this forum. Please help each other.
TTLayland has been successfully rooted using this technique and has volunteered to help. If you get stuck and can't find support on these forums, feel free to email him at ttlayland (at) gmail (dot) com.
Paypal:
http://goo.gl/zBGb0
Click to expand...
Click to collapse
Got this error:
[email protected]:/tmp/share$ sudo /tmp/share/adb shell /storage/rfs0/pwn
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
mount: Operation not permitted
sh: can't create /system/xbin/busybox: Read-only file system
Unable to chmod /system/xbin/busybox: No such file or directory
sh: busybox: not found
cp: /system/bin/su: Read-only file system
Unable to chown /system/bin/su: No such file or directory
Unable to chmod /system/bin/su: No such file or directory
link failed Read-only file system
[+] Rooting complete!
[email protected]:/tmp/share$
Then it says: "There is no SU binary installed, and SuperSU cannot install it. This is a problem!" when opening SuperSU
PLEASE HELP HERE OR MY EMAIL! : [email protected]
Thanks in advanced
progrockguy said:
Try running the last command as simply "adb shell /storage/rfs0/pwn"
(i.e. without the prefix /tmp/share/)
Click to expand...
Click to collapse
progrockguy said:
Try running the last command as simply "adb shell /storage/rfs0/pwn"
(i.e. without the prefix /tmp/share/)
Click to expand...
Click to collapse
that worked kinda. well it says rooting complete but when i update superuser or root checker says root fail
Please Help: error: device offline
I am getting the following error
[email protected]:/tmp/share$ sudo /tmp/share/adb kill-server
[email protected]:/tmp/share$ sudo /tmp/share/adb shell /storage/rfs0/pwn
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: device offline
[email protected]:/tmp/share$
I am running the LiveCD in VMware Workstation
Sorry for the duplicate posts
worked perfectly after i used a 32 bit live disk
jodybgoode said:
worked perfectly after i used a 32 bit live disk[/QUOTE
Did you use Ubuntu and which version?
do you have a link to the CD?
Did you boot a machine or you used VMware or Virtualbox?
Click to expand...
Click to collapse
Why would anyone even attempt to use a VM for this simple root method? You could've been rooted already if you had just followed the instructions.
Same problem here. I couldn't get past the adb kill-server command. It would tell me there is no such directory. If any one can get past this can someone please tell me what they did to get past it.
Black_halo said:
Same problem here. I couldn't get past the adb kill-server command. It would tell me there is no such directory. If any one can get past this can someone please tell me what they did to get past it.
Click to expand...
Click to collapse
I am stuck, I have tried so many machine to no luck
Please someone help
Start over and just copy and paste each single line and hit enter do not copy multiple code lines .
ATRIX HD running BATAKANG 1.10
sickkside13 said:
Start over and just copy and paste each single line and hit enter do not copy multiple code lines .
ATRIX HD running BATAKANG 1.10
Click to expand...
Click to collapse
I did, no luck
Dammz man idk what else to tell you yesterday i spend all day trying to root too but just when i was about to give up i got everything g working
ATRIX HD running BATAKANG 1.10
sickkside13 said:
Dammz man idk what else to tell you yesterday i spend all day trying to root too but just when i was about to give up i got everything g working
ATRIX HD running BATAKANG 1.10
Click to expand...
Click to collapse
hehehehe
Does the root method have anything to do with having android sdk and ndk on your system? Im thinking thats what it is now. Would i have to have linux sdk to run with terminal root or windows sdk?
Black_halo said:
Does the root method have anything to do with having android sdk and ndk on your system? Im thinking thats what it is now. Would i have to have linux sdk to run with terminal root or windows sdk?
Click to expand...
Click to collapse
No, you don't need the Android SDK/NDK, since I included a copy of ADB in the tarball file that you extracted to /tmp/share.
What's the output of "ls -l /tmp/share/adb" on your Linux machine?
I had to re-flash official JB firmware in RSD Lite before the exploit would work. Before that, the Exploit would return "Root Complete", but there was no root access (though I could su to # in adb). I run Ubuntu 12.04 x64 at work already with Windows in VirtualBox.
RSD Lite doesn't seem to want to complete a flash in the Windows VMs I run in VirtualBox at work, so I waited until I got home and used my Windows 8 Pro machine to RSD the phone with the official JB firmware. I run Ubuntu 12.04 in a VirtualBox on that machine already, so after the RSD flash, I ran the exploit from that VM - BINGO - worked on the first try.
Failing other options, you might want to try re-flashing JB in RSD Lite and running the exploit on a fresh device.
I used the firmware in this thread (To fix the issue the thread is about):
http://forum.xda-developers.com/showthread.php?t=2057078
If you decide to try that, Be SURE to get the firmware zip AND THE XML and replace the XML before flashing!!

[GUIDE] Making Dump Files Out of Android Device Partitions

Use:
The main purpose is to make a file that contains all data in android specific partition. This is really handy in case of dumping leak firmwares.
Pr-requirement:
- Rooted device.
- Knowledge of how to use adb or Terminal Emulator.
The first step of making dump files out of device partitions is to locate its mounting points..!!
So in our tutorial, we will make it in 2 sections. Section 1 for how to get mounting points, and section 2 for how to get partition dumped..
Keep in mind that this is xda-university; so my target is to show beginners how to do that manually, without the aid of any tool, so they can get the concept behind it.. OK let's begin..!!
Section 1:
Getting mounting points​There are several methods to achieve this, but we will discuss the easiest methods that give efficient information about the partition that you want to know its mounting point.
All these methods will be described using adb shell.
Way #1
Code:
adb shell
cat /proc/partitions
This one needs from you to figure out which block belong to which partition name.!!
{
"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"
}
Way #2
Code:
adb shell
ls -al /dev/block/platform/[B][COLOR="Blue"]dw_mmc[/COLOR][/B]/by-name
This one will give you info about the dev block names WITH their familiar names (i.e, boot, recovery, system... etc)
This command is not universal between devices, and you will need to gather its pieces (/dev/block/platform/dw_mmc/by-name).
How?
- In your device, use any explorer that can get you to the device root (personally I use ES Explorer, by pressing on "/" on navigation bar).
- Go to "/dev/block/platform/" folder
- Here you will see some files and folders, we need to open folders and search for the folder called "by-name" inside one of them; in my situation it was "dw_mmc" folder which has the folder "by-name" inside it.
- At the end, my targeted piece info will be (/dev/block/platform/dw_mmc/by-name)
- Now open adb shell and put that command..
Way #3
By pushing parted binary to /system/bin folder and run it (you can find it in attachment).
Code:
adb remount
adb shell "su" "" "mount -o remount,rw /system"
adb push parted /system/bin/parted
adb shell
chmod 0755 /system/bin/parted
parted /dev/block/[B][COLOR="Blue"]mmcblk0[/COLOR][/B]
print
Here, your mounting points will start with /dev/block/mmcblk0p* where (*) is the number shown in the table above for each partition.
example:
The hidden partition mounting point will be mmcblk0p10
The radio partition mounting point will be mmcblk0p7
The system partition mounting point will be mmcblk0p9
The recovery partition mounting point will be mmcblk0p6
and so on
Don't forget to "quit" the parted action after grasping your device mounting points.
N.B:
- You may need to run first:
Code:
adb shell
cat /proc/partitions
to know what is the initial name for your device partition.. In the example above, it was mmcblk0.
- Also to be able to do adb push to /system partition for parted binary, you will need insecure boot.img used in your ROM or adbd insecure installed in your device (Check this thread for that app), or just push parted binary manually by any root explorer and then fix permissions to rwxr-xr-x (755).
***​
Section 2:
Dumping ROM partition​After locating the mounting point of the partition you want to dump, open adb shell command prompt and type:
Code:
adb shell
su
dd if=[B][COLOR="Blue"]/yourMountingPoint[/COLOR][/B] of=[B][COLOR="Green"]/yourDestination[/COLOR][COLOR="Red"]/partitionType[/COLOR][/B]
Let's say I want to take a dump out of system partition from above example. So the adb commands will be:
Code:
adb shell
su
dd if=[B][COLOR="Blue"]/dev/block/mmcblk0p9[/COLOR][/B] of=[B][COLOR="Green"]/sdcard[/COLOR][COLOR="Red"]/system.img[/COLOR][/B]
This may take a while to complete the dumping process, depending on the size of your dumped partition; so be patient..
Note:
If the partition is formatted as ext3/4 then the dumped partition will have .img as an extension.
Other partition dumps have different extensions; examples:
radio.bin
param.lfs
Sbl.bin
zImage (without extension)
***​
Optional:
Read Partition Image​After dumping an image from android partition, you can mount it to extract a particular file for sharing, or the whole dump content in case the ROM chief wants to make a ROM out of dump files..
For Linux Users:
- Open terminal and type:
Code:
su -
mkdir -p /mnt/disk
mount -o loop [B][COLOR="Red"]yourImage.img[/COLOR][/B] /mnt/disk
cd /mnt/disk
ls -l
For Windows Users:
- Download LinuxReader from this site here.
- Open it -> Drives -> Mount Image -> Then choose your dumped image and hit Mount. A new driver will appear that contains all files inside the dumped image called "Linux native Volume 1". Just double click it to get inside the dumped image.
I hope you will find this tutorial beneficial,,,
Yours;
Actions Explanation
★ Tutorial Legends ★​
In this post, I will try to explain the use of each binary used in the tutorial, so you can make sense of each action taken.
#1
Code:
adb shell
Run remote shell interactively, as if you are in linux terminal.
Click to expand...
Click to collapse
#2
Code:
cat /proc/partitions
cat binary is used to concatenate file(s) and print them to standard output display. In our example, it prints the content of partitions file which is found in proc folder to screen display.
Click to expand...
Click to collapse
#3
Code:
ls -al /dev/block/platform/dw_mmc/by-name
ls binary is used to list directory contents.
-al is the used option for ls which means to include entries that started with "." in long listing format. There are a lot of options for ls binary. You can always print ls --h to display help menu for other options available.
Click to expand...
Click to collapse
#4
Code:
adb remount
Remounts the /system partition on the device read / write. This has been disabled in some devices (those with secure boot image); so you need to make sure that you have patched adbd that can run this command effectively.
Click to expand...
Click to collapse
#5
Code:
su
Used to get super-user privilege.
Click to expand...
Click to collapse
#6
Code:
mount -o remount,[B][COLOR="Red"]rw[/COLOR][/B] /system
Specific command to mount the /system partition on the device read / write (rw).
If you change rw to ro, you will get /system partition mounted as read only.
Click to expand...
Click to collapse
#7
Code:
adb push parted /system/bin/parted
adb push is used to copy file/dir from your local computer to android device. The usual format is adb push <local> <remote>
Click to expand...
Click to collapse
#8
Code:
chmod 0755 /system/bin/parted
chmod binary is used to set permissions for the specified file/dir.
The number after chmod is the permission used. See the next box for better understanding of chmod formatting:
Code:
[CENTER][B][COLOR="Red"]----------------
| CHMOD SCHEME |
----------------[/COLOR][/B][/CENTER]
[B] r w x[/B]
[B]4 2 1 [COLOR="Green"]= 7 (Full Permissions)[/COLOR][/B]
User ( ) ( ) ( ) [B][COLOR="Green"]--> 2nd digit[/COLOR][/B]
Group ( ) ( ) ( ) [B][COLOR="Green"]--> 3rd digit[/COLOR][/B]
Other ( ) ( ) ( ) [B][COLOR="Green"]--> 4th digit[/COLOR][/B]
Special UID GID STK
( ) ( ) ( ) [B][COLOR="Green"]--> 1st digit, ignored on most cases or put 0[/COLOR][/B]
In the above example, it is set to 0755 which means the following scheme:
Code:
[B] r w x[/B]
[B]4 2 1[/B]
User ([B][COLOR="Red"]*[/COLOR][/B]) ([B][COLOR="Red"]*[/COLOR][/B]) ([B][COLOR="Red"]*[/COLOR][/B]) [B][COLOR="Green"]--> This equals to 7 (rwx)[/COLOR][/B]
Group ([B][COLOR="Red"]*[/COLOR][/B]) ( ) ([B][COLOR="Red"]*[/COLOR][/B]) [B][COLOR="Green"]--> This equals to 5 (r-x)[/COLOR][/B]
Other ([B][COLOR="Red"]*[/COLOR][/B]) ( ) ([B][COLOR="Red"]*[/COLOR][/B]) [B][COLOR="Green"]--> This equals to 5 (r-x)[/COLOR][/B]
Special UID GID STK
( ) ( ) ( ) [B][COLOR="Green"]--> This equals to 0 (---)[/COLOR][/B]
As you can see, if you said 0755, it will be as same as saying ---rwxr-xr-x
Click to expand...
Click to collapse
#9
Code:
dd if=/dev/block/mmcblk0p9 of=/sdcard/system.img
dd binary is used to copy a file with converting and formatting.
if means input file; here we pointed to the whole partition, not specific file.
of means outputting file to specific destination path; here it is to sdcard with system.img name.
Click to expand...
Click to collapse
#10
Code:
mkdir -p /mnt/disk
mkdir binary is used to make folder dir.
-p is mkdir option which means to create folder with sub-folder at the same time. Here we want to create mnt folder that contains disk sub-folder in it. If the folder and or sub-folder(s) are already exists, it will not give error but nothing will be created.
Click to expand...
Click to collapse
#11
Code:
mount -o loop yourImage.img /mnt/disk
This is linux way to mount images into specific directory (/mnt/disk in this example).
Click to expand...
Click to collapse
#12
Code:
cd /mnt/disk
cd used to get inside specific dir path.
Click to expand...
Click to collapse
#13
Code:
ls -l
ls binary is used to list directory contents as described above.
-l is the used option for ls which means to list contents in long listing format.
Click to expand...
Click to collapse
Cheers
another way to get common names
on way #2, I've often used:
Code:
cat /proc/emmc
on a few devices to reveal similar info.
Rob
can i able to mount boot.img in android itself...actually i wanted to extract boot.img frm mobile without any tools or without the help of PC...if there be any possibilities..??
hasan4791 said:
can i able to mount boot.img in android itself...actually i wanted to extract boot.img frm mobile without any tools or without the help of PC...if there be any possibilities..??
Click to expand...
Click to collapse
if you mean extract to modify boot.img, then I don't think there is away to do that from device itself in the moment..
if you mean dumping boot.img then yes you can, just install terminal emulator from Google play and you can run adb shell commands directly from the device
Great guide hopefully makes it easier for us to get dumps! if you add logcats etc, i find they have trouble executing "adb logcat >> log.txt" -.-
also you should teach them the easy tar method, so while booted "tar -c /system/* >> /sdcard/system.tar" or via adb shell
ricky310711 said:
Great guide hopefully makes it easier for us to get dumps! if you add logcats etc, i find they have trouble executing "adb logcat >> log.txt" -.-
also you should teach them the easy tar method, so while booted "tar -c /system/* >> /sdcard/system.tar" or via adb shell
Click to expand...
Click to collapse
Yup that is possible and easy to extract but it is only for partitions that is shown in android os,,, you can't use it for boot.img, sbl.bin, modem.bin...etc right
majdinj said:
Yup that is possible and easy to extract but it is only for partitions that is shown in android os,,, you can't use it for boot.img, sbl.bin, modem.bin...etc right
Click to expand...
Click to collapse
ofcoarse, i actually had a project going where it detects all partitions(modems, boot.img, system etc..) that archives itself into a .zip
it was going well until i did something in the script, now it only works on the s3 it shall be continued one day!
Such great tutorial, this is definitely going to come in handy for me. I have a question, how can you dump (extract) a bootloader? Can i use the same method as dumping the ROM?
Could you explain how to extract stock recovery image please?
Sent from my HTC One using xda app-developers app
Where did the parted binary come from?
For Gods Sake
http://forum.xda-developers.com/sho...IDE] Unpack/repack ext4 Android system images
http://forum.xda-developers.com/sho... Creator (deployable over all kernel sources)
http://forum.xda-developers.com/sho...ipt]Backup all paritions on i9505 to odin rom
http://forum.xda-developers.com/sho...al 4.3 TW Custom Rom/ The ORIGINAL WIFI TRICK
... use Forum Search Engine first, then start asking all your 'important' questions
¤ GT-I9505 - powered by KitKat ¤
insink71 said:
on way #2, I've often used:
Code:
cat /proc/emmc
on a few devices to reveal similar info.
Rob
Click to expand...
Click to collapse
Thx for this. On my HTC One there is no "by-name" folder. It only has "by-num". cat /proc/emmc works fine though.
Cheers.
I also wrote a guide, It just using the "by-name"
and needs root
[HOWTO] dump your rom
Code:
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/storage/extSdCard/system.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=/storage/extSdCard/recovery.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/param of=/storage/extSdCard/param.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/extSdCard/boot.img
Hi,
I tried this on my I-9505G. It is NOT rooted, so I thought I could enter the system through Clockworkmod Recovery.
I did it, but at first I didn't mount the DATA partition (later on I did through CWM Recovery); I still ran the command:
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/data/media/TEST/system.img
Thought I hadn't mounted anything, the media folder was still there, I only created the TEST folder.
After the image was created I typed the "ls" command and the system.img file was in /data/media/TEST/.
I then rebooted once again in CWM and ran the "adb shell" command once again, I entered /data/media/ e neither the img file nor the TEST folder I had created were there.
My question is: where have they gone?? Are they still occupying some of my space or they just got deleted automatically when I rebooted??
Please let me know as I'd like to free that extra unuseful 1.2 Gb system.img file.
Anyway, just as side information, I later on mounted the /data through CWM interface and was able to see the folders ("/data/media/0/") I can see by plugging the phone normally to the computer. I then dumped the image.
I have some other questions:
I can I mount the /data folder (or the external SD) via command?
What extention should I give to the other partitions? (All of them)
Why did you say that it's MANDATORY that the phone be rooted if it can be done this way?
Are the images I'm dumping flashable through fastboot?
Thank you all for your time!
Anybody? Please.
•I can I mount the /data folder (or the external SD) via command?
I have not been able to find the SD card in clockwork on the I9505G, hence one of my rooting procedures send the root file vi "adb sideload".
I might be able to pull the data from the phone but the clockwork recovery is still not working 100% when fastbooting it.
•What extention should I give to the other partitions? (All of them)
.img are fine.
•Why did you say that it's MANDATORY that the phone be rooted if it can be done this way?
currently it is required that the phone be unlocked. Something need to be fixed in clockwork to make it work any other way.
•Are the images I'm dumping flashable through fastboot?
They should be, but I have not been able to flash anything on the I9505G vi fastboot because of the secure boot.
without a full official image this make my playing around a little concerning (slowing me down).
I will look into this at my leisure. I would love to be able to pull a rom off a phone with only unlocking it.
I will test some stuff using my old galaxy nexus.
I actually dumped everything WITHOUT being rooted. I only unlocked the bootloader... So it works.
Further, I tried to run "fastboot boot recovery.img" with recovery.img being the image file I dumped. The phone froze and I had to pull the battery... So I assume they're not flashable as well, though I'd like other feedbacks.
I've not clearly understood what "secure boot" means. Any guide or wiki?
Thanks!
---------- Post added at 06:56 PM ---------- Previous post was at 06:55 PM ----------
I actually dumped everything WITHOUT being rooted. I only unlocked the bootloader... So it works.
Further, I tried to run "fastboot boot recovery.img" with recovery.img being the image file I dumped. The phone froze and I had to pull the battery... So I assume they're not flashable as well, though I'd like other feedbacks.
I've not clearly understood what "secure boot" means. Any guide or wiki?
Thanks!
Hey, great guide! I need some help but. I can't retrieve the common names / labels of my devices partitions. It's a GT-i8150 and there is no 'by-name' sub directory. Furthermore, parted does not work on mmcblk0 for some reason (unable to satisfy partition restraints or something). I also have no emmc file in proc.
Does anyone know how some other methods for getting the names of the partitions?
EDIT:
Another question - using ADB shell, is it possible to dump a partition straight from the phone onto the computers hard drive? My little 2GB sd card isn't coping! Thanks
a very basic but good guide
Sent from my GT-P1000 using xda app-developers app

[Recovery] [v500] CWM 6.0.5.1

ClockworkMod recovery (6.0.5.1) for LG G Pad 8.3 v500. This custom recovery installation package is for v500 models only. Built from source on 2014-12-13 by Jenkins.
Installation: Flash zip file with any custom recovery and reboot into updated CWM recovery.
Link: v500-CWM-6.0.5.1-20141213-recovery-signed.zip
MD5: 83150942a4f27006691472fa12159631
Note: An advantage to using the official CWM recovery with CM 11 is that the CWM recovery can be automatically updated with the CM Update tool, if enabled in the CM 11 developer options.
Manual Installation (first time installing custom recovery):
1) Gain root permission (ie; with Stumproot) and install SuperSU and Busybox.
2) Install Terminal Emulator or use ADB for opening up a shell (this example is using ADB).
Note: If using Terminal Emulator, make sure root access is given via SuperSU.
3) Download CWM installation zip file from the link above and manually extract it. Also, download the loki_tool binary from https://github.com/djrbliss/loki/archive/master.zip. The loki_tool binary is found in the "bin" folder of loki-master.zip after the file is extracted.
4) Copy recovery.img (contained in the CWM installation zip file from step #3) and the loki_tool binary (contained in the loki-master.zip file from step #3) to /data/local/tmp on your LG G Pad 8.3 v500 tablet with either ADB or a root explorer application and make loki_tool executable.
Code:
adb push recovery.img /data/local/tmp
adb push loki_tool /data/local/tmp
adb shell
su
chmod 755 /data/local/tmp/loki_tool
Note: Since the command "su" was entered, the shell has root permissions to proceed.
5) Patch the recovery.img into recovery.lok using loki_tool:
Code:
dd if=/dev/block/platform/msm_sdcc.1/by-name/aboot of=/data/local/tmp/aboot.img
/data/local/tmp/loki_tool patch recovery /data/local/tmp/aboot.img /data/local/tmp/recovery.img /data/local/tmp/recovery.lok
Note #1: At this point in the installation procedure, there have been no permanent changes to the system. If there is an error or warning while patching recovery.img and creating recovery.lok, then stop this manual installation procedure. In most cases, the problem is that the version of aboot.img found on the device is probably not exploitable with loki_tool. This manual custom recovery installation procedure must be started over again from the beginning after flashing a loki exploitable aboot.img to the device (downgrading firmware should help).
Note #2: If recovery.lok is created successfully without any errors or warnings, then continue with the final step. The shell should still be open with root (su) permissions enabled from the previous steps.
6) Flash recovery.lok file with loki_tool and reboot to new custom recovery.
Code:
/data/local/tmp/loki_tool flash recovery /data/local/tmp/recovery.lok
exit
exit
adb reboot recovery
Updated CWM to 20141120 sources.
sr: Fix vsync logic
* Use CLOCK_MONOTONIC to insulate from system clock changes.
* Normalize all timespec calculations to avoid overflow/underflow.
* Don't signal vsync if poll() fails.
Change-Id: If284ebf581309953c51b2f8d33d7d5800c636be5
sr: Fix screen flashing during wipe operations
* Clear buffer in draw_progress_locked() and always call this in
update_progress_locked(). This is necessary to ensure that all
backing frames in the graphics implementation get updated because
we aren't guaranteed to have any particular number of backing
frames.
* Remove dialogs on wipe operations since we are using the progress
animation now.
* Set progress indicator after showing "Formatting" text to avoid
momentary flicker.
Change-Id: I240d3b8e5c741c9f3ea4e5e17c1b9593e053888a
sr: Only use 4 items on wipe confirmation screens
* Large fonts in Touch UI prevent more than about 7 menu lines.
Change-Id: If523a85d67460c0ac4e012727d946eadb9c68436
Added guide to OP for first time custom recovery installation.
Edit: Updated guide to use loki_tool from github.
Hi,
I have tried this method and get an "unable to find" error as regard loki, seen in this picture i took.
I have placed both recovery.img and loki_tool as from your download links in data/local/tmp folder on lg
Where am i going wrong?
Thank you
{
"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"
}
When you type "adb shell" to open a connection, wait for the shell to open before typing "su". You will then notice that the terminal says "root" as the user. Make sure you have "dd" installed (this comes with installing Busybox). You can tell if dd is installed by typing "which dd" in the shell. If it returns with a path to dd, then it's there. I also noticed that you tried to chmod loki_tool before you have typed su to gain root. You only need to type su one time to get root permissions in the shell. You can tell it is using root because it shows you as the root user at the command prompt.
I am sorry for my dumbness, but i am new to this and not a clue what you are talking about lol.
I never typed su as i followed this procedure on youtube and copy and pasted your text.
I am trying to understand this adb method, but a noob tut is not available, thus trying anyway to get it to work obviously without success lol
https://www.youtube.com/watch?v=MVXX-YdhRU0
Best wishes
ADB needs root access in developer options. Attached screenshot.
Wingchundub said:
I am sorry for my dumbness, but i am new to this and not a clue what you are talking about lol.
I never typed su as i followed this procedure on youtube and copy and pasted your text.
I am trying to understand this adb method, but a noob tut is not available, thus trying anyway to get it to work obviously without success lol
https://www.youtube.com/watch?v=MVXX-YdhRU0
Best wishes
Click to expand...
Click to collapse
You are getting an unable to find error because you typed the name incorrectly (it is loki_tool not loki_tooldd). Be very careful that everything is exactly the same as the guide.
Edit: Also, when you type a command in ADB shell, wait for the command to finish before you type the next command. You can enter the next command in ADB when the prompt comes back.
Edit 2: After typing "adb shell", you only need to type "su" one time as long as you don't close the window.
Does it support f2fs?
I think f2fs support is not default for stock CM kernel. There aren't any customizations on this. This is from Jenkins.
Currently I'm using LP AOSP. Afaik, only LP available. On my Razr HD f2fs and CM12 works just great. Definitely noticeable faster with f2fs.
I have just noticed the loki-tooldd, i am positive i did not type that i,.e the dd on the end.
But i will again tomorrow, test this and come back with any results.
I am also never once typing SU, i assume the program is doing it automatically.
I will test and post pics also.
Thank you
Wingchundub said:
I have just noticed the loki-tooldd, i am positive i did not type that i,.e the dd on the end.
But i will again tomorrow, test this and come back with any results.
I am also never once typing SU, i assume the program is doing it automatically.
I will test and post pics also.
Thank you
Click to expand...
Click to collapse
I dont think ADB is working correctly for you because you are not getting the correct responses when you enter commands. It seems like your system is "hanging" when you enter commands in the adb shell.
Maybe you should try these commands in a Terminal Emulator shell instead of using an ADB shell. You will just need to install an extra root reboot application from Play Store so that you can easily reboot into the new recovery when you are finished.
Deltadroid said:
I dont think ADB is working correctly for you because you are not getting the correct responses when you enter commands. It seems like your system is "hanging" when you enter commands in the adb shell.
Maybe you should try these commands in a Terminal Emulator shell instead of using an ADB shell. You will just need to install an extra root reboot application from Play Store so that you can easily reboot into the new recovery when you are finished.
Click to expand...
Click to collapse
Thank you for you advice.
With terminal, I tried and copied the text provided, again gave same me errors and also the su and dd were there without me typing them.
It is coming to the point where i am giving up now as taking too much of my time.
Both are rooted and at least i can remove bloatware with root explorer etc and put my own stuff in, but would be nice to get this done and use custom roms, but simply not happening. @Tsjoklat, i do not see that option in developer options fella, checked 4 times to be sure.
Thank you loads fella, your a star and very helpful
Will You Do CWM Touch?
This version of CWM uses "swipe" gestures, but it isn't full touch. These versions of CWM are the official nightly builds. I was able to download the artifacts before they were removed for the next build in queue. Although, I plan on setting up a private build system pretty soon.
where am I wrong ???
HTML:
C:\Fastboot>adb devices
List of devices attached
07e7df499159c818 device
C:\Fastboot>adb shell
[email protected]:/ $ su
su
[email protected]:/ # adb push recovery.img /data/local/tmp
adb push recovery.img /data/local/tmp
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/ #
leardinet said:
where am I wrong ???
HTML:
C:\Fastboot>adb devicesList of devices attached07e7df499159c818 deviceC:\Fastboot>adb [email protected]:/ $ [email protected]:/ # adb push recovery.img /data/local/tmpadb push recovery.img /data/local/tmp* daemon not running. starting it now on port 5038 ** daemon started successfully *error: device not found1|[email protected]:/ #
Click to expand...
Click to collapse
It's out of order. First use adb to push the files, then use adb to open the shell.
Deltadroid said:
It's out of order. First use adb to push the files, then use adb to open the shell.
Click to expand...
Click to collapse
HTML:
C:\Program Files (x86)\Minimal ADB and Fastboot>adb push recovery.img /data/loca
l/tmp
cannot stat 'recovery.img': No such file or directory
C:\Program Files (x86)\Minimal ADB and Fastboot>
C:\Program Files (x86)\Minimal ADB and Fastboot>adb push loki_tool /data/local/t
mp
cannot stat 'loki_tool': No such file or directory
C:\Program Files (x86)\Minimal ADB and Fastboot>
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
su
chmod 755 /data/local/tmp/loki_tool
su
[email protected]:/ $
[email protected]:/ $ su
the files recovery.img and loki_tool copied in the data/local/tmp/ with ES File explorer
busybox installed
Your log says that you first typed "adb shell" and then you tried to use "adb push" inside the shell. Commands that begin with "adb" do not work when you are inside the "Adb shell".
Type "exit" inside the shell to close it and then "adb push" commands will work.

How to patch `system.img` to root the Samsung S10 5G (Qualcomm) device?

Hi All,
Device Detail:
- Samsung S10 5G
- Qualcomm Device
- Model: SM-G977U
- ROM: VZW-G977UVRU2ASH7-20190827135903
- Kernel-Version - Linux version 4.14.83-16633035 ([email protected]) (clang version 6.0.10 for Android NDK) #2 SMP PREEMPT Wed Aug 14 16:23:48 KST 2019
Background: I have
- rooted the device with instructions given by Magisk.
- I can successfully reboot to the recovery rootfs.
Problem: I am trying to modify the `system.img.ext4.lz4` file to root the device with normal boot. I am aware that it will not let the device install OTA Updates.
Unpack-Pack System and make new AP.tar, flash:
- Without any modification to the `system.img`, I have just unpacked `system.img.ext4.lz4`->`system.img.ext4`->`system.img`->mounted to system directory and packed it back to `system.img`->`system.img.ext4`->`system.img.ext4.lz4`.
- Replaced unpack-packed `system.img.ext4.lz4` with the AP `system.img.ext4.lz4` and make a tar of it.
- Then I have flashed it using Odin v3.13 along with BL, CP, and HOME_CSC.
- Odin has show PASS and I have rebooted the device into recovery mode.
- Done the Wipe data/factory reset and reboot to recovery again but released the recovery key combination on splash screen as mentioned in the root instructions .
- The device stuck in a boot loop.
Tries:
1. Disable Dm-verity
- Removed `avb` flag from `boot.img` with
Code:
magiskboot dtb boot.img patch
- Removed `avb` and `verify` flags from `dtbo.img` with
Code:
magiskboot dtb dtbo.img patch
- Patched `ramdisk.cpio` with
Code:
magiskboot cpio ./initrd 'patch false true'
Patched `boot.img` and `dtbo.img` is working fine with magisk patched AP file but the `ramdisk.cpio` creating the issue: Stuck at splash screen when trying to go to recovery after successfully flash with Odin. Download mode is appearing on splash screen.
So, I have used `boot.img` and `dtbo.img` along with unpack-packed `system.img.ext4.lz4` but the result is still a boot loop. I have also tried a combination of `boot.img` and `dtbo.img` along with unpack-packed `vendor.img.ext4.lz4` and flashed the AP.tar with other files but still the result is a boot loop.
So, I want to debug the problem and got to know about `pstore` which preserve the logs when kernel panic.
2. pstore
- Checked that `/sys/fs/pstore` is mounted by the system with following in init file: Grep the pstore using `find . | grep '\.rc' | xargs cat | grep pstore -n -i` and get following result:
Code:
314: # pstore/ramoops previous console log
315: mount pstore pstore /sys/fs/pstore nodev noexec nosuid
316: chown system log /sys/fs/pstore/console-ramoops
317: chmod 0440 /sys/fs/pstore/console-ramoops
318: chown system log /sys/fs/pstore/console-ramoops-0
319: chmod 0440 /sys/fs/pstore/console-ramoops-0
320: chown system log /sys/fs/pstore/pmsg-ramoops-0
321: chmod 0440 /sys/fs/pstore/pmsg-ramoops-0
- Checked the kernel config by pulling the file from /proc/config.gz.
Code:
$ cat config | grep PSTORE
CONFIG_PSTORE=y
CONFIG_PSTORE_ZLIB_COMPRESS=y
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
CONFIG_PSTORE_PMSG_SSPLOG=y
CONFIG_PSTORE_RAM=y
- Check the `ramoops` configuration:
Code:
./sys/module/ramoops/parameters/console_size 262144
./sys/module/ramoops/parameters/dump_oops 1
./sys/module/ramoops/parameters/ecc 0
./sys/module/ramoops/parameters/ftrace_size 262144
./sys/module/ramoops/parameters/mem_address 3241148416
./sys/module/ramoops/parameters/mem_size 1048576
./sys/module/ramoops/parameters/mem_type 0
./sys/module/ramoops/parameters/pmsg_size 262144
./sys/module/ramoops/parameters/record_size 262144
`pstore` setup looks fine but when I am trying the get logs from `sys/fs/pstore` then I found nothing.
I have tried it by two ways:
1. Crash manually with panic kernel using:
Code:
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger
Followed Reading Kernel Logs
2. Flashing non-working rom that cause a boot loop and then flashed a working ROM with rooting steps and checked the file at `sys/fs/pstore`.
I need a favor in:
- Any steps to fix/debug the `pstore` problem?
- Any other way to find the kernel logs?
Update 1: I get the logs from recovery but I am not able to identify the problem.
Logs link: https://drive.google.com/file/d/1b-XNmjpYvH-L8lY0xA0SYr7XcITVCrVS/view?usp=sharing
Description: In this video, I have done the following:
1. Displayed recovery logs before: The last recovery logs are ends with 8.
2. Rebooted the device with a recovery key combination. I have already wipe data partition before making this video.
3. The boot loop happens and in the next reboot, I have pressed the recovery key combination to open the recovery mode where logs that end with 9 displayed.
4. Then I have recorded `last_history`, `last_avc_message_recovery`, `last_log.9` and `last_kmsg.9`
5. `last_history` and `last_avc_message_recovery` looks unchanged(same as before boot loop).
6. Then, I just have tried to mount the system but that didn't work.
7. At last, I have just rebooted the system normally without any recovery key combination.
Some Highlighted logs of last_log.9
exec -f /system/bin/e2fsck -v -y /dev/block/bootdevice/by-name/cache
error: _do_exec: can't run '/system/bin/e2fsck'
(errno 13 : Permission denied)
/system/bin/e2fsck terminated by exit(255)
...
E:Can't read /cache/recovery/last_locale: No such file or directory
...
W:Failed to unmount /efs: Device or resource busy
can't unmount /efs - Device or resource busy
...
W:Failed to set brightness: Invalid argument
I:Screensaver disabled
Atomic Commit failed in DisableNonMainCrtcs
Atomic Commit failed, rc = 0
...
Reboot Recovery Cause is [[BootChecker]RebootRecoveryWithKey]
...
print_recovery_cause() : reboot_reason=[[BootChecker]RebootRecoveryWithKey]
...
[property list]
persist.audio.fluence.speaker=true
...
ro.vendor.build.security_patch=2018-08-05
Supported API: 3
I:/efs is already mounted
W:Failed to unmount /efs: Device or resource busy
check_selective_file:Can't unmount /efs - Device or resource busy
just_reboot_after_update = 1
should_wipe_cahcewipe_cache
-- Wiping cache...
erase_volume(/cache)
...
MDF_I: Completed reset MDF flag!
MDF_I: Completed initialized MDF for Recovery!
mke2fs 1.43.3 (04-Sep-2016)
Discarding device blocksL 4096/153600??????????????????????????????done
Discard takes 0.00051s
Creating filesystem with 153600 4k blocks and 38400 inodes
...
Creating journal (2048 blocks): done
...
copy_logs
...
Cache wipe complete
[Checking pre-multi-csc2]
[start failed section]
sales_code=VZW
Carrier ID=[XAA]
[system partition space check]
The device has /product partition.
[out-recovery]
I:system root image is true, so need to change the unmount point from /system to /system_root
running out-recovery time : 0.000s
running recovery time: 1.738s
copy_avc_msg_to_data(1, )
I:fs_type "ext4" for /cache
copy_file 'proc/avc_msg' 'cache/recovery/last_avc_msg_recovery'
!__RECOVERY_FOR_ASSAMBLY
b_del_recovery_command = true
Rebooting...
## finish_recovery_terminate(del=1, reboot_cmd=reboot, clear_BCB=1)
## finish_recovery(delcmd=1,...
I:Saving locale "en-US"
I:fs_type "ext4" for /cache
I:[libfs_mgr]dt_fstab: Skip disabled entry for partition vm-linux
I:## unlink /cache/recovery/command
copy_logs
I:fs_type "ext4" for /cache
copy_log_file :: create recovery log file '/cache/recovery/log'
copy_log_file :: create recovery log file '/cache/recovery/last_log'
Click to expand...
Click to collapse
Is anyone have experience in detecting problems from the kernel logs?
i can not help you, but we can collect ideas. what about re-sign the system.img? there is a key somewhere, i guess just deleting won't work but maybe it is possible to calculate checksum
or maybe you can switch to SuperSU 2.79 SR3 (latest release from chainfire) or at least look inside the update-binary shell script how to root system.
regarding dm-verity i would start with searching for "verify" flag in your fstabs and remove it. magisk is also doing some hex patches and re-signing, it's the best source to look inside magisk installer zip update-binary/ updater-script, if you have the knowledge to read code
another option is try to port a twrp recovery from another snapdragon (i wonder if somebody did this already) if you can find a porting guide
so the vzw s10 5g is unlockable?
elliwigy said:
so the vzw s10 5g is unlockable?
Click to expand...
Click to collapse
yes
aIecxs said:
yes
Click to expand...
Click to collapse
Figures lol.. I have a g975u from big red n don't plan on buying another lol
aIecxs said:
yes
Click to expand...
Click to collapse
Message me on telegram and I can help you if you help me.. I'm curious in some logs and what not.. I also might have something you can use..
Did you get it working? I have the same phone and I want to use the 600mgz tmobile 5g in a few days, so I need the right rom.
elliwigy said:
so the vzw s10 5g is unlockable?
Click to expand...
Click to collapse
aIecxs said:
yes
Click to expand...
Click to collapse
Snapdragon bootloader unlockable? How?
I'm a VZW customer and can get the phone on an upgrade, but want to root it...
i got a g977p and twrp n magisk working great
do you think it is possible to flash other branding on verizon devices with modded odin?
aIecxs said:
do you think it is possible to flash other branding on verizon devices with modded odin?
Click to expand...
Click to collapse
dunno.. its not possible on n976v..
Was there any luck on rooting the Verizon G977U?
@Vats12 has already successful rooted with magisk in recovery. this thread is for rooting system (kind of rooting where su binary is placed in /system/xbin like for older devices, which breaks OTA)
aIecxs said:
@Vats12 has already successful rooted with magisk in recovery. this thread is for rooting system (kind of rooting where su binary is placed in /system/xbin like for older devices, which breaks OTA)
Click to expand...
Click to collapse
So you want like the supersu method?
ExtremeGrief said:
So you want like the supersu method?
Click to expand...
Click to collapse
Yes, do you know how to do this?
Magisk (guide) does a lot of other things too..
Maybe we can use Magisk to disable the securities and then SuperSu can help in the rooting system?
Vats12 said:
Yes, do you know how to do this?
Magisk (guide) does a lot of other things too..
Maybe we can use Magisk to disable the securities and then SuperSu can help in the rooting system?
Click to expand...
Click to collapse
But why? Safetynet will be gone
What model is the device?
ExtremeGrief said:
But why? Safetynet will be gone
What model is the device?
Click to expand...
Click to collapse
model see OP! i guess because of the buttons needed for booting in magiskrecovery, but the reason is not important only HOW (for Vats12, not for me i don't own this device)
Sorry but this thread needs to be closed
aIecxs said:
model see OP! i guess because of the buttons needed for booting in magiskrecovery, but the reason is not important only HOW (for Vats12, not for me i don't own this device)
Click to expand...
Click to collapse
I don't want to be the one who shouts fake, but the instructions you gave a link to says you have to be able to flash a bootloader first, which means an unlocked blootloader, if you have Verizon rom this is not possible, as the blootloader is locked.
If you did find a way to flash a modified bootloader, or a modified recovery those are the instructions we need, because in fastboot you are unable to do this with a locked bootloader and you are unable to unlock the bootloader on Verizon. If you have a modified bootloader or recovery flashed on your device what did you use to flash it with Odin? Because only way to flash a boot.img is either get into download mode and flash with Odin, or with Edl, if you got into edl mode then can you provide instructions on that, because we would like to know how to get the device into EDL mode as well
Sorry boys this is a hoax.
@DroidisLINUX there is video proof in OP, and again for you:
This is not a tutorial about unlocking and rooting, it is a question how he can modify /system to permanently integrate su

Oneplus 7 pro firmware collection

Ah yes, Oneplus released that new update. Now I must download 2+ GB off my capped data plan, then flash it to recovery, carefully switch back my slot then flash my custom ROM again to the slot I just flashed OOS to and then flash OOS again to the other slot and then I must repeat everything above. After that I must delete the 2 fake partitions the updater created on data because they are useless. Oh wait it doesn't let me delete them who'd have thought?
Seriously? What on earth happened there
A better solution is required, especially something that grants more control. Well here it is
The boring stuff:
I am not responsible for anything you do to your device
These zips contain the following files:
Code:
The firmware (duh)
flashall - flashes both a and b
flash_a - only flashes slot a
flash_b - only flashes slot b
The following partitions found in the official oxygenos zip have been removed:
Code:
vbmeta
boot
dtbo
odm
system
vendor
reserve
india
Because for custom ROM users these partitions are either unused or used by the currently running custom ROM
How to flash?
From TWRP (it doesn't even need to support decryption):
Code:
adb push abl.img aop.img bluetooth.img cmnlib64.img cmnlib.img devcfg.img dsp.img flash_a flashall flash_b hyp.img keymaster.img LOGO.img modem.img oem_stanvbk.img qupfw.img storsec.img tz.img xbl_config.img xbl.img /tmp/
adb shell
cd /tmp
chmod 777 flashall # or flash_a/b
./flashall # or sh flashall or use flash_a/b
I suggest you use one of the flash_a/b scripts to only flash your current slot and test the changes out before running flashall
From termux:
You might need to set selinux to permissive while flashing. Only try to flash your current slot, reboot and if there are no errors flash the other slot
unzip the zip file to a directory and cd to it. If you use termux you should already know this
Just run one of the flashing scripts as root
Note that the flashing takes some time. Do not abort it
From adb root:
Sadly I don't have adb root so if someone has it they can let me know how it goes and how they flashed it
Do NOT believe in myths. You do NOT need to wipe cache/dalvik/any other nonsense while upgrading firmware. Stop wasting your time
Downloads:
Open beta 9: https://glassrom.pw/guacamole-ob9fw.zip
More will be added when I have time
Yes I personally tested this on my device and it was fine. Except that the popup camera pops out sometimes but I just suspect big brother. Nothing abnormal
Happy flashing. Or whatever
Anybody caught the latest OOS release link yet? All I found was an incremental OTA
Is this project discontinued? If yes, I'd like to see a revival of this.
hellcat50 said:
Is this project discontinued? If yes, I'd like to see a revival of this.
Click to expand...
Click to collapse
He doesn't care about support
The link is dead.
Does anyone have this zip?
I need these files
flashall
flash_a
flash_b
in order to make an up to date zip.
alessio89g said:
The link is dead.
Does anyone have this zip?
I need these files
flashall
flash_a
flash_b
in order to make an up to date zip.
Click to expand...
Click to collapse
you can get the file list and the firmware collection from the glassrom device tree
i stopped maintaining this as now i just ship firmware into my roms
Bitbucket
bitbucket.org
flash_a, flash_b and flashall really were just script generated scripts
something like
```
for i in $(ls *img | sed 's/.img$//g')
do
echo dd if="$i".img of=/dev/block/bootdevice/by-name/"$i"_a;
done
```
same for slot b:
```
for i in $(ls *img | sed 's/.img$//g')
do
echo dd if="$i".img of=/dev/block/bootdevice/by-name/"$i"_b;
done
```
concetenate flash_a and flash_b as follows:
```
cat flash_a flash_b > flashall
```
PS: you need to remove the oem_stanvbk_{a,b} entries as that is not an A/B partition. also i have just shown you roughly what i use to generate the flash scripts. there is no guarantee these work. example you might need to remove the $ from the regex

Categories

Resources