Hovatek Forum DEVELOPMENT Android [Tutorial] How to fix offline status or device not detected in adb after porting ROM
Try our Online TWRP Builder..its free!
Can't login? Please, reset your password.


[Tutorial] How to fix offline status or device not detected in adb after porting ROM

[Tutorial] How to fix offline status or device not detected in adb after porting ROM

hovatek
hovatek
hovatek
Administrator
49,570
29-09-2014, 05:05 PM
#1



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
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://www.hovatek.com/forum/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
This post was last modified: 13-06-2018, 09:59 AM by hovatek.

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
androgen
androgen
androgen
Senior Member
130
29-09-2014, 09:29 PM
#2
Nice!
hovatek
hovatek
hovatek
Administrator
49,570
05-02-2015, 08:31 PM
#3
for those that'll be fixing ROM porting issues using logcat

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
Users browsing this thread:
 1 Guest(s)
Users browsing this thread:
 1 Guest(s)
YtWhTl
live chat
whatsapp telegram instagram