aarony / asef

Automatically exported from code.google.com/p/asef
0 stars 0 forks source link

dont use absolut paths #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
when the android sdk is correctly installed, no absolut paths are required. 
Also i got in trouble using your provided adb.

a patch is attached!

Original issue reported on code.google.com by 5hp...@gmail.com on 3 Aug 2012 at 8:29

Attachments:

GoogleCodeExporter commented 9 years ago
Can you provide the OS which you are using ?

I suppose it would be Ubuntu and I was able to reproduce the issue.

I will roll out the fix for it by the end of the week.

This current setting should work ok for OS X for now.

Thanks for addressing this. Very much appreciated.

Original comment by parth.ph...@gmail.com on 8 Aug 2012 at 6:04

GoogleCodeExporter commented 9 years ago
Rather than using stand alone utilities 'adb' and 'aapt' bundled in ASEF, 
please change the path to point to the binaries inside Android SDK within 
platform-tools.

instead of ./adb -> ../platform-tools/adb
instead of ./aapt -> ../platform-tools/aapt

Scripts that may require this change :-

apkeval.pl
execadblogcat.sh    
execdmesg.sh        
execdumpsys.sh      
execps.sh

Original comment by parth.ph...@gmail.com on 5 Oct 2012 at 10:17

GoogleCodeExporter commented 9 years ago
Here is the alternate fix, which should resolve the issue :-

========================================

cat ASEF_OSP_patch1.txt 
diff ../ASEF_OSP_ORIGINAL/apkeval.pl ASEF_OSP_FIXED/apkeval.pl
168c168
<   `./adb kill-server`;
---
>   `../platform-tools/adb kill-server`;
171c171
<   @ADBSER = `./adb start-server`;
---
>   @ADBSER = `../platform-tools/adb start-server`;
206c206
<   @ARRDEVICES = `./adb devices`;
---
>   @ARRDEVICES = `../platform-tools/adb devices`;
257c257
<   @ARRPKGLIST = `./adb -s $DEVICEID shell pm list packages`;
---
>   @ARRPKGLIST = `../platform-tools/adb -s $DEVICEID shell pm list packages`;
268c268
<    if ($APKCNT == 5) { last; } # if you have 50+ applications installed, you 
can just use this counter to only do it for 5 if you are only interested in 
it'd demo...
---
> #   if ($APKCNT == 5) { last; } # if you have 50+ applications installed, you 
can just use this counter to only do it for 5 if you are only interested in 
it'd demo...
274c274
<    $APKPATH = `./adb -s $DEVICEID shell pm path $_`;
---
>    $APKPATH = `../platform-tools/adb -s $DEVICEID shell pm path $_`;
293c293
<      `./adb -s $DEVICEID pull $BKAPKPATH $EXTRCTAPK`;
---
>      `../platform-tools/adb -s $DEVICEID pull $BKAPKPATH $EXTRCTAPK`;
453c453
<    @AAPTDUMP = `./aapt dump badging $FULLPATH`;
---
>    @AAPTDUMP = `../platform-tools/aapt dump badging $FULLPATH`;
586c586
<   @ARRDEVICES = `./adb devices`;
---
>   @ARRDEVICES = `../platform-tools/adb devices`;
628c628
<    @ARRDEVICES = `./adb devices`;
---
>    @ARRDEVICES = `../platform-tools/adb devices`;
630c630
<    my $FOUNDEMU = `./adb devices |grep emulator`;
---
>    my $FOUNDEMU = `../platform-tools/adb devices |grep emulator`;
701c701
<    `./adb -s $SCANDEVICE shell input keyevent 82`;
---
>    `../platform-tools/adb -s $SCANDEVICE shell input keyevent 82`;
723c723
<  @ARRDEVICES = `./adb devices`;
---
>  @ARRDEVICES = `../platform-tools/adb devices`;
791c791
<    `./adb -s $SCANDEVICE logcat -c`; # this will flush all the adb log 
message history from the device. not performing this step can cause False 
Postives and overlaps on various app results. If the message history is suppose 
to be preserved, in that case this can be replaced by another technique where 
it will collect all the adb log data without flushing it and later chop it 
based on time stamps.
---
>    `../platform-tools/adb -s $SCANDEVICE logcat -c`; # this will flush all 
the adb log message history from the device. not performing this step can cause 
False Postives and overlaps on various app results. If the message history is 
suppose to be preserved, in that case this can be replaced by another technique 
where it will collect all the adb log data without flushing it and later chop 
it based on time stamps.
821c821
<    system("./adb -s $SCANDEVICE install -s $APKFULLPATH");
---
>    system("../platform-tools/adb -s $SCANDEVICE install -s $APKFULLPATH");
829c829
<    system("./adb -s $SCANDEVICE shell am start -n $LAUNCHAPK");
---
>    system("../platform-tools/adb -s $SCANDEVICE shell am start -n 
$LAUNCHAPK");
837c837
<    system("./adb -s $SCANDEVICE shell monkey -p $PACKAGENAME $RGC");
---
>    system("../platform-tools/adb -s $SCANDEVICE shell monkey -p $PACKAGENAME 
$RGC");
843c843
<    system("./adb -s $SCANDEVICE uninstall $PACKAGENAME");
---
>    system("../platform-tools/adb -s $SCANDEVICE uninstall $PACKAGENAME");
1221c1221
<  system("./adb install -s $APKFULLPATH");
---
>  system("../platform-tools/adb install -s $APKFULLPATH");

diff ../ASEF_OSP_ORIGINAL/execadblogcat.sh ASEF_OSP_FIXED/execadblogcat.sh
3c3
< ./adb -s $1 logcat -v time >"$2" &
---
> ../platform-tools/adb -s $1 logcat -v time >"$2" &

diff ../ASEF_OSP_ORIGINAL/execdmesg.sh ASEF_OSP_FIXED/execdmesg.sh
3c3
< ./adb shell dmesg >"$@" &
---
> ../platform-tools/adb shell dmesg >"$@" &

diff ../ASEF_OSP_ORIGINAL/execdumpsys.sh ASEF_OSP_FIXED/execdumpsys.sh
3c3
< ./adb shell dumpsys >"$@" &
---
> ../platform-tools/adb shell dumpsys >"$@" &

diff ../ASEF_OSP_ORIGINAL/execps.sh ASEF_OSP_FIXED/execps.sh
3c3
< ./adb shell ps >"$@" &
---
> ../platform-tools/adb shell ps >"$@" &

=========================================

Original comment by parth.ph...@gmail.com on 21 Oct 2012 at 9:51

Attachments: