[Recovery] [v500] CWM 6.0.5.1 - G Pad 8.3 Original Android Development

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.

Related

[Q] ADB remount: operation not permitted

Hey Samsung Galaxy tab users and devs.
So im' having a bit of a problem here trying to remount my galaxy tab so i can read/write to it. My cache size is the famous and well hated 25 MB file size limit so i wanted to change it by using this method:
http://forum.xda-developers.com/showpost.php?p=18840882&postcount=227
Im currently running gingerbread 2.3 with root priviliges, and Clockworkmod 3.0.5
{
"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"
}
[/URL] [/IMG]
Whenever i've try to use the remount command it get this error:
http://imageshack.us/photo/my-images/600/androidadb.jpg/
So what am im doing wrong? running WIn 7 64 bit and my tablet is set to usb debugging mode.
Been searching Google and XDA the couple of days but haven't found any solution.
In advance thanks, jakk212
Jakk212 said:
Hey Samsung Galaxy tab users and devs.
So im' having a bit of a problem here trying to remount my galaxy tab so i can read/write to it. My cache size is the famous and well hated 25 MB file size limit so i wanted to change it by using this method:
http://forum.xda-developers.com/showpost.php?p=18840882&postcount=227
Im currently running gingerbread 2.3 with root priviliges, and Clockworkmod 3.0.5
[/URL] [/IMG]
Whenever i've try to use the remount command it get this error:
http://imageshack.us/photo/my-images/600/androidadb.jpg/
So what am im doing wrong? running WIn 7 64 bit and my tablet is set to usb debugging mode.
Been searching Google and XDA the couple of days but haven't found any solution.
In advance thanks, jakk212
Click to expand...
Click to collapse
Hi Jakk,
I'm not a developer, but, the error seems indicate that adb can't remount as RW the /system, so:
1) adb shell work? (you must see a "#" if you are root)
2) have you installed busybox?
3) the 01newcache script in init.d directory work if you have a rom/kernel that suppor init.d
I use the script and i can confirm that work very fine
Bye
Idk
1) How am i able to see that? Should i see a # at the ADB CMD box? Root checker veryfies that my device is rooted.
2) Yes it's installed using V1.16.2androidminimal - updating now.
3) How can i check if my ROM supports that? My rom is the Stock safe Rom provided when flashing to Overcome.
Using the "adb shell" command in ADB gives me a $
using the adb shell command gives me the $ as i said.
When using the command su it gives me the # you're where talking about.
Jakk212 said:
using the adb shell command gives me the $ as i said.
When using the command su it gives me the # you're where talking about.
Click to expand...
Click to collapse
Though im still not capable of remounting my galaxy tab
Jakk212 said:
using the adb shell command gives me the $ as i said.
When using the command su it gives me the # you're where talking about.
Click to expand...
Click to collapse
Hi Jakk,
Yes, so you have a working superuser thats ok, but if you have stock kernel (i think) there isn't any init.d support so the only way is to try manually.
Another way is installing a custom rom (boca, overcome, etc..) or custom kernel that have init.d support.
Bye
Idk
---------- Post added at 02:01 PM ---------- Previous post was at 01:55 PM ----------
Jakk212 said:
Though im still not capable of remounting my galaxy tab
Click to expand...
Click to collapse
There is some errore message when you try to remount via adb? Try to remount filsystem directly in a root shell, here :
http://forum.xda-developers.com/showthread.php?t=859712
there is, at the end of first post, the instruction to mount r/o the /system
Bye
Idk
Hmm actually not sure that there is a custom kernel installed (i don't suppose since it's a stock firmware, then the kernel should be stock - dosen't allow me to overglock however xD )
I've get this message:
Code:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
30336CA087D400EC device
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb remount
remount failed: Operation not permitted
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
$ su
# adb remount
adb remount
adb: not found
# remount
remount
remount: not found
#
Gonna try with to remount it directly in a root shell as you've said - see if that works.
I'll suppose that this is what im gonna write in adb?
Code:
> adb shell
# mount -o remount,rw -t rfs /dev/block/stl9 /system
# exit
Tried to flash the overcome kernel v3.3.1
Also i've connected the tab while in recovery mode now i get a ~$ when entering adb shell.
Jakk212 said:
Hmm actually not sure that there is a custom kernel installed (i don't suppose since it's a stock firmware, then the kernel should be stock - dosen't allow me to overglock however xD )
I've get this message:
Code:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
30336CA087D400EC device
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb remount
remount failed: Operation not permitted
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
$ su
# adb remount
adb remount
adb: not found
# remount
remount
remount: not found
#
Gonna try with to remount it directly in a root shell as you've said - see if that works.
I'll suppose that this is what im gonna write in adb?
Code:
> adb shell
# mount -o remount,rw -t rfs /dev/block/stl9 /system
# exit
Click to expand...
Click to collapse
Hi Jakk,
1) adb is use only from PC (windows or linux), there isn't any adb command into android OS...
2) My mistake: read this links: http://android-tricks.blogspot.com/2009/01/mount-filesystem-read-write.html and http://forum.xda-developers.com/showthread.php?t=685146; the above command is about rfs (Samsung Robust File System); if you have converted the filesystem into ext4, i'm not sure that above command work....
sorry
Bye
Idk
Im am able to mount using the
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Command you told me about but when i try to push the newcache file
Code:
adb push 01newcache /system/etc/init.d/
it simply says:
adb: Not found
When trying to copy it outside the shell it says:
failed to copy "01newcache" to "system/etc/init.d/": Is a directory.
Jakk212 said:
Im am able to mount using the
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Command you told me about but when i try to push the newcache file
Code:
adb push 01newcache /system/etc/init.d/
it simply says:
adb: Not found
When trying to copy it outside the shell it says:
failed to copy "01newcache" to "system/etc/init.d/": Is a directory.
Click to expand...
Click to collapse
Hi,
if you try the adb into android phone shell, simply don't work because adb is a windows command (adb = android debug bridge).
The good is seems you have the init.d directory, so try this:
go to android phone shell and remount /system
in a windows cmd shell do this:
adb push 01newcache /system/etc/init.d/
return into android phone shell:
adb shell
cd /system/etc/init.d
chmod 777 01newcache
ls -l /system/etc/init.d (to show the contend of init.d)
exit
Bye
So you mean that i'll just simply open a cmd box without refering to adb and then use the adb push 01newcache /system/etc/init.d/ command? How's that gonna work?
If you've got the time could you please assist me over teamwiever or something similair?
Jakk212 said:
So you mean that i'll just simply open a cmd box without refering to adb and then use the adb push 01newcache /system/etc/init.d/ command? How's that gonna work?
If you've got the time could you please assist me over teamwiever or something similair?
Click to expand...
Click to collapse
Hi Jakk,
Rollback, read this:
http://www.addictivetips.com/mobile/what-is-adb-and-how-to-install-it-android/
The operation is in 2 steps, pc and android terminal: adb is pc side the rest in android terminal.
I'm sorry, i prefer forum support, i've no time at this moment.....
If i'm not clear enough please tell me, i don't know your skill level...
Bye
Idk
pretty skilled, gonna start my IT-technician education after christmas, and i've know a bit bat programming from working with windows server and also a bit html and php.
capable of flashing ROMS, unbricking etc but haven't used ADB before. I've configured adb the exact same way as the tut you've sent me.
However i still just get's error codes like adb not found, remount not found, Is a directory, or are you sure you are rooted?
Jakk212 said:
pretty skilled, gonna start my IT-technician education after christmas, and i've know a bit bat programming from working with windows server and also a bit html and php.
capable of flashing ROMS, unbricking etc but haven't used ADB before. I've configured adb the exact same way as the tut you've sent me.
However i still just get's error codes like adb not found, remount not found, Is a directory, or are you sure you are rooted?
Click to expand...
Click to collapse
Is working ?:
Code:
adb shell
If yes then:
Code:
su
mount -o remount rw /system
then - if you are not able to use "push" - copy the file in your SDcard then, while in adb shell:
Code:
cp /sdcard/yourfile /your-destination/
Seem easy
then which one am i going to choose? The overwrite?
and am i just supposed to write it like this:
cp /mnt/sdcard/01newcache /system/etc/init.d/
Because then i've get a cp can't create /system/etc/init.d/: Is a directory
Jakk212 said:
then which one am i going to choose? The overwrite?
and am i just supposed to write it like this:
cp /mnt/sdcard/01newcache /system/etc/init.d/
Because then i've get a cp can't create /system/etc/init.d/: Is a directory
Click to expand...
Click to collapse
Try this:
cp /mnt/sdcard/01newcache /system/etc/init.d/01newcache
Bye
If you have the init.d folder then just manul copy "01newcache" to your sd card and from your tab, with a root explorer (i use esfile explorer with root option enabled from option menu) copy it to system/etc/init.d.
...to solve the original problem...
I fixed this on my device from a windows command prompt by typing "adb root" , which restarts the daemon on the device with root permissions.

