Hello There, Guest! Login Register

Would you like to work with Hovatek? Team Hovatek is recruiting...see our blog post for details (February 23, 2017)



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] How to fix offline status or device not detected in adb after porting ROM
#1
(This post was last modified:02-07-2015, 01:14 PM by hovatek. )

After porting (I mean getting down in the mud porting, not replacing one or two files then doing a build.prop edit and calling it porting), you might run into a few problems. This is where logcat comes to the rescue. What then happens if adb is unable to detect your device or you get device offline whenever you run the adb devices command? Without a logcat to tell you what's wrong, you're flying blind in the porting skies.

In this brief guide, we'll be treating one technique that could help get adb and logcat dump working again.

Requirement

* PC
* Setup Android kitchen (see http://forum.hovatek.com/thread-647.html )
* Ported ROM (Not the same as Port ROM)
* Base ROM

Procedure

Hint: This guide assumes you've already ported the Port ROM to the Base ROM in Android Kitchen and have the working folder


you could try the

Code:
adb kill-server

command as it helps fix some instances of device offline in adb. If that doesn't work, then proceed with this guide.

Copy the following files from the Base ROM to the Working folder (see http://forum.hovatek.com/thread-650.html ) of the Ported ROM

* system/xbin/su
* system/xbin/busybox (if present)
* system/xbin/zip (if present)
* system/app/superuser.apk
* boot.img-ramdisk/default.prop (unpack > replace > repack boot.img)

Edit update-script

In the update-script (META-INF > com > google > android) , add the following at the end

Code:
set_perm 0 2000 0755 SYSTEM:vendor/lib
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");
show_progress 0.1 10
show_progress 0.2 0
assert(package_extract_file("boot.img", "/tmp/boot.img"),
       write_raw_image("/tmp/boot.img", "bootimg"),
       delete("/tmp/boot.img"));
show_progress 0.2 10
write_raw_image PACKAGE:boot.img BOOT:

You can now go ahead and build the ROM from the working folder



Reply
#2
Nice!
Reply
#3
for those that'll be fixing ROM porting issues using logcat
Reply






Users browsing this thread:
1 Guest(s)