Onemsomic's ICS 3.1RC no GPS lock!

I wanted to ask this in the actual thread but 10 post limit...
Anyway,
I can't get any GPS lock on my I9000, Onemsomic's ICS RC3.1, JVU modem.
I tried changing the NetworkLocation.apk by following this post http://forum.xda-developers.com/showthread.php?p=21351809#post21351809
but since I have absolutely no idea how to use ADB I couldn't do the "change mode to 0644" step.
Someone help a noob?
Thanks.
Well, first off, download the *.apk provided in that post and place it on the sdcard.
adb is a command line tool, so you must insert those commands on a terminal emulator (maybe you got one installed, if not, download one from the market, I can recommend "Android Terminal Emulator").
So, open your terminal emulator and go to the directory where you placed your *.apk. this example has been wrote with the *.apk in the sdcard folder:
Code:
su
cd /mnt/sdcard
adb start-server
adb remount
adb push NetworkLocation.apk /system/app/NetworkLocation.apk
adb chmod 0644 /system/app/NetworkLocation.apk
adb reboot
Note: I wrote this example following my common sense, so I'm not completely sure if this will work!
Cheers!
AurosGamma said:
Well, first off, download the *.apk provided in that post and place it on the sdcard.
adb is a command line tool, so you must insert those commands on a terminal emulator (maybe you got one installed, if not, download one from the market, I can recommend "Android Terminal Emulator").
So, open your terminal emulator and go to the directory where you placed your *.apk. this example has been wrote with the *.apk in the sdcard folder:
Code:
su
cd /mnt/sdcard
adb start-server
adb remount
adb push NetworkLocation.apk /system/app/NetworkLocation.apk
adb chmod 0644 /system/app/NetworkLocation.apk
adb reboot
Note: I wrote this example following my common sense, so I'm not completely sure if this will work!
Cheers!
Click to expand...
Click to collapse
I get a "device not found" error after adb remount. What should I do?
hadar.shamir said:
I get a "device not found" error after adb remount. What should I do?
Click to expand...
Click to collapse
Well I have been looking here and there, and I found that adb doesn't work directly on the phone, you must use adb from your pc. So, this is what you should do from now on:
Install Java SDK
Install Android SDK
Turn on "USB Debugging" in your SGS settings
Connect the Device to the PC
And finally, use the following commands (from the PC):
Code:
// Go to the folder where you put the *.apk
cd C:\users\exampleuser\Documents\ // or /home/exampleuser/Documents/ if you're using linux
adb start-server
adb remount
adb push NetworkLocation.apk /system/app/NetworkLocation.apk
adb chmod 0644 /system/app/NetworkLocation.apk
adb reboot
Note:
The text after the double-slash ( // ), must not be written in the console, they are just comments
You need to install the SDK's because there it is where the adb tool (and tools needed by adb) is found, so, good luck!

[HOW TO] ADB Sideload/Push if you Wipe Internal Storage & No ROM to Flash [19 May 15]

[HOW TO] ADB Sideload/Push if you Wipe Internal Storage & No ROM to Flash [19 May 15]
How to Sideload in TWRP if you erase your Internal Memory and don't have a ROM to Flash or Restore
Warning!
Code:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
Requirements
Code:
#include
/*
* Unlocked Phone @ HTCDEV
* Custom Recovery
*/
Before You Start - Update Android SDK - How to set up Android SDK (ADB)
Instructions
MAKE SURE YOU BACK UP YOUR SD CARD FIRST!!!!!!!!
Make Sure HTC Drivers are installed and ADB is already working
1. Reboot into TWRP
2. in TWRP, Hit andvanced and find Sideload
3. Swipe to start Sideload
4. Open a CMD Prompt window and Change Directories to where your adb.exe is
5. type adb devices and it should show your device conntected and say sideload
6. Your ZIP file should already be in your adb folder - See Example Below
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
7. You are now ready to push the zip.....
8. type adb sideload nameofzip.zip <------------See Example Below
9. Wait until it says 100% and reboot back into recovery to flash the ROM
10. If hitting power does not make the screen come one, type adb reboot recovery
11. if adb reboot recovery does not work, hold power and volume down until it reboots to fastboot then go to recovery
ADB Push from Recovery - If Sideload Fails For You ​
adb push rom.zip /data/media/0/
​
Click to expand...
Click to collapse
If You have any Troubles with ADB
Koush Universal ADB Driver - Works on Windows 8 - Thanks xeroxide
YouTube Video for ADB Help
How to install ADB Drivers for any Device
​
​
​
FAQ
If your Output looks similiar to this below, then you are not in sideload mode or you typed the command incorrectly
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\William>cd Downloads\ADB
C:\Users\William\Downloads\ADB>adb sideload Slim-nozomi-4.2.2.build.6-OFFICIAL
Android Debug Bridge version 1.0.26
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number. Overrides ANDROID_SERI
AL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>:<port> - connect to a device via TCP/IP
disconnect <host>:<port> - disconnect from a TCP/IP device
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> - push this package file to the device and i
nstall it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
('-s' means install on SD card instead of inter
nal storage)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
C:\Users\William\Downloads\ADB>-d
'-d' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\William\Downloads\ADB>-d\
'-d\' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\William\Downloads\ADB>-d: \
'-d:' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\William\Downloads\ADB>:-d
C:\Users\William\Downloads\ADB>-d\
'-d\' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\William\Downloads\ADB>-d
'-d' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\William\Downloads\ADB
DO THE FOLLOWING - (Refer to Post 1 Before you start for Picture Example)
1. Run sdk manager and update all the 4.1.2 - 4.4.2 binaries, you will see installed if you have done so
2. Reboot into TWRP
3. Go to advanced
4. Touch ADB Sideload
5. Swipe To start sideload
6. in command promt example: cd c:\android\sdk\platform-tools (that is where my adb files are at)
7. Once you have navigated to where your adb is at in command promt type adb devices
8. When you type adb devices, it should show your HTCxxjxihdjiw (whatever yours is) and Sideload which indicates you are set up properly
9. Once you see the above type adb sideload nameofzip.zip
bdorr1105 said:
Reserved if needed
Sent from my HTC One using xda premium
Click to expand...
Click to collapse
get em greezemeister!!!!
I have never had to do it... but if I do I know there are easy to understand directions.. Thanks
slimc84 said:
get em greezemeister!!!!
Click to expand...
Click to collapse
Lol thanks greezemeister
Sent from my HTC One using xda premium
Wow amazing that you posted this on the very day like an idiot I bricked my new HTC one. I followed your directions with no luck however. What I did to get in this mess was to wipe the phone before realizing I forgot to put the viper rom in internal storage. (I have an OTG cable on the way but wont be here for a few days.) So I open an adb command window and when I type in adb devices it does show my device with the following text:
"List of devices attached
FA345S900209 host"
I have the rom zip file in the correct directory on my desktop but when I type adb sideload it just brings up the entire adb help menu.FWIW on the phone it shows "starting ADB sideload feature" but it never does anything after that. ANy thoughts would be greatly appreciated!
Thanks!
I have not ran into this for a while, but I thought you could just adb push the Rom to the phone and flash as normal.
Sent from Taptalk on HTC One on some awesome custom Rom!
avwheeler said:
I have not ran into this for a while, but I thought you could just adb push the Rom to the phone and flash as normal.
Sent from Taptalk on HTC One on some awesome custom Rom!
Click to expand...
Click to collapse
Is there any trick to doing that ? I tried adb push and the rom name but is there something I'm missing ?
pitchristian said:
Wow amazing that you posted this on the very day like an idiot I bricked my new HTC one. I followed your directions with no luck however. What I did to get in this mess was to wipe the phone before realizing I forgot to put the viper rom in internal storage. (I have an OTG cable on the way but wont be here for a few days.) So I open an adb command window and when I type in adb devices it does show my device with the following text:
"List of devices attached
FA345S900209 host"
I have the rom zip file in the correct directory on my desktop but when I type adb sideload it just brings up the entire adb help menu.FWIW on the phone it shows "starting ADB sideload feature" but it never does anything after that. ANy thoughts would be greatly appreciated!
Thanks!
Click to expand...
Click to collapse
Try using the tool kit and relocking boot loader and run the RUU
Sent from my HTCONE using xda app-developers app
pitchristian said:
Is there any trick to doing that ? I tried adb push and the rom name but is there something I'm missing ?
Click to expand...
Click to collapse
It has been a while, just remember that the paths/location need to be right. Might have to mount storage or something like that too. Lots of threads on adb. Wish you luck, that sucks.
Sent from Taptalk on HTC One on some awesome custom Rom!
thanks guys I fixed it after relocking the bootloader and running the stock RUU from toolkit as mentioned! I really appreciate it. (FWIW I could never get sideload through TWRP to work)
Added you guide HERE Q14 Thanks OP
pitchristian said:
thanks guys I fixed it after relocking the bootloader and running the stock RUU from toolkit as mentioned! I really appreciate it. (FWIW I could never get sideload through TWRP to work)
Click to expand...
Click to collapse
Glad you got it back up and running. You really should read up on adb. And how to get your paths correct. The toolkits are great but its always good to know ADB just in case you.
Sent from my HTCONE using xda app-developers app
Sorry guys I am 6hrs behind east coast. I live in Hawaii
You can use adb push if the phone is picked up in recovery but a lot of times my phone isnt recongnised. You have to go in advanced and swipe to start adb sideload...You literally dont have to pick a path because by default side load pushes to the root of your sd card...All you have to do is have the zip in the right place on your computer and type the command as instructed and it will push the zip to your sd card
pitchristian said:
Wow amazing that you posted this on the very day like an idiot I bricked my new HTC one. I followed your directions with no luck however. What I did to get in this mess was to wipe the phone before realizing I forgot to put the viper rom in internal storage. (I have an OTG cable on the way but wont be here for a few days.) So I open an adb command window and when I type in adb devices it does show my device with the following text:
"List of devices attached
FA345S900209 host"
I have the rom zip file in the correct directory on my desktop but when I type adb sideload it just brings up the entire adb help menu.FWIW on the phone it shows "starting ADB sideload feature" but it never does anything after that. ANy thoughts would be greatly appreciated!
Thanks!
Click to expand...
Click to collapse
Hey man I think you already fixed your phone but in the future you have to be booted into TWRP already then what you do next is go to Advanced and then Sideload then you swipe to enable sideload on the phone...After you have done that the phone will say starting adb sideload...It's important you update Adnroid SDK so you have the latest binaries....Once sideload is enabled on your phone then you you type the adb devices and it shouls show your device and say sideload, if it does you are solid...
After that then you type adb sideload nameofzip.zip and it will start pushing to the root of your SD card and then you just flash like normal...
Glad locking the bootloader and using the toolkit worked for you bro
bigdaddy619 said:
Added you guide HERE Q14 Thanks OP
Click to expand...
Click to collapse
Thanks man appreciate it. Thanks for the heads up
avwheeler said:
I have not ran into this for a while, but I thought you could just adb push the Rom to the phone and flash as normal.
Sent from Taptalk on HTC One on some awesome custom Rom!
Click to expand...
Click to collapse
You can use adb push but if your phone is in recovery adb didn't recognize my phone, it did when I was booted in my ROM but this is worst case or upgrading and you wipe the internal memory before you flash and your sd is blank and you can't flash adb sideload is different than regular adb commands...
When I wiped my SD on accident a few days ago I managed to adb push while in recovery.
I think it has to do with which drivers you have installed. I just use the ones that come with the Android SDK ( /sdk/extras/google/usb_driver/android_winusb.inf ), and I have the driver set to "Android Composite ADB Interface".
Always good to have options though. :good:
Harfainx said:
When I wiped my SD on accident a few days ago I managed to adb push while in recovery.
I think it has to do with which drivers you have installed. I just use the ones that come with the Android SDK ( /sdk/extras/google/usb_driver/android_winusb.inf ), and I have the driver set to "Android Composite ADB Interface".
Always good to have options though. :good:
Click to expand...
Click to collapse
Yeah it is good to have options, there is no need for paths pretty much sideload puahes to the root of your sd card automatically so it's easier in my opinion. Anyway thanks for the info
Sent from my HTC One using xda premium
bdorr1105 said:
Yeah it is good to have options, there is no need for paths pretty much sideload puahes to the root of your sd card automatically so it's easier in my opinion. Anyway thanks for the info
Sent from my HTC One using xda premium
Click to expand...
Click to collapse
So what happens when all the abve has occurred and now in TWRP it states, Sideload failed?

[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

Patching Sepolicy with Supolicy Tool, modifed file not produced.

I am in the position of having to manually apply the defult sepolicy patch, init,?*init_shell?* and?*recovery?*permissive, and as the title states when using the supolicy tool to modify my supplieded sepolicy it is not being produced and on closer inspection throwing an error. I have attached both the images and the sepolicy file I am trying to applie these change to.
Have I been doing something wrong or is the file corrupted??
If you need more info just ask
Note: when I first tried it inside an adb shell it reported a segumentation fault, but I was unable to reproduce that condition to be provided with as a screen shot.
{
"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"
}
EDIT: I at least can say that the possibility of a corrupt file is now smaller becuse I am able to run dumpav and dump its contents to a txt file and then do afb pull back to pc. So amyone know any way to applie the defult P atchs needed to sysyemless root?
@Chainfire Since this is your binary files, you should know the most about it.
Commands to gain application root on emulator
Code:
adb shell df #Check Available Space
adb shell mount -o remount,rw /system
adb push su /system/bin/su
adb shell chmod 0755 /system/bin/su
adb push su /system/xbin/su
adb shell chmod 0755 /system/xbin/su
adb shell su --install
adb shell "su --daemon&"
adb install superuser.apk
adb install rootcheck.apk
I then proceed to patch the sepolicy file with the following commands
Code:
adb push sepolicy /data/local/tmp/sepolicy
adb shell su -c "supolicy --file /data/local/tmp/sepolicy /data/local/tmp/sepolicy_out" #There is no sepolicy_out file
adb shell su -c "chmod 0644 /data/local/tmp/sepolicy_out"
adb pull /data/local/tmp/sepolicy_out sepolicy_out
So what am I able to do?
Are you able to
A) Help me debug the problem
Or
B) Patch the sepolicy file and post the output back to me/here
Matt07211 said:
...
Click to expand...
Click to collapse
Works fine on my device... could be an x86 specific issue? Unfortunately I don't have any x86 devices to test with.
Thanks for that. Yes, I am trying to patch the policy for my armv8 (arm64) cpu device (just realised, but would trying to patch the sepolicy from one architecture using the supolicy for a different architecture have new the problem?, if so I feel dumb). And since I didn't have a spare device devce that met the requirements, I resorted to use the already setup emulator in my Windows installation.
I had proceeded to root and run the supolicy tool for which nothing out-putted (tried different directorys), I then created a new sub-directory, test, in /data/local/tmp and chmod it with read and write permissions. I tried again and failed, I then ran a dumpav in the sepolicy I was trying to patch and outputted it to /data/local/tmp/test/dumpav.txt which worked.
I am just wondering why it didn't work for me .
Thanks again for the sepolic_out file, I really do apperciate it.
Ah you're saying the segmentation fault occurred on the emulator? That's interesting. Might be reproducable on my end.
Note: look at my first image with cms in the foreground and near the bottom of the command window you should see the segfault message, around second last command or so.
To reproduce that segfault (hopefully):
1) https://software.intel.com/en-us/android/articles/android-44-kitkat-x86-emulator-system-image Download the system image from here (had to direct download instead of sdk as internet was running through profile and ask wouldn't work through it)
2) used the 2.78 SuperSu zip and run above commands to gain root
3) run above commands to try and modify sepolicy (it doesn't produce anything)
4) start an adb shell and then run the commands inside the shell. Know the outputs shown was segfault the first time running the commands, every time afterwards it would show the error in the above screenshots
If you figure out what cause the segfault can you please tell me ?
Matt07211 said:
Note: look at my first image with cms in the foreground and near the bottom of the command window you should see the segfault message, around second last command or so.
To reproduce that segfault (hopefully):
1) https://software.intel.com/en-us/android/articles/android-44-kitkat-x86-emulator-system-image Download the system image from here (had to direct download instead of sdk as internet was running through profile and ask wouldn't work through it)
2) used the 2.78 SuperSu zip and run above commands to gain root
3) run above commands to try and modify sepolicy (it doesn't produce anything)
4) start an adb shell and then run the commands inside the shell. Know the outputs shown was segfault the first time running the commands, every time afterwards it would show the error in the above screenshots
If you figure out what cause the segfault can you please tell me ?
Click to expand...
Click to collapse
Before I go do all this, can you make sure the issue persists with the v2.78 SR1 version from the BETA thread ? Some issues with supolicy were fixed in that release.
Started with a fresh emulator and the newest SuperSu and ran these commands to gain root (I am placing everything as described in update-binary in the right places just to eliminate one thing, missing dependencies)
Code:
adb shell df
adb shell mount -o remount,rw /system
adb push Superuser.apk /system/app/Superuser.apk
adb shell chmod 0644 /system/app/Superuser.apk
adb push install-recovery.sh /system/etc/install-recovery.sh
adb shell ln -s /system/etc/install-recovery.sh /system/bin/install-recovery.sh
adb shell chmod 0755 /system/etc/install-recovery.sh
adb push su /system/xbin/su
adb shell chmod 0755 /system/xbin/su
adb push su /system/bin/.ext/.su
adb shell chmod 0755 /system/bin/.ext/.su
adb push su /system/xbin/daemonsu
adb shell chmod 0755 /system/xbin/daemonsu
adb push su /system/xbin/sugote
adb shell chmod 0755 /system/xbin/sugote
adb push supolicy /system/xbin/supolicy
adb shell chmod 0755 /system/xbin/supolicy
adb push libsupol.so /system/lib/libsupol.so
adb shell chmod 0644 /system/lib/libsupol.so
adb push 99SuperSUDaemon /system/etc/init.d/99SuperSUDaemon
adb shell chmod 0755 /system/etc/init.d/99SuperSUDaemon
adb shell su --install
adb shell "su --daemon&"
adb install superuser.apk
adb install rootcheck.apk
No everything should be in place, and we now can eliminate one thing (supolicy not finding needed dependencies)
Opened up SuperSu and let it install/update binary (succesful)
I then proceeded to patch the sepolicy file like so
Code:
adb push sepolicy /data/local/tmp/sepolicy
adb shell su -c "supolicy --file /data/local/tmp/sepolicy /data/local/tmp/sepolicy_out"
I then did "ls" in the directory and no file out-putted. So I went into a shell and ran
Code:
supolicy --file /data/local/tmp/sepolicy /data/local/tmp/sepolicy_out
And it throw the error shown in the image below. First time running that command in shell it says stopped, but the second time it says stopped as well as segfault.
Keep in mind I am trying to patch a sepolicy file that originates from an armv8 cpu (arm64) on an x86 Intel emulator.
Any more info needed? I am happy to help @Chainfire
So, I think it has something to do with your emulator image (perhaps its too old ?)
I took SuperSU's ZIP file and extracted it, changed to that folder, then:
(note that my adb shell to my emulator image has # root by default)
Code:
adb push c:\download\sepolicy /data/local/tmp/sepolicy
adb push x86\. /data/local/tmp/.
adb shell
cd /data/local/tmp
chmod 0755 supolicy
LD_LIBRARY_PATH=/data/local/tmp:$LD_LIBRARY_PATH ./supolicy --file sepolicy sepolicy_out
exit
Resulting in:
Code:
supolicy v2.78 (ndk:x86) - Copyright (C) 2014-2016 - Chainfire
Patching policy [sepolicy] --> [sepolicy_out] ...
- Success
So, I'm really not sure what might be going on with your setup, but I don't think its SuperSU itself, but rather the emulator.
Note that to use supolicy --file, you only need supolicy and libsupol.so, you don't even need root.
Chainfire said:
So, I think it has something to do with your emulator image (perhaps its too old ?)
I took SuperSU's ZIP file and extracted it, changed to that folder, then:
(note that my adb shell to my emulator image has # root by default)
Resulting in:
So, I'm really not sure what might be going on with your setup, but I don't think its SuperSU itself, but rather the emulator.
Note that to use supolicy --file, you only need supolicy and libsupol.so, you don't even need root.
Click to expand...
Click to collapse
Hmm, I really don't know what is wrong, I will try exactly what you have done later today, to see If can reproduce the output. If it doesn't work then we can pin it down to the emulator itself. What emulator image did you use?
I also realise that so emulator are rooted in the sense that web shell has root acess, just wasn't sure what dependices supolicy had at the time.
Matt07211 said:
Hmm, I really don't know what is wrong, I will try exactly what you have done later today, to see If can reproduce the output. If it doesn't work then we can pin it down to the emulator itself. What emulator image did you use?
I also realise that so emulator are rooted in the sense that web shell has root acess, just wasn't sure what dependices supolicy had at the time.
Click to expand...
Click to collapse
I created an API 22 Google Nexus x86_64 AVD in Android Studio
I should be able to try that in about 20-30 mins after I download it, I was using api level 19, Intel's emulator image.
I ran these commands on the Intel api 19 x86 emulator image.
Code:
adb push libsupol.so /system/lib/libsupol.so
adb shell chmod 0644 /system/lib/libsupol.so
adb push /system/xbin/supolicy
adb shell chmod 0755 /system/xbin/supolicy
adb push supolicy /data/local/tmp/supolicy
adb shell chmod 0755 /data/local/tmp/supolicy
adb push sepolicy /data/local/tmp/sepolicy
adb shell
cd /data/local/tmp
chmod 0755 supolicy
LD_LIBRARY_PATH=/data/local/tmp:$LD_LIBRARY_PATH ./supolicy --file sepolicy sepolicy_out
and it results in the error(shown in screenshot)
Code:
libsepol.policydb_read: policydb magic number 0x464c457f does not match expected magic number 0xf97cff8c or 0xf97cff8d
-Failure!
I then tried it on the Intel x86_64 api 22 emulator image (running the same commands as the first one, resulting in a succes, with the file being outputted as the sepolicy_out.
So as you have stated @Chainfire , it looks like a problem with the emulator itself, and most likely not the supolicy tool.
Chainfire said:
So, I think it has something to do with your emulator image (perhaps its too old ?)
I took SuperSU's ZIP file and extracted it, changed to that folder, then:
(note that my adb shell to my emulator image has # root by default)
Code:
adb push c:\download\sepolicy /data/local/tmp/sepolicy
adb push x86\. /data/local/tmp/.
adb shell
cd /data/local/tmp
chmod 0755 supolicy
LD_LIBRARY_PATH=/data/local/tmp:$LD_LIBRARY_PATH ./supolicy --file sepolicy sepolicy_out
exit
Resulting in:
Code:
supolicy v2.78 (ndk:x86) - Copyright (C) 2014-2016 - Chainfire
Patching policy [sepolicy] --> [sepolicy_out] ...
- Success
So, I'm really not sure what might be going on with your setup, but I don't think its SuperSU itself, but rather the emulator.
Note that to use supolicy --file, you only need supolicy and libsupol.so, you don't even need root.
Click to expand...
Click to collapse
@Chainfire, I'm trying to patch sepolicy for a Samsung device running Nougat, so that Supersu can be installed in system mode. Could you confirm if the --sdk=24 parameter is required?
adb shell su -c "supolicy --file /data/local/tmp/sepolicy /data/local/tmp/sepolicy_out --sdk=24"
Thanks, appreciate your time.
ashyx said:
@Chainfire, I'm trying to patch sepolicy for a Samsung device running Nougat, so that Supersu can be installed in system mode. Could you confirm if the --sdk=24 parameter is required?
adb shell su -c "supolicy --file /data/local/tmp/sepolicy /data/local/tmp/sepolicy_out --sdk=24"
Thanks, appreciate your time.
Click to expand...
Click to collapse
Yes it is.
System mode hasn't been tested at all on 7.0 though. I'm not sure anybody has been able to get it to work at this point.
If you do, let me know and with the steps
Chainfire said:
Yes it is.
System mode hasn't been tested at all on 7.0 though. I'm not sure anybody has been able to get it to work at this point.
If you do, let me know and with the steps
Click to expand...
Click to collapse
Hmm wasn't aware of the lack of support for system mode in nougat, any plans to implement?
It seems system mode root renders the device unbootable according to reports from my tester.
Question, if I modify the supersu script to mount su.img from /system am I likely to hit issues?
Seems a strange query I know.
Reason is we have a Samsung device that for some reason will not boot from a source built custom Nougat kernel. Not sure if this is related to AVB yet or something else.
However we can get a half assed TWRP to boot with the stock kernel.
Only problem is, no matter what, only /system can be mounted and accessed with write permission due to permission denied issues with the rest of partitions. Pretty sure this is an SELinux issue.
Meaning systemless root cannot be installed as normal. No access to /data or /cache.
I can patch the boot.img ramdisk manually for systemless, but for root to work I would need to push su.img to system and mount it from there.
Is it possible to still mount su.img from system if I modify the ramdisk init as required?
The other avenue is to flash su.img to /data or /cache via ODIN.
If it was flashed to /cache would supersu automatically pick up its location and copy it to /data or would a flag need to be set?
Just trying to keep my options open here.
ashyx said:
Hmm wasn't aware of the lack of support for system mode in nougat, any plans to implement?
It seems system mode root renders the device unbootable according to reports from my tester.
Click to expand...
Click to collapse
It is on my list of things to test/fix, but that list is long and full of terrors.
Question, if I modify the supersu script to mount su.img from /system am I likely to hit issues?
Is it possible to still mount su.img from system if I modify the ramdisk init as required?
Click to expand...
Click to collapse
I think that could work, yes.
The other avenue is to flash su.img to /data or /cache via ODIN.
If it was flashed to /cache would supersu automatically pick up its location and copy it to /data or would a flag need to be set?
Just trying to keep my options open here.
Click to expand...
Click to collapse
SuperSU should pick it up from /cache. Alternatively, try SuperSU's FRP mode, which stores a copy of the needed files in the boot-image and re-creates /data/su.img as needed.
Chainfire said:
It is on my list of things to test/fix, but that list is long and full of terrors.
I think that could work, yes.
SuperSU should pick it up from /cache. Alternatively, try SuperSU's FRP mode, which stores a copy of the needed files in the boot-image and re-creates /data/su.img as needed.
Click to expand...
Click to collapse
Thanks, great info as always. Finally managed to root the damn thing by adding a short script to the init which copies su.img to cache.
However FRP mode sounds like a more elegant solution if I can work out how to implement it in the Ramdisk.
Much appreciate your input.
ashyx said:
So, I think it has something to do with your emulator image (perhaps its too old ?)
...
Could you confirm if the --sdk=24 parameter is required?
adb shell su -c "supolicy --file /data/local/tmp/sepolicy /data/local/tmp/sepolicy_out --sdk=24"
Thanks, appreciate your time.
Click to expand...
Click to collapse
Yea believe it was segfaulting due to the Android version, I think I was using KitKat and it wasn't working, bumped up to lollipop and above and it worked fine
Oh, the SDK parameter, never heard of it, what does it do? Geuss I'll Google that then.
ashyx said:
Thanks, great info as always. Finally managed to root the damn thing by adding a short script to the init which copies su.img to cache.
However FRP mode sounds like a more elegant solution if I can work out how to implement it in the Ramdisk.
Much appreciate your input.
Click to expand...
Click to collapse
I did the same thing for my device, add a little script to move it to data. Had no other way to get it to a locked down device without TWRP. Hehe. Good job
Can you please tell me how to manually patch init by supersu ?
I've googled a lot, but haven't found a way to manually patch init by supersu.
My model is Honor v10, there isn't a custom recovery, so i have to make a boot.img with supersu inside to get root.

Categories

Resources